From 22f43400285c645d1fb30b3f85e14e9588f4cfdb Mon Sep 17 00:00:00 2001 From: Looky1173 Date: Sat, 27 May 2023 12:20:20 +0200 Subject: [PATCH 01/33] Code Cleanup --- Source/ContentChecker/AceLoader.cs | 5 - Source/ContentChecker/ActivityLoader.cs | 8 - Source/ContentChecker/CabviewLoader.cs | 6 - Source/ContentChecker/CarSpawnLoader.cs | 3 - Source/ContentChecker/ConsistLoader.cs | 6 - Source/ContentChecker/EngineLoader.cs | 6 - .../ContentChecker/EnvironmentFileLoader.cs | 6 - Source/ContentChecker/HazardLoader.cs | 6 - Source/ContentChecker/Loader.cs | 7 +- Source/ContentChecker/LoaderFactory.cs | 2 - Source/ContentChecker/NotRecognizedLoader.cs | 6 - Source/ContentChecker/NotUsedLoader.cs | 6 - Source/ContentChecker/PathLoader.cs | 6 - Source/ContentChecker/Program.cs | 10 +- Source/ContentChecker/RoadDataBaseLoader.cs | 6 - Source/ContentChecker/ServiceLoader.cs | 6 - .../ContentChecker/ShapeDescriptionLoader.cs | 6 - Source/ContentChecker/ShapeLoader.cs | 6 - Source/ContentChecker/SignalConfigLoader.cs | 5 - Source/ContentChecker/SignalScriptLoader.cs | 6 +- Source/ContentChecker/SmsLoader.cs | 10 +- .../ContentChecker/TerrainAltitudeLoader.cs | 4 - Source/ContentChecker/TerrainFlagsLoader.cs | 4 - Source/ContentChecker/TerrainLoader.cs | 4 - Source/ContentChecker/TimeTableLoader.cs | 3 - Source/ContentChecker/TrackDataBaseLoader.cs | 5 - Source/ContentChecker/TrackFileLoader.cs | 12 +- Source/ContentChecker/TrackTypeLoader.cs | 6 - Source/ContentChecker/TrafficLoader.cs | 6 - Source/ContentChecker/TsectionGlobalLoader.cs | 7 +- Source/ContentChecker/TsectionLoader.cs | 8 +- Source/ContentChecker/WagonLoader.cs | 6 - Source/ContentChecker/WavLoader.cs | 8 +- Source/ContentChecker/WorldFileLoader.cs | 8 +- Source/ContentChecker/WorldSoundLoader.cs | 4 - .../ActivityEditor/AboutActEdit.cs | 4 - .../ControlStartProperties.cs | 7 - .../ControlStoppedProperties.cs | 6 - .../ActionProperties/HornProperties.cs | 7 - .../ActivityEditor/Activity/StartActivity.cs | 6 - .../ActivityEditor/Activity/WaitActivity.cs | 6 - .../ActivityEditor/Engine/AEActivity.cs | 7 - .../ActivityEditor/Engine/AEConfig.cs | 20 +- .../ActivityEditor/Engine/AERouteConfig.cs | 11 +- .../ActivityEditor/Engine/ActEditor.cs | 14 +- .../ActivityEditor/Engine/ProcessState.cs | 2 - .../ActivityEditor/Engine/PseudoSim.cs | 29 +- .../ActivityEditor/Engine/SimpleTextEd.cs | 12 +- .../ActivityEditor/Engine/Viewer2D.cs | 150 +++--- .../ActivityEditor/Internat/IntalMngr.cs | 8 +- .../ActivityEditor/Preference/AEPreference.cs | 31 +- .../ActivityEditor/Preference/Options.cs | 23 +- .../ActivityEditor/ActivityEditor/Program.cs | 7 +- .../Route Metadata/BufferInterface.cs | 7 - .../Route Metadata/ConnectorInterface.cs | 7 - .../Route Metadata/StationDisplay.cs | 19 +- .../Route Metadata/TrackSegmentInterface.cs | 6 - .../ActivityEditor/ActivityEditor/Settings.cs | 22 +- .../ActivityEditor/Wizard/ActivityDescr.cs | 34 +- .../ActivityEditor/Wizard/SelectRoute.cs | 5 +- .../ActivityEditor/Wizard/SinglePage.cs | 3 +- .../ActivityEditor/Wizard/TrainInfo.cs | 10 +- .../ActivityEditor/Wizard/WizardForm.cs | 164 +++---- .../Contrib/ActivityEditor/LibAE/AEUtility.cs | 10 +- .../LibAE/Formats/ActivityInfo.cs | 13 +- .../LibAE/Formats/MSTSDataConfig.cs | 9 +- .../ActivityEditor/LibAE/Formats/PathEvent.cs | 19 +- .../ActivityEditor/LibAE/Formats/TrackDef.cs | 13 +- .../Contrib/ActivityEditor/LibAE/RouteInfo.cs | 2 - Source/Contrib/ContentManager/Content.cs | 12 +- Source/Contrib/ContentManager/ContentInfo.cs | 7 +- .../Contrib/ContentManager/ContentManager.cs | 2 +- .../ContentManager/ContentManagerGUI.cs | 2 +- Source/Contrib/ContentManager/ContentOR.cs | 3 - .../Contrib/ContentManager/Models/Activity.cs | 4 +- Source/Contrib/ContentManager/Models/Car.cs | 5 +- .../Contrib/ContentManager/Models/Consist.cs | 8 +- Source/Contrib/ContentManager/Models/Path.cs | 4 +- Source/Contrib/ContentManager/Models/Route.cs | 5 +- .../Contrib/ContentManager/Models/Service.cs | 6 +- Source/Contrib/ContentManager/Program.cs | 2 - Source/Contrib/DataCollector/Program.cs | 4 +- .../Contrib/DataConverter/ClockConverter.cs | 9 +- .../Contrib/DataConverter/TerrainConverter.cs | 2 +- Source/Contrib/DataValidator/Program.cs | 2 +- .../Contrib/DataValidator/TerrainValidator.cs | 6 +- Source/Contrib/DataValidator/Validator.cs | 2 - Source/Contrib/SimulatorTester/Program.cs | 8 +- .../TrackViewer/Drawing/BasicShapes.cs | 77 ++- .../TrackViewer/Drawing/CloseToMouse.cs | 22 +- .../TrackViewer/Drawing/DebugWindow.cs | 6 +- .../Contrib/TrackViewer/Drawing/DrawArea.cs | 13 +- .../Contrib/TrackViewer/Drawing/DrawColors.cs | 58 +-- .../Drawing/DrawLongitudeLatitude.cs | 8 +- .../TrackViewer/Drawing/DrawMultiplePaths.cs | 10 +- .../TrackViewer/Drawing/DrawScaleRuler.cs | 21 +- .../TrackViewer/Drawing/DrawTerrain.cs | 4 +- .../TrackViewer/Drawing/DrawTrackDB.cs | 66 ++- .../TrackViewer/Drawing/DrawWorldTiles.cs | 12 +- .../TrackViewer/Drawing/DrawableTrackItem.cs | 40 +- .../TrackViewer/Drawing/Labels/DrawLabels.cs | 24 +- .../Drawing/Labels/EditLabel.xaml.cs | 7 +- .../Drawing/Labels/StorableLabels.cs | 7 +- .../TrackViewer/Drawing/ShadowDrawArea.cs | 72 +-- .../TrackViewer/Editing/AutoConnectTools.cs | 28 +- .../Editing/AutoFixAllPaths.xaml.cs | 24 +- .../Editing/Charts/DrawPathChart.cs | 64 ++- .../Editing/Charts/PathChartData.cs | 38 +- .../Editing/Charts/PathChartWindow.xaml.cs | 15 +- .../TrackViewer/Editing/ConnectableNode.cs | 17 +- .../TrackViewer/Editing/DrawEditorAction.cs | 4 +- .../TrackViewer/Editing/DrawPATfile.cs | 18 +- .../Contrib/TrackViewer/Editing/DrawPath.cs | 50 +- .../TrackViewer/Editing/EditorActions.cs | 96 ++-- .../TrackViewer/Editing/ModificationTools.cs | 16 +- .../Contrib/TrackViewer/Editing/PathEditor.cs | 52 +- .../Editing/PathMetadataDialog.xaml.cs | 19 +- .../TrackViewer/Editing/SavePatFile.cs | 36 +- .../TrackViewer/Editing/TrackExtensions.cs | 15 +- .../Contrib/TrackViewer/Editing/Trainpath.cs | 22 +- .../TrackViewer/Editing/TrainpathNode.cs | 66 +-- .../Editing/WaitPointDialog.xaml.cs | 24 +- Source/Contrib/TrackViewer/Program.cs | 2 +- Source/Contrib/TrackViewer/TrackViewer.cs | 37 +- .../TrackViewer/UserInterface/Languages.cs | 5 +- .../UserInterface/MenuControl.xaml.cs | 17 +- .../UserInterface/OtherPathsWindow.xaml.cs | 14 +- .../UserInterface/SearchControl.xaml.cs | 17 +- .../UserInterface/StatusBarControl.xaml.cs | 24 +- .../UserInterface/TVInputSettings.cs | 35 +- .../TrackViewer/UserInterface/TVUserInput.cs | 2 +- Source/Launcher/Program.cs | 2 +- Source/Menu/ImportExportSaveForm.cs | 16 +- Source/Menu/MainForm.cs | 21 +- Source/Menu/Options.cs | 14 +- Source/Menu/Program.cs | 4 +- Source/Menu/ResumeForm.cs | 39 +- Source/Menu/SortableBindingList.cs | 3 - Source/Menu/Task.cs | 1 - Source/Menu/TestingForm.cs | 6 +- Source/ORTS.Common/Conversions.cs | 56 +-- Source/ORTS.Common/Coordinates.cs | 4 +- Source/ORTS.Common/DataLogger.cs | 9 +- Source/ORTS.Common/Filter.cs | 33 +- Source/ORTS.Common/FxCopAttributes.cs | 69 ++- Source/ORTS.Common/InfoApiMap.cs | 5 +- Source/ORTS.Common/Integrator.cs | 3 - Source/ORTS.Common/SettingsBase.cs | 158 +++--- Source/ORTS.Common/SettingsStore.cs | 129 +++-- Source/ORTS.Common/SmoothedData.cs | 2 - Source/ORTS.Common/SystemInfo.cs | 5 +- .../ORTS.Common/TrackMonitorSignalAspect.cs | 5 - Source/ORTS.Common/VersionInfo.cs | 1 - Source/ORTS.Common/WorldLatLon.cs | 2 +- Source/ORTS.Common/enums.cs | 5 - Source/ORTS.Content/MSTSPath.cs | 30 +- Source/ORTS.IO/BufferedInMemoryStream.cs | 228 +++++---- Source/ORTS.IO/ByteEncoding.cs | 159 +++--- Source/ORTS.Menu/Activities.cs | 1 - Source/ORTS.Menu/Consists.cs | 1 - Source/ORTS.Menu/Folders.cs | 2 +- Source/ORTS.Menu/ORTimetables.cs | 5 +- Source/ORTS.Menu/Paths.cs | 5 +- Source/ORTS.Menu/Routes.cs | 4 +- Source/ORTS.Settings/FolderSettings.cs | 4 - Source/ORTS.Settings/InputSettings.cs | 10 +- Source/ORTS.Settings/UpdateState.cs | 2 +- Source/ORTS.Updater/NativeMethods.cs | 3 - Source/ORTS.Updater/UpdateManager.cs | 8 +- Source/Orts.Formats.Msts/ActivityFile.cs | 372 ++++++++------ Source/Orts.Formats.Msts/CabViewFile.cs | 150 +++--- .../CameraConfigurationFile.cs | 11 +- Source/Orts.Formats.Msts/CarSpawnerFile.cs | 22 +- Source/Orts.Formats.Msts/ConsistFile.cs | 3 - Source/Orts.Formats.Msts/EngineFile.cs | 2 - Source/Orts.Formats.Msts/HazardFile.cs | 80 ++- Source/Orts.Formats.Msts/LightCollection.cs | 7 +- Source/Orts.Formats.Msts/PathFile.cs | 96 ++-- Source/Orts.Formats.Msts/RoadDatabaseFile.cs | 53 +- Source/Orts.Formats.Msts/RouteFile.cs | 29 +- Source/Orts.Formats.Msts/ServiceFile.cs | 47 +- .../Orts.Formats.Msts/ShapeDescriptorFile.cs | 1 - Source/Orts.Formats.Msts/ShapeFile.cs | 3 +- .../SignalConfigurationFile.cs | 8 +- Source/Orts.Formats.Msts/SignalEnums.cs | 5 - Source/Orts.Formats.Msts/SignalScripts.cs | 3 +- .../Orts.Formats.Msts/SoundManagmentFile.cs | 77 ++- Source/Orts.Formats.Msts/SpeedpostDatFile.cs | 23 +- Source/Orts.Formats.Msts/TrackDatabaseFile.cs | 102 ++-- Source/Orts.Formats.Msts/TrackSectionsFile.cs | 463 +++++++++--------- Source/Orts.Formats.Msts/TrackTypesFile.cs | 18 +- Source/Orts.Formats.Msts/TrafficFile.cs | 7 +- Source/Orts.Formats.Msts/WagonFile.cs | 2 - Source/Orts.Formats.Msts/WorldFile.cs | 76 +-- Source/Orts.Formats.OR/AEItems.cs | 32 +- Source/Orts.Formats.OR/AESegment.cs | 4 +- Source/Orts.Formats.OR/AESignals.cs | 4 +- Source/Orts.Formats.OR/AEStationPath.cs | 36 +- Source/Orts.Formats.OR/AETraveller.cs | 12 +- Source/Orts.Formats.OR/AuxActionRef.cs | 14 +- Source/Orts.Formats.OR/ClocksFile.cs | 10 +- Source/Orts.Formats.OR/ContainerFile.cs | 13 +- Source/Orts.Formats.OR/DrawUtility.cs | 54 +- Source/Orts.Formats.OR/ExtCarSpawnerFile.cs | 6 +- Source/Orts.Formats.OR/GlobalItem.cs | 4 +- .../LoadStationsPopulationFile.cs | 6 - Source/Orts.Formats.OR/MSTSCoord.cs | 10 +- Source/Orts.Formats.OR/MSTSData.cs | 6 +- .../Orts.Formats.OR/RouteConfigurationFile.cs | 84 ++-- Source/Orts.Formats.OR/RouteItems.cs | 12 +- Source/Orts.Formats.OR/TimetableFile.cs | 2 +- Source/Orts.Formats.OR/TimetableGroupFile.cs | 2 +- Source/Orts.Formats.OR/TrackCircuitElement.cs | 2 +- Source/Orts.Formats.OR/TrackNodeAE.cs | 2 +- Source/Orts.Formats.OR/WeatherFile.cs | 7 +- Source/Orts.Parsers.Msts/Interpolator.cs | 100 ++-- Source/Orts.Parsers.Msts/SBR.cs | 8 +- Source/Orts.Parsers.Msts/STFReader.cs | 13 +- Source/Orts.Parsers.Msts/TokenID.cs | 10 +- Source/Orts.Parsers.OR/JsonReader.cs | 5 +- Source/Orts.Parsers.OR/TimetableReader.cs | 1 - Source/Orts.Simulation/Common/CommandLog.cs | 124 +++-- Source/Orts.Simulation/Common/Commands.cs | 74 +-- Source/Orts.Simulation/Common/ErrorLogger.cs | 2 +- Source/Orts.Simulation/Common/Events.cs | 12 +- Source/Orts.Simulation/Common/Math.cs | 152 +++--- Source/Orts.Simulation/Common/ORTSPaths.cs | 6 +- .../Common/Scripting/BrakeController.cs | 2 +- .../Common/Scripting/Commands.cs | 2 +- .../Common/Scripting/Common.cs | 2 +- .../PowerSupply/ControlCarPowerSupply.cs | 2 - .../PowerSupply/LocomotivePowerSupply.cs | 2 +- .../Scripting/PowerSupply/PowerSupply.cs | 2 +- .../Common/Scripting/ScriptManager.cs | 7 +- .../Common/Scripting/TrainControlSystem.cs | 26 +- Source/Orts.Simulation/Common/SteamTable.cs | 144 +++--- .../Orts.Simulation/MultiPlayer/ClientComm.cs | 264 +++++----- Source/Orts.Simulation/MultiPlayer/Decoder.cs | 90 ++-- .../Orts.Simulation/MultiPlayer/MPManager.cs | 46 +- Source/Orts.Simulation/MultiPlayer/Message.cs | 172 +++---- .../MultiPlayer/OnlinePlayer.cs | 272 +++++----- .../MultiPlayer/OnlineTrains.cs | 20 +- Source/Orts.Simulation/MultiPlayer/Server.cs | 107 ++-- .../Orts.Simulation/MultiPlayer/ServerComm.cs | 92 ++-- Source/Orts.Simulation/Simulation/AIs/AI.cs | 18 +- .../Simulation/AIs/AIAuxAction.cs | 73 ++- .../Orts.Simulation/Simulation/AIs/AIPath.cs | 64 +-- .../Orts.Simulation/Simulation/AIs/AITrain.cs | 64 +-- Source/Orts.Simulation/Simulation/Activity.cs | 86 ++-- .../Orts.Simulation/Simulation/Confirmer.cs | 111 +++-- .../Orts.Simulation/Simulation/Container.cs | 65 ++- .../Orts.Simulation/Simulation/FuelPickup.cs | 4 +- Source/Orts.Simulation/Simulation/Hazzard.cs | 222 ++++----- .../Simulation/LevelCrossing.cs | 30 +- .../Simulation/Physics/Train.cs | 168 +++---- .../RollingStocks/LocomotiveAttributes.cs | 5 +- .../RollingStocks/MSTSControlTrailerCar.cs | 6 +- .../RollingStocks/MSTSDieselLocomotive.cs | 50 +- .../RollingStocks/MSTSElectricLocomotive.cs | 15 +- .../RollingStocks/MSTSLocomotive.cs | 268 +++++----- .../RollingStocks/MSTSSteamLocomotive.cs | 203 ++++---- .../Simulation/RollingStocks/MSTSWagon.cs | 218 ++++----- .../Simulation/RollingStocks/RollingStock.cs | 8 +- .../SubSystems/Brakes/BrakeSystem.cs | 2 +- .../SubSystems/Brakes/MSTS/AirSinglePipe.cs | 91 ++-- .../SubSystems/Brakes/MSTS/EPBrakeSystem.cs | 9 +- .../SubSystems/Brakes/MSTS/ManualBraking.cs | 16 +- .../SubSystems/Brakes/MSTS/SMEBrakeSystem.cs | 9 +- .../Brakes/MSTS/SingleTransferPipe.cs | 19 +- .../Brakes/MSTS/StraightVacuumSinglePipe.cs | 31 +- .../Brakes/MSTS/VacuumSinglePipe.cs | 76 +-- .../SubSystems/Controllers/BrakeController.cs | 11 +- .../Controllers/ControllerFactory.cs | 8 +- .../SubSystems/Controllers/IController.cs | 2 +- .../Controllers/MSTSBrakeController.cs | 10 +- .../Controllers/MSTSNotchController.cs | 61 +-- .../Controllers/MultiPositionController.cs | 7 +- .../RollingStocks/SubSystems/CruiseControl.cs | 66 +-- .../RollingStocks/SubSystems/Door.cs | 38 +- .../RollingStocks/SubSystems/EOT.cs | 23 +- .../SubSystems/FreightAnimations.cs | 30 +- .../RollingStocks/SubSystems/ISubSystem.cs | 2 +- .../SubSystems/PowerSupplies/BatterySwitch.cs | 3 +- .../PowerSupplies/CircuitBreaker.cs | 2 +- .../PowerSupplies/ControlCarPowerSupply.cs | 9 +- .../SubSystems/PowerSupplies/DieselEngine.cs | 118 ++--- .../PowerSupplies/DieselPowerSupply.cs | 2 +- .../PowerSupplies/DualModePowerSupply.cs | 4 +- .../PowerSupplies/ElectricPowerSupply.cs | 4 +- .../ElectricTrainSupplySwitch.cs | 2 +- .../SubSystems/PowerSupplies/MasterKey.cs | 10 +- .../SubSystems/PowerSupplies/Pantograph.cs | 9 +- .../PowerSupplies/PassengerCarPowerSupply.cs | 5 +- .../PowerSupplies/TractionCutOffRelay.cs | 2 +- .../SubSystems/PowerTransmissions/Axle.cs | 14 +- .../PowerTransmissions/ElectricMotor.cs | 3 +- .../SubSystems/PowerTransmissions/GearBox.cs | 59 +-- .../PowerTransmissions/SeriesMotor.cs | 4 +- .../SubSystems/TrainControlSystem.cs | 126 ++--- .../Simulation/RollingStocks/TrainCar.cs | 103 ++-- .../Simulation/Signalling/CsSignalScript.cs | 12 +- .../Simulation/Signalling/DeadlockInfo.cs | 2 +- .../Simulation/Signalling/DeadlockPathInfo.cs | 2 +- .../Simulation/Signalling/SIGSCRfile.cs | 6 +- .../Signalling/SignalWorldObject.cs | 2 +- .../Simulation/Signalling/Signals.cs | 17 +- .../Signalling/SpeedPostWorldObject.cs | 4 +- .../Signalling/TrackCircuitState.cs | 2 +- .../Simulation/Signalling/TrainOccupyState.cs | 2 +- .../Simulation/Signalling/TrainQueue.cs | 2 +- .../Orts.Simulation/Simulation/Simulator.cs | 25 +- .../Simulation/SuperElevation.cs | 6 +- .../Simulation/Timetables/PoolInfo.cs | 8 +- .../Simulation/Timetables/ProcessTimetable.cs | 22 +- .../Simulation/Timetables/TTPool.cs | 20 +- .../Simulation/Timetables/TTTrain.cs | 92 ++-- .../Simulation/Timetables/TTTurntable.cs | 15 +- .../Simulation/Transfertables.cs | 40 +- .../Orts.Simulation/Simulation/Traveller.cs | 10 +- .../Orts.Simulation/Simulation/Turntables.cs | 31 +- Source/Orts.Simulation/Simulation/Weather.cs | 10 +- Source/RunActivity/Processes/Profiler.cs | 2 +- Source/RunActivity/Viewer3D/ALSoundHelper.cs | 14 +- Source/RunActivity/Viewer3D/AnimatedPart.cs | 4 +- Source/RunActivity/Viewer3D/Cameras.cs | 46 +- Source/RunActivity/Viewer3D/Commands.cs | 184 +++---- Source/RunActivity/Viewer3D/Common/Helpers.cs | 4 +- Source/RunActivity/Viewer3D/DDSLib.cs | 2 +- .../Viewer3D/Debugging/DebugViewerForm.cs | 4 +- .../Viewer3D/Debugging/MessageViewer.cs | 6 +- .../Viewer3D/Debugging/SoundDebugForm.cs | 4 +- Source/RunActivity/Viewer3D/DynamicTrack.cs | 16 +- Source/RunActivity/Viewer3D/Forest.cs | 16 +- Source/RunActivity/Viewer3D/InfoDisplay.cs | 132 ++--- Source/RunActivity/Viewer3D/Lights.cs | 28 +- Source/RunActivity/Viewer3D/MSTSSky.cs | 22 +- Source/RunActivity/Viewer3D/Materials.cs | 92 ++-- Source/RunActivity/Viewer3D/Noise.cs | 175 +++---- .../RunActivity/Viewer3D/ParticleEmitter.cs | 10 +- .../Viewer3D/Popups/ActivityWindow.cs | 9 +- .../Viewer3D/Popups/CarOperationsWindow.cs | 4 +- .../Viewer3D/Popups/CompassWindow.cs | 74 +-- .../Viewer3D/Popups/ComposeMessage.cs | 2 +- .../Viewer3D/Popups/EOTListWindow.cs | 16 +- .../RunActivity/Viewer3D/Popups/HUDWindow.cs | 35 +- .../RunActivity/Viewer3D/Popups/HelpWindow.cs | 23 +- .../Viewer3D/Popups/LayeredWindow.cs | 28 +- .../Viewer3D/Popups/MessagesWindow.cs | 36 +- .../Viewer3D/Popups/MultiPlayerWindow.cs | 19 +- .../Viewer3D/Popups/NextStationWindow.cs | 6 +- Source/RunActivity/Viewer3D/Popups/OSDCars.cs | 3 +- .../Viewer3D/Popups/OSDLocations.cs | 3 +- .../RunActivity/Viewer3D/Popups/QuitWindow.cs | 25 +- .../Viewer3D/Popups/SignallingDebugWindow.cs | 7 +- .../Viewer3D/Popups/SwitchWindow.cs | 6 +- .../Viewer3D/Popups/TTDetachWindow.cs | 10 +- .../Viewer3D/Popups/TrackMonitorWindow.cs | 52 +- .../Viewer3D/Popups/TracksDebugWindow.cs | 8 +- .../Viewer3D/Popups/TrainDPUWindow.cs | 39 +- .../Viewer3D/Popups/TrainDrivingWindow.cs | 16 +- .../Viewer3D/Popups/TrainListWindow.cs | 9 +- .../Viewer3D/Popups/TrainOperationsWindow.cs | 4 +- Source/RunActivity/Viewer3D/Popups/Window.cs | 46 +- .../Viewer3D/Popups/WindowControls.cs | 8 +- .../Viewer3D/Popups/WindowManager.cs | 154 +++--- .../RunActivity/Viewer3D/Popups/WindowText.cs | 8 +- Source/RunActivity/Viewer3D/Precipitation.cs | 15 +- Source/RunActivity/Viewer3D/Processes/Game.cs | 6 +- .../Processes/GameStateRunActivity.cs | 46 +- .../Viewer3D/Processes/GameStateViewer3D.cs | 4 +- .../Viewer3D/Processes/LoaderProcess.cs | 4 +- .../Viewer3D/Processes/RenderProcess.cs | 6 +- .../Viewer3D/Processes/SoundProcess.cs | 16 +- .../Viewer3D/Processes/UpdaterProcess.cs | 4 +- .../Viewer3D/Processes/WatchdogProcess.cs | 6 +- .../Viewer3D/Processes/WebServerProcess.cs | 16 +- Source/RunActivity/Viewer3D/RenderFrame.cs | 254 +++++----- Source/RunActivity/Viewer3D/RoadCars.cs | 14 +- .../MSTSDieselLocomotiveViewer.cs | 4 +- .../MSTSElectricLocomotiveViewer.cs | 6 +- .../RollingStock/MSTSLocomotiveViewer.cs | 38 +- .../RollingStock/MSTSSteamLocomotiveViewer.cs | 30 +- .../Viewer3D/RollingStock/MSTSWagonViewer.cs | 65 ++- .../SubSystems/ContainerViewer.cs | 21 +- .../SubSystems/CruiseControlViewer.cs | 4 - .../SubSystems/DistributedPowerInterface.cs | 34 +- .../RollingStock/SubSystems/ETCS/DataEntry.cs | 52 +- .../SubSystems/ETCS/DriverMachineInterface.cs | 24 +- .../RollingStock/SubSystems/ETCS/Menus.cs | 2 +- .../SubSystems/ETCS/PlanningWindow.cs | 14 +- .../ETCS/SpeedDistanceMonitoring.cs | 9 +- .../SubSystems/ETCS/TextMessages.cs | 12 +- .../SubSystems/FreightAnimationsViewer.cs | 4 +- .../Viewer3D/RollingStock/TrainCarViewer.cs | 2 +- Source/RunActivity/Viewer3D/Scenery.cs | 14 +- Source/RunActivity/Viewer3D/Shaders.cs | 20 +- Source/RunActivity/Viewer3D/Shapes.cs | 33 +- Source/RunActivity/Viewer3D/Signals.cs | 10 +- Source/RunActivity/Viewer3D/Sky.cs | 2 +- Source/RunActivity/Viewer3D/Sound.cs | 182 +++---- Source/RunActivity/Viewer3D/SuperElevation.cs | 6 +- Source/RunActivity/Viewer3D/Terrain.cs | 12 +- Source/RunActivity/Viewer3D/Tiles.cs | 6 +- Source/RunActivity/Viewer3D/Trains.cs | 40 +- Source/RunActivity/Viewer3D/Transfers.cs | 7 +- Source/RunActivity/Viewer3D/UserInput.cs | 8 +- .../RunActivity/Viewer3D/UserInputExternal.cs | 23 +- .../Viewer3D/UserInputRailDriver.cs | 28 +- Source/RunActivity/Viewer3D/Viewer.cs | 27 +- Source/RunActivity/Viewer3D/Water.cs | 12 +- Source/RunActivity/Viewer3D/Weather.cs | 45 +- .../Viewer3D/WebServices/ControlValue.cs | 16 +- .../WebServices/TrackMonitorDisplay.cs | 9 +- .../Viewer3D/WebServices/TrainDpuDisplay.cs | 7 +- .../WebServices/TrainDrivingDisplay.cs | 8 +- .../Viewer3D/WebServices/WebServer.cs | 17 +- Source/RunActivity/Viewer3D/Wire.cs | 14 +- Source/RunActivity/Viewer3D/World.cs | 4 +- Source/Tests/AssertWarnings.cs | 3 - Source/Tests/Orts.Common/Conversions.cs | 2 +- Source/Tests/Orts.Parsers.Msts/StfReader.cs | 26 +- .../Orts.Parsers.OR/TimetableReaderTests.cs | 9 +- Source/Tests/TestFile.cs | 3 - Source/Updater/UpdaterProgress.cs | 10 +- 424 files changed, 6104 insertions(+), 6618 deletions(-) diff --git a/Source/ContentChecker/AceLoader.cs b/Source/ContentChecker/AceLoader.cs index 271cb9dcc3..e22c3b2f4e 100644 --- a/Source/ContentChecker/AceLoader.cs +++ b/Source/ContentChecker/AceLoader.cs @@ -15,11 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; using Orts.Formats.Msts; namespace ContentChecker diff --git a/Source/ContentChecker/ActivityLoader.cs b/Source/ContentChecker/ActivityLoader.cs index f302a1347d..6cfc100a9f 100644 --- a/Source/ContentChecker/ActivityLoader.cs +++ b/Source/ContentChecker/ActivityLoader.cs @@ -15,14 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; - -using Orts.Formats.Msts; - namespace ContentChecker { /// diff --git a/Source/ContentChecker/CabviewLoader.cs b/Source/ContentChecker/CabviewLoader.cs index ebb724b814..982e24be1c 100644 --- a/Source/ContentChecker/CabviewLoader.cs +++ b/Source/ContentChecker/CabviewLoader.cs @@ -15,12 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; - using Orts.Formats.Msts; namespace ContentChecker diff --git a/Source/ContentChecker/CarSpawnLoader.cs b/Source/ContentChecker/CarSpawnLoader.cs index e1640324d5..0674c00b92 100644 --- a/Source/ContentChecker/CarSpawnLoader.cs +++ b/Source/ContentChecker/CarSpawnLoader.cs @@ -15,10 +15,7 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; using System.IO; using Orts.Formats.Msts; diff --git a/Source/ContentChecker/ConsistLoader.cs b/Source/ContentChecker/ConsistLoader.cs index a590a80635..7a2d92c1cf 100644 --- a/Source/ContentChecker/ConsistLoader.cs +++ b/Source/ContentChecker/ConsistLoader.cs @@ -15,12 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; - using Orts.Formats.Msts; namespace ContentChecker diff --git a/Source/ContentChecker/EngineLoader.cs b/Source/ContentChecker/EngineLoader.cs index f859f84fb3..d4727e8642 100644 --- a/Source/ContentChecker/EngineLoader.cs +++ b/Source/ContentChecker/EngineLoader.cs @@ -15,12 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; - using Orts.Formats.Msts; namespace ContentChecker diff --git a/Source/ContentChecker/EnvironmentFileLoader.cs b/Source/ContentChecker/EnvironmentFileLoader.cs index 4f7a7762de..17fbc3155e 100644 --- a/Source/ContentChecker/EnvironmentFileLoader.cs +++ b/Source/ContentChecker/EnvironmentFileLoader.cs @@ -15,12 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; - using Orts.Formats.Msts; namespace ContentChecker diff --git a/Source/ContentChecker/HazardLoader.cs b/Source/ContentChecker/HazardLoader.cs index 2273a20950..47d6fc1efe 100644 --- a/Source/ContentChecker/HazardLoader.cs +++ b/Source/ContentChecker/HazardLoader.cs @@ -15,12 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; - using Orts.Formats.Msts; namespace ContentChecker diff --git a/Source/ContentChecker/Loader.cs b/Source/ContentChecker/Loader.cs index 563fe174d8..2f564e4474 100644 --- a/Source/ContentChecker/Loader.cs +++ b/Source/ContentChecker/Loader.cs @@ -38,12 +38,9 @@ // done at a higher level, currently. using System; -using System.Collections.Generic; using System.Diagnostics; -using System.Linq; -using System.Text; -using Microsoft.Xna.Framework.Graphics; using System.Windows.Forms; +using Microsoft.Xna.Framework.Graphics; namespace ContentChecker { @@ -70,7 +67,7 @@ abstract class Loader /// The number of files that were actually loaded public int FilesLoaded { get; protected set; } /// The number of files that were not loaded but skipped - public int FilesSkipped {get; protected set;} + public int FilesSkipped { get; protected set; } /// The action to take when an additonal file has been identified. This is intended to be set externally protected Action AddAdditionalFileAction { get; set; } diff --git a/Source/ContentChecker/LoaderFactory.cs b/Source/ContentChecker/LoaderFactory.cs index 28f698384f..75be12673f 100644 --- a/Source/ContentChecker/LoaderFactory.cs +++ b/Source/ContentChecker/LoaderFactory.cs @@ -24,8 +24,6 @@ // 3. The filename in case also the SIMIS header is not unique, or the file does not have a SIMIS header using System; -using System.Collections.Generic; -using System.Linq; using System.IO; namespace ContentChecker diff --git a/Source/ContentChecker/NotRecognizedLoader.cs b/Source/ContentChecker/NotRecognizedLoader.cs index 4ee87e84dc..ad8a5ffa95 100644 --- a/Source/ContentChecker/NotRecognizedLoader.cs +++ b/Source/ContentChecker/NotRecognizedLoader.cs @@ -16,12 +16,6 @@ // along with Open Rails. If not, see . using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; - -using Orts.Viewer3D; namespace ContentChecker { diff --git a/Source/ContentChecker/NotUsedLoader.cs b/Source/ContentChecker/NotUsedLoader.cs index 16869a9946..03486c6391 100644 --- a/Source/ContentChecker/NotUsedLoader.cs +++ b/Source/ContentChecker/NotUsedLoader.cs @@ -16,12 +16,6 @@ // along with Open Rails. If not, see . using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; - -using Orts.Viewer3D; namespace ContentChecker { diff --git a/Source/ContentChecker/PathLoader.cs b/Source/ContentChecker/PathLoader.cs index 612c97a9ab..a3856ae304 100644 --- a/Source/ContentChecker/PathLoader.cs +++ b/Source/ContentChecker/PathLoader.cs @@ -15,12 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; - using Orts.Formats.Msts; namespace ContentChecker diff --git a/Source/ContentChecker/Program.cs b/Source/ContentChecker/Program.cs index f5900037f6..c74d0b43b0 100644 --- a/Source/ContentChecker/Program.cs +++ b/Source/ContentChecker/Program.cs @@ -68,8 +68,9 @@ static void Main(string[] args) /// The command line arguments that need to be checked for an iption /// The list of option names that need to be found /// true if one of the optionNames is given - static bool OptionsContain(string[] args, IEnumerable optionNames) { - return optionNames.Any((option) => args.Contains(option, StringComparer.OrdinalIgnoreCase) ); + static bool OptionsContain(string[] args, IEnumerable optionNames) + { + return optionNames.Any((option) => args.Contains(option, StringComparer.OrdinalIgnoreCase)); } /// @@ -195,7 +196,8 @@ static void LoadFiles(IEnumerable files, bool verbose, AdditionType addi { LoadAllFlat(); } - else { + else + { LoadWithAdditional(additionType); } @@ -318,7 +320,7 @@ static void SetConsoleBufferSize() int minimumBuffer = BUFFERMARGIN + Console.CursorTop; if (Console.BufferHeight < minimumBuffer) { - Console.SetBufferSize(Console.BufferWidth, minimumBuffer + BUFFEREXTENSION ); + Console.SetBufferSize(Console.BufferWidth, minimumBuffer + BUFFEREXTENSION); } } diff --git a/Source/ContentChecker/RoadDataBaseLoader.cs b/Source/ContentChecker/RoadDataBaseLoader.cs index 9d3b85bb19..8248c77e25 100644 --- a/Source/ContentChecker/RoadDataBaseLoader.cs +++ b/Source/ContentChecker/RoadDataBaseLoader.cs @@ -15,12 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; - using Orts.Formats.Msts; namespace ContentChecker diff --git a/Source/ContentChecker/ServiceLoader.cs b/Source/ContentChecker/ServiceLoader.cs index d960271a12..f0cde00dc1 100644 --- a/Source/ContentChecker/ServiceLoader.cs +++ b/Source/ContentChecker/ServiceLoader.cs @@ -15,12 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; - using Orts.Formats.Msts; namespace ContentChecker diff --git a/Source/ContentChecker/ShapeDescriptionLoader.cs b/Source/ContentChecker/ShapeDescriptionLoader.cs index cbc8781dea..33d4701ed5 100644 --- a/Source/ContentChecker/ShapeDescriptionLoader.cs +++ b/Source/ContentChecker/ShapeDescriptionLoader.cs @@ -15,12 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; - using Orts.Formats.Msts; namespace ContentChecker diff --git a/Source/ContentChecker/ShapeLoader.cs b/Source/ContentChecker/ShapeLoader.cs index 516e8d7dd6..ac6b96c35e 100644 --- a/Source/ContentChecker/ShapeLoader.cs +++ b/Source/ContentChecker/ShapeLoader.cs @@ -15,12 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; - using Orts.Formats.Msts; namespace ContentChecker diff --git a/Source/ContentChecker/SignalConfigLoader.cs b/Source/ContentChecker/SignalConfigLoader.cs index e1c346b5cc..a0639ce066 100644 --- a/Source/ContentChecker/SignalConfigLoader.cs +++ b/Source/ContentChecker/SignalConfigLoader.cs @@ -15,11 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; using System.IO; using Orts.Formats.Msts; diff --git a/Source/ContentChecker/SignalScriptLoader.cs b/Source/ContentChecker/SignalScriptLoader.cs index 9a961bba7d..ff277abb57 100644 --- a/Source/ContentChecker/SignalScriptLoader.cs +++ b/Source/ContentChecker/SignalScriptLoader.cs @@ -17,9 +17,6 @@ using System; using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; using System.IO; using Orts.Formats.Msts; @@ -65,7 +62,8 @@ public override void TryLoading(string file) FilesLoaded = 0; Console.WriteLine("signal script files can not be loaded independently. Try the option /d"); } - else { + else + { // we want to load the signal scripts one by one, not as a group var scriptFiles = new List() { Path.GetFileName(file) }; var scrfile = new SIGSCRfile(new SignalScripts(_sigcfg.ScriptPath, scriptFiles, diff --git a/Source/ContentChecker/SmsLoader.cs b/Source/ContentChecker/SmsLoader.cs index 94042a3496..ed67c20b8b 100644 --- a/Source/ContentChecker/SmsLoader.cs +++ b/Source/ContentChecker/SmsLoader.cs @@ -15,14 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; using System.Collections.Generic; using System.Diagnostics; -using System.Linq; -using System.IO; -using Path = System.IO.Path; - using Orts.Formats.Msts; +using Path = System.IO.Path; namespace ContentChecker { @@ -102,8 +98,8 @@ void GetRouteAndBasePath(string file, out string routePath, out string basePath) basePath = null; Stack subDirectories = new Stack(); string directory = Path.GetDirectoryName(file); - var root=Path.GetPathRoot(file); - while (directory.Length > root.Length ) + var root = Path.GetPathRoot(file); + while (directory.Length > root.Length) { string subdDirectoryName = Path.GetFileName(directory); if (subdDirectoryName.ToLowerInvariant().Equals("routes")) diff --git a/Source/ContentChecker/TerrainAltitudeLoader.cs b/Source/ContentChecker/TerrainAltitudeLoader.cs index ed0cc42f9e..f90c5314e9 100644 --- a/Source/ContentChecker/TerrainAltitudeLoader.cs +++ b/Source/ContentChecker/TerrainAltitudeLoader.cs @@ -16,10 +16,6 @@ // along with Open Rails. If not, see . using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; using Orts.Formats.Msts; diff --git a/Source/ContentChecker/TerrainFlagsLoader.cs b/Source/ContentChecker/TerrainFlagsLoader.cs index 7378b48e6c..97f8d8f8e8 100644 --- a/Source/ContentChecker/TerrainFlagsLoader.cs +++ b/Source/ContentChecker/TerrainFlagsLoader.cs @@ -16,10 +16,6 @@ // along with Open Rails. If not, see . using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; using Orts.Formats.Msts; diff --git a/Source/ContentChecker/TerrainLoader.cs b/Source/ContentChecker/TerrainLoader.cs index a16922c417..20c19a7871 100644 --- a/Source/ContentChecker/TerrainLoader.cs +++ b/Source/ContentChecker/TerrainLoader.cs @@ -15,10 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; using System.IO; using Orts.Formats.Msts; diff --git a/Source/ContentChecker/TimeTableLoader.cs b/Source/ContentChecker/TimeTableLoader.cs index 56387ff48a..19339be1c6 100644 --- a/Source/ContentChecker/TimeTableLoader.cs +++ b/Source/ContentChecker/TimeTableLoader.cs @@ -16,9 +16,6 @@ // along with Open Rails. If not, see . using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; using System.IO; using Orts.Formats.OR; diff --git a/Source/ContentChecker/TrackDataBaseLoader.cs b/Source/ContentChecker/TrackDataBaseLoader.cs index 05028416fb..0cbc16aff5 100644 --- a/Source/ContentChecker/TrackDataBaseLoader.cs +++ b/Source/ContentChecker/TrackDataBaseLoader.cs @@ -15,11 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; using System.IO; using Orts.Formats.Msts; diff --git a/Source/ContentChecker/TrackFileLoader.cs b/Source/ContentChecker/TrackFileLoader.cs index 3fb113afcd..3af19851f9 100644 --- a/Source/ContentChecker/TrackFileLoader.cs +++ b/Source/ContentChecker/TrackFileLoader.cs @@ -17,11 +17,9 @@ using System; using System.Collections.Generic; -using System.Diagnostics; using System.IO; -using Path = System.IO.Path; - using Orts.Formats.Msts; +using Path = System.IO.Path; namespace ContentChecker { @@ -74,19 +72,21 @@ protected override void AddReferencedFiles() void AddAdditionalSMS(string smsFileName) { - if (smsFileName == null) { return; } + if (smsFileName == null) { return; } string smsInRoute = Path.Combine(Path.Combine(routePath, "SOUND"), smsFileName); if (File.Exists(smsInRoute)) { AddAdditionalFileAction.Invoke(smsInRoute, new SmsLoader()); } - else { + else + { string smsInBase = Path.Combine(Path.Combine(basePath, "SOUND"), smsFileName); AddAdditionalFileAction.Invoke(smsInBase, new SmsLoader()); } } - protected override void AddAllFiles() { + protected override void AddAllFiles() + { AddMainFiles(); AddAllActivities(); AddAllTiles(); diff --git a/Source/ContentChecker/TrackTypeLoader.cs b/Source/ContentChecker/TrackTypeLoader.cs index e110980ab5..e19064793c 100644 --- a/Source/ContentChecker/TrackTypeLoader.cs +++ b/Source/ContentChecker/TrackTypeLoader.cs @@ -15,12 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; - using Orts.Formats.Msts; namespace ContentChecker diff --git a/Source/ContentChecker/TrafficLoader.cs b/Source/ContentChecker/TrafficLoader.cs index 5e5ead2f4c..261a1ef211 100644 --- a/Source/ContentChecker/TrafficLoader.cs +++ b/Source/ContentChecker/TrafficLoader.cs @@ -15,12 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; - using Orts.Formats.Msts; namespace ContentChecker diff --git a/Source/ContentChecker/TsectionGlobalLoader.cs b/Source/ContentChecker/TsectionGlobalLoader.cs index d33a203e6f..8c1ddcde85 100644 --- a/Source/ContentChecker/TsectionGlobalLoader.cs +++ b/Source/ContentChecker/TsectionGlobalLoader.cs @@ -15,14 +15,9 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; using System.IO; -using Path = System.IO.Path; - using Orts.Formats.Msts; +using Path = System.IO.Path; namespace ContentChecker { diff --git a/Source/ContentChecker/TsectionLoader.cs b/Source/ContentChecker/TsectionLoader.cs index 011cc72a16..afdb6e467e 100644 --- a/Source/ContentChecker/TsectionLoader.cs +++ b/Source/ContentChecker/TsectionLoader.cs @@ -15,14 +15,8 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; -using Path = System.IO.Path; - using Orts.Formats.Msts; +using Path = System.IO.Path; namespace ContentChecker { diff --git a/Source/ContentChecker/WagonLoader.cs b/Source/ContentChecker/WagonLoader.cs index 03356e8b4d..343db5f414 100644 --- a/Source/ContentChecker/WagonLoader.cs +++ b/Source/ContentChecker/WagonLoader.cs @@ -15,12 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; - using Orts.Formats.Msts; namespace ContentChecker diff --git a/Source/ContentChecker/WavLoader.cs b/Source/ContentChecker/WavLoader.cs index 1da6871fd5..3480bb6a06 100644 --- a/Source/ContentChecker/WavLoader.cs +++ b/Source/ContentChecker/WavLoader.cs @@ -15,12 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; - using Orts.Viewer3D; namespace ContentChecker @@ -37,7 +31,7 @@ class WavLoader : Loader /// The file that needs to be loaded public override void TryLoading(string file) { - var soundPiece = new SoundPiece(file, false, false); + var soundPiece = new SoundPiece(file, false, false); } } } diff --git a/Source/ContentChecker/WorldFileLoader.cs b/Source/ContentChecker/WorldFileLoader.cs index 0bb7f4b7f8..7db3ba4ada 100644 --- a/Source/ContentChecker/WorldFileLoader.cs +++ b/Source/ContentChecker/WorldFileLoader.cs @@ -15,12 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; - using Orts.Formats.Msts; namespace ContentChecker @@ -37,7 +31,7 @@ class WorldFileLoader : Loader /// The file that needs to be loaded public override void TryLoading(string file) { - var wf = new WorldFile(file); + var wf = new WorldFile(file); } } } diff --git a/Source/ContentChecker/WorldSoundLoader.cs b/Source/ContentChecker/WorldSoundLoader.cs index c7ef9974b1..88e9bb5178 100644 --- a/Source/ContentChecker/WorldSoundLoader.cs +++ b/Source/ContentChecker/WorldSoundLoader.cs @@ -16,10 +16,6 @@ // along with Open Rails. If not, see . using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; using Orts.Formats.Msts; diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/AboutActEdit.cs b/Source/Contrib/ActivityEditor/ActivityEditor/AboutActEdit.cs index cc6bd0767b..762ab4473b 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/AboutActEdit.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/AboutActEdit.cs @@ -1,8 +1,4 @@ using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Linq; using System.Reflection; using System.Windows.Forms; diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/ActionProperties/ControlStartProperties.cs b/Source/Contrib/ActivityEditor/ActivityEditor/ActionProperties/ControlStartProperties.cs index eb3c6af310..8e2cb0b0a5 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/ActionProperties/ControlStartProperties.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/ActionProperties/ControlStartProperties.cs @@ -1,12 +1,5 @@ using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; using System.Windows.Forms; -using LibAE.Formats; using Orts.Formats.OR; namespace ActivityEditor.ActionProperties diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/ActionProperties/ControlStoppedProperties.cs b/Source/Contrib/ActivityEditor/ActivityEditor/ActionProperties/ControlStoppedProperties.cs index 02edc59f23..04723f7170 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/ActionProperties/ControlStoppedProperties.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/ActionProperties/ControlStoppedProperties.cs @@ -1,10 +1,4 @@ using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; using System.Windows.Forms; namespace ActivityEditor.ActionProperties diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/ActionProperties/HornProperties.cs b/Source/Contrib/ActivityEditor/ActivityEditor/ActionProperties/HornProperties.cs index 7e5c877bd7..7b17e85121 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/ActionProperties/HornProperties.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/ActionProperties/HornProperties.cs @@ -1,12 +1,5 @@ using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; using System.Windows.Forms; -using LibAE.Formats; using Orts.Formats.OR; namespace ActivityEditor.ActionProperties diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Activity/StartActivity.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Activity/StartActivity.cs index 638d950dab..f93eb77c4a 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Activity/StartActivity.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Activity/StartActivity.cs @@ -1,10 +1,4 @@ using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; using System.Windows.Forms; using ActivityEditor.Engine; diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Activity/WaitActivity.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Activity/WaitActivity.cs index f28555520b..dd70bba91f 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Activity/WaitActivity.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Activity/WaitActivity.cs @@ -1,10 +1,4 @@ using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; using System.Windows.Forms; namespace ActivityEditor.Activity diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Engine/AEActivity.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Engine/AEActivity.cs index 969b201bbb..9ff3b91406 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Engine/AEActivity.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Engine/AEActivity.cs @@ -20,16 +20,9 @@ /// Updates : /// -using System; -using System.IO; using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Windows.Forms; -using AEWizard; -using LibAE; using LibAE.Formats; -using System.Xml.Serialization; using Orts.Formats.OR; namespace ActivityEditor.Engine diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Engine/AEConfig.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Engine/AEConfig.cs index a1b1c31e23..09a5ebd103 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Engine/AEConfig.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Engine/AEConfig.cs @@ -22,21 +22,13 @@ using System; -using System.IO; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Windows.Forms; using System.Drawing; -using System.Drawing.Drawing2D; +using System.Windows.Forms; using ActivityEditor.Route_Metadata; -using LibAE; using LibAE.Formats; -using Orts.Formats.Msts; -using Orts.Parsers.Msts; -using ORTS; -using ORTS.Common; using Orts.Formats.OR; +using ORTS.Common; namespace ActivityEditor.Engine { @@ -55,7 +47,7 @@ public class AEConfig public List tagWidgetInfo; private TypeEditor typeConfig; // Properties - + public AERouteConfig aeRouteConfig { get; set; } public Viewer2D Viewer { get; set; } public PseudoSim simulator { get { return Viewer.Simulator; } protected set { } } @@ -225,7 +217,7 @@ public void LoadRoute() tagGBList = new List(); stationWidgetInfo = new List(); stationGBList = new List(); - + Viewer.actParent.SuspendLayout(); //System.Drawing.Point current = activityAe.GetPanelPosition(); foreach (var item in getORWidget()) @@ -236,8 +228,8 @@ public void LoadRoute() int cnt = rnd.Next(999999); TagWidgetInfo newTagWidget = new TagWidgetInfo(Viewer, ((TagItem)item), cnt); AddTagWidgetInfo(newTagWidget); - - + + } } diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Engine/AERouteConfig.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Engine/AERouteConfig.cs index 3e1aaf5964..90273ab7fe 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Engine/AERouteConfig.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Engine/AERouteConfig.cs @@ -22,18 +22,9 @@ using System; -using System.IO; -using System.Collections.Generic; using System.Linq; -using System.Text; using System.Windows.Forms; -using System.Drawing; -using System.Drawing.Drawing2D; -using LibAE; -using LibAE.Formats; using Orts.Formats.Msts; -using Orts.Parsers.Msts; -using ORTS; using Orts.Formats.OR; namespace ActivityEditor.Engine @@ -51,7 +42,7 @@ public class AERouteConfig // MSTS data public TrackNode[] nodes { get { return simulator.nodes; } set { } } AEConfig Parent; - + public TrackSectionsFile TSectionDat { get { return Viewer.Simulator.TSectionDat; } protected set { } } public Viewer2D Viewer { get { return Parent.Viewer; } protected set { } } public PseudoSim simulator { get { return Viewer.Simulator; } protected set { } } diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Engine/ActEditor.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Engine/ActEditor.cs index 7f012ed70e..463ff55ac5 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Engine/ActEditor.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Engine/ActEditor.cs @@ -14,11 +14,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using ActivityEditor.Engine; -using AEWizard; -using LibAE.Formats; -using Orts.Formats.OR; -using ORTS.Common; /// This module ... /// /// Author: Stéfan Paitoni @@ -30,6 +25,11 @@ using System.Drawing; using System.IO; using System.Windows.Forms; +using ActivityEditor.Engine; +using AEWizard; +using LibAE.Formats; +using Orts.Formats.OR; +using ORTS.Common; namespace ActivityEditor { @@ -59,7 +59,7 @@ public partial class ActEditor : Form private bool loadEnabled = false; public List viewer2ds; public Viewer2D selectedViewer; - + private bool focusOnViewer = false; // Commented out as never used @@ -304,7 +304,7 @@ private void AddActivityEval_Click(object sender, EventArgs e) } #endregion - + private void MoveSelected_Click(object sender, EventArgs e) { DisplayStatusMessage("Please, Place Move Tool"); diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Engine/ProcessState.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Engine/ProcessState.cs index fb776e8266..5071358fd5 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Engine/ProcessState.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Engine/ProcessState.cs @@ -21,8 +21,6 @@ /// -using System; -using System.IO; using System.Threading; namespace ActivityEditor.Engine diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Engine/PseudoSim.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Engine/PseudoSim.cs index 11128fa5f6..43986f7062 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Engine/PseudoSim.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Engine/PseudoSim.cs @@ -21,25 +21,16 @@ /// +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading; using ActivityEditor.Engine; -using ActivityEditor.Preference; using LibAE; -using LibAE.Formats; using Orts.Formats.Msts; using Orts.Formats.OR; -using Orts.Parsers.Msts; -using ORTS; using ORTS.Common; using ORTS.Settings; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading; -using System.Windows.Forms; -using System.Xml.Serialization; namespace ActivityEditor { @@ -156,7 +147,7 @@ public void LoadItemsFromMSTS() { foundBuffer = new AEBufferItem((TrackNode)currNode); mstsItems.buffers.Add(foundBuffer); - } + } #if SHOW_STOPWATCH ts = stopWatch.Elapsed; stopWatch.Reset(); @@ -211,11 +202,11 @@ public void LoadItemsFromMSTS() { TrackNode connectedNode = nodes[pin.Link]; int direction = DrawUtility.getDirection(currNode, connectedNode); - if (MSTSCoord.near (currNode.getMSTSCoord(direction), connectedNode.getMSTSCoord(direction))) + if (MSTSCoord.near(currNode.getMSTSCoord(direction), connectedNode.getMSTSCoord(direction))) continue; AESegment aeSegment = new AESegment(currNode.getMSTSCoord(direction), connectedNode.getMSTSCoord(direction)); TrackSegment lineSeg = new TrackSegment(aeSegment, currNode, 0, direction, TSectionDat); - addTrItems (lineSeg, currNode); + addTrItems(lineSeg, currNode); mstsItems.AddSegment(lineSeg); } #if SHOW_STOPWATCH @@ -259,7 +250,7 @@ public void LoadItemsFromMSTS() maxsize = 2000; ZoomFactor = (decimal)maxsize; #endif -#region AddItem + #region AddItem Program.actEditor.DisplayStatusMessage("Init data for display... Load MSTS Items..."); @@ -297,7 +288,7 @@ public void LoadItemsFromMSTS() File.AppendAllText(@"C:\temp\stopwatch.txt", "Signals: " + elapsedTime + "\n"); stopWatch.Stop(); #endif -#endregion + #endregion } public void AddSegments(TrackNode node) @@ -316,7 +307,7 @@ public void AddSegments(TrackNode node) foreach (var idxTrItem in values) { if (!idxTrItem.Key) - break; + break; foreach (var val in idxTrItem) { var item = TDB.TrackDB.TrItemTable[val.Value]; diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Engine/SimpleTextEd.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Engine/SimpleTextEd.cs index 414d5f8993..c79d2f96e7 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Engine/SimpleTextEd.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Engine/SimpleTextEd.cs @@ -1,24 +1,18 @@ using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; using System.Windows.Forms; namespace ActivityEditor.Engine { public partial class SimpleTextEd : Form { - + public SimpleTextEd() { InitializeComponent(); } - - protected void Save_Click(Object sender, EventArgs e) + + protected void Save_Click(Object sender, EventArgs e) { } } diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Engine/Viewer2D.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Engine/Viewer2D.cs index 5b973d4fb7..81624e7785 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Engine/Viewer2D.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Engine/Viewer2D.cs @@ -21,27 +21,19 @@ /// -using ActivityEditor.Activity; -using LibAE; -using LibAE.Formats; -using Microsoft.Xna.Framework; -using Orts.Formats.Msts; -using Orts.Formats.OR; -using Orts.Parsers.Msts; -using ORTS; -using ORTS.Common; using System; using System.Collections.Generic; -using System.ComponentModel; -using System.Data; using System.Drawing; using System.Drawing.Drawing2D; using System.IO; -using System.Linq; using System.Reflection; -using System.Text; using System.Windows.Forms; -using System.Xml.Serialization; +using ActivityEditor.Activity; +using LibAE; +using LibAE.Formats; +using Orts.Formats.Msts; +using Orts.Formats.OR; +using ORTS.Common; using Color = System.Drawing.Color; namespace ActivityEditor.Engine @@ -104,11 +96,11 @@ public partial class Viewer2D : Form public double snapSize { get; set; } // Keep the distance between the map origin and the visible section - private PointF RouteScreenOrig = new PointF(0,0); + private PointF RouteScreenOrig = new PointF(0, 0); private SizeF Distant2Origin = new SizeF(0, 0); // Son équivalent en int pour le forms private System.Drawing.SizeF StartDrawing = new System.Drawing.SizeF(0, 0); - private SizeF correctY = new SizeF (0,0); + private SizeF correctY = new SizeF(0, 0); private Size routePicture = new Size(0, 0); @@ -129,7 +121,7 @@ public partial class Viewer2D : Form // For Debugging -#region InitViewer + #region InitViewer /// /// Initialise a new instance of the Viewer for ROUTE Configuration, @@ -214,8 +206,8 @@ public Viewer2D(ActEditor parent, ActivityInfo activityInfo) InitData(); actParent.SelectTools(ViewerMode); } -#endregion -#region initData + #endregion + #region initData private void InitData() { @@ -228,7 +220,7 @@ private void InitData() Program.actEditor.DisplayStatusMessage("Init data for display..."); //aeConfig.aeRouteConfig.InitORData(Simulator); tilesList = areaRoute.tilesList; - + sizeX = (Math.Abs(areaRoute.tileMaxX - areaRoute.tileMinX) + 1) * 2048f; sizeZ = (Math.Abs(areaRoute.tileMaxZ - areaRoute.tileMinZ) + 1) * 2048f; @@ -282,9 +274,9 @@ public float getUsedScale() { return usedScale; } - #endregion + #endregion - #region Draw + #region Draw public bool firstShow = true; public bool followTrain = false; @@ -307,9 +299,9 @@ public void needRedim() } // TODO: Check this when the forms is minimized if (routeDrawing.Width <= 0 || routeDrawing.Height <= 0) - routeDrawing.Image = new Bitmap(1, 1); + routeDrawing.Image = new Bitmap(1, 1); else - routeDrawing.Image = new Bitmap(routeDrawing.Width, routeDrawing.Height); + routeDrawing.Image = new Bitmap(routeDrawing.Width, routeDrawing.Height); routePicture = routeDrawing.Size; firstShow = true; } @@ -335,7 +327,7 @@ public void GenerateView() subY = 0; // areaRoute.getMinY() + ViewWindow.Y; g.Clear(Color.White); ComputeStartDrawing(); - + usedScale = (currentRules / routeDrawing.Width); usedScale = (float)Math.Round((double)usedScale, 2, MidpointRounding.AwayFromZero); if (usedScale == 0) @@ -343,7 +335,7 @@ public void GenerateView() if (Program.aePreference.ShowRuler) showRules(g, usedScale); snapSize = (double)(Program.aePreference.getSnapCircle() * usedScale); - + PointF[] points = new PointF[3]; Pen p = darkGrayPen; Pen t = bluePen; @@ -356,7 +348,7 @@ public void GenerateView() PointF scaledA = new PointF(0, 0); PointF scaledB = new PointF(0, 0); - SizeF decal = (correctY - StartDrawing); + SizeF decal = (correctY - StartDrawing); PointF scaledC = new PointF(0, 0); PointF centerCurve = new PointF(0, 0); #region showItem @@ -366,8 +358,8 @@ public void GenerateView() { // X,Y tile are on center of tile foreach (var tile in tilesList) { - scaledA.X = decal.Width + (((tile.TileX * 2048f) - subX -1024f) / usedScale); - scaledA.Y = decal.Height - (((tile.TileZ * 2048f) - subY + 1024f) / usedScale); + scaledA.X = decal.Width + (((tile.TileX * 2048f) - subX - 1024f) / usedScale); + scaledA.Y = decal.Height - (((tile.TileZ * 2048f) - subY + 1024f) / usedScale); int width = (int)(2048 / usedScale); int height = (int)(2048 / usedScale); g.DrawRectangle(pen, (int)scaledA.X, (int)scaledA.Y, width, height); @@ -392,7 +384,7 @@ public void GenerateView() } } - foreach (var junction in aeItems.getSwitches()) + foreach (var junction in aeItems.getSwitches()) { junction.SynchroLocation(); scaledA.X = decal.Width + (((float)junction.Location.X - subX) / usedScale); @@ -522,8 +514,8 @@ public void GenerateView() station.Location2D.X = scaledA.X; station.Location2D.Y = scaledA.Y; System.Drawing.Rectangle rect = new System.Drawing.Rectangle((int)scaledA.X, - (int)scaledA.Y, - (int)(10/usedScale), (int)(10/usedScale)); + (int)scaledA.Y, + (int)(10 / usedScale), (int)(10 / usedScale)); if (item.stationWidget.icoAngle != 0f) { myMatrix.RotateAt(item.stationWidget.icoAngle, scaledA, MatrixOrder.Append); @@ -564,9 +556,9 @@ public void GenerateView() { System.Drawing.Drawing2D.Matrix matrixSA = new System.Drawing.Drawing2D.Matrix(); - rect = new System.Drawing.Rectangle((int)X, - (int)(Y - (2 / usedScale)), - (int)(2/usedScale), (int)(2/usedScale)); + rect = new System.Drawing.Rectangle((int)X, + (int)(Y - (2 / usedScale)), + (int)(2 / usedScale), (int)(2 / usedScale)); if (SAWidget.getStationConnector().getDirConnector() == AllowedDir.IN) { matrixSA.RotateAt((float)SAWidget.getStationConnector().angle, new System.Drawing.Point(X, Y), MatrixOrder.Append); @@ -601,10 +593,10 @@ public void GenerateView() { g.DrawEllipse(Pens.Red, X - 4, Y - 4, 8, 8); } - if (SAWidget.getStationConnector().getLabel().Length > 0 && + if (SAWidget.getStationConnector().getLabel().Length > 0 && Program.aePreference.ShowPlSiLabel && Program.aePreference.PlSiZoom >= usedScale && SAWidget.isItSeen()) - g.DrawString(SAWidget.getStationConnector().getLabel(), stationFont, sidingBrush, new System.Drawing.Point(X+15, Y+10)); + g.DrawString(SAWidget.getStationConnector().getLabel(), stationFont, sidingBrush, new System.Drawing.Point(X + 15, Y + 10)); } } else @@ -635,8 +627,8 @@ public void GenerateView() if (item is PathEventItem) { PointF coord = ((PathEventItem)item).Coord.ConvertToPointF(); - scaledA.X = (decal.Width + (coord.X - subX) / usedScale) -8; - scaledA.Y = (decal.Height - ((coord.Y - subY) / usedScale)) -8; + scaledA.X = (decal.Width + (coord.X - subX) / usedScale) - 8; + scaledA.Y = (decal.Height - ((coord.Y - subY) / usedScale)) - 8; if ((scaledA.X < 0) || (scaledA.X > IM_Width) || (scaledA.Y > IM_Height) || (scaledA.Y < 0)) continue; @@ -651,7 +643,7 @@ public void GenerateView() } } } - #endregion + #endregion #region showCursor @@ -693,7 +685,7 @@ public void GenerateView() g.DrawImage(tool, rect); } } - #endregion + #endregion float x, y; PointF scaledItem = new PointF(0f, 0f); @@ -703,7 +695,7 @@ public void GenerateView() if (usedScale < Program.aePreference.getPlSiZoom()) { #if !DRAW_ALL -#region drawSignal + #region drawSignal foreach (var s in aeItems.getSignals()) { s.SynchroLocation(); @@ -735,11 +727,11 @@ public void GenerateView() color = Brushes.Red; pen = redPen; } - System.Drawing.Rectangle rect = new System.Drawing.Rectangle((int)scaledItem.X-12, (int)scaledItem.Y-5, (int)widthDraw, (int)widthDraw); + System.Drawing.Rectangle rect = new System.Drawing.Rectangle((int)scaledItem.X - 12, (int)scaledItem.Y - 5, (int)widthDraw, (int)widthDraw); g.DrawEllipse(Pens.DarkBlue, (int)scaledItem.X - 1, (int)scaledItem.Y - 1, 2, 2); if (s.hasDir) { - System.Drawing.Point rotationLoc = new System.Drawing.Point((int)scaledItem.X-5, (int)scaledItem.Y+5); + System.Drawing.Point rotationLoc = new System.Drawing.Point((int)scaledItem.X - 5, (int)scaledItem.Y + 5); System.Drawing.Drawing2D.Matrix myMatrix = new System.Drawing.Drawing2D.Matrix(); scaledB.X = decal.Width + (s.Dir.X - subX) / usedScale; scaledB.Y = decal.Height - (s.Dir.Y - subY) / usedScale; @@ -790,8 +782,8 @@ public void GenerateView() g.ResetTransform(); } } -#endregion -#region crossOver + #endregion + #region crossOver foreach (AECrossOver crossOver in aeItems.getCrossOver()) { System.Drawing.Drawing2D.Matrix matrixSA = new System.Drawing.Drawing2D.Matrix(); @@ -814,7 +806,7 @@ public void GenerateView() } #endregion -#region drawSiding + #region drawSiding foreach (SideItem siding in aeItems.getSidings()) { System.Drawing.Drawing2D.Matrix matrixSA = new System.Drawing.Drawing2D.Matrix(); @@ -841,7 +833,7 @@ public void GenerateView() { matrixSA.RotateAt((float)tempo, new System.Drawing.Point((int)x, (int)y), MatrixOrder.Append); g.Transform = matrixSA; - g.DrawString(siding.Name, sidingFont, sidingBrush, x+15, y+10); + g.DrawString(siding.Name, sidingFont, sidingBrush, x + 15, y + 10); } } else @@ -852,13 +844,13 @@ public void GenerateView() { matrixSA.RotateAt((float)tempo, new System.Drawing.Point((int)x, (int)y), MatrixOrder.Append); g.Transform = matrixSA; - g.DrawString(siding.Name, sidingFont, sidingBrush, x+15, y+10); + g.DrawString(siding.Name, sidingFont, sidingBrush, x + 15, y + 10); } } g.ResetTransform(); } } -#endregion + #endregion #endif } routeDrawing.Invalidate(); @@ -897,9 +889,9 @@ void showRules(Graphics g, float usedScale) g.DrawIcon(Ruler, rect); g.ResetTransform(); - #endif +#endif } -#endregion + #endregion private void ComputeStartDrawing() { @@ -914,7 +906,7 @@ private void ComputeStartDrawing() #region MouseEvent - private bool zoomed = false; + private bool zoomed = false; private void routeDrawingMouseDown(object sender, MouseEventArgs e) { bool shiftKey = false; @@ -962,7 +954,7 @@ private void LeftMouseDown(object sender, MouseEventArgs e, bool shiftKey) aeConfig.AddORItem(info); stationItem = (StationItem)itemToUpdate; itemToUpdate = info; - + } else { @@ -1049,7 +1041,7 @@ private void routeDrawingMouseMove(object sender, MouseEventArgs e) { PointF point = convertScreen2ViewCoord(e.X, e.Y); MSTSCoord coord = Simulator.mstsDataConfig.TileBase.getMstsCoord(point); - aeConfig.UpdateItem (itemToUpdate, coord, controlKey, false); + aeConfig.UpdateItem(itemToUpdate, coord, controlKey, false); //((StationAreaWidget)itemToUpdate).UpdatePointArea(aeConfig.getSegments(), ); } @@ -1057,21 +1049,21 @@ private void routeDrawingMouseMove(object sender, MouseEventArgs e) { CurrentMousePosition.X = e.X; CurrentMousePosition.Y = e.Y; - if (ToolClicked == ToolClicks.MOVE - && itemToUpdate != null + if (ToolClicked == ToolClicks.MOVE + && itemToUpdate != null && itemToUpdate.IsMovable()) { if (e.X < 10 || e.Y < 10 || e.X > routePicture.Width - 10 || e.Y > routePicture.Height - 10) { dragWindow(e, -1); } - PointF point = convertScreen2ViewCoord (e.X, e.Y); + PointF point = convertScreen2ViewCoord(e.X, e.Y); MSTSCoord coord = Simulator.mstsDataConfig.TileBase.getMstsCoord(point); aeConfig.UpdateItem(itemToUpdate, coord, controlKey, false); //itemToUpdate.configCoord(coord, aeConfig.getSegments(), controlKey); } else if (ToolClicked == ToolClicks.ROTATE - && itemToUpdate != null + && itemToUpdate != null && itemToUpdate.IsRotable()) { PointF point = e.Location; @@ -1113,7 +1105,7 @@ private void routeDrawingMouseMove(object sender, MouseEventArgs e) { currentRules *= facteur; } - + ZoomAndAlignWindow(coordZoomPoint, refZoomPoint); } @@ -1174,7 +1166,7 @@ private void routeDrawingMouseUp(object sender, MouseEventArgs e) } } else if (ToolClicked == ToolClicks.AREA && - itemToUpdate != null && + itemToUpdate != null && (itemToUpdate.GetType() == typeof(StationItem) || itemToUpdate.GetType() == typeof(StationAreaItem))) { @@ -1295,9 +1287,9 @@ public void routeDrawing_PreviewKeyDown(object sender, KeyEventArgs e) break; } } - #endregion + #endregion -#region AlignView + #region AlignView private void ZoomViewWindow() { float width = ViewWindow.Width * (currentRules / origRules); @@ -1308,7 +1300,7 @@ private void ZoomViewWindow() ComputeUsedScale(); } - private void CenterAndZoomWindow () + private void CenterAndZoomWindow() { PointF point = convertScreen2ViewCoord(ViewWindow.Width / 2f, ViewWindow.Height / 2f); MSTSCoord coord = Simulator.mstsDataConfig.TileBase.getMstsCoord(point); @@ -1321,7 +1313,7 @@ private void ZoomAndAlignWindow(MSTSCoord coord, PointF point) { ZoomViewWindow(); - RealignViewWindow(coord, System.Drawing.Point.Truncate (point)); + RealignViewWindow(coord, System.Drawing.Point.Truncate(point)); GenerateView(); } @@ -1351,9 +1343,9 @@ private void RealignViewWindow(MSTSCoord coord, System.Drawing.Point refPoint) Distant2Origin.Height = (Distant2Origin.Height) + ((current.Y - refCoord.Y) * localScale); return; } - -#endregion + + #endregion #region SaveLoad public bool Save() @@ -1443,7 +1435,7 @@ void AddStationArea() } - private void AddActStart (TrackSegment segment, System.Drawing.Point CurrentMousePosition) + private void AddActStart(TrackSegment segment, System.Drawing.Point CurrentMousePosition) { int cnt = rnd.Next(999999); double dist; @@ -1465,7 +1457,7 @@ private void AddActStart (TrackSegment segment, System.Drawing.Point CurrentMous tmp.PerformLayout(); } - private void AddActStop (TrackSegment segment, System.Drawing.Point CurrentMousePosition) + private void AddActStop(TrackSegment segment, System.Drawing.Point CurrentMousePosition) { int cnt = rnd.Next(999999); double dist; @@ -1479,7 +1471,7 @@ private void AddActStop (TrackSegment segment, System.Drawing.Point CurrentMouse tmp.PerformLayout(); } - private void AddActWait (TrackSegment segment, System.Drawing.Point CurrentMousePosition) + private void AddActWait(TrackSegment segment, System.Drawing.Point CurrentMousePosition) { int cnt = rnd.Next(999999); double dist; @@ -1523,26 +1515,26 @@ void PlaceToolItem() case (int)ToolClicks.START: item = findSegmentFromMouse(CurrentMousePosition); if (item != null && - item.GetType () == typeof (TrackSegment) && - ((TrackSegment)item).isSnap ()) + item.GetType() == typeof(TrackSegment) && + ((TrackSegment)item).isSnap()) { - AddActStart ((TrackSegment)item, CurrentMousePosition); + AddActStart((TrackSegment)item, CurrentMousePosition); } break; case (int)ToolClicks.STOP: item = findSegmentFromMouse(CurrentMousePosition); if (item != null && - item.GetType () == typeof (TrackSegment) && - ((TrackSegment)item).isSnap ()) + item.GetType() == typeof(TrackSegment) && + ((TrackSegment)item).isSnap()) { - AddActStop ((TrackSegment)item, CurrentMousePosition); + AddActStop((TrackSegment)item, CurrentMousePosition); } break; case (int)ToolClicks.WAIT: item = findSegmentFromMouse(CurrentMousePosition); if (item != null && - item.GetType () == typeof (TrackSegment) && + item.GetType() == typeof(TrackSegment) && ((TrackSegment)item).isSnap()) { AddActWait((TrackSegment)item, CurrentMousePosition); @@ -1791,7 +1783,7 @@ private GlobalItem findSegmentFromMouse(System.Drawing.Point CurrentMousePositio if (aeItems != null) { PointF pt = convertScreen2ViewCoord((float)CurrentMousePosition.X, (float)CurrentMousePosition.Y); - item = aeItems.findSegmentFromMouse(pt, (double)(Program.aePreference.getSnapCircle()/2)); + item = aeItems.findSegmentFromMouse(pt, (double)(Program.aePreference.getSnapCircle() / 2)); // sideItem = aeItems.findSegmentFromMouse(pt, snapSize); } return item; @@ -1817,7 +1809,7 @@ public GlobalItem findItemFromMouse(PointF point) PointF pt = convertScreen2ViewCoord((float)point.X, (float)point.Y); //PointF tf2 = new PointF(0f, 0f); //GlobalItem componentItem = Simulator.orRouteConfig.findMetadataItem(pt, snapSize, aeItems); - GlobalItem item = Simulator.orRouteConfig.FindMetadataItem(pt, (double)(Program.aePreference.getSnapCircle()/2), aeItems); + GlobalItem item = Simulator.orRouteConfig.FindMetadataItem(pt, (double)(Program.aePreference.getSnapCircle() / 2), aeItems); return item; } diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Internat/IntalMngr.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Internat/IntalMngr.cs index f78710b549..e955211828 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Internat/IntalMngr.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Internat/IntalMngr.cs @@ -16,15 +16,9 @@ // along with Open Rails. If not, see . // -using System; -using System.Collections.Generic; -using System.Resources; -using System.Threading; using System.Globalization; using System.Reflection; -using System.Linq; -using System.Text; -using ORTS; +using System.Resources; using ORTS.Settings; namespace ActivityEditor.Internat diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Preference/AEPreference.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Preference/AEPreference.cs index 42fb466a00..975f0a9a4d 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Preference/AEPreference.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Preference/AEPreference.cs @@ -21,15 +21,12 @@ /// using System; -using System.IO; using System.Collections.Generic; +using System.IO; using System.Linq; -using System.Text; using System.Xml.Serialization; -using ORTS; -using ORTS.Settings; -using LibAE.Formats; using Orts.Formats.OR; +using ORTS.Settings; namespace ActivityEditor.Preference { @@ -72,7 +69,7 @@ public bool classFilled public bool ShowTrackInfo { get; set; } public bool ActivateHorn { get; set; } [XmlIgnore] - public ActionContainer ActionContainer + public ActionContainer ActionContainer { get { @@ -82,11 +79,11 @@ public ActionContainer ActionContainer } return null; } - protected set { } + protected set { } } // Info for AuxAction option window. [XmlIgnore] - public List AvailableActions + public List AvailableActions { get { @@ -109,15 +106,15 @@ public List UsedActions } public bool AllSignalProperty - { - get - { - return ShowAllSignal; - } - set - { - ShowAllSignal = value; - } + { + get + { + return ShowAllSignal; + } + set + { + ShowAllSignal = value; + } } public AEPreference() diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Preference/Options.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Preference/Options.cs index 123fc85895..820d0563e8 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Preference/Options.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Preference/Options.cs @@ -1,13 +1,8 @@ using System; -using System.IO; using System.Collections.Generic; -using System.ComponentModel; -using System.Data; using System.Drawing; -using System.Linq; -using System.Text; +using System.IO; using System.Windows.Forms; -using LibAE.Formats; using ActivityEditor.ActionProperties; using Orts.Formats.OR; @@ -27,7 +22,7 @@ public Options() this.MSTSPath.Text = Program.aePreference.MSTSPath; this.AEPath.Text = Program.aePreference.AEPath; ListRoutePaths.DataSource = Program.aePreference.RoutePaths; - routePaths = new List (); + routePaths = new List(); this.showTiles.Checked = Program.aePreference.ShowTiles; this.snapTrack.Checked = Program.aePreference.ShowSnapLine; this.SnapInfo.Checked = Program.aePreference.ShowSnapInfo; @@ -37,7 +32,7 @@ public Options() this.ListAvailable.DataSource = Program.aePreference.AvailableActions; this.ListUsed.DataSource = Program.aePreference.UsedActions; } - + private void DrawOnTab(object sender, DrawItemEventArgs e) { Font font; @@ -51,9 +46,9 @@ private void DrawOnTab(object sender, DrawItemEventArgs e) font = new Font(e.Font, e.Font.Style); back_brush = new SolidBrush(Color.DimGray); fore_brush = new SolidBrush(Color.White); - bounds = new Rectangle(bounds.X + (this.tabControl1.Padding.X / 2), - bounds.Y + this.tabControl1.Padding.Y, - bounds.Width - this.tabControl1.Padding.X, + bounds = new Rectangle(bounds.X + (this.tabControl1.Padding.X / 2), + bounds.Y + this.tabControl1.Padding.Y, + bounds.Width - this.tabControl1.Padding.X, bounds.Height - (this.tabControl1.Padding.Y * 2)); } else @@ -132,7 +127,7 @@ private void RemoveRoutePaths_Click(object sender, EventArgs e) } } - private void configureRoutePath () + private void configureRoutePath() { if (Program.aePreference.RoutePaths.Count <= 0) { @@ -155,7 +150,7 @@ private void CheckedChanged(object sender, EventArgs e) { this.snapCircle.Enabled = ShowSnap.Checked; this.snapCircleLabel.Enabled = ShowSnap.Checked; - this.snapCircle.Value = Program.aePreference.getSnapCircle()>0?Program.aePreference.getSnapCircle():2; + this.snapCircle.Value = Program.aePreference.getSnapCircle() > 0 ? Program.aePreference.getSnapCircle() : 2; Program.aePreference.ShowSnapCircle = ShowSnap.Checked; } @@ -201,7 +196,7 @@ private void showRuler_CheckedChanged(object sender, EventArgs e) private void optionOK_click(object sender, EventArgs e) { Close(); - Program.aePreference.ShowAllSignal = this.checkBox1.Checked ; + Program.aePreference.ShowAllSignal = this.checkBox1.Checked; Program.aePreference.ShowSnapCircle = this.ShowSnap.Checked; Program.aePreference.ShowPlSiLabel = this.ShowLabelPlat.Checked; Program.aePreference.MSTSPath = this.MSTSPath.Text; diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Program.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Program.cs index da67b57eed..14dde81b82 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Program.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Program.cs @@ -24,14 +24,11 @@ using System; using System.Collections.Generic; using System.IO; -using ActivityEditor.Engine; -using ActivityEditor.Preference; using System.Linq; using System.Windows.Forms; -using ORTS; -using ORTS.Settings; -using LibAE.Formats; using ActivityEditor.Internat; +using ActivityEditor.Preference; +using ORTS.Settings; namespace ActivityEditor { diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Route Metadata/BufferInterface.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Route Metadata/BufferInterface.cs index 8716542d09..669a53f13e 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Route Metadata/BufferInterface.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Route Metadata/BufferInterface.cs @@ -1,13 +1,6 @@ using System; using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; using System.Windows.Forms; -using LibAE; -using LibAE.Formats; using Orts.Formats.OR; namespace ActivityEditor.Engine diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Route Metadata/ConnectorInterface.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Route Metadata/ConnectorInterface.cs index 410fa888e2..7440448db2 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Route Metadata/ConnectorInterface.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Route Metadata/ConnectorInterface.cs @@ -20,14 +20,7 @@ /// using System; using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; using System.Windows.Forms; -using LibAE; -using LibAE.Formats; using Orts.Formats.OR; namespace ActivityEditor.Engine diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Route Metadata/StationDisplay.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Route Metadata/StationDisplay.cs index 8e6deaad48..a88e55a22e 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Route Metadata/StationDisplay.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Route Metadata/StationDisplay.cs @@ -1,13 +1,6 @@ using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Windows.Forms; using System.Diagnostics; -using LibAE.Formats; +using System.Windows.Forms; using Orts.Formats.OR; namespace ActivityEditor.Route_Metadata @@ -24,7 +17,7 @@ public StationDisplay(StationItem item) tablePaths.SuspendLayout(); StationName.Text = station.nameStation; ClearTable(); - + int cntPath = this.tablePaths.RowCount; foreach (var pointArea in item.stationArea) { @@ -49,7 +42,7 @@ public StationDisplay(StationItem item) { foreach (var possibility in destinPoint.Value) { - AddPathData(originPoint.Key, possibility.Value); + AddPathData(originPoint.Key, possibility.Value); } } } @@ -129,15 +122,15 @@ public void AddPathData(string label, StationPath path) double yard = Math.Round(path.Platform, 1); Label platformLength = new Label() { Text = yard.ToString(), Anchor = AnchorStyles.Left, AutoSize = true }; this.tablePaths.Controls.Add(platformLength, 2, cntRows); - yard = Math.Round (path.Siding,1); - Label sidingLength = new Label(){ Text = yard.ToString(), Anchor = AnchorStyles.Left, AutoSize = true }; + yard = Math.Round(path.Siding, 1); + Label sidingLength = new Label() { Text = yard.ToString(), Anchor = AnchorStyles.Left, AutoSize = true }; this.tablePaths.Controls.Add(sidingLength, 3, cntRows); Label nbrPlatform = new Label() { Text = path.NbrPlatform.ToString(), Anchor = AnchorStyles.Left, AutoSize = true }; this.tablePaths.Controls.Add(nbrPlatform, 4, cntRows); Label nbrSiding = new Label() { Text = path.NbrSiding.ToString(), Anchor = AnchorStyles.Left, AutoSize = true }; this.tablePaths.Controls.Add(nbrSiding, 5, cntRows); - Label passingYardLength = new Label(){ Text = passingYard.ToString(), Anchor = AnchorStyles.Left, AutoSize = true }; + Label passingYardLength = new Label() { Text = passingYard.ToString(), Anchor = AnchorStyles.Left, AutoSize = true }; this.tablePaths.Controls.Add(passingYardLength, 6, cntRows); CinBoth = new Label() { Text = "--", Anchor = AnchorStyles.Left, AutoSize = true }; cntRows++; diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Route Metadata/TrackSegmentInterface.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Route Metadata/TrackSegmentInterface.cs index b69f29dfe4..c5e275f46a 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Route Metadata/TrackSegmentInterface.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Route Metadata/TrackSegmentInterface.cs @@ -1,12 +1,6 @@ using System; using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; using System.Windows.Forms; -using LibAE.Formats; using Orts.Formats.OR; namespace ActivityEditor.Route_Metadata diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Settings.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Settings.cs index f55e848f66..7bdca8aa3e 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Settings.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Settings.cs @@ -22,16 +22,18 @@ namespace ActivityEditor.Properties { - - + + // This class allows you to handle specific events on the settings class: // The SettingChanging event is raised before a setting's value is changed. // The PropertyChanged event is raised after a setting's value is changed. // The SettingsLoaded event is raised after the setting values are loaded. // The SettingsSaving event is raised before the setting values are saved. - internal sealed partial class Settings { - - public Settings() { + internal sealed partial class Settings + { + + public Settings() + { // // To add event handlers for saving and changing settings, uncomment the lines below: // // this.SettingChanging += this.SettingChangingEventHandler; @@ -39,12 +41,14 @@ internal sealed partial class Settings { // this.SettingsSaving += this.SettingsSavingEventHandler; // } - - private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) { + + private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) + { // Add code to handle the SettingChangingEvent event here. } - - private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) { + + private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) + { // Add code to handle the SettingsSaving event here. } } diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Wizard/ActivityDescr.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Wizard/ActivityDescr.cs index d7875647dc..c3bfef6718 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Wizard/ActivityDescr.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Wizard/ActivityDescr.cs @@ -4,10 +4,10 @@ namespace AEWizard { - /// - /// Represents a single page within a wizard dialog. - /// - public class ActivityDescr : SinglePage + /// + /// Represents a single page within a wizard dialog. + /// + public class ActivityDescr : SinglePage { private FlowLayoutPanel panel1; private TextBox textBox1; @@ -20,7 +20,7 @@ public class ActivityDescr : SinglePage public String RoutePath; public ActivityInfo activityInfo { get; set; } - // ================================================================== + // ================================================================== // Public Constructors // ================================================================== @@ -29,11 +29,11 @@ public class ActivityDescr : SinglePage /// class. /// public ActivityDescr() - { + { // Required for Windows Form Designer support InitializeComponent(); - - } + + } public void completePage() { @@ -43,13 +43,13 @@ public void completePage() // ================================================================== // Protected Properties // ================================================================== - - - + + + // ================================================================== // Private Methods // ================================================================== - + #region Windows Form Designer generated code /// /// Required method for Designer support - do not modify @@ -158,13 +158,13 @@ private void InitializeComponent() this.ResumeLayout(false); } - #endregion + #endregion // ================================================================== // Protected Internal Methods // ================================================================== - + /// /// Called when the page is no longer the active page. /// @@ -198,7 +198,7 @@ protected internal override bool OnSetActive() // Activate the page return true; } - + /// /// Called when the user clicks the Back button in a wizard. /// @@ -220,7 +220,7 @@ protected internal override string OnWizardBack() return WizardForm.NextPage; } - + /// /// Called when the user clicks the Finish button in a wizard. /// @@ -240,7 +240,7 @@ protected internal override bool OnWizardFinish() return false; return true; } - + /// /// Called when the user clicks the Next button in a wizard. /// diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Wizard/SelectRoute.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Wizard/SelectRoute.cs index e262ff56e9..7b7f8966a1 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Wizard/SelectRoute.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Wizard/SelectRoute.cs @@ -1,8 +1,5 @@ using System; using System.Windows.Forms; -using System.Collections.Generic; - -using LibAE; using Orts.Formats.OR; namespace AEWizard @@ -169,7 +166,7 @@ protected internal override bool OnWizardFinish() routeInfo.route = routePathCB.Text; return true; } - + } } diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Wizard/SinglePage.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Wizard/SinglePage.cs index ca859504d5..9201bd8419 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Wizard/SinglePage.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Wizard/SinglePage.cs @@ -1,5 +1,4 @@ -using System; -using System.Windows.Forms; +using System.Windows.Forms; //using LibAE; diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Wizard/TrainInfo.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Wizard/TrainInfo.cs index 586a1ed1df..ee6fd7448d 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Wizard/TrainInfo.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Wizard/TrainInfo.cs @@ -1,7 +1,5 @@ -using System; +using System.Linq; using System.Windows.Forms; -using System.Linq; -using LibAE; using LibAE.Formats; namespace AEWizard @@ -26,16 +24,16 @@ public void completePage() { this.trainConsistCB.DataSource = activityInfo.trainConsists.Select(o => o.consistName).ToList(); } - // ================================================================== + // ================================================================== // Protected Properties // ================================================================== - + /// /// Gets the WizardForm /// to which this WizardPage /// belongs. /// - + // ================================================================== // Private Methods // ================================================================== diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Wizard/WizardForm.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Wizard/WizardForm.cs index b5b214a494..aefb212b9f 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Wizard/WizardForm.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Wizard/WizardForm.cs @@ -7,12 +7,8 @@ using System; using System.Collections; -using System.Collections.Generic; - -using System.IO; using System.Drawing; using System.Windows.Forms; -using LibAE; using LibAE.Formats; using Orts.Formats.OR; @@ -22,35 +18,35 @@ namespace AEWizard /// Used to identify the various buttons that may appear within a wizard /// dialog. /// - [Flags] + [Flags] public enum WizardButton { /// /// Identifies the Back button. /// - Back = 0x00000001, - + Back = 0x00000001, + /// /// Identifies the Next button. /// - Next = 0x00000002, - + Next = 0x00000002, + /// /// Identifies the Finish button. /// - Finish = 0x00000004, - + Finish = 0x00000004, + /// /// Identifies the disabled Finish button. /// DisabledFinish = 0x00000008, } - + /// /// Represents a wizard dialog. /// public class WizardForm : Form - { + { ActivityInfo activityInfo; RouteInfo routeInfo; // ================================================================== @@ -70,17 +66,17 @@ public class WizardForm : Form /// pressed. /// public const string NoPageChange = null; - - + + // ================================================================== // Private Fields // ================================================================== - + /// /// Array of wizard pages. /// private ArrayList m_pages = new ArrayList(); - + /// /// Index of the selected page; -1 if no page selected. /// @@ -90,7 +86,7 @@ public class WizardForm : Form // ================================================================== // Protected Fields // ================================================================== - + /// /// The Back button. /// @@ -127,15 +123,15 @@ public class WizardForm : Form // ================================================================== // Public Constructors // ================================================================== - + /// /// Initializes a new instance of the WizardForm /// class. /// public WizardForm(ActivityInfo activity) - { - // Required for Windows Form Designer support - InitializeComponent(); + { + // Required for Windows Form Designer support + InitializeComponent(); activityInfo = activity; wiz1 = new ActivityDescr(); wiz1.activityInfo = activity; @@ -143,13 +139,13 @@ public WizardForm(ActivityInfo activity) wiz2 = new TrainInfo(); wiz2.activityInfo = activity; wiz2.completePage(); - Controls.AddRange(new Control[] + Controls.AddRange(new Control[] { wiz1, wiz2 }); // Ensure Finish and Next buttons are positioned similarly - m_finishButton.Location = m_nextButton.Location; - } + m_finishButton.Location = m_nextButton.Location; + } public WizardForm(RouteInfo info) { InitializeComponent(); @@ -167,14 +163,14 @@ public WizardForm(RouteInfo info) // ================================================================== // Private Methods // ================================================================== - + #region Windows Form Designer generated code - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { this.m_backButton = new System.Windows.Forms.Button(); this.m_nextButton = new System.Windows.Forms.Button(); this.m_cancelButton = new System.Windows.Forms.Button(); @@ -247,7 +243,7 @@ private void InitializeComponent() this.ResumeLayout(false); } - #endregion + #endregion /// /// Activates the page at the specified index in the page array. @@ -255,29 +251,29 @@ private void InitializeComponent() /// /// Index of new page to be selected. /// - private void ActivatePage( int newIndex ) + private void ActivatePage(int newIndex) { // Ensure the index is valid - if( newIndex < 0 || newIndex >= m_pages.Count ) + if (newIndex < 0 || newIndex >= m_pages.Count) throw new ArgumentOutOfRangeException(); // Deactivate the current page if applicable SinglePage currentPage = null; - if( m_selectedIndex != -1 ) + if (m_selectedIndex != -1) { currentPage = (SinglePage)m_pages[m_selectedIndex]; - if( !currentPage.OnKillActive() ) + if (!currentPage.OnKillActive()) return; } // Activate the new page - SinglePage newPage = (SinglePage)m_pages[ newIndex ]; - if( !newPage.OnSetActive() ) + SinglePage newPage = (SinglePage)m_pages[newIndex]; + if (!newPage.OnSetActive()) return; // Update state m_selectedIndex = newIndex; - if( currentPage != null ) + if (currentPage != null) currentPage.Visible = false; newPage.Visible = true; newPage.Focus(); @@ -286,32 +282,32 @@ private void ActivatePage( int newIndex ) /// /// Handles the Click event for the Back button. /// - private void OnClickBack( object sender, EventArgs e ) + private void OnClickBack(object sender, EventArgs e) { // Ensure a page is currently selected - if( m_selectedIndex != -1 ) + if (m_selectedIndex != -1) { // Inform selected page that the Back button was clicked string pageName = ((SinglePage)m_pages[ - m_selectedIndex ]).OnWizardBack(); - switch( pageName ) + m_selectedIndex]).OnWizardBack(); + switch (pageName) { // Do nothing case NoPageChange: break; - + // Activate the next appropriate page case NextPage: - if( m_selectedIndex - 1 >= 0 ) - ActivatePage( m_selectedIndex - 1 ); + if (m_selectedIndex - 1 >= 0) + ActivatePage(m_selectedIndex - 1); break; // Activate the specified page if it exists default: - foreach( SinglePage page in m_pages ) + foreach (SinglePage page in m_pages) { - if( page.Name == pageName ) - ActivatePage( m_pages.IndexOf( page ) ); + if (page.Name == pageName) + ActivatePage(m_pages.IndexOf(page)); } break; } @@ -321,7 +317,7 @@ private void OnClickBack( object sender, EventArgs e ) /// /// Handles the Click event for the Cancel button. /// - private void OnClickCancel( object sender, EventArgs e ) + private void OnClickCancel(object sender, EventArgs e) { // Close wizard DialogResult = DialogResult.Cancel; @@ -330,17 +326,17 @@ private void OnClickCancel( object sender, EventArgs e ) /// /// Handles the Click event for the Finish button. /// - private void OnClickFinish( object sender, EventArgs e ) + private void OnClickFinish(object sender, EventArgs e) { // Ensure a page is currently selected - if( m_selectedIndex != -1 ) + if (m_selectedIndex != -1) { // Inform selected page that the Finish button was clicked - SinglePage page = (SinglePage)m_pages[ m_selectedIndex ]; - if( page.OnWizardFinish() ) + SinglePage page = (SinglePage)m_pages[m_selectedIndex]; + if (page.OnWizardFinish()) { // Deactivate page and close wizard - if( page.OnKillActive() ) + if (page.OnKillActive()) DialogResult = DialogResult.OK; } } @@ -349,15 +345,15 @@ private void OnClickFinish( object sender, EventArgs e ) /// /// Handles the Click event for the Next button. /// - private void OnClickNext( object sender, EventArgs e ) + private void OnClickNext(object sender, EventArgs e) { // Ensure a page is currently selected - if( m_selectedIndex != -1 ) + if (m_selectedIndex != -1) { // Inform selected page that the Next button was clicked string pageName = ((SinglePage)m_pages[ - m_selectedIndex ]).OnWizardNext(); - switch( pageName ) + m_selectedIndex]).OnWizardNext(); + switch (pageName) { // Do nothing case NoPageChange: @@ -365,16 +361,16 @@ private void OnClickNext( object sender, EventArgs e ) // Activate the next appropriate page case NextPage: - if( m_selectedIndex + 1 < m_pages.Count ) - ActivatePage( m_selectedIndex + 1 ); + if (m_selectedIndex + 1 < m_pages.Count) + ActivatePage(m_selectedIndex + 1); break; // Activate the specified page if it exists default: - foreach( SinglePage page in m_pages ) + foreach (SinglePage page in m_pages) { - if( page.Name == pageName ) - ActivatePage( m_pages.IndexOf( page ) ); + if (page.Name == pageName) + ActivatePage(m_pages.IndexOf(page)); } break; } @@ -385,25 +381,25 @@ private void OnClickNext( object sender, EventArgs e ) // ================================================================== // Protected Methods // ================================================================== - + /// /// System.Windows.Forms.Control.OnControlAdded /// - protected override void OnControlAdded( ControlEventArgs e ) + protected override void OnControlAdded(ControlEventArgs e) { // Invoke base class implementation - base.OnControlAdded( e ); - + base.OnControlAdded(e); + // Set default properties for all WizardPage instances added to // this form SinglePage page = e.Control as SinglePage; - if( page != null ) + if (page != null) { page.Visible = false; - page.Location = new Point( 0, 0 ); - page.Size = new Size( Width, m_separator.Location.Y ); - m_pages.Add( page ); - if( m_selectedIndex == -1 ) + page.Location = new Point(0, 0); + page.Size = new Size(Width, m_separator.Location.Y); + m_pages.Add(page); + if (m_selectedIndex == -1) m_selectedIndex = 0; } } @@ -411,33 +407,33 @@ protected override void OnControlAdded( ControlEventArgs e ) /// /// System.Windows.Forms.Form.OnLoad /// - protected override void OnLoad( EventArgs e ) + protected override void OnLoad(EventArgs e) { // Invoke base class implementation - base.OnLoad( e ); - + base.OnLoad(e); + // Activate the first page in the wizard - if( m_pages.Count > 0 ) - ActivatePage( 0 ); + if (m_pages.Count > 0) + ActivatePage(0); } // ================================================================== // Public Methods // ================================================================== - + /// /// Sets the text in the Finish button. /// /// /// Text to be displayed on the Finish button. /// - public void SetFinishText( string text ) + public void SetFinishText(string text) { // Set the Finish button text m_finishButton.Text = text; } - + /// /// Enables or disables the Back, Next, or Finish buttons in the /// wizard. @@ -452,7 +448,7 @@ public void SetFinishText( string text ) /// WizardPage.OnSetActive. You can display a Finish or a /// Next button at one time, but not both. /// - public void SetWizardButtons( WizardButton flags ) + public void SetWizardButtons(WizardButton flags) { // Enable/disable and show/hide buttons appropriately m_backButton.Enabled = @@ -467,7 +463,7 @@ public void SetWizardButtons( WizardButton flags ) m_finishButton.Visible = (flags & WizardButton.Finish) == WizardButton.Finish || (flags & WizardButton.DisabledFinish) == WizardButton.DisabledFinish; - + // Set the AcceptButton depending on whether or not the Finish // button is visible or not AcceptButton = m_finishButton.Visible ? m_finishButton : diff --git a/Source/Contrib/ActivityEditor/LibAE/AEUtility.cs b/Source/Contrib/ActivityEditor/LibAE/AEUtility.cs index ee22c52b20..2c7916c9a3 100644 --- a/Source/Contrib/ActivityEditor/LibAE/AEUtility.cs +++ b/Source/Contrib/ActivityEditor/LibAE/AEUtility.cs @@ -20,12 +20,8 @@ /// Updates : /// -using System; -using System.IO; using System.Collections.Generic; using System.Linq; -using System.Text; -using MSTS; namespace LibAE { @@ -87,14 +83,14 @@ public TilesInfo(AreaRoute areaRoute, float x, float z) areaRoute.maxX = Utility.CalcBounds(areaRoute.maxX, ((x + 1f) * 2048f) + 1024f, true); areaRoute.maxY = Utility.CalcBounds(areaRoute.maxY, ((z + 1f) * 2048f) + 1024f, true); - areaRoute.setMinX(Utility.CalcBounds(areaRoute.getMinX(), (x * 2048f) -1024f, false)); - areaRoute.setMinY(Utility.CalcBounds(areaRoute.getMinY(), (z * 2048f) -1024f, false)); + areaRoute.setMinX(Utility.CalcBounds(areaRoute.getMinX(), (x * 2048f) - 1024f, false)); + areaRoute.setMinY(Utility.CalcBounds(areaRoute.getMinY(), (z * 2048f) - 1024f, false)); } } public static class Utility { - + /// /// Given a value representing a limit, evaluate if the given value exceeds the current limit. /// If so, expand the limit. diff --git a/Source/Contrib/ActivityEditor/LibAE/Formats/ActivityInfo.cs b/Source/Contrib/ActivityEditor/LibAE/Formats/ActivityInfo.cs index 7607bf06fd..a7e9443f5a 100644 --- a/Source/Contrib/ActivityEditor/LibAE/Formats/ActivityInfo.cs +++ b/Source/Contrib/ActivityEditor/LibAE/Formats/ActivityInfo.cs @@ -21,16 +21,11 @@ /// using System; -using System.IO; using System.Collections.Generic; +using System.IO; using System.Linq; -using System.Text; using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using MSTS; using Orts.Formats.Msts; -using Orts.Parsers.Msts; -using ORTS.Common; using Orts.Formats.OR; namespace LibAE.Formats @@ -43,7 +38,7 @@ public class ConsistInfo [JsonProperty("ConsistPath")] string consistPath; - public ConsistInfo (string name, string path) + public ConsistInfo(string name, string path) { consistName = name; consistPath = path; @@ -77,7 +72,7 @@ public ActivityInfo() } - public void config (List routes) + public void config(List routes) { foreach (string routeParent in routes) { @@ -101,7 +96,7 @@ public void config (List routes) string fullPathConsist = Path.GetFullPath(consist); ConsistFile consistName = new ConsistFile(fullPathConsist); ConsistInfo conInfo = new ConsistInfo(consistName.ToString(), fullPathConsist); - trainConsists.Add(conInfo); + trainConsists.Add(conInfo); } } } diff --git a/Source/Contrib/ActivityEditor/LibAE/Formats/MSTSDataConfig.cs b/Source/Contrib/ActivityEditor/LibAE/Formats/MSTSDataConfig.cs index d1f1e50f89..025314e175 100644 --- a/Source/Contrib/ActivityEditor/LibAE/Formats/MSTSDataConfig.cs +++ b/Source/Contrib/ActivityEditor/LibAE/Formats/MSTSDataConfig.cs @@ -20,14 +20,9 @@ /// Updates : /// -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; using System.IO; -using Orts.Parsers.Msts; -using ORTS.Common; using Orts.Formats.OR; +using ORTS.Common; namespace LibAE { @@ -35,7 +30,7 @@ public class MSTSDataConfig : MSTSData { public MSTSBase TileBase { get; protected set; } - public MSTSDataConfig(string mstsPath, string Route, TypeEditor interfaceType) : base (mstsPath, Route) + public MSTSDataConfig(string mstsPath, string Route, TypeEditor interfaceType) : base(mstsPath, Route) { string routePath = Path.Combine(Route, TRK.Tr_RouteFile.FileName); TileBase = new MSTSBase(TDB); diff --git a/Source/Contrib/ActivityEditor/LibAE/Formats/PathEvent.cs b/Source/Contrib/ActivityEditor/LibAE/Formats/PathEvent.cs index 29027c5f30..cbbd97816e 100644 --- a/Source/Contrib/ActivityEditor/LibAE/Formats/PathEvent.cs +++ b/Source/Contrib/ActivityEditor/LibAE/Formats/PathEvent.cs @@ -22,21 +22,10 @@ /// using System; -using System.Windows; -using System.IO; -using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Drawing; -using System.Drawing.Drawing2D; +using System.IO; using System.Reflection; -using Microsoft.Xna.Framework; -using MSTS; -using ORTS; -using LibAE; - using Newtonsoft.Json; -using Newtonsoft.Json.Linq; using Orts.Formats.OR; using ORTS.Common; @@ -52,7 +41,7 @@ enum TypeEvent ACTIVITY_STOP = 2, ACTIVITY_WAIT = 3 }; -#endregion + #endregion #region PathEventItem @@ -103,7 +92,7 @@ public ActStartItem(TypeEditor interfaceType) typeItem = (int)TypeEvent.ACTIVITY_START; st = a.GetManifestResourceStream("LibAE.Icon.Start.ico"); StartIcon = new System.Drawing.Icon(st); - + } public void setNameStart(int info) @@ -138,7 +127,7 @@ public ActStopItem(TypeEditor interfaceType) Assembly a = Assembly.GetExecutingAssembly(); typeItem = (int)TypeEvent.ACTIVITY_STOP; - st = a.GetManifestResourceStream("LibAE.Icon.Stop.ico"); + st = a.GetManifestResourceStream("LibAE.Icon.Stop.ico"); StopIcon = new System.Drawing.Icon(st); } diff --git a/Source/Contrib/ActivityEditor/LibAE/Formats/TrackDef.cs b/Source/Contrib/ActivityEditor/LibAE/Formats/TrackDef.cs index 535d35f3ad..6575e8086c 100644 --- a/Source/Contrib/ActivityEditor/LibAE/Formats/TrackDef.cs +++ b/Source/Contrib/ActivityEditor/LibAE/Formats/TrackDef.cs @@ -1,15 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using LibAE; -using Microsoft.Xna.Framework; -using MSTS; -using Orts.Formats.Msts; -using Orts.Parsers.Msts; -using ORTS.Common; - -namespace LibAE.Formats +namespace LibAE.Formats { #if false //================================================================================================// diff --git a/Source/Contrib/ActivityEditor/LibAE/RouteInfo.cs b/Source/Contrib/ActivityEditor/LibAE/RouteInfo.cs index 8302f3c353..7a8b9e9eb2 100644 --- a/Source/Contrib/ActivityEditor/LibAE/RouteInfo.cs +++ b/Source/Contrib/ActivityEditor/LibAE/RouteInfo.cs @@ -15,11 +15,9 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; using System.Collections.Generic; using System.IO; using System.Linq; -using System.Text; namespace Orts.Formats.OR { diff --git a/Source/Contrib/ContentManager/Content.cs b/Source/Contrib/ContentManager/Content.cs index 8ae78b7047..317d95bc11 100644 --- a/Source/Contrib/ContentManager/Content.cs +++ b/Source/Contrib/ContentManager/Content.cs @@ -20,8 +20,6 @@ using System; using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; namespace ORTS.ContentManager { @@ -114,16 +112,16 @@ public virtual Content Get(string name, ContentType type) { Debug.WriteLine(String.Format("{0} naively scanning for {2} '{1}'", this, name, type)); #endif - foreach (var child in children) + foreach (var child in children) + { + if (child.Name.Equals(name, StringComparison.OrdinalIgnoreCase)) { - if (child.Name.Equals(name, StringComparison.OrdinalIgnoreCase)) - { #if DEBUG_CONTENT_GET_SCAN Debug.WriteLine(String.Format("{0} naive scan found match for {2} '{1}'", this, name, type)); #endif - return child; - } + return child; } + } #if DEBUG_CONTENT_GET_SCAN } #endif diff --git a/Source/Contrib/ContentManager/ContentInfo.cs b/Source/Contrib/ContentManager/ContentInfo.cs index 986998eef3..f888183732 100644 --- a/Source/Contrib/ContentManager/ContentInfo.cs +++ b/Source/Contrib/ContentManager/ContentInfo.cs @@ -18,14 +18,14 @@ // Uncomment this define to show a textual representation of the serialised Content items for debugging. //#define DEBUG_CONTENT_SERIALIZATION -using Orts.Formats.Msts; -using ORTS.ContentManager.Models; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.Serialization.Formatters.Binary; using System.Text; +using Orts.Formats.Msts; +using ORTS.ContentManager.Models; using Path = ORTS.ContentManager.Models.Path; namespace ORTS.ContentManager @@ -39,7 +39,8 @@ public static string GetText(Content content) details.AppendFormat("Name:\t{1}{0}", Environment.NewLine, content.Name); details.AppendFormat("Path:\t{1}{0}", Environment.NewLine, content.PathName); - try { + try + { var stream = new MemoryStream(); var serializer = new BinaryFormatter(); serializer.Serialize(stream, content); diff --git a/Source/Contrib/ContentManager/ContentManager.cs b/Source/Contrib/ContentManager/ContentManager.cs index dcbcaf1e54..4ee37f1aa6 100644 --- a/Source/Contrib/ContentManager/ContentManager.cs +++ b/Source/Contrib/ContentManager/ContentManager.cs @@ -15,9 +15,9 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using ORTS.Settings; using System; using System.Collections.Generic; +using ORTS.Settings; namespace ORTS.ContentManager { diff --git a/Source/Contrib/ContentManager/ContentManagerGUI.cs b/Source/Contrib/ContentManager/ContentManagerGUI.cs index b96fe608bc..8ebed3772c 100644 --- a/Source/Contrib/ContentManager/ContentManagerGUI.cs +++ b/Source/Contrib/ContentManager/ContentManagerGUI.cs @@ -15,7 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using ORTS.Settings; using System; using System.Collections.Generic; using System.ComponentModel; @@ -25,6 +24,7 @@ using System.Runtime.InteropServices; using System.Text.RegularExpressions; using System.Windows.Forms; +using ORTS.Settings; namespace ORTS.ContentManager { diff --git a/Source/Contrib/ContentManager/ContentOR.cs b/Source/Contrib/ContentManager/ContentOR.cs index 06127a6cfc..eec73f86d3 100644 --- a/Source/Contrib/ContentManager/ContentOR.cs +++ b/Source/Contrib/ContentManager/ContentOR.cs @@ -16,10 +16,7 @@ // along with Open Rails. If not, see . using System; -using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text; namespace ORTS.ContentManager { diff --git a/Source/Contrib/ContentManager/Models/Activity.cs b/Source/Contrib/ContentManager/Models/Activity.cs index 464ddb34f1..50f318cbd4 100644 --- a/Source/Contrib/ContentManager/Models/Activity.cs +++ b/Source/Contrib/ContentManager/Models/Activity.cs @@ -15,12 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Orts.Formats.Msts; -using Orts.Parsers.OR; using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; +using Orts.Formats.Msts; +using Orts.Parsers.OR; namespace ORTS.ContentManager.Models { diff --git a/Source/Contrib/ContentManager/Models/Car.cs b/Source/Contrib/ContentManager/Models/Car.cs index a0395e175e..a2d8e79a3e 100644 --- a/Source/Contrib/ContentManager/Models/Car.cs +++ b/Source/Contrib/ContentManager/Models/Car.cs @@ -15,12 +15,9 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Orts.Formats.Msts; using System; -using System.Collections.Generic; using System.Diagnostics; -using System.Linq; -using System.Text; +using Orts.Formats.Msts; namespace ORTS.ContentManager.Models { diff --git a/Source/Contrib/ContentManager/Models/Consist.cs b/Source/Contrib/ContentManager/Models/Consist.cs index a4b6c69390..a665b8e654 100644 --- a/Source/Contrib/ContentManager/Models/Consist.cs +++ b/Source/Contrib/ContentManager/Models/Consist.cs @@ -15,12 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Orts.Formats.Msts; using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; -using System.Text; +using Orts.Formats.Msts; namespace ORTS.ContentManager.Models { @@ -39,11 +38,12 @@ public Consist(Content content) Name = file.Name; Cars = from car in file.Train.TrainCfg.WagonList - select new Car(car); + select new Car(car); } } - public enum Direction{ + public enum Direction + { Forwards, Backwards, } diff --git a/Source/Contrib/ContentManager/Models/Path.cs b/Source/Contrib/ContentManager/Models/Path.cs index fd503f394c..e6ed6064e0 100644 --- a/Source/Contrib/ContentManager/Models/Path.cs +++ b/Source/Contrib/ContentManager/Models/Path.cs @@ -15,12 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Orts.Formats.Msts; using System; using System.Collections.Generic; using System.Diagnostics; -using System.Linq; -using System.Text; +using Orts.Formats.Msts; namespace ORTS.ContentManager.Models { diff --git a/Source/Contrib/ContentManager/Models/Route.cs b/Source/Contrib/ContentManager/Models/Route.cs index 11e8782cd8..ea9f7bf8a3 100644 --- a/Source/Contrib/ContentManager/Models/Route.cs +++ b/Source/Contrib/ContentManager/Models/Route.cs @@ -15,13 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Orts.Formats.Msts; using System; -using System.Collections.Generic; using System.Diagnostics; using System.IO; -using System.Linq; -using System.Text; +using Orts.Formats.Msts; namespace ORTS.ContentManager.Models { diff --git a/Source/Contrib/ContentManager/Models/Service.cs b/Source/Contrib/ContentManager/Models/Service.cs index 124aef6257..8b9700f19c 100644 --- a/Source/Contrib/ContentManager/Models/Service.cs +++ b/Source/Contrib/ContentManager/Models/Service.cs @@ -15,13 +15,13 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Orts.Formats.Msts; -using Orts.Parsers.OR; using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Text.RegularExpressions; +using Orts.Formats.Msts; +using Orts.Parsers.OR; namespace ORTS.ContentManager.Models { @@ -103,7 +103,7 @@ public Service(Content content) } } ID = serviceColumn.ToString(); - var timeRE = new Regex(@"^(\d\d):(\d\d)(?:-(\d\d):(\d\d))?"); + var timeRE = new Regex(@"^(\d\d):(\d\d)(?:-(\d\d):(\d\d))?"); var startTimeMatch = timeRE.Match(file.Strings[startRow][serviceColumn]); if (startTimeMatch.Success) { diff --git a/Source/Contrib/ContentManager/Program.cs b/Source/Contrib/ContentManager/Program.cs index f2b50f3060..37c99c01cf 100644 --- a/Source/Contrib/ContentManager/Program.cs +++ b/Source/Contrib/ContentManager/Program.cs @@ -16,8 +16,6 @@ // along with Open Rails. If not, see . using System; -using System.Collections.Generic; -using System.Linq; using System.Windows.Forms; namespace ORTS.ContentManager diff --git a/Source/Contrib/DataCollector/Program.cs b/Source/Contrib/DataCollector/Program.cs index a45ac4ce0c..d5f097c50f 100644 --- a/Source/Contrib/DataCollector/Program.cs +++ b/Source/Contrib/DataCollector/Program.cs @@ -15,13 +15,13 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Orts.Formats.Msts; -using ORTS.Common; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; +using Orts.Formats.Msts; +using ORTS.Common; namespace DataCollector { diff --git a/Source/Contrib/DataConverter/ClockConverter.cs b/Source/Contrib/DataConverter/ClockConverter.cs index 40382aebb4..c6a6bc4a0d 100644 --- a/Source/Contrib/DataConverter/ClockConverter.cs +++ b/Source/Contrib/DataConverter/ClockConverter.cs @@ -15,16 +15,13 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Newtonsoft.Json; -using Orts.Formats.Msts; -using Orts.Formats.OR; -using Orts.Parsers.Msts; using System; using System.Collections.Generic; using System.IO; using System.Linq; -using System.Text; -using System.Xml.Linq; +using Newtonsoft.Json; +using Orts.Formats.OR; +using Orts.Parsers.Msts; namespace Orts.DataConverter { diff --git a/Source/Contrib/DataConverter/TerrainConverter.cs b/Source/Contrib/DataConverter/TerrainConverter.cs index e7f89e57c0..45b2d77541 100644 --- a/Source/Contrib/DataConverter/TerrainConverter.cs +++ b/Source/Contrib/DataConverter/TerrainConverter.cs @@ -15,13 +15,13 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Orts.Formats.Msts; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Xml.Linq; +using Orts.Formats.Msts; namespace Orts.DataConverter { diff --git a/Source/Contrib/DataValidator/Program.cs b/Source/Contrib/DataValidator/Program.cs index 1c385f5440..2253141ef3 100644 --- a/Source/Contrib/DataValidator/Program.cs +++ b/Source/Contrib/DataValidator/Program.cs @@ -15,12 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Orts.Common; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; +using Orts.Common; using ORTS.Common; namespace DataValidator diff --git a/Source/Contrib/DataValidator/TerrainValidator.cs b/Source/Contrib/DataValidator/TerrainValidator.cs index 7c57061f12..88b343009d 100644 --- a/Source/Contrib/DataValidator/TerrainValidator.cs +++ b/Source/Contrib/DataValidator/TerrainValidator.cs @@ -15,13 +15,9 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Orts.Formats.Msts; -using Orts.Parsers.Msts; using System; -using System.Collections.Generic; using System.Diagnostics; -using System.Linq; -using System.Text; +using Orts.Formats.Msts; namespace DataValidator { diff --git a/Source/Contrib/DataValidator/Validator.cs b/Source/Contrib/DataValidator/Validator.cs index c8001da1e0..a608cfbdf2 100644 --- a/Source/Contrib/DataValidator/Validator.cs +++ b/Source/Contrib/DataValidator/Validator.cs @@ -18,8 +18,6 @@ using System; using System.Collections.Generic; using System.Diagnostics; -using System.Linq; -using System.Text; namespace DataValidator { diff --git a/Source/Contrib/SimulatorTester/Program.cs b/Source/Contrib/SimulatorTester/Program.cs index ab260064c0..8c605ff109 100644 --- a/Source/Contrib/SimulatorTester/Program.cs +++ b/Source/Contrib/SimulatorTester/Program.cs @@ -17,13 +17,13 @@ using System; using System.Collections.Generic; -using System.Linq; -using Orts.Simulation; -using ORTS.Common; +using System.Diagnostics; using System.IO; +using System.Linq; using System.Windows.Forms; using Orts.Common; -using System.Diagnostics; +using Orts.Simulation; +using ORTS.Common; namespace SimulatorTester { diff --git a/Source/Contrib/TrackViewer/Drawing/BasicShapes.cs b/Source/Contrib/TrackViewer/Drawing/BasicShapes.cs index 41b9c5725a..24c84902c1 100644 --- a/Source/Contrib/TrackViewer/Drawing/BasicShapes.cs +++ b/Source/Contrib/TrackViewer/Drawing/BasicShapes.cs @@ -17,7 +17,6 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; using System.Windows.Media.Imaging; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -35,11 +34,11 @@ namespace ORTS.TrackViewer.Drawing static class BasicShapes { private static SpriteBatch spriteBatch; - + //size of a identifying feature in the texture (in pixels), so we can scale as needed private static Dictionary textureScales = new Dictionary(); private static Dictionary textureOffsets = new Dictionary(); - private static Dictionary textures = new Dictionary(); + private static Dictionary textures = new Dictionary(); private static FontManager fontManager; @@ -51,14 +50,14 @@ static class BasicShapes /// The full directory name where content like .png files can be found public static void LoadContent(GraphicsDevice graphicsDevice, SpriteBatch spriteBatchIn, string contentPath) { - spriteBatch = spriteBatchIn; + spriteBatch = spriteBatchIn; textures["blankPixel"] = new Texture2D(graphicsDevice, 1, 1); textures["blankPixel"].SetData(new[] { Color.White }); int diameter = 64; // Needs to be power of two for mipmapping textures["circle"] = CreateCircleTexture(graphicsDevice, diameter); textureScales["circle"] = diameter; - textureOffsets["circle"] = new Vector2(diameter/2, diameter/2); + textureOffsets["circle"] = new Vector2(diameter / 2, diameter / 2); textures["disc"] = CreateDiscTexture(graphicsDevice, diameter); textureScales["disc"] = diameter; @@ -73,13 +72,13 @@ public static void LoadContent(GraphicsDevice graphicsDevice, SpriteBatch sprite textureOffsets["crossedRing"] = new Vector2(diameter / 2, diameter / 2); - LoadAndHighlightTexture(graphicsDevice, contentPath, "signal", "Signal",29, 18); + LoadAndHighlightTexture(graphicsDevice, contentPath, "signal", "Signal", 29, 18); LoadAndHighlightTexture(graphicsDevice, contentPath, "hazard", "Hazard"); - LoadAndHighlightTexture(graphicsDevice, contentPath, "pathNormal", "pathNormal",31,31); - LoadAndHighlightTexture(graphicsDevice, contentPath, "pathStart", "pathStart",31,31); - LoadAndHighlightTexture(graphicsDevice, contentPath, "pathEnd", "pathEnd",31,31); - LoadAndHighlightTexture(graphicsDevice, contentPath, "pathWait", "pathWait",31,31); + LoadAndHighlightTexture(graphicsDevice, contentPath, "pathNormal", "pathNormal", 31, 31); + LoadAndHighlightTexture(graphicsDevice, contentPath, "pathStart", "pathStart", 31, 31); + LoadAndHighlightTexture(graphicsDevice, contentPath, "pathEnd", "pathEnd", 31, 31); + LoadAndHighlightTexture(graphicsDevice, contentPath, "pathWait", "pathWait", 31, 31); LoadAndHighlightTexture(graphicsDevice, contentPath, "pathReverse", "pathReverse", 31, 31); //LoadAndHighlightTexture(graphicsDevice, contentPath, "pathSiding", "pathSiding", 31, 31); @@ -89,7 +88,7 @@ public static void LoadContent(GraphicsDevice graphicsDevice, SpriteBatch sprite LoadAndHighlightTexture(graphicsDevice, contentPath, "pickup", "Pickup"); LoadAndHighlightTexture(graphicsDevice, contentPath, "platform", "Platform", 31, 37); LoadAndHighlightTexture(graphicsDevice, contentPath, "sound", "Sound"); - LoadAndHighlightTexture(graphicsDevice, contentPath, "playerTrain", "steamTrain",31,31); + LoadAndHighlightTexture(graphicsDevice, contentPath, "playerTrain", "steamTrain", 31, 31); PrepareArcDrawing(); fontManager = FontManager.Instance; @@ -105,11 +104,11 @@ public static void LoadContent(GraphicsDevice graphicsDevice, SpriteBatch sprite /// the name of the file (without extension) private static void LoadAndHighlightTexture(GraphicsDevice graphicsDevice, string contentPath, string textureName, string fileName) { - LoadAndHighlightTexture( graphicsDevice, contentPath, textureName, fileName, 0, 0); + LoadAndHighlightTexture(graphicsDevice, contentPath, textureName, fileName, 0, 0); } private static void LoadAndHighlightTexture(GraphicsDevice graphicsDevice, string contentPath, string textureName, string fileName, int offsetX, int offsetY) { - string fullFileName = System.IO.Path.Combine(contentPath, fileName +".png"); + string fullFileName = System.IO.Path.Combine(contentPath, fileName + ".png"); Texture2D tempTexture; try { @@ -153,7 +152,7 @@ static Texture2D ColorScaledTexture(Texture2D texture, GraphicsDevice graphicsDe /// The white texture private static Texture2D CreateCircleTexture(GraphicsDevice graphicsDevice, int outerRadius) { - int radius = (outerRadius - 2)/2; // So circle doesn't go out of bounds + int radius = (outerRadius - 2) / 2; // So circle doesn't go out of bounds Texture2D texture = new Texture2D(graphicsDevice, outerRadius, outerRadius, mipmap: false, SurfaceFormat.Color); Color[] data = new Color[outerRadius * outerRadius]; @@ -210,7 +209,7 @@ private static Texture2D CreateDiscTexture(GraphicsDevice graphicsDevice, int ou texture.SetData(data); return texture; } - + /// /// private method to create a texture2D containing a ring (circle with thick border) /// @@ -231,7 +230,7 @@ private static Texture2D CreateRingTexture(GraphicsDevice graphicsDevice, int ou { int i = (x + radius) * outerRadius + (y + radius); int r2 = x * x + y * y; - if (r2 <= radius * radius && r2 > innerRadius * innerRadius) + if (r2 <= radius * radius && r2 > innerRadius * innerRadius) { data[i] = Color.White; } @@ -283,7 +282,7 @@ private static Texture2D CreateCrossedRingTexture(GraphicsDevice graphicsDevice, data[i] = Color.White; } } - + } } @@ -338,13 +337,13 @@ public static void DrawDashedLine(float width, Color color, Vector2 point1, Vect float angle = (float)Math.Atan2(point2.Y - point1.Y, point2.X - point1.X); float cosAngle = (float)Math.Cos(angle); float sinAngle = (float)Math.Sin(angle); - + float length = Vector2.Distance(point1, point2); - + int pixelsPerSegment = 10; // this is a target value. We will always start and end with a segment. - int nsegments = 1 + (int) Math.Floor(length / (2 * pixelsPerSegment)); + int nsegments = 1 + (int)Math.Floor(length / (2 * pixelsPerSegment)); float lengthPerSegment = length / (2 * nsegments - 1); - Vector2 segmentOffset = 2*lengthPerSegment * new Vector2(cosAngle, sinAngle); + Vector2 segmentOffset = 2 * lengthPerSegment * new Vector2(cosAngle, sinAngle); for (int i = 0; i < nsegments; i++) { @@ -364,8 +363,8 @@ public static void DrawDashedLine(float width, Color color, Vector2 point1, Vect public static void DrawLine(float width, Color color, Vector2 point, float length, float angle) { // offset to compensate for the width of the line - Vector2 offset = new Vector2(width * (float) Math.Sin(angle)/2, -width * (float)Math.Cos(angle)/2); - spriteBatch.Draw(textures["blankPixel"], point+offset, null, color, + Vector2 offset = new Vector2(width * (float)Math.Sin(angle) / 2, -width * (float)Math.Cos(angle) / 2); + spriteBatch.Draw(textures["blankPixel"], point + offset, null, color, angle, Vector2.Zero, new Vector2(length, width), SpriteEffects.None, 0); } @@ -385,14 +384,14 @@ public static void DrawArc(float width, Color color, Vector2 point, float radius // Positive arcDegree means curving to the left, negative arcDegree means curving to the right int sign = (arcDegrees > 0) ? -1 : 1; arcDegrees = Math.Abs(arcDegrees); - + // We will draw an arc as a succession of straight lines. We do this in a way that reduces the amount // of goniometric calculations needed. // The idea is to start to find the center of the circle. The direction from center to origin is // 90 degrees different from angle Vector2 centerToPointDirection = sign * new Vector2(-(float)Math.Sin(angle), (float)Math.Cos(angle)); // unit vector Vector2 center = point - radius * centerToPointDirection; ; - + // To determine the amount of straight lines we need to calculate we first // determine then lenght of the arc, and divide that by the maximum we allow; // All angles go in steps of minAngleDegree @@ -401,12 +400,12 @@ public static void DrawArc(float width, Color color, Vector2 point, float radius // Here alpha is the angle drawn for a single arc-segment. Approximately error ~ radius * alpha^2/8. // The amount of pixels in the line is about L ~ radius * alpha => L ~ sqrt(8 * radius * error). // We found that for thight curves, error can not be larger than half a pixel (otherwise it becomes visible) - maxStraightPixels = (float)Math.Sqrt(4*radius); + maxStraightPixels = (float)Math.Sqrt(4 * radius); float numberStraightLines = (float)Math.Ceiling(arcLength / maxStraightPixels); // amount of minAngleDegrees we need to cover: - int arcStepsRemaining = (int) (Math.Round(arcDegrees/minAngleDegree)); + int arcStepsRemaining = (int)(Math.Round(arcDegrees / minAngleDegree)); // amount of minAngleDegrees we cover per straight line: - int arcStepsPerLine = (int) (Math.Ceiling(arcDegrees/(minAngleDegree*numberStraightLines))); + int arcStepsPerLine = (int)(Math.Ceiling(arcDegrees / (minAngleDegree * numberStraightLines))); // Add offset in angles if (arcDegreesOffset != 0f) @@ -422,9 +421,9 @@ public static void DrawArc(float width, Color color, Vector2 point, float radius while (arcStepsRemaining > 0) { int arcSteps = Math.Min(arcStepsRemaining, arcStepsPerLine); //angle steps we cover in this line - point = center + centerToPointDirection * (radius-sign*width/2); // correct for width of line + point = center + centerToPointDirection * (radius - sign * width / 2); // correct for width of line float length = radius * arcSteps * minAngleRad + 1; // the +1 to prevent white lines in between arc sections - + spriteBatch.Draw(textures["blankPixel"], point, null, color, angle, Vector2.Zero, new Vector2(length, width), SpriteEffects.None, 0); @@ -437,8 +436,8 @@ public static void DrawArc(float width, Color color, Vector2 point, float radius angle -= sign * arcSteps * minAngleRad; //Rotate the centerToPointDirection, and calculate new point centerToPointDirection = new Vector2( - cosTable[arcSteps] * centerToPointDirection.X + sign*sinTable[arcSteps] * centerToPointDirection.Y, - -sign*sinTable[arcSteps] * centerToPointDirection.X + cosTable[arcSteps] * centerToPointDirection.Y + cosTable[arcSteps] * centerToPointDirection.X + sign * sinTable[arcSteps] * centerToPointDirection.Y, + -sign * sinTable[arcSteps] * centerToPointDirection.X + cosTable[arcSteps] * centerToPointDirection.Y ); } } @@ -508,17 +507,17 @@ public static void DrawTexture(Vector2 point, string textureName, float angle, f private static void PrepareArcDrawing() { minAngleRad = MathHelper.ToRadians(minAngleDegree); - arcTableSize = (int)(Math.Ceiling(maxAngleDegree/minAngleDegree)+1); + arcTableSize = (int)(Math.Ceiling(maxAngleDegree / minAngleDegree) + 1); cosTable = new float[arcTableSize]; sinTable = new float[arcTableSize]; for (int i = 0; i < arcTableSize; i++) { - cosTable[i] = (float) Math.Cos(i * minAngleRad); - sinTable[i] = (float) Math.Sin(i * minAngleRad); + cosTable[i] = (float)Math.Cos(i * minAngleRad); + sinTable[i] = (float)Math.Sin(i * minAngleRad); } } - + private static float minAngleDegree = 0.1f; // we do not care for angles smaller than 0.1 degrees private static float maxAngleDegree = 90; // allows for drawing up to 90 degree arcs private static float maxStraightPixels; // Maximum amount of pixels in a straight line part of an arc @@ -545,19 +544,19 @@ public class FontManager private int defaultFontSize; /// Fontsize to be used for exanding text private int expandingFontSize; - + /// The text manager that supports the font(s) private WindowTextManager textManager; /// List of fonts private Dictionary fonts; - + /// /// Constructor, private so only called during class initialization /// private FontManager() { - fontSizes = new int[] {10,11,12,13,14,16,18,20}; + fontSizes = new int[] { 10, 11, 12, 13, 14, 16, 18, 20 }; defaultFontSize = 10; expandingFontSize = defaultFontSize; diff --git a/Source/Contrib/TrackViewer/Drawing/CloseToMouse.cs b/Source/Contrib/TrackViewer/Drawing/CloseToMouse.cs index 70c76ed256..fcd3c3f0ed 100644 --- a/Source/Contrib/TrackViewer/Drawing/CloseToMouse.cs +++ b/Source/Contrib/TrackViewer/Drawing/CloseToMouse.cs @@ -17,10 +17,9 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; using Microsoft.Xna.Framework; -using ORTS.Common; using Orts.Formats.Msts; +using ORTS.Common; namespace ORTS.TrackViewer.Drawing { @@ -80,7 +79,7 @@ public abstract class CloseToMousePoint : CloseToMouse /// /// CloseToMouse item specifically for junctions and endnode. But will take any track point /// - public class CloseToMouseJunctionOrEnd:CloseToMousePoint + public class CloseToMouseJunctionOrEnd : CloseToMousePoint { /// Tracknode of the closest junction or end node public TrackNode JunctionOrEndNode { get; private set; } @@ -142,13 +141,13 @@ public void CheckMouseDistance(WorldLocation location, WorldLocation mouseLocati /// /// CloseToMouse track item. Stores item as well as its type (name) /// - public class CloseToMouseItem:CloseToMousePoint + public class CloseToMouseItem : CloseToMousePoint { /// Link to the item that is closest to the mouse public DrawableTrackItem DrawableTrackItem { get; protected set; } - + /// The index of the original item in whatever table it was defined - public override uint Index { get { return DrawableTrackItem.Index;} } + public override uint Index { get { return DrawableTrackItem.Index; } } /// The X-coordinate within a tile of the original item in the track database public override float X { get { return worldLocation.Location.X; } } /// The Z-coordinate within a tile of the original item in the track database @@ -156,7 +155,7 @@ public class CloseToMouseItem:CloseToMousePoint /// The world location of the item that is closest to the mouse private WorldLocation worldLocation; - + /// /// Constructor, creating an empty object /// @@ -184,7 +183,7 @@ public override void Reset() base.Reset(); DrawableTrackItem = null; worldLocation = WorldLocation.None; - } + } /// /// Check wether this track Item is closest to the mouse location @@ -297,7 +296,7 @@ public override void Reset() /// the vectorSection that will be stored when indeed it is closest to the mouse location /// Current index of the trackvectorsection /// - public void CheckMouseDistance(WorldLocation location, WorldLocation mouseLocation, + public void CheckMouseDistance(WorldLocation location, WorldLocation mouseLocation, TrackNode trackNode, TrVectorSection vectorSection, int tvsi, double pixelsPerMeter) { storedMouseLocation = mouseLocation; @@ -340,7 +339,7 @@ void CalcRealDistances() TrackSection trackSection = tsectionDat.TrackSections.Get(trackCandidate.vectorSection.SectionIndex); DistanceLon distanceLon = CalcRealDistanceSquared(trackCandidate.vectorSection, trackSection); double realDistanceSquared = (double)distanceLon.distanceSquared; - + // Add the trackCandidate to the sorted list with its new distance squared as key if (!sortedTrackCandidates.ContainsKey(realDistanceSquared)) { @@ -420,7 +419,8 @@ DistanceLon CalcRealDistanceSquared(TrVectorSection trackVectorSection, TrackSec /// /// Struct to store a candidate for the track closest to the mouse, so we can keep an ordered list. /// - struct TrackCandidate { + struct TrackCandidate + { public TrackNode trackNode; public TrVectorSection vectorSection; public int trackVectorSectionIndex; // which section within a trackNode that is a vector node diff --git a/Source/Contrib/TrackViewer/Drawing/DebugWindow.cs b/Source/Contrib/TrackViewer/Drawing/DebugWindow.cs index f0bfb03a90..dfae7754ab 100644 --- a/Source/Contrib/TrackViewer/Drawing/DebugWindow.cs +++ b/Source/Contrib/TrackViewer/Drawing/DebugWindow.cs @@ -16,10 +16,7 @@ // along with Open Rails. If not, see . using System; using System.Collections.Generic; -using System.Linq; -using System.Text; using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; namespace ORTS.TrackViewer.Drawing { @@ -35,7 +32,8 @@ public class DebugWindow /// /// Draw all available debug windows /// - public static void DrawAll() { + public static void DrawAll() + { //Just a safety. Normally there should be no DebugWindows once released. if (!System.Diagnostics.Debugger.IsAttached) return; foreach (DebugWindow window in debugWindows) diff --git a/Source/Contrib/TrackViewer/Drawing/DrawArea.cs b/Source/Contrib/TrackViewer/Drawing/DrawArea.cs index 147758c932..00ffb55480 100644 --- a/Source/Contrib/TrackViewer/Drawing/DrawArea.cs +++ b/Source/Contrib/TrackViewer/Drawing/DrawArea.cs @@ -27,14 +27,9 @@ // Note: screen (area and window) coordinates are given by x, y (from left to right, and top to bottom), // whereas world locations are in x, z (from left to right but from bottom to top). using System; -using System.Collections.Generic; using System.Linq; -using System.Text; using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Content; -using Microsoft.Xna.Framework.Graphics; using ORTS.Common; -using ORTS.TrackViewer.Properties; namespace ORTS.TrackViewer.Drawing { @@ -774,7 +769,7 @@ public void DrawTexture(WorldLocation location, string textureName, float size, /// Rotation angle for the texture /// Size of the texture in world-meters ///Whether the texture needs to be flipped (vertically) - public void DrawTexture(WorldLocation location, string textureName, float size, float angle, bool flip) + public void DrawTexture(WorldLocation location, string textureName, float size, float angle, bool flip) { if (OutOfArea(location)) return; float pixelSize = GetWindowSize(size); @@ -851,12 +846,12 @@ public double AddStep(int stepsToAdd) while (stepIndex >= discreteSteps.Count()) { stepIndex -= discreteSteps.Count(); - powerOfTen ++; + powerOfTen++; } while (stepIndex < 0) { stepIndex += discreteSteps.Count(); - powerOfTen --; + powerOfTen--; if (powerOfTen < minPowerOfTen) { powerOfTen = minPowerOfTen; @@ -873,7 +868,7 @@ public double AddStep(int stepsToAdd) public void ApproximateTo(double requestedValue) { powerOfTen = Convert.ToInt32(Math.Floor(Math.Log10(requestedValue))) - 1; - double restValue = requestedValue * Math.Pow(10 , -(double)powerOfTen); + double restValue = requestedValue * Math.Pow(10, -(double)powerOfTen); for (stepIndex = 0; stepIndex < discreteSteps.Count() && discreteSteps[stepIndex] < restValue; stepIndex++) { }; if (stepIndex == discreteSteps.Count()) { // the value requested is larger than 90. 10^n, which means we get 100.10^n. diff --git a/Source/Contrib/TrackViewer/Drawing/DrawColors.cs b/Source/Contrib/TrackViewer/Drawing/DrawColors.cs index 09256865f1..1bd04fb8d3 100644 --- a/Source/Contrib/TrackViewer/Drawing/DrawColors.cs +++ b/Source/Contrib/TrackViewer/Drawing/DrawColors.cs @@ -17,7 +17,6 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; using Microsoft.Xna.Framework; using ORTS.TrackViewer.UserInterface; @@ -38,9 +37,9 @@ namespace ORTS.TrackViewer.Drawing static class DrawColors { - public static ColorScheme colorsNormal = new ColorScheme(); + public static ColorScheme colorsNormal = new ColorScheme(); public static ColorScheme colorsHighlight = new ColorScheme(HighlightType.Highlight); - public static ColorScheme colorsHotlight = new ColorScheme(HighlightType.Hotlight); // even more highlighting + public static ColorScheme colorsHotlight = new ColorScheme(HighlightType.Hotlight); // even more highlighting public static ColorScheme colorsRoads = new ColorScheme(); public static ColorScheme colorsRoadsHighlight = new ColorScheme(HighlightType.Highlight); public static ColorScheme colorsRoadsHotlight = new ColorScheme(HighlightType.Hotlight); @@ -53,7 +52,7 @@ static class DrawColors static ColorsGroupTrack roadTrackGroupColoured = new ColorsGroupTrack(); static ColorsGroupTrack trackGroupTerrain = new ColorsGroupTrack(); static ColorsGroupTrack roadTrackGroupTerrain = new ColorsGroupTrack(); - + static ColorsGroupBackground backgroundWithTilesGroup = new ColorsGroupBackground(); static ColorsGroupBackground backgroundWithoutTilesGroup = new ColorsGroupBackground(); @@ -72,7 +71,7 @@ public static void Initialize(IPreferenceChanger preferenceChanger) SetShadedColors(preferenceChanger); SetColoursFromOptions(true, false, false); //just a default - } + } private static void SetPathColors(IPreferenceChanger preferenceChanger) { @@ -83,7 +82,7 @@ private static void SetPathColors(IPreferenceChanger preferenceChanger) ColorWithHighlights brokenNode = new ColorWithHighlights(Color.Red, 40); ColorWithHighlights pathMain = new ColorWithHighlights(Color.Yellow, 20); - pathMain.MakeIntoUserPreference(preferenceChanger, "pathmain", + pathMain.MakeIntoUserPreference(preferenceChanger, "pathmain", TrackViewer.catalog.GetString("Select path color (main)")); ColorsGroupTrack pathMainGroup = new ColorsGroupTrack { @@ -95,7 +94,7 @@ private static void SetPathColors(IPreferenceChanger preferenceChanger) colorsPathMain.TrackColors = pathMainGroup; ColorWithHighlights pathSiding = new ColorWithHighlights(Color.Orange, 20); - pathSiding.MakeIntoUserPreference(preferenceChanger, "pathsiding", + pathSiding.MakeIntoUserPreference(preferenceChanger, "pathsiding", TrackViewer.catalog.GetString("Select path color (siding)")); ColorsGroupTrack pathSidingGroup = new ColorsGroupTrack { @@ -107,7 +106,7 @@ private static void SetPathColors(IPreferenceChanger preferenceChanger) colorsPathSiding.TrackColors = pathSidingGroup; - + } private static void SetTrackColors(IPreferenceChanger preferenceChanger) @@ -151,7 +150,7 @@ private static void SetBackgroundColors(IPreferenceChanger preferenceChanger) { ColorWithHighlights fixedBackgroundColor = new ColorWithHighlights(Color.White, 20); ColorWithHighlights changingBackgroundColor = new ColorWithHighlights(Color.PaleGreen, 20); - changingBackgroundColor.MakeIntoUserPreference(preferenceChanger, "background", + changingBackgroundColor.MakeIntoUserPreference(preferenceChanger, "background", TrackViewer.catalog.GetString("Select background color")); backgroundWithoutTilesGroup.Tile = changingBackgroundColor; backgroundWithoutTilesGroup.ClearWindow = changingBackgroundColor; @@ -178,37 +177,37 @@ private static void SetItemColors(IPreferenceChanger preferenceChanger) ColorWithHighlights itemColor; itemColor = new ColorWithHighlights(Color.Black, 40); - itemColor.MakeIntoUserPreference(preferenceChanger, "text", + itemColor.MakeIntoUserPreference(preferenceChanger, "text", TrackViewer.catalog.GetString("Select item text color")); itemColors.Text = itemColor; itemColor = new ColorWithHighlights(Color.Blue, 120); - itemColor.MakeIntoUserPreference(preferenceChanger, "junction", + itemColor.MakeIntoUserPreference(preferenceChanger, "junction", TrackViewer.catalog.GetString("Select junction color")); itemColors.Junction = itemColor; itemColor = new ColorWithHighlights(Color.LimeGreen, 40); - itemColor.MakeIntoUserPreference(preferenceChanger, "endnode", + itemColor.MakeIntoUserPreference(preferenceChanger, "endnode", TrackViewer.catalog.GetString("Select endnode color")); itemColors.EndNode = itemColor; itemColor = new ColorWithHighlights(Color.Sienna, 40); - itemColor.MakeIntoUserPreference(preferenceChanger, "siding", + itemColor.MakeIntoUserPreference(preferenceChanger, "siding", TrackViewer.catalog.GetString("Select siding color")); itemColors.Siding = itemColor; itemColor = new ColorWithHighlights(Color.Gray, 40); - itemColor.MakeIntoUserPreference(preferenceChanger, "crossing", + itemColor.MakeIntoUserPreference(preferenceChanger, "crossing", TrackViewer.catalog.GetString("Select crossing color")); itemColors.Crossing = itemColor; itemColor = new ColorWithHighlights(Color.DarkGray, 40); - itemColor.MakeIntoUserPreference(preferenceChanger, "roadcrossing", + itemColor.MakeIntoUserPreference(preferenceChanger, "roadcrossing", TrackViewer.catalog.GetString("Select road crossing color")); itemColors.RoadCrossing = itemColor; itemColor = new ColorWithHighlights(Color.Purple, 40); - itemColor.MakeIntoUserPreference(preferenceChanger, "speedpost", + itemColor.MakeIntoUserPreference(preferenceChanger, "speedpost", TrackViewer.catalog.GetString("Select speedpost color")); itemColors.Speedpost = itemColor; @@ -314,7 +313,8 @@ public static ColorScheme ShadeColor(ColorWithHighlights referenceColor, int ind #endregion #region ColorGroup classes - class ColorsGroupBasic { + class ColorsGroupBasic + { public ColorWithHighlights Junction { get; set; } public ColorWithHighlights EndNode { get; set; } public ColorWithHighlights Crossing { get; set; } @@ -352,10 +352,10 @@ class ColorsGroupTrack /// class ColorScheme { - public ColorsGroupBasic TrackItemColors {get; set;} + public ColorsGroupBasic TrackItemColors { get; set; } public ColorsGroupBackground BackgroundColors { get; set; } public ColorsGroupTrack TrackColors { get; set; } - + public Color Junction { get { return TrackItemColors.Junction.Colors[highlightType]; } } public Color EndNode { get { return TrackItemColors.EndNode.Colors[highlightType]; } } public Color Crossing { get { return TrackItemColors.Crossing.Colors[highlightType]; } } @@ -373,12 +373,12 @@ class ColorScheme public Color TrackCurved { get { return TrackColors.TrackCurved.Colors[highlightType]; } } public Color BrokenPath { get { return TrackColors.BrokenPath.Colors[highlightType]; } } public Color BrokenNode { get { return TrackColors.BrokenNode.Colors[highlightType]; } } - + public Color ClearWindow { get { return BackgroundColors.ClearWindow.Colors[highlightType]; } } public Color Tile { get { return BackgroundColors.Tile.Colors[highlightType]; } } - public Color None { get { return Color.White; } } - + public Color None { get { return Color.White; } } + private static Dictionary nameExtensions = new Dictionary { {HighlightType.Normal, ""}, @@ -423,7 +423,7 @@ enum HighlightType Highlight, Hotlight, } - + /// /// Class to store not only a color but also its highlighted variants /// @@ -432,8 +432,8 @@ class ColorWithHighlights /// /// The current normal, highlight and hotlight colors. /// - public IDictionary Colors { get; private set; } - + public IDictionary Colors { get; private set; } + //Some things we store to be used when color is changed using preference. private byte highlightDelta; private Color defaultColor; @@ -507,7 +507,7 @@ public void ChangeColors(Color normalColor, Color highlightColor, Color hotlight Colors[HighlightType.Hotlight] = hotlightColor; } - /// + /// /// Make this color with highlights changable via some preference changing mechanism /// /// The object that can change a preference @@ -531,7 +531,7 @@ public void MakeIntoUserPreference(IPreferenceChanger preferenceChanger, string string defaultColorOption = defaultColorName + defaultOptionExtension; colorOptions.Insert(0, defaultColorOption); - var callBack = normalOnly ? new StringPreferenceDelegate(PreferenceChangedCallbackNormalOnly): new StringPreferenceDelegate(PreferenceChangedCallback); + var callBack = normalOnly ? new StringPreferenceDelegate(PreferenceChangedCallbackNormalOnly) : new StringPreferenceDelegate(PreferenceChangedCallback); preferenceChanger.AddStringPreference(name, description, colorOptions.ToArray(), defaultColorOption, callBack); } @@ -573,7 +573,7 @@ private void PreferenceChangedCallbackNormalOnly(string selectedColorName) /// /// The color for which you want the name private static string FindColorName(Color color) - { + { // foreach (KeyValuePair entry in namedColors) { @@ -647,7 +647,7 @@ static byte ReshadeSingleChannel(byte original, int index, int count) } else { - newvalue = 255 - ((255-original) * (count + index + 1) / (2 * count)); + newvalue = 255 - ((255 - original) * (count + index + 1) / (2 * count)); } return (byte)newvalue; } diff --git a/Source/Contrib/TrackViewer/Drawing/DrawLongitudeLatitude.cs b/Source/Contrib/TrackViewer/Drawing/DrawLongitudeLatitude.cs index 4ddfbcb8fc..9c66a3ce36 100644 --- a/Source/Contrib/TrackViewer/Drawing/DrawLongitudeLatitude.cs +++ b/Source/Contrib/TrackViewer/Drawing/DrawLongitudeLatitude.cs @@ -16,8 +16,8 @@ // along with Open Rails. If not, see . using System; using Microsoft.Xna.Framework; -using ORTS.Common; using Orts.Common; +using ORTS.Common; namespace ORTS.TrackViewer.Drawing { @@ -48,15 +48,15 @@ public DrawLongitudeLatitude(int xLowerLeft, int yLowerLeft) public void Draw(WorldLocation mstsLocation) { if (!Properties.Settings.Default.showLonLat) return; - + double latitude = 1f; double longitude = 1f; worldLoc.ConvertWTC(mstsLocation.TileX, mstsLocation.TileZ, mstsLocation.Location, ref latitude, ref longitude); string latitudeDegrees = MathHelper.ToDegrees((float)latitude).ToString("F5", System.Globalization.CultureInfo.CurrentCulture); string longitudeDegrees = MathHelper.ToDegrees((float)longitude).ToString("F5", System.Globalization.CultureInfo.CurrentCulture); - string locationText = String.Format(System.Globalization.CultureInfo.CurrentCulture, + string locationText = String.Format(System.Globalization.CultureInfo.CurrentCulture, "Lon = {0}; Lat = {1}", longitudeDegrees, latitudeDegrees); - BasicShapes.DrawString(lowerLeft, DrawColors.colorsNormal.Text, locationText); + BasicShapes.DrawString(lowerLeft, DrawColors.colorsNormal.Text, locationText); } } } diff --git a/Source/Contrib/TrackViewer/Drawing/DrawMultiplePaths.cs b/Source/Contrib/TrackViewer/Drawing/DrawMultiplePaths.cs index 3c02a5e466..29381c1852 100644 --- a/Source/Contrib/TrackViewer/Drawing/DrawMultiplePaths.cs +++ b/Source/Contrib/TrackViewer/Drawing/DrawMultiplePaths.cs @@ -14,11 +14,9 @@ // // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; -using System.Text; using Microsoft.Xna.Framework; using Orts.Formats.Msts; @@ -34,7 +32,7 @@ namespace ORTS.TrackViewer.Drawing /// public class DrawMultiplePaths { - + /// For each path name, store the full file name of the .pat file Dictionary fullPathNames; /// The paths that have already been loaded (.pat file has been read and parsed) @@ -43,14 +41,14 @@ public class DrawMultiplePaths Dictionary drawPaths; /// List of trainpaths that have been selected List selectedTrainpaths; - + private TrackDB trackDB; private TrackSectionsFile tsectionDat; /// /// Constructor /// - public DrawMultiplePaths (RouteData routeData, Collection paths) + public DrawMultiplePaths(RouteData routeData, Collection paths) { this.trackDB = routeData.TrackDB; this.tsectionDat = routeData.TsectionDat; @@ -138,7 +136,7 @@ void ReColorAll() drawPaths[trainpath].ColorSchemeLast = shadedColor; } } - + /// /// Draws the paths that have been selected /// diff --git a/Source/Contrib/TrackViewer/Drawing/DrawScaleRuler.cs b/Source/Contrib/TrackViewer/Drawing/DrawScaleRuler.cs index b26e7b2fef..74dbb78cab 100644 --- a/Source/Contrib/TrackViewer/Drawing/DrawScaleRuler.cs +++ b/Source/Contrib/TrackViewer/Drawing/DrawScaleRuler.cs @@ -17,9 +17,7 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; namespace ORTS.TrackViewer.Drawing { @@ -62,7 +60,7 @@ public DrawScaleRuler() // here we define, a bit manually, which scales are supported. rulerDataMeters.Add(new RulerDatum(5, 100000, " 100km")); rulerDataMeters.Add(new RulerDatum(5, 50000, " 50km")); - rulerDataMeters.Add(new RulerDatum(4, 20000, " 20km")); + rulerDataMeters.Add(new RulerDatum(4, 20000, " 20km")); rulerDataMeters.Add(new RulerDatum(5, 10000, " 10km")); rulerDataMeters.Add(new RulerDatum(5, 5000, " 5km")); rulerDataMeters.Add(new RulerDatum(4, 2000, " 2km")); @@ -93,7 +91,7 @@ public DrawScaleRuler() rulerDataMiles.Add(new RulerDatum(5, 4.57f, " 5yd")); rulerDataMiles.Add(new RulerDatum(4, 1.82f, " 2yd")); rulerDataMiles.Add(new RulerDatum(5, 0.91f, " 1yd")); - + } /// @@ -105,7 +103,7 @@ public DrawScaleRuler() public void SetLocationAndSize(int xLowerLeft, int yLowerLeft, int fontHeight) { lowerLeftPoint = new Vector2(xLowerLeft, yLowerLeft); - halfFontHeight = (int)(fontHeight/2); + halfFontHeight = (int)(fontHeight / 2); maxPixelWidth = 11 * fontHeight; } @@ -120,20 +118,21 @@ public void SetCurrentRuler(double pixelsPerMeter) List rulerData = (Properties.Settings.Default.useMilesNotMeters) ? rulerDataMiles : rulerDataMeters; - + // to make sure we have something for all zoom levels currentRuler = rulerData.Last(); - + foreach (RulerDatum rulerDatum in rulerData) { - int pixelWidth = (int) Math.Round(pixelsPerMeter * rulerDatum.value); - if ( pixelWidth < maxPixelWidth ) { + int pixelWidth = (int)Math.Round(pixelsPerMeter * rulerDatum.value); + if (pixelWidth < maxPixelWidth) + { currentRuler = rulerDatum; break; } } - fullPixelWidth = (int) Math.Round(pixelsPerMeter * currentRuler.value); + fullPixelWidth = (int)Math.Round(pixelsPerMeter * currentRuler.value); } /// @@ -151,7 +150,7 @@ public void Draw() Vector2 lowerRightPoint = new Vector2(lowerLeftPoint.X + fullPixelWidth, lowerLeftPoint.Y); Vector2 bigMarker = new Vector2(0, -halfFontHeight); - Vector2 smallMarker = new Vector2(0, -(int)(halfFontHeight/2)); + Vector2 smallMarker = new Vector2(0, -(int)(halfFontHeight / 2)); Color color = DrawColors.colorsNormal.Text; BasicShapes.DrawLine(1, color, lowerLeftPoint, lowerRightPoint); diff --git a/Source/Contrib/TrackViewer/Drawing/DrawTerrain.cs b/Source/Contrib/TrackViewer/Drawing/DrawTerrain.cs index 78b828b2de..fe79d008e3 100644 --- a/Source/Contrib/TrackViewer/Drawing/DrawTerrain.cs +++ b/Source/Contrib/TrackViewer/Drawing/DrawTerrain.cs @@ -51,13 +51,11 @@ // * the zoom size (1, 2, 8, 16) using System; -using System.IO; using System.Collections.Generic; +using System.IO; using System.Linq; -using System.Text; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; - using Orts.Formats.Msts; using Orts.Viewer3D; using ORTS.Common; diff --git a/Source/Contrib/TrackViewer/Drawing/DrawTrackDB.cs b/Source/Contrib/TrackViewer/Drawing/DrawTrackDB.cs index 304afa9f47..f252ccfe12 100644 --- a/Source/Contrib/TrackViewer/Drawing/DrawTrackDB.cs +++ b/Source/Contrib/TrackViewer/Drawing/DrawTrackDB.cs @@ -16,16 +16,13 @@ // along with Open Rails. If not, see . using System; using System.Collections.Generic; -using System.Linq; -using System.Text; +using System.Diagnostics; using System.IO; +using System.Linq; using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; - using Orts.Formats.Msts; using Orts.Parsers.Msts; using ORTS.Common; -using System.Diagnostics; namespace ORTS.TrackViewer.Drawing { @@ -87,7 +84,7 @@ public RouteData(string routePath, MessageDelegate messageDelegate) } catch { - } + } string ORfilepath = System.IO.Path.Combine(routePath, "OpenRails"); if (File.Exists(ORfilepath + @"\sigcfg.dat")) @@ -226,7 +223,7 @@ public class DrawTrackDB #region private members - /// Track Section Data + /// Track Section Data private TrackSectionsFile tsectionDat; /// Track database private TrackDB trackDB; @@ -318,7 +315,7 @@ void FindSignalDetails() foreach (TrackNode tn in trackDB.TrackNodes) { if (tn == null) continue; - TrVectorNode tvn= tn.TrVectorNode; + TrVectorNode tvn = tn.TrVectorNode; if (tvn == null) continue; if (tvn.TrItemRefs == null) continue; @@ -399,7 +396,7 @@ void FindSidingsAndPlatforms() { PlatformLocations[platform.ItemName] = new WorldLocation(trackItem.TileX, trackItem.TileZ, trackItem.X, trackItem.Y, trackItem.Z); StationLocations[platform.Station] = PlatformLocations[platform.ItemName]; - } + } } } #endregion @@ -415,10 +412,10 @@ void PrepareDrawing(DrawArea drawArea) // determine the min and max values of the tiles that we actually need to draw // in some cases (e.g. during initialization) the drawing area itself is really outside the track database, // so we have to account for that. - int actualTileXLeft = Math.Max(Math.Min(drawArea.LocationUpperLeft.TileX , MaxTileX), MinTileX); + int actualTileXLeft = Math.Max(Math.Min(drawArea.LocationUpperLeft.TileX, MaxTileX), MinTileX); int actualTileXRight = Math.Min(Math.Max(drawArea.LocationLowerRight.TileX, MinTileX), MaxTileX); - int actualTileZBot = Math.Max(Math.Min(drawArea.LocationLowerRight.TileZ, MaxTileZ), MinTileZ); - int actualTileZTop = Math.Min(Math.Max(drawArea.LocationUpperLeft.TileZ , MinTileZ), MaxTileZ); + int actualTileZBot = Math.Max(Math.Min(drawArea.LocationLowerRight.TileZ, MaxTileZ), MinTileZ); + int actualTileZTop = Math.Min(Math.Max(drawArea.LocationUpperLeft.TileZ, MinTileZ), MaxTileZ); SetTileIndexes(actualTileXLeft, actualTileXRight, actualTileZBot, actualTileZTop); } @@ -452,9 +449,9 @@ void FillAvailableIndexes() SetTileIndexes(MinTileX, MaxTileX, MinTileZ, MaxTileZ); availableRailVectorNodeIndexes = new List[tileXIndexStop + 1][]; availableRoadVectorNodeIndexes = new List[tileXIndexStop + 1][]; - availablePointNodeIndexes = new List[tileXIndexStop + 1][]; - availableRailItemIndexes = new List [tileXIndexStop + 1][]; - availableRoadItemIndexes = new List [tileXIndexStop + 1][]; + availablePointNodeIndexes = new List[tileXIndexStop + 1][]; + availableRailItemIndexes = new List[tileXIndexStop + 1][]; + availableRoadItemIndexes = new List[tileXIndexStop + 1][]; InitIndexedLists(availableRailVectorNodeIndexes); InitIndexedLists(availableRoadVectorNodeIndexes); InitIndexedLists(availablePointNodeIndexes); @@ -478,7 +475,8 @@ void FillAvailableIndexes() TrVectorSection tvs = tn.TrVectorNode.TrVectorSections[tvsi]; if (tvs == null) continue; List locationList = FindLocationList(tni, tvsi, true); - foreach (WorldLocation location in locationList) { + foreach (WorldLocation location in locationList) + { AddLocationToAvailableList(location, availableRailVectorNodeIndexes, tn); } } @@ -533,7 +531,7 @@ void FillAvailableIndexes() AddLocationToAvailableList(drawableTrackItem.WorldLocation, availableRoadItemIndexes, drawableTrackItem); } } - + // remove double entries MakeUniqueLists(availableRailVectorNodeIndexes); MakeUniqueLists(availableRoadVectorNodeIndexes); @@ -589,7 +587,7 @@ void MakeUniqueLists(List[][] arrayOfLists) { arrayOfLists[xindex][zindex] = arrayOfLists[xindex][zindex].Distinct().ToList(); } - } + } } /// @@ -606,7 +604,7 @@ List FindLocationList(uint trackNodeIndex, int trackVectorSection TrackNode tn = useRailTracks ? trackDB.TrackNodes[trackNodeIndex] : roadTrackDB.TrackNodes[trackNodeIndex]; if (tn == null) return resultList; - + TrVectorSection tvs = tn.TrVectorNode.TrVectorSections[trackVectorSectionIndex]; if (tvs == null) return resultList; @@ -614,7 +612,7 @@ List FindLocationList(uint trackNodeIndex, int trackVectorSection if (trackSection == null) return resultList; float trackSectionLength = DrawTrackDB.GetLength(trackSection); - + // We want to make sure all tiles that a track crosses are noted. // To do this, we make a box around the track (straight or curved), and for all locations of that box // we calculate the min and max values of the tileX and tileZ. We then return a list of 4 worldlocations @@ -622,7 +620,7 @@ List FindLocationList(uint trackNodeIndex, int trackVectorSection // The assumption here is that no single track section crosses a while tile of 2014 meters List boxList = new List(); WorldLocation beginLocation = FindLocationInSection(tvs, trackSection, 0); - WorldLocation endLocation = FindLocationInSection(tvs, trackSection, trackSectionLength); + WorldLocation endLocation = FindLocationInSection(tvs, trackSection, trackSectionLength); boxList.Add(beginLocation); boxList.Add(endLocation); if (trackSection.SectionCurve != null) @@ -630,12 +628,12 @@ List FindLocationList(uint trackNodeIndex, int trackVectorSection // For curved, here, the box has a width. It will be a rectangle containing begin and end node on one side. // On the other side it will touch the middle point of the curve/arc. // The box will then contain the full curve as long as the curve is not more than 180 degrees - WorldLocation midLocation = FindLocationInSection(tvs, trackSection, trackSectionLength/2); + WorldLocation midLocation = FindLocationInSection(tvs, trackSection, trackSectionLength / 2); // (deltaX, deltaZ) is a vector from begin to end. double deltaX = (endLocation.Location.X - endLocation.Location.X); double deltaZ = (endLocation.Location.Z - endLocation.Location.Z); - deltaX += WorldLocation.TileSize * (endLocation.TileX - endLocation.TileX); + deltaX += WorldLocation.TileSize * (endLocation.TileX - endLocation.TileX); deltaZ += WorldLocation.TileSize * (endLocation.TileZ - endLocation.TileZ); WorldLocation begin2Location = new WorldLocation(midLocation); @@ -878,7 +876,7 @@ public void DrawJunctionAndEndNodes(DrawArea drawArea) } } } - + /// /// Draw a specific junction node. /// @@ -912,7 +910,7 @@ private void DrawEndNode(DrawArea drawArea, TrackNode tn, ColorScheme colors) /// Area to draw the items on public void DrawTrackItems(DrawArea drawArea) { - + for (int xindex = tileXIndexStart; xindex <= tileXIndexStop; xindex++) { for (int zindex = tileZIndexStart; zindex <= tileZIndexStop; zindex++) @@ -926,7 +924,7 @@ public void DrawTrackItems(DrawArea drawArea) } } } - } + } /// /// Draw the various road track items, mainly car spawners but also level crossings (again). @@ -937,7 +935,7 @@ public void DrawRoadTrackItems(DrawArea drawArea) ClosestTrackItem.Reset(); // dirtily assumes this is called before normal track items // we only want the carspawners here if (!Properties.Settings.Default.showCarSpawners && !Properties.Settings.Default.showRoadCrossings) return; - + for (int xindex = tileXIndexStart; xindex <= tileXIndexStop; xindex++) { for (int zindex = tileZIndexStart; zindex <= tileZIndexStop; zindex++) @@ -967,13 +965,13 @@ public WorldLocation TrackNodeHighlightOverride(int tni) if (tn == null) return WorldLocation.None; IsHighlightOverridden = true; - if (tn.TrJunctionNode != null ) + if (tn.TrJunctionNode != null) { searchJunctionOrEnd = new CloseToMouseJunctionOrEnd(tn, "junction"); return UidLocation(tn.UiD); } - if (tn.TrEndNode ) + if (tn.TrEndNode) { searchJunctionOrEnd = new CloseToMouseJunctionOrEnd(tn, "endnode"); return UidLocation(tn.UiD); @@ -1001,7 +999,7 @@ public WorldLocation TrackNodeHighlightOverrideRoad(int tni) if (tn == null) return WorldLocation.None; IsHighlightOverridden = true; - + if (tn.TrEndNode) { searchJunctionOrEnd = new CloseToMouseJunctionOrEnd(tn, "endnode"); @@ -1014,7 +1012,7 @@ public WorldLocation TrackNodeHighlightOverrideRoad(int tni) TrackNode nodeAhead = roadTrackDB.TrackNodes[tn.TrPins[1].Link]; return TrackLocation(tn, nodeBehind, nodeAhead); } - + /// /// Find the item with the given index. And if it exists, prepare for highlighting it /// @@ -1218,9 +1216,9 @@ public WorldLocation FindLocation(uint trackNodeIndex, int trackVectorSectionInd { try { - TrackNode tn = useRailTracks ? - trackDB.TrackNodes[trackNodeIndex]: roadTrackDB.TrackNodes[trackNodeIndex]; - + TrackNode tn = useRailTracks ? + trackDB.TrackNodes[trackNodeIndex] : roadTrackDB.TrackNodes[trackNodeIndex]; + TrVectorSection tvs = tn.TrVectorNode.TrVectorSections[trackVectorSectionIndex]; TrackSection trackSection = tsectionDat.TrackSections.Get(tvs.SectionIndex); diff --git a/Source/Contrib/TrackViewer/Drawing/DrawWorldTiles.cs b/Source/Contrib/TrackViewer/Drawing/DrawWorldTiles.cs index f68d7d2828..53ca481e8a 100644 --- a/Source/Contrib/TrackViewer/Drawing/DrawWorldTiles.cs +++ b/Source/Contrib/TrackViewer/Drawing/DrawWorldTiles.cs @@ -16,10 +16,8 @@ // along with Open Rails. If not, see . using System; using System.Collections.Generic; -using System.Linq; -using System.Text; using System.IO; - +using System.Linq; using ORTS.Common; namespace ORTS.TrackViewer.Drawing @@ -40,7 +38,7 @@ public class DrawWorldTiles // for each index=TileX, a list containing start and stop tileZ's // in many cases each list will contain only two elements. But in the case of holes, it might be more. private Dictionary> worldTileRanges; - + /// /// Default constructor /// @@ -53,7 +51,7 @@ public DrawWorldTiles() /// From the names of these file we determine the tile location, and store these locations for later drawing /// /// - public void SetRoute(string routePath) + public void SetRoute(string routePath) { worldTileRanges = new Dictionary>(); Dictionary> worldTiles = new Dictionary>(); @@ -80,7 +78,7 @@ public void SetRoute(string routePath) //now make ranges out of it. For each available TileX a range is given by a minimum and maximum value of //TileZ such that all tiles from the minimum till/including the maximum are available //multiple ranges can occur for a single tileX. - + foreach (int TileX in worldTiles.Keys) { worldTileRanges[TileX] = new List(); @@ -112,7 +110,7 @@ public void Draw(DrawArea drawArea) for (int i = 0; i < worldTileRanges[TileX].Count; i += 2) { int TileZstart = worldTileRanges[TileX][i]; - int TileZstop = worldTileRanges[TileX][i+1]; + int TileZstop = worldTileRanges[TileX][i + 1]; WorldLocation bot = new WorldLocation(TileX, TileZstart, 0, 0, -1024); WorldLocation top = new WorldLocation(TileX, TileZstop, 0, 0, 1024); drawArea.DrawLineAlways(2048, DrawColors.colorsNormal.Tile, bot, top); diff --git a/Source/Contrib/TrackViewer/Drawing/DrawableTrackItem.cs b/Source/Contrib/TrackViewer/Drawing/DrawableTrackItem.cs index ca8a4ae63f..6090a9d244 100644 --- a/Source/Contrib/TrackViewer/Drawing/DrawableTrackItem.cs +++ b/Source/Contrib/TrackViewer/Drawing/DrawableTrackItem.cs @@ -16,13 +16,9 @@ // along with Open Rails. If not, see . using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; using Orts.Formats.Msts; -using ORTS.Common; -using ORTS.TrackViewer.Properties; using Orts.Simulation; +using ORTS.Common; namespace ORTS.TrackViewer.Drawing { @@ -59,17 +55,17 @@ protected DrawableTrackItem(TrItem originalTrItem) /// A drawable trackitem, with proper subclass public static DrawableTrackItem CreateDrawableTrItem(TrItem originalTrItem) { - if (originalTrItem is SignalItem) { return new DrawableSignalItem(originalTrItem); } - if (originalTrItem is PlatformItem) { return new DrawablePlatformItem(originalTrItem); } - if (originalTrItem is SidingItem) { return new DrawableSidingItem(originalTrItem); } - if (originalTrItem is SpeedPostItem) { return new DrawableSpeedPostItem(originalTrItem); } - if (originalTrItem is HazzardItem) { return new DrawableHazardItem(originalTrItem); } - if (originalTrItem is PickupItem) { return new DrawablePickupItem(originalTrItem); } - if (originalTrItem is LevelCrItem) { return new DrawableLevelCrItem(originalTrItem); } - if (originalTrItem is SoundRegionItem){ return new DrawableSoundRegionItem(originalTrItem); } - if (originalTrItem is RoadLevelCrItem){ return new DrawableRoadLevelCrItem(originalTrItem); } + if (originalTrItem is SignalItem) { return new DrawableSignalItem(originalTrItem); } + if (originalTrItem is PlatformItem) { return new DrawablePlatformItem(originalTrItem); } + if (originalTrItem is SidingItem) { return new DrawableSidingItem(originalTrItem); } + if (originalTrItem is SpeedPostItem) { return new DrawableSpeedPostItem(originalTrItem); } + if (originalTrItem is HazzardItem) { return new DrawableHazardItem(originalTrItem); } + if (originalTrItem is PickupItem) { return new DrawablePickupItem(originalTrItem); } + if (originalTrItem is LevelCrItem) { return new DrawableLevelCrItem(originalTrItem); } + if (originalTrItem is SoundRegionItem) { return new DrawableSoundRegionItem(originalTrItem); } + if (originalTrItem is RoadLevelCrItem) { return new DrawableRoadLevelCrItem(originalTrItem); } if (originalTrItem is CarSpawnerItem) { return new DrawableCarSpawnerItem(originalTrItem); } - if (originalTrItem is CrossoverItem) { return new DrawableCrossoverItem(originalTrItem); } + if (originalTrItem is CrossoverItem) { return new DrawableCrossoverItem(originalTrItem); } return new DrawableEmptyItem(originalTrItem); } @@ -134,9 +130,9 @@ public void FindAngle(TrackSectionsFile tsectionDat, TrackDB trackDB, TrackNode this.angle = signalTraveller.RotY; // Shift signal a little bit to be able to distinguish backfacing from normal facing - Microsoft.Xna.Framework.Vector3 shiftedLocation = this.WorldLocation.Location + - 0.0001f * new Microsoft.Xna.Framework.Vector3((float) Math.Cos(this.angle), 0f, -(float) Math.Sin(this.angle)); - this.WorldLocation = new WorldLocation(this.WorldLocation.TileX, this.WorldLocation.TileZ, shiftedLocation ); + Microsoft.Xna.Framework.Vector3 shiftedLocation = this.WorldLocation.Location + + 0.0001f * new Microsoft.Xna.Framework.Vector3((float)Math.Cos(this.angle), 0f, -(float)Math.Sin(this.angle)); + this.WorldLocation = new WorldLocation(this.WorldLocation.TileX, this.WorldLocation.TileZ, shiftedLocation); } catch { } } @@ -166,7 +162,7 @@ public void DetermineIfNormal(SignalConfigurationFile sigcfgFile) /// Do we need to draw anyway, independent of settings? internal override bool Draw(DrawArea drawArea, ColorScheme colors, bool drawAlways) { - if ( drawAlways + if (drawAlways || Properties.Settings.Default.showAllSignals || (Properties.Settings.Default.showSignals && isNormal) ) @@ -337,13 +333,13 @@ internal override bool Draw(DrawArea drawArea, ColorScheme colors, bool drawAlwa drawArea.DrawExpandingString(this.WorldLocation, this.itemName); returnValue = true; } - if (Properties.Settings.Default.showStationNames || - (drawAlways && !Properties.Settings.Default.showPlatformNames) ) + if (Properties.Settings.Default.showStationNames || + (drawAlways && !Properties.Settings.Default.showPlatformNames)) { // if drawAlways and no station nor platform name requested, then also show station drawArea.DrawExpandingString(this.WorldLocation, this.stationName); returnValue = true; } - + return returnValue; } } diff --git a/Source/Contrib/TrackViewer/Drawing/Labels/DrawLabels.cs b/Source/Contrib/TrackViewer/Drawing/Labels/DrawLabels.cs index 4e421ca43e..4d15a2b125 100644 --- a/Source/Contrib/TrackViewer/Drawing/Labels/DrawLabels.cs +++ b/Source/Contrib/TrackViewer/Drawing/Labels/DrawLabels.cs @@ -14,15 +14,11 @@ // // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; using System.IO; +using System.Linq; using System.Windows; using System.Windows.Controls; using Newtonsoft.Json; - using ORTS.Common; namespace ORTS.TrackViewer.Drawing.Labels @@ -88,7 +84,7 @@ public void Draw(DrawArea drawArea) DrawLabel(label); } float distanceSquared = WorldLocation.GetDistanceSquared2D(label.WorldLocation, drawArea.MouseLocation); - if (distanceSquared < closestDistanceSquared ) + if (distanceSquared < closestDistanceSquared) { closestDistanceSquared = distanceSquared; closestToMouseLabel = label; @@ -107,7 +103,7 @@ public void Draw(DrawArea drawArea) /// The lable to draw private void DrawLabel(StorableLabel label) { - drawArea.DrawExpandingString(label.WorldLocation, label.LabelText, 0, -fontHeight/2); + drawArea.DrawExpandingString(label.WorldLocation, label.LabelText, 0, -fontHeight / 2); } #endregion @@ -120,7 +116,7 @@ private void DrawLabel(StorableLabel label) /// Current Y-location of the mouse to determine popu location internal void AddLabel(int mouseX, int mouseY) { - var labelInputPopup = new EditLabel(" /// Either the filename or empty when cancelled by the user - private string GetSaveFileName() { + private string GetSaveFileName() + { var dialog = new Microsoft.Win32.SaveFileDialog { OverwritePrompt = true, @@ -240,7 +237,8 @@ internal void LoadLabels() /// Ask the user for a filename to be used for loading /// /// Either the filename or empty when cancelled by the user - private string GetLoadFileName() { + private string GetLoadFileName() + { var dialog = new Microsoft.Win32.OpenFileDialog { FileName = "labels.json", @@ -266,7 +264,7 @@ private void LoadJson(string fileName) MessageBox.Show(TrackViewer.catalog.GetString("The .json file could not be read properly.")); return; } - + bool itemsWereRemoved = labelsNew.Sanitize(); int itemsLeft = labelsNew.Labels.Count(); string message = string.Empty; @@ -320,8 +318,8 @@ internal void OnLeftMouseMoved() //The new location is then 'original' + 'current' - 'start'. draggingStartLocation.NormalizeTo(drawArea.MouseLocation.TileX, drawArea.MouseLocation.TileZ); WorldLocation shiftedLocation = new WorldLocation( - draggingLabelToReplace.WorldLocation.TileX + drawArea.MouseLocation.TileX - draggingStartLocation.TileX, - draggingLabelToReplace.WorldLocation.TileZ + drawArea.MouseLocation.TileZ - draggingStartLocation.TileZ, + draggingLabelToReplace.WorldLocation.TileX + drawArea.MouseLocation.TileX - draggingStartLocation.TileX, + draggingLabelToReplace.WorldLocation.TileZ + drawArea.MouseLocation.TileZ - draggingStartLocation.TileZ, draggingLabelToReplace.WorldLocation.Location.X + drawArea.MouseLocation.Location.X - draggingStartLocation.Location.X, 0, draggingLabelToReplace.WorldLocation.Location.Z + drawArea.MouseLocation.Location.Z - draggingStartLocation.Location.Z diff --git a/Source/Contrib/TrackViewer/Drawing/Labels/EditLabel.xaml.cs b/Source/Contrib/TrackViewer/Drawing/Labels/EditLabel.xaml.cs index 7ddf53bcc2..1e0722ca2c 100644 --- a/Source/Contrib/TrackViewer/Drawing/Labels/EditLabel.xaml.cs +++ b/Source/Contrib/TrackViewer/Drawing/Labels/EditLabel.xaml.cs @@ -15,9 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Windows; using System.Windows.Input; @@ -70,7 +67,7 @@ private void ButtonCancel_Click(object sender, RoutedEventArgs e) { this.Close(); } - + /// /// Delete the label /// @@ -81,7 +78,7 @@ private void ButtonDelete_Click(object sender, RoutedEventArgs e) this.Close(); callback(null); } - + /// /// Handle an enter/return press on the textbox. If return is pressed, just do the same as the save button. /// diff --git a/Source/Contrib/TrackViewer/Drawing/Labels/StorableLabels.cs b/Source/Contrib/TrackViewer/Drawing/Labels/StorableLabels.cs index ba2e75828c..4bebf8a6c2 100644 --- a/Source/Contrib/TrackViewer/Drawing/Labels/StorableLabels.cs +++ b/Source/Contrib/TrackViewer/Drawing/Labels/StorableLabels.cs @@ -16,8 +16,6 @@ // along with Open Rails. If not, see . using System; using System.Collections.Generic; -using System.Linq; -using System.Text; using Newtonsoft.Json; using ORTS.Common; @@ -63,7 +61,8 @@ public void Add(WorldLocation location, string text) internal void Replace(StorableLabel oldLabel, StorableLabel newLabel) { int index = _labels.IndexOf(oldLabel); - if (index != -1) { + if (index != -1) + { _labels[index] = newLabel; } } @@ -111,7 +110,7 @@ public struct StorableLabel /// /// The location in MSTS coordinates of the label /// The text of the label - public StorableLabel(WorldLocation location, string text ) + public StorableLabel(WorldLocation location, string text) { LabelText = text; WorldLocation = location; diff --git a/Source/Contrib/TrackViewer/Drawing/ShadowDrawArea.cs b/Source/Contrib/TrackViewer/Drawing/ShadowDrawArea.cs index 92b6acb883..07a9dcf417 100644 --- a/Source/Contrib/TrackViewer/Drawing/ShadowDrawArea.cs +++ b/Source/Contrib/TrackViewer/Drawing/ShadowDrawArea.cs @@ -16,10 +16,6 @@ // along with Open Rails. If not, see . using System; -using System.Diagnostics; -using System.Collections.Generic; -using System.Linq; -using System.Text; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -68,7 +64,7 @@ namespace ORTS.TrackViewer.Drawing /// Also in the Game.Draw, but before spriteBatch.begin: yourShadowDrawArea.DrawShadowTextures(DrawSomething, background color); /// /// - public class ShadowDrawArea: DrawArea, IDisposable + public class ShadowDrawArea : DrawArea, IDisposable { #region private Fields int blockW; // Width of single block in pixels @@ -80,7 +76,7 @@ public class ShadowDrawArea: DrawArea, IDisposable double shadowOffsetZ; // lower-left location (in real world coordinates) of the combined texture // fields related to when and what we are re-drawing - bool needToRedraw = true; + bool needToRedraw = true; bool needToRedrawLater = true; bool[] needToDrawRectangle; // Array of booleans describing which of the rectangles still need to be redrawn int nextRectangleToDraw; // integer from 0 to Nblocks-1, describing which of the subblocks will be drawn @@ -113,8 +109,8 @@ public class ShadowDrawArea: DrawArea, IDisposable /// /// Constructor. Just calling the base constructor /// - public ShadowDrawArea(DrawScaleRuler drawScaleRuler) - :base(drawScaleRuler) + public ShadowDrawArea(DrawScaleRuler drawScaleRuler) + : base(drawScaleRuler) { shadowDrawArea = new ShadowDrawArea(); } @@ -125,7 +121,7 @@ public ShadowDrawArea(DrawScaleRuler drawScaleRuler) /// Therefore, it is a shadowDrawArea, but we will not use any of its additional functionality. /// Hence also private /// - ShadowDrawArea(): base(null){} + ShadowDrawArea() : base(null) { } /// /// Sets the screen size on which we can draw (in pixels). @@ -174,7 +170,7 @@ public override void SetScreenSize(int areaOffsetX, int areaOffsetY, int areaWid private void SetRendertargetSizes() { if (graphicsDevice == null) { return; } - + blockW = (AreaW * Nsampling + Ninner - 1) / Ninner; // in case areaW*Nsampling is not a multiple of Ninner this blockH = (AreaH * Nsampling + Ninner - 1) / Ninner; // makes sure block size at least covers all of area, to prevent constant redrawing @@ -202,7 +198,7 @@ private void SetRendertargetSizes() shadowMapsSingle[i].Dispose(); } shadowRenderTargetSingle[i] = new RenderTarget2D(graphicsDevice, 1 * blockW, 1 * blockH, false, SurfaceFormat.Color, - DepthFormat.Depth16, 0, RenderTargetUsage.PreserveContents); + DepthFormat.Depth16, 0, RenderTargetUsage.PreserveContents); shadowMapsSingle[i] = new Texture2D(graphicsDevice, 1, 1); } } @@ -227,7 +223,7 @@ void FillXYorder() orderIndex++; } - for (int iRing = Nrings-1; iRing >= 0; iRing--) // work from the inside out. + for (int iRing = Nrings - 1; iRing >= 0; iRing--) // work from the inside out. { int Nside = Nouter - 1 - 2 * iRing; // The amount of blocks - 1 in a side, for the given ring. Alwasy Nouter - 1 for last ring! //left side @@ -343,19 +339,19 @@ private void DetermineRedrawingNeeds() double ShiftLimitInBlocks = (Nborder > 1) ? Nborder - 1 : 0.5; double shiftLimitX = ShiftLimitInBlocks * blockW / shadowScale; double shiftLimitZ = ShiftLimitInBlocks * blockH / shadowScale; - if (OffsetX < shadowOffsetX + shiftLimitX) { ShiftBlocks(ShiftDirection.Right); } - if (OffsetZ < shadowOffsetZ + shiftLimitZ) { ShiftBlocks(ShiftDirection.Up); } + if (OffsetX < shadowOffsetX + shiftLimitX) { ShiftBlocks(ShiftDirection.Right); } + if (OffsetZ < shadowOffsetZ + shiftLimitZ) { ShiftBlocks(ShiftDirection.Up); } if (OffsetX + insetRealW > shadowOffsetX + shadowRealW - shiftLimitX) { ShiftBlocks(ShiftDirection.Left); } if (OffsetZ + insetRealH > shadowOffsetZ + shadowRealH - shiftLimitZ) { ShiftBlocks(ShiftDirection.Down); } - - //double ringW = Nborder * blockW / shadowScale; - //double ringH = Nborder * blockH / shadowScale; - ////we will redraw later in case we are close, we do not want to do this too much though - //if (offsetX < shadowOffsetX + 0.2 * ringW) { needToRedrawLater = true; } - //if (offsetZ < shadowOffsetZ + 0.2 * ringH) { needToRedrawLater = true; } - //if (offsetX + insetRealW > shadowOffsetX + shadowRealW - 0.2 * ringW) { needToRedrawLater = true; } - //if (offsetZ + insetRealH > shadowOffsetZ + shadowRealH - 0.2 * ringW) { needToRedrawLater = true; } - + + //double ringW = Nborder * blockW / shadowScale; + //double ringH = Nborder * blockH / shadowScale; + ////we will redraw later in case we are close, we do not want to do this too much though + //if (offsetX < shadowOffsetX + 0.2 * ringW) { needToRedrawLater = true; } + //if (offsetZ < shadowOffsetZ + 0.2 * ringH) { needToRedrawLater = true; } + //if (offsetX + insetRealW > shadowOffsetX + shadowRealW - 0.2 * ringW) { needToRedrawLater = true; } + //if (offsetZ + insetRealH > shadowOffsetZ + shadowRealH - 0.2 * ringW) { needToRedrawLater = true; } + } /// @@ -377,20 +373,22 @@ private void AddAllToRedrawList() private void SetNextRectangleToDraw(bool recheck) { if (recheck) { nextRectangleToDraw = -1; } - do { - nextRectangleToDraw ++; + do + { + nextRectangleToDraw++; } while (nextRectangleToDraw < Nsubblocks && !needToDrawRectangle[nextRectangleToDraw]); } - enum ShiftDirection {Left, Right, Up, Down}; + enum ShiftDirection { Left, Right, Up, Down }; /// /// Instead of redrawing a lot of subblocks, we will just move most of the blocks by one block to any direction /// and only mark a single column or row for redrawing. /// /// The direction to shift - private void ShiftBlocks(ShiftDirection direction) { - + private void ShiftBlocks(ShiftDirection direction) + { + switch (direction) { case ShiftDirection.Right: @@ -429,7 +427,7 @@ enum ShiftDirection {Left, Right, Up, Down}; /// The real world location is so far left, that we can discard the right-most column of blocks and add a new column on the left /// private void ShiftSubBlocksRight() - { + { for (int row = 0; row < Nouter; row++) { RenderTarget2D tempTarget = shadowRenderTargetSingle[orderFromLocation[Nouter - 1][row]]; @@ -441,7 +439,7 @@ private void ShiftSubBlocksRight() shadowRenderTargetSingle[orderFromLocation[0][row]] = tempTarget; needToDrawRectangle[orderFromLocation[0][row]] = true; } - } + } /// /// The real world location is so far right, that we can discard the right-most column of blocks and add a new column on the right @@ -546,10 +544,11 @@ private void RenderASingleBlockTexture(Color backgroundColor, DrawingDelegate dr needToDrawRectangle[nextRectangleToDraw] = false; } - catch { + catch + { graphicsDevice.SetRenderTarget(null); // return control to main render target } - graphicsDevice.SetRenderTarget(null); + graphicsDevice.SetRenderTarget(null); } /// @@ -569,13 +568,14 @@ private void RenderCombinedTexture(Color backgroundColor) for (int i = 0; i < Nsubblocks; i++) { Vector2 position = new Vector2(xOrder[i] * blockW, (Nouter - 1 - zOrder[i]) * blockH); - spriteBatch.Draw(shadowMapsSingle[i], position, null, Color.White, 0, Vector2.Zero, Vector2.One, SpriteEffects.None, 0); + spriteBatch.Draw(shadowMapsSingle[i], position, null, Color.White, 0, Vector2.Zero, Vector2.One, SpriteEffects.None, 0); } spriteBatch.End(); graphicsDevice.SetRenderTarget(null); shadowMapCombined = shadowRenderTargetCombined; } - catch { + catch + { graphicsDevice.SetRenderTarget(null); // return control to main render target } } @@ -607,12 +607,12 @@ public void DrawShadowedTextures() float scaleRatio = (float)(Scale / shadowScale); Vector2 scaleAsVector = new Vector2(scaleRatio); Microsoft.Xna.Framework.Rectangle? sourceRectangle = new Microsoft.Xna.Framework.Rectangle( - Convert.ToInt32( shadowScale * ( OffsetX - shadowOffsetX)), + Convert.ToInt32(shadowScale * (OffsetX - shadowOffsetX)), Convert.ToInt32(blockH * Nouter - shadowScale * (AreaH / Scale + OffsetZ - shadowOffsetZ)), Convert.ToInt32(AreaW * shadowScale / Scale), Convert.ToInt32(AreaH * shadowScale / Scale)); - + Vector2 position = new Vector2(AreaOffsetX, AreaOffsetY); Vector2 origin = Vector2.Zero; diff --git a/Source/Contrib/TrackViewer/Editing/AutoConnectTools.cs b/Source/Contrib/TrackViewer/Editing/AutoConnectTools.cs index 8bb059923f..ab087d6224 100644 --- a/Source/Contrib/TrackViewer/Editing/AutoConnectTools.cs +++ b/Source/Contrib/TrackViewer/Editing/AutoConnectTools.cs @@ -18,11 +18,10 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; -using System.Text; namespace ORTS.TrackViewer.Editing { - + /// /// Class to define common methods related to autoconnecting a path. Autoconnecting means really searching /// for a possible connection between two nodes, and creating the path if the user wants to. @@ -77,7 +76,7 @@ public void AddDisallowedJunction(int junctionIndex) { DisAllowedJunctionIndexes.Add(junctionIndex); } - + /// /// Try to find a connection between two given nodes. Depth-first search via main track at junctions. /// Also reversing the start or reconnectNode is tried, in case one of these nodes has a non-defined orientation @@ -106,7 +105,7 @@ public bool FindConnection(TrainpathNode fromNode, TrainpathNode toNode, int? fi // We try to find a connection between two non-broken nodes. // We store the connection as a stack of linking tvns (track-node-vector-indexes) // The connection will only contain junctions (apart from maybe start and end=reconnect nodes) - + autoConnectFromNode = new ConnectableNode(fromNode, true, true); autoConnectToNodeOptions = new ReconnectNodeOptions(true); autoConnectToNodeOptions.AddNode(toNode, false); // only one option here @@ -203,9 +202,9 @@ public void CreateFoundConnection(ModificationTools modificationTools, bool isMa autoConnectFromNode = swap; } - + TrainpathNode currentNode = autoConnectFromNode.OriginalNode; - + if ((currentNode is TrainpathVectorNode) && !sameTrackConnect) { // in case the first node is a vector node (and not a direct connect), go to its junction first currentNode = modificationTools.AddAdditionalNode(currentNode, isMainPath); @@ -323,7 +322,7 @@ private bool FindConnectionSameTrack(int? firstTvnIndex) bool foundConnection = autoConnectToNodeOptions.FoundConnectionSameTrack(autoConnectFromNode, firstTvnIndex); return foundConnection; } - + /// /// Try to find a connection. Depth-first search via main track at junctions. Stores the found connection in a list of /// TrackNodeVectorIndexes (tvn's). No reversing of the nodes will be allowed. @@ -336,9 +335,10 @@ private bool FindConnectionThisOrientation(int? firstTvnIndex) { linkingTvns.Clear(); sameTrackConnect = false; - + int firstJunctionIndex = autoConnectFromNode.ConnectingJunctionIndex; - if (DisAllowedJunctionIndexes.Contains(firstJunctionIndex)) { + if (DisAllowedJunctionIndexes.Contains(firstJunctionIndex)) + { return false; } @@ -424,7 +424,7 @@ private bool TryToFindConnectionVia(int currentJunctionIndex, int nextTvn) return succeeded; } - + /// /// Can a node in a path be reversed without breaking something? /// @@ -461,7 +461,7 @@ private static bool CanReverse(TrainpathNode node) return incomingAllowsReversal && outgoingAllowsReversal; } - + #endregion #region debug methods @@ -481,10 +481,10 @@ public string LinkingTvnsAsString() /// This allows the Start node to be changed (e.g. regarding exact location on track, or perhaps moved to another /// track), and still be able to find reconnections. /// - public class ContinuousAutoConnecting:AutoConnectTools + public class ContinuousAutoConnecting : AutoConnectTools { /// The Start/From node needs to be reversed to be able to make the connection - public bool NeedsReverse { get { return this.FromNodeNeedsReverse;} } + public bool NeedsReverse { get { return this.FromNodeNeedsReverse; } } /// The connection is made forward along the path from the Start/From node private bool isForward; @@ -505,7 +505,7 @@ public ContinuousAutoConnecting(TrainpathNode startNode, bool isConnectingForwar { isForward = isConnectingForward; List reconnectNodes = this.FindReconnectNodeCandidates(startNode, isConnectingForward, true); - + autoConnectToNodeOptions = new ReconnectNodeOptions(isConnectingForward); int count = 0; foreach (TrainpathNode node in reconnectNodes) diff --git a/Source/Contrib/TrackViewer/Editing/AutoFixAllPaths.xaml.cs b/Source/Contrib/TrackViewer/Editing/AutoFixAllPaths.xaml.cs index 2fdb05c383..595854f23c 100644 --- a/Source/Contrib/TrackViewer/Editing/AutoFixAllPaths.xaml.cs +++ b/Source/Contrib/TrackViewer/Editing/AutoFixAllPaths.xaml.cs @@ -16,14 +16,12 @@ // along with Open Rails. If not, see . using System; -using System.Windows; -using System.Windows.Controls; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Text; - -using ORTS.TrackViewer.Drawing; +using System.Windows; +using System.Windows.Controls; using ORTS.Menu; +using ORTS.TrackViewer.Drawing; namespace ORTS.TrackViewer.Editing { @@ -36,12 +34,12 @@ public partial class AutoFixAllPaths : Window DrawTrackDB drawTrackDB; Dictionary> pathsThatAre = new Dictionary> - { - ["UnmodifiedFine"] = new List(), - ["UnmodifiedBroken"] = new List(), - ["ModifiedFine"] = new List(), - ["ModifiedBroken"] = new List(), - }; + { + ["UnmodifiedFine"] = new List(), + ["UnmodifiedBroken"] = new List(), + ["ModifiedFine"] = new List(), + ["ModifiedBroken"] = new List(), + }; List modifiedPaths; /// @@ -60,7 +58,7 @@ public AutoFixAllPaths(RouteData routeData, DrawTrackDB drawTrackDB) /// /// The list of paths that are availabel and that need to be checked and possibly fixed /// Callback that will be called showing the current processing that is being done - public void FixallAndShowResults(Collection Paths, Action callback ) + public void FixallAndShowResults(Collection Paths, Action callback) { _Fixall(Paths, callback); _ShowResults(); @@ -188,7 +186,7 @@ private void SaveOverview_Click(object sender, RoutedEventArgs e) if (String.IsNullOrEmpty(fullFilePath)) return; System.IO.StreamWriter file = new System.IO.StreamWriter(fullFilePath, false, System.Text.Encoding.Unicode); - string[] statusses = { "ModifiedBroken", "ModifiedFine", "UnmodifiedBroken", "UnmodifiedFine"}; + string[] statusses = { "ModifiedBroken", "ModifiedFine", "UnmodifiedBroken", "UnmodifiedFine" }; foreach (string status in statusses) { file.WriteLine(""); diff --git a/Source/Contrib/TrackViewer/Editing/Charts/DrawPathChart.cs b/Source/Contrib/TrackViewer/Editing/Charts/DrawPathChart.cs index 98cba40ac2..5a67f1183c 100644 --- a/Source/Contrib/TrackViewer/Editing/Charts/DrawPathChart.cs +++ b/Source/Contrib/TrackViewer/Editing/Charts/DrawPathChart.cs @@ -17,19 +17,14 @@ // using System; using System.Collections.Generic; -using System.Linq; -using System.Text; using System.IO; - +using System.Linq; using System.Windows; using System.Windows.Controls; using System.Windows.Media; using System.Windows.Shapes; - using Newtonsoft.Json; - using ORTS.Common; - using ORTS.TrackViewer.Drawing; @@ -43,7 +38,7 @@ public class DrawPathChart { /// Does the chart window have focus (actived) or not public bool IsActived { get { return this.chartWindow.IsActivated; } } - + // Injection dependencies private PathEditor pathEditor; private ORTS.TrackViewer.Drawing.RouteData routeData; @@ -163,14 +158,14 @@ private void OnPathChanged() chartWindow.Draw(); chartWindow.SetTitle(pathEditor.CurrentTrainPath.PathName); } - + /// /// Zoom the chart window /// /// The number of zoom steps (negative for zooming in) public void Zoom(int zoomSteps) { - this.chartWindow.ZoomChange(Math.Exp(-0.1*zoomSteps)); + this.chartWindow.ZoomChange(Math.Exp(-0.1 * zoomSteps)); } /// @@ -417,7 +412,7 @@ protected static void DrawText(Canvas drawingCanvas, double leftX, double center textBlock.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity)); // find out how tall it wants to be Canvas.SetLeft(textBlock, leftX); Canvas.SetTop(textBlock, centerY - textBlock.DesiredSize.Height / 2); // So no it should be centered vertically - + drawingCanvas.Children.Add(textBlock); } @@ -459,8 +454,8 @@ protected static void DrawTextVertical(Canvas drawingCanvas, double centerX, dou Foreground = new SolidColorBrush(color) }; textBlock.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity)); // find out how tall it wants to be - Canvas.SetLeft(textBlock, centerX - textBlock.DesiredSize.Height/2); - Canvas.SetTop(textBlock, bottomY); + Canvas.SetLeft(textBlock, centerX - textBlock.DesiredSize.Height / 2); + Canvas.SetTop(textBlock, bottomY); textBlock.RenderTransform = new RotateTransform(-90); drawingCanvas.Children.Add(textBlock); @@ -482,8 +477,8 @@ protected static void DrawImage(Canvas drawingCanvas, double centerX, double cen Height = imageSize, Fill = new ImageBrush(BitmapImageManager.Instance.GetImage(imageName)) }; - Canvas.SetLeft(rect, centerX-imageSize/2); - Canvas.SetTop(rect, centerY-imageSize/2); + Canvas.SetLeft(rect, centerX - imageSize / 2); + Canvas.SetTop(rect, centerY - imageSize / 2); drawingCanvas.Children.Add(rect); } #endregion @@ -501,7 +496,7 @@ protected void DetermineScaling() /// Determine the scaling needed: store the minimum and maximum of the x and y values, both for the whole set of data as for the set of data visible after zooming /// /// The method to get a value (normally a field) of a PathChartPoint, that is then used for drawing - protected void DetermineScaling(Func getField) + protected void DetermineScaling(Func getField) { this.minX = this.pathData.PointWithMinima.DistanceAlongPath; this.maxX = this.pathData.PointWithMaxima.DistanceAlongPath; @@ -659,7 +654,7 @@ private void DrawHorizontalGridLines(Canvas drawingCanvas, Canvas legendCanvas) /// The height for this label private void DrawHeightLabel(Canvas drawingCanvas, decimal height) { - string textToDraw = String.Format("{0}{1}", height/niceScale.Scale, niceScale.Unit); + string textToDraw = String.Format("{0}{1}", height / niceScale.Scale, niceScale.Unit); DrawText(drawingCanvas, 5, ScaledY((double)height), textToDraw, Colors.Black); } @@ -684,7 +679,7 @@ private void PrintGradesAndStations(Canvas drawingCanvas) if (lastTextToDraw != newTextToDraw) { - DrawTextVertical(drawingCanvas, (lastX+newX)/2, ScaledY(this.minY), lastTextToDraw, Colors.Black); + DrawTextVertical(drawingCanvas, (lastX + newX) / 2, ScaledY(this.minY), lastTextToDraw, Colors.Black); lastX = newX; lastTextToDraw = newTextToDraw; } @@ -699,11 +694,11 @@ private void PrintGradesAndStations(Canvas drawingCanvas) private void ShowSpecialNodes(Canvas drawingCanvas) { - foreach (KeyValuePair item in this.pathData.DistanceAlongPath) + foreach (KeyValuePair item in this.pathData.DistanceAlongPath) { if (item.Key.NodeType == TrainpathNodeType.Reverse) { - + DrawImage(drawingCanvas, ScaledX(item.Value), ScaledY(item.Key.Location.Location.Y), "pathReverse"); } if (item.Key.NodeType == TrainpathNodeType.Stop) @@ -727,7 +722,7 @@ private void ShowSpecialNodes(Canvas drawingCanvas) /// The chart that shows the grade of the path (in percentages) /// Also prints the text of the x-location /// - public class GradeChart: SubChart + public class GradeChart : SubChart { /// /// Constructor @@ -744,7 +739,7 @@ protected override void DrawSubChart(Canvas drawingCanvas, Canvas legendCanvas) { DetermineScaling(p => p.GradePercent); CleanScaling(); - + DrawHorizontalGridLines(drawingCanvas, legendCanvas); DrawDataPolyLine(drawingCanvas, p => p.GradePercent, true); @@ -803,7 +798,7 @@ private void CleanScaling() maxY = Math.Ceiling(maxY); } } - } + } #endregion #region CurvatureChart @@ -834,14 +829,14 @@ protected override void DrawSubChart(Canvas drawingCanvas, Canvas legendCanvas) private void DrawDegreesTurned(Canvas drawingCanvas) { - double pixelsPerKm = 1000*this.canvasWidth / (this.zoomedMaxX - this.zoomedMinX); + double pixelsPerKm = 1000 * this.canvasWidth / (this.zoomedMaxX - this.zoomedMinX); if (pixelsPerKm < 100) { // do not draw if we do not have enoug pixels return; } bool InCurve = false; - double accumulatedCurveRad=0; + double accumulatedCurveRad = 0; double distanceAlongPathAtStart = 0; char degree = (char)176; foreach (PathChartPoint sourcePoint in this.pathData.PathChartPoints) @@ -855,7 +850,7 @@ private void DrawDegreesTurned(Canvas drawingCanvas) if (InCurve) { // end of a curve - string textToDraw = String.Format("{0:F0}{1}", 180*accumulatedCurveRad/Math.PI, degree); + string textToDraw = String.Format("{0:F0}{1}", 180 * accumulatedCurveRad / Math.PI, degree); DrawTextCentered(drawingCanvas, ScaledX((sourcePoint.DistanceAlongPath + distanceAlongPathAtStart) / 2), 30, textToDraw, Colors.Red); } InCurve = false; @@ -882,7 +877,7 @@ private void DrawDegreesTurned(Canvas drawingCanvas) /// The single point for which to determine the deviation from 0 private float CurvatureDeviation(PathChartPoint pathPoint) { - float deviation = 10 * Math.Sign(pathPoint.Curvature); + float deviation = 10 * Math.Sign(pathPoint.Curvature); //deviation = pathPoint.Curvature; return deviation; } @@ -937,7 +932,7 @@ private void PrintHorizontalScaleLabels(Canvas drawingCanvas) DrawText(drawingCanvas, ScaledX((double)niceValue), 5, textToDraw, Colors.Black); } } - + } #endregion @@ -1092,7 +1087,7 @@ public class NiceScaling /// The string to use as unit /// optional: The minimum number of nice ticks /// When set, the nice values will never exceed the given ranges - public NiceScaling(double valueMin, double valueMax, double scale, string unit, int minNumberOfTicks=4, bool strict=false) + public NiceScaling(double valueMin, double valueMax, double scale, string unit, int minNumberOfTicks = 4, bool strict = false) { if (valueMin == valueMax) { @@ -1117,9 +1112,9 @@ public NiceScaling(double valueMin, double valueMax, double scale, string unit, this.Unit = unit; - double valueScaledMin = valueMin/scale; - double valueScaledMax = valueMax/scale; - double subDivisionMax = (valueScaledMax - valueScaledMin)/minNumberOfTicks; + double valueScaledMin = valueMin / scale; + double valueScaledMax = valueMax / scale; + double subDivisionMax = (valueScaledMax - valueScaledMin) / minNumberOfTicks; double sub10log = Math.Floor(Math.Log10(subDivisionMax)); double power10 = Math.Pow(10.0, sub10log); @@ -1137,10 +1132,11 @@ public NiceScaling(double valueMin, double valueMax, double scale, string unit, { valueScaledStart += valueScaledStep; } - + List values = new List(); decimal valueScaled = valueScaledStart; - while (valueScaled < (decimal)valueScaledMax) { + while (valueScaled < (decimal)valueScaledMax) + { values.Add(valueScaled * this.Scale); valueScaled += valueScaledStep; } @@ -1148,7 +1144,7 @@ public NiceScaling(double valueMin, double valueMax, double scale, string unit, NiceValues = values.ToArray(); ValueMin = valueScaledStart * this.Scale; - ValueMax = valueScaled * this.Scale; + ValueMax = valueScaled * this.Scale; } } #endregion diff --git a/Source/Contrib/TrackViewer/Editing/Charts/PathChartData.cs b/Source/Contrib/TrackViewer/Editing/Charts/PathChartData.cs index de1734b9c5..8aae77cfa7 100644 --- a/Source/Contrib/TrackViewer/Editing/Charts/PathChartData.cs +++ b/Source/Contrib/TrackViewer/Editing/Charts/PathChartData.cs @@ -18,12 +18,10 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; using Newtonsoft.Json; - -using ORTS.Common; using Orts.Formats.Msts; using Orts.Simulation; +using ORTS.Common; namespace ORTS.TrackViewer.Editing.Charts { @@ -49,7 +47,7 @@ public class PathChartData public IDictionary DistanceAlongPath; /// Is there actually a path loaded with one or more points [JsonIgnore] - public bool HasPath { get { return PathChartPoints != null && PathChartPoints.Count() > 0;} } + public bool HasPath { get { return PathChartPoints != null && PathChartPoints.Count() > 0; } } [JsonProperty("PathName")] private string PathName { get; set; } @@ -116,7 +114,7 @@ public void Update(Trainpath trainpath) lastDistance += relativePoint.DistanceAlongNextSection; AddPoint(localPathChartPoints, absolutePoint); } - + node = node.NextMainNode; } @@ -164,8 +162,8 @@ private void AddPoint(List localPathChartPoints, PathChartPoint /// private void StoreAllMinMax() { - this.PointWithMaxima = new PathChartPoint(new PathChartPoint(this.MaxHeightM, this.MaxCurvature, this.MaxGradePercent/100, 0), this.MaxDistanceAlongPath); - this.PointWithMinima = new PathChartPoint(new PathChartPoint(this.MinHeightM, this.MinCurvature, this.MinGradePercent/100, 0), this.MinDistanceAlongPath); + this.PointWithMaxima = new PathChartPoint(new PathChartPoint(this.MaxHeightM, this.MaxCurvature, this.MaxGradePercent / 100, 0), this.MaxDistanceAlongPath); + this.PointWithMinima = new PathChartPoint(new PathChartPoint(this.MinHeightM, this.MinCurvature, this.MinGradePercent / 100, 0), this.MinDistanceAlongPath); } #endregion @@ -216,7 +214,7 @@ private IEnumerable DetermineChartPoints(TrainpathNode thisNode) float sectionOffsetStop; DetermineSectionDetails(thisNode, nextNode, tn, out isForward, out tvsiStart, out sectionOffsetStart); - DetermineSectionDetails(nextNode, thisNode, tn, out isReverse, out tvsiStop, out sectionOffsetStop); + DetermineSectionDetails(nextNode, thisNode, tn, out isReverse, out tvsiStop, out sectionOffsetStop); float height; if (isForward) @@ -228,7 +226,7 @@ private IEnumerable DetermineChartPoints(TrainpathNode thisNode) height = vectorNode.TrVectorSections[tvsi].Y; AddPointAndTrackItems(newPoints, vectorNode, trackItemsInTracknode, isForward, height, tvsi, 0, sectionOffsetNext); - sectionOffsetNext = SectionLengthAlongTrack(tn, tvsi-1); + sectionOffsetNext = SectionLengthAlongTrack(tn, tvsi - 1); } //Also works in case this is the only point we are adding @@ -242,7 +240,7 @@ private IEnumerable DetermineChartPoints(TrainpathNode thisNode) for (int tvsi = tvsiStop; tvsi < tvsiStart; tvsi++) { // The height needs to come from the end of the section, so the where the next section starts. And we only know the height at the start. - height = vectorNode.TrVectorSections[tvsi+1].Y; + height = vectorNode.TrVectorSections[tvsi + 1].Y; AddPointAndTrackItems(newPoints, vectorNode, trackItemsInTracknode, isForward, height, tvsi, sectionOffsetNext, SectionLengthAlongTrack(tn, tvsi)); sectionOffsetNext = 0; @@ -353,7 +351,7 @@ private float GetCurvature(TrVectorNode vectorNode, int tvsi, bool isForward) } } } - + return curvature; } @@ -391,7 +389,7 @@ private void DetermineSectionDetails(TrainpathNode startNode, TrainpathNode next sectionOffsetStart = currentNodeAsVector.TrackSectionOffset; } } - + /// /// Determine the length of the section along the track. /// @@ -443,7 +441,7 @@ private bool DetermineIfForward(TrainpathNode currentNode, TrainpathNode nextNod /// private int DetermineTrackVectorSection(TrainpathNode node, int tvn) { // It would be nice if we could separate this into different classes for vector and junction, but this would mean creating three additional classes for only a few methods - TrainpathVectorNode nodeAsVector = node as TrainpathVectorNode; + TrainpathVectorNode nodeAsVector = node as TrainpathVectorNode; if (nodeAsVector != null) { return nodeAsVector.TrackVectorSectionIndex; @@ -451,10 +449,12 @@ private int DetermineTrackVectorSection(TrainpathNode node, int tvn) else { TrainpathJunctionNode currentNodeAsJunction = node as TrainpathJunctionNode; - if (currentNodeAsJunction.JunctionIndex == trackDB.TrackNodes[node.NextMainTvnIndex].JunctionIndexAtStart()) { + if (currentNodeAsJunction.JunctionIndex == trackDB.TrackNodes[node.NextMainTvnIndex].JunctionIndexAtStart()) + { return 0; } - else{ + else + { return trackDB.TrackNodes[node.NextMainTvnIndex].TrVectorNode.TrVectorSections.Count() - 1; } } @@ -499,7 +499,7 @@ public struct PathChartPoint /// The node describing where the location of the point is public PathChartPoint(TrainpathNode node) { - HeightM = node.Location.Location.Y; + HeightM = node.Location.Location.Y; DistanceAlongPath = 0; Curvature = 0; GradePercent = 0; @@ -522,7 +522,7 @@ public PathChartPoint(float height, float curvature, float grade, float distance HeightM = height; DistanceAlongPath = 0; Curvature = curvature; - GradePercent = grade*100; + GradePercent = grade * 100; DistanceAlongNextSection = distanceAlongSection; TrackItemText = itemText; TrackItemType = type; @@ -629,7 +629,7 @@ public IEnumerable GetItemsInTracknode(TrackNode tn) { var travellerAtItem = new Traveller(tsectionDat, trackDB.TrackNodes, tn, trItem.TileX, trItem.TileZ, trItem.X, trItem.Z, Traveller.TravellerDirection.Forward); - + if (travellerAtItem != null) { tracknodeItems.Add(new ChartableTrackItem(trItem, travellerAtItem)); @@ -679,7 +679,7 @@ struct ChartableTrackItem public float TrackVectorSectionOffset; /// The type of item public ChartableTrackItemType ItemType; - + /// /// Constructor /// diff --git a/Source/Contrib/TrackViewer/Editing/Charts/PathChartWindow.xaml.cs b/Source/Contrib/TrackViewer/Editing/Charts/PathChartWindow.xaml.cs index 45d4ef9116..a6ffedc971 100644 --- a/Source/Contrib/TrackViewer/Editing/Charts/PathChartWindow.xaml.cs +++ b/Source/Contrib/TrackViewer/Editing/Charts/PathChartWindow.xaml.cs @@ -1,16 +1,8 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Windows; using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; namespace ORTS.TrackViewer.Editing.Charts { @@ -33,7 +25,7 @@ partial class PathChartWindow : Window public PathChartWindow() { InitializeComponent(); - + chartCanvasses = new Dictionary { {"height", HeightCanvas}, {"grade", GradeCanvas}, @@ -76,7 +68,8 @@ public void Draw() { ISubChart subChart; subCharts.TryGetValue(chartName, out subChart); - if (subChart != null) { + if (subChart != null) + { subChart.Draw(zoomRatioStart, zoomRatioStop, chartCanvasses[chartName], legendCanvasses[chartName]); } } @@ -144,7 +137,7 @@ private void OnMouseWheel(object sender, MouseWheelEventArgs e) } private bool mouseIsMoving = false; - private double realXatMouse=0; + private double realXatMouse = 0; private void Window_MouseDown(object sender, MouseButtonEventArgs e) { if (e.LeftButton != MouseButtonState.Pressed) diff --git a/Source/Contrib/TrackViewer/Editing/ConnectableNode.cs b/Source/Contrib/TrackViewer/Editing/ConnectableNode.cs index 9156bfa37c..56e4942cf0 100644 --- a/Source/Contrib/TrackViewer/Editing/ConnectableNode.cs +++ b/Source/Contrib/TrackViewer/Editing/ConnectableNode.cs @@ -14,10 +14,7 @@ // // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; using System.Collections.Generic; -using System.Linq; -using System.Text; namespace ORTS.TrackViewer.Editing { @@ -88,7 +85,7 @@ private void DetermineJunctionForVectorNode() { int tvnIndex = OriginalNodeAsVector.TvnIndex; - if ( (IsFrom && IsConnectingForward) || (!IsFrom && !IsConnectingForward)) + if ((IsFrom && IsConnectingForward) || (!IsFrom && !IsConnectingForward)) { // the first junction node of the reconnect path is after the vector node. this.ConnectingJunctionIndex = OriginalNodeAsVector.GetNextJunctionIndex(tvnIndex); @@ -115,7 +112,8 @@ public void ReverseOrientation() DetermineJunction(); } - public override string ToString() { + public override string ToString() + { return "Connectable " + OriginalNode.ToString(); } } @@ -199,14 +197,15 @@ public bool FoundConnectionSameTrack(ConnectableNode fromNode, int? firstTvnInde } ConnectableNode candidate = connectableNodeOptions[0]; - - if (ExistsConnectionSameTrack(fromNode, candidate, firstTvnIndex)) { + + if (ExistsConnectionSameTrack(fromNode, candidate, firstTvnIndex)) + { ActualReconnectNode = candidate; return true; } return false; - + } /// @@ -244,7 +243,7 @@ private bool ExistsConnectionSameTrack(ConnectableNode fromNode, ConnectableNode { if (fromAsVector.ForwardOriented == fromAsVector.IsEarlierOnTrackThan(toAsVector)) return false; } - + return true; } diff --git a/Source/Contrib/TrackViewer/Editing/DrawEditorAction.cs b/Source/Contrib/TrackViewer/Editing/DrawEditorAction.cs index b5c6ce41a4..8ec21a050f 100644 --- a/Source/Contrib/TrackViewer/Editing/DrawEditorAction.cs +++ b/Source/Contrib/TrackViewer/Editing/DrawEditorAction.cs @@ -36,7 +36,7 @@ public DrawEditorAction(int xLowerLeft, int yLowerLeft) lowerLeft = new Vector2(xLowerLeft, yLowerLeft); } - + /// /// Draw (print) the values of longitude and latitude /// @@ -44,7 +44,7 @@ public DrawEditorAction(int xLowerLeft, int yLowerLeft) public void Draw(PathEditor editor) { if (editor == null) { return; } - if (!Properties.Settings.Default.showEditorAction) { return;} + if (!Properties.Settings.Default.showEditorAction) { return; } BasicShapes.DrawString(lowerLeft, DrawColors.colorsNormal.Text, editor.CurrentActionDescription); } } diff --git a/Source/Contrib/TrackViewer/Editing/DrawPATfile.cs b/Source/Contrib/TrackViewer/Editing/DrawPATfile.cs index f7303dc07c..157c82613e 100644 --- a/Source/Contrib/TrackViewer/Editing/DrawPATfile.cs +++ b/Source/Contrib/TrackViewer/Editing/DrawPATfile.cs @@ -15,9 +15,7 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . using System; -using System.Collections.Generic; using System.Linq; -using System.Text; using Orts.Formats.Msts; using ORTS.Common; @@ -45,7 +43,7 @@ public class DrawPATfile /// Number of nodes that will be drawn. Start with a few private int numberToDraw = int.MaxValue / 2; // large, but not close to overflow - + /// Index of the last main node that has been drawn private int currentMainNodeIndex; @@ -60,7 +58,7 @@ public class DrawPATfile /// Constructor /// /// Contains the information (mainly filepath) needed for loading the .pat file - public DrawPATfile (ORTS.Menu.Path path) + public DrawPATfile(ORTS.Menu.Path path) { FileName = path.FilePath.Split('\\').Last(); patFile = new PathFile(path.FilePath); @@ -72,7 +70,7 @@ public DrawPATfile (ORTS.Menu.Path path) /// Area to draw upon public void Draw(DrawArea drawArea) { - + //draw actual path currentMainNodeIndex = 0; // starting point int currentSidingNodeIndex = -1; // we start without siding path @@ -98,11 +96,11 @@ public void Draw(DrawArea drawArea) TrPathNode curMainNode = patFile.TrPathNodes[currentMainNodeIndex]; WorldLocation curMainLoc = GetPdpLocation(patFile.TrackPDPs[(int)curMainNode.fromPDP]); - + // from this main line point to the next siding node. // If there is a next siding node, we also reset the currentSidingNodeIndex // but probably it is not allowed to have siding - int nextSidingNodeIndex = (int)curMainNode.nextSidingNode; + int nextSidingNodeIndex = (int)curMainNode.nextSidingNode; if (nextSidingNodeIndex >= 0) { // draw the start of a siding path @@ -114,7 +112,7 @@ public void Draw(DrawArea drawArea) } // From this main line point to the next - int nextMainNodeIndex = (int)curMainNode.nextMainNode; + int nextMainNodeIndex = (int)curMainNode.nextMainNode; if (nextMainNodeIndex >= 0) { TrPathNode nextNode = patFile.TrPathNodes[nextMainNodeIndex]; @@ -124,7 +122,7 @@ public void Draw(DrawArea drawArea) currentMainNodeIndex = nextMainNodeIndex; } } - + } /// @@ -142,7 +140,7 @@ private static WorldLocation GetPdpLocation(TrackPDP pdp) /// public void ExtendPath() { - int maxNumber = patFile.TrPathNodes.Count-1; + int maxNumber = patFile.TrPathNodes.Count - 1; if (++numberToDraw > maxNumber) numberToDraw = maxNumber; } diff --git a/Source/Contrib/TrackViewer/Editing/DrawPath.cs b/Source/Contrib/TrackViewer/Editing/DrawPath.cs index 06d3954e73..dd7ccd218f 100644 --- a/Source/Contrib/TrackViewer/Editing/DrawPath.cs +++ b/Source/Contrib/TrackViewer/Editing/DrawPath.cs @@ -15,13 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . using System; -using System.Collections.ObjectModel; using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; -using System.Text; using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; - using Orts.Formats.Msts; using ORTS.Common; using ORTS.TrackViewer.Drawing; @@ -55,7 +52,7 @@ public class DrawPath /// /// Constructor /// - public DrawPath (TrackDB trackDB, TrackSectionsFile tsectionDat) + public DrawPath(TrackDB trackDB, TrackSectionsFile tsectionDat) { this.trackDB = trackDB; this.tsectionDat = tsectionDat; @@ -74,7 +71,7 @@ public void Draw(DrawArea drawArea, TrainpathNode firstNode) DrawnPathData dummyData = new DrawnPathData(); Draw(drawArea, firstNode, null, int.MaxValue, dummyData); } - + /// /// Draw the actual path coded in the PATfile (for a number of nodes that can be extended or reduced) /// @@ -84,15 +81,15 @@ public void Draw(DrawArea drawArea, TrainpathNode firstNode) /// The requested number of nodes to draw /// Data structure that we will fill with information about the path we have drawn /// the number of nodes actually drawn (not taking into account nodes on a siding) - public int Draw(DrawArea drawArea, + public int Draw(DrawArea drawArea, TrainpathNode firstNode, TrainpathNode firstNodeOfTail, - int numberToDraw, + int numberToDraw, DrawnPathData drawnPathData) { //List of all nodes that need to be drawn. List drawnNodes = new List(); - + // start of path TrainpathNode currentSidingNode = null; // we start without siding path CurrentMainNode = firstNode; @@ -102,19 +99,19 @@ public void Draw(DrawArea drawArea, TrainpathNode firstNode) DrawTail(drawArea, ColorSchemeMain, null, firstNodeOfTail); return 0; } - + drawnNodes.Add(CurrentMainNode); drawnPathData.AddNode(CurrentMainNode); // We want to draw only a certain number of nodes. And if there is a siding, for the siding // we also want to draw the same number of nodes from where it splits from the main track - TrainpathNode LastVectorStart= null; + TrainpathNode LastVectorStart = null; TrainpathNode LastVectorEnd = null; int LastVectorTvn = 0; int numberDrawn = 1; while (numberDrawn < numberToDraw) { - + // If we have a current siding track, we draw it if (currentSidingNode != null) { @@ -137,14 +134,14 @@ public void Draw(DrawArea drawArea, TrainpathNode firstNode) sidingNodesToDraw = 0; } currentSidingNode = nextNodeOnSiding; - + } } - + // Draw the start of a siding path, so from this main line point to the next siding node. // If there is a next siding node, we also reset the currentSidingNode // but probably it is not allowed to have siding on a siding - TrainpathNode nextSidingNode = CurrentMainNode.NextSidingNode; + TrainpathNode nextSidingNode = CurrentMainNode.NextSidingNode; if (nextSidingNode != null) { DrawPathOnVectorNode(drawArea, ColorSchemeSiding, CurrentMainNode, nextSidingNode, CurrentMainNode.NextSidingTvnIndex); @@ -183,7 +180,8 @@ public void Draw(DrawArea drawArea, TrainpathNode firstNode) //Draw all the nodes themselves TrainpathNode lastNode = null; - foreach (TrainpathNode node in drawnNodes) { + foreach (TrainpathNode node in drawnNodes) + { DrawNodeItself(drawArea, node, false); lastNode = node; } @@ -199,7 +197,7 @@ public void Draw(DrawArea drawArea, TrainpathNode firstNode) return numberDrawn; } - + /// /// Draw the current path node texture, showing what kind of node it is @@ -214,7 +212,7 @@ private void DrawNodeItself(DrawArea drawArea, TrainpathNode trainpathNode, bool int maxPixelSize = 24; float angle = trainpathNode.TrackAngle; - Color colorMain = isLastNode ? this.ColorSchemeLast.TrackStraight : ColorSchemeMain.TrackStraight ; + Color colorMain = isLastNode ? this.ColorSchemeLast.TrackStraight : ColorSchemeMain.TrackStraight; Color colorSiding = this.ColorSchemeSiding.TrackStraight; Color colorBroken = this.ColorSchemeMain.BrokenNode; @@ -239,7 +237,7 @@ private void DrawNodeItself(DrawArea drawArea, TrainpathNode trainpathNode, bool break; default: bool isSidingNode = (trainpathNode.NextMainNode == null) && - ( (trainpathNode.NextSidingNode != null) || trainpathNode.IsBroken); // The IsBroken condition should indicate a dangling siding node + ((trainpathNode.NextSidingNode != null) || trainpathNode.IsBroken); // The IsBroken condition should indicate a dangling siding node Color normalColor = (isSidingNode) ? colorSiding : colorMain; drawArea.DrawTexture(trainpathNode.Location, "pathNormal", pathPointSize, minPixelSize, maxPixelSize, normalColor, angle); break; @@ -250,7 +248,7 @@ private void DrawNodeItself(DrawArea drawArea, TrainpathNode trainpathNode, bool drawArea.DrawTexture(trainpathNode.Location, "crossedRing", pathPointSize, minPixelSize, maxPixelSize, colorBroken); } //drawArea.DrawExpandingString(trainpathNode.Location, trainpathNode.NodeType.ToString()); //debug only - + } /// @@ -277,7 +275,7 @@ private void DrawPathOnVectorNode(DrawArea drawArea, ColorScheme colors, Trainpa //Default situation (and most occuring) is to draw the complete vector node int tvsiStart = 0; - int tvsiStop = tn.TrVectorNode.TrVectorSections.Length-1; + int tvsiStop = tn.TrVectorNode.TrVectorSections.Length - 1; float sectionOffsetStart = 0; float sectionOffsetStop = -1; if (currentNode is TrainpathJunctionNode) @@ -393,13 +391,13 @@ private void DrawPathOnVectorNode(DrawArea drawArea, ColorScheme colors, Trainpa if (trackSection == null) return; WorldLocation thisLocation = new WorldLocation(tvs.TileX, tvs.TileZ, tvs.X, 0, tvs.Z); - + if (trackSection.SectionCurve != null) { //curved section float radius = trackSection.SectionCurve.Radius; int sign = (trackSection.SectionCurve.Angle < 0) ? -1 : 1; - float angleLength = (stopOffset < 0) ? trackSection.SectionCurve.Angle : sign*MathHelper.ToDegrees(stopOffset/radius); - float angleStart = sign*MathHelper.ToDegrees(startOffset / radius); + float angleLength = (stopOffset < 0) ? trackSection.SectionCurve.Angle : sign * MathHelper.ToDegrees(stopOffset / radius); + float angleStart = sign * MathHelper.ToDegrees(startOffset / radius); angleLength -= angleStart; drawArea.DrawArc(trackSection.SectionSize.Width, colors.TrackCurved, thisLocation, @@ -423,7 +421,7 @@ private void DrawPathOnVectorNode(DrawArea drawArea, ColorScheme colors, Trainpa /// node to draw to private static void DrawPathBrokenNode(DrawArea drawArea, ColorScheme colors, TrainpathNode currentNode, TrainpathNode nextNode) { - drawArea.DrawLine(1f, colors.BrokenPath , currentNode.Location, nextNode.Location); + drawArea.DrawLine(1f, colors.BrokenPath, currentNode.Location, nextNode.Location); } /// @@ -456,7 +454,7 @@ public class DrawnPathData /// List of main-track nodes that were actually drawn and can therefore be selected for editing /// public Collection DrawnNodes { get; private set; } - + /// /// Keys are tracknode indexes, value is a list of (main) track node (in pairs) that are both /// on the tracknode and the path between them has been drawn diff --git a/Source/Contrib/TrackViewer/Editing/EditorActions.cs b/Source/Contrib/TrackViewer/Editing/EditorActions.cs index 24015fdb0f..622d7ebe10 100644 --- a/Source/Contrib/TrackViewer/Editing/EditorActions.cs +++ b/Source/Contrib/TrackViewer/Editing/EditorActions.cs @@ -15,11 +15,8 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.ObjectModel; using System.Collections.Generic; using System.Linq; -using System.Text; using System.Windows; using System.Windows.Controls; using Orts.Formats.Msts; @@ -50,7 +47,7 @@ public abstract class EditorAction protected TrainpathNode ActiveNode { get; private set; } /// The currently active location on a track node on which the action of (some) subclasses will act protected TrainpathVectorNode ActiveTrackLocation { get; private set; } - + /// x-location of the mouse protected int MouseX { get; set; } /// y-location of the mouse @@ -94,7 +91,7 @@ protected EditorAction(string menuHeader, string pngFileName) ModificationTools = new ModificationTools(); } - + /// /// Set the state of the item in the menu (depending on whether the action can be executed or not. /// @@ -169,7 +166,7 @@ public override string ToString() } } #endregion - + #region AddStart /// /// Subclass to implement the action: Add Start Node @@ -197,7 +194,7 @@ protected override void ExecuteAction() } /// Returns the net amount of main nodes added. - protected override int NetMainNodesAdded() + protected override int NetMainNodesAdded() { return ModificationTools.NetNodesAdded + 1; // first node is not counted automatically } @@ -427,7 +424,7 @@ public abstract class EditorActionWait : EditorAction /// (Wait) node for which you want to edit the metadata. protected void EditWaitMetaData(TrainpathVectorNode nodeToEdit) { - if (nodeToEdit.WaitTimeS == 0 ) + if (nodeToEdit.WaitTimeS == 0) { nodeToEdit.WaitTimeS = 602; // some initial value: 10 minutes, 2 seconds } @@ -556,7 +553,7 @@ protected EditorActionOtherExit(string header, string pngFileName) protected bool CanTakeOtherExit(bool addPassingPath) { TrainpathJunctionNode activeNodeAsJunction = ActiveNode as TrainpathJunctionNode; - + return CanTakeOtherExitBasic(activeNodeAsJunction) && CanReconnectOtherExit(activeNodeAsJunction, addPassingPath); @@ -601,7 +598,7 @@ protected bool CanReconnectOtherExit(TrainpathJunctionNode activeNodeAsJunction, else { // if there is no siding path, we can just reconnect either a new main or a siding path: - if (!ActiveNode.HasSidingPath) return true; + if (!ActiveNode.HasSidingPath) return true; // We already have a siding path, so we cannot add another if (addPassingPath) return false; @@ -663,7 +660,7 @@ private TrainpathJunctionNode FindReconnectNode(TrainpathJunctionNode startJunct int junctionsToCheck = maxNumberNodesToCheckForReconnect; while (junctionsToCheck > 0) { - int nextJunctionIndex = TrackExtensions.GetNextJunctionIndex(junctionIndex, TvnIndex); + int nextJunctionIndex = TrackExtensions.GetNextJunctionIndex(junctionIndex, TvnIndex); foreach (TrainpathJunctionNode reconnectNode in reconnectNodes) { if (reconnectNode.JunctionIndex == nextJunctionIndex) @@ -690,7 +687,7 @@ private TrainpathJunctionNode FindReconnectNode(TrainpathJunctionNode startJunct } return null; } - + } #endregion @@ -715,7 +712,7 @@ protected override bool CanExecuteAction() protected override void ExecuteAction() { TrainpathJunctionNode activeNodeAsJunction = ActiveNode as TrainpathJunctionNode; - + if (ReconnectNode == null) { //really take other exit and discard rest of path activeNodeAsJunction.NextMainTvnIndex = NewTvnIndex; @@ -799,7 +796,7 @@ protected override bool CanExecuteAction() if (!CanTakeOtherExitBasic(activeNodeAsJunction)) return false; if (ActiveNode.HasSidingPath) return false; if (activeNodeAsJunction.IsSimpleSidingStart()) return false; - + //The idea was that if a normal passing path is possible, then there is no need for a complex passing path //However, if you want to connect not to the default recnnect node, we do need this //if (CanReconnectOtherExit(activeNodeAsJunction, true)) return false; @@ -847,7 +844,7 @@ bool NewNodeWouldBeOnMainTrack() } } #endregion - + #region RemovePassingPath /// /// Subclass to implement the action: Remove as passing path @@ -870,12 +867,12 @@ protected override void ExecuteAction() TrainpathNode mainNode = ActiveNode; mainNode.NodeType = TrainpathNodeType.Other; // this was SidingStart mainNode.NextSidingNode = null; - + if (!mainNode.HasSidingPath) { // only a broken stub created by StartPassingPath return; } - + //make sure the main path does no longer show it has a siding path. while (mainNode.NodeType != TrainpathNodeType.SidingEnd) { @@ -958,8 +955,8 @@ protected override bool CanExecuteAction() if (ActiveNode.NodeType == TrainpathNodeType.Start) return false; if (ActiveNode.NextMainNode == null) return false; if (ActiveNode.IsBroken) return false; - if (ActiveNode.NodeType == TrainpathNodeType.SidingEnd) return false; - + if (ActiveNode.NodeType == TrainpathNodeType.SidingEnd) return false; + if (ActiveNode.HasSidingPath) { // a siding start itself should still be fine. @@ -967,7 +964,7 @@ protected override bool CanExecuteAction() } return true; - + } /// Execute the action. This assumes that the action can be executed @@ -979,12 +976,12 @@ protected override void ExecuteAction() TrainpathNode lastEditableNode = ActiveNode.PrevNode; ActiveNode.PrevNode = null; - + lastEditableNode.NextMainNode = null; } } #endregion - + #region AutoFixBrokenNodes /// /// Subclass to implement the action: Auto-fix broken nodes @@ -1193,7 +1190,8 @@ protected override bool CanExecuteAction() /// This action can only be done if there is a passing path stub, that is, a start of a passing path /// that contains only a single siding node that is broken and not reconnected. /// - void FindPassingPathStub() { + void FindPassingPathStub() + { sidingStartNode = null; autoConnectTools.ResetDisallowedJunctions(); @@ -1202,7 +1200,7 @@ protected override bool CanExecuteAction() while (mainNode != null) { TrainpathJunctionNode mainNodeAsJunction = mainNode as TrainpathJunctionNode; - + if (mainNodeAsJunction != null) { if (mainNode.NodeType == TrainpathNodeType.SidingStart) @@ -1240,7 +1238,7 @@ protected override void ExecuteAction() TrainpathNode sidingEnd = ActiveNode; sidingStartNode.NextSidingNode.SetNonBroken(); - + sidingStartNode.NodeType = TrainpathNodeType.SidingStart; sidingEnd.NodeType = TrainpathNodeType.SidingEnd; @@ -1282,13 +1280,14 @@ public EditorActionTakeOtherExitPassingPath() protected override bool CanExecuteAction() { if (Trainpath.FirstNode == null) return false; - if (ActiveNode.IsBroken) return false; + if (ActiveNode.IsBroken) return false; if (ActiveNode.NextMainNode != null) return false; if (ActiveNode.NextSidingNode == null) return false; if (ActiveNode.NextSidingNode.NodeType == TrainpathNodeType.SidingEnd) return false; // not enough room to take other exit. TrainpathJunctionNode activeNodeAsJunction = (ActiveNode as TrainpathJunctionNode); - if ((activeNodeAsJunction == null) || (!activeNodeAsJunction.IsFacingPoint) ) { + if ((activeNodeAsJunction == null) || (!activeNodeAsJunction.IsFacingPoint)) + { return false; } @@ -1297,7 +1296,7 @@ protected override bool CanExecuteAction() if (!FindDisAllowedJunctionIndexes()) return false; int newNextTvnIndex = activeNodeAsJunction.OtherExitTvnIndex(); - return autoConnectTools.FindConnection(ActiveNode,sidingEndNode, newNextTvnIndex); + return autoConnectTools.FindConnection(ActiveNode, sidingEndNode, newNextTvnIndex); } /// @@ -1386,7 +1385,7 @@ protected override int NetMainNodesAdded() public abstract class EditorActionMouseDrag : EditorAction { /// Constructor - protected EditorActionMouseDrag(string header, string pngFileName) : base(header, pngFileName) {} + protected EditorActionMouseDrag(string header, string pngFileName) : base(header, pngFileName) { } /// /// Dragging has commenced. Perform initialization actions @@ -1455,7 +1454,7 @@ protected virtual void CleanUp() } #endregion - + #region MouseDragVectorNode /// /// Subclass to implement the actions related to mouse dragging. @@ -1477,7 +1476,7 @@ protected override bool CanExecuteAction() if (ActiveNode.IsBroken) return false; nodeBeingDragged = ActiveNode as TrainpathVectorNode; if (nodeBeingDragged == null) return false; - + switch (ActiveNode.NodeType) { case TrainpathNodeType.Start: @@ -1485,10 +1484,10 @@ protected override bool CanExecuteAction() case TrainpathNodeType.Stop: case TrainpathNodeType.Reverse: return true; - default: + default: return false; } - + } /// Execute the action. This assumes that the action can be executed @@ -1502,15 +1501,15 @@ protected override void ExecuteAction() /// Note that undo/redo is already taken care of. /// protected override void InitDragging() - { + { switch (ActiveNode.NodeType) { - case TrainpathNodeType.Start: FindDraggingLimitsStart(); break; - case TrainpathNodeType.End: FindDraggingLimitsEnd(); break; - case TrainpathNodeType.Stop: FindDraggingLimitsStop(); break; + case TrainpathNodeType.Start: FindDraggingLimitsStart(); break; + case TrainpathNodeType.End: FindDraggingLimitsEnd(); break; + case TrainpathNodeType.Stop: FindDraggingLimitsStop(); break; case TrainpathNodeType.Reverse: FindDraggingLimitsReverse(); break; default: break; - } + } } /// @@ -1519,13 +1518,13 @@ protected override void InitDragging() protected override bool SucceededDragging() { - if ( (nodeBeingDragged.TvnIndex == ActiveTrackLocation.TvnIndex) + if ((nodeBeingDragged.TvnIndex == ActiveTrackLocation.TvnIndex) && (ActiveTrackLocation.Location != WorldLocation.None) && (ActiveTrackLocation.IsBetween(dragLimitNode1, dragLimitNode2))) { - nodeBeingDragged.Location = ActiveTrackLocation.Location; + nodeBeingDragged.Location = ActiveTrackLocation.Location; nodeBeingDragged.TrackVectorSectionIndex = ActiveTrackLocation.TrackVectorSectionIndex; - nodeBeingDragged.TrackSectionOffset = ActiveTrackLocation.TrackSectionOffset; + nodeBeingDragged.TrackSectionOffset = ActiveTrackLocation.TrackSectionOffset; return true; } @@ -1547,7 +1546,7 @@ void FindDraggingLimitsStart() dragLimitNode2 = nodeBeingDragged.NextMainNode; } } - + void FindDraggingLimitsEnd() { dragLimitNode1 = nodeBeingDragged.PrevNode; @@ -1564,7 +1563,7 @@ void FindDraggingLimitsReverse() { // we now need to find which of the next and previous nodes is closest to the reverse point TrainpathVectorNode prevVectorNode = nodeBeingDragged.PrevNode as TrainpathVectorNode; TrainpathVectorNode nextVectorNode = nodeBeingDragged.NextMainNode as TrainpathVectorNode; - + if (prevVectorNode == null) { // prev is a junction node. Then either the next node is a vector node, or it is the same junction. Just take it dragLimitNode1 = nodeBeingDragged.NextMainNode; @@ -1575,7 +1574,8 @@ void FindDraggingLimitsReverse() } else { // both are vector nodes. - if (prevVectorNode.IsBetween(nextVectorNode,nodeBeingDragged)) { + if (prevVectorNode.IsBetween(nextVectorNode, nodeBeingDragged)) + { dragLimitNode1 = nodeBeingDragged.PrevNode; } else @@ -1629,7 +1629,7 @@ public class EditorActionMouseDragAutoConnect : EditorActionMouseDrag private ContinuousAutoConnecting autoConnectReverse; private TrainpathVectorNode nodeBeingDragged; // link to a possibly possibly temporary node that is being dragged. private int netNodesDeleted; - + //private DebugWindow debugWindow; /// Constructor public EditorActionMouseDragAutoConnect() @@ -1830,7 +1830,7 @@ private bool CouldAndMadeConnectionEnd() if (connectionIsGood) { - PrepareNodeCountUpdate(autoConnectReverse.ReconnectTrainpathNode, nodeBeingDragged, 0); + PrepareNodeCountUpdate(autoConnectReverse.ReconnectTrainpathNode, nodeBeingDragged, 0); autoConnectReverse.CreateFoundConnection(ModificationTools, true); // note: reverse is not yet done, compare 'normal connection' } @@ -1877,7 +1877,7 @@ protected override int NetMainNodesAdded() // * Passing paths. } #endregion - + #region NonInteractiveActions /// /// Subclass to implement the 'action': add Missing ambiguity nodes. This is not an interactive action, but still and edit to the path. @@ -1894,7 +1894,7 @@ protected override bool CanExecuteAction() } /// Execute the action. This assumes that the action can be executed - protected override void ExecuteAction() {} + protected override void ExecuteAction() { } /// /// Add additional main nodes (to the end of the current path) diff --git a/Source/Contrib/TrackViewer/Editing/ModificationTools.cs b/Source/Contrib/TrackViewer/Editing/ModificationTools.cs index cd0b3e0e79..00a006dadc 100644 --- a/Source/Contrib/TrackViewer/Editing/ModificationTools.cs +++ b/Source/Contrib/TrackViewer/Editing/ModificationTools.cs @@ -15,10 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; using Orts.Simulation; namespace ORTS.TrackViewer.Editing @@ -34,7 +30,7 @@ public class ModificationTools #region node counting /// Keeps cound of the net amount of nodes that have been added public int NetNodesAdded { get; private set; } - + /// /// Reset the amount of nodes added /// @@ -142,7 +138,7 @@ TrainpathJunctionNode AddAdditionalJunctionNode(TrainpathNode lastNode, int next newNode.SetFacingPoint(); newNode.DetermineOrientation(lastNode, nextTvnIndex); - NetNodesAdded ++ ; + NetNodesAdded++; return newNode; } @@ -174,7 +170,7 @@ public TrainpathVectorNode AddAdditionalVectorNode(TrainpathNode lastNode, Train lastNode.NextSidingNode = newNode; } - NetNodesAdded ++; + NetNodesAdded++; return newNode; } @@ -306,10 +302,10 @@ public void AddDisambiguityNodeIfNeeded(TrainpathNode currentNode) { //Check if we need to add an disambiguity node TrainpathJunctionNode currentNodeAsJunction = currentNode as TrainpathJunctionNode; - if ( (currentNodeAsJunction != null) + if ((currentNodeAsJunction != null) && (currentNode.NextMainNode != null) && (currentNode.NextMainNode is TrainpathJunctionNode) - && (currentNodeAsJunction.IsSimpleSidingStart()) + && (currentNodeAsJunction.IsSimpleSidingStart()) ) { TrainpathVectorNode halfwayNode = CreateHalfWayNode(currentNodeAsJunction, currentNodeAsJunction.NextMainTvnIndex); @@ -385,7 +381,7 @@ public void StitchTwoPaths(TrainpathNode lastNodeFirstPath, TrainpathNode firstN //in case the first node of the second path is a vector, make sure that its next tvn index is copied if (firstNodeSecondPathAsVector != null) - { + { if (isMainPath) { lastNodeFirstPath.NextMainTvnIndex = firstNodeSecondPathAsVector.TvnIndex; diff --git a/Source/Contrib/TrackViewer/Editing/PathEditor.cs b/Source/Contrib/TrackViewer/Editing/PathEditor.cs index aaca7f4d5b..b9e22e7afc 100644 --- a/Source/Contrib/TrackViewer/Editing/PathEditor.cs +++ b/Source/Contrib/TrackViewer/Editing/PathEditor.cs @@ -16,17 +16,14 @@ // along with Open Rails. If not, see . // -using System; -using System.Collections.ObjectModel; using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; -using System.Text; -using ORTS.TrackViewer.Drawing; - +using System.Windows; +using System.Windows.Controls; using Orts.Formats.Msts; using ORTS.Common; -using System.Windows.Controls; -using System.Windows; +using ORTS.TrackViewer.Drawing; namespace ORTS.TrackViewer.Editing { @@ -56,8 +53,9 @@ public class PathEditor /// The current path that we are editing public Trainpath CurrentTrainPath { get; private set; } /// Editing is active or not - public bool EditingIsActive { - get {return _editingIsActive;} + public bool EditingIsActive + { + get { return _editingIsActive; } set { _editingIsActive = value; OnActiveOrPathChanged(); } } @@ -88,7 +86,7 @@ public class PathEditor DrawTrackDB drawTrackDB; // We need to know what has been drawn, especially to get track closest to mouse TrackDB trackDB; TrackSectionsFile tsectionDat; - + DrawPath drawPath; // drawing of the path itself TrainpathNode activeNode; // active Node (if present) for which actions can be performed @@ -102,7 +100,7 @@ public class PathEditor Separator separatorActiveTrack; Separator separatorBroken; - const int practicalInfinityInt = int.MaxValue/2; // large, but not close to overflow + const int practicalInfinityInt = int.MaxValue / 2; // large, but not close to overflow int numberToDraw = practicalInfinityInt; // number of nodes to draw, start with all int maxNodesToAdd; // if at end of path, how many nodes do we allow to be added @@ -164,7 +162,7 @@ void CreateNonMenuActions() /// The route information that contains track data base and track section data /// The drawn tracks to know about where the mouse is/// The directory where paths will be stored public PathEditor(RouteData routeData, DrawTrackDB drawTrackDB, string pathsDirectory) - :this(routeData, drawTrackDB) + : this(routeData, drawTrackDB) { CurrentTrainPath = new Trainpath(trackDB, tsectionDat); FileName = CurrentTrainPath.PathId + ".pat"; @@ -180,7 +178,7 @@ public PathEditor(RouteData routeData, DrawTrackDB drawTrackDB, string pathsDire /// The drawn tracks to know about where the mouse is /// Path to the .pat file public PathEditor(RouteData routeData, DrawTrackDB drawTrackDB, ORTS.Menu.Path path) - :this(routeData, drawTrackDB) + : this(routeData, drawTrackDB) { FileName = path.FilePath.Split('\\').Last(); CurrentTrainPath = new Trainpath(trackDB, tsectionDat, path.FilePath); @@ -274,7 +272,8 @@ private void CreateDirectActions() /// /// Create the context menu from previously defined items. /// - private void CreateContextMenu() { + private void CreateContextMenu() + { contextMenu = new ContextMenu(); separatorActiveNode = new Separator(); @@ -292,7 +291,7 @@ private void CreateDirectActions() contextMenu.Items.Add(action.ActionMenuItem); } contextMenu.Items.Add(separatorActiveNode); - + foreach (EditorAction action in editorActionsActiveTrack) { @@ -305,7 +304,7 @@ private void CreateDirectActions() contextMenu.Items.Add(action.ActionMenuItem); } contextMenu.Items.Add(separatorBroken); - + foreach (EditorAction action in editorActionsOthers) { contextMenu.Items.Add(action.ActionMenuItem); @@ -313,7 +312,7 @@ private void CreateDirectActions() contextMenu.Closed += new RoutedEventHandler(ContextMenu_Closed); } - + /// /// Popup the context menu at the given location. Also disable updates related to mouse movement while menu is open. /// @@ -357,7 +356,7 @@ public void PopupContextMenu(int mouseX, int mouseY) someOtherActionIsPossible = someOtherActionIsPossible || actionCanBeExecuted; } - noActionPossibleMenuItem.Visibility = + noActionPossibleMenuItem.Visibility = (someNodeActionIsPossible || someTrackActionIsPossible || someOtherActionIsPossible) ? Visibility.Collapsed : Visibility.Visible; @@ -512,8 +511,8 @@ void DrawUntilHere(int newNumberToDraw) public void Draw(DrawArea drawArea) { DrawnPathData drawnPathData = new DrawnPathData(); - - int numberDrawn = drawPath.Draw(drawArea, CurrentTrainPath.FirstNode, CurrentTrainPath.FirstNodeOfTail, numberToDraw, + + int numberDrawn = drawPath.Draw(drawArea, CurrentTrainPath.FirstNode, CurrentTrainPath.FirstNodeOfTail, numberToDraw, drawnPathData); if (numberDrawn < numberToDraw) @@ -611,7 +610,7 @@ void FindActiveTrackLocation(DrawnPathData drawnPathData) activeTrackLocation.TrackSectionOffset = distance; activeTrackLocation.Location = location; - if ( (CurrentTrainPath.FirstNode != null) && (activeMouseDragAction == null) ) + if ((CurrentTrainPath.FirstNode != null) && (activeMouseDragAction == null)) { //Only in case this is not the first path. TrainpathNode prevNode = FindPrevNodeOfActiveTrack(drawnPathData, tni_int); if (prevNode == null || prevNode.HasSidingPath) @@ -756,13 +755,15 @@ public void ExtendWithPath(ORTS.Menu.Path path) // We have a current path and a new path. // First check if the new path is usable TrainpathNode newStart = newPath.FirstNode; - if (newPath.FirstNode == null || newPath.FirstNode.NextMainNode == null) { + if (newPath.FirstNode == null || newPath.FirstNode.NextMainNode == null) + { MessageBox.Show(TrackViewer.catalog.GetString("The selected path contains no or only 1 node. The current path was not extended.")); return; } TrainpathNode lastNode = CurrentTrainPath.FirstNode; - while (lastNode.NextMainNode != null) { + while (lastNode.NextMainNode != null) + { lastNode = lastNode.NextMainNode; } if (CurrentTrainPath.HasEnd) @@ -834,7 +835,7 @@ public void SaveStationNames() /// The screen y-location of where the edit metadata popup needs to be placed public void ReversePath(int popupX, int popupY) { - if (! CanReverse()) return; + if (!CanReverse()) return; CurrentTrainPath.StoreCurrentPath(); CurrentTrainPath.ReversePath(); EditMetaData(popupX, popupY); @@ -889,7 +890,8 @@ public bool AutoFixAllBrokenNodes() actionFixInvalid.DoAction(); brokenNodes = CurrentTrainPath.GetBrokenNodes(); } - else { + else + { fixSucceeded = false; nodeToTry++; } diff --git a/Source/Contrib/TrackViewer/Editing/PathMetadataDialog.xaml.cs b/Source/Contrib/TrackViewer/Editing/PathMetadataDialog.xaml.cs index 23fa615d6a..24668b0713 100644 --- a/Source/Contrib/TrackViewer/Editing/PathMetadataDialog.xaml.cs +++ b/Source/Contrib/TrackViewer/Editing/PathMetadataDialog.xaml.cs @@ -1,16 +1,5 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Windows; +using System.Windows; using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; namespace ORTS.TrackViewer.Editing { @@ -29,10 +18,10 @@ public PathMetadataDialog(string[] metadata, bool isPlayerPath) InitializeComponent(); this.Left = 100; this.Top = 10; - pathID.Text = metadata[0]; - pathName.Text = metadata[1]; + pathID.Text = metadata[0]; + pathName.Text = metadata[1]; pathStart.Text = metadata[2]; - pathEnd.Text = metadata[3]; + pathEnd.Text = metadata[3]; pathIsPlayerPath.IsChecked = isPlayerPath; pathID.Focus(); pathID.SelectAll(); diff --git a/Source/Contrib/TrackViewer/Editing/SavePatFile.cs b/Source/Contrib/TrackViewer/Editing/SavePatFile.cs index b9d2fcb61f..75cef0bfbe 100644 --- a/Source/Contrib/TrackViewer/Editing/SavePatFile.cs +++ b/Source/Contrib/TrackViewer/Editing/SavePatFile.cs @@ -17,9 +17,8 @@ // using System; using System.Collections.Generic; -using System.Linq; -using System.Text; using System.IO; +using System.Linq; using System.Windows.Forms; namespace ORTS.TrackViewer.Editing @@ -90,15 +89,15 @@ static bool UserCancelledBecauseOfUnfinishedPath(Trainpath trainpath) List cancelReasons = new List(); if (!trainpath.HasEnd) cancelReasons.Add(TrackViewer.catalog.GetString("* The path does not have a well-defined end-point")); //if (trainpath.IsBroken) cancelReasons.Add(TrackViewer.catalog.GetString("* The path has broken nodes or links")); - if (trainpath.FirstNodeOfTail!=null) cancelReasons.Add(TrackViewer.catalog.GetString("* The path has a stored and not-yet reconnected tail")); - + if (trainpath.FirstNodeOfTail != null) cancelReasons.Add(TrackViewer.catalog.GetString("* The path has a stored and not-yet reconnected tail")); + if (cancelReasons.Count == 0) return false; string message = TrackViewer.catalog.GetString("The current path is not finished:") + "\n"; message += String.Join("\n", cancelReasons.ToArray()); message += "\n" + TrackViewer.catalog.GetString("Do you want to continue?"); - DialogResult dialogResult = MessageBox.Show(message, + DialogResult dialogResult = MessageBox.Show(message, TrackViewer.catalog.GetString("Trackviewer Path Editor"), MessageBoxButtons.OKCancel, MessageBoxIcon.Question); return (dialogResult == DialogResult.Cancel); @@ -143,7 +142,7 @@ static void CreatePDPsAndTrpathNodes(Trainpath trainpath) { trackPDPs = new List(); trpathnodes = new List(); - pdpOfJunction = new Dictionary(); + pdpOfJunction = new Dictionary(); uint nextMainIndex = 1; TrainpathNode currentMainNode = trainpath.FirstNode; @@ -154,7 +153,7 @@ static void CreatePDPsAndTrpathNodes(Trainpath trainpath) if (currentMainNode.NextSidingNode == null) { AddNode(currentMainNode, nextMainIndex, nonext); - } + } else { // This is a siding start. @@ -183,7 +182,7 @@ static void CreatePDPsAndTrpathNodes(Trainpath trainpath) extraMainNodes++; tempMainNode = tempMainNode.NextMainNode; // It should exist, if not path editor itself is broken. } - + if (extraSidingNodes == 0) { @@ -200,14 +199,14 @@ static void CreatePDPsAndTrpathNodes(Trainpath trainpath) currentSidingNode = currentMainNode.NextSidingNode; while (currentSidingNode.NextSidingNode.NextSidingNode != null) { - nextSidingIndex++; + nextSidingIndex++; AddNode(currentSidingNode, nonext, nextSidingIndex); currentSidingNode = currentSidingNode.NextSidingNode; } // Write the final siding node, linking to main path again. AddNode(currentSidingNode, nonext, nextMainIndex + extraMainNodes); - + } } nextMainIndex++; @@ -229,7 +228,7 @@ private static void AddNode(TrainpathNode node, uint nextMainIndex, uint nextSid int pdpIndex; string trackPDPstart = String.Format(System.Globalization.CultureInfo.InvariantCulture, "\tTrackPDP ( {0,6:D} {1,6:D} {2,9} {3,9:F3} {4,9:F3}", - node.Location.TileX, node.Location.TileZ, + node.Location.TileX, node.Location.TileZ, node.Location.Location.X.ToString("F3", System.Globalization.CultureInfo.CreateSpecificCulture("en-US")), node.Location.Location.Y.ToString("F3", System.Globalization.CultureInfo.CreateSpecificCulture("en-US")), node.Location.Location.Z.ToString("F3", System.Globalization.CultureInfo.CreateSpecificCulture("en-US"))); @@ -264,7 +263,7 @@ private static void AddNode(TrainpathNode node, uint nextMainIndex, uint nextSid "{0} {1} {2} )", trackPDPstart, 1, 1)); } } - + trpathnodes.Add(String.Format(System.Globalization.CultureInfo.InvariantCulture, "\t\tTrPathNode ( {0} {1} {2} {3} )", node.FlagsToString(), nextMainIndex, nextSidingIndex, pdpIndex)); @@ -290,18 +289,19 @@ private static void WriteToFile(Trainpath trainpath) file.WriteLine(")"); file.WriteLine("TrackPath ("); file.WriteLine("\tTrPathName ( \"" + trainpath.PathId + "\" )"); - + // How to format hex? "{0:X8}" is not working for me. Neither is {0:X08}. // Fortunately, {0:X} will use 8 characters anyway. Maybe because it knows the length from the number of bits in the number string flagsString = string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0:X}", trainpath.PathFlags); - file.WriteLine("\tTrPathFlags ( " + flagsString + " )"); - + file.WriteLine("\tTrPathFlags ( " + flagsString + " )"); + file.WriteLine("\tName ( \"" + trainpath.PathName + "\" )"); - file.WriteLine("\tTrPathStart ( \"" + trainpath.PathStart + "\" )"); + file.WriteLine("\tTrPathStart ( \"" + trainpath.PathStart + "\" )"); file.WriteLine("\tTrPathEnd ( \"" + trainpath.PathEnd + "\" )"); - file.Write ("\tTrPathNodes ( "); + file.Write("\tTrPathNodes ( "); file.WriteLine(trpathnodes.Count()); - foreach (string line in trpathnodes) { + foreach (string line in trpathnodes) + { file.WriteLine(line); } file.WriteLine("\t)"); diff --git a/Source/Contrib/TrackViewer/Editing/TrackExtensions.cs b/Source/Contrib/TrackViewer/Editing/TrackExtensions.cs index b891037447..86f7264d29 100644 --- a/Source/Contrib/TrackViewer/Editing/TrackExtensions.cs +++ b/Source/Contrib/TrackViewer/Editing/TrackExtensions.cs @@ -15,10 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; using Orts.Formats.Msts; namespace ORTS.TrackViewer.Editing @@ -49,7 +45,7 @@ public static void Initialize(TrackNode[] trackNodesIn, TrackSectionsFile tsecti { trackNodes = trackNodesIn; tsectionDat = tsectionDatIn; - + mainRouteIndex = new uint[trackNodes.Length]; sidingRouteIndex = new uint[trackNodes.Length]; for (int tni = 0; tni < trackNodes.Length; tni++) @@ -67,7 +63,7 @@ public static void Initialize(TrackNode[] trackNodesIn, TrackSectionsFile tsecti } catch (System.IO.InvalidDataException exception) { - exception.ToString(); + exception.ToString(); } mainRouteIndex[tni] = tn.Inpins + mainRoute; @@ -96,7 +92,7 @@ public static void Initialize(TrackNode[] trackNodesIn, TrackSectionsFile tsecti /// Return the tracknode corresponding the given index public static TrackNode TrackNode(int tvnIndex) { return trackNodes[tvnIndex]; } - + /// /// Get the index of the junction node at the other side of the linking track vector node. /// This uses only the track database, no trainpath nodes. @@ -134,7 +130,8 @@ public static int GetLeavingTvnIndex(int junctionIndex, int incomingTvnIndex) if (junctionIndex <= 0) return 0; // something wrong in database TrackNode junctionTrackNode = trackNodes[junctionIndex]; - if (junctionTrackNode == null) { + if (junctionTrackNode == null) + { return 0; } @@ -148,7 +145,7 @@ public static int GetLeavingTvnIndex(int junctionIndex, int incomingTvnIndex) } return junctionTrackNode.TrailingTvn(); } - + } } diff --git a/Source/Contrib/TrackViewer/Editing/Trainpath.cs b/Source/Contrib/TrackViewer/Editing/Trainpath.cs index 7360d0a787..d0e434970d 100644 --- a/Source/Contrib/TrackViewer/Editing/Trainpath.cs +++ b/Source/Contrib/TrackViewer/Editing/Trainpath.cs @@ -19,12 +19,10 @@ // Hence a different class using System; -using System.Collections.ObjectModel; using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; -using System.Text; using System.Windows.Forms; - using Orts.Formats.Msts; using Orts.Simulation; @@ -219,7 +217,7 @@ private static bool PatFileIsIncomplete(PathFile patFile) if (patFile.End == null) { return true; } if (patFile.TrackPDPs.Count == 0) { return true; } if (patFile.TrPathNodes.Count == 0) { return true; } - + return false; } @@ -602,7 +600,7 @@ public string[] StationNames() } return RemoveDoubles(stationNames); - + } private List StationNamesBetweenNodes(TrainpathNode firstNode, TrainpathNode secondNode) @@ -621,7 +619,7 @@ private List StationNamesBetweenNodes(TrainpathNode firstNode, Trainpath TrItem trItem = trackDB.TrItemTable[trackItemIndex]; if (trItem.ItemType == TrItem.trItemType.trPLATFORM) { - var traveller = new Traveller(tsectionDat, trackDB.TrackNodes, tn, + var traveller = new Traveller(tsectionDat, trackDB.TrackNodes, tn, trItem.TileX, trItem.TileZ, trItem.X, trItem.Z, Traveller.TravellerDirection.Forward); if (traveller != null) { @@ -632,7 +630,7 @@ private List StationNamesBetweenNodes(TrainpathNode firstNode, Trainpath stationNames.Add(platform.Station); } } - + } } @@ -703,14 +701,14 @@ public void ReversePath() //all intermediate nodes for (int i = 1; i < lastIndex; i++) { - mainNodes[i].NextMainNode = mainNodes[i+1]; - mainNodes[i].NextMainTvnIndex = mainNodes[i+1].NextMainTvnIndex; // note main TVN index was in reverse direction + mainNodes[i].NextMainNode = mainNodes[i + 1]; + mainNodes[i].NextMainTvnIndex = mainNodes[i + 1].NextMainTvnIndex; // note main TVN index was in reverse direction mainNodes[i].PrevNode = mainNodes[i - 1]; if (mainNodes[i].NodeType != TrainpathNodeType.Reverse) { // reverse nodes have input and output swapped, but they are not changed themselves! mainNodes[i].ReverseOrientation(); } - + if (mainNodes[i].NodeType == TrainpathNodeType.SidingStart) { ReverseSidingPath(mainNodes[i]); @@ -747,10 +745,10 @@ static void ReverseSidingPath(TrainpathNode oldSidingStart) sidingNodes[0].NextSidingTvnIndex = sidingNodes[1].NextSidingTvnIndex; sidingNodes[0].NodeType = TrainpathNodeType.SidingStart; // no reversing because this node is reversed as part of main path. - + // making new connections for all intermediate nodes, and reversing them as well // Note order is important. - for (int i = 1 ; i < lastIndex ; i++) + for (int i = 1; i < lastIndex; i++) { sidingNodes[i].NextSidingNode = sidingNodes[i + 1]; sidingNodes[i].NextSidingTvnIndex = sidingNodes[i + 1].NextSidingTvnIndex; // this was oriented in the other direction! diff --git a/Source/Contrib/TrackViewer/Editing/TrainpathNode.cs b/Source/Contrib/TrackViewer/Editing/TrainpathNode.cs index 78748c2aa2..60d2733b81 100644 --- a/Source/Contrib/TrackViewer/Editing/TrainpathNode.cs +++ b/Source/Contrib/TrackViewer/Editing/TrainpathNode.cs @@ -38,14 +38,11 @@ // Because the path is a double linked list, to prevent issues with garbage collection, an Unlink method is provided that removes the lilnks. using System; -using System.Collections.Generic; using System.Linq; -using System.Text; - using Orts.Formats.Msts; +using Orts.Simulation; using ORTS.Common; using ORTS.TrackViewer.Drawing; -using Orts.Simulation; namespace ORTS.TrackViewer.Editing { @@ -53,7 +50,8 @@ namespace ORTS.TrackViewer.Editing /// /// Enumerate the various types of nodes that are available /// - public enum TrainpathNodeType { + public enum TrainpathNodeType + { /// Node is the start node Start, /// Node is the end node (and not just the last node) @@ -110,7 +108,7 @@ public abstract class TrainpathNode /// True if the node is broken because off-track and therefore not drawable public bool IsBrokenOffTrack { get { return (brokenStatus == NodeStatus.NotOnJunction) || (brokenStatus == NodeStatus.NotOnTrack); } } private NodeStatus brokenStatus; - + // From simple linking: /// Next path node on main path public TrainpathNode NextMainNode { get; set; } @@ -123,7 +121,7 @@ public abstract class TrainpathNode /// This does include siding start, but Siding end is the first node that has no siding path anymore. /// public bool HasSidingPath { get; set; } - + //To find these, both the current node and the next node need to be known. /// Index of main vector node leaving this path node public int NextMainTvnIndex { get; set; } @@ -144,14 +142,16 @@ public abstract class TrainpathNode /// A sub-class object properly initialized public static TrainpathNode CreatePathNode(TrPathNode tpn, TrackPDP pdp, TrackDB trackDB, TrackSectionsFile tsectionDat) { - if (pdp.IsJunction) { + if (pdp.IsJunction) + { // we do not use tpn: this means we do not interpret the flags return new TrainpathJunctionNode(pdp, trackDB, tsectionDat); } - else { + else + { return new TrainpathVectorNode(tpn, pdp, trackDB, tsectionDat); } - + } /// @@ -171,7 +171,7 @@ protected TrainpathNode(TrackDB trackDB, TrackSectionsFile tsectionDat) /// constructor, in case node is not created from PAT file. /// protected TrainpathNode(TrainpathNode otherNode) - :this(otherNode.TrackDB, otherNode.TsectionDat) + : this(otherNode.TrackDB, otherNode.TsectionDat) { } @@ -181,7 +181,7 @@ protected TrainpathNode(TrainpathNode otherNode) /// The trainpath constructor will initialize the rest. /// protected TrainpathNode(TrackPDP pdp, TrackDB trackDB, TrackSectionsFile tsectionDat) - :this(trackDB, tsectionDat) + : this(trackDB, tsectionDat) { Location = new WorldLocation(pdp.TileX, pdp.TileZ, pdp.X, pdp.Y, pdp.Z); if (pdp.IsInvalid) // not a valid point @@ -279,7 +279,7 @@ public string BrokenStatusString() } } - + /// /// String output for shorter debug information @@ -293,7 +293,7 @@ public string ToStringConnection() { return String.Format(System.Globalization.CultureInfo.CurrentCulture, "({0}-{1}-{2}){3}", (this.PrevNode == null) ? "-" : this.PrevNode.ToString(), - this.ToString(), + this.ToString(), (this.NextMainNode == null) ? "-" : this.NextMainNode.ToString(), (this.NextSidingNode == null) ? String.Empty : this.NextSidingNode.ToString()); } @@ -318,7 +318,7 @@ public class TrainpathJunctionNode : TrainpathNode public int SidingTvn { get { return TrackDB.TrackNodes[JunctionIndex].SidingTvn(); } } /// Return the vector node index of the trailing path leaving this junction public int TrailingTvn { get { return TrackDB.TrackNodes[JunctionIndex].TrailingTvn(); } } - + /// The maximum distance a junction node is allowed from its closest junction before it is said to be broken const float maxDistanceAway = 2.5f; @@ -328,7 +328,7 @@ public class TrainpathJunctionNode : TrainpathNode /// /// Just another node that already has trackDB and tsectionDB set public TrainpathJunctionNode(TrainpathNode otherNode) - :base(otherNode) + : base(otherNode) { } @@ -338,7 +338,7 @@ public TrainpathJunctionNode(TrainpathNode otherNode) /// Corresponding PDP in the .patfile /// /// - public TrainpathJunctionNode(TrackPDP pdp, TrackDB trackDB, TrackSectionsFile tsectionDat) + public TrainpathJunctionNode(TrackPDP pdp, TrackDB trackDB, TrackSectionsFile tsectionDat) : base(pdp, trackDB, tsectionDat) { JunctionIndex = FindJunctionOrEndIndex(true); @@ -387,7 +387,7 @@ public int FindJunctionOrEndIndex(bool wantJunctionNode) } } - bool broken = (bestDistance2 > maxDistanceAway*maxDistanceAway); + bool broken = (bestDistance2 > maxDistanceAway * maxDistanceAway); if (broken) { SetBroken(NodeStatus.NotOnJunction); @@ -404,7 +404,7 @@ public void SetFacingPoint() TrackNode tn = TrackDB.TrackNodes[JunctionIndex]; if (tn == null) return; // Leave IsFacingPoint to what it is. if (tn.TrJunctionNode == null) return; // Leave IsFacingPoint to what it is. - + //First try using the next main index if (NextMainNode != null && NextMainTvnIndex >= 0) { @@ -589,7 +589,7 @@ public bool IsSimpleSidingStart() public int OtherExitTvnIndex() { // selecting whether to do this on main or siding is simple: if there is no next main, has to be siding - int CurrentNextTvnIndex = (NextMainTvnIndex > 0 ) ? NextMainTvnIndex : NextSidingTvnIndex; + int CurrentNextTvnIndex = (NextMainTvnIndex > 0) ? NextMainTvnIndex : NextSidingTvnIndex; if (CurrentNextTvnIndex == MainTvn) { return SidingTvn; @@ -613,8 +613,8 @@ public void SetLocationFromTrackNode() /// public override string ToString() { - return String.Format(System.Globalization.CultureInfo.CurrentCulture, - "Junction {0}={1} ({2})", this.JunctionIndex, this.NodeType.ToString(), + return String.Format(System.Globalization.CultureInfo.CurrentCulture, + "Junction {0}={1} ({2})", this.JunctionIndex, this.NodeType.ToString(), this.IsFacingPoint ? "Facing" : "Trailing" ); } @@ -649,7 +649,7 @@ public class TrainpathVectorNode : TrainpathNode public float TrackSectionOffset { get; set; } /// number of seconds to wait after stopping at this node. /// For openrails advanced shunting it can mean something else (3HHMM, 4NNSS, 5???? formats) - public int WaitTimeS { get; set; } + public int WaitTimeS { get; set; } private bool _forwardOriented = true; /// is the path oriented forward or not (with respect of orientation of track itself @@ -665,7 +665,7 @@ public bool ForwardOriented /// /// public TrainpathVectorNode(TrackDB trackDB, TrackSectionsFile tsectionDat) - :base(trackDB, tsectionDat) + : base(trackDB, tsectionDat) { TvnIndex = 0; } @@ -675,7 +675,7 @@ public TrainpathVectorNode(TrackDB trackDB, TrackSectionsFile tsectionDat) /// /// Just another node that already has trackDB and tsectionDB set public TrainpathVectorNode(TrainpathNode otherNode) - :base(otherNode) + : base(otherNode) { TvnIndex = 0; } @@ -686,7 +686,7 @@ public TrainpathVectorNode(TrainpathNode otherNode) /// just another node to have access to trackDB and tsectiondat /// The traveller that contains the exact location and distance on track to initialize the node public TrainpathVectorNode(TrainpathNode otherNode, Traveller traveller) - :base(otherNode) + : base(otherNode) { CopyDataFromTraveller(traveller); Location = traveller.WorldLocation; // Not part of CopyDataFromTraveller @@ -698,7 +698,7 @@ public TrainpathVectorNode(TrainpathNode otherNode, Traveller traveller) /// /// public TrainpathVectorNode(TrainpathVectorNode nodeCandidate) - :base(nodeCandidate) + : base(nodeCandidate) { TvnIndex = nodeCandidate.TvnIndex; TrackVectorSectionIndex = nodeCandidate.TrackVectorSectionIndex; @@ -797,7 +797,7 @@ public override int FindTvnIndex(TrainpathNode nextNode) return this.TvnIndex; } - TrainpathJunctionNode nextAsJunctionNode = nextNode as TrainpathJunctionNode; + TrainpathJunctionNode nextAsJunctionNode = nextNode as TrainpathJunctionNode; if ((nextAsJunctionNode != null) && nextAsJunctionNode.ConnectsToTrack(TvnIndex)) { // vector node to junction node, junction must connect to tvnIndex return this.TvnIndex; @@ -829,7 +829,7 @@ public override void DetermineOrientation(TrainpathNode previousNode, int linkin ReverseOrientation(); } } - + /// /// Reverse the orientation of the node /// @@ -857,7 +857,7 @@ public bool IsEarlierOnTrackThan(TrainpathNode otherNode) || ((TrackVectorSectionIndex == otherVectorNode.TrackVectorSectionIndex) && (TrackSectionOffset < otherVectorNode.TrackSectionOffset)); - } + } /// /// Is the current node between the two other nodes or not. @@ -914,7 +914,7 @@ public override string FlagsToString() { int AAAA = 0; int BBBB = 0; - + switch (NodeType) { case TrainpathNodeType.Start: @@ -931,7 +931,7 @@ public override string FlagsToString() default: BBBB = 4; //intermediate point; break; - + } return string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0:x4}{1:x4}", AAAA, BBBB); @@ -960,7 +960,7 @@ public int GetPrevJunctionIndex(int linkingTrackNodeIndex) TrackNode linkingTrackNode = TrackDB.TrackNodes[linkingTrackNodeIndex]; bool towardsNodeIsForwardOriented = (this.NodeType == TrainpathNodeType.Reverse) - ? !ForwardOriented + ? !ForwardOriented : ForwardOriented; return towardsNodeIsForwardOriented ? linkingTrackNode.JunctionIndexAtStart() diff --git a/Source/Contrib/TrackViewer/Editing/WaitPointDialog.xaml.cs b/Source/Contrib/TrackViewer/Editing/WaitPointDialog.xaml.cs index dc2e6649ee..94d975441b 100644 --- a/Source/Contrib/TrackViewer/Editing/WaitPointDialog.xaml.cs +++ b/Source/Contrib/TrackViewer/Editing/WaitPointDialog.xaml.cs @@ -15,19 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; +using System.Text.RegularExpressions; using System.Windows; using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; -using System.Text.RegularExpressions; namespace ORTS.TrackViewer.Editing { @@ -56,7 +47,7 @@ public WaitPointDialog(int mouseX, int mouseY, int currentWaitTimeS) waitTimeMinutes.Text = "1"; waitTimeSeconds.Text = "1"; blowHornSeconds.Text = "1"; - + if (currentWaitTimeS >= 30000 && currentWaitTimeS < 40000) { // Absolute time to wait until. @@ -106,7 +97,7 @@ public WaitPointDialog(int mouseX, int mouseY, int currentWaitTimeS) ///Return the selected wait time in seconds public int GetWaitTime() { - + if (selectUntil.IsChecked == true) { // coding is 3HHMM @@ -159,13 +150,14 @@ public int GetWaitTime() int GetIntOrZero(string inputText) { - int returnValue; + int returnValue; try { returnValue = Convert.ToInt32(inputText, System.Globalization.CultureInfo.CurrentCulture); } - catch { - returnValue=0; + catch + { + returnValue = 0; } return returnValue; } @@ -270,6 +262,6 @@ private void TwoDigits_TextChanged(object sender, TextChangedEventArgs e) } UpdateWaitTime(); } - + } } diff --git a/Source/Contrib/TrackViewer/Program.cs b/Source/Contrib/TrackViewer/Program.cs index 07bf7b2d07..27df072c07 100644 --- a/Source/Contrib/TrackViewer/Program.cs +++ b/Source/Contrib/TrackViewer/Program.cs @@ -52,7 +52,7 @@ static void Main(string[] args) "This error may be due to bad data or a bug. ", Application.ProductName, errorSummary), Application.ProductName, MessageBoxButtons.OKCancel, MessageBoxIcon.Error); - + } trackViewer.Exit(); } diff --git a/Source/Contrib/TrackViewer/TrackViewer.cs b/Source/Contrib/TrackViewer/TrackViewer.cs index 3b4e5fbd6c..76dc3028f6 100644 --- a/Source/Contrib/TrackViewer/TrackViewer.cs +++ b/Source/Contrib/TrackViewer/TrackViewer.cs @@ -17,24 +17,21 @@ // using System; -using System.Collections.ObjectModel; using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; -using System.Text; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; - -using System.Windows.Forms; using System.Reflection; +using System.Windows.Forms; using GNU.Gettext; -using ORTS.Menu; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using ORTS.Common; -using Orts.Common; +using ORTS.Menu; using ORTS.TrackViewer.Drawing; using ORTS.TrackViewer.Drawing.Labels; -using ORTS.TrackViewer.UserInterface; using ORTS.TrackViewer.Editing; using ORTS.TrackViewer.Editing.Charts; +using ORTS.TrackViewer.UserInterface; namespace ORTS.TrackViewer { @@ -212,7 +209,7 @@ protected override void Initialize() { Properties.Settings.Default.installDirectory = MSTS.MSTSPath.Base(); } - catch {} + catch { } } InstallFolder = new Folder("default", Properties.Settings.Default.installDirectory); @@ -243,7 +240,7 @@ void SetSubwindowSizes() //Some on-screen features depend on the actual font-height int halfHeight = (int)(fontManager.DefaultFont.Height / 2); - drawScaleRuler.SetLocationAndSize(halfHeight, ScreenH - statusbarHeight - halfHeight, 2*halfHeight); + drawScaleRuler.SetLocationAndSize(halfHeight, ScreenH - statusbarHeight - halfHeight, 2 * halfHeight); drawLongitudeLatitude = new DrawLongitudeLatitude(halfHeight, menuHeight); drawEditorAction = new DrawEditorAction(halfHeight, menuHeight + 2 * halfHeight); } @@ -366,18 +363,18 @@ protected override void Update(GameTime gameTime) if (DrawPATfile != null && Properties.Settings.Default.showPATfile) { - if (TVUserInput.IsPressed(TVUserCommands.ExtendPath)) DrawPATfile.ExtendPath(); + if (TVUserInput.IsPressed(TVUserCommands.ExtendPath)) DrawPATfile.ExtendPath(); if (TVUserInput.IsPressed(TVUserCommands.ExtendPathFull)) DrawPATfile.ExtendPathFull(); - if (TVUserInput.IsPressed(TVUserCommands.ReducePath)) DrawPATfile.ReducePath(); + if (TVUserInput.IsPressed(TVUserCommands.ReducePath)) DrawPATfile.ReducePath(); if (TVUserInput.IsPressed(TVUserCommands.ReducePathFull)) DrawPATfile.ReducePathFull(); if (TVUserInput.IsDown(TVUserCommands.ShiftToPathLocation)) DrawArea.ShiftToLocation(DrawPATfile.CurrentLocation); } if (PathEditor != null && Properties.Settings.Default.showTrainpath) { - if (TVUserInput.IsPressed(TVUserCommands.ExtendPath)) PathEditor.ExtendPath(); + if (TVUserInput.IsPressed(TVUserCommands.ExtendPath)) PathEditor.ExtendPath(); if (TVUserInput.IsPressed(TVUserCommands.ExtendPathFull)) PathEditor.ExtendPathFull(); - if (TVUserInput.IsPressed(TVUserCommands.ReducePath)) PathEditor.ReducePath(); + if (TVUserInput.IsPressed(TVUserCommands.ReducePath)) PathEditor.ReducePath(); if (TVUserInput.IsPressed(TVUserCommands.ReducePathFull)) PathEditor.ReducePathFull(); if (TVUserInput.IsDown(TVUserCommands.ShiftToPathLocation)) DrawArea.ShiftToLocation(PathEditor.CurrentLocation); @@ -388,7 +385,7 @@ protected override void Update(GameTime gameTime) } var mouseLocationAbsoluteX = Window.ClientBounds.Left + TVUserInput.MouseLocationX; - var mouseLocationAbsoluteY = Window.ClientBounds.Top + TVUserInput.MouseLocationY; + var mouseLocationAbsoluteY = Window.ClientBounds.Top + TVUserInput.MouseLocationY; if (PathEditor != null && PathEditor.EditingIsActive) { if (TVUserInput.IsMouseRightButtonPressed()) @@ -569,7 +566,7 @@ protected override void Draw(GameTime gameTime) drawAreaInset.DrawBorder(Color.Black); } - if (DrawMultiplePaths != null ) DrawMultiplePaths.Draw(DrawArea); + if (DrawMultiplePaths != null) DrawMultiplePaths.Draw(DrawArea); if (DrawPATfile != null && Properties.Settings.Default.showPATfile) DrawPATfile.Draw(DrawArea); if (PathEditor != null && Properties.Settings.Default.showTrainpath) PathEditor.Draw(DrawArea); drawEditorAction.Draw(PathEditor); @@ -621,7 +618,8 @@ public void ShowPathChart() public void Quit() { string message = String.Empty; - if (PathEditor!=null && PathEditor.HasModifiedPath) { + if (PathEditor != null && PathEditor.HasModifiedPath) + { message = catalog.GetString("The path you are working on has un-saved changes.\n"); } message += catalog.GetString("Do you really want to Quit?"); @@ -739,7 +737,8 @@ void HandleCommandLineArgs() } string installFolder = System.IO.Directory.GetParent(System.IO.Directory.GetParent(routeFolder).ToString()).ToString(); - if (!SetSelectedInstallFolder(installFolder)) { + if (!SetSelectedInstallFolder(installFolder)) + { MessageBox.Show(string.Format(catalog.GetString("Route cannot be loaded.\nWhile trying to open {0} the folder {1} was inferred as (MSTS or similar) install folder but does not contain expected files"), givenPathOrFile, installFolder)); return; } diff --git a/Source/Contrib/TrackViewer/UserInterface/Languages.cs b/Source/Contrib/TrackViewer/UserInterface/Languages.cs index 1df77cbf95..38ff1999ae 100644 --- a/Source/Contrib/TrackViewer/UserInterface/Languages.cs +++ b/Source/Contrib/TrackViewer/UserInterface/Languages.cs @@ -16,11 +16,10 @@ // along with Open Rails. If not, see . using System; using System.Collections.Generic; -using System.Linq; -using System.Text; +using System.Globalization; using System.IO; +using System.Linq; using System.Windows.Forms; -using System.Globalization; namespace ORTS.TrackViewer.UserInterface { diff --git a/Source/Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs b/Source/Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs index 96c4ad500b..8d4ad04389 100644 --- a/Source/Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs +++ b/Source/Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs @@ -169,7 +169,8 @@ public void InitUserSettings() void UpdateMenuSettings() { menuShowPATfile.IsEnabled = !menuEnableEditing.IsChecked; - if (!menuShowPATfile.IsEnabled) { + if (!menuShowPATfile.IsEnabled) + { menuShowPATfile.IsChecked = false; } if (!menuShowSignals.IsChecked) @@ -412,7 +413,7 @@ public void PopulatePaths() /// public void PopulateStations() { - + if (trackViewer.DrawTrackDB == null) return; if (trackViewer.DrawTrackDB.StationLocations == null) return; List stations = trackViewer.DrawTrackDB.StationLocations.Keys.OrderBy(a => a.ToString()).ToList(); @@ -420,7 +421,7 @@ public void PopulateStations() menuStationCombobox.ItemsSource = stations; menuStationCombobox.SelectedItem = menuStationCombobox.Items.GetItemAt(0).ToString(); } - + /// /// Update the menu to make sure all the platforms are listed /// @@ -484,7 +485,7 @@ private void MenuItemCenterClosed(object sender, RoutedEventArgs e) if (menuStationCombobox.Items.Count > 0) { menuStationCombobox.SelectedItem = menuStationCombobox.Items.GetItemAt(0).ToString(); - } + } if (menuPlatformCombobox.Items.Count > 0) { menuPlatformCombobox.SelectedItem = menuPlatformCombobox.Items.GetItemAt(0).ToString(); @@ -757,7 +758,7 @@ public void MenuToggleShowSignals() } UpdateMenuSettings(); } - + /// /// Toggle whether the speedlimits are shown /// @@ -1084,7 +1085,7 @@ class PreferenceData public void PopulateLanguages() { comboBoxLanguage.ItemsSource = trackViewer.LanguageManager.Languages; - comboBoxLanguage.SelectedValue = LanguageManager.CurrentLanguageCode; + comboBoxLanguage.SelectedValue = LanguageManager.CurrentLanguageCode; } private void ComboBoxLanguage_SelectionChanged(object sender, SelectionChangedEventArgs e) @@ -1195,7 +1196,7 @@ public interface IPreferenceChanger /// /// Dictionary that supports saving to stored user settings. /// - class SaveableSettingsDictionary : Dictionary + class SaveableSettingsDictionary : Dictionary { /// /// Constructor. Also loads the values from stored settings. @@ -1244,7 +1245,7 @@ public void Save() private static StringCollection ToStringCollection(Dictionary dictionary) { StringCollection result = new StringCollection(); - foreach (KeyValuePair kvp in dictionary) + foreach (KeyValuePair kvp in dictionary) { result.Add(kvp.Key); result.Add(kvp.Value); diff --git a/Source/Contrib/TrackViewer/UserInterface/OtherPathsWindow.xaml.cs b/Source/Contrib/TrackViewer/UserInterface/OtherPathsWindow.xaml.cs index ea58f3ef89..e3d5127049 100644 --- a/Source/Contrib/TrackViewer/UserInterface/OtherPathsWindow.xaml.cs +++ b/Source/Contrib/TrackViewer/UserInterface/OtherPathsWindow.xaml.cs @@ -1,16 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Windows; +using System.Windows; using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; using ORTS.TrackViewer.Drawing; namespace ORTS.TrackViewer.UserInterface @@ -85,7 +75,7 @@ private void RecolorAll() if (backgroundColor == null) { checkBox.IsChecked = false; - checkBox.Foreground = new SolidColorBrush(Color.FromArgb(255,0,0,0)); + checkBox.Foreground = new SolidColorBrush(Color.FromArgb(255, 0, 0, 0)); } else { diff --git a/Source/Contrib/TrackViewer/UserInterface/SearchControl.xaml.cs b/Source/Contrib/TrackViewer/UserInterface/SearchControl.xaml.cs index 7801d7ba5a..a45bf599bb 100644 --- a/Source/Contrib/TrackViewer/UserInterface/SearchControl.xaml.cs +++ b/Source/Contrib/TrackViewer/UserInterface/SearchControl.xaml.cs @@ -16,28 +16,17 @@ // along with Open Rails. If not, see . // using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; +using System.Text.RegularExpressions; using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; - -using System.Windows.Forms.Integration; -using System.Text.RegularExpressions; namespace ORTS.TrackViewer.UserInterface { /// /// The kind of items that can be searched from the search control /// - public enum SearchableItem { + public enum SearchableItem + { /// Search for (rail) track node TrackNode, /// Search for (rail) track item diff --git a/Source/Contrib/TrackViewer/UserInterface/StatusBarControl.xaml.cs b/Source/Contrib/TrackViewer/UserInterface/StatusBarControl.xaml.cs index dba46509f6..fc6c3f5fb9 100644 --- a/Source/Contrib/TrackViewer/UserInterface/StatusBarControl.xaml.cs +++ b/Source/Contrib/TrackViewer/UserInterface/StatusBarControl.xaml.cs @@ -17,21 +17,11 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Windows; using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; using System.Windows.Forms.Integration; using Orts.Formats.Msts; using ORTS.Common; -using ORTS.TrackViewer.Properties; using ORTS.TrackViewer.Editing; @@ -58,7 +48,7 @@ public StatusBarControl(TrackViewer trackViewer) { InitializeComponent(); - StatusbarHeight = (int) tvStatusbar.Height; + StatusbarHeight = (int)tvStatusbar.Height; //ElementHost object helps us to connect a WPF User Control. elementHost = new ElementHost @@ -79,7 +69,7 @@ public StatusBarControl(TrackViewer trackViewer) /// Y-value in screen pixels at the bottom of the statusbar public void SetScreenSize(int width, int height, int yBottom) { - elementHost.Location = new System.Drawing.Point(0, yBottom-height); + elementHost.Location = new System.Drawing.Point(0, yBottom - height); elementHost.Size = new System.Drawing.Size(width, height); } @@ -241,16 +231,16 @@ private void AddTrainpathStatus(TrackViewer trackViewer) { //gather some info on path status List statusItems = new List(); - + if (trackViewer.PathEditor.HasEndingPath) statusItems.Add("good end"); if (trackViewer.PathEditor.HasBrokenPath) statusItems.Add("broken"); if (trackViewer.PathEditor.HasModifiedPath) statusItems.Add("modified"); if (trackViewer.PathEditor.HasStoredTail) statusItems.Add("stored tail"); - + string pathStatus = String.Join(", ", statusItems.ToArray()); - + ORTS.TrackViewer.Editing.TrainpathNode curNode = trackViewer.PathEditor.CurrentNode; - + statusAdditional.Text += string.Format(System.Globalization.CultureInfo.CurrentCulture, " {0} ({4}): TVNs=[{1} {2}] (type={3})", trackViewer.PathEditor.FileName, curNode.NextMainTvnIndex, curNode.NextSidingTvnIndex, @@ -268,7 +258,7 @@ private void AddTrainpathStatus(TrackViewer trackViewer) " (wait-time={0}s)", curVectorNode.WaitTimeS); } - + } else { diff --git a/Source/Contrib/TrackViewer/UserInterface/TVInputSettings.cs b/Source/Contrib/TrackViewer/UserInterface/TVInputSettings.cs index 76bb515b1f..3d36a1a722 100644 --- a/Source/Contrib/TrackViewer/UserInterface/TVInputSettings.cs +++ b/Source/Contrib/TrackViewer/UserInterface/TVInputSettings.cs @@ -21,17 +21,6 @@ // Here all possible key commands are defined (enumerated) as well as linked to a specific key or key combination. using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Globalization; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices; -using System.Text; -using Microsoft.Win32; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Microsoft.Xna.Framework.Input; using ORTS.Settings; @@ -166,7 +155,7 @@ public static class TVInputSettings /// Array of commands that have been defined and for which a key-combination can and should be defined below /// public static UserCommandInput[] Commands = new UserCommandInput[Enum.GetNames(typeof(TVUserCommands)).Length]; - + //static readonly string[] KeyboardLayout = new[] { // "[01 ] [3B ][3C ][3D ][3E ] [3F ][40 ][41 ][42 ] [43 ][44 ][57 ][58 ] [37 ][46 ][11D]", // " ", @@ -183,20 +172,20 @@ public static class TVInputSettings public static void SetDefaults() { Commands[(int)TVUserCommands.ReloadRoute] = new ORTS.Settings.UserCommandKeyInput(0x13, ORTS.Settings.KeyModifiers.Control); - Commands[(int)TVUserCommands.ZoomIn] = new ORTS.Settings.UserCommandKeyInput(0x0D); - Commands[(int)TVUserCommands.ZoomOut] = new ORTS.Settings.UserCommandKeyInput(0x0C); + Commands[(int)TVUserCommands.ZoomIn] = new ORTS.Settings.UserCommandKeyInput(0x0D); + Commands[(int)TVUserCommands.ZoomOut] = new ORTS.Settings.UserCommandKeyInput(0x0C); Commands[(int)TVUserCommands.ZoomInSlow] = new ORTS.Settings.UserCommandKeyInput(0x0D, ORTS.Settings.KeyModifiers.Shift); - Commands[(int)TVUserCommands.ZoomOutSlow]= new ORTS.Settings.UserCommandKeyInput(0x0C, ORTS.Settings.KeyModifiers.Shift); - Commands[(int)TVUserCommands.ZoomReset] = new ORTS.Settings.UserCommandKeyInput(0x13); + Commands[(int)TVUserCommands.ZoomOutSlow] = new ORTS.Settings.UserCommandKeyInput(0x0C, ORTS.Settings.KeyModifiers.Shift); + Commands[(int)TVUserCommands.ZoomReset] = new ORTS.Settings.UserCommandKeyInput(0x13); Commands[(int)TVUserCommands.ZoomToTile] = new ORTS.Settings.UserCommandKeyInput(0x2C); - Commands[(int)TVUserCommands.ShiftLeft] = new ORTS.Settings.UserCommandKeyInput(0x4B); + Commands[(int)TVUserCommands.ShiftLeft] = new ORTS.Settings.UserCommandKeyInput(0x4B); Commands[(int)TVUserCommands.ShiftRight] = new ORTS.Settings.UserCommandKeyInput(0x4D); - Commands[(int)TVUserCommands.ShiftUp] = new ORTS.Settings.UserCommandKeyInput(0x48); - Commands[(int)TVUserCommands.ShiftDown] = new ORTS.Settings.UserCommandKeyInput(0x50); + Commands[(int)TVUserCommands.ShiftUp] = new ORTS.Settings.UserCommandKeyInput(0x48); + Commands[(int)TVUserCommands.ShiftDown] = new ORTS.Settings.UserCommandKeyInput(0x50); Commands[(int)TVUserCommands.ShiftToPathLocation] = new ORTS.Settings.UserCommandKeyInput(0x2E); Commands[(int)TVUserCommands.ShiftToMouseLocation] = new ORTS.Settings.UserCommandKeyInput(0x2E, ORTS.Settings.KeyModifiers.Shift); Commands[(int)TVUserCommands.ToggleZoomAroundMouse] = new ORTS.Settings.UserCommandKeyInput(0x32); - + Commands[(int)TVUserCommands.ToggleShowSpeedLimits] = new ORTS.Settings.UserCommandKeyInput(0x3F); Commands[(int)TVUserCommands.ToggleShowMilePosts] = new ORTS.Settings.UserCommandKeyInput(0x3F, ORTS.Settings.KeyModifiers.Shift); Commands[(int)TVUserCommands.ToggleShowTerrain] = new ORTS.Settings.UserCommandKeyInput(0x40); @@ -219,9 +208,9 @@ public static void SetDefaults() Commands[(int)TVUserCommands.PlaceEndPoint] = new ORTS.Settings.UserCommandKeyInput(0x12); Commands[(int)TVUserCommands.PlaceWaitPoint] = new ORTS.Settings.UserCommandKeyInput(0x11); - Commands[(int)TVUserCommands.AddLabel] = new ORTS.Settings.UserCommandKeyInput(0x26); - Commands[(int)TVUserCommands.Quit] = new ORTS.Settings.UserCommandKeyInput(0x10); - Commands[(int)TVUserCommands.Debug] = new ORTS.Settings.UserCommandKeyInput(0x34); + Commands[(int)TVUserCommands.AddLabel] = new ORTS.Settings.UserCommandKeyInput(0x26); + Commands[(int)TVUserCommands.Quit] = new ORTS.Settings.UserCommandKeyInput(0x10); + Commands[(int)TVUserCommands.Debug] = new ORTS.Settings.UserCommandKeyInput(0x34); Commands[(int)TVUserCommands.DebugDumpKeymap] = new ORTS.Settings.UserCommandKeyInput(0x3B, ORTS.Settings.KeyModifiers.Alt); Commands[(int)TVUserCommands.MouseZoomSlow] = new UserCommandModifierInput(Settings.KeyModifiers.Shift); diff --git a/Source/Contrib/TrackViewer/UserInterface/TVUserInput.cs b/Source/Contrib/TrackViewer/UserInterface/TVUserInput.cs index 7932f146d2..55cfdf4430 100644 --- a/Source/Contrib/TrackViewer/UserInterface/TVUserInput.cs +++ b/Source/Contrib/TrackViewer/UserInterface/TVUserInput.cs @@ -86,7 +86,7 @@ public static void Update() || LastMouseState.ScrollWheelValue != MouseState.ScrollWheelValue) { Changed = true; - + } #if DEBUG_RAW_INPUT for (Keys key = 0; key <= Keys.OemClear; key++) diff --git a/Source/Launcher/Program.cs b/Source/Launcher/Program.cs index 8861154b15..247020a621 100644 --- a/Source/Launcher/Program.cs +++ b/Source/Launcher/Program.cs @@ -25,13 +25,13 @@ * - Microsoft .NET Framework 4.7.2 */ -using Microsoft.Win32; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Text; using System.Windows.Forms; +using Microsoft.Win32; namespace ORTS { diff --git a/Source/Menu/ImportExportSaveForm.cs b/Source/Menu/ImportExportSaveForm.cs index cf3db721af..4f54ecd147 100644 --- a/Source/Menu/ImportExportSaveForm.cs +++ b/Source/Menu/ImportExportSaveForm.cs @@ -46,7 +46,7 @@ public ImportExportSaveForm(ResumeForm.Save save) Font = SystemFonts.MessageBoxFont; Save = save; - if (!Directory.Exists(UserSettings.SavePackFolder)) Directory.CreateDirectory(UserSettings.SavePackFolder); + if (!Directory.Exists(UserSettings.SavePackFolder)) Directory.CreateDirectory(UserSettings.SavePackFolder); UpdateFileList(null); bExport.Enabled = !(Save == null); ofdImportSave.Filter = Application.ProductName + catalog.GetString("Save Packs") + " (*." + SavePackFileExtension + ")|*." + SavePackFileExtension + "|" + catalog.GetString("All files") + " (*.*)|*"; @@ -56,10 +56,10 @@ public ImportExportSaveForm(ResumeForm.Save save) private void bImportSave_Click_1(object sender, EventArgs e) { // Show the dialog and get result. - ofdImportSave.InitialDirectory = UserSettings.SavePackFolder; + ofdImportSave.InitialDirectory = UserSettings.SavePackFolder; if (ofdImportSave.ShowDialog() == DialogResult.OK) { - ExtractFilesFromZip(ofdImportSave.FileName, UserSettings.UserDataFolder); + ExtractFilesFromZip(ofdImportSave.FileName, UserSettings.UserDataFolder); UpdateFileList(catalog.GetStringFmt("Save Pack '{0}' imported successfully.", Path.GetFileNameWithoutExtension(ofdImportSave.FileName))); } } @@ -72,9 +72,9 @@ private void bExport_Click(object sender, EventArgs e) // For Zip, see http://weblogs.asp.net/jgalloway/archive/2007/10/25/creating-zip-archives-in-net-without-an-external-library-like-sharpziplib.aspx // Copy files to new package in folder save_packs - var fullFilePath = Path.Combine(UserSettings.UserDataFolder, Save.File); + var fullFilePath = Path.Combine(UserSettings.UserDataFolder, Save.File); var toFile = Path.GetFileNameWithoutExtension(Save.File) + "." + SavePackFileExtension; - var fullZipFilePath = Path.Combine(UserSettings.SavePackFolder, toFile); + var fullZipFilePath = Path.Combine(UserSettings.SavePackFolder, toFile); foreach (var fileName in new[] { fullFilePath, Path.ChangeExtension(fullFilePath, "png"), @@ -92,11 +92,11 @@ private void bViewSavePacksFolder_Click(object sender, EventArgs e) var objPSI = new System.Diagnostics.ProcessStartInfo(); var winDir = Environment.GetEnvironmentVariable("windir"); objPSI.FileName = winDir + @"\explorer.exe"; - objPSI.Arguments = "\"" + UserSettings.SavePackFolder + "\""; // Opens the Save Packs folder + objPSI.Arguments = "\"" + UserSettings.SavePackFolder + "\""; // Opens the Save Packs folder if (Save != null) { var toFile = Path.GetFileNameWithoutExtension(Save.File) + "." + SavePackFileExtension; - var fullZipFilePath = Path.Combine(UserSettings.SavePackFolder, toFile); + var fullZipFilePath = Path.Combine(UserSettings.SavePackFolder, toFile); if (File.Exists(fullZipFilePath)) { objPSI.Arguments = "/select,\"" + fullZipFilePath + "\""; // Opens the Save Packs folder and selects the exported SavePack @@ -108,7 +108,7 @@ private void bViewSavePacksFolder_Click(object sender, EventArgs e) void UpdateFileList(string message) { - var files = Directory.GetFiles(UserSettings.SavePackFolder, "*." + SavePackFileExtension); + var files = Directory.GetFiles(UserSettings.SavePackFolder, "*." + SavePackFileExtension); textBoxSavePacks.Text = String.IsNullOrEmpty(message) ? "" : message + "\r\n"; textBoxSavePacks.Text += catalog.GetPluralStringFmt("Save Pack folder contains {0} save pack:", "Save Pack folder contains {0} save packs:", files.Length); foreach (var s in files) diff --git a/Source/Menu/MainForm.cs b/Source/Menu/MainForm.cs index 580676fc47..fe4262868a 100644 --- a/Source/Menu/MainForm.cs +++ b/Source/Menu/MainForm.cs @@ -15,13 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using GNU.Gettext; -using GNU.Gettext.WinForms; -using Orts.Formats.OR; -using ORTS.Common; -using ORTS.Menu; -using ORTS.Settings; -using ORTS.Updater; using System; using System.Collections.Generic; using System.Diagnostics; @@ -31,8 +24,14 @@ using System.Linq; using System.Resources; using System.Runtime.InteropServices; -using System.Threading; using System.Windows.Forms; +using GNU.Gettext; +using GNU.Gettext.WinForms; +using Orts.Formats.OR; +using ORTS.Common; +using ORTS.Menu; +using ORTS.Settings; +using ORTS.Updater; using Path = ORTS.Menu.Path; namespace ORTS @@ -1138,7 +1137,7 @@ void ShowDetails() { if (SelectedTimetableSet != null) ShowDetail(catalog.GetStringFmt("Timetable set: {0}", SelectedTimetableSet), new string[0]); - // Description not shown as no description is available for a timetable set. + // Description not shown as no description is available for a timetable set. if (SelectedTimetable != null) ShowDetail(catalog.GetStringFmt("Timetable: {0}", SelectedTimetable), SelectedTimetable.Briefing.Split('\n')); @@ -1171,7 +1170,7 @@ void ShowDetails() /// /// /// - private string[] HideStartParameters(string [] info) + private string[] HideStartParameters(string[] info) { var fullStartTime = info[0].TrimStart(); var startTimeArray = fullStartTime.Split('$'); @@ -1352,7 +1351,7 @@ void SelectComboBoxItem(ComboBox comboBox, Func predicate) var index = (int)UserSettings.Menu_SelectionIndex.Activity; for (var i = 0; i < comboBox.Items.Count; i++) { - if (comboBox.Items[i] is T && predicate((T)comboBox.Items[i]) || (Settings.Menu_Selection.Length > i && comboBox.Items[i].ToString() == Settings.Menu_Selection[index] )) + if (comboBox.Items[i] is T && predicate((T)comboBox.Items[i]) || (Settings.Menu_Selection.Length > i && comboBox.Items[i].ToString() == Settings.Menu_Selection[index])) { comboBox.SelectedIndex = i; return; diff --git a/Source/Menu/Options.cs b/Source/Menu/Options.cs index f3eb209726..57f81bf131 100644 --- a/Source/Menu/Options.cs +++ b/Source/Menu/Options.cs @@ -179,7 +179,7 @@ public OptionsForm(UserSettings settings, UpdateManager updateManager, bool init checkSimpleControlsPhysics.Checked = Settings.SimpleControlPhysics; checkUseAdvancedAdhesion.Checked = Settings.UseAdvancedAdhesion; labelAdhesionMovingAverageFilterSize.Enabled = checkUseAdvancedAdhesion.Checked; - numericAdhesionMovingAverageFilterSize.Enabled = checkUseAdvancedAdhesion.Checked; + numericAdhesionMovingAverageFilterSize.Enabled = checkUseAdvancedAdhesion.Checked; numericAdhesionMovingAverageFilterSize.Value = Settings.AdhesionMovingAverageFilterSize; checkBreakCouplers.Checked = Settings.BreakCouplers; checkCurveSpeedDependent.Checked = Settings.CurveSpeedDependent; @@ -221,7 +221,7 @@ public OptionsForm(UserSettings settings, UpdateManager updateManager, bool init checkDataLogTrainSpeed.Checked = Settings.DataLogTrainSpeed; labelDataLogTSInterval.Enabled = checkDataLogTrainSpeed.Checked; numericDataLogTSInterval.Enabled = checkDataLogTrainSpeed.Checked; - checkListDataLogTSContents.Enabled = checkDataLogTrainSpeed.Checked; + checkListDataLogTSContents.Enabled = checkDataLogTrainSpeed.Checked; numericDataLogTSInterval.Value = Settings.DataLogTSInterval; checkListDataLogTSContents.Items.AddRange(new object[] { catalog.GetString("Time"), @@ -760,21 +760,21 @@ private void textBoxContentName_TextChanged(object sender, EventArgs e) private void checkAlerter_CheckedChanged(object sender, EventArgs e) { //Disable checkAlerterExternal when checkAlerter is not checked - if (checkAlerter.Checked ) + if (checkAlerter.Checked) { - checkAlerterExternal.Enabled = true; + checkAlerterExternal.Enabled = true; } else { checkAlerterExternal.Enabled = false; - checkAlerterExternal.Checked = false; + checkAlerterExternal.Checked = false; } } private void checkDistantMountains_Click(object sender, EventArgs e) { - labelDistantMountainsViewingDistance.Enabled = checkDistantMountains.Checked; - numericDistantMountainsViewingDistance.Enabled = checkDistantMountains.Checked; + labelDistantMountainsViewingDistance.Enabled = checkDistantMountains.Checked; + numericDistantMountainsViewingDistance.Enabled = checkDistantMountains.Checked; } private void checkUseAdvancedAdhesion_Click(object sender, EventArgs e) diff --git a/Source/Menu/Program.cs b/Source/Menu/Program.cs index a78d792f67..efa9a76ba6 100644 --- a/Source/Menu/Program.cs +++ b/Source/Menu/Program.cs @@ -15,11 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using ORTS.Common; using System; using System.Collections.Generic; using System.Diagnostics; using System.Windows.Forms; +using ORTS.Common; namespace ORTS { @@ -151,7 +151,7 @@ static void MainForm() parameters.Add("\"" + MainForm.SelectedSaveFile + "\""); break; } - + var joinedParameters = string.Join(" ", parameters); if ((Control.ModifierKeys & Keys.Alt) == Keys.Alt) { diff --git a/Source/Menu/ResumeForm.cs b/Source/Menu/ResumeForm.cs index 0df21d39e6..27162d4597 100644 --- a/Source/Menu/ResumeForm.cs +++ b/Source/Menu/ResumeForm.cs @@ -50,7 +50,6 @@ using System; using System.Collections.Generic; -using System.Diagnostics; using System.Drawing; using System.IO; using System.Linq; @@ -76,7 +75,7 @@ public partial class ResumeForm : Form List Saves = new List(); Task> SaveLoader; - public class Save + public class Save { public string File { get; private set; } public string PathName { get; private set; } @@ -178,7 +177,7 @@ public Save(string fileName, string youngestVersionFailedToRestore) if (SelectedAction == MainForm.UserAction.SinglePlayerTimetableGame) { - Text =String.Format("{0} - {1} - {2}", Text, route.Name, Path.GetFileNameWithoutExtension(Timetable.fileName)); + Text = String.Format("{0} - {1} - {2}", Text, route.Name, Path.GetFileNameWithoutExtension(Timetable.fileName)); pathNameDataGridViewTextBoxColumn.Visible = true; } else @@ -243,7 +242,7 @@ void LoadSaves() if (save.RouteName == Route.Name) { if (!save.IsMultiplayer ^ Multiplayer) - saves.Add(save); + saves.Add(save); } else // In case you receive a SavePack where the activity is recognised but the route has been renamed. // Checks the route is not in your list of routes. @@ -291,7 +290,7 @@ void ResumeSave() if (save.Valid != false) // I.e. true or null. Check is for safety as buttons should be disabled if Save is invalid. { - if( Found(save) ) + if (Found(save)) { if (save.Valid == null) if (!AcceptUseOfNonvalidSave(save)) @@ -387,7 +386,7 @@ void buttonDelete_Click(object sender, EventArgs e) for (var i = 0; i < selectedRows.Count; i++) { var save = selectedRows[i].DataBoundItem as Save; - foreach (var fileName in new[] + foreach (var fileName in new[] { Path.GetFileName(save.File) , Path.ChangeExtension(Path.GetFileName(save.File), "png") , Path.ChangeExtension(Path.GetFileName(save.File), "replay") @@ -440,7 +439,7 @@ void buttonDeleteInvalid_Click(object sender, EventArgs e) var save = new Save(saveFile, Settings.YoungestVersionFailedToRestore); if (save.Valid == false) { - foreach (var fileName in new[] + foreach (var fileName in new[] { save.File , Path.ChangeExtension(Path.GetFileName(save.File), "png") , Path.ChangeExtension(Path.GetFileName(save.File), "replay") @@ -468,17 +467,17 @@ private void buttonReplayFromStart_Click(object sender, EventArgs e) SelectedAction = MainForm.UserAction.SingleplayerReplaySave; InitiateReplay(true); } - + private void buttonReplayFromPreviousSave_Click(object sender, EventArgs e) { SelectedAction = MainForm.UserAction.SingleplayerReplaySaveFromSave; InitiateReplay(false); } - + private void InitiateReplay(bool fromStart) { var save = saveBindingSource.Current as Save; - if (Found(save) ) + if (Found(save)) { if (fromStart && (save.Valid == null)) if (!AcceptUseOfNonvalidSave(save)) @@ -540,36 +539,36 @@ public bool Found(Save save) var rewriteNeeded = false; // savedArgs[0] contains Activity or Path filepath var filePath = savedArgs[0]; - if( !System.IO.File.Exists(filePath) ) + if (!System.IO.File.Exists(filePath)) { // Show the dialog and get result. openFileDialog1.InitialDirectory = MSTSPath.Base(); openFileDialog1.FileName = Path.GetFileName(filePath); openFileDialog1.Title = @"Find location for file " + filePath; - if( openFileDialog1.ShowDialog() != DialogResult.OK ) + if (openFileDialog1.ShowDialog() != DialogResult.OK) return false; rewriteNeeded = true; savedArgs[0] = openFileDialog1.FileName; } - if( savedArgs.Length > 1 ) // Explore, not Activity + if (savedArgs.Length > 1) // Explore, not Activity { // savedArgs[1] contains Consist filepath filePath = savedArgs[1]; - if( !System.IO.File.Exists(filePath) ) + if (!System.IO.File.Exists(filePath)) { // Show the dialog and get result. openFileDialog1.InitialDirectory = MSTSPath.Base(); openFileDialog1.FileName = Path.GetFileName(filePath); openFileDialog1.Title = @"Find location for file " + filePath; - if( openFileDialog1.ShowDialog() != DialogResult.OK ) + if (openFileDialog1.ShowDialog() != DialogResult.OK) return false; rewriteNeeded = true; savedArgs[1] = openFileDialog1.FileName; } } - if( rewriteNeeded ) + if (rewriteNeeded) { - using( BinaryWriter outf = new BinaryWriter(new FileStream(save.File + ".tmp", FileMode.Create, FileAccess.Write)) ) + using (BinaryWriter outf = new BinaryWriter(new FileStream(save.File + ".tmp", FileMode.Create, FileAccess.Write))) { // copy the start of the file outf.Write(version); @@ -584,17 +583,17 @@ public bool Found(Save save) outf.Write(initialTileZ); outf.Write(savedArgs.Length); // copy the pars which may have changed - for( var i = 0; i < savedArgs.Length; i++ ) + for (var i = 0; i < savedArgs.Length; i++) outf.Write(savedArgs[i]); // copy the rest of the file - while( inf.BaseStream.Position < inf.BaseStream.Length ) + while (inf.BaseStream.Position < inf.BaseStream.Length) { outf.Write(inf.ReadByte()); } } inf.Close(); File.Replace(save.File + ".tmp", save.File, null); - } + } else { inf.Close(); diff --git a/Source/Menu/SortableBindingList.cs b/Source/Menu/SortableBindingList.cs index 24c4280952..9fb8b5ded8 100644 --- a/Source/Menu/SortableBindingList.cs +++ b/Source/Menu/SortableBindingList.cs @@ -15,12 +15,9 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; -using System.Linq; -using System.Text; namespace ORTS { diff --git a/Source/Menu/Task.cs b/Source/Menu/Task.cs index 5ea91590cb..234fb2dc2e 100644 --- a/Source/Menu/Task.cs +++ b/Source/Menu/Task.cs @@ -22,7 +22,6 @@ //#define DEBUG_BACKGROUND_TASKS using System; -using System.Diagnostics; using System.Threading; using System.Windows.Forms; diff --git a/Source/Menu/TestingForm.cs b/Source/Menu/TestingForm.cs index 7f3a3c2d83..e3d0491869 100644 --- a/Source/Menu/TestingForm.cs +++ b/Source/Menu/TestingForm.cs @@ -18,12 +18,10 @@ using System; using System.Collections.Generic; using System.ComponentModel; -using System.Data; using System.Diagnostics; using System.Drawing; using System.IO; using System.Linq; -using System.Text; using System.Windows.Forms; using GNU.Gettext; using GNU.Gettext.WinForms; @@ -64,8 +62,8 @@ public TestActivity(Folder folder, Route route, Activity activity) readonly MainForm MainForm; readonly UserSettings Settings; - readonly string SummaryFilePath = Path.Combine(UserSettings.UserDataFolder, "TestingSummary.csv"); - readonly string LogFilePath = Path.Combine(UserSettings.UserDataFolder, "TestingLog.txt"); + readonly string SummaryFilePath = Path.Combine(UserSettings.UserDataFolder, "TestingSummary.csv"); + readonly string LogFilePath = Path.Combine(UserSettings.UserDataFolder, "TestingLog.txt"); public TestingForm(MainForm mainForm, UserSettings settings) { diff --git a/Source/ORTS.Common/Conversions.cs b/Source/ORTS.Common/Conversions.cs index 35f8326fd4..aa8a00f93d 100644 --- a/Source/ORTS.Common/Conversions.cs +++ b/Source/ORTS.Common/Conversions.cs @@ -17,9 +17,6 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Globalization; using GNU.Gettext; @@ -63,27 +60,28 @@ public enum PressureUnit /// /// Distance conversions from and to metres /// - public static class Me { // Not M to avoid conflict with MSTSMath.M, but note that MSTSMath.M will be gone in future. + public static class Me + { // Not M to avoid conflict with MSTSMath.M, but note that MSTSMath.M will be gone in future. /// Convert (statute or land) miles to metres - public static float FromMi(float miles) { return miles * 1609.344f; } + public static float FromMi(float miles) { return miles * 1609.344f; } /// Convert metres to (statute or land) miles - public static float ToMi(float metres) { return metres * (1.0f / 1609.344f); } + public static float ToMi(float metres) { return metres * (1.0f / 1609.344f); } /// Convert kilometres to metres public static float FromKiloM(float miles) { return miles * 1000f; } /// Convert metres to kilometres public static float ToKiloM(float metres) { return metres * (1.0f / 1000f); } /// Convert yards to metres - public static float FromYd(float yards) { return yards * 0.9144f; } + public static float FromYd(float yards) { return yards * 0.9144f; } /// Convert metres to yards - public static float ToYd(float metres) { return metres * (1.0f / 0.9144f); } + public static float ToYd(float metres) { return metres * (1.0f / 0.9144f); } /// Convert feet to metres - public static float FromFt(float feet) { return feet * 0.3048f; } + public static float FromFt(float feet) { return feet * 0.3048f; } /// Convert metres to feet - public static float ToFt(float metres) { return metres *(1.0f/ 0.3048f); } + public static float ToFt(float metres) { return metres * (1.0f / 0.3048f); } /// Convert inches to metres public static float FromIn(float inches) { return inches * 0.0254f; } /// Convert metres to inches - public static float ToIn(float metres) { return metres * (1.0f / 0.0254f); } + public static float ToIn(float metres) { return metres * (1.0f / 0.0254f); } /// /// Convert from metres into kilometres or miles, depending on the flag isMetric @@ -112,11 +110,11 @@ public static float ToM(float distance, bool isMetric) public static class Me2 { /// Convert from feet squared to metres squared - public static float FromFt2(float feet2) { return feet2 * 0.092903f; } + public static float FromFt2(float feet2) { return feet2 * 0.092903f; } /// Convert from metres squared to feet squared public static float ToFt2(float metres2) { return metres2 * (1.0f / 0.092903f); } /// Convert from inches squared to metres squared - public static float FromIn2(float feet2) { return feet2 * (1.0f / 1550.0031f); } + public static float FromIn2(float feet2) { return feet2 * (1.0f / 1550.0031f); } /// Convert from metres squared to inches squared public static float ToIn2(float metres2) { return metres2 * 1550.0031f; } } @@ -127,13 +125,13 @@ public static class Me2 public static class Me3 { /// Convert from cubic feet to cubic metres - public static float FromFt3(float feet3) { return feet3 * (1.0f / 35.3146665722f); } + public static float FromFt3(float feet3) { return feet3 * (1.0f / 35.3146665722f); } /// Convert from cubic metres to cubic feet public static float ToFt3(float metres3) { return metres3 * 35.3146665722f; } /// Convert from cubic inches to cubic metres public static float FromIn3(float inches3) { return inches3 * (1.0f / 61023.7441f); } /// Convert from cubic metres to cubic inches - public static float ToIn3(float metres3) { return metres3 * 61023.7441f; } + public static float ToIn3(float metres3) { return metres3 * 61023.7441f; } } /// @@ -142,13 +140,13 @@ public static class Me3 public static class MpS { /// Convert miles/hour to metres/second - public static float FromMpH(float milesPerHour) { return milesPerHour * (1.0f / 2.23693629f); } + public static float FromMpH(float milesPerHour) { return milesPerHour * (1.0f / 2.23693629f); } /// Convert metres/second to miles/hour - public static float ToMpH(float metrePerSecond) { return metrePerSecond * 2.23693629f; } + public static float ToMpH(float metrePerSecond) { return metrePerSecond * 2.23693629f; } /// Convert kilometre/hour to metres/second public static float FromKpH(float kilometrePerHour) { return kilometrePerHour * (1.0f / 3.600f); } /// Convert metres/second to kilometres/hour - public static float ToKpH(float metrePerSecond) { return metrePerSecond * 3.600f; } + public static float ToKpH(float metrePerSecond) { return metrePerSecond * 3.600f; } /// /// Convert from metres/second to kilometres/hour or miles/hour, depending on value of isMetric @@ -177,19 +175,19 @@ public static float ToMpS(float speed, bool isMetric) public static class Kg { /// Convert from pounds (lb) to kilograms - public static float FromLb(float lb) { return lb * (1.0f / 2.20462f); } + public static float FromLb(float lb) { return lb * (1.0f / 2.20462f); } /// Convert from kilograms to pounds (lb) - public static float ToLb(float kg) { return kg * 2.20462f; } + public static float ToLb(float kg) { return kg * 2.20462f; } /// Convert from US Tons to kilograms public static float FromTUS(float tonsUS) { return tonsUS * 907.1847f; } /// Convert from kilograms to US Tons - public static float ToTUS(float kg) { return kg * (1.0f / 907.1847f); } + public static float ToTUS(float kg) { return kg * (1.0f / 907.1847f); } /// Convert from UK Tons to kilograms public static float FromTUK(float tonsUK) { return tonsUK * 1016.047f; } /// Convert from kilograms to UK Tons - public static float ToTUK(float kg) { return kg * (1.0f / 1016.047f); } + public static float ToTUK(float kg) { return kg * (1.0f / 1016.047f); } /// Convert from kilogram to metric tonnes - public static float ToTonne(float kg) { return kg * (1.0f / 1000.0f); } + public static float ToTonne(float kg) { return kg * (1.0f / 1000.0f); } /// Convert from metrix tonnes to kilogram public static float FromTonne(float tonne) { return tonne * 1000.0f; } } @@ -200,7 +198,7 @@ public static class Kg public static class N { /// Convert from pound-force to Newtons - public static float FromLbf(float lbf) { return lbf * (1.0f / 0.224808943871f); } + public static float FromLbf(float lbf) { return lbf * (1.0f / 0.224808943871f); } /// Convert from Newtons to Pound-force public static float ToLbf(float newton) { return newton * 0.224808943871f; } } @@ -211,7 +209,7 @@ public static class N public static class KgpS { /// Convert from pound/hour to kilograms/second - public static float FromLbpH(float poundsPerHour) { return poundsPerHour * (1.0f / 7936.64144f); } + public static float FromLbpH(float poundsPerHour) { return poundsPerHour * (1.0f / 7936.64144f); } /// Convert from kilograms/second to pounds/hour public static float ToLbpH(float kilogramsPerSecond) { return kilogramsPerSecond * 7936.64144f; } } @@ -235,11 +233,11 @@ public static class W /// Convert from kiloWatts to Watts public static float FromKW(float kiloWatts) { return kiloWatts * 1000f; } /// Convert from Watts to kileWatts - public static float ToKW(float watts) { return watts * (1.0f / 1000f); } + public static float ToKW(float watts) { return watts * (1.0f / 1000f); } /// Convert from HorsePower to Watts public static float FromHp(float horsePowers) { return horsePowers * 745.699872f; } /// Convert from Watts to HorsePower - public static float ToHp(float watts) { return watts * (1.0f / 745.699872f); } + public static float ToHp(float watts) { return watts * (1.0f / 745.699872f); } /// Convert from BoilerHorsePower to Watts public static float FromBhp(float horsePowers) { return horsePowers * 9809.5f; } /// Convert from Watts to BoilerHorsePower @@ -247,7 +245,7 @@ public static class W /// Convert from British Thermal Unit (BTU) per second to watts public static float FromBTUpS(float btuPerSecond) { return btuPerSecond * 1055.05585f; } /// Convert from Watts to British Thermal Unit (BTU) per second - public static float ToBTUpS(float watts) { return watts * (1.0f / 1055.05585f); } + public static float ToBTUpS(float watts) { return watts * (1.0f / 1055.05585f); } } /// @@ -692,7 +690,7 @@ public static string FormatMass(float massKg, bool isMetric) } else { - return String.Format(CultureInfo.CurrentCulture,"{0:F0} {1}", Kg.ToLb(massKg), lb); + return String.Format(CultureInfo.CurrentCulture, "{0:F0} {1}", Kg.ToLb(massKg), lb); } } diff --git a/Source/ORTS.Common/Coordinates.cs b/Source/ORTS.Common/Coordinates.cs index 76c8d2d257..ca26dde53d 100644 --- a/Source/ORTS.Common/Coordinates.cs +++ b/Source/ORTS.Common/Coordinates.cs @@ -90,7 +90,7 @@ public WorldPosition(WorldLocation copy) /// MSTS WFiles represent some location with a position, quaternion and tile coordinates /// This converts it to the ORTS WorldPosition representation /// - public WorldPosition (int tileX, int tileZ, Vector3 xnaPosition, Quaternion xnaQuaternion) + public WorldPosition(int tileX, int tileZ, Vector3 xnaPosition, Quaternion xnaQuaternion) { XNAMatrix = Matrix.CreateFromQuaternion(xnaQuaternion); XNAMatrix *= Matrix.CreateTranslation(xnaPosition); @@ -397,5 +397,5 @@ public override int GetHashCode() { return TileX.GetHashCode() ^ TileZ.GetHashCode() ^ Location.GetHashCode(); } - } + } } diff --git a/Source/ORTS.Common/DataLogger.cs b/Source/ORTS.Common/DataLogger.cs index 6bee8dedca..7dcd7f675f 100644 --- a/Source/ORTS.Common/DataLogger.cs +++ b/Source/ORTS.Common/DataLogger.cs @@ -15,11 +15,8 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; using System.IO; +using System.Text; namespace ORTS.Common { @@ -56,8 +53,8 @@ public void Data(string data) public void End() { Cache.AppendLine(); - if (Cache.Length >= CacheSize) - Flush(); + if (Cache.Length >= CacheSize) + Flush(); FirstItem = true; } diff --git a/Source/ORTS.Common/Filter.cs b/Source/ORTS.Common/Filter.cs index b908537a4c..2ca680581a 100644 --- a/Source/ORTS.Common/Filter.cs +++ b/Source/ORTS.Common/Filter.cs @@ -19,7 +19,6 @@ using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Text; namespace ORTS.Common { @@ -136,9 +135,9 @@ public IIRFilter(FilterTypes type, int order, float cutoffFrequency, float sampl { case FilterTypes.Butterworth: ComputeButterworth( - Order = order, - CutoffFrequencyRadpS = cutoffFrequency, - SamplingPeriod_s = samplingPeriod); + Order = order, + CutoffFrequencyRadpS = cutoffFrequency, + SamplingPeriod_s = samplingPeriod); break; default: throw new NotImplementedException("Other filter types are not implemented yet."); @@ -167,7 +166,7 @@ public ArrayList A { set { - if(NCoef <= 0) + if (NCoef <= 0) NCoef = value.Count - 1; x = new ArrayList(); y = new ArrayList(); @@ -197,7 +196,7 @@ public ArrayList B { set { - if(NCoef <= 0) + if (NCoef <= 0) NCoef = value.Count - 1; x = new ArrayList(); y = new ArrayList(); @@ -265,10 +264,10 @@ public float SamplingPeriod_s public enum FilterTypes { - Exponential = 0, - Chebychev = 1, - Butterworth = 2, - Bessel = 3 + Exponential = 0, + Chebychev = 1, + Butterworth = 2, + Bessel = 3 } public FilterTypes FilterType { set; get; } @@ -308,7 +307,7 @@ public float Filter(float NewSample, float samplingPeriod) if (samplingPeriod <= 0.0f) return 0.0f; - switch(FilterType) + switch (FilterType) { case FilterTypes.Butterworth: if ((1 / (samplingPeriod) < RadToHz(cuttoffFreqRadpS))) @@ -355,7 +354,7 @@ public void Reset() /// Initial value public void Reset(float initValue) { - for (float t = 0; t < (10.0f*cuttoffFreqRadpS); t += 0.1f) + for (float t = 0; t < (10.0f * cuttoffFreqRadpS); t += 0.1f) { Filter(initValue, 0.1f); } @@ -437,7 +436,7 @@ public void ComputeButterworth(int order, float cutoffFrequency, float samplingP break; default: throw new NotImplementedException("Filter order higher than 1 is not supported yet"); - + } } @@ -480,9 +479,11 @@ public MovingAverage(int size) Queue Buffer; int size; - public int Size { get { if (Buffer != null) return Buffer.Count; else return 0; } - set { if(value > 0) size = value; else size = 1; Initialize(); } - } + public int Size + { + get { if (Buffer != null) return Buffer.Count; else return 0; } + set { if (value > 0) size = value; else size = 1; Initialize(); } + } public void Initialize(float value) { diff --git a/Source/ORTS.Common/FxCopAttributes.cs b/Source/ORTS.Common/FxCopAttributes.cs index 1b5230225f..07b4145881 100644 --- a/Source/ORTS.Common/FxCopAttributes.cs +++ b/Source/ORTS.Common/FxCopAttributes.cs @@ -16,49 +16,46 @@ // along with Open Rails. If not, see . using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; namespace ORTS.Common { - /// - /// Explicitly sets the name of the thread on which the target will run. - /// - [AttributeUsage(AttributeTargets.Method, Inherited = false, AllowMultiple = false)] - public sealed class ThreadNameAttribute : Attribute - { - readonly string threadName; + /// + /// Explicitly sets the name of the thread on which the target will run. + /// + [AttributeUsage(AttributeTargets.Method, Inherited = false, AllowMultiple = false)] + public sealed class ThreadNameAttribute : Attribute + { + readonly string threadName; - // This is a positional argument - public ThreadNameAttribute(string threadName) - { - this.threadName = threadName; - } + // This is a positional argument + public ThreadNameAttribute(string threadName) + { + this.threadName = threadName; + } - public string ThreadName - { - get { return threadName; } - } - } + public string ThreadName + { + get { return threadName; } + } + } - /// - /// Defines a thread on which the target is allowed to run; multiple threads may be allowed for a single target. - /// - [AttributeUsage(AttributeTargets.Class | AttributeTargets.Constructor | AttributeTargets.Method, Inherited = false, AllowMultiple = true)] + /// + /// Defines a thread on which the target is allowed to run; multiple threads may be allowed for a single target. + /// + [AttributeUsage(AttributeTargets.Class | AttributeTargets.Constructor | AttributeTargets.Method, Inherited = false, AllowMultiple = true)] public sealed class CallOnThreadAttribute : Attribute - { - readonly string threadName; + { + readonly string threadName; - // This is a positional argument - public CallOnThreadAttribute(string threadName) - { - this.threadName = threadName; - } + // This is a positional argument + public CallOnThreadAttribute(string threadName) + { + this.threadName = threadName; + } - public string ThreadName - { - get { return threadName; } - } - } + public string ThreadName + { + get { return threadName; } + } + } } diff --git a/Source/ORTS.Common/InfoApiMap.cs b/Source/ORTS.Common/InfoApiMap.cs index df27146124..20f98620e0 100644 --- a/Source/ORTS.Common/InfoApiMap.cs +++ b/Source/ORTS.Common/InfoApiMap.cs @@ -21,7 +21,8 @@ namespace Orts.Common { - public enum TypeOfPointOnApiMap { + public enum TypeOfPointOnApiMap + { Track, Named, Rest @@ -53,7 +54,7 @@ public class InfoApiMap public float LonMin; public float LonMax; - public InfoApiMap(string powerSupplyName) + public InfoApiMap(string powerSupplyName) { InitTypeOfLocomotive(powerSupplyName); diff --git a/Source/ORTS.Common/Integrator.cs b/Source/ORTS.Common/Integrator.cs index 31475ae40b..019ccbc5e1 100644 --- a/Source/ORTS.Common/Integrator.cs +++ b/Source/ORTS.Common/Integrator.cs @@ -16,10 +16,7 @@ // along with Open Rails. If not, see . using System; -using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text; namespace ORTS.Common { diff --git a/Source/ORTS.Common/SettingsBase.cs b/Source/ORTS.Common/SettingsBase.cs index 679bd68f96..21d4cee465 100644 --- a/Source/ORTS.Common/SettingsBase.cs +++ b/Source/ORTS.Common/SettingsBase.cs @@ -26,19 +26,19 @@ namespace ORTS.Common /// Base class for supporting settings (either from user, commandline, default, ...) /// public abstract class SettingsBase - { + { /// /// Enumeration of the various sources for settings /// protected enum Source - { + { /// Setting is a default setting Default, /// Setting comes from the command line CommandLine, /// Setting comes from user (so stored between runs) User, - } + } /// The store of the settings protected SettingsStore SettingStore { get; private set; } @@ -55,9 +55,9 @@ protected enum Source /// /// The store for the settings protected SettingsBase(SettingsStore settings) - { - SettingStore = settings; - } + { + SettingStore = settings; + } /// /// Get the default value of a setting @@ -105,21 +105,21 @@ protected SettingsBase(SettingsStore settings) /// /// ??? protected void Load(IEnumerable options) - { - // This special command-line option prevents the registry values from being used. - AllowUserSettings = !options.Contains("skip-user-settings", StringComparer.OrdinalIgnoreCase); - - // Pull apart the command-line options so we can find them by setting name. - var optionsDictionary = new Dictionary(); - foreach (var option in options) - { - var k = option.Split(new[] { '=', ':' }, 2)[0].ToLowerInvariant(); - var v = option.Contains('=') || option.Contains(':') ? option.Split(new[] { '=', ':' }, 2)[1].ToLowerInvariant() : "yes"; - optionsDictionary[k] = v; - } - - Load(optionsDictionary); - } + { + // This special command-line option prevents the registry values from being used. + AllowUserSettings = !options.Contains("skip-user-settings", StringComparer.OrdinalIgnoreCase); + + // Pull apart the command-line options so we can find them by setting name. + var optionsDictionary = new Dictionary(); + foreach (var option in options) + { + var k = option.Split(new[] { '=', ':' }, 2)[0].ToLowerInvariant(); + var v = option.Contains('=') || option.Contains(':') ? option.Split(new[] { '=', ':' }, 2)[1].ToLowerInvariant() : "yes"; + optionsDictionary[k] = v; + } + + Load(optionsDictionary); + } /// /// Load a single value from the store, once type of the setting is known @@ -128,54 +128,54 @@ protected void Load(IEnumerable options) /// name of the setting /// type of the setting protected void Load(Dictionary optionsDictionary, string name, Type type) - { - // Get the default value. - var defValue = GetDefaultValue(name); + { + // Get the default value. + var defValue = GetDefaultValue(name); - // Read in the user setting, if it exists. - var userValue = AllowUserSettings ? SettingStore.GetUserValue(name, type) : null; + // Read in the user setting, if it exists. + var userValue = AllowUserSettings ? SettingStore.GetUserValue(name, type) : null; - // Read in the command-line option, if it exists into optValue. - var propertyNameLower = name.ToLowerInvariant(); - var optValue = optionsDictionary.ContainsKey(propertyNameLower) ? (object)optionsDictionary[propertyNameLower] : null; + // Read in the command-line option, if it exists into optValue. + var propertyNameLower = name.ToLowerInvariant(); + var optValue = optionsDictionary.ContainsKey(propertyNameLower) ? (object)optionsDictionary[propertyNameLower] : null; // Parse command-line options... - if ((optValue != null) && (type == typeof(bool))) + if ((optValue != null) && (type == typeof(bool))) // Option for boolean types so true/yes/on/1 are all true; everything else is false. optValue = new[] { "true", "yes", "on", "1" }.Contains(optValue); - else if ((optValue != null) && (type == typeof(int))) + else if ((optValue != null) && (type == typeof(int))) // Option for int types. optValue = int.Parse((string)optValue); - else if ((optValue != null) && (type == typeof(string[]))) + else if ((optValue != null) && (type == typeof(string[]))) // Option for string[] types. optValue = ((string)optValue).Split(',').Select(s => s.Trim()).ToArray(); - else if ((optValue != null) && (type == typeof(int[]))) + else if ((optValue != null) && (type == typeof(int[]))) // Option for int[] types. optValue = ((string)optValue).Split(',').Select(s => int.Parse(s.Trim())).ToArray(); - // We now have defValue, regValue, optValue containing the default, persisted and override values - // for the setting. regValue and optValue are null if they are not found/specified. - var value = optValue != null ? optValue : userValue != null ? userValue : defValue; - try - { - // int[] values must have the same number of items as default value. - if ((type == typeof(int[])) && (value != null) && ((int[])value).Length != ((int[])defValue).Length) - throw new ArgumentException(); - - SetValue(name, value); - Sources.Add(name, value.Equals(defValue) ? Source.Default : optValue != null ? Source.CommandLine : userValue != null ? Source.User : Source.Default); - } - catch (ArgumentException) - { - Trace.TraceWarning("Unable to load {0} value from type {1}", name, value.GetType().FullName); - value = defValue; - Sources.Add(name, Source.Default); - } - } + // We now have defValue, regValue, optValue containing the default, persisted and override values + // for the setting. regValue and optValue are null if they are not found/specified. + var value = optValue != null ? optValue : userValue != null ? userValue : defValue; + try + { + // int[] values must have the same number of items as default value. + if ((type == typeof(int[])) && (value != null) && ((int[])value).Length != ((int[])defValue).Length) + throw new ArgumentException(); + + SetValue(name, value); + Sources.Add(name, value.Equals(defValue) ? Source.Default : optValue != null ? Source.CommandLine : userValue != null ? Source.User : Source.Default); + } + catch (ArgumentException) + { + Trace.TraceWarning("Unable to load {0} value from type {1}", name, value.GetType().FullName); + value = defValue; + Sources.Add(name, Source.Default); + } + } /// /// Save a setting to the store, if name and especially type are known @@ -183,24 +183,24 @@ protected void Load(Dictionary optionsDictionary, string name, T /// name of the setting /// type of the setting protected void Save(string name, Type type) - { - var defValue = GetDefaultValue(name); - var value = GetValue(name); - - if (defValue.Equals(value) - || (type == typeof(string[]) && String.Join(",", (string[])defValue) == String.Join(",", (string[])value)) - || (type == typeof(int[]) && String.Join(",", ((int[])defValue).Select(v => v.ToString()).ToArray()) == String.Join(",", ((int[])value).Select(v => v.ToString()).ToArray()))) - { - SettingStore.DeleteUserValue(name); - } - else if (type == typeof(string)) - { - SettingStore.SetUserValue(name, (string)value); - } - else if (type == typeof(int)) - { - SettingStore.SetUserValue(name, (int)value); - } + { + var defValue = GetDefaultValue(name); + var value = GetValue(name); + + if (defValue.Equals(value) + || (type == typeof(string[]) && String.Join(",", (string[])defValue) == String.Join(",", (string[])value)) + || (type == typeof(int[]) && String.Join(",", ((int[])defValue).Select(v => v.ToString()).ToArray()) == String.Join(",", ((int[])value).Select(v => v.ToString()).ToArray()))) + { + SettingStore.DeleteUserValue(name); + } + else if (type == typeof(string)) + { + SettingStore.SetUserValue(name, (string)value); + } + else if (type == typeof(int)) + { + SettingStore.SetUserValue(name, (int)value); + } else if (type == typeof(bool)) { SettingStore.SetUserValue(name, (bool)value); @@ -214,14 +214,14 @@ protected void Save(string name, Type type) SettingStore.SetUserValue(name, (TimeSpan)value); } else if (type == typeof(string[])) - { - SettingStore.SetUserValue(name, (string[])value); - } - else if (type == typeof(int[])) - { - SettingStore.SetUserValue(name, (int[])value); - } - } + { + SettingStore.SetUserValue(name, (string[])value); + } + else if (type == typeof(int[])) + { + SettingStore.SetUserValue(name, (int[])value); + } + } /// /// Reset a single setting to its default @@ -232,5 +232,5 @@ protected void Reset(string name) SetValue(name, GetDefaultValue(name)); SettingStore.DeleteUserValue(name); } - } + } } diff --git a/Source/ORTS.Common/SettingsStore.cs b/Source/ORTS.Common/SettingsStore.cs index e86ab9a0a6..d22cabdad7 100644 --- a/Source/ORTS.Common/SettingsStore.cs +++ b/Source/ORTS.Common/SettingsStore.cs @@ -16,7 +16,6 @@ // along with Open Rails. If not, see . using System; -using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; @@ -27,11 +26,11 @@ namespace ORTS.Common { - /// - /// Base class for all means of persisting settings from the user/game. - /// - public abstract class SettingsStore - { + /// + /// Base class for all means of persisting settings from the user/game. + /// + public abstract class SettingsStore + { /// Name of a 'section', to distinguish various part within a underlying store protected string Section { get; private set; } @@ -40,9 +39,9 @@ public abstract class SettingsStore /// /// Name of the 'section', to distinguish various part within a underlying store protected SettingsStore(string section) - { - Section = section; - } + { + Section = section; + } /// /// Assert that the type expected from the settings store is an allowed type. @@ -145,29 +144,29 @@ protected static void AssertGetUserValueType(Type expectedType) /// Name to distinguish between various 'section's used in underlying store. /// The created SettingsStore public static SettingsStore GetSettingStore(string filePath, string registryKey, string section) - { - if (!String.IsNullOrEmpty(filePath) && File.Exists(filePath)) - return new SettingsStoreLocalIni(filePath, section); - if (!String.IsNullOrEmpty(registryKey)) - return new SettingsStoreRegistry(registryKey, section); - throw new ArgumentException("Neither 'filePath' nor 'registryKey' arguments are valid."); - } - } - - /// + { + if (!String.IsNullOrEmpty(filePath) && File.Exists(filePath)) + return new SettingsStoreLocalIni(filePath, section); + if (!String.IsNullOrEmpty(registryKey)) + return new SettingsStoreRegistry(registryKey, section); + throw new ArgumentException("Neither 'filePath' nor 'registryKey' arguments are valid."); + } + } + + /// /// Registry implementation of . - /// - public sealed class SettingsStoreRegistry : SettingsStore - { - readonly string RegistryKey; - readonly RegistryKey Key; + /// + public sealed class SettingsStoreRegistry : SettingsStore + { + readonly string RegistryKey; + readonly RegistryKey Key; - internal SettingsStoreRegistry(string registryKey, string section) - : base(section) - { - RegistryKey = String.IsNullOrEmpty(section) ? registryKey : registryKey + @"\" + section; - Key = Registry.CurrentUser.CreateSubKey(RegistryKey); - } + internal SettingsStoreRegistry(string registryKey, string section) + : base(section) + { + RegistryKey = String.IsNullOrEmpty(section) ? registryKey : registryKey + @"\" + section; + Key = Registry.CurrentUser.CreateSubKey(RegistryKey); + } /// /// Return an array of all setting-names that are in the store @@ -285,9 +284,9 @@ public override void SetUserValue(string name, string value) /// name of the setting /// value of the setting public override void SetUserValue(string name, int[] value) - { - Key.SetValue(name, String.Join(",", ((int[])value).Select(v => v.ToString()).ToArray()), RegistryValueKind.String); - } + { + Key.SetValue(name, String.Join(",", ((int[])value).Select(v => v.ToString()).ToArray()), RegistryValueKind.String); + } /// /// Set a value of a user setting @@ -304,25 +303,25 @@ public override void SetUserValue(string name, string[] value) /// /// name of the setting public override void DeleteUserValue(string name) - { - Key.DeleteValue(name, false); - } - } + { + Key.DeleteValue(name, false); + } + } - /// + /// /// INI file implementation of . - /// - public sealed class SettingsStoreLocalIni : SettingsStore - { - const string DefaultSection = "ORTS"; + /// + public sealed class SettingsStoreLocalIni : SettingsStore + { + const string DefaultSection = "ORTS"; - readonly string FilePath; + readonly string FilePath; - internal SettingsStoreLocalIni(string filePath, string section) - : base(String.IsNullOrEmpty(section) ? DefaultSection : section) - { - FilePath = filePath; - } + internal SettingsStoreLocalIni(string filePath, string section) + : base(String.IsNullOrEmpty(section) ? DefaultSection : section) + { + FilePath = filePath; + } /// /// Returns an array of all sections within the store, including the one used by this instance. @@ -447,9 +446,9 @@ public override object GetUserValue(string name, Type expectedType) /// name of the setting /// value of the setting public override void SetUserValue(string name, bool value) - { - NativeMethods.WritePrivateProfileString(Section, name, "bool:" + (value ? "true" : "false"), FilePath); - } + { + NativeMethods.WritePrivateProfileString(Section, name, "bool:" + (value ? "true" : "false"), FilePath); + } /// /// Set a value of a user setting @@ -497,9 +496,9 @@ public override void SetUserValue(string name, TimeSpan value) /// name of the setting /// value of the setting public override void SetUserValue(string name, string value) - { - NativeMethods.WritePrivateProfileString(Section, name, "string:" + Uri.EscapeDataString(value), FilePath); - } + { + NativeMethods.WritePrivateProfileString(Section, name, "string:" + Uri.EscapeDataString(value), FilePath); + } /// /// Set a value of a user setting @@ -507,9 +506,9 @@ public override void SetUserValue(string name, string value) /// name of the setting /// value of the setting public override void SetUserValue(string name, int[] value) - { - NativeMethods.WritePrivateProfileString(Section, name, "int[]:" + String.Join(",", ((int[])value).Select(v => Uri.EscapeDataString(v.ToString(CultureInfo.InvariantCulture))).ToArray()), FilePath); - } + { + NativeMethods.WritePrivateProfileString(Section, name, "int[]:" + String.Join(",", ((int[])value).Select(v => Uri.EscapeDataString(v.ToString(CultureInfo.InvariantCulture))).ToArray()), FilePath); + } /// /// Set a value of a user setting @@ -517,26 +516,26 @@ public override void SetUserValue(string name, int[] value) /// name of the setting /// value of the setting public override void SetUserValue(string name, string[] value) - { - NativeMethods.WritePrivateProfileString(Section, name, "string[]:" + String.Join(",", value.Select(v => Uri.EscapeDataString(v)).ToArray()), FilePath); - } + { + NativeMethods.WritePrivateProfileString(Section, name, "string[]:" + String.Join(",", value.Select(v => Uri.EscapeDataString(v)).ToArray()), FilePath); + } /// /// Remove a user setting from the store /// /// name of the setting public override void DeleteUserValue(string name) - { - NativeMethods.WritePrivateProfileString(Section, name, null, FilePath); - } - } + { + NativeMethods.WritePrivateProfileString(Section, name, null, FilePath); + } + } // TODO: This class and its methods should be internal visibility. /// /// Native methods for interacting with INI files. /// public static class NativeMethods - { + { /// /// Retrieves all the keys and values for the specified section of an initialization file. /// diff --git a/Source/ORTS.Common/SmoothedData.cs b/Source/ORTS.Common/SmoothedData.cs index df1062477f..f704c8a52e 100644 --- a/Source/ORTS.Common/SmoothedData.cs +++ b/Source/ORTS.Common/SmoothedData.cs @@ -17,8 +17,6 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Text; namespace ORTS.Common { diff --git a/Source/ORTS.Common/SystemInfo.cs b/Source/ORTS.Common/SystemInfo.cs index 6789e3e206..6b17bc72ff 100644 --- a/Source/ORTS.Common/SystemInfo.cs +++ b/Source/ORTS.Common/SystemInfo.cs @@ -15,7 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Microsoft.Win32; using System; using System.Diagnostics; using System.IO; @@ -23,6 +22,7 @@ using System.Runtime.InteropServices; using System.Text; using System.Windows.Forms; +using Microsoft.Win32; using Microsoft.Xna.Framework.Graphics; namespace ORTS.Common @@ -201,7 +201,8 @@ static string WriteInstalledRuntimes(TextWriter output, string versionKeyName, R static void WriteGraphicsAdapter(TextWriter output) { - try { + try + { foreach (var adapter in GraphicsAdapter.Adapters) { try diff --git a/Source/ORTS.Common/TrackMonitorSignalAspect.cs b/Source/ORTS.Common/TrackMonitorSignalAspect.cs index ddc54366d6..96a1f54369 100644 --- a/Source/ORTS.Common/TrackMonitorSignalAspect.cs +++ b/Source/ORTS.Common/TrackMonitorSignalAspect.cs @@ -17,11 +17,6 @@ // This file is the responsibility of the 3D & Environment Team. -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - namespace ORTS.Common { public enum TrackMonitorSignalAspect diff --git a/Source/ORTS.Common/VersionInfo.cs b/Source/ORTS.Common/VersionInfo.cs index 54bf2a681a..8eaf4ead6b 100644 --- a/Source/ORTS.Common/VersionInfo.cs +++ b/Source/ORTS.Common/VersionInfo.cs @@ -19,7 +19,6 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; -using System.Linq; namespace ORTS.Common { diff --git a/Source/ORTS.Common/WorldLatLon.cs b/Source/ORTS.Common/WorldLatLon.cs index 40a9ba41c8..de7916bd8f 100644 --- a/Source/ORTS.Common/WorldLatLon.cs +++ b/Source/ORTS.Common/WorldLatLon.cs @@ -29,8 +29,8 @@ // Rick Grout // -using Microsoft.Xna.Framework; using System; +using Microsoft.Xna.Framework; namespace Orts.Common { diff --git a/Source/ORTS.Common/enums.cs b/Source/ORTS.Common/enums.cs index 07b8ee864f..5446a62adc 100644 --- a/Source/ORTS.Common/enums.cs +++ b/Source/ORTS.Common/enums.cs @@ -15,11 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - namespace ORTS.Common { public enum Direction diff --git a/Source/ORTS.Content/MSTSPath.cs b/Source/ORTS.Content/MSTSPath.cs index 3c511c551c..425cf0ad16 100644 --- a/Source/ORTS.Content/MSTSPath.cs +++ b/Source/ORTS.Content/MSTSPath.cs @@ -15,12 +15,8 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.Text; -using System.Diagnostics; -using Microsoft.Win32; using System.IO; +using Microsoft.Win32; namespace MSTS { @@ -44,20 +40,20 @@ public static string Base() */ { - if (DefaultLocation == null) - { - DefaultLocation = "c:\\program files\\microsoft games\\train simulator"; + if (DefaultLocation == null) + { + DefaultLocation = "c:\\program files\\microsoft games\\train simulator"; - RegistryKey RK = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Microsoft Games\Train Simulator\1.0"); - if (RK == null) - RK = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Wow6432Node\Microsoft\Microsoft Games\Train Simulator\1.0"); - if (RK != null) - DefaultLocation = (string)RK.GetValue("Path", DefaultLocation); + RegistryKey RK = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Microsoft Games\Train Simulator\1.0"); + if (RK == null) + RK = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Wow6432Node\Microsoft\Microsoft Games\Train Simulator\1.0"); + if (RK != null) + DefaultLocation = (string)RK.GetValue("Path", DefaultLocation); - // Verify installation at this location - if (!Directory.Exists(DefaultLocation)) - throw new FileNotFoundException("MSTS directory '" + DefaultLocation + "' does not exist.", DefaultLocation); - } + // Verify installation at this location + if (!Directory.Exists(DefaultLocation)) + throw new FileNotFoundException("MSTS directory '" + DefaultLocation + "' does not exist.", DefaultLocation); + } return DefaultLocation; } // diff --git a/Source/ORTS.IO/BufferedInMemoryStream.cs b/Source/ORTS.IO/BufferedInMemoryStream.cs index abceafc46e..33e3b66686 100644 --- a/Source/ORTS.IO/BufferedInMemoryStream.cs +++ b/Source/ORTS.IO/BufferedInMemoryStream.cs @@ -20,109 +20,127 @@ namespace ORTS.IO { - /// - /// A which buffers both reads and writes in memory (as a ). - /// - /// - /// Treat this stream like any other; , , all work normally (or close enough) in most - /// cases. There are some specific exceptions, which shouldn't be a problem normally, outlined below. - /// When reading, if the underlying stream does not report a length itself, the value reported by represents the amount - /// buffered. The attempts to keep the beyond the current seek location at all times. - /// when reading, will operate normally but only within the data already buffered; attempts to seek beyond this will raise - /// an exception. There is no way to force a certain amount of data to be buffered. - /// When writing, is a no-op and is not implemented. None of the methods and - /// properties will cause data to be written to the underlying stream. - /// When writing, to cause all buffered data to be written to the underlying stream, call . This non-standard behavior - /// is due to unfortunate existing code which calls after writing to a , which would otherwise cause us a - /// problem with write-once underlying streams (which we're specifically trying to support here). - /// - public class BufferedInMemoryStream : Stream - { - MemoryStream Memory; - Stream Base; - long WritePosition; - const int ChunkSize = 1024; - - public BufferedInMemoryStream(Stream stream) { - Memory = new MemoryStream(); - Base = stream; - } - - public override void Close() { - base.Close(); - Base.Close(); - } - - void ReadChunk(int chunk) { - var buffer = new byte[chunk]; - var bytes = Base.Read(buffer, 0, chunk); - var oldPosition = Memory.Position; - Memory.Seek(0, SeekOrigin.End); - Memory.Write(buffer, 0, bytes); - Memory.Seek(oldPosition, SeekOrigin.Begin); - } - - public override bool CanRead { - get { return true; } - } - - public override bool CanSeek { - get { return true; } - } - - public override bool CanWrite { - get { return Base.CanWrite; } - } - - public override void Flush() { - } - - public void RealFlush() { - if (Memory.Position > WritePosition) { - var currentPosition = Memory.Position; - Memory.Seek(WritePosition, SeekOrigin.Begin); - var buffer = new byte[currentPosition - WritePosition]; - Memory.Read(buffer, 0, buffer.Length); - Base.Write(buffer, 0, buffer.Length); - WritePosition = currentPosition; - Memory.Position = currentPosition; - } - - Base.Flush(); - } - - public override long Length { - get { - if (Base.CanSeek) return Base.Length; - if (Base.CanRead && (Memory.Position + ChunkSize >= Memory.Length)) ReadChunk(ChunkSize); - return Memory.Length; - } - } - - public override long Position { - get { - return Memory.Position; - } - set { - Memory.Position = value; - } - } - - public override int Read(byte[] buffer, int offset, int count) { - if (Memory.Position + count > Memory.Length) ReadChunk(count); - return Memory.Read(buffer, offset, count); - } - - public override long Seek(long offset, SeekOrigin origin) { - return Memory.Seek(offset, origin); - } - - public override void SetLength(long value) { - throw new NotImplementedException(); - } - - public override void Write(byte[] buffer, int offset, int count) { - Memory.Write(buffer, offset, count); - } - } + /// + /// A which buffers both reads and writes in memory (as a ). + /// + /// + /// Treat this stream like any other; , , all work normally (or close enough) in most + /// cases. There are some specific exceptions, which shouldn't be a problem normally, outlined below. + /// When reading, if the underlying stream does not report a length itself, the value reported by represents the amount + /// buffered. The attempts to keep the beyond the current seek location at all times. + /// when reading, will operate normally but only within the data already buffered; attempts to seek beyond this will raise + /// an exception. There is no way to force a certain amount of data to be buffered. + /// When writing, is a no-op and is not implemented. None of the methods and + /// properties will cause data to be written to the underlying stream. + /// When writing, to cause all buffered data to be written to the underlying stream, call . This non-standard behavior + /// is due to unfortunate existing code which calls after writing to a , which would otherwise cause us a + /// problem with write-once underlying streams (which we're specifically trying to support here). + /// + public class BufferedInMemoryStream : Stream + { + MemoryStream Memory; + Stream Base; + long WritePosition; + const int ChunkSize = 1024; + + public BufferedInMemoryStream(Stream stream) + { + Memory = new MemoryStream(); + Base = stream; + } + + public override void Close() + { + base.Close(); + Base.Close(); + } + + void ReadChunk(int chunk) + { + var buffer = new byte[chunk]; + var bytes = Base.Read(buffer, 0, chunk); + var oldPosition = Memory.Position; + Memory.Seek(0, SeekOrigin.End); + Memory.Write(buffer, 0, bytes); + Memory.Seek(oldPosition, SeekOrigin.Begin); + } + + public override bool CanRead + { + get { return true; } + } + + public override bool CanSeek + { + get { return true; } + } + + public override bool CanWrite + { + get { return Base.CanWrite; } + } + + public override void Flush() + { + } + + public void RealFlush() + { + if (Memory.Position > WritePosition) + { + var currentPosition = Memory.Position; + Memory.Seek(WritePosition, SeekOrigin.Begin); + var buffer = new byte[currentPosition - WritePosition]; + Memory.Read(buffer, 0, buffer.Length); + Base.Write(buffer, 0, buffer.Length); + WritePosition = currentPosition; + Memory.Position = currentPosition; + } + + Base.Flush(); + } + + public override long Length + { + get + { + if (Base.CanSeek) return Base.Length; + if (Base.CanRead && (Memory.Position + ChunkSize >= Memory.Length)) ReadChunk(ChunkSize); + return Memory.Length; + } + } + + public override long Position + { + get + { + return Memory.Position; + } + set + { + Memory.Position = value; + } + } + + public override int Read(byte[] buffer, int offset, int count) + { + if (Memory.Position + count > Memory.Length) ReadChunk(count); + return Memory.Read(buffer, offset, count); + } + + public override long Seek(long offset, SeekOrigin origin) + { + return Memory.Seek(offset, origin); + } + + public override void SetLength(long value) + { + throw new NotImplementedException(); + } + + public override void Write(byte[] buffer, int offset, int count) + { + Memory.Write(buffer, offset, count); + } + } } diff --git a/Source/ORTS.IO/ByteEncoding.cs b/Source/ORTS.IO/ByteEncoding.cs index 3fece49995..368ed3a13a 100644 --- a/Source/ORTS.IO/ByteEncoding.cs +++ b/Source/ORTS.IO/ByteEncoding.cs @@ -19,86 +19,95 @@ namespace ORTS.IO { - /// - /// A basic encoding which maps bytes 0-255 to Unicode characters 0-255. - /// - public class ByteEncoding : Encoding - { - public static Encoding Encoding = new ByteEncoding(); + /// + /// A basic encoding which maps bytes 0-255 to Unicode characters 0-255. + /// + public class ByteEncoding : Encoding + { + public static Encoding Encoding = new ByteEncoding(); - public ByteEncoding() { - } + public ByteEncoding() + { + } - /// - /// Calculates the number of bytes produced by encoding a set of characters from the specified character array. - /// - /// The character array containing the set of characters to encode. - /// The index of the first character to encode. - /// The number of characters to encode. - /// The number of bytes produced by encoding the specified characters. - public override int GetByteCount(char[] chars, int index, int count) { - return count; - } + /// + /// Calculates the number of bytes produced by encoding a set of characters from the specified character array. + /// + /// The character array containing the set of characters to encode. + /// The index of the first character to encode. + /// The number of characters to encode. + /// The number of bytes produced by encoding the specified characters. + public override int GetByteCount(char[] chars, int index, int count) + { + return count; + } - /// - /// Encodes a set of characters from the specified character array into the specified byte array. - /// - /// The character array containing the set of characters to encode. - /// The index of the first character to encode. - /// The number of characters to encode. - /// The byte array to contain the resulting sequence of bytes. - /// The index at which to start writing the resulting sequence of bytes. - /// The actual number of bytes written into . - public override int GetBytes(char[] chars, int charIndex, int charCount, byte[] bytes, int byteIndex) { - for (var i = 0; i < charCount; i++) { - bytes[i + byteIndex] = (byte)chars[i + charIndex]; - } - return charCount; - } + /// + /// Encodes a set of characters from the specified character array into the specified byte array. + /// + /// The character array containing the set of characters to encode. + /// The index of the first character to encode. + /// The number of characters to encode. + /// The byte array to contain the resulting sequence of bytes. + /// The index at which to start writing the resulting sequence of bytes. + /// The actual number of bytes written into . + public override int GetBytes(char[] chars, int charIndex, int charCount, byte[] bytes, int byteIndex) + { + for (var i = 0; i < charCount; i++) + { + bytes[i + byteIndex] = (byte)chars[i + charIndex]; + } + return charCount; + } - /// - /// Calculates the number of characters produced by decoding a sequence of bytes from the specified byte array. - /// - /// The byte array containing the sequence of bytes to decode. - /// The index of the first byte to decode. - /// The number of bytes to decode. - /// The number of characters produced by decoding the specified sequence of bytes. - public override int GetCharCount(byte[] bytes, int index, int count) { - return count; - } + /// + /// Calculates the number of characters produced by decoding a sequence of bytes from the specified byte array. + /// + /// The byte array containing the sequence of bytes to decode. + /// The index of the first byte to decode. + /// The number of bytes to decode. + /// The number of characters produced by decoding the specified sequence of bytes. + public override int GetCharCount(byte[] bytes, int index, int count) + { + return count; + } - /// - /// Decodes a sequence of bytes from the specified byte array into the specified character array. - /// - /// The byte array containing the sequence of bytes to decode. - /// The index of the first byte to decode. - /// The number of bytes to decode. - /// The character array to contain the resulting set of characters. - /// The index at which to start writing the resulting set of characters. - /// The actual number of characters written into . - public override int GetChars(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex) { - for (var i = 0; i < byteCount; i++) { - chars[i + charIndex] = (char)bytes[i + byteIndex]; - } - return byteCount; - } + /// + /// Decodes a sequence of bytes from the specified byte array into the specified character array. + /// + /// The byte array containing the sequence of bytes to decode. + /// The index of the first byte to decode. + /// The number of bytes to decode. + /// The character array to contain the resulting set of characters. + /// The index at which to start writing the resulting set of characters. + /// The actual number of characters written into . + public override int GetChars(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex) + { + for (var i = 0; i < byteCount; i++) + { + chars[i + charIndex] = (char)bytes[i + byteIndex]; + } + return byteCount; + } - /// - /// Calculates the maximum number of bytes produced by encoding the specified number of characters. - /// - /// The number of characters to encode. - /// The maximum number of bytes produced by encoding the specified number of characters. - public override int GetMaxByteCount(int charCount) { - return charCount; - } + /// + /// Calculates the maximum number of bytes produced by encoding the specified number of characters. + /// + /// The number of characters to encode. + /// The maximum number of bytes produced by encoding the specified number of characters. + public override int GetMaxByteCount(int charCount) + { + return charCount; + } - /// - /// Calculates the maximum number of characters produced by decoding the specified number of bytes. - /// - /// The number of bytes to decode. - /// The maximum number of characters produced by decoding the specified number of bytes. - public override int GetMaxCharCount(int byteCount) { - return byteCount; - } - } + /// + /// Calculates the maximum number of characters produced by decoding the specified number of bytes. + /// + /// The number of bytes to decode. + /// The maximum number of characters produced by decoding the specified number of bytes. + public override int GetMaxCharCount(int byteCount) + { + return byteCount; + } + } } diff --git a/Source/ORTS.Menu/Activities.cs b/Source/ORTS.Menu/Activities.cs index e813715d2a..5c59cfcc69 100644 --- a/Source/ORTS.Menu/Activities.cs +++ b/Source/ORTS.Menu/Activities.cs @@ -19,7 +19,6 @@ using System.IO; using GNU.Gettext; using Orts.Formats.Msts; -using ORTS.Settings; namespace ORTS.Menu { diff --git a/Source/ORTS.Menu/Consists.cs b/Source/ORTS.Menu/Consists.cs index c3ee1d5ce7..34d42adcdc 100644 --- a/Source/ORTS.Menu/Consists.cs +++ b/Source/ORTS.Menu/Consists.cs @@ -20,7 +20,6 @@ using System.Linq; using GNU.Gettext; using Orts.Formats.Msts; -using ORTS.Settings; namespace ORTS.Menu { diff --git a/Source/ORTS.Menu/Folders.cs b/Source/ORTS.Menu/Folders.cs index fd735ff799..6413a47eaa 100644 --- a/Source/ORTS.Menu/Folders.cs +++ b/Source/ORTS.Menu/Folders.cs @@ -15,9 +15,9 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using ORTS.Settings; using System.Collections.Generic; using System.IO; +using ORTS.Settings; namespace ORTS.Menu { diff --git a/Source/ORTS.Menu/ORTimetables.cs b/Source/ORTS.Menu/ORTimetables.cs index 391548336e..c44683b33f 100644 --- a/Source/ORTS.Menu/ORTimetables.cs +++ b/Source/ORTS.Menu/ORTimetables.cs @@ -15,12 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using GNU.Gettext; -using Orts.Formats.Msts; -using Orts.Formats.OR; using System; using System.Collections.Generic; using System.IO; +using GNU.Gettext; +using Orts.Formats.OR; namespace ORTS.Menu { diff --git a/Source/ORTS.Menu/Paths.cs b/Source/ORTS.Menu/Paths.cs index 8720d81ac1..bc9eb54278 100644 --- a/Source/ORTS.Menu/Paths.cs +++ b/Source/ORTS.Menu/Paths.cs @@ -15,11 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; using System.Collections.Generic; using System.IO; using GNU.Gettext; using Orts.Formats.Msts; -using System; namespace ORTS.Menu { @@ -145,7 +145,8 @@ public static Path GetPath(Route route, string name, bool allowNonPlayerPath) { path = new Path(file); } - catch { + catch + { path = null; } diff --git a/Source/ORTS.Menu/Routes.cs b/Source/ORTS.Menu/Routes.cs index edcaca021b..70626bd45f 100644 --- a/Source/ORTS.Menu/Routes.cs +++ b/Source/ORTS.Menu/Routes.cs @@ -36,10 +36,10 @@ public class Route { if (Directory.Exists(path)) { - var trkFilePath = MSTSPath.GetTRKFileName(path); + var trkFilePath = MSTSPath.GetTRKFileName(path); try { - var trkFile = new RouteFile(trkFilePath); + var trkFile = new RouteFile(trkFilePath); Name = trkFile.Tr_RouteFile.Name.Trim(); RouteID = trkFile.Tr_RouteFile.RouteID; Description = trkFile.Tr_RouteFile.Description.Trim(); diff --git a/Source/ORTS.Settings/FolderSettings.cs b/Source/ORTS.Settings/FolderSettings.cs index 9fe429bc1f..8c398cc267 100644 --- a/Source/ORTS.Settings/FolderSettings.cs +++ b/Source/ORTS.Settings/FolderSettings.cs @@ -15,11 +15,7 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Text; using ORTS.Common; namespace ORTS.Settings diff --git a/Source/ORTS.Settings/InputSettings.cs b/Source/ORTS.Settings/InputSettings.cs index 40d122b790..d3030e1ca0 100644 --- a/Source/ORTS.Settings/InputSettings.cs +++ b/Source/ORTS.Settings/InputSettings.cs @@ -15,11 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using GNU.Gettext; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Input; -using ORTS.Common; -using ORTS.Common.Input; using System; using System.Collections.Generic; using System.Diagnostics; @@ -28,6 +23,11 @@ using System.Linq; using System.Runtime.InteropServices; using System.Text; +using GNU.Gettext; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Input; +using ORTS.Common; +using ORTS.Common.Input; namespace ORTS.Settings { diff --git a/Source/ORTS.Settings/UpdateState.cs b/Source/ORTS.Settings/UpdateState.cs index c135fc309b..0efef1d5f2 100644 --- a/Source/ORTS.Settings/UpdateState.cs +++ b/Source/ORTS.Settings/UpdateState.cs @@ -15,12 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using ORTS.Common; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Reflection; +using ORTS.Common; namespace ORTS.Settings { diff --git a/Source/ORTS.Updater/NativeMethods.cs b/Source/ORTS.Updater/NativeMethods.cs index d4a1a44908..fdec42afac 100644 --- a/Source/ORTS.Updater/NativeMethods.cs +++ b/Source/ORTS.Updater/NativeMethods.cs @@ -16,10 +16,7 @@ // along with Open Rails. If not, see . using System; -using System.Collections.Generic; -using System.Linq; using System.Runtime.InteropServices; -using System.Text; namespace ORTS.Updater { diff --git a/Source/ORTS.Updater/UpdateManager.cs b/Source/ORTS.Updater/UpdateManager.cs index 768ff8d743..3206409c0c 100644 --- a/Source/ORTS.Updater/UpdateManager.cs +++ b/Source/ORTS.Updater/UpdateManager.cs @@ -15,10 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Ionic.Zip; -using Newtonsoft.Json; -using ORTS.Common; -using ORTS.Settings; using System; using System.Collections.Generic; using System.ComponentModel; @@ -34,6 +30,10 @@ using System.Text; using System.Threading; using System.Windows.Forms; +using Ionic.Zip; +using Newtonsoft.Json; +using ORTS.Common; +using ORTS.Settings; namespace ORTS.Updater { diff --git a/Source/Orts.Formats.Msts/ActivityFile.cs b/Source/Orts.Formats.Msts/ActivityFile.cs index c1fd16024f..ac3a8541b1 100644 --- a/Source/Orts.Formats.Msts/ActivityFile.cs +++ b/Source/Orts.Formats.Msts/ActivityFile.cs @@ -54,17 +54,17 @@ // *) // RouteID = "RouteID", "(", Text, ")" ; (* file name *) - + // Name = "Name", "(", Text, ")" ; - + // Description = "Description", "(", Text, ")" ; // Briefing = "Briefing", "(", ParagraphText, ")" ; - + // ParagraphText = Text, *( "+", Text ) ; - + // CompleteActivity = "CompleteActivity", "(", Integer, ")" ; (* 1 for true (to be checked) *) - + // Type = "Type", "(", Integer, ")" ; (* 0 (default) for ??? (to be checked) *) // Mode = "Mode", "(", Integer, ")" ; (* 2 (default) for ??? (to be checked) *) @@ -84,25 +84,25 @@ // Difficulty = "Difficulty", "(", Integer, ")" ; (* Easy=0 (default), Medium, Hard *) // Animals = "Animals", "(", Integer, ")" ; (* 0-100 for % (default is 100) *) - + // Workers = "Workers", "(", Integer, ")" ; (* 0-100 for % (default is 0) *) - + // FuelWater = "FuelWater", "(", Integer, ")"; (* 0-100 for % (default is 100) *) - + // FuelCoal = "FuelCoal", "(", Integer, ")"; (* 0-100 for % (default is 100) *) - + // FuelDiesel = "FuelDiesel", "(", Integer, ")"; (* 0-100 for % (default is 100) *) // Tr_Activity_File = "Tr_Activity_File", // "(", *[ Player_Service_Definition | NextServiceUID | NextActivityObjectUID // | Traffic_Definition | Events | ActivityObjects | ActivityFailedSignals | PlatformNumPassengersWaiting | ActivityRestrictedSpeedZones ] ")" ; - + // Player_Service_Definition = "Player_Service_Definition", (* Text is linked to PathID somehow. *) // "(", Text, [ Player_Traffic_Definition | UiD | *Player_Service_Item ], ")" ; (* Code suggests just one Player_Traffic_Definition *) - + // Player_Traffic_Definition = "Player_Traffic_Definition", // "(", Integer, *( Player_Traffic_Item ), ")" ; - + // Player_Traffic_Item = (* Note lack of separator between Player_Traffic_Items. // For simplicity, parser creates a new object whenever PlatformStartID is parsed. *) // *[ "ArrivalTime", "(", Integer, ")" @@ -110,7 +110,7 @@ // | "SkipCount", "(", Integer, ")" // | "DistanceDownPath", "(", Float, ")" ], // "PlatformStartID", "(", Integer, ")" ; - + // UiD = "UiD", "(", Integer, ")" ; // Player_Service_Item = (* Note lack of separator between Player_Service_Items *) @@ -119,13 +119,13 @@ // | "SkipCount", "(", Integer, ")" // | "DistanceDownPath", "(", Float, ")" ], // "PlatformStartID", "(", Integer, ")" ; - + // NextServiceUID = "NextServiceUID", "(", Integer, ")" ; // NextActivityObjectUID = "NextActivityObjectUID", "(", Integer, ")" ; - + // Traffic_Definition = "Traffic_Definition", "(", Text, *Service_Definition, ")" ; - + // Service_Definition = "Service_Definition", // "(", Text, Integer, UiD, *Player_Service_Item, ")" ; (* Integer is time in seconds *) @@ -135,34 +135,34 @@ // EventCategoryLocation = "EventCategoryLocation", // "(", *[ EventTypeLocation | ID | Activation_Level | Outcomes // | Name | Location | TriggerOnStop ], ")" ; (* ID and Name defined above *) - + // EventTypeLocation = "EventTypeLocation", "(", ")" ; - + // ID = "ID", "(", Integer, ")" ; - + // Activation_Level = "Activation_Level", "(", Integer, ")" ; - + // Outcomes = "Outcomes", // "(", *[ ActivitySuccess | ActivityFail | ActivateEvent | RestoreActLevel | DecActLevel | IncActLevel | DisplayMessage ], ")" ; - + // ActivitySuccess = "ActivitySuccess", "(", ")" ; (* No text parameter *) - + // ActivityFail = "ActivityFail", "(", Text, ")" ; - + // ActivateEvent = "ActivateEvent", "(", Integer, ")" ; // RestoreActLevel = "RestoreActLevel", "(", Integer, ")" ; // DecActLevel = "DecActLevel", "(", Integer, ")" ; - + // IncActLevel = "IncActLevel", "(", Integer, ")" ; (* Some MSTS samples have more than a single IncActLevel *) - + // DisplayMessage = "DisplayMessage", "(", Text, ")" ; - + // Location = "Location", "(", 5*Integer, ")" ; - + // TriggerOnStop = "TriggerOnStop", "(", Integer, ")" ; (* 0 for ?? *) - + // TextToDisplayOnCompletionIfTriggered = "TextToDisplayOnCompletionIfTriggered", "(", ParagraphText, ")" ; // TextToDisplayOnCompletionIfNotTriggered = "TextToDisplayOnCompletionIfNotTriggered", "(", ParagraphText, ")" ; @@ -180,41 +180,41 @@ // EventTypeAllStops = "EventTypeAllStops", "(", ")" ; // EventTypeAssembleTrain = "EventTypeAssembleTrain", "(", ")" ; - + // EventTypeAssembleTrainAtLocation = "EventTypeAssembleTrainAtLocation", "(", ")" ; - + // EventTypeDropOffWagonsAtLocation = "EventTypeDropOffWagonsAtLocation", "(", ")" ; - + // EventTypePickUpPassengers = "EventTypePickUpPassengers", "(", ")" ; // EventTypePickUpWagons = "EventTypePickUpWagons", "(", ")" ; - + // EventTypeReachSpeed = "EventTypeReachSpeed", "(", ")" ; // Reversable_Event = [ "Reversable_Event" | "Reversible_Event" ], (* Reversable is not listed at www.learnersdictionary.com *) // "(", ")" ; - + // SidingItem = "(", Integer, ")" ; // Wagon_List = "Wagon_List", "(", *WagonListItem, ")" ; - + // WagonListItem = (* Description omitted from PickUpWagons and sometimes from DropOffWagonsAtLocation *) // UiD, SidingItem, [ "Description", "(", Text, ")" ] ; (" MSTS uses SidingItem inside the Wagon_List and also at the same level *) - + // StationStop = - + // Speed = "(", Integer, ")" ; - + // EventCategoryTime = "EventCategoryTime", "(", (* single instance of each alternative *) // [ EventTypeTime | ID | Activation_Level | Outcomes | TextToDisplayOnCompletionIfTriggered // | TextToDisplayOnCompletionIfNotTriggered | Name | Time ], ")" ; (* Outcomes may have empty parameters *) - + // EventTypeTime = "EventTypeTime", "(", ")" ; // Time = "Time", "(", Integer, ")" ; - + // ActivityObjects = "ActivityObjects", "(", *ActivityObject, ")" ; - + // ActivityObject = "ActivityObject", // "(", *[ ObjectType | Train_Config | Direction | ID | Tile ], ")" ; (* ID defined above *) @@ -225,13 +225,13 @@ // TrainCfg = "TrainCfg", // "(", [ Name | Serial | MaxVelocity | NextWagonUID | Durability | Wagon | Engine ], ")" ; - + // Serial = "Serial", "(", Integer, ")" ; - + // MaxVelocity = "MaxVelocity", "(", 2*Float, ")" ; - + // NextWagonUID = "NextWagonUID", "(", Integer, ")" ; - + // Durability = "Durability", "(", Float, ")" ; // Wagon = "Wagon", @@ -240,37 +240,35 @@ // WagonData = "WagonData", "(", 2*Text, ")" ; // Engine = "Engine", "(", *[ UiD | EngineData ], ")" ; (* UiD defined above *) - + // EngineData = "EngineData", // "(", 2*Text, ")" ; - + // Direction = "Direction", "(", Integer, ")" ; (* 0 for ??, 1 for ?? *) // Tile = "Tile", "(", 2*Integer, 2*Float, ")" ; - + // ActivityFailedSignals = "ActivityFailedSignals", "(", *ActivityFailedSignal, ")" ; - + // ActivityFailedSignal = "ActivityFailedSignal", "(", Integer, ")" ; - + // PlatformNumPassengersWaiting = "PlatformNumPassengersWaiting", "(", *PlatformData, ")" ; - + // PlatformData = "PlatformData", "(", 2*Integer, ")" ; - + // ActivityRestrictedSpeedZones = "ActivityRestrictedSpeedZones", "(", *ActivityRestrictedSpeedZone, ")" ; - + // ActivityRestrictedSpeedZone = "ActivityRestrictedSpeedZone", // "(", StartPosition, EndPosition, ")" ; // StartPosition = "StartPosition, "(", 4*Integer, ")" ; - + // EndPosition = "EndPosition", "(", 4*Integer, ")" ; using System; -using System.Collections; using System.Collections.Generic; using System.Diagnostics; -using System.Text; using System.IO; using Orts.Parsers.Msts; // For class S (seconds) using ORTS.Common; @@ -280,7 +278,8 @@ namespace Orts.Formats.Msts public enum SeasonType { Spring = 0, Summer, Autumn, Winter } public enum WeatherType { Clear = 0, Snow, Rain } public enum Difficulty { Easy = 0, Medium, Hard } - public enum EventType { + public enum EventType + { AllStops = 0, AssembleTrain, AssembleTrainAtLocation, DropOffWagonsAtLocation, PickUpPassengers, PickUpWagons, ReachSpeed } @@ -303,19 +302,24 @@ public struct LoadData /// Parse and *.act file. /// Naming for classes matches the terms in the *.act file. /// - public class ActivityFile { + public class ActivityFile + { public Tr_Activity Tr_Activity; - public ActivityFile(string filenamewithpath) { + public ActivityFile(string filenamewithpath) + { Read(filenamewithpath, false); } - public ActivityFile(string filenamewithpath, bool headerOnly) { + public ActivityFile(string filenamewithpath, bool headerOnly) + { Read(filenamewithpath, headerOnly); } - public void Read(string filenamewithpath, bool headerOnly) { - using (STFReader stf = new STFReader(filenamewithpath, false)) { + public void Read(string filenamewithpath, bool headerOnly) + { + using (STFReader stf = new STFReader(filenamewithpath, false)) + { stf.ParseFile(() => headerOnly && (Tr_Activity != null) && (Tr_Activity.Tr_Activity_Header != null), new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("tr_activity", ()=>{ Tr_Activity = new Tr_Activity(stf, headerOnly); }), }); @@ -344,12 +348,14 @@ public ActivityFile() } } - public class Tr_Activity { + public class Tr_Activity + { public int Serial = 1; public Tr_Activity_Header Tr_Activity_Header; public Tr_Activity_File Tr_Activity_File; - public Tr_Activity(STFReader stf, bool headerOnly) { + public Tr_Activity(STFReader stf, bool headerOnly) + { stf.MustMatch("("); stf.ParseBlock(() => headerOnly && (Tr_Activity_Header != null), new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("tr_activity_file", ()=>{ Tr_Activity_File = new Tr_Activity_File(stf); }), @@ -380,7 +386,8 @@ public Tr_Activity() } } - public class Tr_Activity_Header { + public class Tr_Activity_Header + { public string RouteID; public string Name; // AE Display Name public string Description = " "; @@ -402,7 +409,8 @@ public class Tr_Activity_Header { public int FuelDiesel = 100; // percent public string LoadStationsPopulationFile; - public Tr_Activity_Header(STFReader stf) { + public Tr_Activity_Header(STFReader stf) + { stf.MustMatch("("); stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("routeid", ()=>{ RouteID = stf.ReadStringBlock(null); }), @@ -416,7 +424,7 @@ public class Tr_Activity_Header { new STFReader.TokenProcessor("season", ()=>{ Season = (SeasonType)stf.ReadIntBlock(null); }), new STFReader.TokenProcessor("weather", ()=>{ Weather = (WeatherType)stf.ReadIntBlock(null); }), new STFReader.TokenProcessor("pathid", ()=>{ PathID = stf.ReadStringBlock(null); }), - new STFReader.TokenProcessor("startingspeed", ()=>{ StartingSpeed = (int)stf.ReadFloatBlock(STFReader.UNITS.Speed, (float)StartingSpeed); }), + new STFReader.TokenProcessor("startingspeed", ()=>{ StartingSpeed = (int)stf.ReadFloatBlock(STFReader.UNITS.Speed, (float)StartingSpeed); }), new STFReader.TokenProcessor("duration", ()=>{ Duration = new Duration(stf); }), new STFReader.TokenProcessor("difficulty", ()=>{ Difficulty = (Difficulty)stf.ReadIntBlock(null); }), new STFReader.TokenProcessor("animals", ()=>{ Animals = stf.ReadIntBlock(Animals); }), @@ -434,18 +442,21 @@ public Tr_Activity_Header() } } - public class StartTime { + public class StartTime + { public int Hour; public int Minute; public int Second; - public StartTime(int h, int m, int s) { + public StartTime(int h, int m, int s) + { Hour = h; Minute = m; Second = s; } - public StartTime(STFReader stf) { + public StartTime(STFReader stf) + { stf.MustMatch("("); Hour = stf.ReadInt(null); Minute = stf.ReadInt(null); @@ -453,23 +464,27 @@ public class StartTime { stf.MustMatch(")"); } - public String FormattedStartTime() { + public String FormattedStartTime() + { return Hour.ToString("00") + ":" + Minute.ToString("00") + ":" + Second.ToString("00"); } } - public class Duration { + public class Duration + { int Hour; int Minute; int Second; - public Duration(int h, int m) { + public Duration(int h, int m) + { Hour = h; Minute = m; Second = 0; } - public Duration(STFReader stf) { + public Duration(STFReader stf) + { stf.MustMatch("("); Hour = stf.ReadInt(null); Minute = stf.ReadInt(null); @@ -478,10 +493,10 @@ public class Duration { public int ActivityDuration() { - return Hour* 3600 + Minute* 60 + Second; // Convert time to seconds + return Hour * 3600 + Minute * 60 + Second; // Convert time to seconds } - public String FormattedDurationTime() + public String FormattedDurationTime() { return Hour.ToString("00") + ":" + Minute.ToString("00"); } @@ -493,7 +508,8 @@ public String FormattedDurationTimeHMS() } - public class Tr_Activity_File { + public class Tr_Activity_File + { public Player_Service_Definition Player_Service_Definition; public int NextServiceUID = 1; public int NextActivityObjectUID = 32786; @@ -507,7 +523,8 @@ public class Tr_Activity_File { public LevelCrossingHornPattern AILevelCrossingHornPattern { get; private set; } = LevelCrossingHornPattern.Single; - public Tr_Activity_File(STFReader stf) { + public Tr_Activity_File(STFReader stf) + { stf.MustMatch("("); var parser = new List { new STFReader.TokenProcessor("player_service_definition",()=>{ Player_Service_Definition = new Player_Service_Definition(stf); }), @@ -564,11 +581,13 @@ private IEnumerable ORSpecificDataTokenProcessors(STFR } } - public class Player_Service_Definition { + public class Player_Service_Definition + { public string Name; public Player_Traffic_Definition Player_Traffic_Definition; - public Player_Service_Definition(STFReader stf) { + public Player_Service_Definition(STFReader stf) + { stf.MustMatch("("); Name = stf.ReadString(); stf.ParseBlock(new STFReader.TokenProcessor[] { @@ -583,11 +602,13 @@ public Player_Service_Definition() } } - public class Player_Traffic_Definition { + public class Player_Traffic_Definition + { public int Time; public List Player_Traffic_List = new List(); - public Player_Traffic_Definition(STFReader stf) { + public Player_Traffic_Definition(STFReader stf) + { DateTime baseDT = new DateTime(); DateTime arrivalTime = new DateTime(); DateTime departTime = new DateTime(); @@ -603,7 +624,7 @@ public class Player_Traffic_Definition { new STFReader.TokenProcessor("departtime", ()=>{ departTime = baseDT.AddSeconds(stf.ReadFloatBlock(STFReader.UNITS.Time, null)); }), new STFReader.TokenProcessor("skipcount", ()=>{ skipCount = stf.ReadIntBlock(null); }), new STFReader.TokenProcessor("distancedownpath", ()=>{ distanceDownPath = stf.ReadFloatBlock(STFReader.UNITS.Distance, null); }), - new STFReader.TokenProcessor("platformstartid", ()=>{ platformStartID = stf.ReadIntBlock(null); + new STFReader.TokenProcessor("platformstartid", ()=>{ platformStartID = stf.ReadIntBlock(null); Player_Traffic_List.Add(new Player_Traffic_Item(arrivalTime, departTime, skipCount, distanceDownPath, platformStartID)); }), }); } @@ -614,13 +635,15 @@ public Player_Traffic_Definition() } } - public class Player_Traffic_Item { + public class Player_Traffic_Item + { public DateTime ArrivalTime; public DateTime DepartTime; public float DistanceDownPath; public int PlatformStartID; - public Player_Traffic_Item(DateTime arrivalTime, DateTime departTime, int skipCount, float distanceDownPath, int platformStartID) { + public Player_Traffic_Item(DateTime arrivalTime, DateTime departTime, int skipCount, float distanceDownPath, int platformStartID) + { ArrivalTime = arrivalTime; DepartTime = departTime; DistanceDownPath = distanceDownPath; @@ -628,7 +651,8 @@ public class Player_Traffic_Item { } } - public class Service_Definition { + public class Service_Definition + { public string Name; public int Time; public int UiD; @@ -638,7 +662,8 @@ public class Service_Definition { float distanceDownPath = new float(); int platformStartID; - public Service_Definition(STFReader stf) { + public Service_Definition(STFReader stf) + { stf.MustMatch("("); Name = stf.ReadString(); Time = (int)stf.ReadFloat(STFReader.UNITS.Time, null); @@ -650,7 +675,7 @@ public class Service_Definition { new STFReader.TokenProcessor("efficiency", ()=>{ efficiency = stf.ReadFloatBlock(STFReader.UNITS.Any, null); }), new STFReader.TokenProcessor("skipcount", ()=>{ skipCount = stf.ReadIntBlock(null); }), new STFReader.TokenProcessor("distancedownpath", ()=>{ distanceDownPath = stf.ReadFloatBlock(STFReader.UNITS.Distance, null); }), - new STFReader.TokenProcessor("platformstartid", ()=>{ platformStartID = stf.ReadIntBlock(null); + new STFReader.TokenProcessor("platformstartid", ()=>{ platformStartID = stf.ReadIntBlock(null); ServiceList.Add(new Service_Item(efficiency, skipCount, distanceDownPath, platformStartID)); }), }); } @@ -677,7 +702,7 @@ public Service_Definition(string service_Definition, Player_Traffic_Definition p /// <\summary> /// - public Service_Definition () + public Service_Definition() { } //================================================================================================// @@ -692,9 +717,9 @@ public void Save(BinaryWriter outf) { outf.Write(-1); } - else + else { - outf.Write (ServiceList.Count); + outf.Write(ServiceList.Count); foreach (Service_Item thisServiceItem in ServiceList) { outf.Write(thisServiceItem.Efficiency); @@ -702,7 +727,7 @@ public void Save(BinaryWriter outf) } } } - } + } public class Service_Item { @@ -711,7 +736,8 @@ public class Service_Item public float DistanceDownPath = new float(); public int PlatformStartID; - public Service_Item(float efficiency, int skipCount, float distanceDownPath, int platformStartID) { + public Service_Item(float efficiency, int skipCount, float distanceDownPath, int platformStartID) + { Efficiency = efficiency; SkipCount = skipCount; DistanceDownPath = distanceDownPath; @@ -722,12 +748,14 @@ public class Service_Item /// /// Parses Service_Definition objects and saves them in ServiceDefinitionList. /// - public class Traffic_Definition { + public class Traffic_Definition + { public string Name; public TrafficFile TrafficFile; public List ServiceDefinitionList = new List(); - public Traffic_Definition(STFReader stf) { + public Traffic_Definition(STFReader stf) + { stf.MustMatch("("); Name = stf.ReadString(); stf.ParseBlock(new STFReader.TokenProcessor[] { @@ -742,10 +770,12 @@ public class Traffic_Definition { /// /// Parses Event objects and saves them in EventList. /// - public class Events { + public class Events + { public List EventList = new List(); - public Events(STFReader stf) { + public Events(STFReader stf) + { stf.MustMatch("("); stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("eventcategorylocation", ()=>{ EventList.Add(new EventCategoryLocation(stf)); }), @@ -754,7 +784,7 @@ public class Events { }); } - public void InsertORSpecificData (STFReader stf) + public void InsertORSpecificData(STFReader stf) { stf.MustMatch("("); stf.ParseBlock(new STFReader.TokenProcessor[] { @@ -788,7 +818,7 @@ public void TryModify(int Category, STFReader stf) wrongEventID = !TestMatch(Category, origEvent); if (!wrongEventID) { - origEvent.AddOrModifyEvent(stf, Path.GetDirectoryName(stf.FileName)); + origEvent.AddOrModifyEvent(stf, Path.GetDirectoryName(stf.FileName)); } else { @@ -825,7 +855,8 @@ public enum ORTSActSoundFileTypes /// /// The 3 types of event are inherited from the abstract Event class. /// - public abstract class Event { + public abstract class Event + { public int ID; public string Name; public int Activation_Level; @@ -840,11 +871,12 @@ public abstract class Event { public string TrainService = ""; public int TrainStartingTime = -1; - public virtual void AddOrModifyEvent (STFReader stf, string fileName) + public virtual void AddOrModifyEvent(STFReader stf, string fileName) { } } - public class EventCategoryLocation : Event { + public class EventCategoryLocation : Event + { public bool TriggerOnStop; // Value assumed if property not found. public int TileX; public int TileZ; @@ -852,17 +884,18 @@ public class EventCategoryLocation : Event { public float Z; public float RadiusM; - public EventCategoryLocation(STFReader stf) { + public EventCategoryLocation(STFReader stf) + { stf.MustMatch("("); AddOrModifyEvent(stf, stf.FileName); - } + } - public override void AddOrModifyEvent (STFReader stf, string fileName) + public override void AddOrModifyEvent(STFReader stf, string fileName) { stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("eventtypelocation", ()=>{ stf.MustMatch("("); stf.MustMatch(")"); }), new STFReader.TokenProcessor("id", ()=>{ ID = stf.ReadIntBlock(null); }), - new STFReader.TokenProcessor("ortstriggeringtrain", ()=>{ ParseTrain(stf); }), + new STFReader.TokenProcessor("ortstriggeringtrain", ()=>{ ParseTrain(stf); }), new STFReader.TokenProcessor("activation_level", ()=>{ Activation_Level = stf.ReadIntBlock(null); }), new STFReader.TokenProcessor("outcomes", ()=> { @@ -918,14 +951,16 @@ protected void ParseTrain(STFReader stf) /// Parses all types of action events. /// Save type of action event in Type. MSTS syntax isn't fully hierarchical, so using inheritance here instead of Type would be awkward. /// - public class EventCategoryAction : Event { + public class EventCategoryAction : Event + { public EventType Type; public WagonList WagonList; public Nullable SidingId; // May be specified inside the Wagon_List instead. Nullable as can't use -1 to indicate not set. public float SpeedMpS; //private const float MilespHourToMeterpSecond = 0.44704f; - public EventCategoryAction(STFReader stf) { + public EventCategoryAction(STFReader stf) + { stf.MustMatch("("); AddOrModifyEvent(stf, stf.FileName); } @@ -980,19 +1015,21 @@ public override void AddOrModifyEvent(STFReader stf, string fileName) } - public class WagonList { + public class WagonList + { public List WorkOrderWagonList = new List(); Nullable uID; // Nullable as can't use -1 to indicate not set. Nullable sidingId; // May be specified outside the Wagon_List instead. string description = ""; // Value assumed if property not found. - public WagonList(STFReader stf, EventType eventType) { + public WagonList(STFReader stf, EventType eventType) + { stf.MustMatch("("); // "Drop Off" Wagon_List sometimes lacks a Description attribute, so we create the wagon _before_ description // is parsed. Bad practice, but not very dangerous as each Description usually repeats the same data. stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("uid", ()=>{ uID = stf.ReadUIntBlock(null); }), - new STFReader.TokenProcessor("sidingitem", ()=>{ sidingId = stf.ReadUIntBlock(null); + new STFReader.TokenProcessor("sidingitem", ()=>{ sidingId = stf.ReadUIntBlock(null); WorkOrderWagonList.Add(new WorkOrderWagon(uID.Value, sidingId.Value, description));}), new STFReader.TokenProcessor("description", ()=>{ description = stf.ReadStringBlock(""); }), }); @@ -1003,22 +1040,26 @@ public class WagonList { /// Parses a wagon from the WagonList. /// Do not confuse with older class Wagon below, which parses TrainCfg from the *.con file. /// - public class WorkOrderWagon { + public class WorkOrderWagon + { public Nullable UID; // Nullable as can't use -1 to indicate not set. public Nullable SidingId; // May be specified outside the Wagon_List. public string Description = ""; // Value assumed if property not found. - public WorkOrderWagon(uint uId, uint sidingId, string description) { + public WorkOrderWagon(uint uId, uint sidingId, string description) + { UID = uId; SidingId = sidingId; Description = description; } } - public class EventCategoryTime : Event { // E.g. Hisatsu route and Short Passenger Run shrtpass.act + public class EventCategoryTime : Event + { // E.g. Hisatsu route and Short Passenger Run shrtpass.act public int Time; - public EventCategoryTime(STFReader stf) { + public EventCategoryTime(STFReader stf) + { stf.MustMatch("("); AddOrModifyEvent(stf, stf.FileName); } @@ -1061,7 +1102,8 @@ public override void AddOrModifyEvent(STFReader stf, string fileName) } } - public class Outcomes { + public class Outcomes + { public bool ActivitySuccess; public string ActivityFail; // MSTS Activity Editor limits model to 4 outcomes of any type. We use lists so there is no restriction. @@ -1070,17 +1112,18 @@ public class Outcomes { public List DecActLevelList = new List(); public List IncActLevelList = new List(); public string DisplayMessage; - // public string WaitingTrainToRestart; + // public string WaitingTrainToRestart; public RestartWaitingTrain RestartWaitingTrain; public ORTSWeatherChange ORTSWeatherChange; public ActivitySound ActivitySound; - public Outcomes(STFReader stf, string fileName) { + public Outcomes(STFReader stf, string fileName) + { CreateOrModifyOutcomes(stf, fileName); } public void CreateOrModifyOutcomes(STFReader stf, string fileName) - { + { stf.MustMatch("("); stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("activitysuccess", ()=>{ stf.MustMatch("("); stf.MustMatch(")"); ActivitySuccess = true; }), @@ -1106,7 +1149,7 @@ public class RestartWaitingTrain public int DelayToRestart; public int MatchingWPDelay; - public RestartWaitingTrain (STFReader stf) + public RestartWaitingTrain(STFReader stf) { stf.MustMatch("("); stf.ParseBlock(new STFReader.TokenProcessor[] { @@ -1143,10 +1186,10 @@ public ORTSWeatherChange(STFReader stf) stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("ortsovercast", ()=> { - stf.MustMatch("("); + stf.MustMatch("("); ORTSOvercast = stf.ReadFloat(0, -1); ORTSOvercastTransitionTimeS = stf.ReadInt(-1); - stf.MustMatch(")"); + stf.MustMatch(")"); }), new STFReader.TokenProcessor("ortsfog", ()=> { @@ -1220,7 +1263,8 @@ public ActivitySound(STFReader stf, string fileName) /// /// Parses ActivityObject objects and saves them in ActivityObjectList. /// - public class ActivityObjects { + public class ActivityObjects + { public List ActivityObjectList = new List(); //public new ActivityObject this[int i] @@ -1229,7 +1273,8 @@ public class ActivityObjects { // set { base[i] = value; } //} - public ActivityObjects(STFReader stf) { + public ActivityObjects(STFReader stf) + { stf.MustMatch("("); stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("activityobject", ()=>{ ActivityObjectList.Add(new ActivityObject(stf)); }), @@ -1237,7 +1282,8 @@ public class ActivityObjects { } } - public class ActivityObject { + public class ActivityObject + { public Train_Config Train_Config; public int Direction; public int ID; @@ -1246,7 +1292,8 @@ public class ActivityObject { public float X; public float Z; - public ActivityObject(STFReader stf) { + public ActivityObject(STFReader stf) + { stf.MustMatch("("); stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("objecttype", ()=>{ stf.MustMatch("("); stf.MustMatch("WagonsList"); stf.MustMatch(")"); }), @@ -1265,10 +1312,12 @@ public class ActivityObject { } } - public class Train_Config { + public class Train_Config + { public TrainCfg TrainCfg; - public Train_Config(STFReader stf) { + public Train_Config(STFReader stf) + { stf.MustMatch("("); stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("traincfg", ()=>{ TrainCfg = new TrainCfg(stf); }), @@ -1277,11 +1326,13 @@ public class Train_Config { } - public class MaxVelocity { + public class MaxVelocity + { public float A; public float B = 0.001f; - public MaxVelocity(STFReader stf) { + public MaxVelocity(STFReader stf) + { stf.MustMatch("("); A = stf.ReadFloat(STFReader.UNITS.Speed, null); B = stf.ReadFloat(STFReader.UNITS.Speed, null); @@ -1289,7 +1340,8 @@ public class MaxVelocity { } } - public class TrainCfg { + public class TrainCfg + { public string Name = "Loose consist."; int Serial = 1; public MaxVelocity MaxVelocity; @@ -1299,7 +1351,8 @@ public class TrainCfg { public List WagonList = new List(); - public TrainCfg(STFReader stf) { + public TrainCfg(STFReader stf) + { stf.MustMatch("("); Name = stf.ReadString(); stf.ParseBlock(new STFReader.TokenProcessor[] { @@ -1316,7 +1369,8 @@ public class TrainCfg { } } - public class Wagon { + public class Wagon + { public string Folder; public string Name; public int UiD; @@ -1325,7 +1379,8 @@ public class Wagon { public bool Flip; public List LoadDataList; - public Wagon(STFReader stf) { + public Wagon(STFReader stf) + { stf.MustMatch("("); stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("uid", ()=>{ UiD = stf.ReadIntBlock(null); }), @@ -1355,10 +1410,13 @@ public class Wagon { }); } - public string GetName(uint uId, List wagonList) { - foreach (var item in wagonList) { + public string GetName(uint uId, List wagonList) + { + foreach (var item in wagonList) + { var wagon = item as Wagon; - if (wagon.UiD == uId) { + if (wagon.UiD == uId) + { return wagon.Name; } } @@ -1366,10 +1424,12 @@ public class Wagon { } } - public class PlatformNumPassengersWaiting { // For use, see file EUROPE1\ACTIVITIES\aftstorm.act + public class PlatformNumPassengersWaiting + { // For use, see file EUROPE1\ACTIVITIES\aftstorm.act public List PlatformDataList = new List(); - public PlatformNumPassengersWaiting(STFReader stf) { + public PlatformNumPassengersWaiting(STFReader stf) + { stf.MustMatch("("); stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("platformdata", ()=>{ PlatformDataList.Add(new PlatformData(stf)); }), @@ -1377,16 +1437,19 @@ public class PlatformNumPassengersWaiting { // For use, see file EUROPE1\ACTIVI } } - public class PlatformData { // e.g. "PlatformData ( 41 20 )" + public class PlatformData + { // e.g. "PlatformData ( 41 20 )" public int Id; public int PassengerCount; - public PlatformData(int id, int passengerCount) { + public PlatformData(int id, int passengerCount) + { Id = id; PassengerCount = passengerCount; } - public PlatformData(STFReader stf) { + public PlatformData(STFReader stf) + { stf.MustMatch("("); Id = stf.ReadInt(null); PassengerCount = stf.ReadInt(null); @@ -1394,9 +1457,11 @@ public class PlatformData { // e.g. "PlatformData ( 41 20 )" } } - public class ActivityFailedSignals { // e.g. ActivityFailedSignals ( ActivityFailedSignal ( 50 ) ) + public class ActivityFailedSignals + { // e.g. ActivityFailedSignals ( ActivityFailedSignal ( 50 ) ) public List FailedSignalList = new List(); - public ActivityFailedSignals(STFReader stf) { + public ActivityFailedSignals(STFReader stf) + { stf.MustMatch("("); stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("activityfailedsignal", ()=>{ FailedSignalList.Add(stf.ReadIntBlock(null)); }), @@ -1404,10 +1469,12 @@ public class ActivityFailedSignals { // e.g. ActivityFailedSignals ( ActivityFai } } - public class ActivityRestrictedSpeedZones { // For use, see file EUROPE1\ACTIVITIES\aftstorm.act + public class ActivityRestrictedSpeedZones + { // For use, see file EUROPE1\ACTIVITIES\aftstorm.act public List ActivityRestrictedSpeedZoneList = new List(); - public ActivityRestrictedSpeedZones(STFReader stf) { + public ActivityRestrictedSpeedZones(STFReader stf) + { stf.MustMatch("("); stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("activityrestrictedspeedzone", ()=>{ ActivityRestrictedSpeedZoneList.Add(new ActivityRestrictedSpeedZone(stf)); }), @@ -1415,11 +1482,13 @@ public class ActivityRestrictedSpeedZones { // For use, see file EUROPE1\ACTIVI } } - public class ActivityRestrictedSpeedZone { + public class ActivityRestrictedSpeedZone + { public Position StartPosition; public Position EndPosition; - public ActivityRestrictedSpeedZone(STFReader stf) { + public ActivityRestrictedSpeedZone(STFReader stf) + { stf.MustMatch("("); stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("startposition", ()=>{ StartPosition = new Position(stf); }), @@ -1428,21 +1497,24 @@ public class ActivityRestrictedSpeedZone { } } - public class Position { + public class Position + { public int TileX; public int TileZ; public float X; public float Z; public float Y; - public Position(int tileX, int tileZ, int x, int z) { + public Position(int tileX, int tileZ, int x, int z) + { TileX = tileX; TileZ = tileZ; X = x; Z = z; } - public Position(STFReader stf) { + public Position(STFReader stf) + { stf.MustMatch("("); TileX = stf.ReadInt(null); TileZ = stf.ReadInt(null); diff --git a/Source/Orts.Formats.Msts/CabViewFile.cs b/Source/Orts.Formats.Msts/CabViewFile.cs index 3972a47a6f..4ede5a8c6b 100644 --- a/Source/Orts.Formats.Msts/CabViewFile.cs +++ b/Source/Orts.Formats.Msts/CabViewFile.cs @@ -15,13 +15,13 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Microsoft.Xna.Framework; -using Orts.Parsers.Msts; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; +using Microsoft.Xna.Framework; +using Orts.Parsers.Msts; namespace Orts.Formats.Msts { @@ -63,9 +63,9 @@ public CabViewFile(string filePath, string basePath) new STFReader.TokenProcessor("cabviewcontrols", ()=>{ CabViewControls = new CabViewControls(stf, basePath); }), });}), }); - } + } - } // class CVFFile + } // class CVFFile public enum CABViewControlTypes { @@ -246,8 +246,8 @@ public enum CABViewControlTypes ORTS_MULTI_POSITION_CONTROLLER, ORTS_CC_SPEED_0, - ORTS_CC_SPEED_DELTA, - + ORTS_CC_SPEED_DELTA, + ORTS_ODOMETER, ORTS_ODOMETER_RESET, ORTS_ODOMETER_DIRECTION, @@ -282,8 +282,8 @@ public enum CABViewControlStyles NOT_SPRUNG, WHILE_PRESSED, PRESSED, - ONOFF, - _24HOUR, + ONOFF, + _24HOUR, _12HOUR } @@ -299,7 +299,7 @@ public enum CABViewControlUnits KILOVOLTS, KM_PER_HOUR, - MILES_PER_HOUR, + MILES_PER_HOUR, METRESµSECµSEC, METRES_SEC_SEC, KMµHOURµHOUR, @@ -311,7 +311,7 @@ public enum CABViewControlUnits MILES_HOUR_MIN, MILES_HOUR_HOUR, - NEWTONS, + NEWTONS, KILO_NEWTONS, KILO_LBS, METRES_PER_SEC, @@ -384,15 +384,15 @@ public CabViewControls(STFReader stf, string basepath) new STFReader.TokenProcessor("tristate", ()=>{ Add(new CVCDiscrete(stf, basepath, DiscreteStates.TRI_STATE)); }), new STFReader.TokenProcessor("multistate", ()=>{ Add(new CVCDiscrete(stf, basepath, DiscreteStates.MULTI_STATE)); }), new STFReader.TokenProcessor("multistatedisplay", ()=>{ Add(new CVCMultiStateDisplay(stf, basepath)); }), - new STFReader.TokenProcessor("cabsignaldisplay", ()=>{ Add(new CVCSignal(stf, basepath, DiscreteStates.CAB_SIGNAL_DISPLAY)); }), - new STFReader.TokenProcessor("digital", ()=>{ Add(new CVCDigital(stf, basepath)); }), + new STFReader.TokenProcessor("cabsignaldisplay", ()=>{ Add(new CVCSignal(stf, basepath, DiscreteStates.CAB_SIGNAL_DISPLAY)); }), + new STFReader.TokenProcessor("digital", ()=>{ Add(new CVCDigital(stf, basepath)); }), new STFReader.TokenProcessor("combinedcontrol", ()=>{ Add(new CVCDiscrete(stf, basepath, DiscreteStates.COMBINED_CONTROL)); }), new STFReader.TokenProcessor("firebox", ()=>{ Add(new CVCFirebox(stf, basepath)); }), new STFReader.TokenProcessor("dialclock", ()=>{ ProcessDialClock(stf, basepath); }), new STFReader.TokenProcessor("digitalclock", ()=>{ Add(new CVCDigitalClock(stf, basepath)); }), new STFReader.TokenProcessor("screendisplay", ()=>{ Add(new CVCScreen(stf, basepath)); }) }); - + //TODO Uncomment when parsed all type /* if (count != this.Count) STFException.ReportWarning(inf, "CabViewControl count mismatch"); @@ -422,7 +422,7 @@ public class CabViewControl // Defaults which may be overridden when parsing CVF file public double MinValue = 0.0; public double MaxValue = 1.0; - + public double OldValue; public string ACEFile = ""; public string Label = ""; @@ -488,7 +488,7 @@ protected void ParseStyle(STFReader stf) { string sStyle = stf.ReadString(); int checkNumeric = 0; - if(int.TryParse(sStyle.Substring(0, 1), out checkNumeric) == true) + if (int.TryParse(sStyle.Substring(0, 1), out checkNumeric) == true) { sStyle = sStyle.Insert(0, "_"); } @@ -542,7 +542,7 @@ protected void ParseValueIfDisabled(STFReader stf) } // Used by subclasses CVCGauge and CVCDigital - protected virtual color ParseControlColor( STFReader stf ) + protected virtual color ParseControlColor(STFReader stf) { stf.MustMatch("("); color colour = new color { A = 1, R = stf.ReadInt(0) / 255f, G = stf.ReadInt(0) / 255f, B = stf.ReadInt(0) / 255f }; @@ -697,7 +697,7 @@ public CVCGauge(STFReader stf, string basepath) new STFReader.TokenProcessor("zeropos", ()=>{ ZeroPos = stf.ReadIntBlock(null); }), new STFReader.TokenProcessor("orientation", ()=>{ Orientation = stf.ReadIntBlock(null); }), new STFReader.TokenProcessor("dirincrease", ()=>{ Direction = stf.ReadIntBlock(null); }), - new STFReader.TokenProcessor("area", ()=>{ + new STFReader.TokenProcessor("area", ()=>{ stf.MustMatch("("); int x = stf.ReadInt(null); int y = stf.ReadInt(null); @@ -706,27 +706,27 @@ public CVCGauge(STFReader stf, string basepath) Area = new Rectangle(x, y, width, height); stf.SkipRestOfBlock(); }), - new STFReader.TokenProcessor("positivecolour", ()=>{ + new STFReader.TokenProcessor("positivecolour", ()=>{ stf.MustMatch("("); NumPositiveColors = stf.ReadInt(0); if((stf.EndOfBlock() == false)) { List Colorset = new List(); stf.ParseBlock(new STFReader.TokenProcessor[] { - new STFReader.TokenProcessor("controlcolour", ()=>{ Colorset.Add(ParseControlColor(stf));}), + new STFReader.TokenProcessor("controlcolour", ()=>{ Colorset.Add(ParseControlColor(stf));}), new STFReader.TokenProcessor("switchval", () => { PositiveSwitchVal = ParseSwitchVal(stf); }) }); PositiveColor = Colorset [0]; if ((NumPositiveColors >= 2) && (Colorset.Count >= 2 ))SecondPositiveColor = Colorset [1]; } }), - new STFReader.TokenProcessor("negativecolour", ()=>{ + new STFReader.TokenProcessor("negativecolour", ()=>{ stf.MustMatch("("); NumNegativeColors = stf.ReadInt(0); if ((stf.EndOfBlock() == false)) { List Colorset = new List(); stf.ParseBlock(new STFReader.TokenProcessor[] { - new STFReader.TokenProcessor("controlcolour", ()=>{ Colorset.Add(ParseControlColor(stf));}), + new STFReader.TokenProcessor("controlcolour", ()=>{ Colorset.Add(ParseControlColor(stf));}), new STFReader.TokenProcessor("switchval", () => { NegativeSwitchVal = ParseSwitchVal(stf); }) }); NegativeColor = Colorset[0]; if ((NumNegativeColors >= 2) && (Colorset.Count >= 2)) SecondNegativeColor = Colorset[1]; @@ -758,7 +758,7 @@ public class CVCFirebox : CVCGauge { public string FireACEFile; - public CVCFirebox(STFReader stf, string basepath) + public CVCFirebox(STFReader stf, string basepath) { stf.MustMatch("("); stf.ParseBlock(new STFReader.TokenProcessor[] { @@ -821,7 +821,7 @@ public CVCDigital(STFReader stf, string basepath) FontSize = 8; FontStyle = 0; FontFamily = "Lucida Sans"; - + stf.MustMatch("("); stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("type", ()=>{ ParseType(stf); }), @@ -835,30 +835,30 @@ public CVCDigital(STFReader stf, string basepath) new STFReader.TokenProcessor("hideifdisabled", ()=>{ ParseHideIfDisabled(stf); }), new STFReader.TokenProcessor("valueifdisabled", ()=>{ ParseValueIfDisabled(stf); }), new STFReader.TokenProcessor("leadingzeros", ()=>{ ParseLeadingZeros(stf); }), - new STFReader.TokenProcessor("accuracy", ()=>{ ParseAccuracy(stf); }), - new STFReader.TokenProcessor("accuracyswitch", ()=>{ ParseAccuracySwitch(stf); }), + new STFReader.TokenProcessor("accuracy", ()=>{ ParseAccuracy(stf); }), + new STFReader.TokenProcessor("accuracyswitch", ()=>{ ParseAccuracySwitch(stf); }), new STFReader.TokenProcessor("justification", ()=>{ ParseJustification(stf); }), - new STFReader.TokenProcessor("positivecolour", ()=>{ + new STFReader.TokenProcessor("positivecolour", ()=>{ stf.MustMatch("("); NumPositiveColors = stf.ReadInt(0); if((stf.EndOfBlock() == false)) { List Colorset = new List(); stf.ParseBlock(new STFReader.TokenProcessor[] { - new STFReader.TokenProcessor("controlcolour", ()=>{ Colorset.Add(ParseControlColor(stf));}), + new STFReader.TokenProcessor("controlcolour", ()=>{ Colorset.Add(ParseControlColor(stf));}), new STFReader.TokenProcessor("switchval", () => { PositiveSwitchVal = ParseSwitchVal(stf); }) }); PositiveColor = Colorset [0]; if ((NumPositiveColors >= 2) && (Colorset.Count >= 2 ))SecondPositiveColor = Colorset [1]; } }), - new STFReader.TokenProcessor("negativecolour", ()=>{ + new STFReader.TokenProcessor("negativecolour", ()=>{ stf.MustMatch("("); NumNegativeColors = stf.ReadInt(0); if ((stf.EndOfBlock() == false)) { List Colorset = new List(); stf.ParseBlock(new STFReader.TokenProcessor[] { - new STFReader.TokenProcessor("controlcolour", ()=>{ Colorset.Add(ParseControlColor(stf));}), + new STFReader.TokenProcessor("controlcolour", ()=>{ Colorset.Add(ParseControlColor(stf));}), new STFReader.TokenProcessor("switchval", () => { NegativeSwitchVal = ParseSwitchVal(stf); }) }); NegativeColor = Colorset[0]; if ((NumNegativeColors >= 2) && (Colorset.Count >= 2)) SecondNegativeColor = Colorset[1]; @@ -922,7 +922,7 @@ protected void ParseFont(STFReader stf) var fontFamily = stf.ReadString(); if (fontFamily != null) FontFamily = fontFamily; stf.SkipRestOfBlock(); - } + } } public class CVCDigitalClock : CVCDigital @@ -942,7 +942,7 @@ public CVCDigitalClock(STFReader stf, string basepath) new STFReader.TokenProcessor("disabledifcabpowersupplyoff", ()=>{ ParseDisabledIfCabPowerSupplyOff(stf); }), new STFReader.TokenProcessor("hideifdisabled", ()=>{ ParseHideIfDisabled(stf); }), new STFReader.TokenProcessor("valueifdisabled", ()=>{ ParseValueIfDisabled(stf); }), - new STFReader.TokenProcessor("accuracy", ()=>{ ParseAccuracy(stf); }), + new STFReader.TokenProcessor("accuracy", ()=>{ ParseAccuracy(stf); }), new STFReader.TokenProcessor("controlcolour", ()=>{ PositiveColor = ParseControlColor(stf); }), new STFReader.TokenProcessor("ortsfont", ()=>{ParseFont(stf); }), new STFReader.TokenProcessor("ortsangle", () => { Rotation = ParseRotation(stf); }), @@ -952,7 +952,7 @@ public CVCDigitalClock(STFReader stf, string basepath) }); } - + } #endregion @@ -968,7 +968,7 @@ public abstract class CVCWithFrames : CabViewControl public int Orientation; public int Direction; - public List Values + public List Values { get { @@ -995,7 +995,7 @@ public struct NewScreenData public CVCDiscrete(STFReader stf, string basepath, DiscreteStates discreteState) { -// try + // try { stf.MustMatch("("); stf.ParseBlock(new STFReader.TokenProcessor[] { @@ -1060,7 +1060,7 @@ public CVCDiscrete(STFReader stf, string basepath, DiscreteStates discreteState) positionsRead++; if (minPosition < 0) - { + { for (int iPos = 0; iPos <= Positions.Count - 1; iPos++) { Positions[iPos] -= minPosition; @@ -1078,8 +1078,8 @@ public CVCDiscrete(STFReader stf, string basepath, DiscreteStates discreteState) // Check if eligible for filling if (Positions.Count > 1 && Positions[0] != 0) canFill = false; - else - { + else + { for (var iPos = 1; iPos <= Positions.Count - 1; iPos++) { if (Positions[iPos] > Positions[iPos-1]) continue; @@ -1116,7 +1116,7 @@ public CVCDiscrete(STFReader stf, string basepath, DiscreteStates discreteState) // Avoid later repositioning, put every value to its Position // But before resize Values if needed if (numValues != numPositions) - { + { while (Values.Count <= Positions[_ValuesRead]) { Values.Add(0); @@ -1151,7 +1151,7 @@ public CVCDiscrete(STFReader stf, string basepath, DiscreteStates discreteState) // The twostate, tristate, signal displays are not in these // Need check the Values collection for validity if (_ValuesRead > 0 || ControlStyle == CABViewControlStyles.SPRUNG || ControlStyle == CABViewControlStyles.NOT_SPRUNG || - FramesCount > 0 || (FramesX > 0 && FramesY > 0 )) + FramesCount > 0 || (FramesX > 0 && FramesY > 0)) { // Check max number of Frames if (FramesCount == 0) @@ -1174,7 +1174,7 @@ public CVCDiscrete(STFReader stf, string basepath, DiscreteStates discreteState) // Only shuffle data in following cases - if (Values.Count != Positions.Count || (Values.Count < FramesCount & canFill)|| ( Values.Count > 0 && Values[0] == Values[Values.Count - 1] && Values[0] == 0)) + if (Values.Count != Positions.Count || (Values.Count < FramesCount & canFill) || (Values.Count > 0 && Values[0] == Values[Values.Count - 1] && Values[0] == 0)) { // Fixup Positions and Values collections first @@ -1190,19 +1190,19 @@ public CVCDiscrete(STFReader stf, string basepath, DiscreteStates discreteState) //This if clause covers among others following cases: // Case 1 (e.g. engine brake lever of Dash 9): //NumFrames ( 22 11 2 ) - //NumPositions ( 1 0 ) - //NumValues ( 1 0 ) - //Orientation ( 1 ) - //DirIncrease ( 1 ) - //ScaleRange ( 0 1 ) + //NumPositions ( 1 0 ) + //NumValues ( 1 0 ) + //Orientation ( 1 ) + //DirIncrease ( 1 ) + //ScaleRange ( 0 1 ) // // Case 2 (e.g. throttle lever of Acela): - //NumFrames ( 25 5 5 ) - //NumPositions ( 0 ) - //NumValues ( 0 ) - //Orientation ( 1 ) - //DirIncrease ( 1 ) - //ScaleRange ( 0 1 ) + //NumFrames ( 25 5 5 ) + //NumPositions ( 0 ) + //NumValues ( 0 ) + //Orientation ( 1 ) + //DirIncrease ( 1 ) + //ScaleRange ( 0 1 ) // // Clear existing Positions.Clear(); @@ -1225,29 +1225,29 @@ public CVCDiscrete(STFReader stf, string basepath, DiscreteStates discreteState) { //This if clause covers among others following cases: // Case 1 (e.g. engine brake lever of gp38): - //NumFrames ( 18 2 9 ) - //NumPositions ( 2 0 1 ) - //NumValues ( 2 0 0.3 ) - //Orientation ( 0 ) - //DirIncrease ( 0 ) - //ScaleRange ( 0 1 ) + //NumFrames ( 18 2 9 ) + //NumPositions ( 2 0 1 ) + //NumValues ( 2 0 0.3 ) + //Orientation ( 0 ) + //DirIncrease ( 0 ) + //ScaleRange ( 0 1 ) Positions.Add(FramesCount); // Fill empty Values for (int i = Values.Count; i < FramesCount; i++) Values.Add(Values[1]); - Values.Add(MaxValue); + Values.Add(MaxValue); } else { //This if clause covers among others following cases: // Case 1 (e.g. train brake lever of Acela): - //NumFrames ( 12 4 3 ) - //NumPositions ( 5 0 1 9 10 11 ) - //NumValues ( 5 0 0.2 0.85 0.9 0.95 ) - //Orientation ( 1 ) - //DirIncrease ( 1 ) - //ScaleRange ( 0 1 ) + //NumFrames ( 12 4 3 ) + //NumPositions ( 5 0 1 9 10 11 ) + //NumValues ( 5 0 0.2 0.85 0.9 0.95 ) + //Orientation ( 1 ) + //DirIncrease ( 1 ) + //ScaleRange ( 0 1 ) // // Fill empty Values int iValues = 1; @@ -1305,7 +1305,7 @@ public CVCDiscrete(STFReader stf, string basepath, DiscreteStates discreteState) if (ControlType.Type == CABViewControlTypes.PANTOGRAPH || ControlType.Type == CABViewControlTypes.PANTOGRAPH2 || ControlType.Type == CABViewControlTypes.ORTS_PANTOGRAPH3 || ControlType.Type == CABViewControlTypes.ORTS_PANTOGRAPH4) ControlStyle = CABViewControlStyles.ONOFF; - if (ControlType.Type == CABViewControlTypes.HORN || ControlType.Type == CABViewControlTypes.SANDERS || ControlType.Type == CABViewControlTypes.BELL + if (ControlType.Type == CABViewControlTypes.HORN || ControlType.Type == CABViewControlTypes.SANDERS || ControlType.Type == CABViewControlTypes.BELL || ControlType.Type == CABViewControlTypes.RESET || ControlType.Type == CABViewControlTypes.VACUUM_EXHAUSTER) ControlStyle = CABViewControlStyles.WHILE_PRESSED; if (ControlType.Type == CABViewControlTypes.DIRECTION && Orientation == 0) @@ -1320,13 +1320,13 @@ public CVCDiscrete(STFReader stf, string basepath, DiscreteStates discreteState) break; } } -// catch (Exception error) -// { -// if (error is STFException) // Parsing error, so pass it on -// throw; -// else // Unexpected error, so provide a hint -// throw new STFException(stf, "Problem with NumPositions/NumValues/NumFrames/ScaleRange"); -// } // End of Need check the Values collection for validity + // catch (Exception error) + // { + // if (error is STFException) // Parsing error, so pass it on + // throw; + // else // Unexpected error, so provide a hint + // throw new STFException(stf, "Problem with NumPositions/NumValues/NumFrames/ScaleRange"); + // } // End of Need check the Values collection for validity } // End of Constructor protected void ParseNewScreen(STFReader stf) @@ -1346,9 +1346,9 @@ protected void ParseNewScreen(STFReader stf) #region Multistate Display Controls public class CVCMultiStateDisplay : CVCWithFrames { - public List MSStyles = new List(); + public List MSStyles = new List(); - public CVCMultiStateDisplay(STFReader stf, string basepath) + public CVCMultiStateDisplay(STFReader stf, string basepath) { stf.MustMatch("("); @@ -1369,7 +1369,7 @@ public CVCMultiStateDisplay(STFReader stf, string basepath) FramesX = stf.ReadInt(null); FramesY = stf.ReadInt(null); stf.ParseBlock(new STFReader.TokenProcessor[] { - new STFReader.TokenProcessor("state", ()=>{ + new STFReader.TokenProcessor("state", ()=>{ stf.MustMatch("("); stf.ParseBlock( new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("style", ()=>{ MSStyles.Add(ParseNumStyle(stf)); diff --git a/Source/Orts.Formats.Msts/CameraConfigurationFile.cs b/Source/Orts.Formats.Msts/CameraConfigurationFile.cs index d11d307845..fd7543427e 100644 --- a/Source/Orts.Formats.Msts/CameraConfigurationFile.cs +++ b/Source/Orts.Formats.Msts/CameraConfigurationFile.cs @@ -19,10 +19,7 @@ // This class reads the config file into a list of camera objects -using System; -using System.Collections; using System.Collections.Generic; -using System.Text; using Microsoft.Xna.Framework; using Orts.Parsers.Msts; @@ -69,12 +66,12 @@ public Camera(STFReader stf) public string CamControl; public Vector3 CameraOffset = new Vector3(); public Vector3 Direction = new Vector3(); - public float Fov = 55f; - public float ZClip =0.1f; - public int WagonNum =-1; + public float Fov = 55f; + public float ZClip = 0.1f; + public int WagonNum = -1; public Vector3 ObjectOffset = new Vector3(); public Vector3 RotationLimit = new Vector3(); - public string Description =""; + public string Description = ""; } diff --git a/Source/Orts.Formats.Msts/CarSpawnerFile.cs b/Source/Orts.Formats.Msts/CarSpawnerFile.cs index ba122e9544..98220b113e 100644 --- a/Source/Orts.Formats.Msts/CarSpawnerFile.cs +++ b/Source/Orts.Formats.Msts/CarSpawnerFile.cs @@ -16,10 +16,8 @@ // along with Open Rails. If not, see . using System; -using System.Collections; using System.Collections.Generic; using System.IO; -using Microsoft.Xna.Framework; using Orts.Parsers.Msts; @@ -93,17 +91,17 @@ public CarSpawnerItemData(STFReader stf, string shapePath) dist = stf.ReadFloat(STFReader.UNITS.Distance, null); stf.SkipRestOfBlock(); } - } + } - public class CarSpawnerFile - { - public CarSpawnerFile(string filePath, string shapePath, List carSpawnerLists) - { - using (STFReader stf = new STFReader(filePath, false)) - { + public class CarSpawnerFile + { + public CarSpawnerFile(string filePath, string shapePath, List carSpawnerLists) + { + using (STFReader stf = new STFReader(filePath, false)) + { var carSpawnerBlock = new CarSpawnerBlock(stf, shapePath, carSpawnerLists, "Default"); - } - } - } + } + } + } } diff --git a/Source/Orts.Formats.Msts/ConsistFile.cs b/Source/Orts.Formats.Msts/ConsistFile.cs index a58f531c21..17090b4f83 100644 --- a/Source/Orts.Formats.Msts/ConsistFile.cs +++ b/Source/Orts.Formats.Msts/ConsistFile.cs @@ -15,9 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections; -using System.IO; using Orts.Parsers.Msts; namespace Orts.Formats.Msts diff --git a/Source/Orts.Formats.Msts/EngineFile.cs b/Source/Orts.Formats.Msts/EngineFile.cs index 2dc78b4f78..b2be8a020a 100644 --- a/Source/Orts.Formats.Msts/EngineFile.cs +++ b/Source/Orts.Formats.Msts/EngineFile.cs @@ -15,8 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections; using System.IO; using Orts.Parsers.Msts; diff --git a/Source/Orts.Formats.Msts/HazardFile.cs b/Source/Orts.Formats.Msts/HazardFile.cs index e701b58f2c..13ecf1a282 100644 --- a/Source/Orts.Formats.Msts/HazardFile.cs +++ b/Source/Orts.Formats.Msts/HazardFile.cs @@ -15,45 +15,41 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; using Microsoft.Xna.Framework; using Orts.Parsers.Msts; namespace Orts.Formats.Msts { - public class HazardFile - { - public HazardFile(string filename) - { - try - { - using (STFReader stf = new STFReader(filename, false)) - { - stf.ParseFile(new STFReader.TokenProcessor[] { + public class HazardFile + { + public HazardFile(string filename) + { + try + { + using (STFReader stf = new STFReader(filename, false)) + { + stf.ParseFile(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("tr_worldfile", ()=>{ Tr_HazardFile = new Tr_HazardFile(stf); }), }); - //TODO This should be changed to STFException.TraceError() with defaults values created - if (Tr_HazardFile == null) throw new STFException(stf, "Missing Tr_WorldFile"); - } - } - finally - { - } - } - public Tr_HazardFile Tr_HazardFile; - } + //TODO This should be changed to STFException.TraceError() with defaults values created + if (Tr_HazardFile == null) throw new STFException(stf, "Missing Tr_WorldFile"); + } + } + finally + { + } + } + public Tr_HazardFile Tr_HazardFile; + } - public class Tr_HazardFile - { - public Tr_HazardFile(STFReader stf) - { - stf.MustMatch("("); - stf.ParseBlock(new STFReader.TokenProcessor[] { + public class Tr_HazardFile + { + public Tr_HazardFile(STFReader stf) + { + stf.MustMatch("("); + stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("filename", ()=>{ FileName = stf.ReadStringBlock(null); }), new STFReader.TokenProcessor("workers", ()=>{ Workers = stf.ReadStringBlock(null); }), new STFReader.TokenProcessor("distance", ()=>{ Distance = stf.ReadFloatBlock(STFReader.UNITS.None, 10); }), @@ -64,19 +60,19 @@ public Tr_HazardFile(STFReader stf) new STFReader.TokenProcessor("surprise_key_right", ()=>{ Surprise_Key_Right = stf.ReadVector2Block(STFReader.UNITS.None, Surprise_Key_Right); }), new STFReader.TokenProcessor("success_scarper_key", ()=>{ Success_Scarper_Key = stf.ReadVector2Block(STFReader.UNITS.None, Success_Scarper_Key); }), }); - //TODO This should be changed to STFException.TraceError() with defaults values created - if (FileName == null) throw new STFException(stf, "Missing FileName"); - } + //TODO This should be changed to STFException.TraceError() with defaults values created + if (FileName == null) throw new STFException(stf, "Missing FileName"); + } - public string FileName; // ie OdakyuSE - used for MKR,RDB,REF,RIT,TDB,TIT - public string Workers; - public float Distance; - public float Speed; - public Vector2 Idle_Key = new Vector2(); - public Vector2 Idle_Key2 = new Vector2(); - public Vector2 Surprise_Key_Left = new Vector2(); - public Vector2 Surprise_Key_Right = new Vector2(); - public Vector2 Success_Scarper_Key = new Vector2(); + public string FileName; // ie OdakyuSE - used for MKR,RDB,REF,RIT,TDB,TIT + public string Workers; + public float Distance; + public float Speed; + public Vector2 Idle_Key = new Vector2(); + public Vector2 Idle_Key2 = new Vector2(); + public Vector2 Surprise_Key_Left = new Vector2(); + public Vector2 Surprise_Key_Right = new Vector2(); + public Vector2 Success_Scarper_Key = new Vector2(); - } + } } diff --git a/Source/Orts.Formats.Msts/LightCollection.cs b/Source/Orts.Formats.Msts/LightCollection.cs index eff63f7a7b..e9575256f8 100644 --- a/Source/Orts.Formats.Msts/LightCollection.cs +++ b/Source/Orts.Formats.Msts/LightCollection.cs @@ -15,13 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Microsoft.Xna.Framework; -using Orts.Parsers.Msts; -using System; using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text; +using Microsoft.Xna.Framework; +using Orts.Parsers.Msts; namespace Orts.Formats.Msts { diff --git a/Source/Orts.Formats.Msts/PathFile.cs b/Source/Orts.Formats.Msts/PathFile.cs index a6c81c670d..7c842eb6b3 100644 --- a/Source/Orts.Formats.Msts/PathFile.cs +++ b/Source/Orts.Formats.Msts/PathFile.cs @@ -25,10 +25,8 @@ // The last TrPathNode is marked with a 4294967295 ( -1L or 0xFFFFFFFF) in its next field. using System; -using System.Collections; using System.Collections.Generic; using System.Diagnostics; -using System.IO; using Orts.Parsers.Msts; @@ -39,47 +37,47 @@ namespace Orts.Formats.Msts [Flags] public enum PathFlags { - NotPlayerPath = 0x20, + NotPlayerPath = 0x20, } - /// - /// Paths for both player train as well as AI trains. + /// + /// Paths for both player train as well as AI trains. /// This class reads and stores the MSTS .pat file. Because of the format of the .pat file /// it is easier to have an intermediate format that just contains the data of the .pat file /// and create the wanted data scructure from that. /// It is the intention that it is only used for /// * ORTS main menu /// * postprocessing by TrainPath. - /// -// Typical simple .PATfile (the example helps to understand the code below) -/* - SIMISA@@@@@@@@@@JINX0P0t______ + /// + // Typical simple .PATfile (the example helps to understand the code below) + /* + SIMISA@@@@@@@@@@JINX0P0t______ -Serial ( 1 ) -TrackPDPs ( - TrackPDP ( -12557 14761 -6.1249 1173.74 72.5884 2 0 ) - TrackPDP ( -12557 14761 -204.363 1173.74 976.083 2 0 ) - TrackPDP ( -12557 14762 -287.228 1173.74 -971.75 2 0 ) - TrackPDP ( -12558 14763 278.107 1155.51 -941.416 2 0 ) - TrackPDP ( -12557 14761 -49.6355 1173.74 -164.577 1 1 ) - TrackPDP ( -12558 14763 245.63 1139.65 -387.96 1 1 ) -) -TrackPath ( - TrPathName ( EsxPincal ) - Name ( "Essex - Pinnacle" ) - TrPathStart ( Essex ) - TrPathEnd ( Pinnacle ) - TrPathNodes ( 6 - TrPathNode ( 00000000 1 4294967295 4 ) - TrPathNode ( 00000000 2 4294967295 0 ) - TrPathNode ( 00000000 3 4294967295 1 ) - TrPathNode ( 00000000 4 4294967295 2 ) - TrPathNode ( 00000000 5 4294967295 3 ) - TrPathNode ( 00000000 4294967295 4294967295 5 ) - ) + Serial ( 1 ) + TrackPDPs ( + TrackPDP ( -12557 14761 -6.1249 1173.74 72.5884 2 0 ) + TrackPDP ( -12557 14761 -204.363 1173.74 976.083 2 0 ) + TrackPDP ( -12557 14762 -287.228 1173.74 -971.75 2 0 ) + TrackPDP ( -12558 14763 278.107 1155.51 -941.416 2 0 ) + TrackPDP ( -12557 14761 -49.6355 1173.74 -164.577 1 1 ) + TrackPDP ( -12558 14763 245.63 1139.65 -387.96 1 1 ) + ) + TrackPath ( + TrPathName ( EsxPincal ) + Name ( "Essex - Pinnacle" ) + TrPathStart ( Essex ) + TrPathEnd ( Pinnacle ) + TrPathNodes ( 6 + TrPathNode ( 00000000 1 4294967295 4 ) + TrPathNode ( 00000000 2 4294967295 0 ) + TrPathNode ( 00000000 3 4294967295 1 ) + TrPathNode ( 00000000 4 4294967295 2 ) + TrPathNode ( 00000000 5 4294967295 3 ) + TrPathNode ( 00000000 4294967295 4294967295 5 ) + ) -) -*/ + ) + */ // TrackPDP format is : TrackPDP ( tileX tileZ x y z flag1 flag2) // Precise meaning of flag1 and flag2 is unknown. // 2 0 seems to be junction @@ -112,8 +110,8 @@ public enum PathFlags // 2 0 8 (e.g. Shiatsu, not clear why). It does not seem to be 'other exit' // - - public class PathFile + + public class PathFile { #region Fields @@ -162,11 +160,11 @@ public PathFile(string filePath) new STFReader.TokenProcessor("trackpdp", ()=>{ trackPDPs.Add(new TrackPDP(stf)); }), });}), new STFReader.TokenProcessor("trackpath", ()=>{ stf.MustMatch("("); stf.ParseBlock(new STFReader.TokenProcessor[] { - new STFReader.TokenProcessor("trpathname", ()=>{ PathID = stf.ReadStringBlock(null); }), + new STFReader.TokenProcessor("trpathname", ()=>{ PathID = stf.ReadStringBlock(null); }), new STFReader.TokenProcessor("name", ()=>{ Name = stf.ReadStringBlock(null); }), - new STFReader.TokenProcessor("trpathflags", ()=>{ Flags = (PathFlags)stf.ReadHexBlock(null); }), - new STFReader.TokenProcessor("trpathstart", ()=>{ Start = stf.ReadStringBlock(null); }), - new STFReader.TokenProcessor("trpathend", ()=>{ End = stf.ReadStringBlock(null); }), + new STFReader.TokenProcessor("trpathflags", ()=>{ Flags = (PathFlags)stf.ReadHexBlock(null); }), + new STFReader.TokenProcessor("trpathstart", ()=>{ Start = stf.ReadStringBlock(null); }), + new STFReader.TokenProcessor("trpathend", ()=>{ End = stf.ReadStringBlock(null); }), new STFReader.TokenProcessor("trpathnodes", ()=>{ stf.MustMatch("("); var count = stf.ReadInt(null); @@ -194,15 +192,15 @@ public override string ToString() { return this.Name; } - } + } // for explanation of TrackPDP, see class PATfile - public class TrackPDP - { + public class TrackPDP + { //We are not using WorldLocation to keep MSTS file parsing independent of other parts of the code public int TileX; public int TileZ; - public float X,Y,Z; + public float X, Y, Z; public int junctionFlag, invalidFlag; #region Properties @@ -212,7 +210,7 @@ public class TrackPDP #endregion public TrackPDP(STFReader stf) - { + { stf.MustMatch("("); TileX = stf.ReadInt(null); TileZ = stf.ReadInt(null); @@ -234,16 +232,16 @@ public TrackPDP(TrItem item) junctionFlag = 0; invalidFlag = 0; } - } + } // for an explanation, see class PATfile public class TrPathNode { - public uint pathFlags,nextMainNode,nextSidingNode,fromPDP; - + public uint pathFlags, nextMainNode, nextSidingNode, fromPDP; + // Note, pathFlags is a complicated beast, which is not fully understood, see AIPath.cs - public bool HasNextMainNode { get { return (nextMainNode != 0xffffffff); } } + public bool HasNextMainNode { get { return (nextMainNode != 0xffffffff); } } public bool HasNextSidingNode { get { return (nextSidingNode != 0xffffffff); } } public TrPathNode(STFReader stf) @@ -256,7 +254,7 @@ public TrPathNode(STFReader stf) stf.SkipRestOfBlock(); } - public TrPathNode (uint flags, uint nextNode, uint nextSiding, uint pdp) + public TrPathNode(uint flags, uint nextNode, uint nextSiding, uint pdp) { pathFlags = flags; nextMainNode = nextNode; diff --git a/Source/Orts.Formats.Msts/RoadDatabaseFile.cs b/Source/Orts.Formats.Msts/RoadDatabaseFile.cs index 078c3338d5..cdab1aed96 100644 --- a/Source/Orts.Formats.Msts/RoadDatabaseFile.cs +++ b/Source/Orts.Formats.Msts/RoadDatabaseFile.cs @@ -15,22 +15,19 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Diagnostics; -using System.IO; using System.Diagnostics.CodeAnalysis; using Orts.Parsers.Msts; namespace Orts.Formats.Msts { - /// - /// RDBFile is a representation of the .rdb file, that contains the road data base. + /// + /// RDBFile is a representation of the .rdb file, that contains the road data base. /// The database contains the same kind of objects as TDBFile, apart from a few road-specific items. - /// + /// [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", Justification = "Keeping identifier consistent to use in MSTS")] [SuppressMessage("Microsoft.Design", "CA1001:TypesThatOwnDisposableFieldsShouldBeDisposable", Justification = "Disposable only used in using statement, known FcCop bug")] public class RoadDatabaseFile - { + { /// /// Contains the Database with all the road tracks. /// Warning, the first RoadTrackDB entry is always null. @@ -42,19 +39,19 @@ public class RoadDatabaseFile /// /// Full file name of the .rdb file public RoadDatabaseFile(string filenamewithpath) - { - using (STFReader stf = new STFReader(filenamewithpath, false)) - stf.ParseFile(new STFReader.TokenProcessor[] { + { + using (STFReader stf = new STFReader(filenamewithpath, false)) + stf.ParseFile(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("trackdb", ()=>{ RoadTrackDB = new RoadTrackDB(stf); }), }); - } - } + } + } /// /// This class represents the Road Track Database. This is pretty similar to the (rail) Track Database. So for more details see there /// public class RoadTrackDB - { + { /// /// Array of all TrackNodes in the road database /// Warning, the first TrackNode is always null. @@ -96,14 +93,14 @@ public RoadTrackDB(STFReader stf) }), }); } - } + } /// /// Represents a Level crossing Item on the road (i.e. where cars must stop when a train is passing). /// [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", Justification = "Keeping identifier consistent to use in MSTS")] public class RoadLevelCrItem : TrItem - { + { /// Direction along track: 0 or 1 depending on which way signal is facing public uint Direction { get; set; } /// index to Sigal Object Table @@ -116,38 +113,38 @@ public class RoadLevelCrItem : TrItem /// The index of this TrItem in the list of TrItems [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", Justification = "Keeping identifier consistent to use in MSTS")] public RoadLevelCrItem(STFReader stf, int idx) - { + { SigObj = -1; - ItemType = trItemType.trXING; - stf.MustMatch("("); - stf.ParseBlock(new STFReader.TokenProcessor[] { + ItemType = trItemType.trXING; + stf.MustMatch("("); + stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("tritemid", ()=>{ ParseTrItemID(stf, idx); }), new STFReader.TokenProcessor("tritemrdata", ()=>{ TrItemRData(stf); }), new STFReader.TokenProcessor("tritemsdata", ()=>{ TrItemSData(stf); }), new STFReader.TokenProcessor("tritempdata", ()=>{ TrItemPData(stf); }) }); - } - } + } + } /// /// Represent a Car Spawner: the place where cars start to appear or disappear again /// public class CarSpawnerItem : TrItem - { + { /// /// Default constructor used during file parsing. /// /// The STFreader containing the file stream /// The index of this TrItem in the list of TrItems public CarSpawnerItem(STFReader stf, int idx) - { - ItemType = trItemType.trCARSPAWNER; - stf.MustMatch("("); - stf.ParseBlock(new STFReader.TokenProcessor[] { + { + ItemType = trItemType.trCARSPAWNER; + stf.MustMatch("("); + stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("tritemid", ()=>{ ParseTrItemID(stf, idx); }), new STFReader.TokenProcessor("tritemrdata", ()=>{ TrItemRData(stf); }), new STFReader.TokenProcessor("tritemsdata", ()=>{ TrItemSData(stf); }) }); - } - } + } + } } diff --git a/Source/Orts.Formats.Msts/RouteFile.cs b/Source/Orts.Formats.Msts/RouteFile.cs index 6175d814c8..d47b5342bb 100644 --- a/Source/Orts.Formats.Msts/RouteFile.cs +++ b/Source/Orts.Formats.Msts/RouteFile.cs @@ -15,13 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; using System.Collections.Generic; using System.Diagnostics; -using System.Linq; -using System.Text; -using Orts.Parsers.Msts; using System.IO; +using Orts.Parsers.Msts; namespace Orts.Formats.Msts { @@ -87,9 +84,9 @@ public Tr_RouteFile(STFReader stf) new STFReader.TokenProcessor("routestart", ()=>{ if (RouteStart == null) RouteStart = new RouteStart(stf); }), new STFReader.TokenProcessor("environment", ()=>{ Environment = new TRKEnvironment(stf); }), new STFReader.TokenProcessor("milepostunitskilometers", ()=>{ MilepostUnitsMetric = true; }), - new STFReader.TokenProcessor("electrified", ()=>{ Electrified = stf.ReadBoolBlock(false); }), + new STFReader.TokenProcessor("electrified", ()=>{ Electrified = stf.ReadBoolBlock(false); }), new STFReader.TokenProcessor("overheadwireheight", ()=>{ OverheadWireHeight = stf.ReadFloatBlock(STFReader.UNITS.Distance, 6.0f);}), - new STFReader.TokenProcessor("speedlimit", ()=>{ SpeedLimit = stf.ReadFloatBlock(STFReader.UNITS.Speed, 500.0f); }), + new STFReader.TokenProcessor("speedlimit", ()=>{ SpeedLimit = stf.ReadFloatBlock(STFReader.UNITS.Speed, 500.0f); }), new STFReader.TokenProcessor("defaultcrossingsms", ()=>{ DefaultCrossingSMS = stf.ReadStringBlock(null); }), new STFReader.TokenProcessor("defaultcoaltowersms", ()=>{ DefaultCoalTowerSMS = stf.ReadStringBlock(null); }), new STFReader.TokenProcessor("defaultdieseltowersms", ()=>{ DefaultDieselTowerSMS = stf.ReadStringBlock(null); }), @@ -141,22 +138,22 @@ public Tr_RouteFile(STFReader stf) public TRKEnvironment Environment; public bool MilepostUnitsMetric; public double MaxLineVoltage; - public bool Electrified = true; - public double OverheadWireHeight = 6.0; - public double SpeedLimit = 500.0f; //global speed limit m/s. + public bool Electrified = true; + public double OverheadWireHeight = 6.0; + public double SpeedLimit = 500.0f; //global speed limit m/s. public string DefaultCrossingSMS; public string DefaultCoalTowerSMS; public string DefaultDieselTowerSMS; public string DefaultWaterTowerSMS; public string DefaultSignalSMS; - public float TempRestrictedSpeed = -1f; + public float TempRestrictedSpeed = -1f; public Interpolator SuperElevationHgtpRadiusM; // Superelevation of tracks // Values for calculating Tunnel Resistance - will override default values. - public float SingleTunnelAreaM2; + public float SingleTunnelAreaM2; public float SingleTunnelPerimeterM; public float DoubleTunnelAreaM2; - public float DoubleTunnelPerimeterM; + public float DoubleTunnelPerimeterM; public float ForestClearDistance = 0; public bool RemoveForestTreesFromRoads = false; @@ -173,7 +170,7 @@ public Tr_RouteFile(STFReader stf) public float TriphaseWidth; public string DefaultTurntableSMS; - public bool ? OpenDoorsInAITrains; // true if option active + public bool? OpenDoorsInAITrains; // true if option active public int SwitchSMSNumber = -1; // defines the number of the switch SMS files in file ttypedat public int CurveSMSNumber = -1; // defines the number of the curve SMS files in file ttype.dat @@ -203,12 +200,12 @@ public class TRKEnvironment public TRKEnvironment(STFReader stf) { stf.MustMatch("("); - for( int i = 0; i < 12; ++i ) + for (int i = 0; i < 12; ++i) { var envfilekey = stf.ReadString(); var envfile = stf.ReadStringBlock(null); ENVFileNames.Add(envfilekey, envfile); -// Trace.TraceInformation("Environments array key {0} equals file name {1}", envfilekey, envfile); + // Trace.TraceInformation("Environments array key {0} equals file name {1}", envfilekey, envfile); } stf.SkipRestOfBlock(); } @@ -219,7 +216,7 @@ public string ENVFileName(SeasonType seasonType, WeatherType weatherType) //return ENVFileNames[index]; var envfilekey = seasonType.ToString() + weatherType.ToString(); var envfile = ENVFileNames[envfilekey]; -// Trace.TraceInformation("Selected Environment file is {1}", envfilekey, envfile); + // Trace.TraceInformation("Selected Environment file is {1}", envfilekey, envfile); return envfile; } } diff --git a/Source/Orts.Formats.Msts/ServiceFile.cs b/Source/Orts.Formats.Msts/ServiceFile.cs index a0a7bce665..b71728b4b7 100644 --- a/Source/Orts.Formats.Msts/ServiceFile.cs +++ b/Source/Orts.Formats.Msts/ServiceFile.cs @@ -15,34 +15,31 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections; -using System.IO; using Orts.Parsers.Msts; namespace Orts.Formats.Msts { - /// - /// Work with Service Files - /// - public class ServiceFile - { - public int Serial; - public string Name; - public string Train_Config; // name of the consist file, no extension - public string PathID; // name of the path file, no extension - public float MaxWheelAcceleration; - public float Efficiency; - public string TimeTableItem; + /// + /// Work with Service Files + /// + public class ServiceFile + { + public int Serial; + public string Name; + public string Train_Config; // name of the consist file, no extension + public string PathID; // name of the path file, no extension + public float MaxWheelAcceleration; + public float Efficiency; + public string TimeTableItem; public TimeTable TimeTable; - /// - /// Open a service file, - /// filePath includes full path and extension - /// - /// - public ServiceFile( string filePath ) - { + /// + /// Open a service file, + /// filePath includes full path and extension + /// + /// + public ServiceFile(string filePath) + { using (STFReader stf = new STFReader(filePath, false)) stf.ParseFile(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("service_definition", ()=> { stf.MustMatch("("); stf.ParseBlock(new STFReader.TokenProcessor[] { @@ -63,13 +60,13 @@ public ServiceFile() Efficiency = 0.9f; TimeTable = new TimeTable(); } - } // SRVFile + } // SRVFile public class TimeTable { public float InitialSpeed; - - public TimeTable (STFReader stf) + + public TimeTable(STFReader stf) { stf.MustMatch("("); stf.ParseBlock(new STFReader.TokenProcessor[] { diff --git a/Source/Orts.Formats.Msts/ShapeDescriptorFile.cs b/Source/Orts.Formats.Msts/ShapeDescriptorFile.cs index 71228f8c62..a599a8b48e 100644 --- a/Source/Orts.Formats.Msts/ShapeDescriptorFile.cs +++ b/Source/Orts.Formats.Msts/ShapeDescriptorFile.cs @@ -15,7 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; using Orts.Parsers.Msts; namespace Orts.Formats.Msts diff --git a/Source/Orts.Formats.Msts/ShapeFile.cs b/Source/Orts.Formats.Msts/ShapeFile.cs index bc66996e9d..274cf2391c 100644 --- a/Source/Orts.Formats.Msts/ShapeFile.cs +++ b/Source/Orts.Formats.Msts/ShapeFile.cs @@ -15,12 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Orts.Parsers.Msts; using System; using System.Collections.Generic; using System.Diagnostics; -using System.IO; using System.Linq; +using Orts.Parsers.Msts; // TODO - UV_OPS diff --git a/Source/Orts.Formats.Msts/SignalConfigurationFile.cs b/Source/Orts.Formats.Msts/SignalConfigurationFile.cs index 8eb5fd88f5..8c4d0d915f 100644 --- a/Source/Orts.Formats.Msts/SignalConfigurationFile.cs +++ b/Source/Orts.Formats.Msts/SignalConfigurationFile.cs @@ -623,7 +623,7 @@ public SignalType(STFReader stf, bool ortsMode, IDictionary{ numClearAhead = numClearAhead >= -1 ? numClearAhead : stf.ReadIntBlock(null); numdefs++;}), new STFReader.TokenProcessor("semaphoreinfo", ()=>{ SemaphoreInfo = stf.ReadFloatBlock(STFReader.UNITS.None, null); }), new STFReader.TokenProcessor("ortsdayglow", ()=>{ DayGlow = stf.ReadFloatBlock(STFReader.UNITS.None, null); }), - new STFReader.TokenProcessor("ortsnightglow", ()=>{ NightGlow = stf.ReadFloatBlock(STFReader.UNITS.None, null); }), + new STFReader.TokenProcessor("ortsnightglow", ()=>{ NightGlow = stf.ReadFloatBlock(STFReader.UNITS.None, null); }), new STFReader.TokenProcessor("ortsdaylight", ()=>{ DayLight = stf.ReadBoolBlock(true); }), new STFReader.TokenProcessor("ortsnormalsubtype", ()=>{ ORTSNormalSubtype = ReadORTSNormalSubtype(stf, ORTSNormalSubtypes); }), new STFReader.TokenProcessor("ortsonofftimes", ()=>{ OnOffTimeS = stf.ReadFloatBlock(STFReader.UNITS.None, null); }), @@ -1033,7 +1033,7 @@ public class SignalAspect /// Set to true if SignalFlags ASAP option specified, meaning train needs to go to speed As Soon As Possible public bool Asap { get; private set; } /// Set to true if SignalFlags RESET option specified (ORTS only) - public bool Reset; + public bool Reset; /// Set to true if no speed reduction is required for RESTRICTED or STOP_AND_PROCEED aspects (ORTS only) public bool NoSpeedReduction; @@ -1092,7 +1092,7 @@ public SignalAspect(STFReader stf) /// /// Describes a signal object shape and the set of signal heads and other sub-objects that are present on this. /// - + public class ApproachControlLimits { public float? ApproachControlPositionM = null; @@ -1175,7 +1175,7 @@ public class SignalSubObj /// public static IList SignalSubTypes = new[] {"DECOR","SIGNAL_HEAD","DUMMY1","DUMMY2", - "NUMBER_PLATE","GRADIENT_PLATE","USER1","USER2","USER3","USER4"}; + "NUMBER_PLATE","GRADIENT_PLATE","USER1","USER2","USER3","USER4"}; // made public for access from SIGSCR processing // Altered to match definition in MSTS diff --git a/Source/Orts.Formats.Msts/SignalEnums.cs b/Source/Orts.Formats.Msts/SignalEnums.cs index e46d201431..fd6a04b5d5 100644 --- a/Source/Orts.Formats.Msts/SignalEnums.cs +++ b/Source/Orts.Formats.Msts/SignalEnums.cs @@ -15,11 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - namespace Orts.Formats.Msts { /// diff --git a/Source/Orts.Formats.Msts/SignalScripts.cs b/Source/Orts.Formats.Msts/SignalScripts.cs index afaf3d36ce..36e341830c 100644 --- a/Source/Orts.Formats.Msts/SignalScripts.cs +++ b/Source/Orts.Formats.Msts/SignalScripts.cs @@ -29,7 +29,6 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; -using System.Linq; using System.Text.RegularExpressions; namespace Orts.Formats.Msts @@ -1744,7 +1743,7 @@ private static void Debugprocess_FunctionCall(SCRParameterType TermParts) Trace.WriteLine($"SignalScript: {TermParts.PartParameter}, {TermParts.PartType}"); } - private static void TraceError(int lineNumber, string tokenType, string termString ) + private static void TraceError(int lineNumber, string tokenType, string termString) { #if DEBUG_PRINT_IN File.AppendAllText(din_fileLoc + @"sigscr.txt", $"Unknown {tokenType} : {termString}\n"); diff --git a/Source/Orts.Formats.Msts/SoundManagmentFile.cs b/Source/Orts.Formats.Msts/SoundManagmentFile.cs index 3e3efec859..ca16d1858b 100644 --- a/Source/Orts.Formats.Msts/SoundManagmentFile.cs +++ b/Source/Orts.Formats.Msts/SoundManagmentFile.cs @@ -15,12 +15,7 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections; using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; using Orts.Parsers.Msts; namespace Orts.Formats.Msts @@ -53,16 +48,16 @@ public static SoundManagmentFile Get(string path) } } - /// - /// Represents the hiearchical structure of the SMS File - /// - public class SoundManagmentFile - { - public Tr_SMS Tr_SMS; + /// + /// Represents the hiearchical structure of the SMS File + /// + public class SoundManagmentFile + { + public Tr_SMS Tr_SMS; - public SoundManagmentFile( string filePath ) - { - ReadFile(filePath); + public SoundManagmentFile(string filePath) + { + ReadFile(filePath); } private void ReadFile(string filePath) @@ -73,12 +68,12 @@ private void ReadFile(string filePath) }); } - } // class SMSFile + } // class SMSFile public class Tr_SMS { public List ScalabiltyGroups = new List(); - + public Tr_SMS(STFReader stf) { stf.MustMatch("("); @@ -139,14 +134,14 @@ public Activation() } - public class Deactivation: Activation + public class Deactivation : Activation { - public Deactivation(STFReader stf): base(stf) + public Deactivation(STFReader stf) : base(stf) { } // for precompiled sound sources for activity sound - public Deactivation(): base() + public Deactivation() : base() { } } @@ -230,10 +225,10 @@ public VolumeCurve(STFReader stf) { CurvePoints[i].X = stf.ReadFloat(STFReader.UNITS.None, null); if (Control == Controls.DistanceControlled) - { - if (CurvePoints[i].X >= 0) CurvePoints[i].X *= CurvePoints[i].X; - else CurvePoints[i].X *= -CurvePoints[i].X; - } + { + if (CurvePoints[i].X >= 0) CurvePoints[i].X *= CurvePoints[i].X; + else CurvePoints[i].X *= -CurvePoints[i].X; + } CurvePoints[i].Y = stf.ReadFloat(STFReader.UNITS.None, null); } stf.SkipRestOfBlock(); @@ -242,7 +237,7 @@ public VolumeCurve(STFReader stf) } } - public class FrequencyCurve: VolumeCurve + public class FrequencyCurve : VolumeCurve { public FrequencyCurve(STFReader stf) : base(stf) @@ -280,13 +275,13 @@ protected void ParsePlayCommand(STFReader f, string lowertoken) { switch (lowertoken) { - case "playoneshot": + case "playoneshot": case "startloop": - case "releaselooprelease": + case "releaselooprelease": case "startlooprelease": - case "releaseloopreleasewithjump": - case "disabletrigger": - case "enabletrigger": + case "releaseloopreleasewithjump": + case "disabletrigger": + case "enabletrigger": case "setstreamvolume": ++playcommandcount; if (playcommandcount > 1) @@ -300,11 +295,11 @@ protected void ParsePlayCommand(STFReader f, string lowertoken) { case "playoneshot": SoundCommand = new PlayOneShot(f); break; case "startloop": SoundCommand = new StartLoop(f); break; - case "releaselooprelease": SoundCommand = new ReleaseLoopRelease(f); break; - case "startlooprelease": SoundCommand = new StartLoopRelease( f ); break; - case "releaseloopreleasewithjump": SoundCommand = new ReleaseLoopReleaseWithJump( f ); break; - case "disabletrigger": SoundCommand = new DisableTrigger( f); break; - case "enabletrigger": SoundCommand = new EnableTrigger( f); break; + case "releaselooprelease": SoundCommand = new ReleaseLoopRelease(f); break; + case "startlooprelease": SoundCommand = new StartLoopRelease(f); break; + case "releaseloopreleasewithjump": SoundCommand = new ReleaseLoopReleaseWithJump(f); break; + case "disabletrigger": SoundCommand = new DisableTrigger(f); break; + case "enabletrigger": SoundCommand = new EnableTrigger(f); break; case "setstreamvolume": SoundCommand = new SetStreamVolume(f); break; case "(": f.SkipRestOfBlock(); break; } @@ -338,8 +333,10 @@ public Discrete_Trigger(STFReader f) public class Variable_Trigger : Trigger { - public enum Events { Speed_Inc_Past, Speed_Dec_Past, Distance_Inc_Past, Distance_Dec_Past, - Variable1_Inc_Past, Variable1_Dec_Past, Variable2_Inc_Past, Variable2_Dec_Past, Variable3_Inc_Past, Variable3_Dec_Past, BrakeCyl_Inc_Past, BrakeCyl_Dec_Past, CurveForce_Inc_Past, CurveForce_Dec_Past + public enum Events + { + Speed_Inc_Past, Speed_Dec_Past, Distance_Inc_Past, Distance_Dec_Past, + Variable1_Inc_Past, Variable1_Dec_Past, Variable2_Inc_Past, Variable2_Dec_Past, Variable3_Inc_Past, Variable3_Dec_Past, BrakeCyl_Inc_Past, BrakeCyl_Dec_Past, CurveForce_Inc_Past, CurveForce_Dec_Past }; public Events Event; @@ -381,7 +378,7 @@ public Variable_Trigger(STFReader f) case "curveforce_dec_past": Event = Events.CurveForce_Dec_Past; break; } - + while (!f.EndOfBlock()) ParsePlayCommand(f, f.ReadString().ToLower()); @@ -488,7 +485,7 @@ public ReleaseLoopReleaseWithJump(STFReader f) } } - public class SoundPlayCommand: SoundCommand + public class SoundPlayCommand : SoundCommand { public string[] Files; public SelectionMethods SelectionMethod = SelectionMethods.SequentialSelection; @@ -496,7 +493,7 @@ public class SoundPlayCommand: SoundCommand public class PlayOneShot : SoundPlayCommand { - + public PlayOneShot(STFReader f) { f.MustMatch("("); @@ -538,7 +535,7 @@ public PlayOneShot(STFReader f) public class StartLoop : PlayOneShot { - public StartLoop( STFReader f ): base(f) + public StartLoop(STFReader f) : base(f) { } } diff --git a/Source/Orts.Formats.Msts/SpeedpostDatFile.cs b/Source/Orts.Formats.Msts/SpeedpostDatFile.cs index b80c808cee..d7e1e4962d 100644 --- a/Source/Orts.Formats.Msts/SpeedpostDatFile.cs +++ b/Source/Orts.Formats.Msts/SpeedpostDatFile.cs @@ -16,10 +16,7 @@ // along with Open Rails. If not, see . using System; -using System.Collections; -using System.Collections.Generic; using System.IO; -using Microsoft.Xna.Framework; using Orts.Parsers.Msts; // This file parses only the shape names for temporary speed restrictions; the other shape names are not needed @@ -27,15 +24,15 @@ namespace Orts.Formats.Msts { - public class SpeedpostDatFile - { - public string [] TempSpeedShapeNames = new string[3]; + public class SpeedpostDatFile + { + public string[] TempSpeedShapeNames = new string[3]; - public SpeedpostDatFile(string filePath, string shapePath) - { - using (STFReader stf = new STFReader(filePath, false)) - { - stf.ParseBlock(new STFReader.TokenProcessor[] { + public SpeedpostDatFile(string filePath, string shapePath) + { + using (STFReader stf = new STFReader(filePath, false)) + { + stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("speed_warning_sign_shape", ()=> { var dataItem = stf.ReadStringBlock(null); @@ -76,8 +73,8 @@ public SpeedpostDatFile(string filePath, string shapePath) } ), }); - } - } + } + } } // class SpeedpostDatFile } diff --git a/Source/Orts.Formats.Msts/TrackDatabaseFile.cs b/Source/Orts.Formats.Msts/TrackDatabaseFile.cs index e1bf02567f..6ab80c0ca7 100644 --- a/Source/Orts.Formats.Msts/TrackDatabaseFile.cs +++ b/Source/Orts.Formats.Msts/TrackDatabaseFile.cs @@ -16,14 +16,14 @@ // along with Open Rails. If not, see . using System; +using System.Collections.Generic; using System.Diagnostics; -using System.IO; using System.Diagnostics.CodeAnalysis; -using System.Collections.Generic; -using Orts.Parsers.Msts; -using ORTS.Common; +using System.IO; using Microsoft.Xna.Framework; using Orts.Common; +using Orts.Parsers.Msts; +using ORTS.Common; namespace Orts.Formats.Msts { @@ -50,7 +50,7 @@ public class TrackDatabaseFile /// /// Full file name of the .rdb file public TrackDatabaseFile(string filenamewithpath) - { + { using (STFReader stf = new STFReader(filenamewithpath, false)) stf.ParseFile(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("trackdb", ()=>{ TrackDB = new TrackDB(stf); }), @@ -96,7 +96,7 @@ public class TrackDB /// Array of all TrackNodes in the track database /// Warning, the first TrackNode is always null. /// - public TrackNode[] TrackNodes; + public TrackNode[] TrackNodes; /// /// Array of all Track Items (TrItem) in the road database @@ -140,7 +140,7 @@ public TrackDB(STFReader stf) }), }); } - + /// /// Find the index of the TrackNode /// @@ -187,7 +187,7 @@ public void AddTrItems(TrItem[] newTrItems) for (int i = 0; i < newTrItems.Length; i++) { int newId = i + TrItemTable.Length; - newTrItems[i].TrItemId = (uint) newId; + newTrItems[i].TrItemId = (uint)newId; newTrItemTable[newId] = newTrItems[i]; } @@ -200,7 +200,7 @@ public void AddTrNodesToPointsOnApiMap(InfoApiMap infoApiMap) { if (trackNode != null) { - try + try { if (trackNode.UiD != null) { @@ -327,7 +327,7 @@ public class TrackNode /// [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", Justification = "Keeping identifier consistent to use in MSTS")] public TrVectorNode TrVectorNode { get; set; } - + /// /// True when this TrackNode has nothing else connected to it (that is, it is /// a buffer end or an unfinished track) and trains cannot proceed beyond here. @@ -453,7 +453,7 @@ public TrPin(STFReader stf) /// /// Default (empty) constructor /// - public TrPin() {} + public TrPin() { } /// /// Create a shallow copy of the current TrPin @@ -522,7 +522,7 @@ public UiD(STFReader stf) AZ = stf.ReadFloat(STFReader.UNITS.None, null); stf.SkipRestOfBlock(); } - + /// /// Constructor from a vector section /// @@ -554,7 +554,7 @@ public class TrJunctionNode /// The route of a switch that is currently in use. /// public int SelectedRoute { get; set; } - + /// /// Reference to the parent trackNode /// @@ -620,7 +620,7 @@ public double GetAngle(TrackSectionsFile tsectionDat) TrackShape trackShape = tsectionDat.TrackShapes.Get(ShapeIndex); SectionIdx[] SectionIdxs = trackShape.SectionIdxs; - for (int index = 0; index <= SectionIdxs.Length-1 ; index++) + for (int index = 0; index <= SectionIdxs.Length - 1; index++) { if (index == trackShape.MainRoute) continue; uint[] sections = SectionIdxs[index].TrackSections; @@ -851,7 +851,7 @@ public abstract class TrItem /// Describes the various types of Track Items /// public enum trItemType - { + { /// empty item trEMPTY, // the first, so translates to '0', so this is the default. /// A place where two tracks cross over each other @@ -928,7 +928,7 @@ protected void ParseTrItemID(STFReader stf, int idx) Debug.Assert(idx == TrItemId, "Index Mismatch"); stf.SkipRestOfBlock(); } - + /// /// Reads the Rdata from filestream /// @@ -1159,7 +1159,7 @@ public SpeedPostItem(STFReader stf, int idx) SigObj = -1; ItemType = trItemType.trSPEEDPOST; stf.MustMatch("("); - stf.ParseBlock(new STFReader.TokenProcessor[] { + stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("tritemid", ()=>{ ParseTrItemID(stf, idx); }), new STFReader.TokenProcessor("tritemrdata", ()=>{ TrItemRData(stf); }), new STFReader.TokenProcessor("tritemsdata", ()=>{ TrItemSData(stf); }), @@ -1168,44 +1168,44 @@ public SpeedPostItem(STFReader stf, int idx) new STFReader.TokenProcessor("speedposttritemdata", ()=>{ stf.MustMatch("("); Flags = stf.ReadUInt(null); - if ((Flags & 1) != 0) IsWarning = true; - if ((Flags & (1 << 1)) != 0) IsLimit = true; - if (!IsWarning && !IsLimit) { - IsMilePost = true; - } - else { - if (IsWarning && IsLimit) - { - IsWarning = false; - IsResume = true; - } - - if ((Flags & (1 << 5)) != 0) IsPassenger = true; - if ((Flags & (1 << 6)) != 0) IsFreight = true; - if ((Flags & (1 << 7)) != 0) IsFreight = IsPassenger = true; - if ((Flags & (1 << 8)) != 0) IsMPH = true; - if ((Flags & (1 << 4)) != 0) { - ShowNumber = true; - if ((Flags & (1 << 9)) != 0) ShowDot = true; - } - } + if ((Flags & 1) != 0) IsWarning = true; + if ((Flags & (1 << 1)) != 0) IsLimit = true; + if (!IsWarning && !IsLimit) { + IsMilePost = true; + } + else { + if (IsWarning && IsLimit) + { + IsWarning = false; + IsResume = true; + } + + if ((Flags & (1 << 5)) != 0) IsPassenger = true; + if ((Flags & (1 << 6)) != 0) IsFreight = true; + if ((Flags & (1 << 7)) != 0) IsFreight = IsPassenger = true; + if ((Flags & (1 << 8)) != 0) IsMPH = true; + if ((Flags & (1 << 4)) != 0) { + ShowNumber = true; + if ((Flags & (1 << 9)) != 0) ShowDot = true; + } + } // The number of parameters depends on the flags seeting // To do: Check flags seetings and parse accordingly. if (!IsResume) - { + { //SpeedInd = stf.ReadFloat(STFReader.UNITS.None, null); if (IsMilePost && ((Flags & (1 << 9)) == 0)) SpeedInd = (float)Math.Truncate(stf.ReadDouble(null)); else SpeedInd = stf.ReadFloat(STFReader.UNITS.None, null); - } + } + + if (ShowNumber) + { + DisplayNumber = stf.ReadInt(null); + } - if (ShowNumber) - { - DisplayNumber = stf.ReadInt(null); - } - - Angle = MathHelper.WrapAngle(stf.ReadFloat(STFReader.UNITS.None, null)); + Angle = MathHelper.WrapAngle(stf.ReadFloat(STFReader.UNITS.None, null)); stf.SkipRestOfBlock(); }), @@ -1218,7 +1218,7 @@ public SpeedPostItem() } public class TempSpeedPostItem : SpeedPostItem - { + { /// /// Constructor for creating a speedpost from activity speed restriction zone /// @@ -1228,7 +1228,7 @@ public class TempSpeedPostItem : SpeedPostItem /// public WorldPosition WorldPosition; - public TempSpeedPostItem(Tr_RouteFile routeFile, Position position, bool isStart, WorldPosition worldPosition, bool isWarning) + public TempSpeedPostItem(Tr_RouteFile routeFile, Position position, bool isStart, WorldPosition worldPosition, bool isWarning) { // TrItemId needs to be set later ItemType = trItemType.trSPEEDPOST; @@ -1246,7 +1246,7 @@ public TempSpeedPostItem(Tr_RouteFile routeFile, Position position, bool isStar if (routeFile.MilepostUnitsMetric == true) { this.IsMPH = false; - SpeedInd = (int)(ORTS.Common.MpS.ToKpH(routeFile.TempRestrictedSpeed) + 0.1f); + SpeedInd = (int)(ORTS.Common.MpS.ToKpH(routeFile.TempRestrictedSpeed) + 0.1f); } else { @@ -1333,7 +1333,7 @@ public EmptyItem(STFReader stf, int idx) /// /// Representa a level Crossing item (so track crossing road) /// - [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", Justification="Keeping identifier consistent to use in MSTS")] + [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", Justification = "Keeping identifier consistent to use in MSTS")] public class LevelCrItem : TrItem { /// @@ -1390,7 +1390,7 @@ public SidingItem(STFReader stf, int idx) }); } } - + /// /// Represents either start or end of a platform (a place where trains can stop). /// diff --git a/Source/Orts.Formats.Msts/TrackSectionsFile.cs b/Source/Orts.Formats.Msts/TrackSectionsFile.cs index fefb78a103..7ef8bb01ab 100644 --- a/Source/Orts.Formats.Msts/TrackSectionsFile.cs +++ b/Source/Orts.Formats.Msts/TrackSectionsFile.cs @@ -16,7 +16,6 @@ // along with Open Rails. If not, see . using System; -using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; @@ -25,100 +24,100 @@ namespace Orts.Formats.Msts { - // GLOBAL TSECTION DAT - - public class SectionCurve - { - public SectionCurve() - { - Radius = 0; - Angle = 0; - } - public SectionCurve(STFReader stf) - { - stf.MustMatch("("); + // GLOBAL TSECTION DAT + + public class SectionCurve + { + public SectionCurve() + { + Radius = 0; + Angle = 0; + } + public SectionCurve(STFReader stf) + { + stf.MustMatch("("); Radius = stf.ReadFloat(STFReader.UNITS.Distance, null); Angle = stf.ReadFloat(STFReader.UNITS.None, null); stf.SkipRestOfBlock(); - } - public float Radius; // meters - public float Angle; // degrees - } - - public class SectionSize - { - public SectionSize() - { - Width = 1.5F; - Length = 0; - } - public SectionSize(STFReader stf) - { - stf.MustMatch("("); + } + public float Radius; // meters + public float Angle; // degrees + } + + public class SectionSize + { + public SectionSize() + { + Width = 1.5F; + Length = 0; + } + public SectionSize(STFReader stf) + { + stf.MustMatch("("); Width = stf.ReadFloat(STFReader.UNITS.Distance, null); Length = stf.ReadFloat(STFReader.UNITS.Distance, null); stf.SkipRestOfBlock(); - } - public float Width; - public float Length; - } - - public class TrackSection - { - public TrackSection() - { - } - - public TrackSection(STFReader stf) - { - stf.MustMatch("("); + } + public float Width; + public float Length; + } + + public class TrackSection + { + public TrackSection() + { + } + + public TrackSection(STFReader stf) + { + stf.MustMatch("("); SectionIndex = stf.ReadUInt(null); stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("sectionsize", ()=>{ SectionSize = new SectionSize(stf); }), new STFReader.TokenProcessor("sectioncurve", ()=>{ SectionCurve = new SectionCurve(stf); }), }); - //if( SectionSize == null ) - // throw( new STFError( stf, "Missing SectionSize" ) ); - // note- default TSECTION.DAT does have some missing sections - } - public uint SectionIndex; - public SectionSize SectionSize; - public SectionCurve SectionCurve; - } - - public class RouteTrackSection: TrackSection - { - public RouteTrackSection(STFReader stf) - { - stf.MustMatch("("); - stf.MustMatch( "SectionCurve" ); - stf.SkipBlock(); + //if( SectionSize == null ) + // throw( new STFError( stf, "Missing SectionSize" ) ); + // note- default TSECTION.DAT does have some missing sections + } + public uint SectionIndex; + public SectionSize SectionSize; + public SectionCurve SectionCurve; + } + + public class RouteTrackSection : TrackSection + { + public RouteTrackSection(STFReader stf) + { + stf.MustMatch("("); + stf.MustMatch("SectionCurve"); + stf.SkipBlock(); SectionIndex = stf.ReadUInt(null); - SectionSize = new SectionSize(); + SectionSize = new SectionSize(); float a = stf.ReadFloat(STFReader.UNITS.Distance, null); float b = stf.ReadFloat(STFReader.UNITS.None, null); - if( b == 0 ) - // Its straight - { - SectionSize.Length = a; - } - else - // its curved - { - SectionCurve = new SectionCurve(); - SectionCurve.Radius = b; + if (b == 0) + // Its straight + { + SectionSize.Length = a; + } + else + // its curved + { + SectionCurve = new SectionCurve(); + SectionCurve.Radius = b; SectionCurve.Angle = (float)MathHelper.ToDegrees(a); - } - stf.SkipRestOfBlock(); - } - } - - public class TrackSections: Dictionary - { - public TrackSections(STFReader stf) - { + } + stf.SkipRestOfBlock(); + } + } + + public class TrackSections : Dictionary + { + public TrackSections(STFReader stf) + { AddRouteStandardTrackSections(stf); - } + } public void AddRouteStandardTrackSections(STFReader stf) { @@ -129,14 +128,14 @@ public void AddRouteStandardTrackSections(STFReader stf) }); } - public void AddRouteTrackSections(STFReader stf) - { - stf.MustMatch("("); + public void AddRouteTrackSections(STFReader stf) + { + stf.MustMatch("("); MaxSectionIndex = stf.ReadUInt(null); stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("tracksection", ()=>{ AddSection(stf, new RouteTrackSection(stf)); }), }); - } + } void AddSection(STFReader stf, TrackSection section) { @@ -147,57 +146,57 @@ void AddSection(STFReader stf, TrackSection section) public static int MissingTrackSectionWarnings; - public TrackSection Get( uint targetSectionIndex ) - { + public TrackSection Get(uint targetSectionIndex) + { TrackSection ts; if (TryGetValue(targetSectionIndex, out ts)) return ts; - if (MissingTrackSectionWarnings++ < 5) - Trace.TraceWarning("Skipped track section {0} not in global or dynamic TSECTION.DAT", targetSectionIndex); + if (MissingTrackSectionWarnings++ < 5) + Trace.TraceWarning("Skipped track section {0} not in global or dynamic TSECTION.DAT", targetSectionIndex); return null; - } - public uint MaxSectionIndex; - } - - public class SectionIdx - { - public SectionIdx(STFReader stf) - { - stf.MustMatch("("); + } + public uint MaxSectionIndex; + } + + public class SectionIdx + { + public SectionIdx(STFReader stf) + { + stf.MustMatch("("); NoSections = stf.ReadUInt(null); X = stf.ReadDouble(null); Y = stf.ReadDouble(null); Z = stf.ReadDouble(null); A = stf.ReadDouble(null); - TrackSections = new uint[NoSections]; - for( int i = 0; i < NoSections; ++i ) - { - string token = stf.ReadString(); - if( token == ")" ) + TrackSections = new uint[NoSections]; + for (int i = 0; i < NoSections; ++i) + { + string token = stf.ReadString(); + if (token == ")") { STFException.TraceWarning(stf, "Missing track section"); return; // there are many TSECTION.DAT's with missing sections so we will accept this error } if (!uint.TryParse(token, out TrackSections[i])) STFException.TraceWarning(stf, "Invalid track section " + token); - } - stf.SkipRestOfBlock(); - } - public uint NoSections; - public double X,Y,Z; // Offset - public double A; // Angular offset - public uint[] TrackSections; - } - - - [DebuggerDisplay("TrackShape {ShapeIndex}")] - public class TrackShape - { - public TrackShape(STFReader stf) - { - stf.MustMatch("("); + } + stf.SkipRestOfBlock(); + } + public uint NoSections; + public double X, Y, Z; // Offset + public double A; // Angular offset + public uint[] TrackSections; + } + + + [DebuggerDisplay("TrackShape {ShapeIndex}")] + public class TrackShape + { + public TrackShape(STFReader stf) + { + stf.MustMatch("("); ShapeIndex = stf.ReadUInt(null); - int nextPath = 0; + int nextPath = 0; stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("filename", ()=>{ FileName = stf.ReadStringBlock(null); }), new STFReader.TokenProcessor("numpaths", ()=>{ SectionIdxs = new SectionIdx[NumPaths = stf.ReadUIntBlock(null)]; }), @@ -207,79 +206,79 @@ public TrackShape(STFReader stf) new STFReader.TokenProcessor("tunnelshape", ()=>{ TunnelShape = stf.ReadBoolBlock(true); }), new STFReader.TokenProcessor("roadshape", ()=>{ RoadShape = stf.ReadBoolBlock(true); }), }); - // TODO - this was removed since TrackShape( 183 ) is blank - //if( FileName == null ) throw( new STFError( stf, "Missing FileName" ) ); - //if( SectionIdxs == null ) throw( new STFError( stf, "Missing SectionIdxs" ) ); - //if( NumPaths == 0 ) throw( new STFError( stf, "No Paths in TrackShape" ) ); - } - public uint ShapeIndex; - public string FileName; + // TODO - this was removed since TrackShape( 183 ) is blank + //if( FileName == null ) throw( new STFError( stf, "Missing FileName" ) ); + //if( SectionIdxs == null ) throw( new STFError( stf, "Missing SectionIdxs" ) ); + //if( NumPaths == 0 ) throw( new STFError( stf, "No Paths in TrackShape" ) ); + } + public uint ShapeIndex; + public string FileName; public uint NumPaths; public uint MainRoute; - public double ClearanceDistance = 0.0; - public SectionIdx[] SectionIdxs; + public double ClearanceDistance = 0.0; + public SectionIdx[] SectionIdxs; public bool TunnelShape; public bool RoadShape; - } - - public class TrackShapes: Dictionary - { + } + + public class TrackShapes : Dictionary + { - public uint MaxShapeIndex; + public uint MaxShapeIndex; - - public TrackShapes(STFReader stf) - { + + public TrackShapes(STFReader stf) + { AddRouteTrackShapes(stf); - } + } public void AddRouteTrackShapes(STFReader stf) { stf.MustMatch("("); MaxShapeIndex = stf.ReadUInt(null); - stf.ParseBlock(new STFReader.TokenProcessor[] + stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("trackshape", ()=>{ Add(stf, new TrackShape(stf)); }), }); } - private void Add(STFReader stf, TrackShape trackShape) - { - if (ContainsKey(trackShape.ShapeIndex)) - STFException.TraceWarning(stf, "Replaced duplicate TrackShape " + trackShape.ShapeIndex); - this[trackShape.ShapeIndex] = trackShape; - } - - - /// - /// Returns the TrackShape corresponding to the given index value. - /// - /// The index value of the desired TrackShape. - /// The requested TrackShape. - public TrackShape Get(uint targetShapeIndex ) - { + private void Add(STFReader stf, TrackShape trackShape) + { + if (ContainsKey(trackShape.ShapeIndex)) + STFException.TraceWarning(stf, "Replaced duplicate TrackShape " + trackShape.ShapeIndex); + this[trackShape.ShapeIndex] = trackShape; + } + + + /// + /// Returns the TrackShape corresponding to the given index value. + /// + /// The index value of the desired TrackShape. + /// The requested TrackShape. + public TrackShape Get(uint targetShapeIndex) + { TrackShape returnValue; - if (ContainsKey(targetShapeIndex)) - { - returnValue = this[targetShapeIndex]; - } - else - { - throw new InvalidDataException("ShapeIndex not found"); - } - - return returnValue; - } - - - } - - public class TrackSectionsFile - { - public void AddRouteTSectionDatFile( string pathNameExt ) - { + if (ContainsKey(targetShapeIndex)) + { + returnValue = this[targetShapeIndex]; + } + else + { + throw new InvalidDataException("ShapeIndex not found"); + } + + return returnValue; + } + + + } + + public class TrackSectionsFile + { + public void AddRouteTSectionDatFile(string pathNameExt) + { using (STFReader stf = new STFReader(pathNameExt, false)) { if (stf.SimisSignature != "SIMISA@@@@@@@@@@JINX0T0t______") @@ -293,20 +292,20 @@ public void AddRouteTSectionDatFile( string pathNameExt ) // todo read in SectionIdx part of RouteTSectionDat }); } - } + } public TrackSectionsFile(string filePath) { using (STFReader stf = new STFReader(filePath, false)) { stf.ParseFile(new STFReader.TokenProcessor[] { - new STFReader.TokenProcessor("tracksections", ()=>{ + new STFReader.TokenProcessor("tracksections", ()=>{ if (TrackSections == null) TrackSections = new TrackSections(stf); else TrackSections.AddRouteStandardTrackSections(stf);}), - new STFReader.TokenProcessor("trackshapes", ()=>{ - if (TrackShapes == null) + new STFReader.TokenProcessor("trackshapes", ()=>{ + if (TrackShapes == null) TrackShapes = new TrackShapes(stf); else TrackShapes.AddRouteTrackShapes(stf);}), @@ -316,66 +315,66 @@ public TrackSectionsFile(string filePath) if (TrackShapes == null) throw new STFException(stf, "Missing TrackShapes"); } } - public TrackSections TrackSections; - public TrackShapes TrackShapes; - public TSectionIdx TSectionIdx; //route's tsection.dat + public TrackSections TrackSections; + public TrackShapes TrackShapes; + public TSectionIdx TSectionIdx; //route's tsection.dat - } + } - public class TSectionIdx //SectionIdx in the route's tsection.dat - { + public class TSectionIdx //SectionIdx in the route's tsection.dat + { - public TSectionIdx(STFReader stf) - { - stf.MustMatch("("); - NoSections = stf.ReadUInt(null); - TrackPaths = new Dictionary((int)NoSections); - stf.ParseBlock(new STFReader.TokenProcessor[] { + public TSectionIdx(STFReader stf) + { + stf.MustMatch("("); + NoSections = stf.ReadUInt(null); + TrackPaths = new Dictionary((int)NoSections); + stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("trackpath", ()=>{ AddPath(stf, new TrackPath(stf)); }), }); - stf.SkipRestOfBlock(); - } - - private void AddPath(STFReader stf, TrackPath path) - { - try - { - TrackPaths.Add(path.DynamicSectionIndex, path); - } - catch (Exception e) - { - System.Console.WriteLine("Warning: in route tsection.dat " + e.Message); - } - } - public uint NoSections; - public Dictionary TrackPaths; - } - - public class TrackPath //SectionIdx in the route's tsection.dat - { - - public TrackPath(STFReader stf) - { - stf.MustMatch("("); - DynamicSectionIndex = stf.ReadUInt(null); - NoSections = stf.ReadUInt(null); - TrackSections = new uint[NoSections]; - for (int i = 0; i < NoSections; ++i) - { - string token = stf.ReadString(); - if (token == ")") - { - STFException.TraceWarning(stf, "Missing track section"); - return; // there are many TSECTION.DAT's with missing sections so we will accept this error - } - if (!uint.TryParse(token, out TrackSections[i])) - STFException.TraceWarning(stf, "Invalid track section " + token); - } - stf.SkipRestOfBlock(); - - } - public uint DynamicSectionIndex; - public uint NoSections; - public uint[] TrackSections; - } + stf.SkipRestOfBlock(); + } + + private void AddPath(STFReader stf, TrackPath path) + { + try + { + TrackPaths.Add(path.DynamicSectionIndex, path); + } + catch (Exception e) + { + System.Console.WriteLine("Warning: in route tsection.dat " + e.Message); + } + } + public uint NoSections; + public Dictionary TrackPaths; + } + + public class TrackPath //SectionIdx in the route's tsection.dat + { + + public TrackPath(STFReader stf) + { + stf.MustMatch("("); + DynamicSectionIndex = stf.ReadUInt(null); + NoSections = stf.ReadUInt(null); + TrackSections = new uint[NoSections]; + for (int i = 0; i < NoSections; ++i) + { + string token = stf.ReadString(); + if (token == ")") + { + STFException.TraceWarning(stf, "Missing track section"); + return; // there are many TSECTION.DAT's with missing sections so we will accept this error + } + if (!uint.TryParse(token, out TrackSections[i])) + STFException.TraceWarning(stf, "Invalid track section " + token); + } + stf.SkipRestOfBlock(); + + } + public uint DynamicSectionIndex; + public uint NoSections; + public uint[] TrackSections; + } } diff --git a/Source/Orts.Formats.Msts/TrackTypesFile.cs b/Source/Orts.Formats.Msts/TrackTypesFile.cs index 7a0a0578b5..e9f6876759 100644 --- a/Source/Orts.Formats.Msts/TrackTypesFile.cs +++ b/Source/Orts.Formats.Msts/TrackTypesFile.cs @@ -15,23 +15,19 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections; using System.Collections.Generic; -using System.IO; -using Microsoft.Xna.Framework; using Orts.Parsers.Msts; namespace Orts.Formats.Msts { - // TODO - this is an incomplete parse of the cvf file. - public class TrackTypesFile: List - { - + // TODO - this is an incomplete parse of the cvf file. + public class TrackTypesFile : List + { + public TrackTypesFile(string filePath) - { + { using (STFReader stf = new STFReader(filePath, false)) { var count = stf.ReadInt(null); @@ -46,7 +42,7 @@ public TrackTypesFile(string filePath) if (count > 0) STFException.TraceWarning(stf, count + " missing TrackType(s)"); } - } + } public class TrackType { @@ -64,6 +60,6 @@ public TrackType(STFReader stf) } } // TrackType - } // class CVFFile + } // class CVFFile } diff --git a/Source/Orts.Formats.Msts/TrafficFile.cs b/Source/Orts.Formats.Msts/TrafficFile.cs index 58a1a421c5..1cb3e31de9 100644 --- a/Source/Orts.Formats.Msts/TrafficFile.cs +++ b/Source/Orts.Formats.Msts/TrafficFile.cs @@ -15,10 +15,7 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections; using System.Collections.Generic; -using System.IO; using Orts.Parsers.Msts; namespace Orts.Formats.Msts @@ -55,7 +52,7 @@ public Traffic_Traffic_Definition(STFReader stf) stf.MustMatch("serial"); Serial = stf.ReadIntBlock(null); stf.ParseBlock(new STFReader.TokenProcessor[] { - new STFReader.TokenProcessor("service_definition", ()=>{ TrafficItems.Add(new Traffic_Service_Definition(stf)); }), + new STFReader.TokenProcessor("service_definition", ()=>{ TrafficItems.Add(new Traffic_Service_Definition(stf)); }), }); } } @@ -89,7 +86,7 @@ public Traffic_Service_Definition(STFReader stf) new STFReader.TokenProcessor("departtime", ()=>{ departTime = (int)stf.ReadFloatBlock(STFReader.UNITS.Time, null); }), new STFReader.TokenProcessor("skipcount", ()=>{ skipCount = stf.ReadIntBlock(null); }), new STFReader.TokenProcessor("distancedownpath", ()=>{ distanceDownPath = stf.ReadFloatBlock(STFReader.UNITS.Distance, null); }), - new STFReader.TokenProcessor("platformstartid", ()=>{ platformStartID = stf.ReadIntBlock(null); + new STFReader.TokenProcessor("platformstartid", ()=>{ platformStartID = stf.ReadIntBlock(null); TrafficDetails.Add(new Traffic_Traffic_Item(arrivalTime, departTime, skipCount, distanceDownPath, platformStartID)); }), }); diff --git a/Source/Orts.Formats.Msts/WagonFile.cs b/Source/Orts.Formats.Msts/WagonFile.cs index 13fd97f997..5949fb75be 100644 --- a/Source/Orts.Formats.Msts/WagonFile.cs +++ b/Source/Orts.Formats.Msts/WagonFile.cs @@ -15,8 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections; using System.IO; using Orts.Parsers.Msts; diff --git a/Source/Orts.Formats.Msts/WorldFile.cs b/Source/Orts.Formats.Msts/WorldFile.cs index d7fc9517bb..a8cc45abd1 100644 --- a/Source/Orts.Formats.Msts/WorldFile.cs +++ b/Source/Orts.Formats.Msts/WorldFile.cs @@ -15,13 +15,13 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Microsoft.Xna.Framework; -using Orts.Parsers.Msts; -using ORTS.Common; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; +using Microsoft.Xna.Framework; +using Orts.Parsers.Msts; +using ORTS.Common; namespace Orts.Formats.Msts { @@ -61,7 +61,7 @@ public WorldFile(string filename, List allowedTokens) } } - public void InsertORSpecificData (string filename, List allowedTokens) + public void InsertORSpecificData(string filename, List allowedTokens) { using (var sbr = SBR.Open(filename)) { @@ -176,7 +176,7 @@ void LoadObject(SBR subBlock, ref int currentWatermark, string filename) } } - public void InsertORSpecificData (SBR block, string filename, List allowedTokens) + public void InsertORSpecificData(SBR block, string filename, List allowedTokens) { block.VerifyID(TokenID.Tr_Worldfile); while (!block.EndOfBlock()) @@ -227,7 +227,7 @@ public void InsertORSpecificData (SBR block, string filename, List allo } } } - + } subBlock.EndOfBlock(); } @@ -333,13 +333,14 @@ public PickupObj(SBR block, int detailLevel) ReadBlock(block); } - + public override void AddOrModifyObj(SBR subBlock) { switch (subBlock.ID) { case TokenID.SpeedRange: SpeedRange = new SpeedRangeItem(subBlock); break; - case TokenID.PickupType: PickupType = subBlock.ReadUInt(); + case TokenID.PickupType: + PickupType = subBlock.ReadUInt(); subBlock.Skip(); // Discard the 2nd value (0 or 1 but significance is not known) break; case TokenID.ORTSMaxStackedContainers: MaxStackedContainers = subBlock.ReadInt(); break; @@ -463,7 +464,7 @@ public StackLocation(SBR block) case TokenID.Position: Position = subBlock.ReadVector3(); break; case TokenID.MaxStackedContainers: MaxStackedContainers = subBlock.ReadInt(); break; case TokenID.Length: Length = subBlock.ReadFloat(); break; - case TokenID.Flipped: subBlock.ReadInt(); Flipped = true; break; + case TokenID.Flipped: subBlock.ReadInt(); Flipped = true; break; default: subBlock.Skip(); break; } } @@ -666,7 +667,7 @@ public ForestObj(SBR block, int detailLevel) { StaticDetailLevel = detailLevel; - ReadBlock (block); + ReadBlock(block); IsYard = TreeTexture == null; } @@ -775,8 +776,8 @@ public SpeedPostObj(SBR block, int detailLevel) ReadBlock(block); } - // TODO verify that we got all needed parameters otherwise null pointer failures will occur - // TODO, do this for all objects that iterate using a while loop + // TODO verify that we got all needed parameters otherwise null pointer failures will occur + // TODO, do this for all objects that iterate using a while loop public override void AddOrModifyObj(SBR subBlock) { @@ -791,7 +792,7 @@ public override void AddOrModifyObj(SBR subBlock) case TokenID.QDirection: QDirection = new STFQDirectionItem(subBlock); break; case TokenID.VDbId: VDbId = subBlock.ReadUInt(); break; case TokenID.TrItemId: trItemIDList.Add(new TrItemId(subBlock)); break; - default: subBlock.Skip(); break; + default: subBlock.Skip(); break; } } @@ -878,27 +879,28 @@ public LevelCrossingObj(SBR block, int detailLevel) ReadBlock(block); } - public override void AddOrModifyObj(SBR subBlock) - { - switch (subBlock.ID) - { - case TokenID.StaticFlags: StaticFlags = subBlock.ReadFlags(); break; - case TokenID.LevelCrParameters: levelCrParameters = new LevelCrParameters(subBlock); break; - case TokenID.CrashProbability: crashProbability = subBlock.ReadInt(); break; - case TokenID.LevelCrData: levelCrData = new LevelCrData(subBlock); - visible = (levelCrData.crData1 & 0x1) == 0; - silent = !visible || (levelCrData.crData1 & 0x6) == 0x6; - break; - case TokenID.LevelCrTiming: levelCrTiming = new LevelCrTiming(subBlock); break; - case TokenID.TrItemId: trItemIDList.Add(new TrItemId(subBlock)); break; - case TokenID.FileName: FileName = subBlock.ReadString(); break; - case TokenID.Position: Position = new STFPositionItem(subBlock); break; - case TokenID.QDirection: QDirection = new STFQDirectionItem(subBlock); break; - case TokenID.VDbId: VDbId = subBlock.ReadUInt(); break; - case TokenID.ORTSSoundFileName: SoundFileName = subBlock.ReadString(); break; - default: subBlock.Skip(); break; + public override void AddOrModifyObj(SBR subBlock) + { + switch (subBlock.ID) + { + case TokenID.StaticFlags: StaticFlags = subBlock.ReadFlags(); break; + case TokenID.LevelCrParameters: levelCrParameters = new LevelCrParameters(subBlock); break; + case TokenID.CrashProbability: crashProbability = subBlock.ReadInt(); break; + case TokenID.LevelCrData: + levelCrData = new LevelCrData(subBlock); + visible = (levelCrData.crData1 & 0x1) == 0; + silent = !visible || (levelCrData.crData1 & 0x6) == 0x6; + break; + case TokenID.LevelCrTiming: levelCrTiming = new LevelCrTiming(subBlock); break; + case TokenID.TrItemId: trItemIDList.Add(new TrItemId(subBlock)); break; + case TokenID.FileName: FileName = subBlock.ReadString(); break; + case TokenID.Position: Position = new STFPositionItem(subBlock); break; + case TokenID.QDirection: QDirection = new STFQDirectionItem(subBlock); break; + case TokenID.VDbId: VDbId = subBlock.ReadUInt(); break; + case TokenID.ORTSSoundFileName: SoundFileName = subBlock.ReadString(); break; + default: subBlock.Skip(); break; + } } - } public class LevelCrParameters { @@ -1002,10 +1004,10 @@ public CarSpawnerObj(SBR block, int detailLevel) CarFrequency = 5.0f; CarAvSpeed = 20.0f; - ReadBlock (block); + ReadBlock(block); } - public override void AddOrModifyObj (SBR subBlock) + public override void AddOrModifyObj(SBR subBlock) { switch (subBlock.ID) { @@ -1049,7 +1051,7 @@ public TrItemId(SBR block) block.VerifyEndOfBlock(); } } - } + } /// /// Super-class for similar track items SidingObj and PlatformObj. @@ -1188,7 +1190,7 @@ public abstract class WorldObject public virtual void AddOrModifyObj(SBR subBlock) { - + } public void ReadBlock(SBR block) diff --git a/Source/Orts.Formats.OR/AEItems.cs b/Source/Orts.Formats.OR/AEItems.cs index 72040d605d..b385eaf878 100644 --- a/Source/Orts.Formats.OR/AEItems.cs +++ b/Source/Orts.Formats.OR/AEItems.cs @@ -15,14 +15,14 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Microsoft.Xna.Framework; -using Newtonsoft.Json; -using Orts.Formats.Msts; -using ORTS.Common; using System; using System.Collections.Generic; using System.Drawing; using System.Linq; +using Microsoft.Xna.Framework; +using Newtonsoft.Json; +using Orts.Formats.Msts; +using ORTS.Common; namespace Orts.Formats.OR { @@ -232,12 +232,12 @@ public TrackSegment GetTrackSegment(int nodeIdx, int sectionIdx) public GlobalItem findSegmentFromMouse(PointF pt, double snapSize) { double positiveInfinity = double.PositiveInfinity; - + if (snapSize < 1.0) { snapSize = 1.0; } - + PointF closest = new PointF(0f, 0f); TrackSegment segment = null; foreach (TrackSegment segment2 in segments) @@ -337,7 +337,7 @@ public TagItem(TypeEditor interfaceType) } public override void alignEdition(TypeEditor interfaceType, GlobalItem ownParent) - { + { setMovable(); asMetadata = true; } @@ -347,7 +347,7 @@ public void setNameTag(int info) nameTag = "tag" + info; } - public override void configCoord (MSTSCoord coord) + public override void configCoord(MSTSCoord coord) { base.configCoord(coord); typeItem = (int)TypeItem.TAG_ITEM; @@ -754,7 +754,7 @@ public void searchForPaths(ORRouteConfig orRouteConfig, MSTSItems aeItems, MSTSB { List paths = null; //StationPathsHelper.Clear(); - + for (int i = 0; i < this.stationArea.Count; i++) { double positiveInfinity = double.PositiveInfinity; @@ -821,13 +821,13 @@ public void checkForNewConnector(ORRouteConfig orRouteConfig, MSTSItems mstsItem { int num = 0; List pointsIntersect = new List(); - + List polySegments = getPolySegment(); if (segment.associateNodeIdx == 344) num = 0; for (int cntPointSegment = 0; cntPointSegment < polySegments.Count; cntPointSegment++) { - PointF pointIntersect = DrawUtility.FindIntersection(polySegments[cntPointSegment], new AESegment (segment)); + PointF pointIntersect = DrawUtility.FindIntersection(polySegments[cntPointSegment], new AESegment(segment)); if (!pointIntersect.IsEmpty) { StationAreaItem newPoint = new StationAreaItem(TypeEditor.ROUTECONFIG, this); @@ -964,15 +964,15 @@ public void setAngle(List polyPoint) stationConnector.setIcoAngle(Coord.ConvertToPointF(), polyPoint); } - public bool toggleSelected () + public bool toggleSelected() { selected = !selected; return selected; } public override void Update(MSTSCoord coord) - { - base.configCoord(coord); + { + base.configCoord(coord); } public bool IsInterface() @@ -1153,7 +1153,7 @@ public List searchPaths(AETraveller myTravel, List li return paths; } - + } #endregion @@ -1244,7 +1244,7 @@ public void CheckCurve(TrackSectionsFile tdf, int flag2) lenFleche = (float)ts.SectionCurve.Radius - lenFleche; if (double.IsNaN(lenFleche)) return; - curve = new AESectionCurve (ts.SectionCurve); + curve = new AESectionCurve(ts.SectionCurve); Vector3 v = new Vector3((float)(vectorB.X - vectorA.X), 0, (float)(vectorB.Y - vectorA.Y)); Vector3 v2 = Vector3.Cross(Vector3.Up, v); v2.Normalize(); diff --git a/Source/Orts.Formats.OR/AESegment.cs b/Source/Orts.Formats.OR/AESegment.cs index ae7b6c1730..e4365e55ae 100644 --- a/Source/Orts.Formats.OR/AESegment.cs +++ b/Source/Orts.Formats.OR/AESegment.cs @@ -15,10 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Microsoft.Xna.Framework; -using Orts.Formats.Msts; using System; using System.Drawing; +using Microsoft.Xna.Framework; +using Orts.Formats.Msts; namespace Orts.Formats.OR { diff --git a/Source/Orts.Formats.OR/AESignals.cs b/Source/Orts.Formats.OR/AESignals.cs index 82e74d858c..43460e6daf 100644 --- a/Source/Orts.Formats.OR/AESignals.cs +++ b/Source/Orts.Formats.OR/AESignals.cs @@ -706,7 +706,7 @@ private void SplitBackfacing(TrItem[] TrItems, TrackNode[] TrackNodes) } } - // Track Item is speedpost - check if really limit + // Track Item is speedpost - check if really limit else if (TrItems[TDBRef].ItemType == TrItem.trItemType.trSPEEDPOST) { SpeedPostItem speedItem = (SpeedPostItem)TrItems[TDBRef]; @@ -962,7 +962,7 @@ private void CreateTrackCircuits(TrItem[] TrItems, TrackNode[] trackNodes, TSect } #endif - }// class AESignals + }// class AESignals //================================================================================================// // diff --git a/Source/Orts.Formats.OR/AEStationPath.cs b/Source/Orts.Formats.OR/AEStationPath.cs index 4c95a83e63..2bf09f50da 100644 --- a/Source/Orts.Formats.OR/AEStationPath.cs +++ b/Source/Orts.Formats.OR/AEStationPath.cs @@ -15,12 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Newtonsoft.Json; -using Orts.Formats.Msts; -using ORTS.Common; using System; using System.Collections.Generic; using System.Diagnostics; +using Newtonsoft.Json; +using Orts.Formats.Msts; +using ORTS.Common; namespace Orts.Formats.OR { @@ -41,9 +41,9 @@ public Possibility Add(StationPath path) } } - public class DestinationPoint : Dictionary + public class DestinationPoint : Dictionary { - public Possibility Add(string desti) + public Possibility Add(string desti) { if (ContainsKey(desti)) { @@ -51,8 +51,8 @@ public Possibility Add(string desti) } var destination = new Possibility(); - base.Add(desti,destination); - return destination; + base.Add(desti, destination); + return destination; } } @@ -60,9 +60,9 @@ public class OriginPoint : Dictionary { public DestinationPoint Add(string origin) { - if (ContainsKey(origin)) - { - return this[origin]; + if (ContainsKey(origin)) + { + return this[origin]; } var desti = new DestinationPoint(); base.Add(origin, desti); @@ -189,7 +189,7 @@ public List explore(AETraveller myTravel, List listCo if (node2.TrJunctionNode != null) { - AEJunctionItem junction = (AEJunctionItem)paths[pathChecked].ComponentItem[paths[pathChecked].ComponentItem.Count-1]; + AEJunctionItem junction = (AEJunctionItem)paths[pathChecked].ComponentItem[paths[pathChecked].ComponentItem.Count - 1]; if (!insideJunction.Contains(junction)) { insideJunction.Add(junction); @@ -207,7 +207,7 @@ public List explore(AETraveller myTravel, List listCo } else if (node2.TrEndNode) { - AEBufferItem buffer = (AEBufferItem)paths[pathChecked].ComponentItem[paths[pathChecked].ComponentItem.Count-1]; + AEBufferItem buffer = (AEBufferItem)paths[pathChecked].ComponentItem[paths[pathChecked].ComponentItem.Count - 1]; if (!buffer.Configured || buffer.DirBuffer == AllowedDir.OUT) { //AEJunctionItem junction = (AEJunctionItem)paths[pathChecked].ComponentItem[paths[pathChecked].jctnIdx]; @@ -228,16 +228,16 @@ public List explore(AETraveller myTravel, List listCo } } - else + else { int lastIndex = (int)node2.Index; //lastCommonTrack = (int)node2.Index; if (paths[pathChecked].complete) { TrackSegment segment = (TrackSegment)paths[pathChecked].ComponentItem[paths[pathChecked].ComponentItem.Count - 1]; - + if (segment.HasConnector == null || - (segment.HasConnector != null && + (segment.HasConnector != null && (segment.HasConnector.dirConnector == AllowedDir.IN || !segment.HasConnector.isConfigured()))) { paths.RemoveAt(pathChecked); @@ -281,7 +281,7 @@ public List explore(AETraveller myTravel, List listCo MaxPassingYard = path.PassingYard; if (path.PassingYard < ShortPassingYard) ShortPassingYard = path.PassingYard; - } + } return paths; } @@ -498,7 +498,7 @@ public TrackNode explore(MSTSItems aeItems, List listConnector, in elapse.Add(elapsedTime); #endif - } while (traveller.NextVectorSection() && !complete) ; + } while (traveller.NextVectorSection() && !complete); if (currentNode.Index != entryNode && !complete && traveller.TrackNodeLength > PassingYard) PassingYard = traveller.TrackNodeLength; traveller.NextTrackNode(); @@ -530,7 +530,7 @@ public void highlightTrackFromArea(MSTSItems aeItems) public void setComplete(GlobalItem segment) { complete = true; - + if (segment.GetType() == typeof(TrackSegment) && ((TrackSegment)segment).HasConnector != null) { outLabel = ((TrackSegment)segment).HasConnector.label; diff --git a/Source/Orts.Formats.OR/AETraveller.cs b/Source/Orts.Formats.OR/AETraveller.cs index 5e55472c0a..863ff16337 100644 --- a/Source/Orts.Formats.OR/AETraveller.cs +++ b/Source/Orts.Formats.OR/AETraveller.cs @@ -15,15 +15,15 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Microsoft.Xna.Framework; -using Orts.Formats.Msts; -using ORTS.Common; using System; using System.Collections.Generic; using System.Diagnostics; using System.Drawing; using System.IO; using System.Linq; +using Microsoft.Xna.Framework; +using Orts.Formats.Msts; +using ORTS.Common; namespace Orts.Formats.OR { @@ -161,7 +161,7 @@ public AETraveller(TrackSectionsFile tSectionDat, TrackDatabaseFile tdb) /// Starting world location public void place(WorldLocation loc) { - place (loc.TileX, loc.TileZ, loc.Location.X, loc.Location.Z); + place(loc.TileX, loc.TileZ, loc.Location.X, loc.Location.Z); } /// @@ -889,7 +889,7 @@ public TrackNode GetCurrentNode() return TrackNodes[TrackNodeIndex]; } - /// + /// /// Moves the traveller on to the next section of track, whether that is another section within the current track node or a new track node. /// /// true if the next section exists, false if it does not. @@ -1065,7 +1065,7 @@ public float GetCurrentCurveRadius() public float SuperElevationValue(float speed, float timeInterval, bool computed) //will test 1 second ahead, computed will return desired elev. only { - #if !ACTIVITY_EDITOR +#if !ACTIVITY_EDITOR var tn = trackNode; if (tn.TrVectorNode == null) return 0f; var tvs = trackVectorSection; diff --git a/Source/Orts.Formats.OR/AuxActionRef.cs b/Source/Orts.Formats.OR/AuxActionRef.cs index e97127d0ae..ba9b2316be 100644 --- a/Source/Orts.Formats.OR/AuxActionRef.cs +++ b/Source/Orts.Formats.OR/AuxActionRef.cs @@ -15,12 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using ORTS.Common; using System; using System.Collections.Generic; using System.Linq; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using ORTS.Common; namespace Orts.Formats.OR { @@ -110,7 +110,7 @@ public class ActionContainer [JsonIgnore] public List SpecAuxActions; // Actions To Do during activity, like WP with specific location [JsonProperty("GenActions")] - public List> GenAuxActions; // Action To Do during activity, without specific location + public List> GenAuxActions; // Action To Do during activity, without specific location [JsonIgnore] protected List> GenFunctions; [JsonIgnore] @@ -274,7 +274,7 @@ public class AuxActionRef //public float RequiredDistance; //[JsonProperty("Param")] //public List Parameter; - + public enum AUX_ACTION { @@ -428,10 +428,10 @@ public static void Register(string key) } } - + public class AuxControlStopped : AuxActionRef { - public AuxControlStopped(bool isGeneric): //WorldLocation? location, float requiredSpeedMpS, bool isGeneric, int endSignalIndex = -1, AUX_ACTION actionType = AUX_ACTION.CONTROL_START, int delay = 2, float requiredDistance = 0, int duration = 10) : + public AuxControlStopped(bool isGeneric) : //WorldLocation? location, float requiredSpeedMpS, bool isGeneric, int endSignalIndex = -1, AUX_ACTION actionType = AUX_ACTION.CONTROL_START, int delay = 2, float requiredDistance = 0, int duration = 10) : base(AUX_ACTION.CONTROL_STOPPED, isGeneric) //location, requiredSpeedMpS, isGeneric, endSignalIndex, actionType, delay, requiredDistance) { } diff --git a/Source/Orts.Formats.OR/ClocksFile.cs b/Source/Orts.Formats.OR/ClocksFile.cs index 9912c8f761..718bd55934 100644 --- a/Source/Orts.Formats.OR/ClocksFile.cs +++ b/Source/Orts.Formats.OR/ClocksFile.cs @@ -15,14 +15,14 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Orts.Parsers.Msts; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Orts.Parsers.Msts; using JsonReader = Orts.Parsers.OR.JsonReader; namespace Orts.Formats.OR @@ -78,7 +78,7 @@ protected virtual bool TryParse(JsonReader item) ClockShape = new ClockShape(stringValue, null); ClockShapeList.Add(ClockShape); break; - + case "[].Name": // Parse the property with default value as invalid, so errors can be detected and the object rejected later. stringValue = item.AsString(stringValue); @@ -104,7 +104,7 @@ protected virtual bool TryParse(JsonReader item) break; default: - Trace.TraceWarning($"Unexpected entry \"{item.Path}\" found"); + Trace.TraceWarning($"Unexpected entry \"{item.Path}\" found"); return false; } return true; diff --git a/Source/Orts.Formats.OR/ContainerFile.cs b/Source/Orts.Formats.OR/ContainerFile.cs index 3097fb11c9..fc7a124b2d 100644 --- a/Source/Orts.Formats.OR/ContainerFile.cs +++ b/Source/Orts.Formats.OR/ContainerFile.cs @@ -15,11 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Text; using System.IO; using Microsoft.Xna.Framework; using Orts.Parsers.OR; @@ -62,8 +57,8 @@ bool TryParse(JsonReader item) public class ContainerParameters { public string Name; - public string ShapeFileName; - public string ContainerType; + public string ShapeFileName; + public string ContainerType; public Vector3 IntrinsicShapeOffset = new Vector3(0f, 1.17f, 0f); public float EmptyMassKG = -1; public float MaxMassWhenLoadedKG = -1; @@ -91,13 +86,13 @@ bool TryParse(JsonReader item) // restore public ContainerParameters(BinaryReader inf) { - // Overcast = inf.ReadSingle(); + // Overcast = inf.ReadSingle(); } // save public void Save(BinaryWriter outf) { -// outf.Write(Overcast); + // outf.Write(Overcast); } } } diff --git a/Source/Orts.Formats.OR/DrawUtility.cs b/Source/Orts.Formats.OR/DrawUtility.cs index 930c792cd5..6a9136ef60 100644 --- a/Source/Orts.Formats.OR/DrawUtility.cs +++ b/Source/Orts.Formats.OR/DrawUtility.cs @@ -15,10 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Orts.Formats.Msts; using System; using System.Collections.Generic; using System.Drawing; +using Orts.Formats.Msts; namespace Orts.Formats.OR { @@ -40,12 +40,12 @@ public static double FindDistanceToSegment(PointF pt, TrackSegment segment, out if (!segment.isCurved) { return FindDistanceToSegment(pt, - new AESegment (segment.associateSegment), + new AESegment(segment.associateSegment), out closest); } else { - return FindDistanceToCurve (pt, new AESegment (segment.associateSegment), out closest); + return FindDistanceToCurve(pt, new AESegment(segment.associateSegment), out closest); } } @@ -70,13 +70,13 @@ public static double FindDistanceToSegment(PointF pt, AESegment seg, out PointF if (t < 0) { - closest = new PointF (seg.startPoint.X, seg.startPoint.Y); + closest = new PointF(seg.startPoint.X, seg.startPoint.Y); dx = pt.X - seg.startPoint.X; dy = pt.Y - seg.startPoint.Y; } else if (t > 1) { - closest = new PointF (seg.endPoint.X, seg.endPoint.Y); + closest = new PointF(seg.endPoint.X, seg.endPoint.Y); dx = pt.X - seg.endPoint.X; dy = pt.Y - seg.endPoint.Y; } @@ -86,7 +86,7 @@ public static double FindDistanceToSegment(PointF pt, AESegment seg, out PointF dx = pt.X - closest.X; dy = pt.Y - closest.Y; } - double info = Math.Sqrt (dx * dx + dy * dy); + double info = Math.Sqrt(dx * dx + dy * dy); return info; } @@ -125,7 +125,7 @@ public static double FindDistanceToSegment(PointF pt, AESegment seg, out PointF float t2 = ((track.startPoint.X - segArea.startPoint.X) * dy12 + (segArea.startPoint.Y - track.startPoint.Y) * dx12) / -denominator; // Find the point of intersection. - intersection = new PointF (segArea.startPoint.X + dx12 * t1, segArea.startPoint.Y + dy12 * t1); + intersection = new PointF(segArea.startPoint.X + dx12 * t1, segArea.startPoint.Y + dy12 * t1); // The segments intersect if t1 and t2 are between 0 and 1. segments_intersect = ((t1 >= 0) && (t1 <= 1) && (t2 >= 0) && (t2 <= 1)); @@ -149,8 +149,8 @@ public static double FindDistanceToSegment(PointF pt, AESegment seg, out PointF t2 = 1; } - close_p1 = new PointF (segArea.startPoint.X + dx12 * t1, segArea.startPoint.Y + dy12 * t1); - close_p2 = new PointF (track.startPoint.X + dx34 * t2, track.startPoint.Y + dy34 * t2); + close_p1 = new PointF(segArea.startPoint.X + dx12 * t1, segArea.startPoint.Y + dy12 * t1); + close_p2 = new PointF(track.startPoint.X + dx34 * t2, track.startPoint.Y + dy34 * t2); } @@ -180,13 +180,13 @@ public static PointF FindIntersection(AESegment segArea, AESegment track) public static PointF FindStraightIntersection(AESegment segArea, AESegment track) { -//double Ax, double Ay, -//double Bx, double By, -//double Cx, double Cy, -//double Dx, double Dy, -//double *X, double *Y + //double Ax, double Ay, + //double Bx, double By, + //double Cx, double Cy, + //double Dx, double Dy, + //double *X, double *Y PointF pt = PointF.Empty; - double distAB, theCos, theSin, newX, ABpos ; + double distAB, theCos, theSin, newX, ABpos; double distCD, theCos2, theSin2; double ABX, ABY, ACX, ACY, ADX, ADY; double AX = segArea.startPoint.X; @@ -194,7 +194,7 @@ public static PointF FindStraightIntersection(AESegment segArea, AESegment track double CDX, CDY, angle1, angle2; // Fail if either line segment is zero-length. - if ((segArea.startPoint.X == segArea.endPoint.X && segArea.startPoint.Y == segArea.endPoint.Y) + if ((segArea.startPoint.X == segArea.endPoint.X && segArea.startPoint.Y == segArea.endPoint.Y) || (track.startPoint.X == track.endPoint.X && track.startPoint.Y == track.endPoint.Y)) return pt; @@ -204,7 +204,7 @@ public static PointF FindStraightIntersection(AESegment segArea, AESegment track (segArea.startPoint.X == track.endPoint.X && segArea.startPoint.Y == track.endPoint.Y) || (segArea.endPoint.X == track.endPoint.X && segArea.endPoint.Y == track.endPoint.Y)) { - return pt; + return pt; } // (1) Translate the system so that point A is on the origin. @@ -230,23 +230,23 @@ public static PointF FindStraightIntersection(AESegment segArea, AESegment track angle1 = Math.Acos(theCos) * 180 / Math.PI; // sup angle2 = Math.Acos(theCos2) * 180 / Math.PI; // sup newX = ACX * theCos + ACY * theSin; - ACY = ACY * theCos - ACX * theSin; + ACY = ACY * theCos - ACX * theSin; ACX = newX; newX = ADX * theCos + ADY * theSin; - ADY = ADY * theCos - ADX * theSin; + ADY = ADY * theCos - ADX * theSin; ADX = newX; if (Math.Abs(angle1 - angle2) < 5) // sup return pt; // sup // Fail if segment C-D doesn't cross line A-B. - if (ACY < 0 && ADY < 0 || ACY >= 0 && ADY >= 0) + if (ACY < 0 && ADY < 0 || ACY >= 0 && ADY >= 0) return pt; // (3) Discover the position of the intersection point along line A-B. ABpos = ADX + (ACX - ADX) * ADY / (ADY - ACY); // Fail if segment C-D crosses line A-B outside of segment A-B. - if (ABpos < 0 || ABpos > distAB) + if (ABpos < 0 || ABpos > distAB) return pt; // (4) Apply the discovered position to line A-B in the original coordinate system. @@ -379,7 +379,7 @@ <<<<<<< .mine >>>>>>> .r37 } - #endif +#endif public static PointF FindCurveIntersection(AESegment segArea, AESegment track) { PointF pointA = track.startPoint; @@ -415,19 +415,19 @@ public static PointF FindCurveIntersection(AESegment segArea, AESegment track) return PointF.Empty; } - public static double FindDistanceToCurve (PointF pt, AESegment segment, out PointF closest) + public static double FindDistanceToCurve(PointF pt, AESegment segment, out PointF closest) { double dist = 0; double savedDist = double.PositiveInfinity; PointF current = new PointF(0f, 0f); if (!segment.isCurved || segment.radius == 0) - return FindDistanceToSegment (pt, segment, out closest); + return FindDistanceToSegment(pt, segment, out closest); PointF pointA = segment.startPoint; PointF pointB = segment.endPoint; PointF pointCenter = segment.center; closest = current; - for (int i = 0; i <= segment.step; i++) + for (int i = 0; i <= segment.step; i++) { double sub_angle = ((float)i / segment.step) * segment.angleTot; double infox = (1 - Math.Cos(sub_angle)) * (-pointB.X); @@ -445,7 +445,7 @@ public static double FindDistanceToCurve (PointF pt, AESegment segment, out Poin closest = current; } } - savedDist = Math.Round (savedDist, 1); + savedDist = Math.Round(savedDist, 1); return savedDist; } @@ -471,7 +471,7 @@ public static bool PointInPolygon(PointF point, List poly return oddNodes; } - public static int getDirection (TrackNode fromNode, TrackNode toNode) + public static int getDirection(TrackNode fromNode, TrackNode toNode) { foreach (var pin in fromNode.TrPins) { diff --git a/Source/Orts.Formats.OR/ExtCarSpawnerFile.cs b/Source/Orts.Formats.OR/ExtCarSpawnerFile.cs index d2ae1260d8..b9d41700ca 100644 --- a/Source/Orts.Formats.OR/ExtCarSpawnerFile.cs +++ b/Source/Orts.Formats.OR/ExtCarSpawnerFile.cs @@ -15,11 +15,7 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections; using System.Collections.Generic; -using System.IO; -using Microsoft.Xna.Framework; using Orts.Formats.Msts; using Orts.Parsers.Msts; @@ -41,7 +37,7 @@ public ExtCarSpawnerFile(string filePath, string shapePath, List else { stf.MustMatch("("); - stf.MustMatch("ListName"); + stf.MustMatch("ListName"); listName = stf.ReadStringBlock(null); var carSpawnerBlock = new CarSpawnerBlock(stf, shapePath, carSpawnerLists, listName); } diff --git a/Source/Orts.Formats.OR/GlobalItem.cs b/Source/Orts.Formats.OR/GlobalItem.cs index 6f9ec3a66c..40160049a1 100644 --- a/Source/Orts.Formats.OR/GlobalItem.cs +++ b/Source/Orts.Formats.OR/GlobalItem.cs @@ -15,11 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Drawing; using Newtonsoft.Json; using Orts.Formats.Msts; using ORTS.Common; -using System; -using System.Drawing; namespace Orts.Formats.OR { diff --git a/Source/Orts.Formats.OR/LoadStationsPopulationFile.cs b/Source/Orts.Formats.OR/LoadStationsPopulationFile.cs index f9d06617fa..2354010377 100644 --- a/Source/Orts.Formats.OR/LoadStationsPopulationFile.cs +++ b/Source/Orts.Formats.OR/LoadStationsPopulationFile.cs @@ -16,13 +16,7 @@ // along with Open Rails. If not, see . using System; -using System.Collections; using System.Collections.Generic; -using System.Diagnostics; -using System.Text; -using System.IO; -using Microsoft.Xna.Framework; -using Orts.Formats.Msts; using Orts.Parsers.OR; using ORTS.Common; diff --git a/Source/Orts.Formats.OR/MSTSCoord.cs b/Source/Orts.Formats.OR/MSTSCoord.cs index f3027dbca7..07d8e77315 100644 --- a/Source/Orts.Formats.OR/MSTSCoord.cs +++ b/Source/Orts.Formats.OR/MSTSCoord.cs @@ -15,11 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Drawing; using Microsoft.Xna.Framework; using Orts.Formats.Msts; using ORTS.Common; -using System; -using System.Drawing; namespace Orts.Formats.OR { @@ -163,7 +163,7 @@ public MSTSCoord(PointF point) int tileY = ((int)(point.Y / 2048f)); X = (float)((point.X) % 2048f); Y = (float)((point.Y) % 2048f); - if (signX < 0) + if (signX < 0) { tileX -= 1; X += 2048f; @@ -209,13 +209,13 @@ public override bool Equals(object obj) if (GetType() != obj.GetType()) return false; - MSTSCoord other = (MSTSCoord) obj; + MSTSCoord other = (MSTSCoord)obj; return (this.X == other.X && this.Y == other.Y && this.TileX == other.TileX && this.TileY == other.TileY); } public static bool operator ==(MSTSCoord x, MSTSCoord y) { - return Object.Equals(x, y); + return Object.Equals(x, y); } public static bool operator !=(MSTSCoord x, MSTSCoord y) diff --git a/Source/Orts.Formats.OR/MSTSData.cs b/Source/Orts.Formats.OR/MSTSData.cs index 5a2d12a8f4..912bc6dd91 100644 --- a/Source/Orts.Formats.OR/MSTSData.cs +++ b/Source/Orts.Formats.OR/MSTSData.cs @@ -15,8 +15,8 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Orts.Formats.Msts; using System.IO; +using Orts.Formats.Msts; namespace Orts.Formats.OR { @@ -30,7 +30,7 @@ public class MSTSData public string MstsPath { get; set; } public AESignals Signals { get; protected set; } - public MSTSData (string mstsPath, string Route) + public MSTSData(string mstsPath, string Route) { MstsPath = mstsPath; RoutePath = Route; @@ -57,7 +57,7 @@ public MSTSData (string mstsPath, string Route) TSectionDat = new TrackSectionsFile(MstsPath + @"\GLOBAL\TSECTION.DAT"); if (File.Exists(RoutePath + @"\TSECTION.DAT")) TSectionDat.AddRouteTSectionDatFile(RoutePath + @"\TSECTION.DAT"); - Signals = new AESignals (this, SIGCFG); + Signals = new AESignals(this, SIGCFG); } } } \ No newline at end of file diff --git a/Source/Orts.Formats.OR/RouteConfigurationFile.cs b/Source/Orts.Formats.OR/RouteConfigurationFile.cs index 9bbcbe53e3..c0a7f273de 100644 --- a/Source/Orts.Formats.OR/RouteConfigurationFile.cs +++ b/Source/Orts.Formats.OR/RouteConfigurationFile.cs @@ -15,12 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Newtonsoft.Json; -using Orts.Formats.Msts; -using ORTS.Common; using System.Collections.Generic; using System.Drawing; using System.IO; +using Newtonsoft.Json; +using Orts.Formats.Msts; +using ORTS.Common; namespace Orts.Formats.OR { @@ -220,47 +220,47 @@ static public ORRouteConfig DeserializeJSON(string fileName, TypeEditor interfac fileName += ".cfg.json"; //try //{ - // TODO: This code is BROKEN. It loads and saves file formats with internal type information included, which causes breakages if the types are moved. This is not acceptable for public, shared data. - //JsonSerializer serializer = new JsonSerializer(); - //using (StreamReader sr = new StreamReader(fileName)) - //{ - // ORRouteConfig orRouteConfig = JsonConvert.DeserializeObject((string)sr.ReadToEnd(), new JsonSerializerSettings - // { - // PreserveReferencesHandling = PreserveReferencesHandling.Objects, - // TypeNameHandling = TypeNameHandling.Auto - // }); - // p = orRouteConfig; - - // foreach (var item in p.routeItems) - // { - // p.AllItems.Add(item); - // item.alignEdition(interfaceType, null); - // if (item.GetType() == typeof(StationItem)) - // { - // if (((StationItem)item).stationArea.Count > 0) - // { - // foreach (var item2 in ((StationItem)item).stationArea) - // { - // ((StationAreaItem)item2).alignEdition(interfaceType, item); - // } - // ((StationItem)item).areaCompleted = true; - // } - // } - // else if (item.GetType() == typeof(AEBufferItem)) - // { - // } - // } - // //orRouteConfig.ReduceItems(); - //} - // + // TODO: This code is BROKEN. It loads and saves file formats with internal type information included, which causes breakages if the types are moved. This is not acceptable for public, shared data. + //JsonSerializer serializer = new JsonSerializer(); + //using (StreamReader sr = new StreamReader(fileName)) + //{ + // ORRouteConfig orRouteConfig = JsonConvert.DeserializeObject((string)sr.ReadToEnd(), new JsonSerializerSettings + // { + // PreserveReferencesHandling = PreserveReferencesHandling.Objects, + // TypeNameHandling = TypeNameHandling.Auto + // }); + // p = orRouteConfig; + + // foreach (var item in p.routeItems) + // { + // p.AllItems.Add(item); + // item.alignEdition(interfaceType, null); + // if (item.GetType() == typeof(StationItem)) + // { + // if (((StationItem)item).stationArea.Count > 0) + // { + // foreach (var item2 in ((StationItem)item).stationArea) + // { + // ((StationAreaItem)item2).alignEdition(interfaceType, item); + // } + // ((StationItem)item).areaCompleted = true; + // } + // } + // else if (item.GetType() == typeof(AEBufferItem)) + // { + // } + // } + // //orRouteConfig.ReduceItems(); + //} + // //} //catch (IOException) //{ - p = new ORRouteConfig(); - p.FileName = Path.GetFileName(fileName); - p.RoutePath = Path.GetDirectoryName(fileName); - p.RouteName = ""; - p.toSave = true; + p = new ORRouteConfig(); + p.FileName = Path.GetFileName(fileName); + p.RoutePath = Path.GetDirectoryName(fileName); + p.RouteName = ""; + p.toSave = true; //} return p; @@ -435,7 +435,7 @@ static public ORConfig LoadConfig(string dataFolder, ORConfig mainConfig = null) currentProgFolder = Path.GetDirectoryName(currentProgFolder); string completeFileName = Path.Combine(currentProgFolder, "Open Rails"); if (!Directory.Exists(completeFileName)) Directory.CreateDirectory(completeFileName); - completeFileName = Path.Combine (completeFileName, "ORConfig.json"); + completeFileName = Path.Combine(completeFileName, "ORConfig.json"); ORConfig loaded = DeserializeJSON(completeFileName); return loaded; } diff --git a/Source/Orts.Formats.OR/RouteItems.cs b/Source/Orts.Formats.OR/RouteItems.cs index 70492542e3..9fe926246f 100644 --- a/Source/Orts.Formats.OR/RouteItems.cs +++ b/Source/Orts.Formats.OR/RouteItems.cs @@ -15,13 +15,13 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections.Generic; +using System.Drawing; using Microsoft.Xna.Framework; using Newtonsoft.Json; using Orts.Formats.Msts; using ORTS.Common; -using System; -using System.Collections.Generic; -using System.Drawing; namespace Orts.Formats.OR { @@ -340,7 +340,7 @@ public class SideItem : GlobalItem { public string Name; public float sizeSiding; - public TrItem trItem{ get; protected set; } + public TrItem trItem { get; protected set; } public TrItem.trItemType type { get { return trItem.ItemType; } protected set { } } public float icoAngle; public int typeSiding; @@ -349,7 +349,7 @@ public class SideItem : GlobalItem public class SideStartItem : SideItem { public SideEndItem endSiding { get; set; } - + /// /// The underlying track sideItem. /// @@ -363,7 +363,7 @@ public SideStartItem(TrackSegment trSegment, TrItem item) else if (item.ItemType == TrItem.trItemType.trSIDING) typeSiding = (int)TypeSiding.SIDING_START; typeItem = (int)TypeItem.SIDING_START; - + trItem = item; Name = trItem.ItemName; Location = new PointF(trItem.TileX * 2048f + trItem.X, trItem.TileZ * 2048f + trItem.Z); diff --git a/Source/Orts.Formats.OR/TimetableFile.cs b/Source/Orts.Formats.OR/TimetableFile.cs index 54c798a5c2..23d01e02c1 100644 --- a/Source/Orts.Formats.OR/TimetableFile.cs +++ b/Source/Orts.Formats.OR/TimetableFile.cs @@ -29,11 +29,11 @@ // #direction : Up or Down // -using GNU.Gettext; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; +using GNU.Gettext; namespace Orts.Formats.OR { diff --git a/Source/Orts.Formats.OR/TimetableGroupFile.cs b/Source/Orts.Formats.OR/TimetableGroupFile.cs index 19bf6022d8..2d3af4417d 100644 --- a/Source/Orts.Formats.OR/TimetableGroupFile.cs +++ b/Source/Orts.Formats.OR/TimetableGroupFile.cs @@ -82,7 +82,7 @@ void MultiTTFilePreliminaryRead(String filePath, String directory, StreamReader /// class TimetableGroupFile /// extracts filenames from multiTTfile, extents names to full path /// - + public class TimetableGroupFile { public List TTFiles = new List(); diff --git a/Source/Orts.Formats.OR/TrackCircuitElement.cs b/Source/Orts.Formats.OR/TrackCircuitElement.cs index 09a8da264b..cfb57acd94 100644 --- a/Source/Orts.Formats.OR/TrackCircuitElement.cs +++ b/Source/Orts.Formats.OR/TrackCircuitElement.cs @@ -34,7 +34,7 @@ public TrackCircuitElement(GlobalItem item, float position) public class TrackCircuitElementConnector : TrackCircuitElement { public TrackCircuitElementConnector(GlobalItem item, float position) - : base (item, position) + : base(item, position) { info = TypeItem.STATION_CONNECTOR; } diff --git a/Source/Orts.Formats.OR/TrackNodeAE.cs b/Source/Orts.Formats.OR/TrackNodeAE.cs index 1582adf48f..8ee007d2ba 100644 --- a/Source/Orts.Formats.OR/TrackNodeAE.cs +++ b/Source/Orts.Formats.OR/TrackNodeAE.cs @@ -15,8 +15,8 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Orts.Formats.Msts; using System.Linq; +using Orts.Formats.Msts; namespace Orts.Formats.OR { diff --git a/Source/Orts.Formats.OR/WeatherFile.cs b/Source/Orts.Formats.OR/WeatherFile.cs index 3e95d41578..b23e3f190f 100644 --- a/Source/Orts.Formats.OR/WeatherFile.cs +++ b/Source/Orts.Formats.OR/WeatherFile.cs @@ -15,13 +15,8 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections; using System.Collections.Generic; -using System.Diagnostics; -using System.Text; using System.IO; -using Microsoft.Xna.Framework; using Orts.Parsers.OR; namespace Orts.Formats.OR @@ -275,7 +270,7 @@ public WeatherSettingFog(JsonReader json) protected override bool TryParse(JsonReader item) { - if (base.TryParse(item)) return true; + if (base.TryParse(item)) return true; switch (item.Path) { case "FogVisibility": FogVisibilityM = item.AsFloat(FogVisibilityM); break; diff --git a/Source/Orts.Parsers.Msts/Interpolator.cs b/Source/Orts.Parsers.Msts/Interpolator.cs index 9dd8a23d19..b4a48df943 100644 --- a/Source/Orts.Parsers.Msts/Interpolator.cs +++ b/Source/Orts.Parsers.Msts/Interpolator.cs @@ -47,7 +47,7 @@ public Interpolator(Interpolator other) { X = other.X; Y = other.Y; - Y2= other.Y2; + Y2 = other.Y2; Size = other.Size; } public Interpolator(STFReader stf) @@ -58,7 +58,7 @@ public Interpolator(STFReader stf) list.Add(stf.ReadFloat(STFReader.UNITS.Any, null)); if (list.Count % 2 == 1) STFException.TraceWarning(stf, "Ignoring extra odd value in Interpolator list."); - int n = list.Count/2; + int n = list.Count / 2; if (n < 2) STFException.TraceWarning(stf, "Interpolator must have at least two value pairs."); X = new float[n]; @@ -66,8 +66,8 @@ public Interpolator(STFReader stf) Size = n; for (int i = 0; i < n; i++) { - X[i] = list[2*i]; - Y[i] = list[2*i+1]; + X[i] = list[2 * i]; + Y[i] = list[2 * i + 1]; if (i > 0 && X[i - 1] >= X[i]) STFException.TraceWarning(stf, "Interpolator x values must be increasing."); } @@ -79,30 +79,30 @@ public Interpolator(STFReader stf) if (x < X[PrevIndex] || x > X[PrevIndex + 1]) { if (x < X[1]) - PrevIndex= 0; - else if (x > X[Size-2]) - PrevIndex= Size-2; + PrevIndex = 0; + else if (x > X[Size - 2]) + PrevIndex = Size - 2; else { - int i= 0; - int j= Size-1; - while (j-i > 1) + int i = 0; + int j = Size - 1; + while (j - i > 1) { - int k= (i+j)/2; + int k = (i + j) / 2; if (X[k] > x) - j= k; + j = k; else - i= k; + i = k; } - PrevIndex= i; + PrevIndex = i; } } - float d= X[PrevIndex+1] - X[PrevIndex]; - float a= (X[PrevIndex+1]-x)/d; - float b= (x-X[PrevIndex])/d; - float y= a*Y[PrevIndex] + b*Y[PrevIndex+1]; - if (Y2 != null && a>=0 && b>=0) - y+= ((a*a*a-a)*Y2[PrevIndex] + (b*b*b-b)*Y2[PrevIndex+1])*d*d/6; + float d = X[PrevIndex + 1] - X[PrevIndex]; + float a = (X[PrevIndex + 1] - x) / d; + float b = (x - X[PrevIndex]) / d; + float y = a * Y[PrevIndex] + b * Y[PrevIndex + 1]; + if (Y2 != null && a >= 0 && b >= 0) + y += ((a * a * a - a) * Y2[PrevIndex] + (b * b * b - b) * Y2[PrevIndex + 1]) * d * d / 6; return y; } set @@ -113,7 +113,7 @@ public Interpolator(STFReader stf) } } public float MinX() { return X[0]; } - public float MaxX() { return X[Size-1]; } + public float MaxX() { return X[Size - 1]; } public float MaxY() { float x; @@ -121,10 +121,10 @@ public float MaxY() } public float MaxY(out float x) { - int maxi= 0; - for (int i=1; i=0; i--) - Y2[i]= Y2[i]*Y2[i+1] + u[i]; + for (int i = Size - 2; i >= 0; i--) + Y2[i] = Y2[i] * Y2[i + 1] + u[i]; } - + // restore game state public Interpolator(BinaryReader inf) { @@ -229,7 +229,7 @@ public void Save(BinaryWriter outf) public void test(string label, int n) { - float dx = (MaxX() - MinX()) / (n-1); + float dx = (MaxX() - MinX()) / (n - 1); for (int i = 0; i < n; i++) { float x = MinX() + i * dx; @@ -480,9 +480,9 @@ public void ScaleX(float factor) public bool AcceptsNegativeValues() { return HasNegativeValues; } } - /// - /// two dimensional Interpolated table lookup - Generic - /// + /// + /// two dimensional Interpolated table lookup - Generic + /// public class Interpolator2D { float[] X; // must be in increasing order diff --git a/Source/Orts.Parsers.Msts/SBR.cs b/Source/Orts.Parsers.Msts/SBR.cs index 7fab3aa00f..23b0df0b3c 100644 --- a/Source/Orts.Parsers.Msts/SBR.cs +++ b/Source/Orts.Parsers.Msts/SBR.cs @@ -15,13 +15,13 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using ICSharpCode.SharpZipLib.Zip.Compression.Streams; -using Microsoft.Xna.Framework; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Text; +using ICSharpCode.SharpZipLib.Zip.Compression.Streams; +using Microsoft.Xna.Framework; namespace Orts.Parsers.Msts { @@ -132,8 +132,8 @@ public Vector3 ReadVector3() public void VerifyID(TokenID desiredID) { - if (ID != desiredID) - TraceInformation("Expected block " + desiredID + "; got " + ID); + if (ID != desiredID) + TraceInformation("Expected block " + desiredID + "; got " + ID); } /// diff --git a/Source/Orts.Parsers.Msts/STFReader.cs b/Source/Orts.Parsers.Msts/STFReader.cs index 838e403255..a226058534 100644 --- a/Source/Orts.Parsers.Msts/STFReader.cs +++ b/Source/Orts.Parsers.Msts/STFReader.cs @@ -21,7 +21,6 @@ // Note: the SBR classes are more general in that they are capable of reading // both unicode and binary compressed data files. -using Microsoft.Xna.Framework; using System; using System.Collections.Generic; using System.Diagnostics; @@ -29,6 +28,7 @@ using System.IO; using System.Linq; using System.Text; +using Microsoft.Xna.Framework; #region Original STFreader #if !NEW_READER @@ -1192,7 +1192,8 @@ public Color ReadColorBlock(Color? defaultValue) return new Color() { PackedValue = STFReader.SwapColorBytes(hex) }; } - static uint SwapColorBytes(uint color) { + static uint SwapColorBytes(uint color) + { return (color & 0xFF00FF00) + (byte)(color >> 16) + (uint)((byte)color << 16); } @@ -1725,7 +1726,7 @@ private string ReadItem(bool skip_mode, bool string_mode) int c; #region Skip past any leading whitespace characters - for (;;) + for (; ; ) { c = ReadChar(); if (IsEof(c)) return UpdateTreeAndStepBack(""); @@ -1748,7 +1749,7 @@ private string ReadItem(bool skip_mode, bool string_mode) else if ((!skip_mode && !string_mode) && ((c == '#') || (c == '_'))) { #region Move on to a whitespace so we can pick up any token starting with a # - for (;;) + for (; ; ) { c = PeekChar(); if ((c == '(') || (c == ')')) break; @@ -1779,7 +1780,7 @@ private string ReadItem(bool skip_mode, bool string_mode) #region Build Quoted Items - including append operations else if (c == '"') { - for (;;) + for (; ; ) { c = ReadChar(); if (IsEof(c)) @@ -1828,7 +1829,7 @@ private string ReadItem(bool skip_mode, bool string_mode) else if (c != -1) { itemBuilder.Append((char)c); - for (;;) + for (; ; ) { c = PeekChar(); if ((c == '(') || (c == ')')) break; diff --git a/Source/Orts.Parsers.Msts/TokenID.cs b/Source/Orts.Parsers.Msts/TokenID.cs index 0f1ac212f8..ebad399e99 100644 --- a/Source/Orts.Parsers.Msts/TokenID.cs +++ b/Source/Orts.Parsers.Msts/TokenID.cs @@ -299,7 +299,7 @@ public enum TokenID : uint Platform = 360, LevelCr = 362, Speedpost = 364, - Hazard=365, + Hazard = 365, @@ -1691,12 +1691,12 @@ public enum TokenID : uint // these assigned ID's are arbitrary - I haven't seen them in a compressed MSTS W file yet // TODO determine proper ID from a compressed world file - CarSpawner, - Siding, + CarSpawner, + Siding, Dyntrack, Transfer, Gantry, - Pickup, + Pickup, Wagon, Engine, @@ -1707,7 +1707,7 @@ public enum TokenID : uint ORTSPantographToggle3, ORTSPantographToggle4, // ORTS Specific for container stations - ORTSCraneSound, + ORTSCraneSound, ORTSMaxStackedContainers, ORTSStackLocations, ORTSStackLocationsLength, diff --git a/Source/Orts.Parsers.OR/JsonReader.cs b/Source/Orts.Parsers.OR/JsonReader.cs index 660b6d6882..df2d64cfc6 100644 --- a/Source/Orts.Parsers.OR/JsonReader.cs +++ b/Source/Orts.Parsers.OR/JsonReader.cs @@ -18,14 +18,13 @@ // Use this define to diagnose issues in the JSON reader below. //#define DEBUG_JSON_READER -using Microsoft.Xna.Framework; -using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; -using System.Linq; using System.Text; +using Microsoft.Xna.Framework; +using Newtonsoft.Json; namespace Orts.Parsers.OR { diff --git a/Source/Orts.Parsers.OR/TimetableReader.cs b/Source/Orts.Parsers.OR/TimetableReader.cs index 395dbe69af..8d219d4871 100644 --- a/Source/Orts.Parsers.OR/TimetableReader.cs +++ b/Source/Orts.Parsers.OR/TimetableReader.cs @@ -16,7 +16,6 @@ // along with Open Rails. If not, see . using System.Collections.Generic; -using System.Diagnostics; using System.IO; using System.Linq; diff --git a/Source/Orts.Simulation/Common/CommandLog.cs b/Source/Orts.Simulation/Common/CommandLog.cs index 6f34a337d0..a44554fcb1 100644 --- a/Source/Orts.Simulation/Common/CommandLog.cs +++ b/Source/Orts.Simulation/Common/CommandLog.cs @@ -17,26 +17,28 @@ // This file is the responsibility of the 3D & Environment Team. -using Orts.Simulation; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Runtime.Serialization.Formatters.Binary; +using Orts.Simulation; namespace Orts.Common { /// /// User may specify an automatic pause in the replay at a time measured from the end of the replay. /// - public enum ReplayPauseState { + public enum ReplayPauseState + { Before, Due, // Set by CommandLog.Replay(), tested by Viewer.Update() During, Done }; - public class CommandLog { + public class CommandLog + { public List CommandList = new List(); public Simulator Simulator { get; set; } @@ -52,7 +54,8 @@ public class CommandLog { /// /// Preferred constructor. /// - public CommandLog(Simulator simulator) { + public CommandLog(Simulator simulator) + { Simulator = simulator; } @@ -60,11 +63,12 @@ public class CommandLog { /// When a command is created, it adds itself to the log. /// /// - public void CommandAdd( ICommand command ) { + public void CommandAdd(ICommand command) + { command.Time = Simulator.ClockTime; // Note time that command was issued - CommandList.Add( command ); + CommandList.Add(command); } - + /// /// Replays any commands that have become due. /// Issues commands from the replayCommandList at the same time that they were originally issued. @@ -72,74 +76,97 @@ public class CommandLog { /// Assumes replayCommandList is already sorted by time. /// /// - public void Update( List replayCommandList ) { + public void Update(List replayCommandList) + { double elapsedTime = Simulator.ClockTime; - if( PauseState == ReplayPauseState.Before ) { - if( elapsedTime > ReplayEndsAt - Simulator.Settings.ReplayPauseBeforeEndS ) { + if (PauseState == ReplayPauseState.Before) + { + if (elapsedTime > ReplayEndsAt - Simulator.Settings.ReplayPauseBeforeEndS) + { PauseState = ReplayPauseState.Due; // For Viewer.Update() to detect and pause. } } - if( replayCommandList.Count > 0 ) { + if (replayCommandList.Count > 0) + { var c = replayCommandList[0]; // Without a small margin, an activity event can pause simulator just before the ResumeActicityCommand is due, // so resume never happens. double margin = (Simulator.Paused) ? 0.5 : 0; // margin of 0.5 seconds - if( elapsedTime >= c.Time - margin ) { - if( c is PausedCommand ) { + if (elapsedTime >= c.Time - margin) + { + if (c is PausedCommand) + { // Wait for the right duration and then action the command. // ActivityCommands need dedicated code as the clock is no longer advancing. - if( resumeTime == null ) { + if (resumeTime == null) + { var resumeCommand = (PausedCommand)c; - resumeTime = DateTime.Now.AddSeconds(resumeCommand.PauseDurationS ); - } else { - if( DateTime.Now >= resumeTime ) { + resumeTime = DateTime.Now.AddSeconds(resumeCommand.PauseDurationS); + } + else + { + if (DateTime.Now >= resumeTime) + { resumeTime = null; // cancel trigger - ReplayCommand( elapsedTime, replayCommandList, c ); + ReplayCommand(elapsedTime, replayCommandList, c); } } - } else { + } + else + { // When the player uses a camera command during replay, replay continues but any camera commands in the // replayCommandList are skipped until the player pauses and exit from the Quit Menu. // This allows some editing of the camera during a replay. - if (!(c is CameraCommand && CameraReplaySuspended)) { + if (!(c is CameraCommand && CameraReplaySuspended)) + { ReplayCommand(elapsedTime, replayCommandList, c); } completeTime = elapsedTime + completeDelayS; // Postpone the time for "Replay complete" message } } - } else { - if( completeTime != 0 && elapsedTime > completeTime ) { + } + else + { + if (completeTime != 0 && elapsedTime > completeTime) + { completeTime = 0; // Reset trigger so this only happens once ReplayComplete = true; // Flag seen by Viewer3D which announces "Replay complete". } } } - private void ReplayCommand( double elapsedTime, List replayCommandList, ICommand c ) { + private void ReplayCommand(double elapsedTime, List replayCommandList, ICommand c) + { c.Redo(); // Action the command - CommandList.Add( c ); // Add to the log of commands - replayCommandList.RemoveAt( 0 ); // Remove it from the head of the replay list + CommandList.Add(c); // Add to the log of commands + replayCommandList.RemoveAt(0); // Remove it from the head of the replay list } /// /// Copies the command objects from the log into the file specified, first creating the file. /// /// - public void SaveLog( string filePath ) { + public void SaveLog(string filePath) + { Stream stream = null; - try { - stream = new FileStream( filePath, FileMode.Create ); + try + { + stream = new FileStream(filePath, FileMode.Create); BinaryFormatter formatter = new BinaryFormatter(); // Re-sort based on time as tests show that some commands are deferred. - CommandList.Sort( ( x, y ) => x.Time.CompareTo( y.Time ) ); - formatter.Serialize( stream, CommandList ); - } catch( IOException ) { + CommandList.Sort((x, y) => x.Time.CompareTo(y.Time)); + formatter.Serialize(stream, CommandList); + } + catch (IOException) + { // Do nothing but warn, ignoring errors. - Trace.TraceWarning( "SaveLog error writing command log " + filePath ); - } finally { - if( stream != null ) + Trace.TraceWarning("SaveLog error writing command log " + filePath); + } + finally + { + if (stream != null) { stream.Close(); Trace.WriteLine("\nList of commands to replay saved"); @@ -151,23 +178,30 @@ public class CommandLog { /// Copies the command objects from the file specified into the log, replacing the log's contents. /// /// - public void LoadLog( string filePath ) { + public void LoadLog(string filePath) + { Stream stream = null; - try { - stream = new FileStream( filePath, FileMode.Open ); + try + { + stream = new FileStream(filePath, FileMode.Open); BinaryFormatter formatter = new BinaryFormatter(); - CommandList = (List)formatter.Deserialize( stream ); - } catch( IOException ) { + CommandList = (List)formatter.Deserialize(stream); + } + catch (IOException) + { // Do nothing but warn, ignoring errors. - Trace.TraceWarning( "LoadLog error reading command log " + filePath ); - } finally { - if( stream != null ) { stream.Close(); } + Trace.TraceWarning("LoadLog error reading command log " + filePath); + } + finally + { + if (stream != null) { stream.Close(); } } } - public static void ReportReplayCommands( List list ) { - Trace.WriteLine( "\nList of commands to replay:" ); - foreach( var c in list ) { c.Report(); } + public static void ReportReplayCommands(List list) + { + Trace.WriteLine("\nList of commands to replay:"); + foreach (var c in list) { c.Report(); } } } } diff --git a/Source/Orts.Simulation/Common/Commands.cs b/Source/Orts.Simulation/Common/Commands.cs index 5e47dc944a..674fad1341 100644 --- a/Source/Orts.Simulation/Common/Commands.cs +++ b/Source/Orts.Simulation/Common/Commands.cs @@ -17,6 +17,9 @@ // This file is the responsibility of the 3D & Environment Team. +using System; +using System.Diagnostics; // Used by Trace.Warnings +using System.IO; using Orts.Simulation; using Orts.Simulation.Physics; using Orts.Simulation.RollingStocks; @@ -24,9 +27,6 @@ using Orts.Simulation.RollingStocks.SubSystems.PowerSupplies; using ORTS.Common; using ORTS.Scripting.Api; -using System; -using System.Diagnostics; // Used by Trace.Warnings -using System.IO; namespace Orts.Common { @@ -178,85 +178,103 @@ public CameraCommand(CommandLog log) } [Serializable()] - public sealed class SaveCommand : Command { + public sealed class SaveCommand : Command + { public string FileStem; - public SaveCommand( CommandLog log, string fileStem ) - : base( log ){ + public SaveCommand(CommandLog log, string fileStem) + : base(log) + { this.FileStem = fileStem; Redo(); } - public override void Redo() { + public override void Redo() + { // Redo does nothing as SaveCommand is just a marker and saves the fileStem but is not used during replay to redo the save. // Report(); } - public override string ToString() { + public override string ToString() + { return base.ToString() + " to file \"" + FileStem + ".replay\""; } } // Direction [Serializable()] - public sealed class ReverserCommand : BooleanCommand { + public sealed class ReverserCommand : BooleanCommand + { public static MSTSLocomotive Receiver { get; set; } - public ReverserCommand( CommandLog log, bool toState ) - : base( log, toState ) { + public ReverserCommand(CommandLog log, bool toState) + : base(log, toState) + { Redo(); } - public override void Redo() { - if( ToState ) { - Receiver.StartReverseIncrease( null ); - } else { - Receiver.StartReverseDecrease( null ); + public override void Redo() + { + if (ToState) + { + Receiver.StartReverseIncrease(null); + } + else + { + Receiver.StartReverseDecrease(null); } // Report(); } - public override string ToString() { + public override string ToString() + { return base.ToString() + " - " + (ToState ? "step forward" : "step back"); } } [Serializable()] - public sealed class ContinuousReverserCommand : ContinuousCommand { + public sealed class ContinuousReverserCommand : ContinuousCommand + { public static MSTSSteamLocomotive Receiver { get; set; } - public ContinuousReverserCommand( CommandLog log, bool toState, float? target, double startTime ) - : base( log, toState, target, startTime ) { + public ContinuousReverserCommand(CommandLog log, bool toState, float? target, double startTime) + : base(log, toState, target, startTime) + { Redo(); } - public override void Redo() { + public override void Redo() + { if (Receiver == null) return; - Receiver.ReverserChangeTo( ToState, Target ); + Receiver.ReverserChangeTo(ToState, Target); // Report(); } } // Power : Raise/lower pantograph [Serializable()] - public sealed class PantographCommand : BooleanCommand { + public sealed class PantographCommand : BooleanCommand + { public static MSTSLocomotive Receiver { get; set; } private int item; - public PantographCommand( CommandLog log, int item, bool toState ) - : base( log, toState ) { + public PantographCommand(CommandLog log, int item, bool toState) + : base(log, toState) + { this.item = item; Redo(); } - public override void Redo() { + public override void Redo() + { if (Receiver != null && Receiver.Train != null) { Receiver.Train.SignalEvent((ToState ? PowerSupplyEvent.RaisePantograph : PowerSupplyEvent.LowerPantograph), item); } } - public override string ToString() { + public override string ToString() + { return base.ToString() + " - " + (ToState ? "raise" : "lower") + ", item = " + item.ToString(); } } @@ -1144,7 +1162,7 @@ public override void Redo() Receiver.SignalEvent(Event.LightSwitchToggle); break; } - + } else { diff --git a/Source/Orts.Simulation/Common/ErrorLogger.cs b/Source/Orts.Simulation/Common/ErrorLogger.cs index ef4c344a3b..e53032d6df 100644 --- a/Source/Orts.Simulation/Common/ErrorLogger.cs +++ b/Source/Orts.Simulation/Common/ErrorLogger.cs @@ -128,7 +128,7 @@ void TraceEventInternal(TraceEventCache eventCache, string source, TraceEventTyp var errorLevel = (int)Math.Round(Math.Log((int)eventType) / Math.Log(2)); if (errorLevel < Counts.Length) Counts[errorLevel]++; - + // Event is less important than error (and critical) and we're logging only errors... bail. if (eventType > TraceEventType.Error && OnlyErrors) return; diff --git a/Source/Orts.Simulation/Common/Events.cs b/Source/Orts.Simulation/Common/Events.cs index 0396ddc9f1..73594b1520 100644 --- a/Source/Orts.Simulation/Common/Events.cs +++ b/Source/Orts.Simulation/Common/Events.cs @@ -81,8 +81,8 @@ public enum Event EngineBrakeChange, EngineBrakePressureDecrease, EngineBrakePressureIncrease, - EnginePowerOff, - EnginePowerOn, + EnginePowerOff, + EnginePowerOn, FireboxDoorChange, FireboxDoorOpen, FireboxDoorClose, @@ -109,8 +109,8 @@ public enum Event LightSwitchToggle, MasterKeyOff, MasterKeyOn, - MirrorClose, - MirrorOpen, + MirrorClose, + MirrorOpen, Pantograph1Down, PantographToggle, Pantograph1Up, @@ -142,7 +142,7 @@ public enum Event WaterInjector2Off, WaterInjector2On, BlowdownValveToggle, - SteamHeatChange, + SteamHeatChange, SteamPulse1, SteamPulse2, SteamPulse3, @@ -372,7 +372,7 @@ public static Event From(Source source, int eventID) case 104: return Event.ReverserToNeutral; // reversed moved to neutral case 105: return Event.DoorOpen; // door opened; propagated to all locos and wagons of the consist case 106: return Event.DoorClose; // door closed; propagated to all locos and wagons of the consist - case 107: return Event.MirrorOpen; + case 107: return Event.MirrorOpen; case 108: return Event.MirrorClose; case 109: return Event.TrainControlSystemInfo1; case 110: return Event.TrainControlSystemInfo2; diff --git a/Source/Orts.Simulation/Common/Math.cs b/Source/Orts.Simulation/Common/Math.cs index 835b831ecd..1c40a8e27e 100644 --- a/Source/Orts.Simulation/Common/Math.cs +++ b/Source/Orts.Simulation/Common/Math.cs @@ -15,96 +15,96 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Microsoft.Xna.Framework; using System; using System.IO; +using Microsoft.Xna.Framework; namespace Orts.Common { public static class ORTSMath - { - // - // from http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToEuler/index.htm - // - public static void MatrixToAngles(Matrix m, out float heading, out float attitude, out float bank) - { // Assuming the angles are in radians. - if (m.M21 > 0.998) - { // singularity at north pole - heading = (float)Math.Atan2(m.M13, m.M33); - attitude = (float)Math.PI / 2; - bank = 0; - return; - } - if (m.M21 < -0.998) - { // singularity at south pole - heading = (float)Math.Atan2(m.M13, m.M33); - attitude = -(float)Math.PI / 2; - bank = 0; - return; - } - heading = (float)Math.Atan2(-m.M31, m.M11); - bank = (float)Math.Atan2(-m.M23, m.M22); - attitude = (float)Math.Asin(m.M21); - } + { + // + // from http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToEuler/index.htm + // + public static void MatrixToAngles(Matrix m, out float heading, out float attitude, out float bank) + { // Assuming the angles are in radians. + if (m.M21 > 0.998) + { // singularity at north pole + heading = (float)Math.Atan2(m.M13, m.M33); + attitude = (float)Math.PI / 2; + bank = 0; + return; + } + if (m.M21 < -0.998) + { // singularity at south pole + heading = (float)Math.Atan2(m.M13, m.M33); + attitude = -(float)Math.PI / 2; + bank = 0; + return; + } + heading = (float)Math.Atan2(-m.M31, m.M11); + bank = (float)Math.Atan2(-m.M23, m.M22); + attitude = (float)Math.Asin(m.M21); + } - public static float MatrixToYAngle(Matrix m) - { // Assuming the angles are in radians. - if (m.M21 > 0.998 || m.M21 < -0.998) - // singularity at poles - return (float)Math.Atan2(m.M13, m.M33); + public static float MatrixToYAngle(Matrix m) + { // Assuming the angles are in radians. + if (m.M21 > 0.998 || m.M21 < -0.998) + // singularity at poles + return (float)Math.Atan2(m.M13, m.M33); - else return (float)Math.Atan2(-m.M31, m.M11); - } + else return (float)Math.Atan2(-m.M31, m.M11); + } - public struct Matrix2x2 - { - public float M00, M01, M10, M11; + public struct Matrix2x2 + { + public float M00, M01, M10, M11; - public Matrix2x2(float m00, float m01, float m10, float m11) - { - M00 = m00; M01 = m01; M10 = m10; M11 = m11; - } - } + public Matrix2x2(float m00, float m01, float m10, float m11) + { + M00 = m00; M01 = m01; M10 = m10; M11 = m11; + } + } - public static float Interpolate2D(float x, float z, Matrix2x2 y) - { - float result = 0; + public static float Interpolate2D(float x, float z, Matrix2x2 y) + { + float result = 0; - result += (1 - x) * (1 - z) * y.M00; - result += (x) * (1 - z) * y.M01; - result += (1 - x) * (z) * y.M10; - result += (x) * (z) * y.M11; + result += (1 - x) * (1 - z) * y.M00; + result += (x) * (1 - z) * y.M01; + result += (1 - x) * (z) * y.M10; + result += (x) * (z) * y.M11; - return result; - } + return result; + } - public static float LineSegmentDistanceSq(Vector3 pt, Vector3 end1, Vector3 end2) - { - float dx = end2.X - end1.X; - float dy = end2.Y - end1.Y; - float dz = end2.Z - end1.Z; - float d = dx * dx + dy * dy + dz * dz; - float n = dx * (pt.X - end1.X) + dy * (pt.Y - end1.Y) + dz * (pt.Z - end1.Z); - if (d == 0 || n < 0) - { - dx = end1.X - pt.X; - dy = end1.Y - pt.Y; - dz = end1.Z - pt.Z; - } - else if (n > d) - { - dx = end2.X - pt.X; - dy = end2.Y - pt.Y; - dz = end2.Z - pt.Z; - } - else - { - dx = end1.X + dx * n / d - pt.X; - dy = end1.Y + dy * n / d - pt.Y; - dz = end1.Z + dz * n / d - pt.Z; - } - return dx * dx + dy * dy + dz * dz; - } + public static float LineSegmentDistanceSq(Vector3 pt, Vector3 end1, Vector3 end2) + { + float dx = end2.X - end1.X; + float dy = end2.Y - end1.Y; + float dz = end2.Z - end1.Z; + float d = dx * dx + dy * dy + dz * dz; + float n = dx * (pt.X - end1.X) + dy * (pt.Y - end1.Y) + dz * (pt.Z - end1.Z); + if (d == 0 || n < 0) + { + dx = end1.X - pt.X; + dy = end1.Y - pt.Y; + dz = end1.Z - pt.Z; + } + else if (n > d) + { + dx = end2.X - pt.X; + dy = end2.Y - pt.Y; + dz = end2.Z - pt.Z; + } + else + { + dx = end1.X + dx * n / d - pt.X; + dy = end1.Y + dy * n / d - pt.Y; + dz = end1.Z + dz * n / d - pt.Z; + } + return dx * dx + dy * dy + dz * dz; + } public static void SaveMatrix(BinaryWriter outf, Matrix matrix) { diff --git a/Source/Orts.Simulation/Common/ORTSPaths.cs b/Source/Orts.Simulation/Common/ORTSPaths.cs index f5968394a2..ea078d6cc9 100644 --- a/Source/Orts.Simulation/Common/ORTSPaths.cs +++ b/Source/Orts.Simulation/Common/ORTSPaths.cs @@ -24,13 +24,13 @@ namespace Orts.Common public static class ORTSPaths { // Cleaner to use GetFileFromFolders() instead, but not sure how to test this. - public static string FindTrainCarPlugin( string initialFolder, string filename ) + public static string FindTrainCarPlugin(string initialFolder, string filename) { string dllPath = initialFolder + "\\" + filename; // search in trainset folder if (File.Exists(dllPath)) return dllPath; - string rootFolder = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(initialFolder)))+ "\\OpenRails"; - if( Directory.Exists( rootFolder ) ) + string rootFolder = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(initialFolder))) + "\\OpenRails"; + if (Directory.Exists(rootFolder)) { dllPath = rootFolder + "\\" + filename; if (File.Exists(dllPath)) diff --git a/Source/Orts.Simulation/Common/Scripting/BrakeController.cs b/Source/Orts.Simulation/Common/Scripting/BrakeController.cs index d3320d517d..c61f2eeb67 100644 --- a/Source/Orts.Simulation/Common/Scripting/BrakeController.cs +++ b/Source/Orts.Simulation/Common/Scripting/BrakeController.cs @@ -188,7 +188,7 @@ public float IntermediateValue /// /// Fraction of train brake demanded by cruise control /// - public float CruiseControlBrakeDemand() => Locomotive.CruiseControl != null ? Locomotive.CruiseControl.TrainBrakePercent/100 : 0; + public float CruiseControlBrakeDemand() => Locomotive.CruiseControl != null ? Locomotive.CruiseControl.TrainBrakePercent / 100 : 0; /// /// Current notch of the brake controller diff --git a/Source/Orts.Simulation/Common/Scripting/Commands.cs b/Source/Orts.Simulation/Common/Scripting/Commands.cs index 9adef602f6..97638134e1 100644 --- a/Source/Orts.Simulation/Common/Scripting/Commands.cs +++ b/Source/Orts.Simulation/Common/Scripting/Commands.cs @@ -17,9 +17,9 @@ // This file is the responsibility of the 3D & Environment Team. +using System; using Orts.Common; using Orts.Simulation.RollingStocks.SubSystems; -using System; namespace ORTS.Scripting.Api { diff --git a/Source/Orts.Simulation/Common/Scripting/Common.cs b/Source/Orts.Simulation/Common/Scripting/Common.cs index b633a0a8e5..eb287e408c 100644 --- a/Source/Orts.Simulation/Common/Scripting/Common.cs +++ b/Source/Orts.Simulation/Common/Scripting/Common.cs @@ -15,11 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; using Orts.Common; using Orts.Simulation; using Orts.Simulation.RollingStocks; using Orts.Simulation.RollingStocks.SubSystems; -using System; namespace ORTS.Scripting.Api { diff --git a/Source/Orts.Simulation/Common/Scripting/PowerSupply/ControlCarPowerSupply.cs b/Source/Orts.Simulation/Common/Scripting/PowerSupply/ControlCarPowerSupply.cs index f70a678b22..55d4be46ff 100644 --- a/Source/Orts.Simulation/Common/Scripting/PowerSupply/ControlCarPowerSupply.cs +++ b/Source/Orts.Simulation/Common/Scripting/PowerSupply/ControlCarPowerSupply.cs @@ -15,8 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; - namespace ORTS.Scripting.Api { /// diff --git a/Source/Orts.Simulation/Common/Scripting/PowerSupply/LocomotivePowerSupply.cs b/Source/Orts.Simulation/Common/Scripting/PowerSupply/LocomotivePowerSupply.cs index ea9680d1c4..8c1e2d6db1 100644 --- a/Source/Orts.Simulation/Common/Scripting/PowerSupply/LocomotivePowerSupply.cs +++ b/Source/Orts.Simulation/Common/Scripting/PowerSupply/LocomotivePowerSupply.cs @@ -15,8 +15,8 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Orts.Simulation; using System; +using Orts.Simulation; namespace ORTS.Scripting.Api { diff --git a/Source/Orts.Simulation/Common/Scripting/PowerSupply/PowerSupply.cs b/Source/Orts.Simulation/Common/Scripting/PowerSupply/PowerSupply.cs index 0788e09a78..4e2a19301e 100644 --- a/Source/Orts.Simulation/Common/Scripting/PowerSupply/PowerSupply.cs +++ b/Source/Orts.Simulation/Common/Scripting/PowerSupply/PowerSupply.cs @@ -15,8 +15,8 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using ORTS.Common; using System; +using ORTS.Common; namespace ORTS.Scripting.Api { diff --git a/Source/Orts.Simulation/Common/Scripting/ScriptManager.cs b/Source/Orts.Simulation/Common/Scripting/ScriptManager.cs index ef0883dca9..24e85f10d4 100644 --- a/Source/Orts.Simulation/Common/Scripting/ScriptManager.cs +++ b/Source/Orts.Simulation/Common/Scripting/ScriptManager.cs @@ -15,8 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Orts.Simulation; -using ORTS.Common; using System; using System.Collections.Generic; using System.Diagnostics; @@ -28,6 +26,7 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Emit; +using ORTS.Common; namespace Orts.Common.Scripting { @@ -68,7 +67,7 @@ public object Load(string[] pathArray, string name, string nameSpace = "ORTS.Scr if (path == null || path == "") return null; - + path = path.ToLowerInvariant(); var type = String.Format("{0}.{1}", nameSpace, Path.GetFileNameWithoutExtension(path).Replace('-', '_')); @@ -157,7 +156,7 @@ private static Assembly CompileScript(string[] path) public Assembly LoadFolder(string path) { - + if (Thread.CurrentThread.Name != "Loader Process") Trace.TraceError("ScriptManager.Load incorrectly called by {0}; must be Loader Process or crashes will occur.", Thread.CurrentThread.Name); diff --git a/Source/Orts.Simulation/Common/Scripting/TrainControlSystem.cs b/Source/Orts.Simulation/Common/Scripting/TrainControlSystem.cs index 1ec46c8246..09ca14b9bc 100644 --- a/Source/Orts.Simulation/Common/Scripting/TrainControlSystem.cs +++ b/Source/Orts.Simulation/Common/Scripting/TrainControlSystem.cs @@ -17,9 +17,9 @@ using System; using System.IO; -using ORTS.Common; using Orts.Common; using Orts.Simulation.RollingStocks.SubSystems; +using ORTS.Common; using ORTS.Scripting.Api.ETCS; namespace ORTS.Scripting.Api @@ -207,7 +207,7 @@ public abstract class TrainControlSystem : AbstractTrainScriptClass /// True if circuit breaker or power contactor opening order is true. /// public Func CircuitBreakerOpeningOrder; - /// + /// /// Returns the number of pantographs on the locomotive. /// public Func PantographCount; @@ -585,16 +585,16 @@ public enum Aspect // Represents the same enum as TRAIN_CONTROL public enum TRAIN_CONTROL - { - AUTO_SIGNAL, - AUTO_NODE, - MANUAL, - EXPLORER, - OUT_OF_CONTROL, - INACTIVE, - TURNTABLE, - UNDEFINED - } + { + AUTO_SIGNAL, + AUTO_NODE, + MANUAL, + EXPLORER, + OUT_OF_CONTROL, + INACTIVE, + TURNTABLE, + UNDEFINED + } public enum TCSEvent { @@ -642,7 +642,7 @@ public enum TCSEvent /// Internal reset request by the engine brake controller. /// EngineBrakeChanged, - /// + /// /// Internal reset request by the brakeman brake controller. /// BrakemanBrakeChanged, diff --git a/Source/Orts.Simulation/Common/SteamTable.cs b/Source/Orts.Simulation/Common/SteamTable.cs index 2b81354c7e..d6ae9ad7a1 100644 --- a/Source/Orts.Simulation/Common/SteamTable.cs +++ b/Source/Orts.Simulation/Common/SteamTable.cs @@ -92,44 +92,44 @@ static class SteamTable 75.83f, 81.88f, 83.75f, 85.63f, 87.50f, 89.37f, 91.25f, 93.12f, 93.75f, 94.37f, 94.99f, 95.62f, 96.24f, 96.87f, 97.49f, 98.12f, 98.74f, 99.37f, 99.99f, 100.61f }; - - // injector 14mm flowrates (gallons (uk) per minute) - data extrapolated below from info in 1928 Sellers Injector Manual + + // injector 14mm flowrates (gallons (uk) per minute) - data extrapolated below from info in 1928 Sellers Injector Manual static float[] Injector14FlowTableUKGpM = new float[] { 9.30f, 16.79f, 24.28f, 31.77f, 39.26f, 46.75f, 54.24f, 61.73f, 69.21f, 76.70f, 84.19f, 91.68f, 99.17f, 100.81f, 102.45f, 104.09f, 105.72f, 107.36f, 109.00f, 111.65f, 114.30f, 115.94f, 117.58f, 119.21f, 120.85f, 122.49f, 124.13f, 125.77f, 127.40f, 129.04f, 130.68f }; - - // injector 15mm flowrates (gallons (uk) per minute) - data extrapolated below from info in 1928 Sellers Injector Manual + + // injector 15mm flowrates (gallons (uk) per minute) - data extrapolated below from info in 1928 Sellers Injector Manual static float[] Injector15FlowTableUKGpM = new float[] { 9.30f, 17.82f, 26.33f, 34.85f, 43.36f, 51.88f, 60.40f, 68.91f, 77.43f, 85.94f, 94.46f, 102.98f, 111.49f, 113.33f, 115.16f, 117.0f, 118.83f, 120.67f, 122.50f, 125.50f, 128.50f, 130.14f, 131.78f, 133.41f, 135.05f, 136.69f, 138.33f, 139.97f, 141.60f, 143.24f, 144.88f - }; + }; // Specific heat table for water - volume heat capacity?? - static float[] SpecificHeatTableKJpKGpK = new float[] { 4.2170f, 4.2049f, 4.2165f, 4.2223f, 4.2287f, 4.2355f, 4.2427f, 4.2505f, 4.2587f, 4.2675f, 4.2769f, - 4.2926f, 4.3035f, 4.3151f, 4.3274f, 4.3405f, 4.3543f, 4.3690f, 4.3846f, 4.4012f, 4.4187f, - 4.4374f, 4.4573f, 4.4784f, 4.5009f, 4.5248f, 4.5503f, 4.5774f, 4.6064f, 4.6373f, 4.6703f + 4.2926f, 4.3035f, 4.3151f, 4.3274f, 4.3405f, 4.3543f, 4.3690f, 4.3846f, 4.4012f, 4.4187f, + 4.4374f, 4.4573f, 4.4784f, 4.5009f, 4.5248f, 4.5503f, 4.5774f, 4.6064f, 4.6373f, 4.6703f }; // Water temp in deg Kelvin static float[] WaterTemperatureTableK = new float[] { 274.00f, 281.40f, 288.80f, 296.20f, 303.60f, 311.00f, 318.40f, 325.80f, 333.20f, 340.60f, 348.00f, - 355.40f, 362.80f, 370.20f, 377.60f, 385.00f, 392.40f, 399.80f, 407.20f, 414.60f, 422.00f, - 429.40f, 436.80f, 444.20f, 451.60f, 459.00f, 466.40f, 473.80f, 481.20f, 488.60f, 496.00f + 355.40f, 362.80f, 370.20f, 377.60f, 385.00f, 392.40f, 399.80f, 407.20f, 414.60f, 422.00f, + 429.40f, 436.80f, 444.20f, 451.60f, 459.00f, 466.40f, 473.80f, 481.20f, 488.60f, 496.00f }; - + static float[] SaturationPressureTablePSI = new float[] { 0.00f, 10.00f, 20.00f, 30.00f, 40.00f, 50.00f, 60.00f, 70.00f, 80.00f, 90.00f, 100.00f, - 110.00f, 120.00f, 130.00f, 140.00f, 150.00f, 160.00f, 170.00f, 180.00f, 190.00f, 200.00f, - 210.00f, 220.00f, 230.00f, 240.00f, 250.00f, 260.00f, 270.00f, 280.00f, 290.00f, 300.00f + 110.00f, 120.00f, 130.00f, 140.00f, 150.00f, 160.00f, 170.00f, 180.00f, 190.00f, 200.00f, + 210.00f, 220.00f, 230.00f, 240.00f, 250.00f, 260.00f, 270.00f, 280.00f, 290.00f, 300.00f }; // Temperature of water in deg Kelvin @@ -145,7 +145,7 @@ static class SteamTable { 0.0f, 20.0f, 40.0f, 60.0f, 80.0f, 100.0f, 120.0f, 140.0f, 160.0f, 180.0f, 200.0f, 220.0f }; - + // Boiler Efficiency - based upon average results from test papers static float[] SatBoilerEfficiencyTableX = new float[] { @@ -157,7 +157,7 @@ static class SteamTable { 0.903f, 0.8484f, 0.7936f, 0.7390f, 0.6843f, 0.6296f, 0.5749f, 0.5202f, 0.4655f, 0.4108f, 0.3561f, 0.3014f }; - + // pressure tables for Injectors temperature and steam usage static float[] InjectorUsePressureTablePSI = new float[] { @@ -187,8 +187,8 @@ static class SteamTable { 0.366f, 0.395f, 0.419f, 0.454f, 0.509f }; - -// Cylinder Indicator Card Events + + // Cylinder Indicator Card Events // cutoff fraction static float[] CutOffFractionEventTableX = new float[] @@ -216,7 +216,7 @@ static class SteamTable }; -// Cylinder condensation and superheat + // Cylinder condensation and superheat // cutoff fraction static float[] CutOffFractionTableX = new float[] @@ -242,7 +242,7 @@ static class SteamTable 0.0f, 2000.0f, 4000.0f, 6000.0f, 8000.0f, 10000.0f, 12000.0f, 14000.0f, 16000.0f, 18000.0f, 20000.0f, 22000.0f, 24000.0f, 26000.0f, 28000.0f, 30000.0f, 32000.0f, 34000.0f, 36000.0f }; - + // Superheat Temp - deg F - from BTC Test Results for Std 8 static float[] SuperheatTempTableDegF = new float[] { @@ -259,64 +259,64 @@ static class SteamTable // Allowance for drop in initial pressure (steam chest) as speed increases - Various sources - Saturated static float[] SatInitialPressureDropRatio = new float[] { - 0.98f, 0.965f, 0.95f, 0.935f, 0.92f, 0.905f, 0.89f, 0.875f, 0.87f, 0.8650f, 0.8625f, 0.86f, 0.8575f, 0.855f, 0.8525f, 0.85f - + 0.98f, 0.965f, 0.95f, 0.935f, 0.92f, 0.905f, 0.89f, 0.875f, 0.87f, 0.8650f, 0.8625f, 0.86f, 0.8575f, 0.855f, 0.8525f, 0.85f + }; - - // Allowance for pressure drop in Steam chest pressure compared to Boiler Pressure - (To be confirmed) - Superheated + + // Allowance for pressure drop in Steam chest pressure compared to Boiler Pressure - (To be confirmed) - Superheated static float[] SuperInitialPressureDropRatio = new float[] { 0.99f, 0.98f, 0.97f, 0.96f, 0.95f, 0.94f, 0.93f, 0.92f, 0.915f, 0.910f, 0.905f, 0.90f, 0.8975f, 0.8950f, 0.8925f, 0.8900f }; - -// piston speed (feet per minute) - American Locomotive Company + + // piston speed (feet per minute) - American Locomotive Company static float[] PistonSpeedFtpMin = new float[] { 0, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000, 2100 }; - -// Speed factor - Saturated (0 and 2000, 2100 value extrapolated for Open Rails to limit TE) - Based upon dat from American Locomotive Company + + // Speed factor - Saturated (0 and 2000, 2100 value extrapolated for Open Rails to limit TE) - Based upon dat from American Locomotive Company static float[] SpeedFactorSat = new float[] { 1.0f, 1.0f, 1.0f, 0.954f, 0.863f, 0.772f, 0.680f, 0.590f, 0.517f, 0.460f, 0.412f, 0.372f, 0.337f, 0.307f, 0.283f, 0.261f, 0.241f, 0.225f, 0.213f, 0.202f, 0.190f, 0.185f }; - -// Speed factor - Superheated (0 and 2000, 2100 value extrapolated for Open Rails to limit TE) - American Locomotive Company + + // Speed factor - Superheated (0 and 2000, 2100 value extrapolated for Open Rails to limit TE) - American Locomotive Company static float[] SpeedFactorSuper = new float[] { 1.0f, 1.0f, 1.0f, 0.988f, 0.965f, 0.912f, 0.859f, 0.800f, 0.753f, 0.706f, 0.659f, 0.612f, 0.571f, 0.535f, 0.500f, 0.471f, 0.447f, 0.433f, 0.424f, 0.420f, 0.410f, 0.410f }; -// Indicated HorsePower - + // Indicated HorsePower - static float[] IndicatedHorsepowerIHP = new float[] { 0.0f, 200.0f, 400.0f, 600.0f, 800.0f, 1000.0f, 1200.0f, 1400.0f, 1600.0f, 1800.0f, 2000.0f, 2200.0f, 2400.0f, 2600.0f, 2800.0f, 3000.0f }; -// BackPressure - Saturated locomotive - Ref Principles of Locomotive Operation - Assume atmospheric - extrapolated beyond 1800IHP + // BackPressure - Saturated locomotive - Ref Principles of Locomotive Operation - Assume atmospheric - extrapolated beyond 1800IHP static float[] BackPressureSatPSI = new float[] { 0.0f, 1.0f, 2.0f, 2.33f, 3.0f, 5.3f, 5.6f, 8.0f, 11.2f, 14.25f, 16.0f, 20.0f, 24.0f, 26.0f, 28.0f, 30.0f }; -// BackPressure - Superheated locomotive - Ref Principles of Locomotive Operation - Assume atmospheric - extrapolated beyond 1800IHP + // BackPressure - Superheated locomotive - Ref Principles of Locomotive Operation - Assume atmospheric - extrapolated beyond 1800IHP static float[] BackPressureSuperPSI = new float[] { 0.0f, 0.25f, 0.5f, 0.75f, 1.25f, 1.75f, 2.5f, 3.5f, 4.8f, 7.2f, 11.25f, 16.0f, 20.0f, 22.0f, 24.0f, 26.0f }; - // Allowance for drop in initial pressure (steam chest) as speed increases - Various sources + // Allowance for drop in initial pressure (steam chest) as speed increases - Various sources static float[] CondensationWheelRotationRpM = new float[] { 0.0f, 50.0f, 100.0f, 150.0f, 200.0f, 250.0f, 300.0f, 350.0f }; -// Steam Tables + // Steam Tables -// Indicator Diagram - Cylinder Events + // Indicator Diagram - Cylinder Events // Indicator Diagram Event - Exhaust Open - Perwall program - http://5at.co.uk/index.php/references-and-links/software.html public static Interpolator CylinderEventExhausttoCutoff() @@ -334,88 +334,88 @@ public static Interpolator CylinderEventCompressiontoCutoff() public static Interpolator CylinderEventAdmissiontoCutoff() { return new Interpolator(CutOffFractionEventTableX, CylinderAdmissionTableX); - } - -// cylinder condensation fraction per cutoff fraction - saturated steam - Ref Elseco Superheater manual + } + + // cylinder condensation fraction per cutoff fraction - saturated steam - Ref Elseco Superheater manual public static Interpolator CylinderCondensationFractionInterpolatorX() { return new Interpolator(CutOffFractionTableX, CylinderCondensationFractionTableX); } -// Superheat temp required to prevent cylinder condensation - Ref Elseco Superheater manual + // Superheat temp required to prevent cylinder condensation - Ref Elseco Superheater manual public static Interpolator SuperheatTempLimitInterpolatorXtoDegF() { return new Interpolator(CutOffFractionTableX, SuperheatCondenstationLimitTableDegF); - } + } -// Saturated Backpressure - Ref Principles of Locomotive Operation + // Saturated Backpressure - Ref Principles of Locomotive Operation public static Interpolator BackpressureSatIHPtoPSI() { return new Interpolator(IndicatedHorsepowerIHP, BackPressureSatPSI); } -// Superheated Backpressure - Ref Principles of Locomotive Operation + // Superheated Backpressure - Ref Principles of Locomotive Operation public static Interpolator BackpressureSuperIHPtoPSI() { return new Interpolator(IndicatedHorsepowerIHP, BackPressureSuperPSI); - } + } -// Saturated Speed factor - ie drop in TE as speed increases due to piston impacts - Ref American locomotive Company + // Saturated Speed factor - ie drop in TE as speed increases due to piston impacts - Ref American locomotive Company public static Interpolator SaturatedSpeedFactorSpeedDropFtpMintoX() { return new Interpolator(PistonSpeedFtpMin, SpeedFactorSat); - } - - -// Superheated Speed factor - ie drop in TE as speed increases due to piston impacts - Ref American locomotive Company + } + + + // Superheated Speed factor - ie drop in TE as speed increases due to piston impacts - Ref American locomotive Company public static Interpolator SuperheatedSpeedFactorSpeedDropFtpMintoX() { return new Interpolator(PistonSpeedFtpMin, SpeedFactorSuper); - } - + } - // Allowance for pressure drop in Steam chest pressure compared to Boiler Pressure - Ref LOCOMOTIVE OPERATION - A TECHNICAL AND PRACTICAL ANALYSIS - BY G. R. HENDERSON + + // Allowance for pressure drop in Steam chest pressure compared to Boiler Pressure - Ref LOCOMOTIVE OPERATION - A TECHNICAL AND PRACTICAL ANALYSIS - BY G. R. HENDERSON public static Interpolator SuperInitialPressureDropRatioInterpolatorRpMtoX() { return new Interpolator(WheelRotationRpM, SuperInitialPressureDropRatio); - } + } // Allowance for wire-drawing - ie drop in initial pressure (cutoff) as speed increases - Ref Principles of Locomotive Operation public static Interpolator SatInitialPressureDropRatioInterpolatorRpMtoX() { return new Interpolator(WheelRotationRpM, SatInitialPressureDropRatio); - } + } // Superheat temp per lbs of steam to cylinder - from BTC Test Results for Std 8 public static Interpolator SuperheatTempInterpolatorLbpHtoDegF() { return new Interpolator(CylinderSteamTableLbpH, SuperheatTempTableDegF); - } + } // Injector factor to determine the min capacity of the injector public static Interpolator InjCapMinFactorInterpolatorX() { return new Interpolator(InjectorUsePressureTablePSI, InjMinCapFactorTableX); - } + } // Injector max delivery water temp (Fahr) per pressure of steam (psi) public static Interpolator InjDelWaterTempMaxPressureInterpolatorFtoPSI() { return new Interpolator(InjectorUsePressureTablePSI, WaterTemPDeliveryMaxTableF); - } - + } + // Injector min delivery water temp (Fahr) per pressure of steam (psi) public static Interpolator InjDelWaterTempMinPressureInterpolatorFtoPSI() { return new Interpolator(InjectorUsePressureTablePSI, WaterTemPDeliveryMinTableF); - } - + } + // Injector water fed per lb of steam at pressure of steam (psi) public static Interpolator InjWaterFedSteamPressureInterpolatorFtoPSI() { return new Interpolator(InjectorUsePressureTablePSI, WaterDelFedSteamTableLbs); - } + } // Boiler Efficiency based on lbs of coal per sq. ft of Grate Area - Saturated public static Interpolator SatBoilerEfficiencyGrateAreaInterpolatorLbstoX() @@ -428,7 +428,7 @@ public static Interpolator SuperBoilerEfficiencyGrateAreaInterpolatorLbstoX() { return new Interpolator(CoalGrateAreaTableLbspFt2, SuperBoilerEfficiencyTableX); } - + // Saturated pressure of steam (psi) @ water temperature (K) public static Interpolator SaturationPressureInterpolatorKtoPSI() { @@ -457,25 +457,25 @@ public static Interpolator Injector10FlowrateInterpolatorPSItoUKGpM() public static Interpolator Injector11FlowrateInterpolatorPSItoUKGpM() { return new Interpolator(PressureTableGaugePSI, Injector11FlowTableUKGpM); - } - + } + // Flowrate table vs Boiler Pressure for 13mm Injector public static Interpolator Injector13FlowrateInterpolatorPSItoUKGpM() { return new Interpolator(PressureTableGaugePSI, Injector13FlowTableUKGpM); - } - + } + // Flowrate table vs Boiler Pressure for 14mm Injector public static Interpolator Injector14FlowrateInterpolatorPSItoUKGpM() { return new Interpolator(PressureTableGaugePSI, Injector14FlowTableUKGpM); - } - + } + // Flowrate table vs Boiler Pressure for 15mm Injector public static Interpolator Injector15FlowrateInterpolatorPSItoUKGpM() { return new Interpolator(PressureTableGaugePSI, Injector15FlowTableUKGpM); - } + } public static Interpolator WaterHeatInterpolatorPSItoBTUpLB() { @@ -524,18 +524,18 @@ public static Interpolator SteamHeatPressureToTemperatureInterpolatorPSItoF() // revolutions - z value static float[] WheelRevolutionsRpM = new float[] { - 0.0f, 50.0f, 100.0f, 150.0f, 200.0f, 250.0f, 300.0f, 350.0f + 0.0f, 50.0f, 100.0f, 150.0f, 200.0f, 250.0f, 300.0f, 350.0f }; // Cutoff - x Value static float[] CutOff = new float[] { - 0.0f, 0.1f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f, 1.0f + 0.0f, 0.1f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f, 1.0f }; - + // ++++++++++++++++++++++ Upper Limit ++++++++++++ - // % Initial Pressure @ 0rpm - y Value + // % Initial Pressure @ 0rpm - y Value static float[] InitialPressureUpper0RpM = new float[] { 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f @@ -652,7 +652,7 @@ public static Interpolator2D CutoffInitialPressureUpper() return new Interpolator2D(WheelRevolutionsRpM, Initial_pressure_upper); } - // ++++++++++++++++++++++ Lower Limit ++++++++++++ + // ++++++++++++++++++++++ Lower Limit ++++++++++++ // % Initial Pressure @ 0rpm - y Value static float[] InitialPressureLower0RpM = new float[] diff --git a/Source/Orts.Simulation/MultiPlayer/ClientComm.cs b/Source/Orts.Simulation/MultiPlayer/ClientComm.cs index da94d96a6e..e668491344 100644 --- a/Source/Orts.Simulation/MultiPlayer/ClientComm.cs +++ b/Source/Orts.Simulation/MultiPlayer/ClientComm.cs @@ -18,7 +18,6 @@ // #define DEBUG_MULTIPLAYER // DEBUG flag for debug prints -using Orts.Simulation.Physics; using System; using System.Diagnostics; using System.Linq; @@ -26,30 +25,31 @@ using System.Net.Sockets; using System.Text; using System.Threading; +using Orts.Simulation.Physics; namespace Orts.MultiPlayer { public class ClientComm - { - private Thread listenThread; - private TcpClient client; - public string UserName; - public string Code; - public Decoder decoder; - public bool Connected = false; - - public void Stop() - { - try - { - client.Close(); - listenThread.Abort(); - } - catch (Exception) { } - } - public ClientComm(string serverIP, int serverPort, string s) - { - client = new TcpClient(); + { + private Thread listenThread; + private TcpClient client; + public string UserName; + public string Code; + public Decoder decoder; + public bool Connected = false; + + public void Stop() + { + try + { + client.Close(); + listenThread.Abort(); + } + catch (Exception) { } + } + public ClientComm(string serverIP, int serverPort, string s) + { + client = new TcpClient(); IPAddress address; @@ -59,130 +59,130 @@ public ClientComm(string serverIP, int serverPort, string s) .AddressList .First(ip => ip.AddressFamily == AddressFamily.InterNetwork); } - IPEndPoint serverEndPoint = new IPEndPoint(address, serverPort); + IPEndPoint serverEndPoint = new IPEndPoint(address, serverPort); #if DEBUG_MULTIPLAYER Trace.TraceInformation("ClientComm data: {0} , ServerIP: {1}", s, serverIP); #endif client.Connect(serverEndPoint); - string[] tmp = s.Split(' '); - UserName = tmp[0]; - Code = tmp[1]; - decoder = new Decoder(); - - listenThread = new Thread(new ParameterizedThreadStart(this.Receive)); - listenThread.Name = "Multiplayer Client-Server"; - listenThread.Start(client); - - } - - public void Receive(object client) - { - - TcpClient tcpClient = (TcpClient)client; - NetworkStream clientStream = tcpClient.GetStream(); - - byte[] message = new byte[8192]; - int bytesRead; - - while (true) - { - bytesRead = 0; - try - { - //blocks until a client sends a message - bytesRead = clientStream.Read(message, 0, 8192); - } - catch - { - //a socket error has occured - break; - } - - if (bytesRead == 0) - { - //the client has disconnected from the server - break; - } - - //message has successfully been received - string info = ""; - try - { - decoder.PushMsg(Encoding.Unicode.GetString(message, 0, bytesRead));//encoder.GetString(message, 0, bytesRead)); - info = decoder.GetMsg(); - while (info != null) - { - //System.Console.WriteLine(info); - Message msg = Message.Decode(info); - if (Connected || msg is MSGRequired) msg.HandleMsg(); - info = decoder.GetMsg(); - } - } - catch (MultiPlayerError) - { - break; - } - catch (SameNameError) //I have conflict with some one in the game, will close, and abort. - { - if (MPManager.Simulator.Confirmer != null) + string[] tmp = s.Split(' '); + UserName = tmp[0]; + Code = tmp[1]; + decoder = new Decoder(); + + listenThread = new Thread(new ParameterizedThreadStart(this.Receive)); + listenThread.Name = "Multiplayer Client-Server"; + listenThread.Start(client); + + } + + public void Receive(object client) + { + + TcpClient tcpClient = (TcpClient)client; + NetworkStream clientStream = tcpClient.GetStream(); + + byte[] message = new byte[8192]; + int bytesRead; + + while (true) + { + bytesRead = 0; + try + { + //blocks until a client sends a message + bytesRead = clientStream.Read(message, 0, 8192); + } + catch + { + //a socket error has occured + break; + } + + if (bytesRead == 0) + { + //the client has disconnected from the server + break; + } + + //message has successfully been received + string info = ""; + try + { + decoder.PushMsg(Encoding.Unicode.GetString(message, 0, bytesRead));//encoder.GetString(message, 0, bytesRead)); + info = decoder.GetMsg(); + while (info != null) + { + //System.Console.WriteLine(info); + Message msg = Message.Decode(info); + if (Connected || msg is MSGRequired) msg.HandleMsg(); + info = decoder.GetMsg(); + } + } + catch (MultiPlayerError) + { + break; + } + catch (SameNameError) //I have conflict with some one in the game, will close, and abort. + { + if (MPManager.Simulator.Confirmer != null) MPManager.Simulator.Confirmer.Error(MPManager.Catalog.GetString("Connection to the server is lost, will play as single mode")); MPManager.Client = null; - tcpClient.Close(); - listenThread.Abort(); - } - catch (Exception e) - { - System.Console.WriteLine(e.Message + e.StackTrace); - Trace.TraceWarning(e.Message + e.StackTrace); - } - } - if (MPManager.Simulator.Confirmer != null) + tcpClient.Close(); + listenThread.Abort(); + } + catch (Exception e) + { + System.Console.WriteLine(e.Message + e.StackTrace); + Trace.TraceWarning(e.Message + e.StackTrace); + } + } + if (MPManager.Simulator.Confirmer != null) MPManager.Simulator.Confirmer.Error(MPManager.Catalog.GetString("Connection to the server is lost, will play as single mode")); - try - { - foreach (var p in MPManager.OnlineTrains.Players) - { - MPManager.Instance().AddRemovedPlayer(p.Value); - } - } - catch (Exception) { } - - //no matter what, let player gain back the control of the player train - if (MPManager.Simulator.PlayerLocomotive != null && MPManager.Simulator.PlayerLocomotive.Train != null) - { - MPManager.Simulator.PlayerLocomotive.Train.TrainType = Train.TRAINTYPE.PLAYER; - MPManager.Simulator.PlayerLocomotive.Train.LeadLocomotive = MPManager.Simulator.PlayerLocomotive; - } - if (MPManager.Simulator.Confirmer != null) + try + { + foreach (var p in MPManager.OnlineTrains.Players) + { + MPManager.Instance().AddRemovedPlayer(p.Value); + } + } + catch (Exception) { } + + //no matter what, let player gain back the control of the player train + if (MPManager.Simulator.PlayerLocomotive != null && MPManager.Simulator.PlayerLocomotive.Train != null) + { + MPManager.Simulator.PlayerLocomotive.Train.TrainType = Train.TRAINTYPE.PLAYER; + MPManager.Simulator.PlayerLocomotive.Train.LeadLocomotive = MPManager.Simulator.PlayerLocomotive; + } + if (MPManager.Simulator.Confirmer != null) MPManager.Simulator.Confirmer.Information(MPManager.Catalog.GetString("Alt-E to gain control of your train")); MPManager.Client = null; - tcpClient.Close(); - listenThread.Abort(); - } - - private object lockObj = new object(); - public void Send(string msg) - { - - try - { - NetworkStream clientStream = client.GetStream(); - lock (lockObj)//in case two threads want to write at the same buffer - { + tcpClient.Close(); + listenThread.Abort(); + } + + private object lockObj = new object(); + public void Send(string msg) + { + + try + { + NetworkStream clientStream = client.GetStream(); + lock (lockObj)//in case two threads want to write at the same buffer + { #if DEBUG_MULTIPLAYER Trace.TraceInformation("MPClientSend: {0}", msg); #endif byte[] buffer = Encoding.Unicode.GetBytes(msg);//encoder.GetBytes(msg); - clientStream.Write(buffer, 0, buffer.Length); - clientStream.Flush(); - } - } - catch - { - } - } - - } + clientStream.Write(buffer, 0, buffer.Length); + clientStream.Flush(); + } + } + catch + { + } + } + + } } diff --git a/Source/Orts.Simulation/MultiPlayer/Decoder.cs b/Source/Orts.Simulation/MultiPlayer/Decoder.cs index e32c557694..10fd60de69 100644 --- a/Source/Orts.Simulation/MultiPlayer/Decoder.cs +++ b/Source/Orts.Simulation/MultiPlayer/Decoder.cs @@ -20,9 +20,9 @@ namespace Orts.MultiPlayer { public class Decoder - { - string msg = ""; - /* + { + string msg = ""; + /* static Decoder decoder= null; private Decoder() { @@ -34,43 +34,43 @@ public static Decoder Instance() return decoder; } */ - public void PushMsg(string s) - { + public void PushMsg(string s) + { //if (msg.Length > 10 && !msg.Contains(":") && s.Contains(":")) msg = ""; - msg += s; //add to existing string of msgs - } - public string GetMsg() - { -// System.Console.WriteLine(msg); - if (msg.Length < 1) return null; - int index = msg.IndexOf(':'); - if (index < 0) - { - if (msg.Length > 10) msg = msg.Remove(0); //no ':', clear the messages, no way to recover anyway, except the first few digits - throw new Exception("Parsing error, no : found"); - } - try - { - int last = index - 1; - while (last >= 0) - { - if (!char.IsDigit(msg[last])) break; - last--; - } //shift back to get all digits - last += 1; - if (last < 0) last = 0; - string tmp = msg.Substring(last, index - last); - int len; - if (!int.TryParse(tmp, out len)) { msg = msg.Remove(0); return null; } - if (len < 0) return null; + msg += s; //add to existing string of msgs + } + public string GetMsg() + { + // System.Console.WriteLine(msg); + if (msg.Length < 1) return null; + int index = msg.IndexOf(':'); + if (index < 0) + { + if (msg.Length > 10) msg = msg.Remove(0); //no ':', clear the messages, no way to recover anyway, except the first few digits + throw new Exception("Parsing error, no : found"); + } + try + { + int last = index - 1; + while (last >= 0) + { + if (!char.IsDigit(msg[last])) break; + last--; + } //shift back to get all digits + last += 1; + if (last < 0) last = 0; + string tmp = msg.Substring(last, index - last); + int len; + if (!int.TryParse(tmp, out len)) { msg = msg.Remove(0); return null; } + if (len < 0) return null; if (index + 2 + len > msg.Length) { //if (msg.LastIndexOf(":") > 64) { msg = msg.Remove(0, index + 1); }//if there is a : further down, means the length is wrong, needs to remove until next : return null; } - tmp = msg.Substring(index + 2, len); //not taking ": " - msg = msg.Remove(0, index + 2 + len); //remove : - if (len > 1000000) return null;//a long message, will ignore it + tmp = msg.Substring(index + 2, len); //not taking ": " + msg = msg.Remove(0, index + 2 + len); //remove : + if (len > 1000000) return null;//a long message, will ignore it #if false int last = index-1; while (last >= 0 && char.IsDigit(msg[last--])) ; //shift back to get all digits @@ -82,17 +82,17 @@ public string GetMsg() tmp = msg.Substring(index+2, len); //not taking ": " msg = msg.Remove(last, index+2+len); //remove : #endif - return tmp; - } - catch (Exception) - { - //System.Console.WriteLine(msg); - //msg = ""; //clear the messages - return null; - } - - } - } + return tmp; + } + catch (Exception) + { + //System.Console.WriteLine(msg); + //msg = ""; //clear the messages + return null; + } + + } + } public class MultiPlayerError : Exception { diff --git a/Source/Orts.Simulation/MultiPlayer/MPManager.cs b/Source/Orts.Simulation/MultiPlayer/MPManager.cs index b3fa6d7017..753c02b3ce 100644 --- a/Source/Orts.Simulation/MultiPlayer/MPManager.cs +++ b/Source/Orts.Simulation/MultiPlayer/MPManager.cs @@ -24,13 +24,6 @@ * */ -using GNU.Gettext; -using Orts.Parsers.Msts; -using Orts.Simulation; -using Orts.Simulation.Physics; -using Orts.Simulation.RollingStocks; -using Orts.Common; -using ORTS.Common; using System; using System.Collections.Generic; using System.Diagnostics; @@ -38,6 +31,13 @@ using System.Security.Cryptography; using System.Text; using System.Threading; +using GNU.Gettext; +using Orts.Common; +using Orts.Parsers.Msts; +using Orts.Simulation; +using Orts.Simulation.Physics; +using Orts.Simulation.RollingStocks; +using ORTS.Common; namespace Orts.MultiPlayer { @@ -84,7 +84,7 @@ public class MPManager public string lastSender = ""; //who last sends me a message public bool AmAider = false; //am I aiding the dispatcher? public List aiderList; - public Dictionary lostPlayer = new Dictionary(); + public Dictionary lostPlayer = new Dictionary(); public bool NotServer = true; public bool CheckSpad = true; public static bool PreferGreen = true; @@ -164,7 +164,7 @@ private MPManager() removedLocomotives = new List(); aiderList = new List(); if (Server != null) NotServer = false; - users = new SortedList(); + users = new SortedList(); GetMD5HashFromTDBFile(); } public static MPManager Instance() @@ -183,7 +183,7 @@ public static void RequestControl() try { Train train = Simulator.PlayerLocomotive.Train; - + MSGControl msgctl; //I am the server, I have control if (IsServer()) @@ -262,7 +262,7 @@ public void Update(double newtime) } #endif } - + //server updates switch if (Server != null && newtime - lastSwitchTime >= MPUpdateInterval) { @@ -274,7 +274,7 @@ public void Update(double newtime) if (signalStatus.OKtoSend) BroadCast(signalStatus.ToString()); } - + //client updates itself if (Client != null && Server == null && newtime - lastMoveTime >= 1f) { @@ -367,7 +367,7 @@ void CheckPlayerTrainSpad() var Locomotive = (MSTSLocomotive)Simulator.PlayerLocomotive; if (Locomotive == null) return; var train = Locomotive.Train; - if (train == null ||train.TrainType == Train.TRAINTYPE.REMOTE) return;//no train or is remotely controlled + if (train == null || train.TrainType == Train.TRAINTYPE.REMOTE) return;//no train or is remotely controlled //var spad = false; var maxSpeed = Math.Abs(train.AllowedMaxSpeedMpS) + 3;//allow some margin of error (about 10km/h) @@ -387,7 +387,7 @@ public static bool IsServer() public static bool IsClient() { if (!MPManager.IsMultiPlayer() || MPManager.IsServer()) return false; - return true; + return true; } //check if it is in the server mode && they are players && not allow autoswitch public static bool NoAutoSwitch() @@ -427,7 +427,7 @@ static public void Notify(string m) static public void SendToServer(string m) { - if (m!= null && Client != null) Client.Send(m); + if (m != null && Client != null) Client.Send(m); } //nicely shutdown listening threads, and notify the server/other player @@ -441,7 +441,7 @@ static public void Stop() } if (Server != null) { - Server.BroadCast((new MSGQuit("ServerHasToQuit\t"+GetUserName())).ToString()); //server notify everybody else + Server.BroadCast((new MSGQuit("ServerHasToQuit\t" + GetUserName())).ToString()); //server notify everybody else Thread.Sleep(1000); if (Server.ServerComm != null) Server.Stop(); if (Client != null) Client.Stop(); @@ -486,7 +486,7 @@ public void AddPlayer() MPManager.Instance().lastPlayerAddedTime = Simulator.GameTime; MPManager.Instance().lastSwitchTime = Simulator.GameTime; - MSGPlayer host = new MSGPlayer(MPManager.GetUserName(), "1234", Simulator.conFileName, Simulator.patFileName, Simulator.PlayerLocomotive.Train, + MSGPlayer host = new MSGPlayer(MPManager.GetUserName(), "1234", Simulator.conFileName, Simulator.patFileName, Simulator.PlayerLocomotive.Train, Simulator.PlayerLocomotive.Train.Number, Simulator.Settings.AvatarURL); MPManager.BroadCast(host.ToString() + MPManager.OnlineTrains.AddAllPlayerTrain()); foreach (Train t in Simulator.Trains) @@ -529,7 +529,7 @@ public static bool TrainOK2Couple(Simulator simulator, Train t1, Train t2) { foreach (var p in OnlineTrains.Players) { - if (p.Value.Train == t1 && simulator.GameTime - p.Value.CreatedTime < 120) { result = false; break; } + if (p.Value.Train == t1 && simulator.GameTime - p.Value.CreatedTime < 120) { result = false; break; } if (p.Value.Train == t2 && simulator.GameTime - p.Value.CreatedTime < 120) { result = false; break; } } } @@ -541,7 +541,7 @@ public static bool TrainOK2Couple(Simulator simulator, Train t1, Train t2) /// /// Return a string of information of how many players online and those users who are close /// - + SortedList users; public string GetOnlineUsersInfo() @@ -549,7 +549,7 @@ public string GetOnlineUsersInfo() string info = ""; if (Simulator.PlayerLocomotive.Train.TrainType == Train.TRAINTYPE.REMOTE) info = "Your locomotive is a helper\t"; - info += ("" + (OnlineTrains.Players.Count + 1)+ (OnlineTrains.Players.Count <= 0 ? " player " : " players ")); + info += ("" + (OnlineTrains.Players.Count + 1) + (OnlineTrains.Players.Count <= 0 ? " player " : " players ")); info += ("" + Simulator.Trains.Count + (Simulator.Trains.Count <= 1 ? " train" : " trains")); TrainCar mine = Simulator.PlayerLocomotive; users.Clear(); @@ -563,7 +563,7 @@ public string GetOnlineUsersInfo() if (p.Train == null) continue; if (p.Train.Cars.Count <= 0) continue; var d = WorldLocation.GetDistanceSquared(p.Train.RearTDBTraveller.WorldLocation, mine.Train.RearTDBTraveller.WorldLocation); - users.Add(Math.Sqrt(d)+MPManager.Random.NextDouble(), p.Username); + users.Add(Math.Sqrt(d) + MPManager.Random.NextDouble(), p.Username); } } catch (Exception) @@ -642,7 +642,7 @@ private void RemovePlayer() if (p == p1.Value) continue; if (p1.Value.Train == p.Train) { hasOtherPlayer = true; break; }//other player has the same train } - if (hasOtherPlayer == false) + if (hasOtherPlayer == false) { AddOrRemoveLocomotives(p.Username, p.Train, false); if (p.Train.Cars.Count > 0) @@ -726,7 +726,7 @@ public bool AddOrRemoveLocomotive(string userName, int tNumber, int trainCarPosi } } - public bool AddOrRemoveLocomotives (string userName, Train t, bool add) + public bool AddOrRemoveLocomotives(string userName, Train t, bool add) { for (int iCar = 0; iCar < t.Cars.Count; iCar++) { diff --git a/Source/Orts.Simulation/MultiPlayer/Message.cs b/Source/Orts.Simulation/MultiPlayer/Message.cs index 36217015ec..e0c2af1d4c 100644 --- a/Source/Orts.Simulation/MultiPlayer/Message.cs +++ b/Source/Orts.Simulation/MultiPlayer/Message.cs @@ -18,6 +18,14 @@ // #define DEBUG_MULTIPLAYER // DEBUG flag for debug prints +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.IO; +using System.IO.Compression; +using System.Linq; +using Microsoft.Xna.Framework; using Orts.Common; using Orts.Formats.Msts; using Orts.Simulation; @@ -27,14 +35,6 @@ using Orts.Simulation.Signalling; using ORTS.Common; using ORTS.Scripting.Api; -using Microsoft.Xna.Framework; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Globalization; -using System.IO; -using System.IO.Compression; -using System.Linq; using Event = Orts.Common.Event; namespace Orts.MultiPlayer @@ -85,7 +85,7 @@ public static Message Decode(string m) public virtual void HandleMsg() { System.Console.WriteLine("test"); return; } } -#region MSGMove + #region MSGMove public class MSGMove : Message { class MSGMoveItem @@ -172,7 +172,7 @@ public override string ToString() { string tmp = "MOVE "; if (items != null && items.Count > 0) - for (var i = 0; i < items.Count; i++) tmp += items[i].ToString() + " "; + for (var i = 0; i < items.Count; i++) tmp += items[i].ToString() + " "; return " " + tmp.Length + ": " + tmp; } @@ -217,11 +217,11 @@ public override void HandleMsg() if (t.TrainType == Train.TRAINTYPE.REMOTE) { var reverseTrav = false; -// Alternate way to check for train flip -// if (m.user.Contains("0xAI") && m.trackNodeIndex == t.RearTDBTraveller.TrackNodeIndex && m.tdbDir != (int)t.RearTDBTraveller.Direction) -// { -// reverseTrav = true; -// } + // Alternate way to check for train flip + // if (m.user.Contains("0xAI") && m.trackNodeIndex == t.RearTDBTraveller.TrackNodeIndex && m.tdbDir != (int)t.RearTDBTraveller.Direction) + // { + // reverseTrav = true; + // } t.ToDoUpdate(m.trackNodeIndex, m.TileX, m.TileZ, m.X, m.Z, m.travelled, m.speed, m.direction, m.tdbDir, m.Length, reverseTrav); break; } @@ -241,7 +241,7 @@ public override void HandleMsg() t.ToDoUpdate(m.trackNodeIndex, m.TileX, m.TileZ, m.X, m.Z, m.travelled, m.speed, m.direction, m.tdbDir, m.Length); // This is necessary as sometimes a train isn't in the Trains list MPManager.Instance().AddOrRemoveTrain(t, true); - // if (MPManager.IsServer()) MPManager.Instance().AddOrRemoveLocomotives(m.user, t, true); + // if (MPManager.IsServer()) MPManager.Instance().AddOrRemoveLocomotives(m.user, t, true); } } if (found == false) //I do not have the train, tell server to send it to me @@ -251,16 +251,16 @@ public override void HandleMsg() } } } -#endregion MSGMove + #endregion MSGMove -#region MSGRequired + #region MSGRequired public class MSGRequired : Message { } -#endregion + #endregion -#region MSGPlayer + #region MSGPlayer public class MSGPlayer : MSGRequired { public string user = ""; @@ -448,7 +448,7 @@ public override string ToString() for (var i = 0; i < cars.Length; i++) { var c = cars[i]; - var index = c.LastIndexOf("\\trains\\trainset\\", StringComparison.OrdinalIgnoreCase); + var index = c.LastIndexOf("\\trains\\trainset\\", StringComparison.OrdinalIgnoreCase); { c = c.Remove(0, index + 17); }//c: wagon path without folder name @@ -579,7 +579,7 @@ public override void HandleMsg() } } if (!identical) - { + { var carsCount = t.Cars.Count; t.Cars.RemoveRange(0, carsCount); for (int i = 0; i < cars.Length; i++) @@ -755,9 +755,9 @@ public void SendToPlayer(OnlinePlayer p, string msg) } -#endregion MSGPlayer + #endregion MSGPlayer -#region MSGPlayerTrainSw + #region MSGPlayerTrainSw public class MSGPlayerTrainSw : MSGRequired { public string user = ""; @@ -852,9 +852,9 @@ public override void HandleMsg() }*/ } -#endregion MSGPlayerTrainSw + #endregion MSGPlayerTrainSw -#region MGSwitch + #region MGSwitch public class MSGSwitch : Message { @@ -949,9 +949,9 @@ public static void SetSwitch(TrackNode switchNode, int desiredState) } } -#endregion MGSwitch + #endregion MGSwitch -#region MSGResetSignal + #region MSGResetSignal public class MSGResetSignal : Message { public string user; @@ -983,9 +983,9 @@ public override void HandleMsg() } } } -#endregion MSGResetSignal + #endregion MSGResetSignal -#region MSGOrgSwitch + #region MSGOrgSwitch public class MSGOrgSwitch : MSGRequired { SortedList SwitchState; @@ -1073,9 +1073,9 @@ public override string ToString() return " " + tmp.Length + ": " + tmp; } } -#endregion MSGOrgSwitch + #endregion MSGOrgSwitch -#region MSGSwitchStatus + #region MSGSwitchStatus public class MSGSwitchStatus : Message { static byte[] preState; @@ -1238,8 +1238,8 @@ public override string ToString() return " " + tmp.Length + ": " + tmp; } } -#endregion MSGSwitchStatus -#region MSGTrain + #endregion MSGSwitchStatus + #region MSGTrain //message to add new train from either a string (received message), or a Train (building a message) public class MSGTrain : Message { @@ -1447,14 +1447,14 @@ public override string ToString() tmp += "\"" + c + "\"" + " " + ids[i] + "\n" + flipped[i] + "\n" + lengths[i] + "\n" + fadiscretes[i] + "\t"; } - tmp += "\n" + name + "\t"; + tmp += "\n" + name + "\t"; return " " + tmp.Length + ": " + tmp; } } -#endregion MSGTrain + #endregion MSGTrain -#region MSGUpdateTrain + #region MSGUpdateTrain //message to add new train from either a string (received message), or a Train (building a message) public class MSGUpdateTrain : Message @@ -1722,9 +1722,9 @@ public override string ToString() } } -#endregion MSGUpdateTrain + #endregion MSGUpdateTrain -#region MSGRemoveTrain + #region MSGRemoveTrain //remove AI trains public class MSGRemoveTrain : Message { @@ -1777,9 +1777,9 @@ public override void HandleMsg() } -#endregion MSGRemoveTrain + #endregion MSGRemoveTrain -#region MSGServer + #region MSGServer public class MSGServer : MSGRequired { string user; //true: I am a server now, false, not @@ -1832,9 +1832,9 @@ public override void HandleMsg() } } } -#endregion MSGServer + #endregion MSGServer -#region MSGAlive + #region MSGAlive public class MSGAlive : Message { string user; @@ -1856,9 +1856,9 @@ public override void HandleMsg() //System.Console.WriteLine(this.ToString()); } } -#endregion MSGAlive + #endregion MSGAlive -#region MSGTrainMerge + #region MSGTrainMerge //message to add new train from either a string (received message), or a Train (building a message) public class MSGTrainMerge : Message { @@ -1904,9 +1904,9 @@ public override string ToString() return " " + tmp.Length + ": " + tmp; } } -#endregion MSGTrainMerge + #endregion MSGTrainMerge -#region MSGMessage + #region MSGMessage //warning, error or information from the server, a client receives Error will disconnect itself public class MSGMessage : MSGRequired { @@ -1993,9 +1993,9 @@ public override string ToString() } } -#endregion MSGMessage + #endregion MSGMessage -#region MSGControl + #region MSGControl //message to ask for the control of a train or confirm it public class MSGControl : Message { @@ -2078,9 +2078,9 @@ public override string ToString() } } -#endregion MSGControl + #endregion MSGControl -#region MSGLocoChange + #region MSGLocoChange //message to add new train from either a string (received message), or a Train (building a message) public class MSGLocoChange : Message { @@ -2138,9 +2138,9 @@ public override string ToString() } } -#endregion MSGLocoChange + #endregion MSGLocoChange -#region MSGEvent + #region MSGEvent public class MSGEvent : Message { public string user; @@ -2249,9 +2249,9 @@ public override void HandleMsg() } -#endregion MSGEvent + #endregion MSGEvent -#region MSGQuit + #region MSGQuit public class MSGQuit : Message { public string user; @@ -2324,10 +2324,10 @@ public override void HandleMsg() } -#endregion MSGQuit + #endregion MSGQuit -#region MSGLost + #region MSGLost public class MSGLost : Message { public string user; @@ -2380,9 +2380,9 @@ public override void HandleMsg() } -#endregion MSGLost + #endregion MSGLost -#region MSGGetTrain + #region MSGGetTrain public class MSGGetTrain : Message { public int num; @@ -2422,9 +2422,9 @@ public override void HandleMsg() } } -#endregion MSGGetTrain + #endregion MSGGetTrain -#region MSGUncouple + #region MSGUncouple public class MSGUncouple : Message { @@ -2856,10 +2856,10 @@ public override void HandleMsg() } } } -#endregion MSGUncouple + #endregion MSGUncouple + - -#region MSGCouple + #region MSGCouple public class MSGCouple : Message { string[] cars; @@ -3107,9 +3107,9 @@ public override void HandleMsg() } } } -#endregion MSGCouple + #endregion MSGCouple -#region MSGSignalStatus + #region MSGSignalStatus public class MSGSignalStatus : Message { static byte[] preState; @@ -3291,9 +3291,9 @@ public override string ToString() return " " + tmp.Length + ": " + tmp; } } -#endregion MSGSignalStatus + #endregion MSGSignalStatus -#region MSGLocoInfo + #region MSGLocoInfo public class MSGLocoInfo : Message { @@ -3411,9 +3411,9 @@ public override string ToString() return " " + tmp.Length + ": " + tmp; } } -#endregion MSGLocoInfo + #endregion MSGLocoInfo -#region MSGAvatar + #region MSGAvatar public class MSGAvatar : Message { public string user; @@ -3456,10 +3456,10 @@ public override void HandleMsg() } -#endregion MSGAvatar + #endregion MSGAvatar -#region MSGText + #region MSGText //message to add new train from either a string (received message), or a Train (building a message) public class MSGText : MSGRequired { @@ -3515,9 +3515,9 @@ public override string ToString() } } -#endregion MSGText + #endregion MSGText -#region MSGWeather + #region MSGWeather public class MSGWeather : Message { public int weather; @@ -3573,9 +3573,9 @@ public override void HandleMsg() } } -#endregion MSGWeather + #endregion MSGWeather -#region MSGAider + #region MSGAider public class MSGAider : Message { public string user; @@ -3619,9 +3619,9 @@ public override void HandleMsg() } -#endregion MSGAider + #endregion MSGAider -#region MSGSignalChange + #region MSGSignalChange public class MSGSignalChange : Message { int index; @@ -3683,9 +3683,9 @@ public override string ToString() return " " + tmp.Length + ": " + tmp; } } -#endregion MSGSignalChange + #endregion MSGSignalChange -#region MSGExhaust + #region MSGExhaust public class MSGExhaust : Message { class MSGExhaustItem @@ -3775,9 +3775,9 @@ public override void HandleMsg() } } } -#endregion MSGExhaust + #endregion MSGExhaust -#region MSGFlip + #region MSGFlip //message to indicate that a train has been flipped (reverse formation) // message contains data before flip public class MSGFlip : Message @@ -3941,7 +3941,7 @@ public MSGFlip(Train t, bool setMUParameters, int n) public override string ToString() { - string tmp = "FLIP " + TrainNum + " " + direction + " " + TileX + " " + TileZ + " " + X.ToString(CultureInfo.InvariantCulture) + " " + Z.ToString(CultureInfo.InvariantCulture) + " " + Travelled.ToString(CultureInfo.InvariantCulture) + " " + mDirection + " " + + string tmp = "FLIP " + TrainNum + " " + direction + " " + TileX + " " + TileZ + " " + X.ToString(CultureInfo.InvariantCulture) + " " + Z.ToString(CultureInfo.InvariantCulture) + " " + Travelled.ToString(CultureInfo.InvariantCulture) + " " + mDirection + " " + speed.ToString(CultureInfo.InvariantCulture) + " " + tni + " " + count + " " + tdir + " " + len.ToString(CultureInfo.InvariantCulture) + " " + reverseMU + " "; for (var i = 0; i < cars.Length; i++) { @@ -3958,9 +3958,9 @@ public override string ToString() } } -#endregion MSGFlip + #endregion MSGFlip -#region MSGMovingTbl + #region MSGMovingTbl public class MSGMovingTbl : Message { @@ -4059,5 +4059,5 @@ public override void HandleMsg() } } -#endregion MSGMovingTbl + #endregion MSGMovingTbl } diff --git a/Source/Orts.Simulation/MultiPlayer/OnlinePlayer.cs b/Source/Orts.Simulation/MultiPlayer/OnlinePlayer.cs index 14f94a8780..2fede93928 100644 --- a/Source/Orts.Simulation/MultiPlayer/OnlinePlayer.cs +++ b/Source/Orts.Simulation/MultiPlayer/OnlinePlayer.cs @@ -15,34 +15,34 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Orts.Simulation.Physics; -using Orts.Simulation.RollingStocks; using System; using System.IO; using System.Net.Sockets; using System.Text; using System.Threading; +using Orts.Simulation.Physics; +using Orts.Simulation.RollingStocks; namespace Orts.MultiPlayer { public class OnlinePlayer - { - public Decoder decoder; - public OnlinePlayer(TcpClient t, Server s) { Client = t; Server = s; decoder = new Decoder(); CreatedTime = MPManager.Simulator.GameTime; url = "NA";}// "http://trainsimchina.com/discuz/uc_server/avatar.php?uid=72965&size=middle"; } - public TcpClient Client; - public Server Server; - public string Username = ""; - public string LeadingLocomotiveID = ""; - public Train Train; - public string con; - public string path; //pat and consist files - public Thread thread; - public double CreatedTime; - private object lockObj = new object(); - public string url = ""; //avatar location - public double quitTime = -100f; - public enum Status {Valid, Quit, Removed}; - public Status status = Status.Valid;//is this player removed by the dispatcher + { + public Decoder decoder; + public OnlinePlayer(TcpClient t, Server s) { Client = t; Server = s; decoder = new Decoder(); CreatedTime = MPManager.Simulator.GameTime; url = "NA"; }// "http://trainsimchina.com/discuz/uc_server/avatar.php?uid=72965&size=middle"; } + public TcpClient Client; + public Server Server; + public string Username = ""; + public string LeadingLocomotiveID = ""; + public Train Train; + public string con; + public string path; //pat and consist files + public Thread thread; + public double CreatedTime; + private object lockObj = new object(); + public string url = ""; //avatar location + public double quitTime = -100f; + public enum Status { Valid, Quit, Removed }; + public Status status = Status.Valid;//is this player removed by the dispatcher public bool protect = false; //when in true, will not force this player out, to protect the one that others uses the same name // Used to restore @@ -75,116 +75,116 @@ public OnlinePlayer(BinaryReader inf) } } - public void Send(string msg) - { - if (msg == null) return; - try - { - NetworkStream clientStream = Client.GetStream(); - - lock (lockObj)//lock the buffer in case two threads want to write at once - { - byte[] buffer = Encoding.Unicode.GetBytes(msg);//encoder.GetBytes(msg); - clientStream.Write(buffer, 0, buffer.Length); - clientStream.Flush(); - } - } - catch - { - } - } - - public void Receive(object client) - { - NetworkStream clientStream = Client.GetStream(); - - byte[] message = new byte[8192]; - int bytesRead; - int errorCount = 0; - double firstErrorTick = 0; - double nowTicks = 0; - - while (true) - { - - bytesRead = 0; - - try - { - //blocks until a client sends a message - bytesRead = clientStream.Read(message, 0, 8192); - } - catch - { - //a socket error has occured - break; - } - - if (bytesRead == 0) - { - //the client has disconnected from the server - break; - } - - //message has successfully been received - string info = ""; - try - { - decoder.PushMsg(Encoding.Unicode.GetString(message, 0, bytesRead));//encoder.GetString(message, 0, bytesRead)); - info = decoder.GetMsg(); - while (info != null) - { - //System.Console.WriteLine(info); - Message msg = Message.Decode(info); - if (msg is MSGPlayer) ((MSGPlayer)msg).HandleMsg(this); - else msg.HandleMsg(); - - info = decoder.GetMsg(); - } - } - catch (MultiPlayerError) - { - break; - } - catch (SameNameError) - { - Client.Close(); - thread.Abort(); - } - catch (Exception) - { - nowTicks = MPManager.Simulator.GameTime; - if (firstErrorTick == 0) - { - firstErrorTick = nowTicks; - errorCount = 1; - } - if (errorCount >= 5 && nowTicks - firstErrorTick < 10) //5 errors last 10 seconds - { - MSGMessage emsg = new MSGMessage(this.Username, "Error", "Too many errors received from you in a short period of time."); - MPManager.BroadCast(emsg.ToString()); - break; - } - else if (errorCount < 5) { errorCount++; } - else { firstErrorTick = nowTicks; errorCount = 0; } - //System.Console.WriteLine(e.Message + info); - } - } - - System.Console.WriteLine("{0} quit", this.Username); - if (MPManager.Simulator.Confirmer != null) MPManager.Simulator.Confirmer.Information(MPManager.Catalog.GetStringFmt("{0} quit.", this.Username)); - Client.Close(); - if (this.Train != null && this.status != Status.Removed) //remember the location of the train in case the player comes back later, if he is not removed by the dispatcher - { - if (!MPManager.Instance().lostPlayer.ContainsKey(this.Username)) MPManager.Instance().lostPlayer.Add(this.Username, this); - this.quitTime = MPManager.Simulator.GameTime; - this.Train.SpeedMpS = 0.0f; - this.status = Status.Quit; - } - MPManager.Instance().AddRemovedPlayer(this);//add this player to be removed - MPManager.BroadCast((new MSGQuit(this.Username)).ToString()); - thread.Abort(); - } + public void Send(string msg) + { + if (msg == null) return; + try + { + NetworkStream clientStream = Client.GetStream(); + + lock (lockObj)//lock the buffer in case two threads want to write at once + { + byte[] buffer = Encoding.Unicode.GetBytes(msg);//encoder.GetBytes(msg); + clientStream.Write(buffer, 0, buffer.Length); + clientStream.Flush(); + } + } + catch + { + } + } + + public void Receive(object client) + { + NetworkStream clientStream = Client.GetStream(); + + byte[] message = new byte[8192]; + int bytesRead; + int errorCount = 0; + double firstErrorTick = 0; + double nowTicks = 0; + + while (true) + { + + bytesRead = 0; + + try + { + //blocks until a client sends a message + bytesRead = clientStream.Read(message, 0, 8192); + } + catch + { + //a socket error has occured + break; + } + + if (bytesRead == 0) + { + //the client has disconnected from the server + break; + } + + //message has successfully been received + string info = ""; + try + { + decoder.PushMsg(Encoding.Unicode.GetString(message, 0, bytesRead));//encoder.GetString(message, 0, bytesRead)); + info = decoder.GetMsg(); + while (info != null) + { + //System.Console.WriteLine(info); + Message msg = Message.Decode(info); + if (msg is MSGPlayer) ((MSGPlayer)msg).HandleMsg(this); + else msg.HandleMsg(); + + info = decoder.GetMsg(); + } + } + catch (MultiPlayerError) + { + break; + } + catch (SameNameError) + { + Client.Close(); + thread.Abort(); + } + catch (Exception) + { + nowTicks = MPManager.Simulator.GameTime; + if (firstErrorTick == 0) + { + firstErrorTick = nowTicks; + errorCount = 1; + } + if (errorCount >= 5 && nowTicks - firstErrorTick < 10) //5 errors last 10 seconds + { + MSGMessage emsg = new MSGMessage(this.Username, "Error", "Too many errors received from you in a short period of time."); + MPManager.BroadCast(emsg.ToString()); + break; + } + else if (errorCount < 5) { errorCount++; } + else { firstErrorTick = nowTicks; errorCount = 0; } + //System.Console.WriteLine(e.Message + info); + } + } + + System.Console.WriteLine("{0} quit", this.Username); + if (MPManager.Simulator.Confirmer != null) MPManager.Simulator.Confirmer.Information(MPManager.Catalog.GetStringFmt("{0} quit.", this.Username)); + Client.Close(); + if (this.Train != null && this.status != Status.Removed) //remember the location of the train in case the player comes back later, if he is not removed by the dispatcher + { + if (!MPManager.Instance().lostPlayer.ContainsKey(this.Username)) MPManager.Instance().lostPlayer.Add(this.Username, this); + this.quitTime = MPManager.Simulator.GameTime; + this.Train.SpeedMpS = 0.0f; + this.status = Status.Quit; + } + MPManager.Instance().AddRemovedPlayer(this);//add this player to be removed + MPManager.BroadCast((new MSGQuit(this.Username)).ToString()); + thread.Abort(); + } public void Save(BinaryWriter outf) { @@ -201,13 +201,13 @@ public void Save(BinaryWriter outf) -/* - public TcpClient Client; - public Server Server; + /* + public TcpClient Client; + public Server Server; - public Thread thread; - private object lockObj = new object(); - public bool protect = false; //when in true, will not force this player out, to protect the one that others uses the same name*/ + public Thread thread; + private object lockObj = new object(); + public bool protect = false; //when in true, will not force this player out, to protect the one that others uses the same name*/ } - } + } } diff --git a/Source/Orts.Simulation/MultiPlayer/OnlineTrains.cs b/Source/Orts.Simulation/MultiPlayer/OnlineTrains.cs index 7cb7d3bd86..fe15fe0bf6 100644 --- a/Source/Orts.Simulation/MultiPlayer/OnlineTrains.cs +++ b/Source/Orts.Simulation/MultiPlayer/OnlineTrains.cs @@ -15,16 +15,16 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; using Orts.Formats.Msts; using Orts.Simulation; using Orts.Simulation.AIs; using Orts.Simulation.Physics; using Orts.Simulation.RollingStocks; using ORTS.Scripting.Api; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; namespace Orts.MultiPlayer { @@ -338,10 +338,10 @@ public string ExhaustingLocos(MSGExhaust exhaust) Train t = MPManager.FindPlayerTrain(l.userName); if (t != null && l.trainCarPosition < t.Cars.Count && (Math.Abs(t.SpeedMpS) > 0.001 || Math.Abs(t.LastReportedSpeed) > 0)) { - if (t.Cars[l.trainCarPosition] is MSTSDieselLocomotive) - { - exhaust.AddNewItem(l.userName, t, l.trainCarPosition); - } + if (t.Cars[l.trainCarPosition] is MSTSDieselLocomotive) + { + exhaust.AddNewItem(l.userName, t, l.trainCarPosition); + } } } } @@ -350,7 +350,7 @@ public string ExhaustingLocos(MSGExhaust exhaust) } // Save - public void Save (BinaryWriter outf) + public void Save(BinaryWriter outf) { outf.Write(Players.Count); foreach (var onlinePlayer in Players.Values) @@ -360,7 +360,7 @@ public void Save (BinaryWriter outf) } // Restore - public void Restore (BinaryReader inf) + public void Restore(BinaryReader inf) { var onlinePlayersCount = inf.ReadInt32(); if (onlinePlayersCount > 0) diff --git a/Source/Orts.Simulation/MultiPlayer/Server.cs b/Source/Orts.Simulation/MultiPlayer/Server.cs index 6fff56d00f..f14b325395 100644 --- a/Source/Orts.Simulation/MultiPlayer/Server.cs +++ b/Source/Orts.Simulation/MultiPlayer/Server.cs @@ -20,69 +20,68 @@ using System; using System.Collections.Generic; -using System.Diagnostics; namespace Orts.MultiPlayer { public class Server - { - public List Players; - public string UserName; - public string Code; - ClientComm Connection; - public ServerComm ServerComm; - public int ConnectionMode; + { + public List Players; + public string UserName; + public string Code; + ClientComm Connection; + public ServerComm ServerComm; + public int ConnectionMode; - public void Stop() - { - if (ServerComm != null) ServerComm.Stop(); - if (Connection != null) Connection.Stop(); - } - public Server(string s, ClientComm c) - { - Players = new List(); - string[] tmp = s.Split(' '); - UserName = tmp[0]; - Code = tmp[1]; - Connection = c; - ServerComm = null; - ConnectionMode = 0; - } + public void Stop() + { + if (ServerComm != null) ServerComm.Stop(); + if (Connection != null) Connection.Stop(); + } + public Server(string s, ClientComm c) + { + Players = new List(); + string[] tmp = s.Split(' '); + UserName = tmp[0]; + Code = tmp[1]; + Connection = c; + ServerComm = null; + ConnectionMode = 0; + } - public bool IsRemoteServer() - { - if (ConnectionMode == 0) return true; - else return false; - } - public Server(string s, int port) - { - Players = new List(); - string[] tmp = s.Split(' '); - UserName = tmp[0]; - Code = tmp[1]; + public bool IsRemoteServer() + { + if (ConnectionMode == 0) return true; + else return false; + } + public Server(string s, int port) + { + Players = new List(); + string[] tmp = s.Split(' '); + UserName = tmp[0]; + Code = tmp[1]; - ServerComm = new ServerComm(this, port); - Connection = null; - ConnectionMode = 1; - } - - public void BroadCast(string msg) - { + ServerComm = new ServerComm(this, port); + Connection = null; + ConnectionMode = 1; + } + + public void BroadCast(string msg) + { #if DEBUG_MULTIPLAYER Trace.TraceInformation("MPServerBroadcast: {0}", msg); #endif if (ServerComm == null) Connection.Send(msg); - else - { - try - { - foreach (OnlinePlayer p in Players) - { - p.Send(msg); - } - } - catch (Exception) { } - } - } - } + else + { + try + { + foreach (OnlinePlayer p in Players) + { + p.Send(msg); + } + } + catch (Exception) { } + } + } + } } diff --git a/Source/Orts.Simulation/MultiPlayer/ServerComm.cs b/Source/Orts.Simulation/MultiPlayer/ServerComm.cs index 49f05d08a3..6ab3294ecd 100644 --- a/Source/Orts.Simulation/MultiPlayer/ServerComm.cs +++ b/Source/Orts.Simulation/MultiPlayer/ServerComm.cs @@ -23,55 +23,55 @@ namespace Orts.MultiPlayer { public class ServerComm - { - private TcpListener tcpListener; - private Thread listenThread; - private Server Server; - private int count = 0; - public void Stop() - { - tcpListener.Stop(); - listenThread.Abort(); - foreach (OnlinePlayer p in Server.Players) - { - p.thread.Abort(); - } - } + { + private TcpListener tcpListener; + private Thread listenThread; + private Server Server; + private int count = 0; + public void Stop() + { + tcpListener.Stop(); + listenThread.Abort(); + foreach (OnlinePlayer p in Server.Players) + { + p.thread.Abort(); + } + } - public ServerComm(Server s, int port) - { - Server = s; - this.tcpListener = new TcpListener(IPAddress.Any, port); - this.listenThread = new Thread(new ThreadStart(ListenForClients)); + public ServerComm(Server s, int port) + { + Server = s; + this.tcpListener = new TcpListener(IPAddress.Any, port); + this.listenThread = new Thread(new ThreadStart(ListenForClients)); this.listenThread.Name = "Multiplayer Server"; - this.listenThread.Start(); - } + this.listenThread.Start(); + } - private void ListenForClients() - { - this.tcpListener.Start(); + private void ListenForClients() + { + this.tcpListener.Start(); - while (true) - { - TcpClient client = null; - try - { - //blocks until a client has connected to the server - client = this.tcpListener.AcceptTcpClient(); - } - catch (Exception) { break; } - count++; - OnlinePlayer player = new OnlinePlayer(client, Server); - Server.Players.Add(player); - System.Console.WriteLine("New Player Joined"); + while (true) + { + TcpClient client = null; + try + { + //blocks until a client has connected to the server + client = this.tcpListener.AcceptTcpClient(); + } + catch (Exception) { break; } + count++; + OnlinePlayer player = new OnlinePlayer(client, Server); + Server.Players.Add(player); + System.Console.WriteLine("New Player Joined"); - //create a thread to handle communication - //with connected client - Thread clientThread = new Thread(new ParameterizedThreadStart(player.Receive)); - clientThread.Name = "Multiplayer Server-Client";// +count; - player.thread = clientThread; - clientThread.Start(client); - } - } - } + //create a thread to handle communication + //with connected client + Thread clientThread = new Thread(new ParameterizedThreadStart(player.Receive)); + clientThread.Name = "Multiplayer Server-Client";// +count; + player.thread = clientThread; + clientThread.Start(client); + } + } + } } diff --git a/Source/Orts.Simulation/Simulation/AIs/AI.cs b/Source/Orts.Simulation/Simulation/AIs/AI.cs index 6331fea0f4..174ef6115b 100644 --- a/Source/Orts.Simulation/Simulation/AIs/AI.cs +++ b/Source/Orts.Simulation/Simulation/AIs/AI.cs @@ -30,19 +30,18 @@ // #define DEBUG_TRACEINFO // +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; using Orts.Formats.Msts; using Orts.MultiPlayer; using Orts.Simulation.Physics; using Orts.Simulation.RollingStocks; -using Orts.Simulation.Timetables; using Orts.Simulation.RollingStocks.SubSystems; -using Orts.Simulation.Signalling; +using Orts.Simulation.Timetables; using ORTS.Common; using ORTS.Scripting.Api; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; namespace Orts.Simulation.AIs { @@ -174,7 +173,8 @@ public AI(Simulator simulator, BinaryReader inf) } // timetable mode trains - else { + else + { TTTrain aiTrain = new TTTrain(Simulator, inf, this); if (aiTrain.TrainType != Train.TRAINTYPE.PLAYER) // add to AITrains except when it is player train { @@ -623,7 +623,7 @@ private void PrerunAI(int playerTrainOriginalTrain, TTTrain.FormCommand playerTr Trace.TraceInformation("Player train started on time"); TTTrain playerTTTrain = playerTrain as TTTrain; playerTTTrain.InitalizePlayerTrain(); - + clockTime = Simulator.ClockTime = playerTTTrain.StartTime.Value; } @@ -1372,7 +1372,7 @@ public void InsertTrain(AITrain thisTrain) Trace.TraceInformation("Train : " + thisTrain.Name + " : missing start time, train not included"); return; } - + if (this.Count == 0) { this.AddFirst(thisTrain); diff --git a/Source/Orts.Simulation/Simulation/AIs/AIAuxAction.cs b/Source/Orts.Simulation/Simulation/AIs/AIAuxAction.cs index 7ea6467178..9f0faaee55 100644 --- a/Source/Orts.Simulation/Simulation/AIs/AIAuxAction.cs +++ b/Source/Orts.Simulation/Simulation/AIs/AIAuxAction.cs @@ -21,6 +21,10 @@ * */ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; using Newtonsoft.Json; using Orts.Formats.Msts; using Orts.Formats.OR; @@ -29,11 +33,6 @@ using Orts.Simulation.RollingStocks.SubSystems.Controllers; using Orts.Simulation.Signalling; using ORTS.Common; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using Event = Orts.Common.Event; namespace Orts.Simulation.AIs { @@ -50,7 +49,7 @@ public class AuxActionsContainer : ActionContainer public Train.DistanceTravelledActions genRequiredActions = new Train.DistanceTravelledActions(); // distance travelled Generic action list for AITrain public Train.DistanceTravelledActions specRequiredActions = new Train.DistanceTravelledActions(); - Train ThisTrain; + Train ThisTrain; public AuxActionsContainer(Train thisTrain, ORRouteConfig orRouteConfig) { @@ -145,13 +144,13 @@ public void Save(BinaryWriter outf, int currentClock) if (ThisTrain is AITrain && ((aiTrain.MovementState == AITrain.AI_MOVEMENT_STATE.HANDLE_ACTION && aiTrain.nextActionInfo != null && aiTrain.nextActionInfo.NextAction == AIActionItem.AI_ACTION_TYPE.AUX_ACTION && aiTrain.nextActionInfo is AuxActionWPItem) - || ( aiTrain.AuxActionsContain.SpecAuxActions.Count > 0 && + || (aiTrain.AuxActionsContain.SpecAuxActions.Count > 0 && aiTrain.AuxActionsContain.SpecAuxActions[0] is AIActionWPRef && (aiTrain.AuxActionsContain.SpecAuxActions[0] as AIActionWPRef).keepIt != null && (aiTrain.AuxActionsContain.SpecAuxActions[0] as AIActionWPRef).keepIt.currentMvmtState == AITrain.AI_MOVEMENT_STATE.HANDLE_ACTION))) // WP is running { // Do nothing if it is an absolute WP - if (!(aiTrain.AuxActionsContain.SpecAuxActions.Count > 0 && aiTrain.AuxActionsContain.SpecAuxActions[0] is AIActionWPRef && + if (!(aiTrain.AuxActionsContain.SpecAuxActions.Count > 0 && aiTrain.AuxActionsContain.SpecAuxActions[0] is AIActionWPRef && (aiTrain.AuxActionsContain.SpecAuxActions[0] as AIActionWPRef).Delay >= 30000 && (aiTrain.AuxActionsContain.SpecAuxActions[0] as AIActionWPRef).Delay < 40000)) { int remainingDelay; @@ -187,7 +186,7 @@ public void Save(BinaryWriter outf, int currentClock) List> converted = new List>(); foreach (var action in actionContainer.GenAuxActions) { - if (action.Value.GetType() == typeof(AuxActionHorn)) + if (action.Value.GetType() == typeof(AuxActionHorn)) { AIActionHornRef horn = new AIActionHornRef(thisTrain, (AuxActionHorn)action.Value, 0); List> listInfo = horn.GetCallFunction(); @@ -217,7 +216,7 @@ public void Save(BinaryWriter outf, int currentClock) } protected List> SetGenAuxActions(AITrain thisTrain, ORRouteConfig orRouteConfig) // Add here the new Generic Action - { + { List> loaded = null; #if WITH_GEN_ACTION //AIActionSignalRef actionSignal = new AIActionSignalRef(thisTrain, 0f, 0f, 0, 0, 0, 0); @@ -331,7 +330,7 @@ public void ProcessGenAction(AITrain thisTrain, int presentTime, float elapsedCl List itemList = new List(); foreach (var action in genRequiredActions) { - AIActionItem actionItem = action as AIActionItem; + AIActionItem actionItem = action as AIActionItem; if (actionItem.RequiredDistance <= ThisTrain.DistanceTravelledM) { itemList.Add(actionItem); @@ -355,7 +354,7 @@ public AITrain.AI_MOVEMENT_STATE ProcessSpecAction(AITrain thisTrain, int presen { AIActionItem actionItem = action as AIActionItem; if (actionItem.RequiredDistance >= ThisTrain.DistanceTravelledM) - continue; + continue; if (actionItem is AuxActSigDelegate) { var actionRef = (actionItem as AuxActSigDelegate).ActionRef; @@ -415,7 +414,7 @@ public void RemoveAt(int posit) } set { - + } } @@ -441,7 +440,7 @@ public void SetAuxAction(Train thisTrain) AIAuxActionsRef thisAction; int specAuxActionsIndex = 0; bool requiredActionsInserted = false; - while (specAuxActionsIndex <= SpecAuxActions.Count-1) + while (specAuxActionsIndex <= SpecAuxActions.Count - 1) { while (SpecAuxActions.Count > 0) { @@ -545,7 +544,7 @@ public void ResetAuxAction(Train thisTrain) if (thisAction.SubrouteIndex != thisTrain.TCRoute.activeSubpath) return; thisAction.LinkedAuxAction = false; return; - } + } //================================================================================================// // @@ -571,7 +570,7 @@ public void MoveAuxAction(Train thisTrain) thisWPItem.ActivateDistanceM = thisTrain.PresentPosition[0].DistanceTravelledM - 5; thisAction.LinkedAuxAction = true; } - } + } thisAction.RequiredDistance = thisTrain.PresentPosition[0].TCOffset - 5; } } @@ -587,8 +586,8 @@ public void MoveAuxActionAfterReversal(Train thisTrain) return; AIAuxActionsRef thisAction; thisAction = (AIAuxActionsRef)SpecAuxActions[0]; - if (thisAction is AIActionWPRef && thisAction.SubrouteIndex == thisTrain.TCRoute.activeSubpath+1 && thisAction.TCSectionIndex == thisTrain.PresentPosition[1].TCSectionIndex) - // Waiting point is just in the same section where the train is; move it under the train + if (thisAction is AIActionWPRef && thisAction.SubrouteIndex == thisTrain.TCRoute.activeSubpath + 1 && thisAction.TCSectionIndex == thisTrain.PresentPosition[1].TCSectionIndex) + // Waiting point is just in the same section where the train is; move it under the train { int thisSectionIndex = thisTrain.PresentPosition[1].TCSectionIndex; TrackCircuitSection thisSection = thisTrain.signalRef.TrackCircuitList[thisSectionIndex]; @@ -886,7 +885,7 @@ public AIActionWPRef(Train thisTrain, float distance, float requiredSpeedMpS, in } public AIActionWPRef(Train thisTrain, BinaryReader inf) - : base (thisTrain, inf) + : base(thisTrain, inf) { Delay = inf.ReadInt32(); OriginalDelay = inf.ReadInt32(); @@ -1043,7 +1042,7 @@ public override float[] CalculateDistancesToNextAction(Train thisTrain, float pr else { activateDistanceTravelledM = thisTrain.PresentPosition[0].DistanceTravelledM + thisTrain.ValidRoute[0].GetDistanceAlongRoute(actionIndex0, leftInSectionM, actionRouteIndex, this.RequiredDistance, true, thisTrain.signalRef); - triggerDistanceM = activateDistanceTravelledM - Math.Min(this.RequiredDistance, 300); + triggerDistanceM = activateDistanceTravelledM - Math.Min(this.RequiredDistance, 300); if (activateDistanceTravelledM < thisTrain.PresentPosition[0].DistanceTravelledM && thisTrain.PresentPosition[0].DistanceTravelledM - activateDistanceTravelledM < thisTrain.Length) @@ -1063,7 +1062,7 @@ public override float[] CalculateDistancesToNextAction(Train thisTrain, float pr { List> listInfo = new List>(); - System.Type managed = typeof(SignalObject); + System.Type managed = typeof(SignalObject); KeyValuePair info = new KeyValuePair(managed, this); listInfo.Add(info); return listInfo; @@ -1158,7 +1157,7 @@ public override AIActionItem CheckGenActions(WorldLocation location, AITrain thi float minDist = Math.Min(Math.Abs(rearDist), frontDist); float[] distances = GetActivationDistances(thisTrain, location); - + #if WITH_PATH_DEBUG File.AppendAllText(@"C:\temp\checkpath.txt", "GenFunctions not yet defined for train:" + thisTrain.Number + " Activation Distance: " + distances[0] + " & train distance: " + (-minDist) + "\n"); @@ -1295,7 +1294,7 @@ public override AIActionItem CheckGenActions(WorldLocation location, AITrain thi if (Math.Abs(SpeedMps) <= Simulator.MaxStoppedMpS && (int)list[0] >= Delay) // We call the handler to generate an actionRef { newAction = Handler(thisTrain.SpeedMpS, (int)list[0]); - + Register(thisTrain.Number, location); #if WITH_PATH_DEBUG File.AppendAllText(@"C:\temp\checkpath.txt", "Caller registered for\n"); @@ -1435,8 +1434,8 @@ public AIActSigDelegateRef(Train thisTrain, float distance, float requiredSpeedM AssociatedWPAction = associatedWPAction; NextAction = AUX_ACTION.SIGNAL_DELEGATE; IsGeneric = true; - - brakeSection = distance; // Set to 1 later when applicable + + brakeSection = distance; // Set to 1 later when applicable } public AIActSigDelegateRef(Train thisTrain, BinaryReader inf) @@ -1492,7 +1491,7 @@ public override AIActionItem Handler(params object[] list) return null; AuxActSigDelegate info = new AuxActSigDelegate(this, AIActionItem.AI_ACTION_TYPE.AUX_ACTION); info.SetParam((float)list[0], (float)list[1], (float)list[2], (float)list[3]); - AssociatedItem = info; + AssociatedItem = info; return (AIActionItem)info; } @@ -1565,7 +1564,7 @@ public class AuxActionItem : AIActionItem public bool Triggered = false; public bool Processing = false; public AITrain.AI_MOVEMENT_STATE currentMvmtState = AITrain.AI_MOVEMENT_STATE.INIT_ACTION; - public SignalObject SignalReferenced { get { return ((AIAuxActionsRef)ActionRef).SignalReferenced; } set {} } + public SignalObject SignalReferenced { get { return ((AIAuxActionsRef)ActionRef).SignalReferenced; } set { } } //================================================================================================// /// @@ -1574,7 +1573,7 @@ public class AuxActionItem : AIActionItem /// public AuxActionItem(AuxActionRef thisItem, AI_ACTION_TYPE thisAction) : - base ( null, thisAction) + base(null, thisAction) { NextAction = AI_ACTION_TYPE.AUX_ACTION; ActionRef = thisItem; @@ -1758,7 +1757,7 @@ public override AITrain.AI_MOVEMENT_STATE InitAction(Train thisTrain, int presen } int correctedTime = presentTime; // If delay between 40000 and 60000 an uncoupling is performed and delay is returned with the two lowest digits of the original one - aiTrain.TestUncouple( ref Delay); + aiTrain.TestUncouple(ref Delay); // If delay between 30000 and 40000 it is considered an absolute delay in the form 3HHMM, where HH and MM are hour and minute where the delay ends thisTrain.TestAbsDelay(ref Delay, correctedTime); // If delay equal to 60001 it is considered as a command to unconditionally attach to the nearby train; @@ -1782,7 +1781,7 @@ public override AITrain.AI_MOVEMENT_STATE HandleAction(Train thisTrain, int pres { if (thisTrain.TrainType != Train.TRAINTYPE.AI_PLAYERDRIVEN) { - thisTrain.SpeedMpS = 0; + thisTrain.SpeedMpS = 0; } AITrain aiTrain = thisTrain as AITrain; @@ -1870,7 +1869,7 @@ public override AITrain.AI_MOVEMENT_STATE ProcessAction(Train thisTrain, int pre thisTrain.AuxActionsContain.Remove(this); - #if WITH_PATH_DEBUG +#if WITH_PATH_DEBUG else { File.AppendAllText(@"C:\temp\checkpath.txt", "AITRain " + thisTrain.Number + "! No more AuxActions...\n"); @@ -1881,7 +1880,7 @@ public override AITrain.AI_MOVEMENT_STATE ProcessAction(Train thisTrain, int pre AITrain aiTrain = thisTrain as AITrain; //movementState = thisTrain.UpdateStoppedState(); // Don't call UpdateStoppedState(), WP can't touch Signal - movementState = AITrain.AI_MOVEMENT_STATE.BRAKING; + movementState = AITrain.AI_MOVEMENT_STATE.BRAKING; aiTrain.ResetActions(true); #if WITH_PATH_DEBUG File.AppendAllText(@"C:\temp\checkpath.txt", "AITRain " + aiTrain.Number + " is " + movementState.ToString() + " at " + presentTime + "\n"); @@ -1889,7 +1888,7 @@ public override AITrain.AI_MOVEMENT_STATE ProcessAction(Train thisTrain, int pre } break; default: - break; + break; } if (ActionRef.IsGeneric) currentMvmtState = movementState; @@ -2627,7 +2626,7 @@ public override bool CanActivate(Train thisTrain, float SpeedMpS, bool reschedul if (!reschedule && ((AIActSigDelegateRef)ActionRef).IsAbsolute) { TrackCircuitSection thisSection = thisTrain.signalRef.TrackCircuitList[((AIActSigDelegateRef)ActionRef).TCSectionIndex]; - if (((thisSection.CircuitState.TrainReserved != null && thisSection.CircuitState.TrainReserved.Train == thisTrain) || thisSection.CircuitState.ThisTrainOccupying(thisTrain) ) && + if (((thisSection.CircuitState.TrainReserved != null && thisSection.CircuitState.TrainReserved.Train == thisTrain) || thisSection.CircuitState.ThisTrainOccupying(thisTrain)) && ((AIActSigDelegateRef)ActionRef).EndSignalIndex != -1) return true; } @@ -2689,7 +2688,7 @@ public override AITrain.AI_MOVEMENT_STATE HandleAction(Train thisTrain, int pres SignalReferenced.UnlockForTrain(thisTrain.Number, thisTrain.TCRoute.activeSubpath); else { -// locked = true; + // locked = true; Trace.TraceWarning("SignalObject trItem={0}, trackNode={1}, wasn't locked for train {2}.", SignalReferenced.trItem, SignalReferenced.trackNode, thisTrain.Number); } @@ -2730,10 +2729,10 @@ public override AITrain.AI_MOVEMENT_STATE HandleAction(Train thisTrain, int pres public override AITrain.AI_MOVEMENT_STATE ProcessAction(Train thisTrain, int presentTime, float elapsedClockSeconds, AITrain.AI_MOVEMENT_STATE movementState) { - movementState = base.ProcessAction(thisTrain, presentTime, elapsedClockSeconds, movementState); + movementState = base.ProcessAction(thisTrain, presentTime, elapsedClockSeconds, movementState); return movementState; } } -#endregion + #endregion } diff --git a/Source/Orts.Simulation/Simulation/AIs/AIPath.cs b/Source/Orts.Simulation/Simulation/AIs/AIPath.cs index 96fdb86982..46bb44b084 100644 --- a/Source/Orts.Simulation/Simulation/AIs/AIPath.cs +++ b/Source/Orts.Simulation/Simulation/AIs/AIPath.cs @@ -22,14 +22,14 @@ * Could this be used for player trains also? * */ -using Orts.Formats.Msts; -using Orts.Formats.OR; -using ORTS.Common; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; +using Orts.Formats.Msts; +using Orts.Formats.OR; +using ORTS.Common; namespace Orts.Simulation.AIs { @@ -88,7 +88,7 @@ public AIPath(TDBFile TDB, TSectionDatFile tsectiondat, string filePath) if (tpn.HasNextMainNode) { node.NextMainNode = Nodes[(int)tpn.nextMainNode]; - node.NextMainTVNIndex = node.FindTVNIndex(node.NextMainNode, TDB, tsectiondat, i == 0 ? -1 : Nodes[i-1].NextMainTVNIndex ); + node.NextMainTVNIndex = node.FindTVNIndex(node.NextMainNode, TDB, tsectiondat, i == 0 ? -1 : Nodes[i - 1].NextMainTVNIndex); if (node.JunctionIndex >= 0) node.IsFacingPoint = TestFacingPoint(node.JunctionIndex, node.NextMainTVNIndex); if (node.NextMainTVNIndex < 0) @@ -292,7 +292,7 @@ public AIPathNode(TrPathNode tpn, TrackPDP pdp, TrackDB trackDB, bool isTimetabl /// Constructor from other AIPathNode /// /// - + public AIPathNode(AIPathNode otherNode) { ID = otherNode.ID; @@ -348,34 +348,34 @@ private void InterpretPathNodeFlags(TrPathNode tpn, TrackPDP pdp, bool isTimetab } WaitTimeS = (int)((tpn.pathFlags >> 16) & 0xffff); // get the AAAA part. - // computations for absolute wait times are made within AITrain.cs -/* if (WaitTimeS >= 30000 && WaitTimeS < 40000) - { - // real wait time. - // waitTimeS (in decimal notation) = 3HHMM (hours and minuts) - int hour = (WaitTimeS / 100) % 100; - int minute = WaitTimeS % 100; - WaitUntil = 60 * (minute + 60 * hour); - WaitTimeS = 0; - }*/ + // computations for absolute wait times are made within AITrain.cs + /* if (WaitTimeS >= 30000 && WaitTimeS < 40000) + { + // real wait time. + // waitTimeS (in decimal notation) = 3HHMM (hours and minuts) + int hour = (WaitTimeS / 100) % 100; + int minute = WaitTimeS % 100; + WaitUntil = 60 * (minute + 60 * hour); + WaitTimeS = 0; + }*/ // computations are made within AITrain.cs -/* else if (WaitTimeS >= 40000 && WaitTimeS < 60000) - { - // Uncouple if a wait=stop point - // waitTimeS (in decimal notation) = 4NNSS (uncouple NN cars, wait SS seconds) - // or 5NNSS (uncouple NN cars, keep rear, wait SS seconds) - NCars = (WaitTimeS / 100) % 100; - if (WaitTimeS >= 50000) - NCars = -NCars; - WaitTimeS %= 100; - if (Type == AIPathNodeType.Stop) - Type = AIPathNodeType.Uncouple; - } - else if (WaitTimeS >= 60000) // this is old and should be removed/reused - { - // waitTimes = 6xSSS with waitTime SSS seconds. - WaitTimeS %= 1000; - } */ + /* else if (WaitTimeS >= 40000 && WaitTimeS < 60000) + { + // Uncouple if a wait=stop point + // waitTimeS (in decimal notation) = 4NNSS (uncouple NN cars, wait SS seconds) + // or 5NNSS (uncouple NN cars, keep rear, wait SS seconds) + NCars = (WaitTimeS / 100) % 100; + if (WaitTimeS >= 50000) + NCars = -NCars; + WaitTimeS %= 100; + if (Type == AIPathNodeType.Stop) + Type = AIPathNodeType.Uncouple; + } + else if (WaitTimeS >= 60000) // this is old and should be removed/reused + { + // waitTimes = 6xSSS with waitTime SSS seconds. + WaitTimeS %= 1000; + } */ } diff --git a/Source/Orts.Simulation/Simulation/AIs/AITrain.cs b/Source/Orts.Simulation/Simulation/AIs/AITrain.cs index 145f9e7a07..9d2ed63f04 100644 --- a/Source/Orts.Simulation/Simulation/AIs/AITrain.cs +++ b/Source/Orts.Simulation/Simulation/AIs/AITrain.cs @@ -251,7 +251,7 @@ public AITrain(Simulator simulator, BinaryReader inf, AI airef) UncondAttach = inf.ReadBoolean(); doorCloseAdvance = inf.ReadSingle(); doorOpenDelay = inf.ReadSingle(); - if ( !Simulator.TimetableMode && doorOpenDelay <= 0 && doorCloseAdvance > 0 && Simulator.OpenDoorsInAITrains && + if (!Simulator.TimetableMode && doorOpenDelay <= 0 && doorCloseAdvance > 0 && Simulator.OpenDoorsInAITrains && MovementState == AI_MOVEMENT_STATE.STATION_STOP && StationStops.Count > 0) { StationStop thisStation = StationStops[0]; @@ -472,7 +472,7 @@ public override bool PostInit() BuildStationList(activityClearingDistanceM); // This creates problems in push-pull paths -// StationStops.Sort(); + // StationStops.Sort(); if (!atStation && StationStops.Count > 0 && this != Simulator.Trains[0]) { if (MaxVelocityA > 0 && @@ -602,13 +602,13 @@ public override AI_MOVEMENT_STATE GetAIMovementState() return (ControlMode == TRAIN_CONTROL.INACTIVE ? AI_MOVEMENT_STATE.AI_STATIC : MovementState); } - + //================================================================================================// /// /// Get AI Movement State /// /// - private void RandomizeEfficiency (ref float efficiency) + private void RandomizeEfficiency(ref float efficiency) { efficiency *= 100; var incOrDecEfficiency = DateTime.Now.Millisecond % 2 == 0 ? true : false; @@ -991,8 +991,8 @@ public void AIUpdate(float elapsedClockSeconds, double clockTime, bool preUpdate countRequiredAction = requiredActions.Count; } #endif - // Trace.TraceWarning ("Time {0} Train no. {1} Speed {2} AllowedMaxSpeed {3} Throttle percent {4} Distance travelled {5} Movement State {6} BrakePerCent {7}", - // clockTime, Number, SpeedMpS, AllowedMaxSpeedMpS, AITrainThrottlePercent, DistanceTravelledM, MovementState, AITrainBrakePercent); + // Trace.TraceWarning ("Time {0} Train no. {1} Speed {2} AllowedMaxSpeed {3} Throttle percent {4} Distance travelled {5} Movement State {6} BrakePerCent {7}", + // clockTime, Number, SpeedMpS, AllowedMaxSpeedMpS, AITrainThrottlePercent, DistanceTravelledM, MovementState, AITrainBrakePercent); } //================================================================================================// @@ -1325,7 +1325,7 @@ public virtual void SetNextStationAction(bool fromAutopilotSwitch = false) while (!validStop) { float[] distancesM = CalculateDistancesToNextStation(thisStation, TrainMaxSpeedMpS, false); - if (distancesM[0] < 0f && !(MovementState == AI_MOVEMENT_STATE.STATION_STOP && distancesM[0] != -1)) // stop is not valid + if (distancesM[0] < 0f && !(MovementState == AI_MOVEMENT_STATE.STATION_STOP && distancesM[0] != -1)) // stop is not valid { StationStops.RemoveAt(0); @@ -2107,9 +2107,9 @@ public virtual void UpdateStationState(float elapsedClockSeconds, int presentTim else if (thisStation.ExitSignal >= 0 && NextSignalObject[0] != null && NextSignalObject[0].thisRef == thisStation.ExitSignal) { MstsSignalAspect nextAspect = GetNextSignalAspect(0); - if (nextAspect == MstsSignalAspect.STOP && !NextSignalObject[0].HasLockForTrain(Number, TCRoute.activeSubpath) && + if (nextAspect == MstsSignalAspect.STOP && !NextSignalObject[0].HasLockForTrain(Number, TCRoute.activeSubpath) && !(TCRoute.TCRouteSubpaths[TCRoute.activeSubpath].Count - 1 == PresentPosition[0].RouteListIndex && - TCRoute.TCRouteSubpaths.Count -1 == TCRoute.activeSubpath)) + TCRoute.TCRouteSubpaths.Count - 1 == TCRoute.activeSubpath)) { return; // do not depart if exit signal at danger } @@ -3030,14 +3030,14 @@ public virtual void UpdateAccelState(float elapsedClockSeconds) public virtual void UpdateFollowingState(float elapsedClockSeconds, int presentTime) { if (nextActionInfo != null && nextActionInfo.NextAction == AIActionItem.AI_ACTION_TYPE.TRAIN_AHEAD && nextActionInfo.ActivateDistanceM - PresentPosition[0].DistanceTravelledM < -5) - if (CheckTrain) - { - File.AppendAllText(@"C:\temp\checktrain.txt", - "Update Train Ahead - now at : " + - PresentPosition[0].TCSectionIndex.ToString() + " " + - PresentPosition[0].TCOffset.ToString() + - " ; speed : " + FormatStrings.FormatSpeed(SpeedMpS, true) + "\n"); - } + if (CheckTrain) + { + File.AppendAllText(@"C:\temp\checktrain.txt", + "Update Train Ahead - now at : " + + PresentPosition[0].TCSectionIndex.ToString() + " " + + PresentPosition[0].TCOffset.ToString() + + " ; speed : " + FormatStrings.FormatSpeed(SpeedMpS, true) + "\n"); + } if (ControlMode != TRAIN_CONTROL.AUTO_NODE || EndAuthorityType[0] != END_AUTHORITY.TRAIN_AHEAD) // train is gone { @@ -3131,8 +3131,8 @@ public virtual void UpdateFollowingState(float elapsedClockSeconds, int presentT if (OtherTrain.TrainType == TRAINTYPE.STATIC || (OtherTrain.PresentPosition[0].TCSectionIndex == TCRoute.TCRouteSubpaths[TCRoute.activeSubpath][TCRoute.TCRouteSubpaths[TCRoute.activeSubpath].Count - 1].TCSectionIndex || OtherTrain.PresentPosition[1].TCSectionIndex == - TCRoute.TCRouteSubpaths[TCRoute.activeSubpath][TCRoute.TCRouteSubpaths[TCRoute.activeSubpath].Count - 1].TCSectionIndex) && - (TCRoute.ReversalInfo[TCRoute.activeSubpath].Valid || TCRoute.activeSubpath == TCRoute.TCRouteSubpaths.Count - 1) + TCRoute.TCRouteSubpaths[TCRoute.activeSubpath][TCRoute.TCRouteSubpaths[TCRoute.activeSubpath].Count - 1].TCSectionIndex) && + (TCRoute.ReversalInfo[TCRoute.activeSubpath].Valid || TCRoute.activeSubpath == TCRoute.TCRouteSubpaths.Count - 1) || UncondAttach) { attachToTrain = true; @@ -3378,7 +3378,7 @@ public virtual void UpdateFollowingState(float elapsedClockSeconds, int presentT bool runningAgainst = false; if (PresentPosition[0].TCSectionIndex == OtherTrain.PresentPosition[0].TCSectionIndex && PresentPosition[0].TCDirection != OtherTrain.PresentPosition[0].TCDirection) runningAgainst = true; - if ((SpeedMpS > (OtherTrain.SpeedMpS + hysterisMpS) && !runningAgainst)|| + if ((SpeedMpS > (OtherTrain.SpeedMpS + hysterisMpS) && !runningAgainst) || SpeedMpS > (maxFollowSpeedMpS + hysterisMpS) || distanceToTrain < (keepDistanceTrainM - clearingDistanceM)) { @@ -3910,7 +3910,7 @@ public void BuildWaitingPointList(float clearingDistanceM) { endSectionFound = true; if (routeIndex < thisRoute.Count - 1) - endSignalIndex = thisSection.EndSignals[direction].thisRef; + endSignalIndex = thisSection.EndSignals[direction].thisRef; } // check if next section is junction @@ -3933,7 +3933,7 @@ public void BuildWaitingPointList(float clearingDistanceM) endSectionFound = true; lastIndex = nextIndex; if (lastIndex < thisRoute.Count - 1) - endSignalIndex = nextSection.EndSignals[direction].thisRef; + endSignalIndex = nextSection.EndSignals[direction].thisRef; } else if (nextSection.CircuitType != TrackCircuitSection.TrackCircuitType.Normal) { @@ -4055,7 +4055,7 @@ public void BuildWaitingPointList(float clearingDistanceM) { RandomizedWPDelay(ref randomizedDelay); } - action.SetDelay( (randomizedDelay >= 30000 && randomizedDelay < 40000)? randomizedDelay : 0); + action.SetDelay((randomizedDelay >= 30000 && randomizedDelay < 40000) ? randomizedDelay : 0); AuxActionsContain.Add(action); AIActSigDelegateRef delegateAction = new AIActSigDelegateRef(this, waitingPoint[5], 0f, waitingPoint[0], lastIndex, thisRoute[lastIndex].TCSectionIndex, direction, action); signalRef.SignalObjects[signalIndex[iWait]].LockForTrain(this.Number, waitingPoint[0]); @@ -4246,7 +4246,7 @@ public virtual void ProcessEndOfPathReached(ref bool[] returnValue, int PresentT MovementState = AI_MOVEMENT_STATE.FROZEN; } } - else + else { TrackCircuitSection thisSection = signalRef.TrackCircuitList[PresentPosition[1].TCSectionIndex]; if (TCRoute.ReversalInfo[TCRoute.activeSubpath - 1].Valid && PresentPosition[1].DistanceTravelledM < distanceThreshold && PresentPosition[1].TCOffset < 25) @@ -4260,7 +4260,7 @@ public virtual void ProcessEndOfPathReached(ref bool[] returnValue, int PresentT } } } - + if (removeIt) { if (IncorporatedTrainNo >= 0 && Simulator.TrainDictionary.Count > IncorporatedTrainNo && @@ -5839,7 +5839,7 @@ public void EndProcessAction(bool actionValid, AIActionItem thisItem, bool actio } StationStops[0].DistanceToTrainM = thisItem.ActiveItem.distance_to_train - 1; nextActionInfo.ActivateDistanceM = thisItem.ActivateDistanceM - 1; - } + } } // check if present action is signal and new action is station - if so, check actual position of signal in relation to stop @@ -5870,8 +5870,8 @@ public void EndProcessAction(bool actionValid, AIActionItem thisItem, bool actio if (!earlier && thisItem.NextAction == AIActionItem.AI_ACTION_TYPE.STATION_STOP && (nextActionInfo.NextAction == AIActionItem.AI_ACTION_TYPE.END_OF_ROUTE || nextActionInfo.NextAction == AIActionItem.AI_ACTION_TYPE.END_OF_AUTHORITY)) { - earlier = true; - nextActionInfo.ActivateDistanceM = thisItem.ActivateDistanceM + 1.0f; + earlier = true; + nextActionInfo.ActivateDistanceM = thisItem.ActivateDistanceM + 1.0f; } // if not earlier and is a waiting point and present action is signal stop : check if signal is locking signal, if so set waiting @@ -5992,8 +5992,8 @@ public void EndProcessAction(bool actionValid, AIActionItem thisItem, bool actio #endif - if (MovementState != AI_MOVEMENT_STATE.STATION_STOP && - MovementState != AI_MOVEMENT_STATE.STOPPED && + if (MovementState != AI_MOVEMENT_STATE.STATION_STOP && + MovementState != AI_MOVEMENT_STATE.STOPPED && MovementState != AI_MOVEMENT_STATE.HANDLE_ACTION && MovementState != AI_MOVEMENT_STATE.FOLLOWING && MovementState != AI_MOVEMENT_STATE.TURNTABLE && @@ -6626,7 +6626,7 @@ public override void CheckStationTask() { float distanceToNextSignal = -1; if (NextSignalObject[0] != null) distanceToNextSignal = NextSignalObject[0].DistanceTo(FrontTDBTraveller); - // check if signal ahead is cleared - if not, do not allow depart + // check if signal ahead is cleared - if not, do not allow depart if (NextSignalObject[0] != null && distanceToNextSignal >= 0 && distanceToNextSignal < 300 && NextSignalObject[0].this_sig_lr(MstsSignalFunction.NORMAL) == MstsSignalAspect.STOP && NextSignalObject[0].hasPermission != SignalObject.Permission.Granted) @@ -6658,7 +6658,7 @@ public override void CheckStationTask() if (Math.Abs(SpeedMpS) == 0.0f) { AtStation = IsAtPlatform(); - if (AtStation) + if (AtStation) { int presentTime = Convert.ToInt32(Math.Floor(Simulator.ClockTime)); StationStops[0].ActualArrival = presentTime; diff --git a/Source/Orts.Simulation/Simulation/Activity.cs b/Source/Orts.Simulation/Simulation/Activity.cs index 939b38216c..109dc71dbd 100644 --- a/Source/Orts.Simulation/Simulation/Activity.cs +++ b/Source/Orts.Simulation/Simulation/Activity.cs @@ -15,12 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Microsoft.Xna.Framework; -using Orts.Formats.Msts; -using Orts.Simulation.AIs; -using Orts.Simulation.Physics; -using Orts.Simulation.Signalling; -using ORTS.Common; using System; using System.Collections.Generic; using System.Diagnostics; @@ -28,6 +22,12 @@ using System.IO; using System.Linq; using System.Text; +using Microsoft.Xna.Framework; +using Orts.Formats.Msts; +using Orts.Simulation.AIs; +using Orts.Simulation.Physics; +using Orts.Simulation.Signalling; +using ORTS.Common; using Event = Orts.Common.Event; namespace Orts.Simulation @@ -101,7 +101,7 @@ public Activity(ActivityFile actFile, Simulator simulator) foreach (var i in sd.Player_Traffic_Definition.Player_Traffic_List) { - if (i.PlatformStartID < Simulator.TDB.TrackDB.TrItemTable.Length && i.PlatformStartID >= 0 && + if (i.PlatformStartID < Simulator.TDB.TrackDB.TrItemTable.Length && i.PlatformStartID >= 0 && Simulator.TDB.TrackDB.TrItemTable[i.PlatformStartID] is PlatformItem) Platform = Simulator.TDB.TrackDB.TrItemTable[i.PlatformStartID] as PlatformItem; else @@ -519,18 +519,18 @@ public void AddRestrictZones(Tr_RouteFile routeFile, TrackSectionsFile tsectionD const float MaxDistanceOfWarningPost = 2000; for (int idxZone = 0; idxZone < zones.ActivityRestrictedSpeedZoneList.Count; idxZone++) - { - var worldPosition1 = new WorldPosition(); - newSpeedPostItems[0] = new TempSpeedPostItem(routeFile, + { + var worldPosition1 = new WorldPosition(); + newSpeedPostItems[0] = new TempSpeedPostItem(routeFile, zones.ActivityRestrictedSpeedZoneList[idxZone].StartPosition, true, worldPosition1, false); var worldPosition2 = new WorldPosition(); newSpeedPostItems[1] = new TempSpeedPostItem(routeFile, zones.ActivityRestrictedSpeedZoneList[idxZone].EndPosition, false, worldPosition2, false); - + // Add the speedposts to the track database. This will set the TrItemId's of all speedposts - trackDB.AddTrItems(newSpeedPostItems); + trackDB.AddTrItems(newSpeedPostItems); - // And now update the various (vector) tracknodes (this needs the TrItemIds. + // And now update the various (vector) tracknodes (this needs the TrItemIds. var endOffset = AddItemIdToTrackNode(ref zones.ActivityRestrictedSpeedZoneList[idxZone].EndPosition, tsectionDat, trackDB, newSpeedPostItems[1], out traveller); var startOffset = AddItemIdToTrackNode(ref zones.ActivityRestrictedSpeedZoneList[idxZone].StartPosition, @@ -554,15 +554,15 @@ public void AddRestrictZones(Tr_RouteFile routeFile, TrackSectionsFile tsectionD { FlipRestrSpeedPost((TempSpeedPostItem)speedWarningPostItem); } - ComputeTablePosition((TempSpeedPostItem)newSpeedPostItems[0]); + ComputeTablePosition((TempSpeedPostItem)newSpeedPostItems[0]); TempSpeedPostItems.Add((TempSpeedPostItem)newSpeedPostItems[0]); - ComputeTablePosition((TempSpeedPostItem)newSpeedPostItems[1]); + ComputeTablePosition((TempSpeedPostItem)newSpeedPostItems[1]); TempSpeedPostItems.Add((TempSpeedPostItem)newSpeedPostItems[1]); - ComputeTablePosition((TempSpeedPostItem)speedWarningPostItem); + ComputeTablePosition((TempSpeedPostItem)speedWarningPostItem); TempSpeedPostItems.Add((TempSpeedPostItem)speedWarningPostItem); } } - + /// /// Add a reference to a new TrItemId to the correct trackNode (which needs to be determined from the position) /// @@ -848,7 +848,7 @@ public override void NotifyEvent(ActivityEventType EventType) // The train is stopped. if (EventType == ActivityEventType.TrainStop) { - if (MyPlayerTrain.TrainType != Train.TRAINTYPE.AI_PLAYERHOSTING && IsAtStation(MyPlayerTrain) || + if (MyPlayerTrain.TrainType != Train.TRAINTYPE.AI_PLAYERHOSTING && IsAtStation(MyPlayerTrain) || MyPlayerTrain.TrainType == Train.TRAINTYPE.AI_PLAYERHOSTING && (MyPlayerTrain as AITrain).MovementState == AITrain.AI_MOVEMENT_STATE.STATION_STOP) { if (Simulator.TimetableMode || MyPlayerTrain.StationStops.Count == 0) @@ -889,7 +889,7 @@ public override void NotifyEvent(ActivityEventType EventType) } else { - // MSTS mode - player + // MSTS mode - player if (Simulator.GameTime < 2) { // If the simulation starts with a scheduled arrive in the past, assume the train arrived on time. @@ -900,30 +900,30 @@ public override void NotifyEvent(ActivityEventType EventType) } BoardingS = (double)MyPlayerTrain.StationStops[0].ComputeStationBoardingTime(Simulator.PlayerLocomotive.Train); if (BoardingS > 0 || ((double)(SchDepart - SchArrive).TotalSeconds > 0 && - MyPlayerTrain.PassengerCarsNumber == 1 && MyPlayerTrain.Cars.Count > 10 )) + MyPlayerTrain.PassengerCarsNumber == 1 && MyPlayerTrain.Cars.Count > 10)) { - // accepted station stop because either freight train or passenger train or fake passenger train with passenger car on platform or fake passenger train + // accepted station stop because either freight train or passenger train or fake passenger train with passenger car on platform or fake passenger train // with Scheduled Depart > Scheduled Arrive - // ActArrive is usually same as ClockTime - BoardingEndS = Simulator.ClockTime + BoardingS; + // ActArrive is usually same as ClockTime + BoardingEndS = Simulator.ClockTime + BoardingS; - if (ActArrive == null) - { - ActArrive = new DateTime().Add(TimeSpan.FromSeconds(Simulator.ClockTime)); - } + if (ActArrive == null) + { + ActArrive = new DateTime().Add(TimeSpan.FromSeconds(Simulator.ClockTime)); + } - arrived = true; - // But not if game starts after scheduled arrival. In which case actual arrival is assumed to be same as schedule arrival. - double sinceActArriveS = (new DateTime().Add(TimeSpan.FromSeconds(Simulator.ClockTime)) - - ActArrive).Value.TotalSeconds; - BoardingEndS -= sinceActArriveS; - double SchDepartS = SchDepart.Subtract(new DateTime()).TotalSeconds; - BoardingEndS = CompareTimes.LatestTime((int)SchDepartS, (int)BoardingEndS); + arrived = true; + // But not if game starts after scheduled arrival. In which case actual arrival is assumed to be same as schedule arrival. + double sinceActArriveS = (new DateTime().Add(TimeSpan.FromSeconds(Simulator.ClockTime)) + - ActArrive).Value.TotalSeconds; + BoardingEndS -= sinceActArriveS; + double SchDepartS = SchDepart.Subtract(new DateTime()).TotalSeconds; + BoardingEndS = CompareTimes.LatestTime((int)SchDepartS, (int)BoardingEndS); - } } - if (MyPlayerTrain.NextSignalObject[0] != null) - distanceToNextSignal = MyPlayerTrain.NextSignalObject[0].DistanceTo(MyPlayerTrain.FrontTDBTraveller); + } + if (MyPlayerTrain.NextSignalObject[0] != null) + distanceToNextSignal = MyPlayerTrain.NextSignalObject[0].DistanceTo(MyPlayerTrain.FrontTDBTraveller); } } @@ -937,7 +937,7 @@ public override void NotifyEvent(ActivityEventType EventType) // Completeness depends on the elapsed waiting time IsCompleted = maydepart; if (MyPlayerTrain.TrainType != Train.TRAINTYPE.AI_PLAYERHOSTING) - MyPlayerTrain.ClearStation(PlatformEnd1.LinkedPlatformItemId, PlatformEnd2.LinkedPlatformItemId, true); + MyPlayerTrain.ClearStation(PlatformEnd1.LinkedPlatformItemId, PlatformEnd2.LinkedPlatformItemId, true); if (LogStationStops) { @@ -997,7 +997,7 @@ public override void NotifyEvent(ActivityEventType EventType) else if (!maydepart) { // check if signal ahead is cleared - if not, do not allow depart - if (distanceToNextSignal >= 0 && distanceToNextSignal< 300 && MyPlayerTrain.NextSignalObject[0] != null && + if (distanceToNextSignal >= 0 && distanceToNextSignal < 300 && MyPlayerTrain.NextSignalObject[0] != null && MyPlayerTrain.NextSignalObject[0].this_sig_lr(MstsSignalFunction.NORMAL) == MstsSignalAspect.STOP && MyPlayerTrain.NextSignalObject[0].hasPermission != SignalObject.Permission.Granted) { @@ -1256,7 +1256,7 @@ public Boolean IsActivityEnded(Activity activity) } return false; } - + } public class EventCategoryActionWrapper : EventWrapper @@ -1399,11 +1399,11 @@ private Train matchesConsistNoOrder(List wagonIdList) if (trainItem.Cars.Count - nCars == (wagonIdList.Count == nWagonListCars ? wagonIdList.Count : nWagonListCars)) { if (excludesWagons(trainItem, wagonIdList)) listsMatch = false;//all wagons dropped - + if (listsMatch) return trainItem; - + } - + } return null; } diff --git a/Source/Orts.Simulation/Simulation/Confirmer.cs b/Source/Orts.Simulation/Simulation/Confirmer.cs index 406eaafdd0..d5d316e203 100644 --- a/Source/Orts.Simulation/Simulation/Confirmer.cs +++ b/Source/Orts.Simulation/Simulation/Confirmer.cs @@ -15,9 +15,9 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using ORTS.Common; using System; using System.Diagnostics; +using ORTS.Common; namespace Orts.Simulation { @@ -27,11 +27,12 @@ public enum ConfirmLevel [GetString("Information")] Information, [GetString("Warning")] Warning, [GetString("Error")] Error, - [GetString("MSG")] MSG, + [GetString("MSG")] MSG, }; // Some of these are not cab controls or even controls. However they all make good use of structured text. - public enum CabControl { + public enum CabControl + { None // Power , Reverser @@ -122,7 +123,8 @@ public enum CabControl { , CabRadio } - public enum CabSetting { + public enum CabSetting + { Name // name of control , Off // 2 or 3 state control/reset/initialise , Neutral // 2 or 3 state control @@ -162,7 +164,7 @@ public class Confirmer // be replaced with French and other languages. // // control, off/reset/initialize, neutral, on/apply/switch, decrease, increase, warn - readonly string[][] ConfirmText; + readonly string[][] ConfirmText; readonly Simulator Simulator; readonly double DefaultDurationS; @@ -182,12 +184,12 @@ public Confirmer(Simulator simulator, double defaultDurationS) ConfirmText = new string[][] { new string [] { GetString("") } // Power - , new string [] { GetParticularString("NonSteam", "Reverser"), GetString("reverse"), GetString("neutral"), GetString("forward"), null, null, GetString("locked. Close throttle, stop train then re-try.") } - , new string [] { GetString("Throttle"), null, null, null, GetString("close"), GetString("open"), GetString("locked. Release dynamic brake then re-try.") } + , new string [] { GetParticularString("NonSteam", "Reverser"), GetString("reverse"), GetString("neutral"), GetString("forward"), null, null, GetString("locked. Close throttle, stop train then re-try.") } + , new string [] { GetString("Throttle"), null, null, null, GetString("close"), GetString("open"), GetString("locked. Release dynamic brake then re-try.") } , new string [] { GetString("Wheel-slip"), GetString("over"), null, GetString("occurring. Tractive power greatly reduced."), null, null, GetString("warning") } // Electric power , new string [] { GetString("Power"), GetString("off"), null, GetString("on") } - , new string [] { GetString("Pantograph 1"), GetString("lower"), null, GetString("raise") } + , new string [] { GetString("Pantograph 1"), GetString("lower"), null, GetString("raise") } , new string [] { GetString("Pantograph 2"), GetString("lower"), null, GetString("raise") } , new string [] { GetString("Pantograph 3"), GetString("lower"), null, GetString("raise") } , new string [] { GetString("Pantograph 4"), GetString("lower"), null, GetString("raise") } @@ -201,50 +203,50 @@ public Confirmer(Simulator simulator, double defaultDurationS) , new string [] { GetString("Boiler Water Tank"), null, null, GetString("re-fueled"), null, GetString("level") } , new string [] { GetString("Traction cut-off relay"), GetString("open"), null, GetString("close") } // Steam power - , new string [] { GetParticularString("Steam", "Reverser"), GetString("reverse"), GetString("neutral"), GetString("forward"), null, null, GetString("locked. Close throttle, stop train then re-try.") } + , new string [] { GetParticularString("Steam", "Reverser"), GetString("reverse"), GetString("neutral"), GetString("forward"), null, null, GetString("locked. Close throttle, stop train then re-try.") } , new string [] { GetString("Regulator"), null, null, null, GetString("close"), GetString("open") } // Throttle for steam locomotives - , new string [] { GetString("Injector 1"), GetString("off"), null, GetString("on"), GetString("close"), GetString("open") } + , new string [] { GetString("Injector 1"), GetString("off"), null, GetString("on"), GetString("close"), GetString("open") } , new string [] { GetString("Injector 2"), GetString("off"), null, GetString("on"), GetString("close"), GetString("open") } , new string [] { GetString("Blowdown Valve"), GetString("close"), null, GetString("open") } - , new string [] { GetString("Blower"), null, null, null, GetString("decrease"), GetString("increase") } - , new string [] { GetString("SteamHeat"), null, null, null, GetString("decrease"), GetString("increase") } - , new string [] { GetString("Damper"), null, null, null, GetString("close"), GetString("open") } + , new string [] { GetString("Blower"), null, null, null, GetString("decrease"), GetString("increase") } + , new string [] { GetString("SteamHeat"), null, null, null, GetString("decrease"), GetString("increase") } + , new string [] { GetString("Damper"), null, null, null, GetString("close"), GetString("open") } , new string [] { GetString("Firebox Door"), null, null, null, GetString("close"), GetString("open") } - , new string [] { GetString("Firing Rate"), null, null, null, GetString("decrease"), GetString("increase") } - , new string [] { GetString("Manual Firing"), GetString("off"), null, GetString("on") } - , new string [] { GetString("Fire"), null, null, GetString("add shovel-full") } - , new string [] { GetString("Cylinder Cocks"), GetString("close"), null, GetString("open") } + , new string [] { GetString("Firing Rate"), null, null, null, GetString("decrease"), GetString("increase") } + , new string [] { GetString("Manual Firing"), GetString("off"), null, GetString("on") } + , new string [] { GetString("Fire"), null, null, GetString("add shovel-full") } + , new string [] { GetString("Cylinder Cocks"), GetString("close"), null, GetString("open") } , new string [] { GetString("Cylinder Compound"), GetString("close"), null, GetString("open") } , new string [] { GetString("LargeEjector"), null, null, null, GetString("decrease"), GetString("increase") } , new string [] { GetString("SmallEjector"), null, null, null, GetString("decrease"), GetString("increase") } , new string [] { GetString("VacuumExhauster"), GetString("normal"), null, GetString("fast") } - , new string [] { GetString("Tender"), null, null, GetString("Coal re-filled"), null, GetString("Coal level") } + , new string [] { GetString("Tender"), null, null, GetString("Coal re-filled"), null, GetString("Coal level") } , new string [] { GetString("Tender"), null, null, GetString("Water re-filled"), null, GetString("Water level") } // General , new string [] { GetString("Water Scoop"), GetString("up"), null, GetString("down") } // Braking - , new string [] { GetString("Train Brake"), null, null, null, GetString("release"), GetString("apply") } + , new string [] { GetString("Train Brake"), null, null, null, GetString("release"), GetString("apply") } , new string [] { GetString("Engine Brake"), null, null, null, GetString("release"), GetString("apply") } , new string [] { GetString("Brakeman Brake"), null, null, null, GetString("release"), GetString("apply") } , new string [] { GetString("Dynamic Brake"), GetString("off"), null, GetString("setup"), GetString("decrease"), GetString("increase") } - , new string [] { GetString("Emergency Brake"), GetString("release"), null, GetString("apply") } - , new string [] { GetString("Bail Off"), GetString("disengage"), null, GetString("engage") } - , new string [] { GetString("Brakes"), GetString("initialize"), null, null, null, null, GetString("cannot initialize. Stop train then re-try.") } - , new string [] { GetString("Handbrake"), GetString("none"), null, GetString("full") } - , new string [] { GetString("Retainers"), GetString("off"), null, GetString("on"), null, null, null, null, GetString("Exhaust"), GetString("High Pressure"), GetString("Low Pressure"), GetString("Slow Direct") } + , new string [] { GetString("Emergency Brake"), GetString("release"), null, GetString("apply") } + , new string [] { GetString("Bail Off"), GetString("disengage"), null, GetString("engage") } + , new string [] { GetString("Brakes"), GetString("initialize"), null, null, null, null, GetString("cannot initialize. Stop train then re-try.") } + , new string [] { GetString("Handbrake"), GetString("none"), null, GetString("full") } + , new string [] { GetString("Retainers"), GetString("off"), null, GetString("on"), null, null, null, null, GetString("Exhaust"), GetString("High Pressure"), GetString("Low Pressure"), GetString("Slow Direct") } , new string [] { GetString("Brake Hose"), GetString("disconnect"), null, GetString("connect") } , new string [] { GetString("Quick Release"), GetString("off"), null, GetString("on") } , new string [] { GetString("Overcharge"), GetString("off"), null, GetString("on") } // Cab Devices - , new string [] { GetString("Sander"), GetString("off"), null, GetString("on") } - , new string [] { GetString("Alerter"), GetString("acknowledge"), null, GetParticularString("Alerter", "sound") } - , new string [] { GetString("Horn"), GetString("off"), null, GetParticularString("Horn", "sound") } + , new string [] { GetString("Sander"), GetString("off"), null, GetString("on") } + , new string [] { GetString("Alerter"), GetString("acknowledge"), null, GetParticularString("Alerter", "sound") } + , new string [] { GetString("Horn"), GetString("off"), null, GetParticularString("Horn", "sound") } , new string [] { GetString("Whistle"), GetString("off"), null, GetString("blow") } // Horn for steam locomotives - , new string [] { GetString("Bell"), GetString("off"), null, GetString("ring") } - , new string [] { GetString("Headlight"), GetString("off"), GetString("dim"), GetString("bright") } - , new string [] { GetString("Cab Light"), GetString("off"), null, GetString("on") } - , new string [] { GetString("Wipers"), GetString("off"), null, GetString("on") } - , new string [] { GetString("Cab"), null, null, GetParticularString("Cab", "change"), null, null, GetString("changing is not available"), GetString("changing disabled. Close throttle, set reverser to neutral, stop train then re-try.") } + , new string [] { GetString("Bell"), GetString("off"), null, GetString("ring") } + , new string [] { GetString("Headlight"), GetString("off"), GetString("dim"), GetString("bright") } + , new string [] { GetString("Cab Light"), GetString("off"), null, GetString("on") } + , new string [] { GetString("Wipers"), GetString("off"), null, GetString("on") } + , new string [] { GetString("Cab"), null, null, GetParticularString("Cab", "change"), null, null, GetString("changing is not available"), GetString("changing disabled. Close throttle, set reverser to neutral, stop train then re-try.") } , new string [] { GetString("Odometer"), null, null, GetParticularString("Odometer", "reset"), GetParticularString("Odometer", "counting down"), GetParticularString("Odometer", "counting up") } , new string [] { GetString("Battery"), GetString("off"), null, GetString("on") } , new string [] { GetString("Master key"), GetString("off"), null, GetString("on") } @@ -252,18 +254,18 @@ public Confirmer(Simulator simulator, double defaultDurationS) , new string [] { GetString("Max acceleration"), null, null, null } , new string [] { GetString("Restricted speed zone"), GetString("off"), null, GetString("on") } // Train Devices - , new string [] { GetString("Doors Left"), GetString("close"), null, GetString("open") } - , new string [] { GetString("Doors Right"), GetString("close"), null, GetString("open") } + , new string [] { GetString("Doors Left"), GetString("close"), null, GetString("open") } + , new string [] { GetString("Doors Right"), GetString("close"), null, GetString("open") } , new string [] { GetString("Mirror"), GetString("retract"), null, GetString("extend") } // Track Devices - , new string [] { GetString("Switch Ahead"), null, null, GetParticularString("Switch", "change"), null, null, GetString("locked. Use Control+M to change signals to manual mode then re-try.") } + , new string [] { GetString("Switch Ahead"), null, null, GetParticularString("Switch", "change"), null, null, GetString("locked. Use Control+M to change signals to manual mode then re-try.") } , new string [] { GetString("Switch Behind"), null, null, GetParticularString("Switch", "change"), null, null, GetString("locked. Use Control+M to change signals to manual mode then re-try.") } // Simulation - , new string [] { GetString("Simulation Speed"), GetString("reset"), null, null, GetString("decrease"), GetString("increase") } - , new string [] { GetString("Uncouple After") } - , new string [] { GetString("Activity"), GetString("quit"), null, GetString("resume") } - , new string [] { GetString("Replay"), null, null, null, null, null, GetString("Overriding camera replay. Press Escape to resume camera replay.") } - , new string [] { GetString("Gearbox"), null, null, null, GetString("down"), GetString("up"), GetString("locked. Use shaft before changing gear.") } + , new string [] { GetString("Simulation Speed"), GetString("reset"), null, null, GetString("decrease"), GetString("increase") } + , new string [] { GetString("Uncouple After") } + , new string [] { GetString("Activity"), GetString("quit"), null, GetString("resume") } + , new string [] { GetString("Replay"), null, null, null, null, null, GetString("Overriding camera replay. Press Escape to resume camera replay.") } + , new string [] { GetString("Gearbox"), null, null, null, GetString("down"), GetString("up"), GetString("locked. Use shaft before changing gear.") } , new string [] { GetString("Signal mode"), GetString("manual"), null, GetString("auto"), null, null, GetString("locked. Stop train, then re-try.") } // Freight Load , new string [] { GetString("Wagon"), GetString("Wagon fully unloaded"), null, GetString("Wagon fully loaded"), null, GetString("Freight load") } @@ -281,7 +283,8 @@ public void Confirm(CabControl control, string text) Message(control, Simulator.Catalog.GetString("{0} {1}"), ConfirmText[(int)control][0], text); } - public void Confirm( CabControl control, CabSetting setting ) { + public void Confirm(CabControl control, CabSetting setting) + { Message(control, Simulator.Catalog.GetString("{0}"), ConfirmText[(int)control][(int)setting]); } @@ -350,11 +353,11 @@ public void Information(string message) Message(CabControl.None, ConfirmLevel.Information, message); } - public void MSG(string message) - { - Message(CabControl.None, ConfirmLevel.MSG, message); - } - + public void MSG(string message) + { + Message(CabControl.None, ConfirmLevel.MSG, message); + } + public void Warning(string message) { Message(CabControl.None, ConfirmLevel.Warning, message); @@ -409,19 +412,19 @@ void Message(CabControl control, ConfirmLevel level, string message) format = "{1} - " + format; // message displays longer if more severe - var duration = DefaultDurationS; - if (level >= ConfirmLevel.Warning) duration *= 2; - if (level >= ConfirmLevel.MSG) duration *= 5; + var duration = DefaultDurationS; + if (level >= ConfirmLevel.Warning) duration *= 2; + if (level >= ConfirmLevel.MSG) duration *= 5; if (DisplayMessage != null) DisplayMessage( - this, + this, new DisplayMessageEventArgs( - key: String.Format("{0}/{1}", control, level), + key: String.Format("{0}/{1}", control, level), text: String.Format( - format, - ConfirmText[(int)control][0], - Simulator.Catalog.GetString(GetStringAttribute.GetPrettyName(level)), message), + format, + ConfirmText[(int)control][0], + Simulator.Catalog.GetString(GetStringAttribute.GetPrettyName(level)), message), duration)); } } diff --git a/Source/Orts.Simulation/Simulation/Container.cs b/Source/Orts.Simulation/Simulation/Container.cs index fa12293604..cd2ccef000 100644 --- a/Source/Orts.Simulation/Simulation/Container.cs +++ b/Source/Orts.Simulation/Simulation/Container.cs @@ -17,20 +17,19 @@ // This file is the responsibility of the 3D & Environment Team. +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; using Microsoft.Xna.Framework; +using Orts.Common; using Orts.Formats.Msts; using Orts.Formats.OR; -using Orts.Parsers.Msts; using Orts.Simulation.RollingStocks; using Orts.Simulation.RollingStocks.SubSystems; -using Orts.Common; using ORTS.Common; using ORTS.Scripting.Api; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; namespace Orts.Simulation { @@ -69,7 +68,7 @@ public enum Status public float EmptyMassKG; public float MaxMassWhenLoadedKG; public float WidthM = 2.44f; - public float LengthM = 12.19f; + public float LengthM = 12.19f; public float HeightM = 2.59f; public ContainerType ContainerType = ContainerType.C40ft; public bool Flipped = false; @@ -103,7 +102,7 @@ public Container(FreightAnimationDiscrete freightAnimDiscreteCopy, FreightAnimat RelativeContainerMatrix = Matrix.Multiply(WorldPosition.XNAMatrix, invWagonMatrix); } - public Container (MSTSWagon wagon, string loadFilePath, ContainerHandlingItem containerStation = null) + public Container(MSTSWagon wagon, string loadFilePath, ContainerHandlingItem containerStation = null) { Wagon = wagon; ContainerStation = containerStation; @@ -150,8 +149,8 @@ public Container(BinaryReader inf, FreightAnimationDiscrete freightAnimDiscrete, var totalOffset = containerStation.StackLocations[stackLocationIndex].Position - mstsOffset; totalOffset.Z += LengthM * (containerStation.StackLocations[stackLocationIndex].Flipped ? -1 : 1) / 2; if (containersCount != 0) - for (var iPos = containersCount - 1; iPos >= 0; iPos--) - totalOffset.Y += containerStation.StackLocations[stackLocationIndex].Containers[iPos].HeightM; + for (var iPos = containersCount - 1; iPos >= 0; iPos--) + totalOffset.Y += containerStation.StackLocations[stackLocationIndex].Containers[iPos].HeightM; totalOffset.Z *= -1; Vector3.Transform(ref totalOffset, ref containerStation.ShapePosition.XNAMatrix, out totalOffset); WorldPosition.XNAMatrix = containerStation.ShapePosition.XNAMatrix; @@ -202,7 +201,7 @@ private void ComputeDimensions() } } - public void ComputeContainerStationContainerPosition (int stackLocationIndex, int loadPositionVertical) + public void ComputeContainerStationContainerPosition(int stackLocationIndex, int loadPositionVertical) { // compute WorldPosition starting from offsets and position of container station var mstsOffset = IntrinsicShapeOffset; @@ -214,7 +213,7 @@ public void ComputeContainerStationContainerPosition (int stackLocationIndex, in for (var iPos = (stackLocation.Containers.Count - 1); iPos >= 0; iPos--) totalOffset.Y += stackLocation.Containers[iPos].HeightM; totalOffset.Z *= -1; - Vector3.Transform(ref totalOffset, ref ContainerStation.ShapePosition.XNAMatrix, out totalOffset); + Vector3.Transform(ref totalOffset, ref ContainerStation.ShapePosition.XNAMatrix, out totalOffset); WorldPosition.XNAMatrix = ContainerStation.ShapePosition.XNAMatrix; WorldPosition.XNAMatrix.Translation = totalOffset; WorldPosition.TileX = ContainerStation.ShapePosition.TileX; @@ -253,27 +252,27 @@ public void LoadFromContainerFile(string loadFilePath, string baseFolder) var containerFile = new ContainerFile(loadFilePath); var containerParameters = containerFile.ContainerParameters; Name = containerParameters.Name; - + ShapeFileName = @"..\" + containerParameters.ShapeFileName; - var workingString = containerParameters.ShapeFileName.Replace(@"\" , @"/"); - var root = workingString.Substring(0, workingString.IndexOf(@"/")); + var workingString = containerParameters.ShapeFileName.Replace(@"\", @"/"); + var root = workingString.Substring(0, workingString.IndexOf(@"/")); BaseShapeFileFolderSlash = baseFolder + root + @"\"; Enum.TryParse(containerParameters.ContainerType, out ContainerType containerType); ContainerType = containerType; ComputeDimensions(); IntrinsicShapeOffset = containerParameters.IntrinsicShapeOffset; IntrinsicShapeOffset.Z *= -1; - EmptyMassKG = containerParameters.EmptyMassKG != -1 ? containerParameters.EmptyMassKG : DefaultEmptyMassKG[(int)ContainerType] ; + EmptyMassKG = containerParameters.EmptyMassKG != -1 ? containerParameters.EmptyMassKG : DefaultEmptyMassKG[(int)ContainerType]; MaxMassWhenLoadedKG = containerParameters.MaxMassWhenLoadedKG != -1 ? containerParameters.MaxMassWhenLoadedKG : DefaultMaxMassWhenLoadedKG[(int)ContainerType]; } - public void ComputeWorldPosition (FreightAnimationDiscrete freightAnimDiscrete) - { + public void ComputeWorldPosition(FreightAnimationDiscrete freightAnimDiscrete) + { WorldPosition.XNAMatrix = freightAnimDiscrete.Wagon.WorldPosition.XNAMatrix; WorldPosition.TileX = freightAnimDiscrete.Wagon.WorldPosition.TileX; WorldPosition.TileZ = freightAnimDiscrete.Wagon.WorldPosition.TileZ; var offset = freightAnimDiscrete.Offset; -// if (freightAnimDiscrete.Container != null) offset.Y += freightAnimDiscrete.Container.HeightM; + // if (freightAnimDiscrete.Container != null) offset.Y += freightAnimDiscrete.Container.HeightM; var translation = Matrix.CreateTranslation(offset - IntrinsicShapeOffset); WorldPosition.XNAMatrix = translation * WorldPosition.XNAMatrix; var invWagonMatrix = Matrix.Invert(freightAnimDiscrete.Wagon.WorldPosition.XNAMatrix); @@ -339,7 +338,7 @@ public void Update() } - } + } public class ContainerHandlingItem : FuelPickupItem { @@ -487,7 +486,7 @@ public void Restore(BinaryReader inf) case ContainerStationStatus.Idle: Status = status; break; - default: + default: Status = ContainerStationStatus.Idle; break; } @@ -529,7 +528,7 @@ public void PreloadContainerStation(PickupObj thisWorldObj) { var tileX = int.Parse(loadStationPopulation.LoadStatID.wfile.Substring(1, 7)); var tileZ = int.Parse(loadStationPopulation.LoadStatID.wfile.Substring(8, 7)); - if (tileX == Location.TileX && tileZ == Location.TileZ && loadStationPopulation.LoadStatID.UiD == thisWorldObj.UID) + if (tileX == Location.TileX && tileZ == Location.TileZ && loadStationPopulation.LoadStatID.UiD == thisWorldObj.UID) { foreach (var loadDataEntry in (loadStationPopulation as ContainerStationPopulation).LoadData) { @@ -545,7 +544,7 @@ public void PreloadContainerStation(PickupObj thisWorldObj) break; } } - } + } public void Preload(string loadFilePath, int stackLocationIndex, LoadState loadState) { @@ -607,7 +606,7 @@ public void Update() MoveGrabber = false; Status = ContainerStationStatus.LoadLowerToPick; TargetY = ComputeTargetYBase(StackLocations[SelectedStackLocationIndex].Containers.Count - 1, SelectedStackLocationIndex) - PickingSurfaceYOffset; - RelativeContainerPosition.M42 = - TargetY + StackLocations[SelectedStackLocationIndex].Containers[StackLocations[SelectedStackLocationIndex].Containers.Count -1].WorldPosition.XNAMatrix.M42 + InitialInvAnimationXNAMatrix.M42; + RelativeContainerPosition.M42 = -TargetY + StackLocations[SelectedStackLocationIndex].Containers[StackLocations[SelectedStackLocationIndex].Containers.Count - 1].WorldPosition.XNAMatrix.M42 + InitialInvAnimationXNAMatrix.M42; MoveY = true; } break; @@ -714,7 +713,7 @@ public void Update() } } - TargetZ = PickingSurfaceRelativeTopStartPosition.Z - relativeAnimationPosition.Translation.Z - LinkedFreightAnimation.Offset.Z * + TargetZ = PickingSurfaceRelativeTopStartPosition.Z - relativeAnimationPosition.Translation.Z - LinkedFreightAnimation.Offset.Z * (WagonFlipped ? -1 : 1); if (Math.Abs(TargetZ) > MinZSpan) { @@ -744,7 +743,7 @@ public void Update() var addHeight = 0.0f; foreach (var freightAnim in LinkedFreightAnimation.FreightAnimations.Animations) { - if (freightAnim is FreightAnimationDiscrete discreteFreightAnim && discreteFreightAnim.LoadPosition != LoadPosition.Above) + if (freightAnim is FreightAnimationDiscrete discreteFreightAnim && discreteFreightAnim.LoadPosition != LoadPosition.Above) { addHeight = discreteFreightAnim.Container.HeightM; break; @@ -805,8 +804,8 @@ public void Update() MoveY = false; HandledContainer = LinkedFreightAnimation.Container; TargetX = PickingSurfaceRelativeTopStartPosition.X; - TargetZ = PickingSurfaceRelativeTopStartPosition.Z - RelativeContainerPosition.Translation.Z - HandledContainer.IntrinsicShapeOffset.Z * - (ContainerFlipped ? -1 : 1); + TargetZ = PickingSurfaceRelativeTopStartPosition.Z - RelativeContainerPosition.Translation.Z - HandledContainer.IntrinsicShapeOffset.Z * + (ContainerFlipped ? -1 : 1); Status = ContainerStationStatus.UnloadHorizontallyMoveToPick; RelativeContainerPosition.M43 = HandledContainer.IntrinsicShapeOffset.Z * (ContainerFlipped ? 1 : -1); MoveX = true; @@ -823,7 +822,7 @@ public void Update() MoveZ = false; MoveGrabber = false; Status = ContainerStationStatus.UnloadLowerToPick; - TargetY = - PickingSurfaceYOffset + HandledContainer.HeightM + HandledContainer.IntrinsicShapeOffset.Y + GeneralVerticalOffset - PickingSurfaceYOffset; + TargetY = -PickingSurfaceYOffset + HandledContainer.HeightM + HandledContainer.IntrinsicShapeOffset.Y + GeneralVerticalOffset - PickingSurfaceYOffset; RelativeContainerPosition.M42 = PickingSurfaceYOffset - (HandledContainer.HeightM + HandledContainer.IntrinsicShapeOffset.Y); MoveY = true; } @@ -962,7 +961,7 @@ public void PrepareForUnload(FreightAnimationDiscrete linkedFreightAnimation) RelativeContainerPosition.M42 += PickingSurfaceYOffset; RelativeContainerPosition.M41 -= PickingSurfaceRelativeTopStartPosition.X; GeneralVerticalOffset = RelativeContainerPosition.M42; -// RelativeContainerPosition.Translation += LinkedFreightAnimation.Offset; + // RelativeContainerPosition.Translation += LinkedFreightAnimation.Offset; ContainerFlipped = (Math.Abs(InitialInvAnimationXNAMatrix.M11 - container.WorldPosition.XNAMatrix.M11) < 0.1f ? false : true); Status = ContainerStationStatus.UnloadRaiseToPick; TargetY = PickingSurfaceRelativeTopStartPosition.Y; @@ -985,7 +984,7 @@ public void PrepareForLoad(FreightAnimationDiscrete linkedFreightAnimation) RelativeContainerPosition.M43 = HandledContainer.IntrinsicShapeOffset.Z * (ContainerFlipped ? 1 : -1); Status = ContainerStationStatus.LoadRaiseToPick; TargetY = PickingSurfaceRelativeTopStartPosition.Y; - MoveY = true; + MoveY = true; SetGrabbers(HandledContainer); } @@ -1011,7 +1010,7 @@ public void TransferContainer(Matrix animationXNAMatrix) } } - public void ReInitPositionOffset (Matrix animationXNAMatrix) + public void ReInitPositionOffset(Matrix animationXNAMatrix) { InitialInvAnimationXNAMatrix = Matrix.Invert(animationXNAMatrix); } diff --git a/Source/Orts.Simulation/Simulation/FuelPickup.cs b/Source/Orts.Simulation/Simulation/FuelPickup.cs index 64e7cf584a..938b2b69a4 100644 --- a/Source/Orts.Simulation/Simulation/FuelPickup.cs +++ b/Source/Orts.Simulation/Simulation/FuelPickup.cs @@ -17,11 +17,11 @@ // This file is the responsibility of the 3D & Environment Team. +using System.Collections.Generic; +using System.Linq; using Orts.Formats.Msts; using Orts.Simulation.RollingStocks; using ORTS.Common; -using System.Collections.Generic; -using System.Linq; namespace Orts.Simulation { diff --git a/Source/Orts.Simulation/Simulation/Hazzard.cs b/Source/Orts.Simulation/Simulation/Hazzard.cs index 1aa9dc9608..9c39f1f249 100644 --- a/Source/Orts.Simulation/Simulation/Hazzard.cs +++ b/Source/Orts.Simulation/Simulation/Hazzard.cs @@ -17,142 +17,142 @@ // This file is the responsibility of the 3D & Environment Team. -using Orts.Formats.Msts; -using ORTS.Common; using System.Collections.Generic; using System.Linq; +using Orts.Formats.Msts; +using ORTS.Common; namespace Orts.Simulation { public class HazzardManager - { - readonly int hornDist = 200; - readonly int approachDist = 160; + { + readonly int hornDist = 200; + readonly int approachDist = 160; readonly int scaredDist = 147; - readonly Simulator Simulator; - public readonly Dictionary Hazzards; - public readonly Dictionary CurrentHazzards; - public readonly Dictionary HazFiles; - List InterestedHazzards;//those hazards is closed to player, needs to listen to horn - public HazzardManager(Simulator simulator) - { - Simulator = simulator; - InterestedHazzards = new List(); - CurrentHazzards = new Dictionary(); - HazFiles = new Dictionary(); - Hazzards = simulator.TDB != null && simulator.TDB.TrackDB != null ? GetHazardsFromDB(simulator.TDB.TrackDB.TrackNodes, simulator.TDB.TrackDB.TrItemTable) : new Dictionary(); - } + readonly Simulator Simulator; + public readonly Dictionary Hazzards; + public readonly Dictionary CurrentHazzards; + public readonly Dictionary HazFiles; + List InterestedHazzards;//those hazards is closed to player, needs to listen to horn + public HazzardManager(Simulator simulator) + { + Simulator = simulator; + InterestedHazzards = new List(); + CurrentHazzards = new Dictionary(); + HazFiles = new Dictionary(); + Hazzards = simulator.TDB != null && simulator.TDB.TrackDB != null ? GetHazardsFromDB(simulator.TDB.TrackDB.TrackNodes, simulator.TDB.TrackDB.TrItemTable) : new Dictionary(); + } - static Dictionary GetHazardsFromDB(TrackNode[] trackNodes, TrItem[] trItemTable) - { - return (from trackNode in trackNodes - where trackNode != null && trackNode.TrVectorNode != null && trackNode.TrVectorNode.NoItemRefs > 0 - from itemRef in trackNode.TrVectorNode.TrItemRefs.Distinct() - where trItemTable[itemRef] != null && trItemTable[itemRef].ItemType == TrItem.trItemType.trHAZZARD - select new KeyValuePair(itemRef, new Hazzard(trackNode, trItemTable[itemRef]))) - .ToDictionary(_ => _.Key, _ => _.Value); - } + static Dictionary GetHazardsFromDB(TrackNode[] trackNodes, TrItem[] trItemTable) + { + return (from trackNode in trackNodes + where trackNode != null && trackNode.TrVectorNode != null && trackNode.TrVectorNode.NoItemRefs > 0 + from itemRef in trackNode.TrVectorNode.TrItemRefs.Distinct() + where trItemTable[itemRef] != null && trItemTable[itemRef].ItemType == TrItem.trItemType.trHAZZARD + select new KeyValuePair(itemRef, new Hazzard(trackNode, trItemTable[itemRef]))) + .ToDictionary(_ => _.Key, _ => _.Value); + } - [CallOnThread("Loader")] - public Hazzard AddHazzardIntoGame(int itemID, string hazFileName) - { - try - { - if (!CurrentHazzards.ContainsKey(itemID)) - { - if (HazFiles.ContainsKey(hazFileName)) Hazzards[itemID].HazFile = HazFiles[hazFileName]; - else - { - var hazF = new HazardFile(Simulator.RoutePath + "\\" + hazFileName); - HazFiles.Add(hazFileName, hazF); - Hazzards[itemID].HazFile = hazF; - } - //based on act setting for frequency + [CallOnThread("Loader")] + public Hazzard AddHazzardIntoGame(int itemID, string hazFileName) + { + try + { + if (!CurrentHazzards.ContainsKey(itemID)) + { + if (HazFiles.ContainsKey(hazFileName)) Hazzards[itemID].HazFile = HazFiles[hazFileName]; + else + { + var hazF = new HazardFile(Simulator.RoutePath + "\\" + hazFileName); + HazFiles.Add(hazFileName, hazF); + Hazzards[itemID].HazFile = hazF; + } + //based on act setting for frequency if (Hazzards[itemID].animal == true && Simulator.Activity != null) { if (Simulator.Random.Next(100) > Simulator.Activity.Tr_Activity.Tr_Activity_Header.Animals) return null; } - else if (Simulator.Activity != null) - { - if (Simulator.Random.Next(100) > Simulator.Activity.Tr_Activity.Tr_Activity_Header.Animals) return null; - } - else //in explore mode - { - if (Hazzards[itemID].animal == false) return null;//not show worker in explore mode - if (Simulator.Random.Next(100) > 20) return null;//show 10% animals - } - CurrentHazzards.Add(itemID, Hazzards[itemID]); - return Hazzards[itemID];//successfully added the hazard with associated haz file - } - } - catch { } - return null; - } + else if (Simulator.Activity != null) + { + if (Simulator.Random.Next(100) > Simulator.Activity.Tr_Activity.Tr_Activity_Header.Animals) return null; + } + else //in explore mode + { + if (Hazzards[itemID].animal == false) return null;//not show worker in explore mode + if (Simulator.Random.Next(100) > 20) return null;//show 10% animals + } + CurrentHazzards.Add(itemID, Hazzards[itemID]); + return Hazzards[itemID];//successfully added the hazard with associated haz file + } + } + catch { } + return null; + } - public void RemoveHazzardFromGame(int itemID) - { - try - { - if (CurrentHazzards.ContainsKey(itemID)) - { - CurrentHazzards.Remove(itemID); - } - } - catch { }; - } + public void RemoveHazzardFromGame(int itemID) + { + try + { + if (CurrentHazzards.ContainsKey(itemID)) + { + CurrentHazzards.Remove(itemID); + } + } + catch { }; + } - [CallOnThread("Updater")] - public void Update(float elapsedClockSeconds) - { - var playerLocation = Simulator.PlayerLocomotive.WorldPosition.WorldLocation; + [CallOnThread("Updater")] + public void Update(float elapsedClockSeconds) + { + var playerLocation = Simulator.PlayerLocomotive.WorldPosition.WorldLocation; - foreach (var haz in Hazzards) - { - haz.Value.Update(playerLocation, approachDist, scaredDist); - } - } + foreach (var haz in Hazzards) + { + haz.Value.Update(playerLocation, approachDist, scaredDist); + } + } - public void Horn() - { - var playerLocation = Simulator.PlayerLocomotive.WorldPosition.WorldLocation; - foreach (var haz in Hazzards) - { - if (WorldLocation.Within(haz.Value.Location, playerLocation, hornDist)) - { - haz.Value.state = Hazzard.State.LookLeft; - } - } - } - } + public void Horn() + { + var playerLocation = Simulator.PlayerLocomotive.WorldPosition.WorldLocation; + foreach (var haz in Hazzards) + { + if (WorldLocation.Within(haz.Value.Location, playerLocation, hornDist)) + { + haz.Value.state = Hazzard.State.LookLeft; + } + } + } + } - public class Hazzard - { + public class Hazzard + { readonly TrackNode TrackNode; internal WorldLocation Location; - public HazardFile HazFile { get { return hazF; } set { hazF = value; if (hazF.Tr_HazardFile.Workers != null) animal = false; else animal = true; } } - public HazardFile hazF; - public enum State { Idle1, Idle2, LookLeft, LookRight, Scared }; - public State state; - public bool animal = true; + public HazardFile HazFile { get { return hazF; } set { hazF = value; if (hazF.Tr_HazardFile.Workers != null) animal = false; else animal = true; } } + public HazardFile hazF; + public enum State { Idle1, Idle2, LookLeft, LookRight, Scared }; + public State state; + public bool animal = true; - public Hazzard(TrackNode trackNode, TrItem trItem) + public Hazzard(TrackNode trackNode, TrItem trItem) { TrackNode = trackNode; Location = new WorldLocation(trItem.TileX, trItem.TileZ, trItem.X, trItem.Y, trItem.Z); - state = State.Idle1; + state = State.Idle1; } - public void Update(WorldLocation playerLocation, int approachDist, int scaredDist) - { - if (state == State.Idle1) - { - if (Simulator.Random.Next(10) == 0) state = State.Idle2; - } - else if (state == State.Idle2) - { - if (Simulator.Random.Next(5) == 0) state = State.Idle1; - } + public void Update(WorldLocation playerLocation, int approachDist, int scaredDist) + { + if (state == State.Idle1) + { + if (Simulator.Random.Next(10) == 0) state = State.Idle2; + } + else if (state == State.Idle2) + { + if (Simulator.Random.Next(5) == 0) state = State.Idle1; + } if (!WorldLocation.Within(Location, playerLocation, scaredDist) && state < State.LookLeft) { @@ -165,6 +165,6 @@ public void Update(WorldLocation playerLocation, int approachDist, int scaredDis { state = State.Scared; } - } - } + } + } } diff --git a/Source/Orts.Simulation/Simulation/LevelCrossing.cs b/Source/Orts.Simulation/Simulation/LevelCrossing.cs index 38ce79d4ff..795bc82cc6 100644 --- a/Source/Orts.Simulation/Simulation/LevelCrossing.cs +++ b/Source/Orts.Simulation/Simulation/LevelCrossing.cs @@ -17,21 +17,21 @@ // This file is the responsibility of the 3D & Environment Team. -using Orts.Formats.Msts; -using Orts.Simulation.AIs; -using Orts.Simulation.Physics; -using ORTS.Common; using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; +using Orts.Formats.Msts; +using Orts.Simulation.AIs; +using Orts.Simulation.Physics; +using ORTS.Common; namespace Orts.Simulation { public class LevelCrossings { const float MaximumActivationDistance = 2000; - + readonly Simulator Simulator; public readonly Dictionary TrackCrossingItems; public readonly Dictionary RoadCrossingItems; @@ -42,7 +42,7 @@ public class LevelCrossings public LevelCrossings(Simulator simulator) { Simulator = simulator; - TrackCrossingItems = simulator.TDB != null && simulator.TDB.TrackDB != null && simulator.TDB.TrackDB.TrackNodes != null && simulator.TDB.TrackDB.TrItemTable != null + TrackCrossingItems = simulator.TDB != null && simulator.TDB.TrackDB != null && simulator.TDB.TrackDB.TrackNodes != null && simulator.TDB.TrackDB.TrItemTable != null ? GetLevelCrossingsFromDB(simulator.TDB.TrackDB.TrackNodes, simulator.TDB.TrackDB.TrItemTable) : new Dictionary(); RoadCrossingItems = simulator.RDB != null && simulator.RDB.RoadTrackDB != null && simulator.RDB.RoadTrackDB.TrackNodes != null && simulator.RDB.RoadTrackDB.TrItemTable != null ? GetLevelCrossingsFromDB(simulator.RDB.RoadTrackDB.TrackNodes, simulator.RDB.RoadTrackDB.TrItemTable) : new Dictionary(); @@ -94,7 +94,7 @@ void UpdateCrossings(Train train, float elapsedTime) var absSpeedMpS = Math.Abs(speedMpS); var maxSpeedMpS = train.AllowedMaxSpeedMpS; var minCrossingActivationSpeed = 5.0f; //5.0MpS is equalivalent to 11.1mph. This is the estimated min speed that MSTS uses to activate the gates when in range. - + bool validTrain = false; bool validStaticConsist = false; @@ -202,11 +202,11 @@ void UpdateCrossings(Train train, float elapsedTime) if ((train.TrainType == Train.TRAINTYPE.STATIC) && validStaticConsist) { // This process is to raise the crossing gates if a loose consist rolls through the crossing. - if(speedMpS > 0) + if (speedMpS > 0) { frontDist = crossing.DistanceTo(train.FrontTDBTraveller, minimumDist); rearDist = crossing.DistanceTo(train.RearTDBTraveller, minimumDist); - + if (frontDist < 0 && rearDist < 0) crossing.RemoveTrain(train); } @@ -222,7 +222,7 @@ void UpdateCrossings(Train train, float elapsedTime) if (frontDist < 0 && rearDist < 0) rearDist = crossing.DistanceTo(new Traveller(train.RearTDBTraveller, Traveller.TravellerDirection.Backward), adjustDist); - // Testing distance before crossing + // Testing distance before crossing if (frontDist > 0 && frontDist <= adjustDist) crossing.AddTrain(train); @@ -299,7 +299,7 @@ void UpdateCrossings(Train train, float elapsedTime) public LevelCrossingItem SearchNearLevelCrossing(Train train, float reqDist, bool trainForwards, out float frontDist) { LevelCrossingItem roadItem = LevelCrossingItem.None; - frontDist = -1; + frontDist = -1; Traveller traveller = trainForwards ? train.FrontTDBTraveller : new Traveller(train.RearTDBTraveller, Traveller.TravellerDirection.Backward); foreach (var crossing in TrackCrossingItems.Values.Where(ci => ci.CrossingGroup != null)) @@ -344,7 +344,7 @@ public LevelCrossingItem(TrackNode trackNode, TrItem trItem) Location = new WorldLocation(trItem.TileX, trItem.TileZ, trItem.X, trItem.Y, trItem.Z); } - public LevelCrossingItem () + public LevelCrossingItem() { } @@ -352,7 +352,7 @@ public LevelCrossingItem () [CallOnThread("Updater")] public void AddTrain(Train train) { - if(train.TrainType == Train.TRAINTYPE.STATIC) + if (train.TrainType == Train.TRAINTYPE.STATIC) { var staticConsists = StaticConsists; if (!staticConsists.Contains(train)) @@ -404,7 +404,7 @@ public void RemoveTrain(Train train) StaticConsists = newStaticConsists; } } - else if(trains.Count > 0) + else if (trains.Count > 0) { if (trains.Contains(train)) { @@ -431,7 +431,7 @@ public class LevelCrossing internal readonly List Items; internal readonly float WarningTime; internal readonly float MinimumDistance; - + public LevelCrossing(IEnumerable items, float warningTime, float minimumDistance) { Items = new List(items); diff --git a/Source/Orts.Simulation/Simulation/Physics/Train.cs b/Source/Orts.Simulation/Simulation/Physics/Train.cs index 2800a4a4f2..85122bfe5e 100644 --- a/Source/Orts.Simulation/Simulation/Physics/Train.cs +++ b/Source/Orts.Simulation/Simulation/Physics/Train.cs @@ -224,7 +224,7 @@ public enum TRAINTYPE // Local max speed independently from signal and speedpost speed; // depends from various parameters like route max speed, overall or section efficiency of service, // max speed of player locomotive, max speed of consist (MaxVelocityA) - public float TrainMaxSpeedMpS; + public float TrainMaxSpeedMpS; public float AllowedMaxSpeedMpS; // Max speed as allowed public float allowedMaxSpeedSignalMpS; // Max speed as set by signal public float allowedMaxSpeedLimitMpS; // Max speed as set by limit @@ -1200,13 +1200,13 @@ public virtual void Save(BinaryWriter outf) // Save initial speed outf.Write(InitialSpeed); outf.Write(IsPathless); - /* if (EOT != null) - { - outf.Write(1); - EOT.Save(outf); - } - else - outf.Write(-1);*/ + /* if (EOT != null) + { + outf.Write(1); + EOT.Save(outf); + } + else + outf.Write(-1);*/ } private void SaveCars(BinaryWriter outf) @@ -1216,7 +1216,7 @@ private void SaveCars(BinaryWriter outf) { outf.Write(wagon.WagFilePath); wagon.Save(outf); - } + } } static void SaveTrafficSDefinition(BinaryWriter outf, Traffic_Service_Definition thisTSD) @@ -1571,7 +1571,7 @@ public void DPMoveToBack() return; var dpDynamicBrakePercent = LeadLocomotive.DynamicBrakePercent; var dpThrottlePercent = LeadLocomotive.ThrottlePercent; - var dpDynamicBrakeCurrentNotch = MathHelper.Clamp((LeadLocomotive as MSTSLocomotive).DPDynamicBrakeController.GetNotch(dpDynamicBrakePercent/100), 0, 8); + var dpDynamicBrakeCurrentNotch = MathHelper.Clamp((LeadLocomotive as MSTSLocomotive).DPDynamicBrakeController.GetNotch(dpDynamicBrakePercent / 100), 0, 8); var dpThrottleCurrentNotch = (LeadLocomotive as MSTSLocomotive).ThrottleController.CurrentNotch; int idToMove = -1; int idLead = LeadLocomotive != null ? (Cars[LeadLocomotiveIndex] as MSTSLocomotive).DPUnitID : -1; @@ -1715,7 +1715,7 @@ protected void DPLess(RollingStocks.SubSystems.Controllers.MSTSNotchController c if (percent <= 0) { percent = 0; -// DPMore(controller, ref percent); + // DPMore(controller, ref percent); } } @@ -2114,39 +2114,39 @@ public void UpdateWindComponents() //These will be representative of the train whilst it is on a straight track, but each wagon will vary when going around a curve. // Note both train and wind direction will be positive between 0 (north) and 180 (south) through east, and negative between 0 (north) and 180 (south) through west // Wind and train direction to be converted to an angle between 0 and 360 deg. - // Calculate Wind speed and direction, and train direction - // Update the value of the Wind Speed and Direction for the train - PhysicsWindDirectionDeg = MathHelper.ToDegrees(Simulator.Weather.WindDirection); - PhysicsWindSpeedMpS = Simulator.Weather.WindSpeed; - float TrainSpeedMpS = Math.Abs(SpeedMpS); - - // If a westerly direction (ie -ve) convert to an angle between 0 and 360 - if (PhysicsWindDirectionDeg < 0) - PhysicsWindDirectionDeg += 360; - - if (PhysicsTrainLocoDirectionDeg < 0) - PhysicsTrainLocoDirectionDeg += 360; - - // calculate angle between train and eind direction - if (PhysicsWindDirectionDeg > PhysicsTrainLocoDirectionDeg) - ResultantWindComponentDeg = PhysicsWindDirectionDeg - PhysicsTrainLocoDirectionDeg; - else if (PhysicsTrainLocoDirectionDeg > PhysicsWindDirectionDeg) - ResultantWindComponentDeg = PhysicsTrainLocoDirectionDeg - PhysicsWindDirectionDeg; - else - ResultantWindComponentDeg = 0.0f; + // Calculate Wind speed and direction, and train direction + // Update the value of the Wind Speed and Direction for the train + PhysicsWindDirectionDeg = MathHelper.ToDegrees(Simulator.Weather.WindDirection); + PhysicsWindSpeedMpS = Simulator.Weather.WindSpeed; + float TrainSpeedMpS = Math.Abs(SpeedMpS); + + // If a westerly direction (ie -ve) convert to an angle between 0 and 360 + if (PhysicsWindDirectionDeg < 0) + PhysicsWindDirectionDeg += 360; + + if (PhysicsTrainLocoDirectionDeg < 0) + PhysicsTrainLocoDirectionDeg += 360; + + // calculate angle between train and eind direction + if (PhysicsWindDirectionDeg > PhysicsTrainLocoDirectionDeg) + ResultantWindComponentDeg = PhysicsWindDirectionDeg - PhysicsTrainLocoDirectionDeg; + else if (PhysicsTrainLocoDirectionDeg > PhysicsWindDirectionDeg) + ResultantWindComponentDeg = PhysicsTrainLocoDirectionDeg - PhysicsWindDirectionDeg; + else + ResultantWindComponentDeg = 0.0f; - // Correct wind direction if it is greater then 360 deg, then correct to a value less then 360 - if (Math.Abs(ResultantWindComponentDeg) > 360) - ResultantWindComponentDeg = ResultantWindComponentDeg - 360.0f; + // Correct wind direction if it is greater then 360 deg, then correct to a value less then 360 + if (Math.Abs(ResultantWindComponentDeg) > 360) + ResultantWindComponentDeg = ResultantWindComponentDeg - 360.0f; - // Wind angle should be kept between 0 and 180 the formulas do not cope with angles > 180. If angle > 180, denotes wind of "other" side of train - if (ResultantWindComponentDeg > 180) - ResultantWindComponentDeg = 360 - ResultantWindComponentDeg; + // Wind angle should be kept between 0 and 180 the formulas do not cope with angles > 180. If angle > 180, denotes wind of "other" side of train + if (ResultantWindComponentDeg > 180) + ResultantWindComponentDeg = 360 - ResultantWindComponentDeg; - float WindAngleRad = MathHelper.ToRadians(ResultantWindComponentDeg); + float WindAngleRad = MathHelper.ToRadians(ResultantWindComponentDeg); - WindResultantSpeedMpS = (float)Math.Sqrt(TrainSpeedMpS * TrainSpeedMpS + PhysicsWindSpeedMpS * PhysicsWindSpeedMpS + 2.0f * TrainSpeedMpS * PhysicsWindSpeedMpS * (float)Math.Cos(WindAngleRad)); - } + WindResultantSpeedMpS = (float)Math.Sqrt(TrainSpeedMpS * TrainSpeedMpS + PhysicsWindSpeedMpS * PhysicsWindSpeedMpS + 2.0f * TrainSpeedMpS * PhysicsWindSpeedMpS * (float)Math.Cos(WindAngleRad)); + } //================================================================================================// @@ -2288,7 +2288,7 @@ public void UpdateCarSteamHeat(float elapsedClockSeconds) if (car.WagonType == TrainCar.WagonTypes.Passenger || car.WagonSpecialType == MSTSWagon.WagonSpecialTypes.Heated) // Only calculate compartment heat in passenger or specially marked heated cars { car.UpdateHeatLoss(); - + //++++++++++++++++++++++++++++++++++++++++ // Calculate heat produced by steam pipe acting as heat exchanger inside carriage - this model is based upon the heat loss from a steam pipe. // The heat loss per metre from a bare pipe equals the heat loss by convection and radiation. Temperatures in degrees Kelvin @@ -2335,7 +2335,7 @@ public void UpdateCarSteamHeat(float elapsedClockSeconds) car.CarHeatSteamMainPipeHeatLossBTU = Me.ToFt(car.CarLengthM) * (MathHelper.Pi * Me.ToFt(car.MainSteamHeatPipeOuterDiaM)) * HeatTransCoeffMainPipeBTUpFt2pHrpF * (CarMainSteamPipeTempF - C.ToF(car.CarOutsideTempC)); // calculate steam connecting hoses heat loss - assume 1.5" hose - float ConnectSteamHoseOuterDiaFt = Me.ToFt(car.CarConnectSteamHoseOuterDiaM); + float ConnectSteamHoseOuterDiaFt = Me.ToFt(car.CarConnectSteamHoseOuterDiaM); car.CarHeatConnectSteamHoseHeatLossBTU = ConnectSteamHoseLengthFt * (MathHelper.Pi * ConnectSteamHoseOuterDiaFt) * HeatTransCoeffConnectHoseBTUpFt2pHrpF * (CarMainSteamPipeTempF - C.ToF(car.CarOutsideTempC)); // Use Napier formula to calculate steam discharge rate through steam trap valve, ie Discharge (lb/s) = (Valve area * Abs Pressure) / 70 @@ -2355,7 +2355,7 @@ public void UpdateCarSteamHeat(float elapsedClockSeconds) float ConnectingHoseLeakAreaIn2 = (float)Math.PI * (ConnectingHoseLeakDiaIn / 2.0f) * (ConnectingHoseLeakDiaIn / 2.0f); car.CarHeatConnectingSteamHoseLeakageLBpS = car.SteamHoseLeakRateRandom * (ConnectingHoseLeakAreaIn2 * (car.CarSteamHeatMainPipeSteamPressurePSI + OneAtmospherePSI)) / ConnectingHoseDischargeFactor; - + //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ float CurrentComparmentSteamPipeHeatW = 0; @@ -2424,7 +2424,7 @@ public void UpdateCarSteamHeat(float elapsedClockSeconds) } } -#region Calculate Steam Pressure drop along train + #region Calculate Steam Pressure drop along train // Initialise main steam pipe pressure to same as steam heat valve setting float ProgressivePressureAlongTrainPSI = mstsLocomotive.CurrentSteamHeatPressurePSI; @@ -2987,7 +2987,7 @@ public virtual bool PostInit() /// /// set train speed logging flag (valid per activity, so will be restored after save) /// - + protected void SetTrainSpeedLoggingFlag() { DatalogTrainSpeed = Simulator.Settings.DataLogTrainSpeed; @@ -4702,7 +4702,7 @@ bool FixCouplerForceEquations() TrainCar car = Cars[i]; // Coupler in tension on this car or coupler force is "zero" then jump to (process) next car - if (car.CouplerSlackM > 0 || car.CouplerForceB >= 1) + if (car.CouplerSlackM > 0 || car.CouplerForceB >= 1) continue; if (car.IsPlayerTrain && !Simulator.Settings.SimpleControlPhysics && car.IsAdvancedCoupler) // "Advanced coupler" - operates in three extension zones @@ -4769,7 +4769,7 @@ bool FixCouplerImpulseForceEquations() SetCouplerForce(car, 0); return true; } - + } else // Simple Coupler @@ -4869,8 +4869,8 @@ public void AddCouplerImpulseForces(float elapsedTime) // This section seems to be required to get car moving if (car.IsPlayerTrain && !Simulator.Settings.SimpleControlPhysics && car.IsAdvancedCoupler) // "Advanced coupler" { - Cars[i].SpeedMpS += Cars[i].CouplerForceU / Cars[i].MassKG; - Cars[i + 1].SpeedMpS -= Cars[i].CouplerForceU / Cars[i + 1].MassKG; + Cars[i].SpeedMpS += Cars[i].CouplerForceU / Cars[i].MassKG; + Cars[i + 1].SpeedMpS -= Cars[i].CouplerForceU / Cars[i + 1].MassKG; // This ensures that the last car speed never goes negative - as this might cause a sudden jerk in the train when viewed. if (i == Cars.Count - 2) @@ -4878,12 +4878,12 @@ public void AddCouplerImpulseForces(float elapsedTime) if (FirstCar.SpeedMpS > 0 && Cars[i + 1].SpeedMpS < 0) { Cars[i + 1].SpeedMpS = 0; - // Trace.TraceInformation("Last Car Zero Speed Set - CarID {0} - -ve set +ve", car.CarID); + // Trace.TraceInformation("Last Car Zero Speed Set - CarID {0} - -ve set +ve", car.CarID); } else if (FirstCar.SpeedMpS < 0 && Cars[i + 1].SpeedMpS > 0) { Cars[i + 1].SpeedMpS = 0; - // Trace.TraceInformation("Last Car Zero Speed Set - CarID {0} - +ve set -ve", car.CarID); + // Trace.TraceInformation("Last Car Zero Speed Set - CarID {0} - +ve set -ve", car.CarID); } } @@ -4992,7 +4992,7 @@ public void ComputeCouplerForces(float elapsedTime) SolveCouplerForceEquations(); while (FixCouplerForceEquations()); - + for (int i = 0; i < Cars.Count - 1; i++) { @@ -5000,7 +5000,7 @@ public void ComputeCouplerForces(float elapsedTime) TrainCar car = Cars[i]; // Check to make sure that last car does not have any coulpler force on its coupler (no cars connected). When cars reversed, there is sometimes a "residual" coupler force. - if (i == Cars.Count-1 && Cars[i+1].CouplerForceU != 0) + if (i == Cars.Count - 1 && Cars[i + 1].CouplerForceU != 0) { Cars[i].CouplerForceU = 0; } @@ -5009,8 +5009,8 @@ public void ComputeCouplerForces(float elapsedTime) car.SmoothedCouplerForceUN = car.CouplerForceUSmoothed.SmoothedValue; // Total force acting on each car is adjusted depending upon the calculated coupler forces - car.TotalForceN += car.CouplerForceU; - Cars[i + 1].TotalForceN -= car.CouplerForceU; + car.TotalForceN += car.CouplerForceU; + Cars[i + 1].TotalForceN -= car.CouplerForceU; // Find max coupler force on the car - currently doesn't appear to be used anywhere if (MaximumCouplerForceN < Math.Abs(car.CouplerForceU)) @@ -5153,7 +5153,7 @@ public void ComputeCouplerForces(float elapsedTime) float GradStiffness = (car.GetCouplerTensionStiffness2N() - car.GetCouplerTensionStiffness1N()) / (SlackDiff); float ComputedZone3SlackM = (Math.Abs(car.SmoothedCouplerForceUN) / GradStiffness) + MaxZ2TensionM; - if (LastCar.SpeedMpS >= LastCarZeroSpeedMpS && LastCar.SpeedMpS < LastCarTensionMoveSpeedMpS ) + if (LastCar.SpeedMpS >= LastCarZeroSpeedMpS && LastCar.SpeedMpS < LastCarTensionMoveSpeedMpS) { // Train is starting, don't allow coupler slack to decrease until complete train is moving if (ComputedZone3SlackM < (Math.Abs(car.PreviousCouplerSlackM) / AdvancedCouplerDuplicationFactor)) @@ -5164,11 +5164,11 @@ public void ComputeCouplerForces(float elapsedTime) else if (ComputedZone3SlackM > Math.Abs(car.PreviousCouplerSlackM) / AdvancedCouplerDuplicationFactor) { // Allow coupler slack to slowly increase - - // Increase slack value - car.CouplerSlackM = car.PreviousCouplerSlackM * (1.0f / CouplerChangeDampingFactor); - car.CouplerSlackM = MathHelper.Clamp(car.CouplerSlackM, 0, MaxZ3TensionM * AdvancedCouplerDuplicationFactor); - car.AdvancedCouplerDynamicTensionSlackLimitM = car.CouplerSlackM; + + // Increase slack value + car.CouplerSlackM = car.PreviousCouplerSlackM * (1.0f / CouplerChangeDampingFactor); + car.CouplerSlackM = MathHelper.Clamp(car.CouplerSlackM, 0, MaxZ3TensionM * AdvancedCouplerDuplicationFactor); + car.AdvancedCouplerDynamicTensionSlackLimitM = car.CouplerSlackM; } } else if (ComputedZone3SlackM < (Math.Abs(car.PreviousCouplerSlackM) / AdvancedCouplerDuplicationFactor)) @@ -5526,7 +5526,7 @@ public void UpdateCarSpeeds(float elapsedTime) { if (j == Cars.Count - 1 || car.CouplerSlackM < car.GetMaximumSimpleCouplerSlack2M()) break; - } + } j++; // Increment count to next car. car = Cars[j]; @@ -5536,8 +5536,8 @@ public void UpdateCarSpeeds(float elapsedTime) for (int k = i; k <= j; k++) { - - if ((Cars[k].CarBrakeSystemType == "air_piped" || Cars[k].CarBrakeSystemType == "vacuum_piped" || car.CarBrakeSystemType == "manual_braking") && FirstCar.SpeedMpS > 0 && Cars[k-1].SpeedMpS == 0.0) + + if ((Cars[k].CarBrakeSystemType == "air_piped" || Cars[k].CarBrakeSystemType == "vacuum_piped" || car.CarBrakeSystemType == "manual_braking") && FirstCar.SpeedMpS > 0 && Cars[k - 1].SpeedMpS == 0.0) { // If is manual braked, air_piped car or vacuum_piped, and preceeding car is at stop, then set speed to zero. These type of cars do not have any brake force to hold them still Cars[k].SpeedMpS = 0.0f; @@ -5592,7 +5592,7 @@ public void UpdateCarSpeeds(float elapsedTime) { for (int k = j; k <= i; k++) { - + if ((Cars[k].CarBrakeSystemType == "air_piped" || Cars[k].CarBrakeSystemType == "vacuum_piped" || car.CarBrakeSystemType == "manual_braking") && FirstCar.SpeedMpS > 0 && Cars[k - 1].SpeedMpS == 0.0) { // If is manual braked, air_piped car or vacuum_piped, and preceeding car is at stop, then set speed to zero. These type of cars do not have any brake force to hold them still @@ -5659,7 +5659,7 @@ public void UpdateCouplerSlack(float elapsedTime) car.RearCoupler.IsOpen = i == Cars.Count - 1; TotalCouplerSlackM += car.CouplerSlackM; // Total coupler slack displayed in HUD only - + #if DEBUG_COUPLER_FORCES if (car.IsAdvancedCoupler) { @@ -9112,7 +9112,8 @@ public void UpdateExplorerMode(int signalObjectIndex) foreach (var tcRouteElement in ValidRoute[1]) { var tcSection = signalRef.TrackCircuitList[tcRouteElement.TCSectionIndex]; - if (tcSection.CheckReserved(routedBackward) && !tcSection.CircuitState.TrainOccupy.ContainsTrain(this)) { + if (tcSection.CheckReserved(routedBackward) && !tcSection.CircuitState.TrainOccupy.ContainsTrain(this)) + { tcSection.Unreserve(); tcSection.UnreserveTrain(); } @@ -9182,7 +9183,7 @@ public void UpdateExplorerMode(int signalObjectIndex) { distanceToSignalForward += thisSection.Length - lengthOffset; lengthOffset = 0; - } + } } // backward @@ -9199,7 +9200,7 @@ public void UpdateExplorerMode(int signalObjectIndex) { lengthOffset = -PresentPosition[1].TCOffset + signalRef.TrackCircuitList[PresentPosition[1].TCSectionIndex].Length; presentIndex = iindex; - } + } if (presentIndex != -1 && presentIndex <= iindex) { distanceToSignalBackward += thisSection.Length - lengthOffset; @@ -9583,7 +9584,7 @@ public void UpdateExplorerMode(int signalObjectIndex) offsetM = 0; // Stop if first signal is far, there's no need to clear it. - if (!firstSignalPassed && totalLengthM > MinCheckDistanceExplorerM) + if (!firstSignalPassed && totalLengthM > MinCheckDistanceExplorerM) break; if (thisSection.EndSignals[actDirection] != null) @@ -11234,7 +11235,7 @@ public void RemoveFromTrack() thisSection.ClearOccupied(this, true); } } - + //================================================================================================// // // Update track actions after coupling @@ -14474,7 +14475,7 @@ public void UpdatePlayerTrainData(float maxDistanceM) { // variable used to search for NORMAL signals and speedposts when not in AUTO mode var maxDistanceNORMALM = ControlMode == TRAIN_CONTROL.EXPLORER ? - Math.Max(maxDistanceM, (float)Simulator.TRK.Tr_RouteFile.SpeedLimit * 250.0f) : maxDistanceM; + Math.Max(maxDistanceM, (float)Simulator.TRK.Tr_RouteFile.SpeedLimit * 250.0f) : maxDistanceM; InitializePlayerTrainData(); // fill in the lists TrainObjectItem thisItem; @@ -14617,7 +14618,7 @@ public void UpdatePlayerTrainData(float maxDistanceM) } } } - + if (ControlMode == TRAIN_CONTROL.MANUAL || ControlMode == TRAIN_CONTROL.EXPLORER) { foreach (TrackCircuitSignalItem thisSpeeditem in thisSection.CircuitItems.TrackCircuitSpeedPosts[thisElement.Direction].TrackCircuitItem) @@ -14907,7 +14908,7 @@ public void GetTrainInfoAuto(ref TrainInfo thisInfo) } } - + /// /// Add reversal info to TrackMonitorInfo /// @@ -16337,10 +16338,11 @@ public void LockDoors(DoorSide side, bool lck) /// public DoorState DoorState(DoorSide side) { - return Cars.Select(car => { + return Cars.Select(car => + { var wagon = (car as MSTSWagon); var carSide = car.Flipped ? Doors.FlippedDoorSide(side) : side; - switch(carSide) + switch (carSide) { case DoorSide.Left: return wagon.Doors.LeftDoor.State; @@ -19801,7 +19803,7 @@ public TCReversalInfo(TCSubpathRoute lastRoute, int prevReversalIndex, TCSubpath } // if next route ends within last one, last diverge index can be set to endLastIndex - if (firstIndex > firstRoute.Count -1) + if (firstIndex > firstRoute.Count - 1) { LastDivergeIndex = endLastIndex; DivergeSectorIndex = lastRoute[endLastIndex].TCSectionIndex; @@ -20570,7 +20572,7 @@ public enum STOPTYPE public StationStop(int platformReference, PlatformDetails platformItem, int subrouteIndex, int routeIndex, int tcSectionIndex, int direction, int exitSignal, bool holdSignal, bool noWaitSignal, bool noClaimAllowed, float stopOffset, - int arrivalTime, int departTime, bool terminal, int? actualMinStopTime, float? keepClearFront, float? keepClearRear, + int arrivalTime, int departTime, bool terminal, int? actualMinStopTime, float? keepClearFront, float? keepClearRear, bool forcePosition, bool closeupSignal, bool closeup, bool restrictPlatformToSignal, bool extendPlatformToSignal, bool endStop, STOPTYPE actualStopType) { @@ -21370,7 +21372,7 @@ private void UpdateCarSlack(float expectedLength) public void UpdateRemoteTrainPos(float elapsedClockSeconds) { float newDistanceTravelledM = DistanceTravelledM; - // float xx = 0; + // float xx = 0; if (updateMSGReceived) { @@ -21381,7 +21383,7 @@ public void UpdateRemoteTrainPos(float elapsedClockSeconds) if (doReverseTrav) { doReverseTrav = false; - ReverseFormation(doReverseMU == 1? true : false); + ReverseFormation(doReverseMU == 1 ? true : false); UpdateCarSlack(expectedLength);//update car slack first CalculatePositionOfCars(elapsedClockSeconds, SpeedMpS * elapsedClockSeconds); newDistanceTravelledM = DistanceTravelledM + (SpeedMpS * elapsedClockSeconds); @@ -21452,7 +21454,7 @@ public void UpdateRemoteTrainPos(float elapsedClockSeconds) { car.SpeedMpS = SpeedMpS; if (car.Flipped) car.SpeedMpS = -car.SpeedMpS; - car.AbsSpeedMpS = car.AbsSpeedMpS * (1 - elapsedClockSeconds ) + targetSpeedMpS * elapsedClockSeconds; + car.AbsSpeedMpS = car.AbsSpeedMpS * (1 - elapsedClockSeconds) + targetSpeedMpS * elapsedClockSeconds; if (car.IsDriveable && car is MSTSWagon) { (car as MSTSWagon).WheelSpeedMpS = SpeedMpS; @@ -21488,8 +21490,8 @@ public void UpdateRemoteTrainPos(float elapsedClockSeconds) #endif } } -// Trace.TraceWarning("SpeedMpS {0} LastSpeedMpS {1} AbsSpeedMpS {2} targetSpeedMpS {7} x {3} expectedTravelled {4} travelled {5} newDistanceTravelledM {6}", -// SpeedMpS, LastSpeedMpS, Cars[0].AbsSpeedMpS, xx, expectedTravelled, travelled, newDistanceTravelledM, targetSpeedMpS); + // Trace.TraceWarning("SpeedMpS {0} LastSpeedMpS {1} AbsSpeedMpS {2} targetSpeedMpS {7} x {3} expectedTravelled {4} travelled {5} newDistanceTravelledM {6}", + // SpeedMpS, LastSpeedMpS, Cars[0].AbsSpeedMpS, xx, expectedTravelled, travelled, newDistanceTravelledM, targetSpeedMpS); LastSpeedMpS = SpeedMpS; DistanceTravelledM = newDistanceTravelledM; diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/LocomotiveAttributes.cs b/Source/Orts.Simulation/Simulation/RollingStocks/LocomotiveAttributes.cs index ed97574ead..66b88a8f2b 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/LocomotiveAttributes.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/LocomotiveAttributes.cs @@ -15,12 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Orts.Parsers.Msts; using System; using System.Collections.Generic; using System.Reflection; +using Microsoft.Xna.Framework; +using Orts.Parsers.Msts; namespace Orts.Simulation.RollingStocks { diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/MSTSControlTrailerCar.cs b/Source/Orts.Simulation/Simulation/RollingStocks/MSTSControlTrailerCar.cs index 674119cca8..60a69670bb 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/MSTSControlTrailerCar.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/MSTSControlTrailerCar.cs @@ -180,7 +180,7 @@ public override void Update(float elapsedClockSeconds) locog.GearBoxController.CurrentNotch = GearBoxController.CurrentNotch; locog.GearBoxController.SetValue((float)locog.GearBoxController.CurrentNotch); - locog.ChangeGearUp(); + locog.ChangeGearUp(); } if (ControlGearDown) @@ -188,7 +188,7 @@ public override void Update(float elapsedClockSeconds) locog.GearBoxController.CurrentNotch = GearBoxController.CurrentNotch; locog.GearBoxController.SetValue((float)locog.GearBoxController.CurrentNotch); - locog.ChangeGearDown(); + locog.ChangeGearDown(); } } @@ -203,7 +203,7 @@ public override void Update(float elapsedClockSeconds) } } } - + // Rest gear flags once all the cars have been processed ControlGearUp = false; ControlGearDown = false; diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs b/Source/Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs index baebad2691..2069f2614d 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs @@ -31,22 +31,22 @@ //#define ALLOW_ORTS_SPECIFIC_ENG_PARAMETERS +using System; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Text; using Microsoft.Xna.Framework; using Orts.Formats.Msts; using Orts.Parsers.Msts; using Orts.Simulation.Physics; +using Orts.Simulation.RollingStocks.SubSystems.Brakes; using Orts.Simulation.RollingStocks.SubSystems.Controllers; using Orts.Simulation.RollingStocks.SubSystems.PowerSupplies; using Orts.Simulation.RollingStocks.SubSystems.PowerTransmissions; using ORTS.Common; -using System.Diagnostics; -using System; -using System.IO; -using System.Text; -using Event = Orts.Common.Event; using ORTS.Scripting.Api; -using System.Linq; -using Orts.Simulation.RollingStocks.SubSystems.Brakes; +using Event = Orts.Common.Event; namespace Orts.Simulation.RollingStocks { @@ -125,7 +125,7 @@ public enum DieselTransmissionTypes // diesel performance reporting public float DieselPerformanceTimeS = 0.0f; // Records the time since starting movement - public DieselEngines DieselEngines; + public DieselEngines DieselEngines; /// /// Used to accumulate a quantity that is not lost because of lack of precision when added to the Fuel level @@ -309,7 +309,7 @@ public override void LoadFromWagFile(string wagFilePath) } - + if (MaximumDieselEnginePowerW == 0) { MaximumDieselEnginePowerW = LocomotiveMaxRailOutputPowerW; // If no value set in ENG file, then set the Prime Mover power to same as RailOutputPower (typically the MaxPower value) @@ -541,7 +541,7 @@ public override void Restore(BinaryReader inf) CurrentLocomotiveSteamHeatBoilerWaterCapacityL = inf.ReadSingle(); DieselEngines.Restore(inf); ControllerFactory.Restore(GearBoxController, inf); - + } //================================================================================================// @@ -966,11 +966,11 @@ public override string GetDebugStatus() if (DieselEngines.HasGearBox && DieselTransmissionType == DieselTransmissionTypes.Mechanic) { - status.AppendFormat("\t{0} {1}-{2}", Simulator.Catalog.GetString("Gear"), DieselEngines[0].GearBox.CurrentGearIndex < 0 ? Simulator.Catalog.GetString("N") : (DieselEngines[0].GearBox.GearIndication).ToString(), DieselEngines[0].GearBox.GearBoxType); + status.AppendFormat("\t{0} {1}-{2}", Simulator.Catalog.GetString("Gear"), DieselEngines[0].GearBox.CurrentGearIndex < 0 ? Simulator.Catalog.GetString("N") : (DieselEngines[0].GearBox.GearIndication).ToString(), DieselEngines[0].GearBox.GearBoxType); } - status.AppendFormat("\t{0} {1}\t\t{2}\n", - Simulator.Catalog.GetString("Fuel"), - FormatStrings.FormatFuelVolume(DieselLevelL, IsMetric, IsUK), DieselEngines.GetStatus()); + status.AppendFormat("\t{0} {1}\t\t{2}\n", + Simulator.Catalog.GetString("Fuel"), + FormatStrings.FormatFuelVolume(DieselLevelL, IsMetric, IsUK), DieselEngines.GetStatus()); if (IsSteamHeatFitted && Train.PassengerCarsNumber > 0 && this.IsLeadLocomotive() && Train.CarSteamHeatOn) @@ -1059,14 +1059,14 @@ public string GetDPDebugStatus() { if (RemoteControlGroup == 1) { - throttle = Simulator.Catalog.GetParticularString("Notch", "B") + MathHelper.Clamp((Train.LeadLocomotive as MSTSLocomotive).DPDynamicBrakeController.CurrentNotch, 1, 8); + throttle = Simulator.Catalog.GetParticularString("Notch", "B") + MathHelper.Clamp((Train.LeadLocomotive as MSTSLocomotive).DPDynamicBrakeController.CurrentNotch, 1, 8); } else { // The clause here below leads to possible differences of one notch near the notch value, and therefore is commented - // if (DynamicBrakeController.NotchCount() > 3) - // throttle = Simulator.Catalog.GetParticularString("Notch", "B") + MathHelper.Clamp((DynamicBrakeController.GetNearestNotch(DynamicBrakePercent / 100f)), 1, 8); - // else + // if (DynamicBrakeController.NotchCount() > 3) + // throttle = Simulator.Catalog.GetParticularString("Notch", "B") + MathHelper.Clamp((DynamicBrakeController.GetNearestNotch(DynamicBrakePercent / 100f)), 1, 8); + // else throttle = Simulator.Catalog.GetParticularString("Notch", "B") + MathHelper.Clamp((Train.LeadLocomotive as MSTSLocomotive).DPDynamicBrakeController.GetNotch(DynamicBrakePercent / 100f), 1, 8); } } @@ -1263,13 +1263,13 @@ public static string GetDebugTableBase(int locomotivesInTrain) table += "\t\t"; table += "\n"; } - return table; + return table; } public static string GetDpuHeader(bool dpuVerticalFull, int locomotivesInTrain, int dpuMaxNumberOfEngines) { - if (MaxNumberOfEngines != dpuMaxNumberOfEngines || dpuVerticalFull? DPULabels == null : DpuLabels == null) - SetDPULabels(dpuVerticalFull , dpuMaxNumberOfEngines); + if (MaxNumberOfEngines != dpuMaxNumberOfEngines || dpuVerticalFull ? DPULabels == null : DpuLabels == null) + SetDPULabels(dpuVerticalFull, dpuMaxNumberOfEngines); string table = ""; for (var i = 0; i < (dpuVerticalFull ? DPULabels.Length : DpuLabels.Length); i++) { @@ -1382,7 +1382,7 @@ protected override void UpdateCarSteamHeat(float elapsedClockSeconds) // Calculate steam boiler usage values // Don't turn steam heat on until pressure valve has been opened, water and fuel capacity also needs to be present, and steam boiler is not locked out - if (CurrentSteamHeatPressurePSI > 0.1 && CurrentLocomotiveSteamHeatBoilerWaterCapacityL > 0 && DieselLevelL > 0 && !IsSteamHeatBoilerLockedOut) + if (CurrentSteamHeatPressurePSI > 0.1 && CurrentLocomotiveSteamHeatBoilerWaterCapacityL > 0 && DieselLevelL > 0 && !IsSteamHeatBoilerLockedOut) { // Set values for visible exhaust based upon setting of steam controller HeatingSteamBoilerVolumeM3pS = 1.5f * SteamHeatController.CurrentValue; @@ -1401,7 +1401,7 @@ protected override void UpdateCarSteamHeat(float elapsedClockSeconds) { Train.CarSteamHeatOn = false; // turn on steam effects on wagons } - + } } @@ -1429,7 +1429,7 @@ protected void NormalizeParams() if (DieselEngines.MSTSGearBoxParams.GearBoxMaxTractiveForceForGearsN.Count > 0) { if (ThrottleController != null && ThrottleController.MaximumValue > 1 && MaxForceN / DieselEngines.MSTSGearBoxParams.GearBoxMaxTractiveForceForGearsN[0] > 3) - // Tricky things have been made with this .eng file, see e.g Cravens 105; let's correct them + // Tricky things have been made with this .eng file, see e.g Cravens 105; let's correct them { for (int i = 0; i < DieselEngines.MSTSGearBoxParams.GearBoxMaxTractiveForceForGearsN.Count; i++) DieselEngines.MSTSGearBoxParams.GearBoxMaxTractiveForceForGearsN[i] *= ThrottleController.MaximumValue; @@ -1441,7 +1441,7 @@ protected void NormalizeParams() { if (cabView.CVFFile != null && cabView.CVFFile.CabViewControls != null && cabView.CVFFile.CabViewControls.Count > 0) { - foreach ( var control in cabView.CVFFile.CabViewControls) + foreach (var control in cabView.CVFFile.CabViewControls) { if (control is CVCDiscrete && control.ControlType.Type == CABViewControlTypes.THROTTLE && (control as CVCDiscrete).Values.Count > 0 && (control as CVCDiscrete).Values[(control as CVCDiscrete).Values.Count - 1] > 1) { diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs b/Source/Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs index 57dcab2f53..60c18c9cf8 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs @@ -27,18 +27,15 @@ * */ -using Microsoft.Xna.Framework; +using System; +using System.IO; +using System.Text; using Orts.Formats.Msts; using Orts.Parsers.Msts; using Orts.Simulation.RollingStocks.SubSystems.Controllers; using Orts.Simulation.RollingStocks.SubSystems.PowerSupplies; using ORTS.Common; using ORTS.Scripting.Api; -using System; -using System.Diagnostics; -using System.IO; -using System.Text; -using Event = Orts.Common.Event; namespace Orts.Simulation.RollingStocks { @@ -162,9 +159,9 @@ protected override void UpdateCarSteamHeat(float elapsedClockSeconds) { // Update water controller for steam boiler heating tank - WaterController.Update(elapsedClockSeconds); - if (WaterController.UpdateValue > 0.0) - Simulator.Confirmer.UpdateWithPerCent(CabControl.SteamHeatBoilerWater, CabSetting.Increase, WaterController.CurrentValue * 100); + WaterController.Update(elapsedClockSeconds); + if (WaterController.UpdateValue > 0.0) + Simulator.Confirmer.UpdateWithPerCent(CabControl.SteamHeatBoilerWater, CabSetting.Increase, WaterController.CurrentValue * 100); CurrentSteamHeatPressurePSI = SteamHeatController.CurrentValue * MaxSteamHeatPressurePSI; diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs b/Source/Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs index 780aba86cc..08e1dc030b 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs @@ -44,8 +44,12 @@ // Debug for Advanced Adhesion Model // #define DEBUG_ADHESION +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; using Orts.Common; using Orts.Formats.Msts; using Orts.MultiPlayer; @@ -59,11 +63,6 @@ using Orts.Simulation.RollingStocks.SubSystems.PowerTransmissions; using ORTS.Common; using ORTS.Scripting.Api; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; using Event = Orts.Common.Event; namespace Orts.Simulation.RollingStocks @@ -173,7 +172,7 @@ public enum SoundState public float MaxTotalCombinedWaterVolumeUKG; public MSTSNotchController WaterController = new MSTSNotchController(0, 1, 0.01f); public float CombinedTenderWaterVolumeUKG // Decreased by running injectors and increased by refilling - { + { get { return WaterController.CurrentValue * MaxTotalCombinedWaterVolumeUKG; } set { WaterController.CurrentValue = value / MaxTotalCombinedWaterVolumeUKG; } } @@ -275,7 +274,7 @@ public bool SmallEjectorSoundOn { if (value != _SmallEjectorSoundOn) { - SignalEvent(value? Event.SmallEjectorOn : Event.SmallEjectorOff); + SignalEvent(value ? Event.SmallEjectorOn : Event.SmallEjectorOff); _SmallEjectorSoundOn = value; } } @@ -289,11 +288,11 @@ public bool LargeEjectorSoundOn { if (value != _LargeEjectorSoundOn) { - SignalEvent(value? Event.LargeEjectorOn : Event.LargeEjectorOff); + SignalEvent(value ? Event.LargeEjectorOn : Event.LargeEjectorOff); _LargeEjectorSoundOn = value; } } - } + } public bool DriveWheelOnlyBrakes = false; public bool SteamEngineBrakeFitted = false; @@ -417,7 +416,7 @@ public float OdometerM protected const float DefaultMainResVolume = 0.78f; // Value to be inserted if .eng parameters are corrected protected const float DefaultMaxMainResPressure = 140; // Max value to be inserted if .eng parameters are corrected -public List CabViewList = new List(); + public List CabViewList = new List(); public CabView3D CabView3D; public MSTSNotchController SteamHeatController = new MSTSNotchController(0, 1, 0.1f); @@ -474,8 +473,8 @@ public enum TractionMotorTypes public MSTSLocomotive(Simulator simulator, string wagPath) : base(simulator, wagPath) { - // BrakePipeChargingRatePSIpS = Simulator.Settings.BrakePipeChargingRate; - + // BrakePipeChargingRatePSIpS = Simulator.Settings.BrakePipeChargingRate; + MilepostUnitsMetric = Simulator.TRK.Tr_RouteFile.MilepostUnitsMetric; BrakeCutsPowerAtBrakeCylinderPressurePSI = 4.0f; @@ -613,7 +612,7 @@ protected void CheckCoherence() DynamicBrakeForceCurves[1] = interp; } } - + protected MSTSNotchController BuildDPDynamicBrakeController() { var dpDynController = new MSTSNotchController(); @@ -632,10 +631,10 @@ protected MSTSNotchController BuildDPDynamicBrakeController() { try { - msDisplay = (CVCMultiStateDisplay) cabView.CVFFile.CabViewControls.Where( + msDisplay = (CVCMultiStateDisplay)cabView.CVFFile.CabViewControls.Where( control => control is CVCMultiStateDisplay && - (((CVCMultiStateDisplay) control).ControlType.Type == CABViewControlTypes.DYNAMIC_BRAKE_DISPLAY || - ((CVCMultiStateDisplay) control).ControlType.Type == CABViewControlTypes.CPH_DISPLAY)).First(); + (((CVCMultiStateDisplay)control).ControlType.Type == CABViewControlTypes.DYNAMIC_BRAKE_DISPLAY || + ((CVCMultiStateDisplay)control).ControlType.Type == CABViewControlTypes.CPH_DISPLAY)).First(); } catch { @@ -646,13 +645,13 @@ protected MSTSNotchController BuildDPDynamicBrakeController() if (msDisplay.ControlType.Type == CABViewControlTypes.DYNAMIC_BRAKE_DISPLAY) { foreach (var switchval in msDisplay.Values) - dpDynController.AddNotch((float) switchval); + dpDynController.AddNotch((float)switchval); } else { foreach (var switchval in msDisplay.Values) { - if (switchval 0 && MaxContinuousForceN > 0 && (MaxDynamicBrakeForceN / MaxContinuousForceN < 0.3f && MaxDynamicBrakeForceN == 20000)) - MaxDynamicBrakeForceN = Math.Min (MaxContinuousForceN * 0.5f, 150000); // 20000 is suggested as standard value in the MSTS documentation, but in general it is a too low value + MaxDynamicBrakeForceN = Math.Min(MaxContinuousForceN * 0.5f, 150000); // 20000 is suggested as standard value in the MSTS documentation, but in general it is a too low value } } @@ -1919,7 +1919,7 @@ public override void Update(float elapsedClockSeconds) { gearloco.DieselEngines[ii].GearBox.currentGearIndex = gearloco.DieselEngines[0].GearBox.CurrentGearIndex; } - + ii = ii + 1; } @@ -1929,7 +1929,7 @@ public override void Update(float elapsedClockSeconds) if (gearloco != null && gearloco.DieselTransmissionType == MSTSDieselLocomotive.DieselTransmissionTypes.Mechanic && GearBoxController.CurrentNotch != previousChangedGearBoxNotch && IsLeadLocomotive()) { - + foreach (TrainCar car in Train.Cars) { var locog = car as MSTSDieselLocomotive; @@ -1979,11 +1979,11 @@ public override void Update(float elapsedClockSeconds) } if (!AdvancedAdhesionModel) // Advanced adhesion model turned off. - AbsWheelSpeedMpS = AbsSpeedMpS; + AbsWheelSpeedMpS = AbsSpeedMpS; // Cruise Control CruiseControl?.Update(elapsedClockSeconds); - + // TODO this is a wild simplification for electric and diesel electric UpdateTractiveForce(elapsedClockSeconds, ThrottlePercent / 100f, AbsSpeedMpS, AbsWheelSpeedMpS); @@ -2005,7 +2005,7 @@ public override void Update(float elapsedClockSeconds) if (f > 0 && LocomotivePowerSupply.DynamicBrakeAvailable) { DynamicBrakeForceN = f * (1 - PowerReduction); - MotiveForceN -= (SpeedMpS > 0 ? 1 : SpeedMpS < 0 ? -1 : Direction == Direction.Reverse ? -1 : 1) * DynamicBrakeForceN; + MotiveForceN -= (SpeedMpS > 0 ? 1 : SpeedMpS < 0 ? -1 : Direction == Direction.Reverse ? -1 : 1) * DynamicBrakeForceN; } else { @@ -2014,7 +2014,7 @@ public override void Update(float elapsedClockSeconds) } else DynamicBrakeForceN = 0; // Set dynamic brake force to zero if in Notch 0 position - + UpdateFrictionCoefficient(elapsedClockSeconds); // Find the current coefficient of friction depending upon the weather @@ -2043,7 +2043,7 @@ public override void Update(float elapsedClockSeconds) { foreach (DieselEngine de in (this as MSTSDieselLocomotive).DieselEngines) { - if (de.GearBox != null) + if (de.GearBox != null) de.GearBox.GearBoxOperation = GearBoxOperation.Automatic; } } @@ -2077,7 +2077,7 @@ public override void Update(float elapsedClockSeconds) } // SimpleControlPhysics and if locomotive is a control car advanced adhesion will be "disabled". - if (Simulator.UseAdvancedAdhesion && !Simulator.Settings.SimpleControlPhysics && EngineType != EngineTypes.Control) + if (Simulator.UseAdvancedAdhesion && !Simulator.Settings.SimpleControlPhysics && EngineType != EngineTypes.Control) { AdvancedAdhesion(elapsedClockSeconds); // Use advanced adhesion model AdvancedAdhesionModel = true; // Set flag to advise advanced adhesion model is in use @@ -2117,10 +2117,10 @@ public override void Update(float elapsedClockSeconds) } // always set AntiSlip for AI trains - if (Train.TrainType == Train.TRAINTYPE.AI || Train.TrainType == Train.TRAINTYPE.AI_PLAYERHOSTING) - { - AntiSlip = true; - } + if (Train.TrainType == Train.TRAINTYPE.AI || Train.TrainType == Train.TRAINTYPE.AI_PLAYERHOSTING) + { + AntiSlip = true; + } // If the train is vacuumed braked then no need to update the compressor, but udate the ejector instead if (BrakeSystem is VacuumSinglePipe) @@ -2331,7 +2331,7 @@ protected virtual void UpdateControllers(float elapsedClockSeconds) //Currently the ThrottlePercent is global to the entire train //So only the lead locomotive updates it, the others only updates the controller (actually useless) if (this.IsLeadLocomotive()) -// if (this.IsLeadLocomotive() || RemoteControlGroup == -1) + // if (this.IsLeadLocomotive() || RemoteControlGroup == -1) { var throttleCurrentNotch = ThrottleController.CurrentNotch; ThrottleController.Update(elapsedClockSeconds); @@ -2539,12 +2539,12 @@ public void ConfirmWheelslip(float elapsedClockSeconds) /// protected virtual void UpdateSteamEjector(float elapsedClockSeconds) { - // Ejectors are controlled independently for the "straight_vacuum_single_pipe" brake type - // Ejectors are controlled by brake control valves in Simple Physics Control - if (Simulator.Settings.SimpleControlPhysics && CarBrakeSystemType != "straight_vacuum_single_pipe") - // Simple braking - control Ejector automatically based upon the brake control position - // Stop ejector operation if full vacuum pressure reached - { + // Ejectors are controlled independently for the "straight_vacuum_single_pipe" brake type + // Ejectors are controlled by brake control valves in Simple Physics Control + if (Simulator.Settings.SimpleControlPhysics && CarBrakeSystemType != "straight_vacuum_single_pipe") + // Simple braking - control Ejector automatically based upon the brake control position + // Stop ejector operation if full vacuum pressure reached + { if ((TrainBrakeController.TrainBrakeControllerState == ControllerState.Release || TrainBrakeController.TrainBrakeControllerState == ControllerState.FullQuickRelease || (TrainBrakeController.TrainBrakeControllerState == ControllerState.VacContServ)) && (this.BrakeSystem.BrakeLine1PressurePSI > Vac.ToPress(this.TrainBrakeController.MaxPressurePSI))) { LargeSteamEjectorIsOn = true; // If brake is set to a release controller, then turn ejector on @@ -2555,41 +2555,41 @@ protected virtual void UpdateSteamEjector(float elapsedClockSeconds) LargeSteamEjectorIsOn = false; // If brake is not set to a release controller, or full vacuum reached, then turn ejector off LargeEjectorSoundOn = false; } + } + else if (!LargeEjectorControllerFitted && CarBrakeSystemType != "straight_vacuum_single_pipe") // Use an "automatic" large ejector when using a dreadnought style brake controller - large ejector stays on until moved back to released position + { + if (TrainBrakeController.TrainBrakeControllerState == ControllerState.Release) + { + LargeSteamEjectorIsOn = true; // If brake is set to a release controller, then turn ejector on + LargeEjectorSoundOn = true; } - else if (!LargeEjectorControllerFitted && CarBrakeSystemType != "straight_vacuum_single_pipe") // Use an "automatic" large ejector when using a dreadnought style brake controller - large ejector stays on until moved back to released position + else { - if (TrainBrakeController.TrainBrakeControllerState == ControllerState.Release) + LargeSteamEjectorIsOn = false; // If brake is not set to a release controller, then turn ejector off + if (LargeEjectorSoundOn) { - LargeSteamEjectorIsOn = true; // If brake is set to a release controller, then turn ejector on - LargeEjectorSoundOn = true; - } - else - { - LargeSteamEjectorIsOn = false; // If brake is not set to a release controller, then turn ejector off - if (LargeEjectorSoundOn) - { - SignalEvent(Event.LargeEjectorOff); - LargeEjectorSoundOn = false; - } + SignalEvent(Event.LargeEjectorOff); + LargeEjectorSoundOn = false; } + } + } + else if (LargeEjectorControllerFitted)// Advanced braking - control ejector based upon using a "manual" large ejector control setting + { + if (LargeEjectorFeedFraction > 0.05) + { + LargeSteamEjectorIsOn = true; // turn ejector on + LargeEjectorSoundOn = true; } - else if (LargeEjectorControllerFitted)// Advanced braking - control ejector based upon using a "manual" large ejector control setting + else { - if (LargeEjectorFeedFraction > 0.05) - { - LargeSteamEjectorIsOn = true; // turn ejector on - LargeEjectorSoundOn = true; - } - else - { - LargeSteamEjectorIsOn = false; // turn ejector off - LargeEjectorSoundOn = false; - } + LargeSteamEjectorIsOn = false; // turn ejector off + LargeEjectorSoundOn = false; } + } - if (SmallEjectorControllerFitted && CarBrakeSystemType != "straight_vacuum_single_pipe") + if (SmallEjectorControllerFitted && CarBrakeSystemType != "straight_vacuum_single_pipe") // Turn small ejector on if controlled from drivers controller if (SmallEjectorFeedFraction > 0.05) { @@ -2602,7 +2602,7 @@ protected virtual void UpdateSteamEjector(float elapsedClockSeconds) SmallEjectorSoundOn = false; } - + // If diesel or electric locomotive, assume vacuum pump (exhauster) is continually running. if (!(this is MSTSSteamLocomotive)) { @@ -2826,7 +2826,7 @@ public virtual void AdvancedAdhesion(float elapsedClockSeconds) WheelSlip = LocomotiveAxle.IsWheelSlip; //Get the wheelslip indicator WheelSlipWarning = LocomotiveAxle.IsWheelSlipWarning && SlipControlSystem != SlipControlType.Full; } - + // This enables steam locomotives to have different speeds for driven and non-driven wheels. if (EngineType == EngineTypes.Steam && SteamEngineType != MSTSSteamLocomotive.SteamEngineTypes.Geared) { @@ -2841,7 +2841,7 @@ public virtual void AdvancedAdhesion(float elapsedClockSeconds) WheelSpeedMpS = SpeedMpS; } } - else WheelSpeedMpS = LocomotiveAxle.AxleSpeedMpS; + else WheelSpeedMpS = LocomotiveAxle.AxleSpeedMpS; } @@ -2854,14 +2854,14 @@ public void SimpleAdhesion() WheelSpeedMpS = AbsSpeedMpS; return; } - + if (LocoNumDrvAxles <= 0) return; //Curtius-Kniffler computation // Set to a high level of adhesion to ensure that locomotive rarely slips in dry mode float uMax = 1.3f * (7.5f / (AbsSpeedMpS + 44.0f) + 0.161f); // Curtius - Kniffler equation - + float max0 = DrvWheelWeightKg * 9.81f * uMax; //Ahesion limit in [N] float max1; @@ -2954,7 +2954,7 @@ public virtual void UpdateWaterTroughRefill(float elapsedClockSeconds, float abs else if (ScoopIsBroken) { Simulator.Confirmer.Message(ConfirmLevel.Error, Simulator.Catalog.GetString("Scoop is broken, can't refill")); - RefillingFromTrough = false; + RefillingFromTrough = false; } else if (IsOverJunction()) { @@ -2964,7 +2964,7 @@ public virtual void UpdateWaterTroughRefill(float elapsedClockSeconds, float abs } ScoopIsBroken = true; RefillingFromTrough = false; - SignalEvent(Event.WaterScoopBroken); + SignalEvent(Event.WaterScoopBroken); } else if (!IsOverTrough()) { @@ -3147,7 +3147,7 @@ public virtual void UpdateFrictionCoefficient(float elapsedClockSeconds) } else if (pric > 0) { - pricBaseFrictionCoefficientFactor = Math.Min((pric - 5f) * precGrad + 0.6f, 0.9f); + pricBaseFrictionCoefficientFactor = Math.Min((pric - 5f) * precGrad + 0.6f, 0.9f); // should give a value between 0.6 and 0.9 } @@ -3179,7 +3179,7 @@ public virtual void UpdateFrictionCoefficient(float elapsedClockSeconds) } } - BaseFrictionCoefficientFactor = MathHelper.Clamp(BaseFrictionCoefficientFactor, 0.5f, 1.0f); + BaseFrictionCoefficientFactor = MathHelper.Clamp(BaseFrictionCoefficientFactor, 0.5f, 1.0f); // Snow covered track if (Simulator.WeatherType == WeatherType.Snow) @@ -3271,7 +3271,7 @@ public virtual void UpdateFrictionCoefficient(float elapsedClockSeconds) float WagonCurtius_KnifflerA = 7.5f; float WagonCurtius_KnifflerB = 44.0f; float WagonCurtius_KnifflerC = 0.161f; - + float WagonBaseuMax = (WagonCurtius_KnifflerA / (MpS.ToKpH(AbsSpeedMpS) + WagonCurtius_KnifflerB) + WagonCurtius_KnifflerC); Train.WagonCoefficientFriction = WagonBaseuMax * BaseFrictionCoefficientFactor; // Find friction coefficient factor for wagons based upon environmental conditions WagonCoefficientFrictionHUD = Train.WagonCoefficientFriction; // Save value for HUD display @@ -3296,7 +3296,7 @@ public virtual void UpdateFrictionCoefficient(float elapsedClockSeconds) LocomotiveAxle.AdhesionLimit = AdhesionConditions * BaseuMax; } - // Set adhesion conditions for other steam locomotives + // Set adhesion conditions for other steam locomotives if (EngineType == EngineTypes.Steam && SteamEngineType != MSTSSteamLocomotive.SteamEngineTypes.Geared) // ToDo explore adhesion factors { LocomotiveCoefficientFrictionHUD = Train.LocomotiveCoefficientFriction; // Set display value for HUD - steam @@ -3312,9 +3312,9 @@ public virtual void UpdateFrictionCoefficient(float elapsedClockSeconds) public void UpdateTrackSander(float elapsedClockSeconds) { - // updates track sander in terms of sand usage and impact on air compressor - // The following assumptions have been made: - // + // updates track sander in terms of sand usage and impact on air compressor + // The following assumptions have been made: + // if (Sander) // If sander is on adjust parameters { @@ -3330,9 +3330,9 @@ public void UpdateTrackSander(float elapsedClockSeconds) } } - // Calculate air consumption and change in main air reservoir pressure + // Calculate air consumption and change in main air reservoir pressure float ActualAirConsumptionM3pS = pS.FrompM(TrackSanderAirComsumptionM3pS) * elapsedClockSeconds; - float SanderPressureDiffPSI = ActualAirConsumptionM3pS / Me3.ToFt3(MainResVolumeM3) ; + float SanderPressureDiffPSI = ActualAirConsumptionM3pS / Me3.ToFt3(MainResVolumeM3); MainResPressurePSI -= SanderPressureDiffPSI; MainResPressurePSI = MathHelper.Clamp(MainResPressurePSI, 0.001f, MaxMainResPressurePSI); } @@ -3343,7 +3343,7 @@ public override bool GetSanderOn() { return Sander; } - + #region Reverser public void SetDirection(Direction direction) { @@ -3601,13 +3601,13 @@ public void StartThrottleDecrease() if (!mpc.StateChanged) { mpc.StateChanged = true; - mpc.DoMovement(MultiPositionController.Movement.Aft); + mpc.DoMovement(MultiPositionController.Movement.Aft); } return; } if (CruiseControl != null && (CombinedControlType == CombinedControl.None || CruiseControl.UseThrottleInCombinedControl)) { - if (CruiseControl.UseThrottleAsForceSelector && CruiseControl.SpeedRegMode == CruiseControl.SpeedRegulatorMode.Auto && + if (CruiseControl.UseThrottleAsForceSelector && CruiseControl.SpeedRegMode == CruiseControl.SpeedRegulatorMode.Auto && !(CruiseControl.DynamicBrakeCommandHasPriorityOverCruiseControl && (CruiseControl.DynamicBrakePriority || CruiseControl.SelectedMaxAccelerationPercent == 0))) { @@ -3765,7 +3765,7 @@ public void ToggleWaterScoop() WaterScoopSlowSpeedFlag = false; WaterScoopDirectionFlag = false; } - Simulator.Confirmer.Confirm(CabControl.WaterScoop, WaterScoopDown? CabSetting.On : CabSetting.Off); + Simulator.Confirmer.Confirm(CabControl.WaterScoop, WaterScoopDown ? CabSetting.On : CabSetting.Off); } } @@ -3777,7 +3777,7 @@ public void ToggleWaterScoop() public void ThrottleChangeTo(bool increase, float? target) { if ((CruiseControl != null && target != 0 && CruiseControl.SelectedMaxAccelerationPercent <= 0 - && ThrottleController.CurrentValue == 0 && DynamicBrakeController.CurrentValue == 0) && + && ThrottleController.CurrentValue == 0 && DynamicBrakeController.CurrentValue == 0) && (CruiseControl.DisableCruiseControlOnThrottleAndZeroForce || CruiseControl.DisableCruiseControlOnThrottleAndZeroForceAndZeroSpeed && CruiseControl.SelectedSpeedMpS == 0)) { if (CruiseControl.ZeroSelectedSpeedWhenPassingToThrottleMode) CruiseControl.SetSpeed(0); @@ -3965,7 +3965,7 @@ public float GetThrottleHandleValue(float data) /// public void SetCombinedHandleValue(float value) { - bool ccUseCombinedControl = CruiseControl != null && (CruiseControl.UseThrottleAsForceSelector || CruiseControl.UseThrottleAsSpeedSelector ) && CruiseControl.UseThrottleInCombinedControl; + bool ccUseCombinedControl = CruiseControl != null && (CruiseControl.UseThrottleAsForceSelector || CruiseControl.UseThrottleAsSpeedSelector) && CruiseControl.UseThrottleInCombinedControl; if (CombinedControlType == CombinedControl.ThrottleDynamic && DynamicBrake && !TrainControlSystem.FullDynamicBrakingOrder && !(ccUseCombinedControl && !CruiseControl.DynamicBrakePriority && CruiseControl.SpeedRegMode == CruiseControl.SpeedRegulatorMode.Auto)) { @@ -4014,7 +4014,7 @@ public float GetCombinedHandleValue(bool intermediateValue) { if (!CruiseControl.DynamicBrakePriority && CombinedControlType == CombinedControl.ThrottleDynamic || !CruiseControl.TrainBrakePriority && CombinedControlType == CombinedControl.ThrottleAir) - return CombinedControlSplitPosition * (1 - (CruiseControl.SelectedSpeedMpS / MaxSpeedMpS)); + return CombinedControlSplitPosition * (1 - (CruiseControl.SelectedSpeedMpS / MaxSpeedMpS)); } } @@ -4086,7 +4086,7 @@ public virtual void StartGearBoxIncrease() if (ThrottlePercent == 0) { GearBoxController.StartIncrease(); - Simulator.Confirmer.ConfirmWithPerCent(CabControl.GearBox, CabSetting.Increase, dieselloco.DieselEngines[0].GearBox.GearIndication ); + Simulator.Confirmer.ConfirmWithPerCent(CabControl.GearBox, CabSetting.Increase, dieselloco.DieselEngines[0].GearBox.GearIndication); AlerterReset(TCSEvent.GearBoxChanged); SignalGearBoxChangeEvents(); dieselloco.DieselEngines[0].GearBox.clutchOn = false; @@ -4120,7 +4120,7 @@ public virtual void StopGearBoxIncrease() public virtual void ChangeGearDown() { - + } public virtual void StartGearBoxDecrease() @@ -4322,11 +4322,11 @@ public override string GetTrainBrakeStatus() { var train = Simulator.PlayerLocomotive.Train;//Debrief Eval string s = TrainBrakeController.GetStatus(); - + if (s == "Emergency" && train.LeadLocomotive != null && !ldbfevalfulltrainbrakeunder8kmh && train.LeadLocomotive.IsPlayerTrain && Math.Abs(train.SpeedMpS) < 2.22222) { - + DbfEvalFullTrainBrakeUnder8kmh++; ldbfevalfulltrainbrakeunder8kmh = true; train.DbfEvalValueChanged = true;//Debrief eval @@ -4508,7 +4508,7 @@ public void StartBrakemanBrakeIncrease(float? target) BrakemanBrakeController.StartIncrease(target); Simulator.Confirmer.Confirm(CabControl.BrakemanBrake, CabSetting.Increase, GetBrakemanBrakeStatus()); -// SignalEvent(Event.EngineBrakeChange); + // SignalEvent(Event.EngineBrakeChange); } /// @@ -4519,7 +4519,7 @@ public void StopBrakemanBrakeIncrease() if (BrakemanBrakeController == null) return; - // AlerterReset(TCSEvent.BrakemanBrakeChanged); + // AlerterReset(TCSEvent.BrakemanBrakeChanged); BrakemanBrakeController.StopIncrease(); new BrakemanBrakeCommand(Simulator.Log, true, BrakemanBrakeController.CurrentValue, BrakemanBrakeController.CommandStartTime); } @@ -4533,7 +4533,7 @@ public void StartBrakemanBrakeDecrease(float? target) BrakemanBrakeController.StartDecrease(target); BrakemanBrakeController.CommandStartTime = Simulator.ClockTime; // Remember when the command was issued Simulator.Confirmer.Confirm(CabControl.BrakemanBrake, CabSetting.Increase, GetBrakemanBrakeStatus()); - // SignalEvent(Event.BrakemanBrakeChange); + // SignalEvent(Event.BrakemanBrakeChange); } /// @@ -4560,7 +4560,7 @@ public void BrakemanBrakeChangeTo(bool increase, float? target) } else { - if (target 0, controller.CurrentValue, Simulator.ClockTime); - // SignalEvent(Event.BrakemanBrakeChange); + // SignalEvent(Event.BrakemanBrakeChange); AlerterReset(TCSEvent.BrakemanBrakeChanged); } if (oldValue != controller.IntermediateValue) - Simulator.Confirmer.Update(CabControl.BrakemanBrake, oldValue 0) { data = (data / MaxForceN) * MaxCurrentA; - } + } if (DynamicBrakePercent > 0) { data = (DynamicBrakeForceN / MaxDynamicBrakeForceN) * DynamicBrakeMaxCurrentA; } data = Math.Abs(data); break; - + case CABViewControlUnits.NEWTONS: break; - + case CABViewControlUnits.KILO_NEWTONS: data = data / 1000.0f; break; - + case CABViewControlUnits.KILO_LBS: data = N.ToLbf(data) * 0.001f; break; - } + } if (direction == 1 && !(cvc is CVCGauge)) data = -data; break; @@ -5270,11 +5270,11 @@ public virtual float GetDataOf(CabViewControl cvc) data = N.ToLbf(data) * 0.001f; break; } - // if (direction == 1 && !(cvc is CVCGauge)) - // data = -data; + // if (direction == 1 && !(cvc is CVCGauge)) + // data = -data; break; } - // this considers both the dynamic as well as the train braking + // this considers both the dynamic as well as the train braking case CABViewControlTypes.ORTS_SIGNED_TRACTION_TOTAL_BRAKING: { var direction = 0; // Forwards @@ -5420,12 +5420,12 @@ public virtual float GetDataOf(CabViewControl cvc) if (EngineType == EngineTypes.Control && activeloco.DieselEngines.NumOfActiveEngines > 1) { - + if (activeloco.DieselEngines[1] != null) data = activeloco.DieselEngines[1].RealRPM; } else if (EngineType == EngineTypes.Diesel && mstsDieselLocomotive.DieselEngines.NumOfActiveEngines > 1) - { + { if (mstsDieselLocomotive.DieselEngines[1] != null) data = mstsDieselLocomotive.DieselEngines[1].RealRPM; } @@ -5490,7 +5490,7 @@ public virtual float GetDataOf(CabViewControl cvc) case CABViewControlTypes.CPH_DISPLAY: { if (CruiseControl != null && CruiseControl.SkipThrottleDisplay) break; - data = Train.TrainType == Train.TRAINTYPE.AI_PLAYERHOSTING? ThrottlePercent / 100f : LocalThrottlePercent / 100f; + data = Train.TrainType == Train.TRAINTYPE.AI_PLAYERHOSTING ? ThrottlePercent / 100f : LocalThrottlePercent / 100f; break; } case CABViewControlTypes.ENGINE_BRAKE: @@ -5778,7 +5778,7 @@ public virtual float GetDataOf(CabViewControl cvc) dieselLoco.DieselEngines[0].State == DieselEngineState.Starting) ? 1 : 0; break; } - } + } } break; } diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs b/Source/Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs index 8deb30c186..3d818d63a0 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs @@ -63,20 +63,20 @@ * LocomotiveViewer - provides basic animation for running gear, wipers, etc * */ +using System; +using System.Diagnostics; +using System.IO; +using System.Text; using Microsoft.Xna.Framework; using Orts.Common; using Orts.Formats.Msts; using Orts.Parsers.Msts; using Orts.Simulation.Physics; -using Orts.Simulation.RollingStocks.SubSystems.Controllers; using Orts.Simulation.RollingStocks.SubSystems.Brakes.MSTS; +using Orts.Simulation.RollingStocks.SubSystems.Controllers; +using Orts.Simulation.RollingStocks.SubSystems.PowerSupplies; using ORTS.Common; -using System; -using System.Diagnostics; -using System.IO; -using System.Text; using Event = Orts.Common.Event; -using Orts.Simulation.RollingStocks.SubSystems.PowerSupplies; namespace Orts.Simulation.RollingStocks { @@ -330,7 +330,7 @@ public class MSTSSteamLocomotive : MSTSLocomotive float BoilerSurfaceAreaFt2; float FractionBoilerAreaInsulated; float BoilerHeatRadiationLossBTU; // Heat loss of boiler (hourly value) - + #region Additional steam properties const float SpecificHeatCoalKJpKGpK = 1.26f; // specific heat of coal - kJ/kg/K const float SteamVaporSpecVolumeAt100DegC1BarM3pKG = 1.696f; @@ -784,7 +784,7 @@ public override void Parse(string lowercasetoken, STFReader stf) switch (lowercasetoken) { case "engine(numcylinders": NumCylinders = stf.ReadIntBlock(null); break; - case "engine(ortswheelcrankangledifference": + case "engine(ortswheelcrankangledifference": stf.MustMatch("("); Cylinder1CrankAngleRad = stf.ReadFloat(STFReader.UNITS.Angle, 0.0f); Cylinder2CrankAngleRad = stf.ReadFloat(STFReader.UNITS.Angle, 0.0f); @@ -802,7 +802,8 @@ public override void Parse(string lowercasetoken, STFReader stf) case "engine(boilervolume": BoilerVolumeFT3 = stf.ReadFloatBlock(STFReader.UNITS.VolumeDefaultFT3, null); break; case "engine(maxboilerpressure": MaxBoilerPressurePSI = stf.ReadFloatBlock(STFReader.UNITS.PressureDefaultPSI, null); break; case "engine(ortsmaxsuperheattemperature": MaxSuperheatRefTempF = stf.ReadFloatBlock(STFReader.UNITS.Temperature, null); break; - case "engine(ortsmaxindicatedhorsepower": MaxIndicatedHorsePowerHP = stf.ReadFloatBlock(STFReader.UNITS.Power, null); + case "engine(ortsmaxindicatedhorsepower": + MaxIndicatedHorsePowerHP = stf.ReadFloatBlock(STFReader.UNITS.Power, null); MaxIndicatedHorsePowerHP = W.ToHp(MaxIndicatedHorsePowerHP); // Convert input to HP for use internally in this module break; case "engine(vacuumbrakeslargeejectorusagerate": EjectorLargeSteamConsumptionLbpS = pS.FrompH(stf.ReadFloatBlock(STFReader.UNITS.MassRateDefaultLBpH, null)); break; @@ -1124,7 +1125,7 @@ public override void Initialize() ConnectingRodWeightLb = 600.0f * reductionfactor; // Weignt of connecting rod ConnectingRodBalanceWeightLb = 300.0f * reductionfactor; // Balance weight for connecting rods } - else if (MassKG < Kg.FromTUS(20)) + else if (MassKG < Kg.FromTUS(20)) { const float reductionfactor = 0.3f; ReciprocatingWeightLb = 580.0f * reductionfactor; // Weight of reciprocating parts of the rod driving gears @@ -1299,11 +1300,11 @@ public override void Initialize() WheelCrankAngleDiffRad[3] = Cylinder4CrankAngleRad; } - // ****************** Test Locomotive and Gearing type *********************** + // ****************** Test Locomotive and Gearing type *********************** - // If the maximum cutoff for the locomotive is less then the default tractive effort constant value, then flag to the user to check. See this reference - - // https://babel.hathitrust.org/cgi/pt?id=wu.89089676290&view=1up&seq=510&skin=2021&q1=booster - if (CutoffController.MaximumValue < TractiveEffortFactor && Simulator.Settings.VerboseConfigurationMessages && ( CutoffController.MaximumValue < 0.7 || TractiveEffortFactor >= 0.85)) + // If the maximum cutoff for the locomotive is less then the default tractive effort constant value, then flag to the user to check. See this reference - + // https://babel.hathitrust.org/cgi/pt?id=wu.89089676290&view=1up&seq=510&skin=2021&q1=booster + if (CutoffController.MaximumValue < TractiveEffortFactor && Simulator.Settings.VerboseConfigurationMessages && (CutoffController.MaximumValue < 0.7 || TractiveEffortFactor >= 0.85)) { Trace.TraceInformation("Maximum Cutoff setting {0} is less then the TractiveEffortFactor {1}, is this correct?", CutoffController.MaximumValue, TractiveEffortFactor); } @@ -1824,7 +1825,7 @@ public override void Initialize() MaxBoilerOutputHP = MaxBoilerOutputLBpH / SteamperIHPh; // Calculate boiler output power // if MaxIHP is set in ENG file, and is a geared (mainly selectable model) locomotive then retain a copy of the original value - if (MaxIndicatedHorsePowerHP != 0) + if (MaxIndicatedHorsePowerHP != 0) { RetainedGearedMaxMaxIndicatedHorsePowerHP = MaxIndicatedHorsePowerHP; } @@ -1845,7 +1846,7 @@ public override void Initialize() ISBoilerLimited = false; } } - + DisplayMaxIndicatedHorsePowerHP = MaxIndicatedHorsePowerHP; // If DrvWheelWeight is not in ENG file, then calculate from Factor of Adhesion(FoA) = DrvWheelWeight / Start (Max) Tractive Effort, assume FoA = 4.2 @@ -2101,8 +2102,8 @@ private void UpdateFX(float elapsedClockSeconds) for (int i = 0; i < NumCylinders; i++) { -// Trace.TraceInformation("NumCyl - {0} i {1}", NumCylinders, i); - + // Trace.TraceInformation("NumCyl - {0} i {1}", NumCylinders, i); + // float realCrankAngleRad = (float)(LocomotiveAxle.AxlePositionRad + i * WheelCrankAngleDiffRad[i]); float realCrankAngleRad = (float)(LocomotiveAxle.AxlePositionRad); float normalisedCrankAngleRad = 0; @@ -2136,7 +2137,7 @@ private void UpdateFX(float elapsedClockSeconds) exhaustCrankAngleRad = CylinderExhaustOpenFactor * (float)Math.PI + (float)Math.PI; } -// Trace.TraceInformation("Cylinder {0} ExhaustCrank {1} RealCrank {2} NormalCrank {3}", i + 1, MathHelper.ToDegrees(exhaustCrankAngleRad), MathHelper.ToDegrees(realCrankAngleRad), MathHelper.ToDegrees(normalisedCrankAngleRad)); + // Trace.TraceInformation("Cylinder {0} ExhaustCrank {1} RealCrank {2} NormalCrank {3}", i + 1, MathHelper.ToDegrees(exhaustCrankAngleRad), MathHelper.ToDegrees(realCrankAngleRad), MathHelper.ToDegrees(normalisedCrankAngleRad)); if (absSpeedMpS > 0.001) { @@ -2144,20 +2145,20 @@ private void UpdateFX(float elapsedClockSeconds) { CylinderSteamExhaust1On = true; -// Trace.TraceInformation("Exhaust - Factor {0} ExhaustCrank {1} RealCrank {2} NormalCrank {3} Exhaust1On {4} Cylinder {5} i {6}", CylinderExhaustOpenFactor, MathHelper.ToDegrees(exhaustCrankAngleRad), MathHelper.ToDegrees(realCrankAngleRad), MathHelper.ToDegrees(normalisedCrankAngleRad), CylinderSteamExhaust1On, i + 1, i); + // Trace.TraceInformation("Exhaust - Factor {0} ExhaustCrank {1} RealCrank {2} NormalCrank {3} Exhaust1On {4} Cylinder {5} i {6}", CylinderExhaustOpenFactor, MathHelper.ToDegrees(exhaustCrankAngleRad), MathHelper.ToDegrees(realCrankAngleRad), MathHelper.ToDegrees(normalisedCrankAngleRad), CylinderSteamExhaust1On, i + 1, i); } else if (i == 0) { CylinderSteamExhaust1On = false; -// Trace.TraceInformation("Test #1 {0}", CylinderSteamExhaust1On); + // Trace.TraceInformation("Test #1 {0}", CylinderSteamExhaust1On); } - + else if (i == 1 && ((normalisedCrankAngleRad <= MathHelper.Pi && normalisedCrankAngleRad >= exhaustCrankAngleRad) || (normalisedCrankAngleRad < 2 * MathHelper.Pi && normalisedCrankAngleRad >= exhaustCrankAngleRad))) { CylinderSteamExhaust2On = true; -// Trace.TraceInformation("Exhaust - Factor {0} ExhaustCrank {1} RealCrank {2} NormalCrank {3} Exhaust2On {4} Cylinder {5} i {6}", CylinderExhaustOpenFactor, MathHelper.ToDegrees(exhaustCrankAngleRad), MathHelper.ToDegrees(realCrankAngleRad), MathHelper.ToDegrees(normalisedCrankAngleRad), CylinderSteamExhaust2On, i + 1, i); + // Trace.TraceInformation("Exhaust - Factor {0} ExhaustCrank {1} RealCrank {2} NormalCrank {3} Exhaust2On {4} Cylinder {5} i {6}", CylinderExhaustOpenFactor, MathHelper.ToDegrees(exhaustCrankAngleRad), MathHelper.ToDegrees(realCrankAngleRad), MathHelper.ToDegrees(normalisedCrankAngleRad), CylinderSteamExhaust2On, i + 1, i); } - else if (i ==1) + else if (i == 1) { CylinderSteamExhaust2On = false; } @@ -2168,9 +2169,9 @@ private void UpdateFX(float elapsedClockSeconds) else if (i == 2 && ((normalisedCrankAngleRad <= MathHelper.Pi && normalisedCrankAngleRad >= exhaustCrankAngleRad) || (normalisedCrankAngleRad < 2 * MathHelper.Pi && normalisedCrankAngleRad >= exhaustCrankAngleRad))) { CylinderSteamExhaust3On = true; -// Trace.TraceInformation("Exhaust - Factor {0} ExhaustCrank {1} RealCrank {2} NormalCrank {3} Exhaust3On {4} Cylinder {5} i {6}", CylinderExhaustOpenFactor, MathHelper.ToDegrees(exhaustCrankAngleRad), MathHelper.ToDegrees(realCrankAngleRad), MathHelper.ToDegrees(normalisedCrankAngleRad), CylinderSteamExhaust3On, i + 1, i); + // Trace.TraceInformation("Exhaust - Factor {0} ExhaustCrank {1} RealCrank {2} NormalCrank {3} Exhaust3On {4} Cylinder {5} i {6}", CylinderExhaustOpenFactor, MathHelper.ToDegrees(exhaustCrankAngleRad), MathHelper.ToDegrees(realCrankAngleRad), MathHelper.ToDegrees(normalisedCrankAngleRad), CylinderSteamExhaust3On, i + 1, i); } - else if (i ==2) + else if (i == 2) { CylinderSteamExhaust3On = false; } @@ -2178,7 +2179,7 @@ private void UpdateFX(float elapsedClockSeconds) else if (i == 3 && ((normalisedCrankAngleRad <= MathHelper.Pi && normalisedCrankAngleRad >= exhaustCrankAngleRad) || (normalisedCrankAngleRad < 2 * MathHelper.Pi && normalisedCrankAngleRad >= exhaustCrankAngleRad))) { CylinderSteamExhaust4On = true; -// Trace.TraceInformation("Exhaust - Factor {0} ExhaustCrank {1} RealCrank {2} NormalCrank {3} Exhaust4On {4} Cylinder {5} i {6}", CylinderExhaustOpenFactor, MathHelper.ToDegrees(exhaustCrankAngleRad), MathHelper.ToDegrees(realCrankAngleRad), MathHelper.ToDegrees(normalisedCrankAngleRad), CylinderSteamExhaust4On, i + 1, i); + // Trace.TraceInformation("Exhaust - Factor {0} ExhaustCrank {1} RealCrank {2} NormalCrank {3} Exhaust4On {4} Cylinder {5} i {6}", CylinderExhaustOpenFactor, MathHelper.ToDegrees(exhaustCrankAngleRad), MathHelper.ToDegrees(realCrankAngleRad), MathHelper.ToDegrees(normalisedCrankAngleRad), CylinderSteamExhaust4On, i + 1, i); } else if (i == 3) { @@ -2499,7 +2500,7 @@ private void UpdateFX(float elapsedClockSeconds) StackSteamVolumeM3pS = Kg.FromLb(CylinderSteamUsageLBpS + BlowerSteamUsageLBpS + RadiationSteamLossLBpS + CompSteamUsageLBpS + GeneratorSteamUsageLBpS) * smokeVolumeVariationFactor * SteamVaporSpecVolumeAt100DegC1BarM3pKG; StackSteamVolumeM3pS = StackSteamVolumeM3pS / StackCount; StackParticleDurationS = Throttlepercent + FireRatio; - // Trace.TraceInformation("Puff - cutoff {0} Throttle {1} Velocity {2} Volume {3} Duration {4}", cutoff, throttle, StackSteamVelocityMpS.Value, StackSteamVolumeM3pS, StackParticleDurationS); + // Trace.TraceInformation("Puff - cutoff {0} Throttle {1} Velocity {2} Volume {3} Duration {4}", cutoff, throttle, StackSteamVelocityMpS.Value, StackSteamVolumeM3pS, StackParticleDurationS); } else // when not exhausting @@ -2509,14 +2510,14 @@ private void UpdateFX(float elapsedClockSeconds) float smokeRestVelocityVariationFactor = 2 * cutoff; // adjust smoke velocity based upon throttle and cutoff settings float smokeRestVolumeVariationFactor = 1 * cutoff; // adjust smoke volume based upon throttle and cutoff settings - float velocityRate = (absSpeedMpS < 1 ? 1.0f : 1.0f/ AbsSpeedMpS); + float velocityRate = (absSpeedMpS < 1 ? 1.0f : 1.0f / AbsSpeedMpS); StackSteamVelocityMpS.Update(elapsedClockSeconds, velocityRate); StackSteamVolumeM3pS = Kg.FromLb(BlowerSteamUsageLBpS + RadiationSteamLossLBpS + CompSteamUsageLBpS + GeneratorSteamUsageLBpS) * smokeRestVolumeVariationFactor * SteamVaporSpecVolumeAt100DegC1BarM3pKG; StackSteamVolumeM3pS = StackSteamVolumeM3pS / StackCount + FireRatio; StackParticleDurationS = Throttlepercent + FireRatio; - // Trace.TraceInformation("Rest - cutoff {0} Velocity {1} Volume {2} Duration {3} VelocityRate {4} Throttle% {5}", cutoff, StackSteamVelocityMpS.SmoothedValue, StackSteamVolumeM3pS, StackParticleDurationS, velocityRate, Throttlepercent); + // Trace.TraceInformation("Rest - cutoff {0} Velocity {1} Volume {2} Duration {3} VelocityRate {4} Throttle% {5}", cutoff, StackSteamVelocityMpS.SmoothedValue, StackSteamVolumeM3pS, StackParticleDurationS, velocityRate, Throttlepercent); } - } + } } else // Legacy smoke implementation @@ -2526,7 +2527,7 @@ private void UpdateFX(float elapsedClockSeconds) StackSteamVolumeM3pS = Kg.FromLb(CylinderSteamUsageLBpS + BlowerSteamUsageLBpS + RadiationSteamLossLBpS + CompSteamUsageLBpS + GeneratorSteamUsageLBpS) * SteamVaporSpecVolumeAt100DegC1BarM3pKG; StackSteamVolumeM3pS = StackSteamVolumeM3pS / StackCount + FireRatio; StackParticleDurationS = Throttlepercent + FireRatio; - // Trace.TraceInformation("Legacy - cutoff {0} Throttle {1} Velocity {2} Volume {3} Duration {4} VelocityRate {5}", cutoff, throttle, StackSteamVelocityMpS.SmoothedValue, StackSteamVolumeM3pS, StackParticleDurationS, velocityRate); + // Trace.TraceInformation("Legacy - cutoff {0} Throttle {1} Velocity {2} Volume {3} Duration {4} VelocityRate {5}", cutoff, throttle, StackSteamVelocityMpS.SmoothedValue, StackSteamVolumeM3pS, StackParticleDurationS, velocityRate); } @@ -3529,10 +3530,10 @@ private void UpdateBoiler(float elapsedClockSeconds) // This section calculates heat radiation loss from the boiler. This section is based upon the description provided in "The Thermal Insulation of the Steam Locomotive" (Paper 501) published in the // which was published in the March 1, 1951 Journal of the Institution of Locomotive Engineers. // In basic terms, Heat loss = Kc * A * dT, where Kc = heat transfer coefficient, A = heat transfer area, and dT = difference in temperature, ie (Boiler Temp - Ambient Temp) - + // Calculate the temp differential float TemperatureDifferentialF = 0; - + TemperatureDifferentialF = C.ToF(C.FromK(BoilerWaterTempK) - CarOutsideTempC); // As locomotive moves, the Kc value will increase as more heat loss occurs with greater speed. @@ -3559,15 +3560,15 @@ private void UpdateBoiler(float elapsedClockSeconds) { KcMovementFraction = KcMaxSpeed / KcMinSpeed; // Calculate constant fraction over 20m/s } - + // Calculate radiation loss - has two elements, insulated and uninsulated float UninsulatedBoilerHeatRadiationLossBTU = BoilerSurfaceAreaFt2 * (1.0f - FractionBoilerAreaInsulated) * KcMovementFraction * KcUninsulation * TemperatureDifferentialF; float InsulatedBoilerHeatRadiationLossBTU = BoilerSurfaceAreaFt2 * FractionBoilerAreaInsulated * KcMovementFraction * KcInsulation * TemperatureDifferentialF; BoilerHeatRadiationLossBTU = UninsulatedBoilerHeatRadiationLossBTU + InsulatedBoilerHeatRadiationLossBTU; - + // Temporary calculation to maintain smoke stack and minimum coal feed in AI firing - could be changed RadiationSteamLossLBpS = pS.FrompH(BoilerHeatRadiationLossBTU) / (BoilerSteamHeatBTUpLB - BoilerWaterHeatBTUpLB); - + BoilerHeatBTU -= elapsedClockSeconds * pS.FrompH(BoilerHeatRadiationLossBTU); BoilerHeatOutBTUpS += pS.FrompH(BoilerHeatRadiationLossBTU); @@ -4867,7 +4868,7 @@ private void UpdateMotion(float elapsedClockSeconds, float cutoff, float absSpee // Force tractive effort to zero if throttle is closed, or if a geared steam locomotive in neutral gear. MEP calculation is not allowing it to go to zero if (throttle < 0.001 || (SteamEngineType == SteamEngineTypes.Geared && SteamGearPosition == 0)) { - TractiveEffortLbsF = 0.0f; + TractiveEffortLbsF = 0.0f; } TractiveEffortLbsF = MathHelper.Clamp(TractiveEffortLbsF, 0, TractiveEffortLbsF); DisplayTractiveEffortLbsF = TractiveEffortLbsF; @@ -5098,7 +5099,7 @@ protected override void UpdateTractiveForce(float elapsedClockSeconds, float t, crankAngleRad = (float)(MathHelper.WrapAngle(crankAngleRad)); -// Trace.TraceInformation("Cyl {0} crankAng {1} Position {2} Diff {3}", NumCylinders, MathHelper.ToDegrees(crankAngleRad), MathHelper.ToDegrees(LocomotiveAxle.AxlePositionRad), MathHelper.ToDegrees(WheelCrankAngleDiffRad)); + // Trace.TraceInformation("Cyl {0} crankAng {1} Position {2} Diff {3}", NumCylinders, MathHelper.ToDegrees(crankAngleRad), MathHelper.ToDegrees(LocomotiveAxle.AxlePositionRad), MathHelper.ToDegrees(WheelCrankAngleDiffRad)); float crankCylinderPressure = (MeanEffectivePressurePSI * CylinderEfficiencyRate); // fallback default value @@ -5129,9 +5130,9 @@ protected override void UpdateTractiveForce(float elapsedClockSeconds, float t, backwardCylinderPosition = crankCylinderPosition; } -/* - Trace.TraceInformation("Cyl {0} Position {1} testcrankAng {2} crankAngle {3} CrankPosition {4} forwardCrankPosition {5} backwardCrankPosition {6}", i+1, LocomotiveAxle.AxlePositionRad, MathHelper.ToDegrees(testCrankAngle), MathHelper.ToDegrees(crankAngleRad), crankCylinderPosition, forwardCylinderPosition, backwardCylinderPosition); -*/ + /* + Trace.TraceInformation("Cyl {0} Position {1} testcrankAng {2} crankAngle {3} CrankPosition {4} forwardCrankPosition {5} backwardCrankPosition {6}", i+1, LocomotiveAxle.AxlePositionRad, MathHelper.ToDegrees(testCrankAngle), MathHelper.ToDegrees(crankAngleRad), crankCylinderPosition, forwardCylinderPosition, backwardCylinderPosition); + */ // Crank angles float sin = (float)Math.Sin(crankAngleRad); @@ -5150,7 +5151,7 @@ protected override void UpdateTractiveForce(float elapsedClockSeconds, float t, else if (CylinderExhaustOpenFactor > forwardCylinderPosition) // pressure will be in expansion section of cylinder { // In section of cylinder between cutoff and release, pressure follows a PV variation. - forwardCylinderPressure = (slipCutoffPressureAtmPSI) * (cutoff + CylinderClearancePC) / (forwardCylinderPosition + CylinderClearancePC); + forwardCylinderPressure = (slipCutoffPressureAtmPSI) * (cutoff + CylinderClearancePC) / (forwardCylinderPosition + CylinderClearancePC); // Check factor to calculate volume of cylinder for new volume at exhaust } else // Pressure will be in the exhaust section of the cylinder @@ -5212,7 +5213,7 @@ protected override void UpdateTractiveForce(float elapsedClockSeconds, float t, connectRodInertiaAngleFactor = (cos + ((CrankRadiusFt * RodCoGFt) / (ConnectRodLengthFt * ConnectRodLengthFt)) * (float)Math.Cos(2 * crankAngleRad)); } else - { + { // reverse stroke reciprocatingInertiaAngleFactor = (cos - ((CrankRadiusFt / ConnectRodLengthFt) * (float)Math.Cos(2 * crankAngleRad))); connectRodInertiaAngleFactor = (cos - ((CrankRadiusFt * RodCoGFt) / (ConnectRodLengthFt * ConnectRodLengthFt)) * (float)Math.Cos(2 * crankAngleRad)); @@ -5220,7 +5221,7 @@ protected override void UpdateTractiveForce(float elapsedClockSeconds, float t, // Calculate the speed factor to allow for variation in speed // Adjust the above factor to allow for the speed of rotation on the parts - based upon Eq 8 (pg 21) - float inertiaSpeedCorrectionFactor = 0.00034f * CrankRadiusFt * (float)Math.Pow(pS.TopM(DrvWheelRevRpS), 2); + float inertiaSpeedCorrectionFactor = 0.00034f * CrankRadiusFt * (float)Math.Pow(pS.TopM(DrvWheelRevRpS), 2); // Calculate the inertia force of the reciprocating weights @@ -5245,7 +5246,7 @@ protected override void UpdateTractiveForce(float elapsedClockSeconds, float t, // Total inertia force float totalInertiaForcelbf = reciprocatingInertiaForcelbf + connectRodInertiaForcelbf; - + float totalTangentialInertiaForcelbf = totalInertiaForcelbf * tangentialCrankForceFactor; // Calculate the force at the crank exerted on the drive wheel @@ -5279,7 +5280,7 @@ protected override void UpdateTractiveForce(float elapsedClockSeconds, float t, } // For more then two cylinder eingines inertia is not required as it only applies to the geraing on each side and not the number of cylinders - if ((NumCylinders == 3 && i > 1) || (NumCylinders == 4 && ( i == 1 || i==3 )) ) + if ((NumCylinders == 3 && i > 1) || (NumCylinders == 4 && (i == 1 || i == 3))) { excessBalanceForcelbf = 0; } @@ -5297,22 +5298,22 @@ protected override void UpdateTractiveForce(float elapsedClockSeconds, float t, totalDrvWeightN += N.FromLbf(excessBalanceForcelbf - verticalThrustForcelbf); } -/* if (DisplayTangentialWheelTreadForceLbf > SteamStaticWheelForce || WheelSlip) - { - // Trace.TraceInformation("MaxSpeed {0}", MaxLocoSpeedMpH); + /* if (DisplayTangentialWheelTreadForceLbf > SteamStaticWheelForce || WheelSlip) + { + // Trace.TraceInformation("MaxSpeed {0}", MaxLocoSpeedMpH); - Trace.TraceInformation("Cylinder Pressures - Cylinder {0} CylinderPressure {1} forwardPressure {2} backwardPressure {3} InitialPressure {4} CutoffPressure {5} forwardPosition {6} backwardPosition {7}", i+1, crankCylinderPressure, forwardCylinderPressure, backwardCylinderPressure, slipInitialPressureAtmPSI, slipCutoffPressureAtmPSI, forwardCylinderPosition, backwardCylinderPosition); + Trace.TraceInformation("Cylinder Pressures - Cylinder {0} CylinderPressure {1} forwardPressure {2} backwardPressure {3} InitialPressure {4} CutoffPressure {5} forwardPosition {6} backwardPosition {7}", i+1, crankCylinderPressure, forwardCylinderPressure, backwardCylinderPressure, slipInitialPressureAtmPSI, slipCutoffPressureAtmPSI, forwardCylinderPosition, backwardCylinderPosition); - Trace.TraceInformation("Crank Angle {0} Cylinder Position {1} AxlePosition {2} Cylinder {3} CylArea {4} CylPress {5}", MathHelper.ToDegrees(crankAngleRad), crankCylinderPosition, MathHelper.ToDegrees(LocomotiveAxle.AxlePositionRad), i, Me2.ToIn2(Me2.FromFt2(CylinderPistonAreaFt2)), crankCylinderPressure); + Trace.TraceInformation("Crank Angle {0} Cylinder Position {1} AxlePosition {2} Cylinder {3} CylArea {4} CylPress {5}", MathHelper.ToDegrees(crankAngleRad), crankCylinderPosition, MathHelper.ToDegrees(LocomotiveAxle.AxlePositionRad), i, Me2.ToIn2(Me2.FromFt2(CylinderPistonAreaFt2)), crankCylinderPressure); - Trace.TraceInformation("Tang.CrankFactor {0} RecInertiaFactor {1}, ConInertiaFactor {2} VerticalForceFactor {3} InertiaSpeedFactor {4}", tangentialCrankForceFactor, reciprocatingInertiaAngleFactor, connectRodInertiaAngleFactor, verticalThrustFactor, inertiaSpeedCorrectionFactor); + Trace.TraceInformation("Tang.CrankFactor {0} RecInertiaFactor {1}, ConInertiaFactor {2} VerticalForceFactor {3} InertiaSpeedFactor {4}", tangentialCrankForceFactor, reciprocatingInertiaAngleFactor, connectRodInertiaAngleFactor, verticalThrustFactor, inertiaSpeedCorrectionFactor); - Trace.TraceInformation("PistonForce {0}lbf RodForce {1}lbf RecForce {2}lbf", pistonForceLbf, connectRodInertiaForcelbf, reciprocatingInertiaForcelbf); + Trace.TraceInformation("PistonForce {0}lbf RodForce {1}lbf RecForce {2}lbf", pistonForceLbf, connectRodInertiaForcelbf, reciprocatingInertiaForcelbf); - Trace.TraceInformation("VerticalThrustForce {0}lbf ExcessBalanceForce {1}lbf", verticalThrustForcelbf, excessBalanceForcelbf); + Trace.TraceInformation("VerticalThrustForce {0}lbf ExcessBalanceForce {1}lbf", verticalThrustForcelbf, excessBalanceForcelbf); - } -*/ + } + */ #if DEBUG_STEAM_SLIP if (throttle > 0.01 && (absSpeedMpS < 0.2 || absSpeedMpS > 17.7 && absSpeedMpS < 18.2)) @@ -5333,20 +5334,20 @@ protected override void UpdateTractiveForce(float elapsedClockSeconds, float t, LocomotiveAxle.AxleWeightN = totalDrvWeightN + 9.81f * DrvWheelWeightKg; SteamStaticWheelForce = N.ToLbf(totalDrvWeightN + 9.81f * DrvWheelWeightKg) * LocomotiveCoefficientFrictionHUD; -/* - if (DisplayTangentialWheelTreadForceLbf > SteamStaticWheelForce) - { - Trace.TraceInformation("Static Wheel Slip (initiated by static comparison) - TangForce {0}lbf: AdhesiveForce {1}lbf: Speed {2}mph, WheelSpeed {3}mph, CrankAngle {4}deg, AdvSlip {5}, AdvSlipWarn {6}, AxleInput - DriveForceCorrect {7}lbf, TotalDriveW {8}lbf, AxleWeightForce {9}lbf, Friction {10}, throttle {11}, Reverser {12} SlipThresholdSpeed {13}mph, WheelSlipSpeed {14}mph, AxleDriveForce {15}lbf", DisplayTangentialWheelTreadForceLbf, SteamStaticWheelForce, MpS.ToMpH(absSpeedMpS), MpS.ToMpH(WheelSpeedMpS), MathHelper.ToDegrees(testCrankAngle), WheelSlip, WheelSlipWarning, N.ToLbf(totalDrvWeightN), N.ToLbf(9.81f * DrvWheelWeightKg), N.ToLbf(LocomotiveAxle.AxleWeightN), LocomotiveCoefficientFrictionHUD, throttle, cutoff, MpS.ToMpH(LocomotiveAxle.WheelSlipThresholdMpS), MpS.ToMpH(LocomotiveAxle.SlipSpeedMpS), N.ToLbf(LocomotiveAxle.DriveForceN)); + /* + if (DisplayTangentialWheelTreadForceLbf > SteamStaticWheelForce) + { + Trace.TraceInformation("Static Wheel Slip (initiated by static comparison) - TangForce {0}lbf: AdhesiveForce {1}lbf: Speed {2}mph, WheelSpeed {3}mph, CrankAngle {4}deg, AdvSlip {5}, AdvSlipWarn {6}, AxleInput - DriveForceCorrect {7}lbf, TotalDriveW {8}lbf, AxleWeightForce {9}lbf, Friction {10}, throttle {11}, Reverser {12} SlipThresholdSpeed {13}mph, WheelSlipSpeed {14}mph, AxleDriveForce {15}lbf", DisplayTangentialWheelTreadForceLbf, SteamStaticWheelForce, MpS.ToMpH(absSpeedMpS), MpS.ToMpH(WheelSpeedMpS), MathHelper.ToDegrees(testCrankAngle), WheelSlip, WheelSlipWarning, N.ToLbf(totalDrvWeightN), N.ToLbf(9.81f * DrvWheelWeightKg), N.ToLbf(LocomotiveAxle.AxleWeightN), LocomotiveCoefficientFrictionHUD, throttle, cutoff, MpS.ToMpH(LocomotiveAxle.WheelSlipThresholdMpS), MpS.ToMpH(LocomotiveAxle.SlipSpeedMpS), N.ToLbf(LocomotiveAxle.DriveForceN)); - } + } - if (WheelSlip && DisplayTangentialWheelTreadForceLbf < SteamStaticWheelForce) - { - Trace.TraceInformation("Static Wheel Slip (initiated by axle model) - TangForce {0}lbf: AdhesiveForce {1}lbf: Speed {2}mph, WheelSpeed {3}mph, CrankAngle {4}deg, AdvSlip {5}, AdvSlipWarn {6}, AxleInput - DriveForceCorrect {7}lbf, TotalDriveW {8}lbf, AxleWeightForce {9}lbf, Friction {10}, throttle {11}, Reverser {12} SlipThresholdSpeed {13}mph, WheelSlipSpeed {14}mph, AxleDriveForce {15}lbf", DisplayTangentialWheelTreadForceLbf, SteamStaticWheelForce, MpS.ToMpH(absSpeedMpS), MpS.ToMpH(WheelSpeedMpS), MathHelper.ToDegrees(testCrankAngle), WheelSlip, WheelSlipWarning, N.ToLbf(totalDrvWeightN), N.ToLbf(9.81f * DrvWheelWeightKg), N.ToLbf(LocomotiveAxle.AxleWeightN), LocomotiveCoefficientFrictionHUD, throttle, cutoff, MpS.ToMpH(LocomotiveAxle.WheelSlipThresholdMpS), MpS.ToMpH(LocomotiveAxle.SlipSpeedMpS), N.ToLbf(LocomotiveAxle.DriveForceN)); + if (WheelSlip && DisplayTangentialWheelTreadForceLbf < SteamStaticWheelForce) + { + Trace.TraceInformation("Static Wheel Slip (initiated by axle model) - TangForce {0}lbf: AdhesiveForce {1}lbf: Speed {2}mph, WheelSpeed {3}mph, CrankAngle {4}deg, AdvSlip {5}, AdvSlipWarn {6}, AxleInput - DriveForceCorrect {7}lbf, TotalDriveW {8}lbf, AxleWeightForce {9}lbf, Friction {10}, throttle {11}, Reverser {12} SlipThresholdSpeed {13}mph, WheelSlipSpeed {14}mph, AxleDriveForce {15}lbf", DisplayTangentialWheelTreadForceLbf, SteamStaticWheelForce, MpS.ToMpH(absSpeedMpS), MpS.ToMpH(WheelSpeedMpS), MathHelper.ToDegrees(testCrankAngle), WheelSlip, WheelSlipWarning, N.ToLbf(totalDrvWeightN), N.ToLbf(9.81f * DrvWheelWeightKg), N.ToLbf(LocomotiveAxle.AxleWeightN), LocomotiveCoefficientFrictionHUD, throttle, cutoff, MpS.ToMpH(LocomotiveAxle.WheelSlipThresholdMpS), MpS.ToMpH(LocomotiveAxle.SlipSpeedMpS), N.ToLbf(LocomotiveAxle.DriveForceN)); - } + } -*/ + */ #if DEBUG_STEAM_SLIP @@ -5367,7 +5368,7 @@ protected override void UpdateTractiveForce(float elapsedClockSeconds, float t, WheelSpeedMpS = SpeedMpS; WheelSpeedSlipMpS = SpeedMpS; } - + // Derate when priming is occurring. if (BoilerIsPriming) @@ -5378,7 +5379,7 @@ protected override void UpdateTractiveForce(float elapsedClockSeconds, float t, TractiveForceN = 0.5f; } -#endregion + #endregion // Find the maximum TE for debug i.e. @ start and full throttle if (absSpeedMpS < 1.0) @@ -5431,14 +5432,14 @@ public override void AdvancedAdhesion(float elapsedClockSeconds) LocomotiveAxle.FrictionN = N.FromLbf(3.8f * Me.ToIn(CylinderDiameterM) * Me.ToIn(CylinderDiameterM) * Me.ToIn(CylinderStrokeM) / Me.ToIn(DrvWheelDiaM)); if (WheelSlip && AdvancedAdhesionModel) - { - AbsTractionSpeedMpS = AbsWheelSpeedMpS; - } - else - { - AbsTractionSpeedMpS = AbsSpeedMpS; - } - + { + AbsTractionSpeedMpS = AbsWheelSpeedMpS; + } + else + { + AbsTractionSpeedMpS = AbsSpeedMpS; + } + } base.AdvancedAdhesion(elapsedClockSeconds); } @@ -5670,7 +5671,7 @@ private void UpdateWaterGauge() private void UpdateInjectors(float elapsedClockSeconds) { -#region Calculate Injector size + #region Calculate Injector size // Calculate size of injectors to suit cylinder size. InjCylEquivSizeIN = (NumCylinders / 2.0f) * Me.ToIn(CylinderDiameterM); @@ -5712,7 +5713,7 @@ private void UpdateInjectors(float elapsedClockSeconds) InjectorFlowRateLBpS = pS.FrompM(Injector15FlowratePSItoUKGpM[BoilerPressurePSI]) * WaterLBpUKG; // 15 mm Injector Flow rate InjectorSize = 15.0f; // store size for display in HUD } -#endregion + #endregion if (WaterIsExhausted) { @@ -5814,7 +5815,7 @@ private void UpdateFiring(float absSpeedMpS) if (FiringIsManual) -#region Manual Fireman + #region Manual Fireman { @@ -5852,11 +5853,11 @@ private void UpdateFiring(float absSpeedMpS) } DamperBurnEffect = MathHelper.Clamp(DamperBurnEffect, 0.0f, TheoreticalMaxSteamOutputLBpS * 1.5f); // set damper maximum to the max generation rate } -#endregion + #endregion else -#region AI Fireman + #region AI Fireman { // Injectors // Injectors normally not on when stationary? @@ -6087,7 +6088,7 @@ private void UpdateFiring(float absSpeedMpS) HeatRatio = MathHelper.Clamp(HeatRatio, 0.001f, (HeatRatioMaxRise + 1.0f)); // Boiler pressure ratio to adjust burn rate } } -#endregion + #endregion } /// @@ -6243,7 +6244,7 @@ public override float GetDataOf(CabViewControl cvc) data = SmallEjectorController.CurrentValue; break; } - case CABViewControlTypes.ORTS_LARGE_EJECTOR: + case CABViewControlTypes.ORTS_LARGE_EJECTOR: { data = LargeEjectorController.CurrentValue; break; @@ -6819,8 +6820,8 @@ public override string GetDebugStatus() ); } - if (Simulator.UseAdvancedAdhesion && !Simulator.Settings.SimpleControlPhysics && SteamEngineType != SteamEngineTypes.Geared) - // Only display slip monitor if advanced adhesion is set and simplecontrols/physics not set + if (Simulator.UseAdvancedAdhesion && !Simulator.Settings.SimpleControlPhysics && SteamEngineType != SteamEngineTypes.Geared) + // Only display slip monitor if advanced adhesion is set and simplecontrols/physics not set { status.AppendFormat("\n\t\t === {0} === \n", Simulator.Catalog.GetString("Slip Monitor")); status.AppendFormat("{0}\t{1}\t{2:N0}\t{3}\t{4}\t{5}\t{6}\t{7}\t{8:N2}\t{9}\t{10}\t{11:N2}\t{12}\t{13}\t{14:N1}\n", @@ -7048,11 +7049,11 @@ public override string GetDebugStatus() } return status.ToString(); - } + } -// Gear Box + // Gear Box -public void SteamStartGearBoxIncrease() + public void SteamStartGearBoxIncrease() { if (IsSelectGeared) { @@ -7246,7 +7247,7 @@ public void SteamStopGearBoxDecrease() //Small Ejector Controller -#region Small Ejector controller + #region Small Ejector controller public void StartSmallEjectorIncrease(float? target) { @@ -7309,17 +7310,17 @@ public void SetSmallEjectorValue(float value) Simulator.Confirmer.UpdateWithPerCent(CabControl.SmallEjector, oldValue < controller.IntermediateValue ? CabSetting.Increase : CabSetting.Decrease, controller.CurrentValue * 100); } -#endregion + #endregion //Define Large Ejector Controller -#region Large Ejector controller + #region Large Ejector controller public void StartLargeEjectorIncrease(float? target) { LargeEjectorController.CommandStartTime = Simulator.ClockTime; if (IsPlayerTrain) - Simulator.Confirmer.ConfirmWithPerCent(CabControl.LargeEjector, CabSetting.Increase, LargeEjectorController.CurrentValue* 100); + Simulator.Confirmer.ConfirmWithPerCent(CabControl.LargeEjector, CabSetting.Increase, LargeEjectorController.CurrentValue * 100); LargeEjectorController.StartIncrease(target); SignalEvent(Event.LargeEjectorChange); } @@ -7333,7 +7334,7 @@ public void StopLargeEjectorIncrease() public void StartLargeEjectorDecrease(float? target) { if (IsPlayerTrain) - Simulator.Confirmer.ConfirmWithPerCent(CabControl.LargeEjector, CabSetting.Decrease, LargeEjectorController.CurrentValue* 100); + Simulator.Confirmer.ConfirmWithPerCent(CabControl.LargeEjector, CabSetting.Decrease, LargeEjectorController.CurrentValue * 100); LargeEjectorController.StartDecrease(target); SignalEvent(Event.LargeEjectorChange); } @@ -7356,7 +7357,7 @@ public void LargeEjectorChangeTo(bool increase, float? target) } else { - if (target 0, controller.CurrentValue, Simulator.GameTime); } if (oldValue != controller.IntermediateValue) - Simulator.Confirmer.UpdateWithPerCent(CabControl.LargeEjector, oldValue diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs b/Source/Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs index feabfecd99..7e6784e53e 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs @@ -36,6 +36,11 @@ // Debug for Freight Animation Variable Mass //#define DEBUG_VARIABLE_MASS +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; using Microsoft.Xna.Framework; using Orts.Formats.Msts; using Orts.Parsers.Msts; @@ -45,11 +50,6 @@ using Orts.Simulation.RollingStocks.SubSystems.PowerSupplies; using ORTS.Common; using ORTS.Scripting.Api; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; using Event = Orts.Common.Event; namespace Orts.Simulation.RollingStocks @@ -68,7 +68,7 @@ public class MSTSWagon : TrainCar { public Pantographs Pantographs; public ScriptedPassengerCarPowerSupply PassengerCarPowerSupply => PowerSupply as ScriptedPassengerCarPowerSupply; - public Doors Doors; + public Doors Doors; public Door RightDoor => Doors.RightDoor; public Door LeftDoor => Doors.LeftDoor; public bool MirrorOpen; @@ -242,7 +242,7 @@ public enum BrakeValveType /// public int RetainerPositions; - /// + /// /// Indicates whether a brake is present or not when Manual Braking is selected. /// public bool ManualBrakePresent; @@ -293,7 +293,7 @@ protected void ParseEffects(string lowercasetoken, STFReader stf) { stf.MustMatch("("); string s; - + while ((s = stf.ReadItem()) != ")") { var data = new ParticleEmitterData(stf); @@ -496,7 +496,7 @@ public virtual void LoadFromWagFile(string wagFilePath) } // Disable derailment coefficent on "dummy" cars. NB: Ideally this should never be used as "dummy" cars interfer with the overall train physics. - if (MSTSWagonNumWheels == 0 && InitWagonNumAxles == 0 ) + if (MSTSWagonNumWheels == 0 && InitWagonNumAxles == 0) { DerailmentCoefficientEnabled = false; } @@ -506,7 +506,7 @@ public virtual void LoadFromWagFile(string wagFilePath) { if (MSTSWagonNumWheels != 0 && MSTSWagonNumWheels < 6) { - WagonNumAxles = (int) MSTSWagonNumWheels; + WagonNumAxles = (int)MSTSWagonNumWheels; } else { @@ -622,8 +622,8 @@ public virtual void LoadFromWagFile(string wagFilePath) else { LoadEmptyMassKg = MassKG; - } - + } + if (FreightAnimations.EmptyORTSDavis_A > 0) { LoadEmptyORTSDavis_A = FreightAnimations.EmptyORTSDavis_A; @@ -785,7 +785,7 @@ public virtual void LoadFromWagFile(string wagFilePath) else { LoadFullMassKg = MassKG; - } + } if (FreightAnimations.FullPhysicsContinuousOne.FullORTSDavis_A > 0) { @@ -911,15 +911,15 @@ public virtual void LoadFromWagFile(string wagFilePath) DavisBNSpM = ((LoadFullORTSDavis_B - LoadEmptyORTSDavis_B) * TempMassDiffRatio) + LoadEmptyORTSDavis_B; DavisCNSSpMM = ((LoadFullORTSDavis_C - LoadEmptyORTSDavis_C) * TempMassDiffRatio) + LoadEmptyORTSDavis_C; - if (LoadEmptyDavisDragConstant > LoadFullDavisDragConstant ) // Due to wind turbulence empty drag might be higher then loaded drag, and therefore both scenarios need to be covered. + if (LoadEmptyDavisDragConstant > LoadFullDavisDragConstant) // Due to wind turbulence empty drag might be higher then loaded drag, and therefore both scenarios need to be covered. { - DavisDragConstant = LoadEmptyDavisDragConstant - ((LoadEmptyDavisDragConstant - LoadFullDavisDragConstant) * TempMassDiffRatio); + DavisDragConstant = LoadEmptyDavisDragConstant - ((LoadEmptyDavisDragConstant - LoadFullDavisDragConstant) * TempMassDiffRatio); } else { DavisDragConstant = ((LoadFullDavisDragConstant - LoadEmptyDavisDragConstant) * TempMassDiffRatio) + LoadEmptyDavisDragConstant; } - + WagonFrontalAreaM2 = ((LoadFullWagonFrontalAreaM2 - LoadEmptyWagonFrontalAreaM2) * TempMassDiffRatio) + LoadEmptyWagonFrontalAreaM2; // Update CoG related parameters @@ -983,7 +983,7 @@ public override void Initialize() PassengerCarPowerSupply?.Initialize(); base.Initialize(); - + if (UnbalancedSuperElevationM == 0 || UnbalancedSuperElevationM > 0.5) // If UnbalancedSuperElevationM > 18", or equal to zero, then set a default value { switch (WagonType) @@ -1112,7 +1112,7 @@ public virtual void Parse(string lowercasetoken, STFReader stf) case "wagon(ortstenderwagoncoalmass": TenderWagonMaxCoalMassKG = stf.ReadFloatBlock(STFReader.UNITS.Mass, null); break; case "wagon(ortstenderwagonwatermass": TenderWagonMaxWaterMassKG = stf.ReadFloatBlock(STFReader.UNITS.Mass, null); break; case "wagon(ortsheatingwindowderatingfactor": WindowDeratingFactor = stf.ReadFloatBlock(STFReader.UNITS.None, null); break; - case "wagon(ortsheatingcompartmenttemperatureset": DesiredCompartmentTempSetpointC = stf.ReadFloatBlock(STFReader.UNITS.Temperature, null); break; + case "wagon(ortsheatingcompartmenttemperatureset": DesiredCompartmentTempSetpointC = stf.ReadFloatBlock(STFReader.UNITS.Temperature, null); break; case "wagon(ortsheatingcompartmentpipeareafactor": CompartmentHeatingPipeAreaFactor = stf.ReadFloatBlock(STFReader.UNITS.None, null); break; case "wagon(ortsheatingtrainpipeouterdiameter": MainSteamHeatPipeOuterDiaM = stf.ReadFloatBlock(STFReader.UNITS.Distance, null); break; case "wagon(ortsheatingtrainpipeinnerdiameter": MainSteamHeatPipeInnerDiaM = stf.ReadFloatBlock(STFReader.UNITS.Distance, null); break; @@ -1130,7 +1130,7 @@ public virtual void Parse(string lowercasetoken, STFReader stf) case "wagon(maxhandbrakeforce": InitialMaxHandbrakeForceN = stf.ReadFloatBlock(STFReader.UNITS.Force, null); break; case "wagon(maxbrakeforce": InitialMaxBrakeForceN = stf.ReadFloatBlock(STFReader.UNITS.Force, null); break; case "wagon(ortswheelbrakeslideprotection": - // stf.MustMatch("("); + // stf.MustMatch("("); var brakeslideprotection = stf.ReadFloatBlock(STFReader.UNITS.None, null); if (brakeslideprotection == 1) { @@ -1286,14 +1286,14 @@ public virtual void Parse(string lowercasetoken, STFReader stf) stf.SkipRestOfBlock(); break; - case "wagon(coupling(frontcoupleropenanim": + case "wagon(coupling(frontcoupleropenanim": stf.MustMatch("("); FrontCoupler.Open.ShapeFileName = stf.ReadString(); // NOTE: Skip reading the size as it is unused: stf.ReadVector3(STFReader.UNITS.Distance, Vector3.Zero); stf.SkipRestOfBlock(); break; - - case "wagon(coupling(rearcoupleropenanim": + + case "wagon(coupling(rearcoupleropenanim": stf.MustMatch("("); RearCoupler.Open.ShapeFileName = stf.ReadString(); // NOTE: Skip reading the size as it is unused: stf.ReadVector3(STFReader.UNITS.Distance, Vector3.Zero); @@ -1306,7 +1306,7 @@ public virtual void Parse(string lowercasetoken, STFReader stf) // NOTE: Skip reading the size as it is unused: stf.ReadVector3(STFReader.UNITS.Distance, Vector3.Zero); stf.SkipRestOfBlock(); break; - + case "wagon(coupling(rearairhosediconnectedanim": stf.MustMatch("("); RearAirHose.Disconnected.ShapeFileName = stf.ReadString(); @@ -1327,7 +1327,7 @@ public virtual void Parse(string lowercasetoken, STFReader stf) Couplers[CouplerCountLocation].SetTensionSlack(stf.ReadFloat(STFReader.UNITS.Distance, null), stf.ReadFloat(STFReader.UNITS.Distance, null)); stf.SkipRestOfBlock(); break; - case "wagon(coupling(spring(ortscompressionslack": + case "wagon(coupling(spring(ortscompressionslack": stf.MustMatch("("); IsAdvancedCoupler = true; // If this parameter is present in WAG file then treat coupler as advanced ones. Couplers[CouplerCountLocation].SetCompressionSlack(stf.ReadFloat(STFReader.UNITS.Distance, null), stf.ReadFloat(STFReader.UNITS.Distance, null)); @@ -1340,14 +1340,14 @@ public virtual void Parse(string lowercasetoken, STFReader stf) Couplers[CouplerCountLocation].SetAdvancedBreak(stf.ReadFloat(STFReader.UNITS.Force, null), stf.ReadFloat(STFReader.UNITS.Force, null)); stf.SkipRestOfBlock(); break; - - // This is for the advanced coupler and is designed to be used instead of the MSTS parameter R0 - case "wagon(coupling(spring(ortstensionr0": + + // This is for the advanced coupler and is designed to be used instead of the MSTS parameter R0 + case "wagon(coupling(spring(ortstensionr0": stf.MustMatch("("); Couplers[CouplerCountLocation].SetTensionR0(stf.ReadFloat(STFReader.UNITS.Distance, null), stf.ReadFloat(STFReader.UNITS.Distance, null)); stf.SkipRestOfBlock(); break; - case "wagon(coupling(spring(ortscompressionr0": + case "wagon(coupling(spring(ortscompressionr0": stf.MustMatch("("); Couplers[CouplerCountLocation].SetCompressionR0(stf.ReadFloat(STFReader.UNITS.Distance, null), stf.ReadFloat(STFReader.UNITS.Distance, null)); stf.SkipRestOfBlock(); @@ -1359,7 +1359,7 @@ public virtual void Parse(string lowercasetoken, STFReader stf) Couplers[CouplerCountLocation].Rigid = false; Couplers[CouplerCountLocation].Rigid = stf.ReadBoolBlock(true); break; - + case "wagon(adheasion": @@ -1399,7 +1399,7 @@ public virtual void Parse(string lowercasetoken, STFReader stf) break; case "wagon(inside": HasInsideView = true; ParseWagonInside(stf); break; case "wagon(orts3dcab": Parse3DCab(stf); break; - case "wagon(numwheels": MSTSWagonNumWheels= stf.ReadFloatBlock(STFReader.UNITS.None, null); break; + case "wagon(numwheels": MSTSWagonNumWheels = stf.ReadFloatBlock(STFReader.UNITS.None, null); break; case "wagon(ortsnumberaxles": InitWagonNumAxles = stf.ReadIntBlock(null); break; case "wagon(ortsnumberbogies": WagonNumBogies = stf.ReadIntBlock(null); break; case "wagon(ortspantographs": @@ -1607,7 +1607,7 @@ public virtual void Copy(MSTSWagon copy) // If freight animations not used or else wagon is a tender or locomotive, use the "MSTS" type IntakePoints if present in WAG / ENG file if (copyIntakePoint.LinkedFreightAnim == null) - // if (copyIntakePoint.LinkedFreightAnim == null || WagonType == WagonTypes.Engine || WagonType == WagonTypes.Tender || AuxWagonType == "AuxiliaryTender") + // if (copyIntakePoint.LinkedFreightAnim == null || WagonType == WagonTypes.Engine || WagonType == WagonTypes.Tender || AuxWagonType == "AuxiliaryTender") IntakePointList.Add(new IntakePoint(copyIntakePoint)); } } @@ -1984,7 +1984,7 @@ public override void Update(float elapsedClockSeconds) FreightAnimations.LoadedOne = null; FreightAnimations.FreightType = PickupType.None; } - if (WaitForAnimationReady && WeightLoadController.CommandStartTime + FreightAnimations.UnloadingStartDelay <= Simulator.ClockTime) + if (WaitForAnimationReady && WeightLoadController.CommandStartTime + FreightAnimations.UnloadingStartDelay <= Simulator.ClockTime) { WaitForAnimationReady = false; Simulator.Confirmer.Message(ConfirmLevel.Information, Simulator.Catalog.GetString("Starting unload")); @@ -2014,7 +2014,7 @@ public override void Update(float elapsedClockSeconds) } } - private void UpdateLocomotiveLoadPhysics() + private void UpdateLocomotiveLoadPhysics() { // This section updates the weight and physics of the locomotive if (FreightAnimations != null && FreightAnimations.ContinuousFreightAnimationsPresent) // make sure that a freight animation INCLUDE File has been defined, and it contains "continuous" animation data. @@ -2046,7 +2046,7 @@ private void UpdateLocomotiveLoadPhysics() { MassKG = LoadEmptyMassKg + Kg.FromLb(SteamLocomotiveIdentification.BoilerMassLB) + SteamLocomotiveIdentification.FireMassKG; MassKG = MathHelper.Clamp(MassKG, LoadEmptyMassKg, LoadFullMassKg); // Clamp Mass to between the empty and full wagon values - // Adjust drive wheel weight + // Adjust drive wheel weight SteamLocomotiveIdentification.DrvWheelWeightKg = (MassKG / InitialMassKG) * SteamLocomotiveIdentification.InitialDrvWheelWeightKg; } @@ -2080,7 +2080,7 @@ private void UpdateLocomotiveLoadPhysics() else if (this is MSTSDieselLocomotive) // If diesel locomotive { - // set a process to pass relevant locomotive parameters from locomotive file to this wagon file + // set a process to pass relevant locomotive parameters from locomotive file to this wagon file var LocoIndex = 0; for (var i = 0; i < Train.Cars.Count; i++) // test each car to find the where the Diesel locomotive is in the consist if (Train.Cars[i] == this) // If this car is a Diesel locomotive then set loco index @@ -2119,7 +2119,7 @@ private void UpdateLocomotiveLoadPhysics() // Update CoG related parameters CentreOfGravityM.Y = ((LoadFullCentreOfGravityM_Y - LoadEmptyCentreOfGravityM_Y) * TempMassDiffRatio) + LoadEmptyCentreOfGravityM_Y; - + } } } @@ -2372,8 +2372,8 @@ private void UpdateTrainBaseResistance_DavisLowSpeed() // Assume a linear relationship between the two sets of points above and plot a straight line relationship. float LowTemperature = -10.0f; float HighTemeprature = 25.0f; - float LowTemperatureResistanceN = N.FromLbf( 12.0f ) * wheelvariationfactor; - float HighTemperatureResistanceN = N.FromLbf( 4.5f) * wheelvariationfactor; + float LowTemperatureResistanceN = N.FromLbf(12.0f) * wheelvariationfactor; + float HighTemperatureResistanceN = N.FromLbf(4.5f) * wheelvariationfactor; float LowGrad = (LowTemperatureResistanceN - HighTemperatureResistanceN) / (LowTemperature - HighTemeprature); float LowIntersect = LowTemperatureResistanceN - (LowGrad * LowTemperature); @@ -2552,7 +2552,7 @@ private void UpdateTrainBaseResistance_DavisLowSpeed() } - Friction0N = ( Kg.ToTonne(MassKG) * StartFrictionInternalFactorN) + StartFrictionTrackN; // Static friction is journal or roller bearing friction x weight + track resistance. Mass value must be in tons uk to match reference used for starting resistance + Friction0N = (Kg.ToTonne(MassKG) * StartFrictionInternalFactorN) + StartFrictionTrackN; // Static friction is journal or roller bearing friction x weight + track resistance. Mass value must be in tons uk to match reference used for starting resistance float Friction0DavisN = DavisAN * WheelBearingTemperatureResistanceFactor; // Calculate the starting firction if Davis formula was extended to zero @@ -2686,7 +2686,7 @@ private void UpdateWheelBearingTemperature(float elapsedClockSeconds) // Keep track of Activity details if an activity, setup random wagon, and start time for hotbox if (Simulator.ActivityRun != null && IsPlayerTrain) { - if (ActivityElapsedDurationS 0 && WagonType != WagonTypes.Engine && WagonType != WagonTypes.Tender) - { + { var HotboxRandom = Simulator.Random.Next(100) / Simulator.Settings.ActRandomizationLevel; float PerCentRandom = 0.66f; // Set so that random time is always in first 66% of activity duration var RawHotBoxTimeRandomS = Simulator.Random.Next(Train.ActivityDurationS); if (!Train.HotBoxSetOnTrain) // only allow one hot box to be set per train { - if (HotboxRandom< 10) + if (HotboxRandom < 10) { HotBoxActivated = true; Train.HotBoxSetOnTrain = true; - HotBoxStartTimeS = PerCentRandom* RawHotBoxTimeRandomS; + HotBoxStartTimeS = PerCentRandom * RawHotBoxTimeRandomS; Trace.TraceInformation("Hotbox Bearing Activated on CarID {0}. Hotbox to start from {1:F1} minutes into activity", CarID, S.ToM(HotBoxStartTimeS)); } } - + } } HotBoxHasBeenInitialized = true; // Only allow to loop once at first pass } - + float BearingSpeedMaximumTemperatureDegC = 0; float MaximumNormalBearingTemperatureDegC = 90.0f; @@ -2753,11 +2753,11 @@ private void UpdateWheelBearingTemperature(float elapsedClockSeconds) if (elapsedClockSeconds > 0) // Prevents zero values resetting temperature { - + // Keep track of wheel bearing temperature until activtaion time reached - if (ActivityElapsedDurationS BearingSpeedMaximumTemperatureDegC) @@ -2810,7 +2810,7 @@ private void UpdateWheelBearingTemperature(float elapsedClockSeconds) if (WheelBearingTemperatureDegC > CarOutsideTempC) { WheelBearingTemperatureDeclineTimeS += elapsedClockSeconds; - WheelBearingTemperatureDegC = CarOutsideTempC + (InitialWheelBearingDeclineTemperatureDegC - CarOutsideTempC) * (float) (Math.Exp(CoolingKConst* WheelBearingTemperatureDeclineTimeS)); + WheelBearingTemperatureDegC = CarOutsideTempC + (InitialWheelBearingDeclineTemperatureDegC - CarOutsideTempC) * (float)(Math.Exp(CoolingKConst * WheelBearingTemperatureDeclineTimeS)); } WheelBearingTemperatureRiseTimeS = 0; @@ -2820,7 +2820,7 @@ private void UpdateWheelBearingTemperature(float elapsedClockSeconds) WheelBearingTemperatureRiseTimeS = 0; InitialWheelBearingRiseTemperatureDegC = WheelBearingTemperatureDegC; - + // Turn off Hotbox sounds SignalEvent(Event.HotBoxBearingOff); HotBoxSoundActivated = false; @@ -2893,14 +2893,14 @@ private void UpdateWindForce() { WagonDirectionDeg -= 360; } - } + } // If a westerly direction (ie -ve) convert to an angle between 0 and 360 if (WagonDirectionDeg < 0) WagonDirectionDeg += 360; float TrainSpeedMpS = Math.Abs(SpeedMpS); - + // Find angle between wind and direction of train if (Train.PhysicsWindDirectionDeg > WagonDirectionDeg) WagonResultantWindComponentDeg = Train.PhysicsWindDirectionDeg - WagonDirectionDeg; @@ -3022,7 +3022,7 @@ private void UpdateTenderLoad() Trace.TraceInformation("Tender @ position {0} does not have a locomotive associated with. Check that it is preceeded by a steam locomotive.", CarID); } - MassKG = FreightAnimations.WagonEmptyWeight + TendersSteamLocomotive.TenderCoalMassKG + Kg.FromLb( (TendersSteamLocomotive.CurrentLocoTenderWaterVolumeUKG * WaterLBpUKG)); + MassKG = FreightAnimations.WagonEmptyWeight + TendersSteamLocomotive.TenderCoalMassKG + Kg.FromLb((TendersSteamLocomotive.CurrentLocoTenderWaterVolumeUKG * WaterLBpUKG)); MassKG = MathHelper.Clamp(MassKG, LoadEmptyMassKg, LoadFullMassKg); // Clamp Mass to between the empty and full wagon values // Update wagon parameters sensitive to wagon mass change @@ -3446,7 +3446,7 @@ public void FindControlActiveLocomotive() // As soon as the control and active locomotive have been identified, then stop loop. if (activeLocomotive && controlCar) { - ControlActiveLocomotive = Train.Cars[activeIndex] as MSTSDieselLocomotive; + ControlActiveLocomotive = Train.Cars[activeIndex] as MSTSDieselLocomotive; return; } } @@ -3481,22 +3481,22 @@ public void FindTendersSteamLocomotive() TendersSteamLocomotive = null; } - /// + /// /// This function checks each steam locomotive to see if it has a tender attached. /// public void ConfirmSteamLocomotiveTender() { - + // Check each steam locomotive to see if it has a tender attached. - if (this is MSTSSteamLocomotive ) + if (this is MSTSSteamLocomotive) { if (Train == null || Train.Cars == null) { SteamLocomotiveTender = null; - return; + return; } - else if(Train.Cars.Count == 1) // If car count is equal to 1, then there must be no tender attached + else if (Train.Cars.Count == 1) // If car count is equal to 1, then there must be no tender attached { SteamLocomotiveTender = Train.Cars[0] as MSTSSteamLocomotive; SteamLocomotiveTender.HasTenderCoupled = false; @@ -3561,15 +3561,15 @@ public void FindAuxTendersSteamLocomotive() } // If a "normal" tender is connected then the steam locomotive will be two cars away. - + if (!AuxTenderFound) { - + if (tenderIndex > 0 && Train.Cars[tenderIndex - 2] is MSTSSteamLocomotive) { AuxTendersSteamLocomotive = Train.Cars[tenderIndex - 2] as MSTSSteamLocomotive; } - + if (tenderIndex < Train.Cars.Count - 2 && Train.Cars[tenderIndex + 2] is MSTSSteamLocomotive) { AuxTendersSteamLocomotive = Train.Cars[tenderIndex + 2] as MSTSSteamLocomotive; @@ -3601,25 +3601,25 @@ public override float GetCouplerZeroLengthM() float zerolength; if (Coupler != null) { - zerolength = Coupler.R0X; + zerolength = Coupler.R0X; } else { - zerolength = base.GetCouplerZeroLengthM(); + zerolength = base.GetCouplerZeroLengthM(); } // Ensure zerolength doesn't go higher then 0.5 if (zerolength > 0.5) { - zerolength = 0.5f; + zerolength = 0.5f; } return zerolength; } else { - return Coupler != null ? Coupler.R0X : base.GetCouplerZeroLengthM(); - } + return Coupler != null ? Coupler.R0X : base.GetCouplerZeroLengthM(); + } } public override float GetSimpleCouplerStiffnessNpM() @@ -3633,16 +3633,16 @@ public override float GetCouplerStiffness1NpM() { return base.GetCouplerStiffness1NpM(); } - return Coupler.Rigid? 10 * Coupler.Stiffness1NpM : Coupler.Stiffness1NpM; + return Coupler.Rigid ? 10 * Coupler.Stiffness1NpM : Coupler.Stiffness1NpM; } - + public override float GetCouplerStiffness2NpM() { if (Coupler == null) { return base.GetCouplerStiffness2NpM(); } - return Coupler.Rigid? 10 * Coupler.Stiffness1NpM : Coupler.Stiffness2NpM; + return Coupler.Rigid ? 10 * Coupler.Stiffness1NpM : Coupler.Stiffness2NpM; } public override float GetCouplerSlackAM() @@ -3667,7 +3667,7 @@ public override bool GetCouplerRigidIndication() { if (Coupler == null) { - return base.GetCouplerRigidIndication(); // If no coupler defined + return base.GetCouplerRigidIndication(); // If no coupler defined } return Coupler.Rigid ? true : false; // Return whether coupler Rigid or Flexible } @@ -3684,18 +3684,18 @@ public override bool GetAdvancedCouplerFlag() public override float GetMaximumSimpleCouplerSlack1M() // This limits the maximum amount of slack, and typically will be equal to y - x of R0 statement { - if (Coupler == null) - return base.GetMaximumSimpleCouplerSlack1M(); - return Coupler.Rigid ? 0.0001f : Coupler.R0Diff; + if (Coupler == null) + return base.GetMaximumSimpleCouplerSlack1M(); + return Coupler.Rigid ? 0.0001f : Coupler.R0Diff; } public override float GetMaximumSimpleCouplerSlack2M() // This limits the slack due to draft forces (?) and should be marginally greater then GetMaximumCouplerSlack1M { - if (Coupler == null) - return base.GetMaximumSimpleCouplerSlack2M(); - return Coupler.Rigid ? 0.0002f : base.GetMaximumSimpleCouplerSlack2M(); // GetMaximumCouplerSlack2M > GetMaximumCouplerSlack1M + if (Coupler == null) + return base.GetMaximumSimpleCouplerSlack2M(); + return Coupler.Rigid ? 0.0002f : base.GetMaximumSimpleCouplerSlack2M(); // GetMaximumCouplerSlack2M > GetMaximumCouplerSlack1M } @@ -3795,7 +3795,7 @@ public override float GetMaximumCouplerTensionSlack2M() if (Coupler == null) return base.GetMaximumCouplerTensionSlack2M(); - return Coupler.Rigid? 0.0001f : Coupler.TensionR0Y + GetCouplerTensionSlackAM(); + return Coupler.Rigid ? 0.0001f : Coupler.TensionR0Y + GetCouplerTensionSlackAM(); } public override float GetMaximumCouplerTensionSlack3M() // This limits the slack due to draft forces (?) and should be marginally greater then GetMaximumCouplerSlack2M @@ -3846,7 +3846,7 @@ public override float GetMaximumCouplerTensionSlack2M() return Coupler.Rigid ? 0.0002f : Coupler.CompressionR0Y + GetCouplerCompressionSlackAM() + Coupler2MTemporary; // GetMaximumCouplerSlack3M > GetMaximumCouplerSlack2M } - public override float GetCouplerBreak1N() + public override float GetCouplerBreak1N() { if (Coupler == null) { @@ -3855,7 +3855,7 @@ public override float GetCouplerBreak1N() return Coupler.Break1N; } - public override float GetCouplerBreak2N() + public override float GetCouplerBreak2N() { if (Coupler == null) { @@ -3864,7 +3864,7 @@ public override float GetCouplerBreak2N() return Coupler.Break2N; } - public override float GetCouplerTensionR0Y() + public override float GetCouplerTensionR0Y() { if (Coupler == null) { @@ -3958,7 +3958,7 @@ public override float GetFilledFraction(uint pickupType) public override float GetUserBrakeShoeFrictionFactor() { var frictionfraction = 0.0f; - if ( BrakeShoeFrictionFactor == null) + if (BrakeShoeFrictionFactor == null) { frictionfraction = 0.0f; } @@ -3966,7 +3966,7 @@ public override float GetUserBrakeShoeFrictionFactor() { frictionfraction = BrakeShoeFrictionFactor[MpS.ToKpH(AbsSpeedMpS)]; } - + return frictionfraction; } @@ -3987,10 +3987,10 @@ public override float GetZeroUserBrakeShoeFrictionFactor() } return frictionfraction; - } - - - + } + + + /// /// Starts a continuous increase in controlled value. /// @@ -4015,7 +4015,7 @@ public void StartRefillingOrUnloading(PickupObj matchPickup, IntakePoint intakeP } if (!unload) { - controller.SetStepSize(matchPickup.PickupCapacity.FeedRateKGpS/ MSTSNotchController.StandardBoost / FreightAnimations.LoadedOne.FreightWeightWhenFull); + controller.SetStepSize(matchPickup.PickupCapacity.FeedRateKGpS / MSTSNotchController.StandardBoost / FreightAnimations.LoadedOne.FreightWeightWhenFull); Simulator.Confirmer.Message(ConfirmLevel.Information, Simulator.Catalog.GetString("Starting refill")); controller.StartIncrease(controller.MaximumValue); } @@ -4038,13 +4038,13 @@ public void StartRefillingOrUnloading(PickupObj matchPickup, IntakePoint intakeP public void StartLoadingOrUnloading(PickupObj matchPickup, IntakePoint intakePoint, bool unload) { var type = matchPickup.PickupType; - /* var controller = WeightLoadController; - if (controller == null) - { - Simulator.Confirmer.Message(ConfirmLevel.Error, Simulator.Catalog.GetString("Incompatible data")); - return; - } - controller.CommandStartTime = Simulator.ClockTime; // for Replay to use */ + /* var controller = WeightLoadController; + if (controller == null) + { + Simulator.Confirmer.Message(ConfirmLevel.Error, Simulator.Catalog.GetString("Incompatible data")); + return; + } + controller.CommandStartTime = Simulator.ClockTime; // for Replay to use */ FreightAnimations.FreightType = (MSTSWagon.PickupType)type; @@ -4060,13 +4060,13 @@ public void StartLoadingOrUnloading(PickupObj matchPickup, IntakePoint intakePoi { Simulator.Confirmer.Message(ConfirmLevel.Information, Simulator.Catalog.GetString("No containers to load")); return; - } - // var container = containerStation.Containers.Last(); + } + // var container = containerStation.Containers.Last(); Simulator.Confirmer.Message(ConfirmLevel.Information, Simulator.Catalog.GetString("Starting load")); // immediate load at the moment -// FreightAnimations.DiscreteLoadedOne.Container = container; - containerStation.PrepareForLoad((FreightAnimationDiscrete)intakePoint.LinkedFreightAnim); - // FreightAnimations.DiscreteLoadedOne.Loaded = true; + // FreightAnimations.DiscreteLoadedOne.Container = container; + containerStation.PrepareForLoad((FreightAnimationDiscrete)intakePoint.LinkedFreightAnim); + // FreightAnimations.DiscreteLoadedOne.Loaded = true; } else { @@ -4235,8 +4235,8 @@ public MSTSCoupling(MSTSCoupling copy) } public void SetSimpleR0(float a, float b) { - R0X = a; - R0Y = b; + R0X = a; + R0Y = b; if (a == 0) R0Diff = b / 2 * Stiffness2NpM / (Stiffness1NpM + Stiffness2NpM); else @@ -4246,7 +4246,7 @@ public void SetSimpleR0(float a, float b) // Ensure R0Diff stays within "reasonable limits" if (R0Diff < 0.001) R0Diff = 0.001f; - else if (R0Diff > 0.1) + else if (R0Diff > 0.1) R0Diff = 0.1f; } @@ -4271,7 +4271,7 @@ public void SetCompressionR0(float a, float b) CompressionR0Y = b; } -public void SetTensionStiffness(float a, float b) + public void SetTensionStiffness(float a, float b) { if (a + b < 0) return; @@ -4344,7 +4344,7 @@ public void SetSimpleBreak(float a, float b) Break1N = a; // Check if b = 0, as some stock has a zero value, set a default - if ( b == 0) + if (b == 0) { Break2N = 2e7f; } @@ -4352,7 +4352,7 @@ public void SetSimpleBreak(float a, float b) { Break2N = b; } - + } /// diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/RollingStock.cs b/Source/Orts.Simulation/Simulation/RollingStocks/RollingStock.cs index ca711c5def..ec088535b4 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/RollingStock.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/RollingStock.cs @@ -15,15 +15,15 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Orts.Common; -using Orts.Parsers.Msts; -using Orts.Simulation.Physics; -using Orts.Simulation.RollingStocks.SubSystems; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; +using Orts.Common; +using Orts.Parsers.Msts; +using Orts.Simulation.Physics; +using Orts.Simulation.RollingStocks.SubSystems; namespace Orts.Simulation.RollingStocks { diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/BrakeSystem.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/BrakeSystem.cs index 4297b7de03..d3221cc974 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/BrakeSystem.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/BrakeSystem.cs @@ -15,9 +15,9 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using ORTS.Common; using System.Collections.Generic; using System.IO; +using ORTS.Common; namespace Orts.Simulation.RollingStocks.SubSystems.Brakes { diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs index 8df6254049..bc617af80f 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs @@ -18,15 +18,14 @@ // Debug for Airbrake operation - Train Pipe Leak //#define DEBUG_TRAIN_PIPE_LEAK -using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; using Orts.Common; using Orts.Parsers.Msts; using ORTS.Common; using ORTS.Scripting.Api; -using System; -using System.Collections.Generic; -using System.IO; -using System.Diagnostics; namespace Orts.Simulation.RollingStocks.SubSystems.Brakes.MSTS { @@ -86,7 +85,7 @@ public AirSinglePipe(TrainCar car) { Car = car; // taking into account very short (fake) cars to prevent NaNs in brake line pressures - BrakePipeVolumeM3 = (0.032f * 0.032f * (float)Math.PI / 4f) * Math.Max ( 5.0f, (1 + car.CarLengthM)); // Using DN32 (1-1/4") pipe + BrakePipeVolumeM3 = (0.032f * 0.032f * (float)Math.PI / 4f) * Math.Max(5.0f, (1 + car.CarLengthM)); // Using DN32 (1-1/4") pipe DebugType = "1P"; // Force graduated releasable brakes. Workaround for MSTS with bugs preventing to set eng/wag files correctly for this. @@ -227,7 +226,7 @@ public override void Parse(string lowercasetoken, STFReader stf) case "wagon(emergencyreschargingrate": EmergResChargingRatePSIpS = stf.ReadFloatBlock(STFReader.UNITS.PressureRateDefaultPSIpS, null); break; case "wagon(emergencyresvolumemultiplier": EmergAuxVolumeRatio = stf.ReadFloatBlock(STFReader.UNITS.None, null); break; case "wagon(emergencyrescapacity": EmergResVolumeM3 = Me3.FromFt3(stf.ReadFloatBlock(STFReader.UNITS.VolumeDefaultFT3, null)); break; - + // OpenRails specific parameters case "wagon(brakepipevolume": BrakePipeVolumeM3 = Me3.FromFt3(stf.ReadFloatBlock(STFReader.UNITS.VolumeDefaultFT3, null)); break; case "wagon(ortsbrakeinsensitivity": BrakeInsensitivityPSIpS = stf.ReadFloatBlock(STFReader.UNITS.PressureRateDefaultPSIpS, 0.07f); break; @@ -284,7 +283,7 @@ public override void Initialize(bool handbrakeOn, float maxPressurePSI, float fu { // reducing size of Emergency Reservoir for short (fake) cars if (Car.Simulator.Settings.CorrectQuestionableBrakingParams && Car.CarLengthM <= 1) - EmergResVolumeM3 = Math.Min (0.02f, EmergResVolumeM3); + EmergResVolumeM3 = Math.Min(0.02f, EmergResVolumeM3); // Install a plain triple valve if no brake valve defined // Do not install it for tenders if not defined, to allow tenders with straight brake only @@ -313,7 +312,7 @@ public override void Initialize(bool handbrakeOn, float maxPressurePSI, float fu HandbrakePercent = handbrakeOn & (Car as MSTSWagon).HandBrakePresent ? 100 : 0; SetRetainer(RetainerSetting.Exhaust); MSTSLocomotive loco = Car as MSTSLocomotive; - if (loco != null) + if (loco != null) { loco.MainResPressurePSI = loco.MaxMainResPressurePSI; } @@ -322,14 +321,14 @@ public override void Initialize(bool handbrakeOn, float maxPressurePSI, float fu AuxBrakeLineVolumeRatio = EmergResVolumeM3 / EmergAuxVolumeRatio / BrakePipeVolumeM3; else AuxBrakeLineVolumeRatio = 3.1f; - + CylVolumeM3 = EmergResVolumeM3 / EmergAuxVolumeRatio / AuxCylVolumeRatio; } /// /// Used when initial speed > 0 /// - public override void InitializeMoving () + public override void InitializeMoving() { Initialize(false, 0, FullServPressurePSI, true); } @@ -447,26 +446,26 @@ public override void Update(float elapsedClockSeconds) if (TripleValveState == ValveState.Release && (Car as MSTSWagon).BrakeValve != MSTSWagon.BrakeValveType.None) { if ((Car as MSTSWagon).EmergencyReservoirPresent) - { + { if (AuxResPressurePSI < EmergResPressurePSI && AuxResPressurePSI < BrakeLine1PressurePSI) - { - float dp = elapsedClockSeconds * EmergResChargingRatePSIpS; - if (EmergResPressurePSI - dp < AuxResPressurePSI + dp * EmergAuxVolumeRatio) - dp = (EmergResPressurePSI - AuxResPressurePSI) / (1 + EmergAuxVolumeRatio); - if (BrakeLine1PressurePSI < AuxResPressurePSI + dp * EmergAuxVolumeRatio) - dp = (BrakeLine1PressurePSI - AuxResPressurePSI) / EmergAuxVolumeRatio; - EmergResPressurePSI -= dp; - AuxResPressurePSI += dp * EmergAuxVolumeRatio; - } - if (AuxResPressurePSI > EmergResPressurePSI) - { - float dp = elapsedClockSeconds * EmergResChargingRatePSIpS; - if (EmergResPressurePSI + dp > AuxResPressurePSI - dp * EmergAuxVolumeRatio) - dp = (AuxResPressurePSI - EmergResPressurePSI) / (1 + EmergAuxVolumeRatio); - EmergResPressurePSI += dp; - AuxResPressurePSI -= dp * EmergAuxVolumeRatio; - } - } + { + float dp = elapsedClockSeconds * EmergResChargingRatePSIpS; + if (EmergResPressurePSI - dp < AuxResPressurePSI + dp * EmergAuxVolumeRatio) + dp = (EmergResPressurePSI - AuxResPressurePSI) / (1 + EmergAuxVolumeRatio); + if (BrakeLine1PressurePSI < AuxResPressurePSI + dp * EmergAuxVolumeRatio) + dp = (BrakeLine1PressurePSI - AuxResPressurePSI) / EmergAuxVolumeRatio; + EmergResPressurePSI -= dp; + AuxResPressurePSI += dp * EmergAuxVolumeRatio; + } + if (AuxResPressurePSI > EmergResPressurePSI) + { + float dp = elapsedClockSeconds * EmergResChargingRatePSIpS; + if (EmergResPressurePSI + dp > AuxResPressurePSI - dp * EmergAuxVolumeRatio) + dp = (AuxResPressurePSI - EmergResPressurePSI) / (1 + EmergAuxVolumeRatio); + EmergResPressurePSI += dp; + AuxResPressurePSI -= dp * EmergAuxVolumeRatio; + } + } if (AuxResPressurePSI < BrakeLine1PressurePSI && (!TwoPipes || !MRPAuxResCharging || ((Car as MSTSWagon).BrakeValve != MSTSWagon.BrakeValveType.Distributor) || BrakeLine2PressurePSI < BrakeLine1PressurePSI) && !BleedOffValveOpen) { float dp = elapsedClockSeconds * MaxAuxilaryChargingRatePSIpS; // Change in pressure for train brake pipe. @@ -503,7 +502,7 @@ public override void Update(float elapsedClockSeconds) { float dp = elapsedClockSeconds * ReleaseRatePSIpS; if (AutoCylPressurePSI - dp < minCylPressurePSI) - dp = AutoCylPressurePSI-minCylPressurePSI; + dp = AutoCylPressurePSI - minCylPressurePSI; if (dp < 0) dp = 0; AutoCylPressurePSI -= dp; @@ -526,7 +525,7 @@ public override void Update(float elapsedClockSeconds) if (AutoCylPressurePSI < 0) AutoCylPressurePSI = 0; - + if (Car is MSTSLocomotive && (Car as MSTSWagon).BrakeValve == MSTSWagon.BrakeValveType.DistributingValve) { // For distributing valves, we use AutoCylPressurePSI as "Application Chamber/Pipe" pressure @@ -534,7 +533,7 @@ public override void Update(float elapsedClockSeconds) var loco = Car as MSTSLocomotive; var engineBrakeStatus = loco.EngineBrakeController.Notches[loco.EngineBrakeController.CurrentNotch].Type; var trainBrakeStatus = loco.TrainBrakeController.Notches[loco.TrainBrakeController.CurrentNotch].Type; - // BailOff + // BailOff if (engineBrakeStatus == ControllerState.BailOff) { AutoCylPressurePSI -= MaxReleaseRatePSIpS * elapsedClockSeconds; @@ -550,7 +549,7 @@ public override void Update(float elapsedClockSeconds) } // Release pipe open HoldingValve = engineBrakeStatus == ControllerState.Release && trainBrakeStatus == ControllerState.Release ? ValveState.Release : ValveState.Lap; - + // Independent air brake equalization if (AutoCylPressurePSI < loco.Train.BrakeLine3PressurePSI) AutoCylPressurePSI = loco.Train.BrakeLine3PressurePSI; @@ -570,9 +569,9 @@ public override void Update(float elapsedClockSeconds) if (loco.LocomotivePowerSupply.MainPowerSupplyOn) { if (loco.Train.LeadLocomotiveIndex >= 0) - { + { var lead = loco.Train.Cars[loco.Train.LeadLocomotiveIndex] as MSTSLocomotive; - if (lead != null && (lead.BailOff || + if (lead != null && (lead.BailOff || (lead.EngineBrakeController != null && lead.EngineBrakeController.CurrentNotch >= 0 && lead.EngineBrakeController.Notches[lead.EngineBrakeController.CurrentNotch].Type == ControllerState.BailOff))) { if (loco.BrakeValve == MSTSWagon.BrakeValveType.Distributor) @@ -595,7 +594,7 @@ public override void Update(float elapsedClockSeconds) var localBrakeForceN = loco.DynamicBrakeForceN + Math.Min(CylPressurePSI / MaxCylPressurePSI, 1) * Car.MaxBrakeForceN; if (localBrakeForceN > requiredBrakeForceN - 0.15f * Car.MaxBrakeForceN) { - demandedPressurePSI = Math.Min(Math.Max((requiredBrakeForceN - loco.DynamicBrakeForceN)/Car.MaxBrakeForceN*MaxCylPressurePSI, 0), MaxCylPressurePSI); + demandedPressurePSI = Math.Min(Math.Max((requiredBrakeForceN - loco.DynamicBrakeForceN) / Car.MaxBrakeForceN * MaxCylPressurePSI, 0), MaxCylPressurePSI); if (demandedPressurePSI > CylPressurePSI && demandedPressurePSI < CylPressurePSI + 4) // Allow some margin for unnecessary air brake application { demandedPressurePSI = CylPressurePSI; @@ -666,7 +665,7 @@ public override void Update(float elapsedClockSeconds) if (Car.WheelBrakeSlideProtectionFitted && Car.Train.IsPlayerDriven) { // WSP dump valve active - if ((Car.BrakeSkidWarning || Car.BrakeSkid) && CylPressurePSI > 0 && !Car.WheelBrakeSlideProtectionDumpValveLockout && ( (!Car.WheelBrakeSlideProtectionLimitDisabled && BrakeLine1PressurePSI > 36.25) || Car.WheelBrakeSlideProtectionLimitDisabled) ) + if ((Car.BrakeSkidWarning || Car.BrakeSkid) && CylPressurePSI > 0 && !Car.WheelBrakeSlideProtectionDumpValveLockout && ((!Car.WheelBrakeSlideProtectionLimitDisabled && BrakeLine1PressurePSI > 36.25) || Car.WheelBrakeSlideProtectionLimitDisabled)) { Car.WheelBrakeSlideProtectionActive = true; AutoCylPressurePSI -= elapsedClockSeconds * MaxReleaseRatePSIpS; @@ -688,7 +687,7 @@ public override void Update(float elapsedClockSeconds) } } - + // Record HUD display values for brake cylinders depending upon whether they are wagons or locomotives/tenders (which are subject to their own engine brakes) if (Car.WagonType == MSTSWagon.WagonTypes.Engine || Car.WagonType == MSTSWagon.WagonTypes.Tender) { @@ -707,7 +706,7 @@ public override void Update(float elapsedClockSeconds) } // If wagons are not attached to the locomotive, then set wagon BC pressure to same as locomotive in the Train brake line - if (!Car.Train.WagonsAttached && (Car.WagonType == MSTSWagon.WagonTypes.Engine || Car.WagonType == MSTSWagon.WagonTypes.Tender) ) + if (!Car.Train.WagonsAttached && (Car.WagonType == MSTSWagon.WagonTypes.Engine || Car.WagonType == MSTSWagon.WagonTypes.Tender)) { Car.Train.HUDWagonBrakeCylinderPSI = CylPressurePSI; } @@ -719,7 +718,7 @@ public override void Update(float elapsedClockSeconds) if (f < Car.MaxHandbrakeForceN * HandbrakePercent / 100) f = Car.MaxHandbrakeForceN * HandbrakePercent / 100; } - else f = Math.Max(Car.MaxBrakeForceN, Car.MaxHandbrakeForceN / 2); + else f = Math.Max(Car.MaxBrakeForceN, Car.MaxHandbrakeForceN / 2); Car.BrakeRetardForceN = f * Car.BrakeShoeRetardCoefficientFrictionAdjFactor; // calculates value of force applied to wheel, independent of wheel skid if (Car.BrakeSkid) // Test to see if wheels are skiding to excessive brake force { @@ -734,7 +733,7 @@ public override void Update(float elapsedClockSeconds) if (SoundTriggerCounter >= 0.5f) { SoundTriggerCounter = 0f; - if ( Math.Abs(AutoCylPressurePSI - prevCylPressurePSI) > 0.1f) //(AutoCylPressurePSI != prevCylPressurePSI) + if (Math.Abs(AutoCylPressurePSI - prevCylPressurePSI) > 0.1f) //(AutoCylPressurePSI != prevCylPressurePSI) { if (!TrainBrakePressureChanging) { @@ -752,7 +751,7 @@ public override void Update(float elapsedClockSeconds) Car.SignalEvent(Event.TrainBrakePressureStoppedChanging); } - if ( Math.Abs(BrakeLine1PressurePSI - prevBrakePipePressurePSI_sound) > 0.1f /*BrakeLine1PressurePSI > prevBrakePipePressurePSI*/) + if (Math.Abs(BrakeLine1PressurePSI - prevBrakePipePressurePSI_sound) > 0.1f /*BrakeLine1PressurePSI > prevBrakePipePressurePSI*/) { if (!BrakePipePressureChanging) { @@ -889,7 +888,7 @@ protected static void PropagateBrakeLinePressures(float elapsedClockSeconds, Tra #endif train.TotalTrainBrakePipeVolumeM3 = 0.0f; // initialise train brake pipe volume - for (int carIndex=0; carIndex < train.Cars.Count; carIndex++) + for (int carIndex = 0; carIndex < train.Cars.Count; carIndex++) { TrainCar car = train.Cars[carIndex]; TrainCar nextCar = carIndex < train.Cars.Count - 1 ? train.Cars[carIndex + 1] : null; @@ -991,7 +990,7 @@ protected static void PropagateBrakeLinePressures(float elapsedClockSeconds, Tra if (p > 1000) p -= 1000; var prevState = lead.EngineBrakeState; - if (p < train.BrakeLine3PressurePSI && p < lead.MainResPressurePSI ) // Apply the engine brake as the pressure decreases + if (p < train.BrakeLine3PressurePSI && p < lead.MainResPressurePSI) // Apply the engine brake as the pressure decreases { float dp = elapsedClockSeconds * lead.EngineBrakeApplyRatePSIpS / (last - first + 1); if (p + dp > train.BrakeLine3PressurePSI) @@ -1116,7 +1115,7 @@ public void NormalizePressures(float maxPressurePSI) public override bool IsBraking() { if (AutoCylPressurePSI > MaxCylPressurePSI * 0.3) - return true; + return true; return false; } diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/EPBrakeSystem.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/EPBrakeSystem.cs index 3024ab8062..3a12b2fd98 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/EPBrakeSystem.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/EPBrakeSystem.cs @@ -17,9 +17,8 @@ using System; using System.Collections.Generic; -using ORTS.Common; using Orts.Parsers.Msts; -using ORTS.Scripting.Api; +using ORTS.Common; namespace Orts.Simulation.RollingStocks.SubSystems.Brakes.MSTS { @@ -100,7 +99,7 @@ public override void Update(float elapsedClockSeconds) demandedAutoCylPressurePSI = Math.Min(Math.Max(Car.Train.BrakeLine4, 0), 1) * MaxCylPressurePSI; HoldingValve = AutoCylPressurePSI <= demandedAutoCylPressurePSI ? ValveState.Lap : ValveState.Release; } - + base.Update(elapsedClockSeconds); // Allow processing of other valid tokens if (AutoCylPressurePSI < demandedAutoCylPressurePSI && !Car.WheelBrakeSlideProtectionActive) @@ -114,12 +113,12 @@ public override void Update(float elapsedClockSeconds) AutoCylPressurePSI += dp; } } - + } public override void Parse(string lowercasetoken, STFReader stf) { - switch(lowercasetoken) + switch (lowercasetoken) { case "wagon(ortsepbrakecontrolsbrakepipe": EPBrakeControlsBrakePipe = stf.ReadBoolBlock(false); diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/ManualBraking.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/ManualBraking.cs index f3be7f601a..b151b0b803 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/ManualBraking.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/ManualBraking.cs @@ -15,15 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Orts.Common; -using Orts.Parsers.Msts; -using Orts.Simulation.Physics; -using ORTS.Common; -using ORTS.Scripting.Api; using System; using System.Collections.Generic; using System.IO; -using System.Diagnostics; +using Orts.Parsers.Msts; +using ORTS.Common; namespace Orts.Simulation.RollingStocks.SubSystems.Brakes.MSTS { @@ -102,7 +98,7 @@ public override void Initialize(bool handbrakeOn, float maxPressurePSI, float fu } // Changes brake type if tender fitted with steam brakes - if (Car.WagonType == MSTSWagon.WagonTypes.Tender) + if (Car.WagonType == MSTSWagon.WagonTypes.Tender) { var wagonid = Car as MSTSWagon; // Find the associated steam locomotive for this tender @@ -155,7 +151,7 @@ public override void Update(float elapsedClockSeconds) } BrakeForceFraction = ManualBrakingCurrentFraction / ManualMaxBrakeValue; - + // If car is a locomotive or tender, then process engine brake if (Car.WagonType == MSTSWagon.WagonTypes.Engine || Car.WagonType == MSTSWagon.WagonTypes.Tender) // Engine brake { @@ -171,7 +167,7 @@ public override void Update(float elapsedClockSeconds) { EngineBrakeDesiredFraction = EngineBrakeSettingValue * ManualMaxBrakeValue; } - + if (EngineBrakingCurrentFraction < EngineBrakeDesiredFraction) { @@ -206,7 +202,7 @@ public override void Update(float elapsedClockSeconds) } } - float f; + float f; if (!Car.BrakesStuck) { f = Car.MaxBrakeForceN * Math.Min(BrakeForceFraction, 1); diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SMEBrakeSystem.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SMEBrakeSystem.cs index 59838caa1e..3d881a62d6 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SMEBrakeSystem.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SMEBrakeSystem.cs @@ -15,10 +15,9 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using ORTS.Common; using System; using System.Collections.Generic; -using ORTS.Scripting.Api; +using ORTS.Common; namespace Orts.Simulation.RollingStocks.SubSystems.Brakes.MSTS { @@ -26,7 +25,7 @@ namespace Orts.Simulation.RollingStocks.SubSystems.Brakes.MSTS // Detailed description of the operation of a SME brake system can be found in: "Air brakes, an up-to-date treatise on the Westinghouse air brake as designed for passenger and // freight service and for electric cars" by Ludy, Llewellyn V., 1875- [from old catalog]; American Technical Society // https://archive.org/details/airbrakesuptodat00ludy/page/174/mode/2up?q=%22SME+brake%22 - + public class SMEBrakeSystem : AirTwinPipe { public SMEBrakeSystem(TrainCar car) @@ -59,7 +58,7 @@ public override void Update(float elapsedClockSeconds) demandedAutoCylPressurePSI = Math.Min(Math.Max(Car.Train.BrakeLine4, 0), 1) * MaxCylPressurePSI; HoldingValve = AutoCylPressurePSI <= demandedAutoCylPressurePSI ? ValveState.Lap : ValveState.Release; } - + base.Update(elapsedClockSeconds); // Allow processing of other valid tokens @@ -73,7 +72,7 @@ public override void Update(float elapsedClockSeconds) BrakeLine2PressurePSI -= dp * AuxBrakeLineVolumeRatio / AuxCylVolumeRatio; AutoCylPressurePSI += dp; } - + } public override string[] GetDebugStatus(Dictionary units) diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SingleTransferPipe.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SingleTransferPipe.cs index 83bbab588d..1215936efa 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SingleTransferPipe.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SingleTransferPipe.cs @@ -16,10 +16,9 @@ // along with Open Rails. If not, see . using System; -using ORTS.Common; -using Orts.Parsers.Msts; using System.Collections.Generic; -using System.Diagnostics; +using Orts.Parsers.Msts; +using ORTS.Common; namespace Orts.Simulation.RollingStocks.SubSystems.Brakes.MSTS { @@ -101,15 +100,15 @@ public override string GetFullStatus(BrakeSystem lastCarBrakeSystem, Dictionary< s += $" {Simulator.Catalog.GetString("Handbrake")} {HandbrakePercent:F0}%"; return s; } - + } // This overides the information for each individual wagon in the extended HUD - public override string[] GetDebugStatus(Dictionary units) + public override string[] GetDebugStatus(Dictionary units) { // display differently depending upon whether vacuum or air braked system if (Car.CarBrakeSystemType == "vacuum_piped") - { + { return new string[] { DebugType, @@ -125,7 +124,7 @@ public override string[] GetDebugStatus(Dictionary. -using Microsoft.Xna.Framework; using System; -using ORTS.Common; +using System.Collections.Generic; +using Microsoft.Xna.Framework; using Orts.Common; +using ORTS.Common; using ORTS.Scripting.Api; -using System.Collections.Generic; -using System.Diagnostics; namespace Orts.Simulation.RollingStocks.SubSystems.Brakes.MSTS { @@ -74,7 +73,7 @@ public override void Update(float elapsedClockSeconds) { // Adjust brake cylinder pressures as brake pipe varies // straight braked cars will have separate calculations done, if locomotive is not straight braked, then revert car to vacuum single pipe - if (lead.CarBrakeSystemType == "straight_vacuum_single_pipe") + if (lead.CarBrakeSystemType == "straight_vacuum_single_pipe") { (Car as MSTSWagon).NonAutoBrakePresent = true; // Set flag to indicate that non auto brake is set in train bool skiploop = false; @@ -90,7 +89,7 @@ public override void Update(float elapsedClockSeconds) } if (!skiploop) - { + { if (BrakeLine1PressurePSI < CylPressurePSIA && lead.BrakeFlagIncrease) // Increase BP pressure, hence vacuum brakes are being released { float dp = elapsedClockSeconds * MaxReleaseRatePSIpS; @@ -189,10 +188,10 @@ public override void Update(float elapsedClockSeconds) Car.SignalEvent(Event.TrainBrakePressureStoppedChanging); TrainBrakePressureChanging = false; } - prevCylPressurePSIA = CylPressurePSIA; - + prevCylPressurePSIA = CylPressurePSIA; + - if (Math.Abs(BrakeLine1PressurePSI - prevBrakePipePressurePSI) > 0.001) + if (Math.Abs(BrakeLine1PressurePSI - prevBrakePipePressurePSI) > 0.001) { if (!BrakePipePressureChanging) { @@ -253,7 +252,7 @@ public override void Update(float elapsedClockSeconds) { LargeEjectorChargingRateInHgpS = lead == null ? 10.0f : (lead.BrakePipeChargingRatePSIorInHgpS); // Single ejector model } - + float SmallEjectorChargingRateInHgpS = lead == null ? 10.0f : (lead.SmallEjectorBrakePipeChargingRatePSIorInHgpS); // Set value for small ejector to operate - fraction set in steam locomotive float TrainPipeLeakLossPSI = lead == null ? 0.0f : (lead.TrainBrakePipeLeakPSIorInHgpS); float AdjTrainPipeLeakLossPSI = 0.0f; @@ -299,7 +298,7 @@ public override void Update(float elapsedClockSeconds) lead.BrakeFlagIncrease = true; lead.BrakeFlagDecrease = false; - + // Apply brakes - brakepipe has to have vacuum increased to max vacuum value (ie decrease psi), vacuum is created by large ejector control lead.BrakeSystem.BrakeLine1PressurePSI -= elapsedClockSeconds * (AdjLargeEjectorChargingRateInHgpS + AdjSmallEjectorChargingRateInHgpS); if (lead.BrakeSystem.BrakeLine1PressurePSI < (OneAtmospherePSI - MaxVacuumPipeLevelPSI)) @@ -326,8 +325,8 @@ public override void Update(float elapsedClockSeconds) } - // Eames type brake with separate release and ejector operating handles - if (lead.LargeEjectorControllerFitted && lead.LargeSteamEjectorIsOn) + // Eames type brake with separate release and ejector operating handles + if (lead.LargeEjectorControllerFitted && lead.LargeSteamEjectorIsOn) { // Apply brakes - brakepipe has to have vacuum increased to max vacuum value (ie decrease psi), vacuum is created by large ejector control lead.BrakeSystem.BrakeLine1PressurePSI -= elapsedClockSeconds * AdjLargeEjectorChargingRateInHgpS; @@ -342,7 +341,7 @@ public override void Update(float elapsedClockSeconds) { lead.BrakeFlagIncrease = false; lead.BrakeFlagDecrease = true; - + lead.BrakeSystem.BrakeLine1PressurePSI += elapsedClockSeconds * AdjBrakeServiceTimeFactorPSIpS; if (lead.BrakeSystem.BrakeLine1PressurePSI > OneAtmospherePSI) { @@ -358,7 +357,7 @@ public override void Update(float elapsedClockSeconds) } } - + if (((lead.CarBrakeSystemType == "vacuum_single_pipe" || lead.CarBrakeSystemType == "vacuum_twin_pipe") && (Car as MSTSWagon).AuxiliaryReservoirPresent)) { // update non calculated values using vacuum single pipe class diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/VacuumSinglePipe.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/VacuumSinglePipe.cs index 6e7ad2bf89..6fcb424194 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/VacuumSinglePipe.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/VacuumSinglePipe.cs @@ -18,16 +18,14 @@ // Debug for Vacuum operation - Train Pipe Leak //#define DEBUG_TRAIN_PIPE_LEAK +using System; +using System.Collections.Generic; +using System.IO; using Microsoft.Xna.Framework; using Orts.Common; using Orts.Parsers.Msts; -using Orts.Simulation.Physics; using ORTS.Common; using ORTS.Scripting.Api; -using System; -using System.Collections.Generic; -using System.IO; -using System.Diagnostics; namespace Orts.Simulation.RollingStocks.SubSystems.Brakes.MSTS { @@ -96,7 +94,7 @@ protected float VacResPressureAdjPSIA() { if (VacResPressurePSIA >= CylPressurePSIA) { - return VacResPressurePSIA; + return VacResPressurePSIA; } // TODO - review for a better approach // Calculate the new vacuum based upon the volume reduction in the reservoir due to brake cylinder movement @@ -115,7 +113,7 @@ public override string GetFullStatus(BrakeSystem lastCarBrakeSystem, Dictionary< { string s; // display depending upon whether an EQ reservoir fitted - if ( Car.Train.EQEquippedVacLoco) + if (Car.Train.EQEquippedVacLoco) { // The equalising pressure operates between 0 (Apply) and full pipe vacuum (12.278psi = 25 inHg - Release), which is the reverse of above, // so it needs to be mapped to provide a desired vacuum of 2.278 psi = 25 inhg = Release and 14.503psi = 0 inhg = Apply @@ -195,7 +193,7 @@ public override float GetCylPressurePSI() { return KPa.ToPSI(KPa.FromInHg(Vac.FromPress(CylPressurePSIA))); } - + } public override float GetCylVolumeM3() @@ -212,7 +210,7 @@ public override float GetVacBrakeCylNumber() { return NumBrakeCylinders; } - + public override float GetVacResPressurePSI() { @@ -226,8 +224,9 @@ public override void Parse(string lowercasetoken, STFReader stf) case "wagon(brakecylinderpressureformaxbrakebrakeforce": MaxForcePressurePSI = stf.ReadFloatBlock(STFReader.UNITS.PressureDefaultInHg, null); break; case "wagon(maxreleaserate": MaxReleaseRatePSIpS = stf.ReadFloatBlock(STFReader.UNITS.PressureRateDefaultInHgpS, null); break; case "wagon(maxapplicationrate": MaxApplicationRatePSIpS = stf.ReadFloatBlock(STFReader.UNITS.PressureRateDefaultInHgpS, null); break; - case "wagon(ortsdirectadmissionvalve": DirectAdmissionValve = stf.ReadFloatBlock(STFReader.UNITS.None, null); - if(DirectAdmissionValve == 1.0f) + case "wagon(ortsdirectadmissionvalve": + DirectAdmissionValve = stf.ReadFloatBlock(STFReader.UNITS.None, null); + if (DirectAdmissionValve == 1.0f) { HasDirectAdmissionValue = true; } @@ -239,7 +238,8 @@ public override void Parse(string lowercasetoken, STFReader stf) // OpenRails specific parameters case "wagon(brakepipevolume": BrakePipeVolumeM3 = Me3.FromFt3(stf.ReadFloatBlock(STFReader.UNITS.VolumeDefaultFT3, null)); break; case "wagon(ortsauxilaryrescapacity": VacResVolM3 = Me3.FromFt3(stf.ReadFloatBlock(STFReader.UNITS.VolumeDefaultFT3, null)); break; - case "wagon(ortsbrakecylindersize": float BrakeCylSizeM = stf.ReadFloatBlock(STFReader.UNITS.Distance, null); + case "wagon(ortsbrakecylindersize": + float BrakeCylSizeM = stf.ReadFloatBlock(STFReader.UNITS.Distance, null); BrakeCylVolM3 = Me3.FromIn3((float)((Me.ToIn(BrakeCylSizeM) / 2) * (Me.ToIn(BrakeCylSizeM) / 2) * 4.5 * Math.PI)); // Calculate brake cylinder volume based upon size of BC, 4.5" of piston travel break; case "wagon(ortsnumberbrakecylinders": NumBrakeCylinders = stf.ReadIntBlock(null); break; @@ -288,13 +288,13 @@ public override void Initialize(bool handbrakeOn, float maxVacuumInHg, float ful BrakeLine1PressurePSI = Vac.ToPress(Car.Train.EqualReservoirPressurePSIorInHg); BrakeLine2PressurePSI = 0; -// BrakeLine3PressurePSI = V2P(Car.Train.EqualReservoirPressurePSIorInHg); -/* if (Car.Train.AITrainBrakePercent == 0) - { - CylPressurePSIA = 0; - Car.BrakeForceN = 0; - } - else */ + // BrakeLine3PressurePSI = V2P(Car.Train.EqualReservoirPressurePSIorInHg); + /* if (Car.Train.AITrainBrakePercent == 0) + { + CylPressurePSIA = 0; + Car.BrakeForceN = 0; + } + else */ CylPressurePSIA = Vac.ToPress(Car.Train.EqualReservoirPressurePSIorInHg); VacResPressurePSIA = Vac.ToPress(Car.Train.EqualReservoirPressurePSIorInHg); HandbrakePercent = 0; @@ -537,7 +537,7 @@ public override void Update(float elapsedClockSeconds) BrakeLine1PressurePSI -= dp * vr; } } - + // Record HUD display values for brake cylidners depending upon whether they are wagons or locomotives/tenders (which are subject to their own engine brakes) if (Car.WagonType == MSTSWagon.WagonTypes.Engine || Car.WagonType == MSTSWagon.WagonTypes.Tender) { @@ -561,8 +561,8 @@ public override void Update(float elapsedClockSeconds) Car.Train.HUDWagonBrakeCylinderPSI = CylPressurePSIA; } - float vrp = VacResPressureAdjPSIA(); - float f; + float vrp = VacResPressureAdjPSIA(); + float f; if (!Car.BrakesStuck) { // depending upon whether steam brake fitted or not, calculate brake force to be applied @@ -580,7 +580,7 @@ public override void Update(float elapsedClockSeconds) } else f = Math.Max(Car.MaxBrakeForceN, Car.MaxHandbrakeForceN / 2); - Car.BrakeRetardForceN = f * Car.BrakeShoeRetardCoefficientFrictionAdjFactor; // calculates value of force applied to wheel, independent of wheel skid + Car.BrakeRetardForceN = f * Car.BrakeShoeRetardCoefficientFrictionAdjFactor; // calculates value of force applied to wheel, independent of wheel skid if (Car.BrakeSkid) // Test to see if wheels are skiding due to excessive brake force { Car.BrakeForceN = f * Car.SkidFriction; // if excessive brakeforce, wheel skids, and loses adhesion @@ -589,7 +589,7 @@ public override void Update(float elapsedClockSeconds) { Car.BrakeForceN = f * Car.BrakeShoeCoefficientFrictionAdjFactor; // In advanced adhesion model brake shoe coefficient varies with speed, in simple model constant force applied as per value in WAG file, will vary with wheel skid. } - + // sound trigger checking runs every 4th update, to avoid the problems caused by the jumping BrakeLine1PressurePSI value, and also saves cpu time :) if (SoundTriggerCounter >= 4) @@ -603,7 +603,7 @@ public override void Update(float elapsedClockSeconds) Car.SignalEvent(Event.TrainBrakePressureIncrease); else Car.SignalEvent(Event.TrainBrakePressureDecrease); - TrainBrakePressureChanging = !TrainBrakePressureChanging; + TrainBrakePressureChanging = !TrainBrakePressureChanging; } } @@ -613,7 +613,7 @@ public override void Update(float elapsedClockSeconds) Car.SignalEvent(Event.TrainBrakePressureStoppedChanging); } - if ( Math.Abs(BrakeLine1PressurePSI-prevBrakePipePressurePSI)> 0.05) /*BrakeLine1PressurePSI > prevBrakePipePressurePSI*/ + if (Math.Abs(BrakeLine1PressurePSI - prevBrakePipePressurePSI) > 0.05) /*BrakeLine1PressurePSI > prevBrakePipePressurePSI*/ { if (!BrakePipePressureChanging) { @@ -775,7 +775,7 @@ protected static void PropagateBrakeLinePressures(float elapsedClockSeconds, Tra AdjbrakePipeTimeFactorS = TempbrakePipeTimeMultFactor * brakePipeTimeFactorS; AdjBrakePipeDischargeTimeFactor = TempbrakePipeTimeMultFactor * lead.BrakePipeDischargeTimeFactor; - + // This section determines whether small ejector or vacuum pump is going to counteract brake pipe leakage - only applies to steam locomotives if (lead.EngineType == TrainCar.EngineTypes.Steam) @@ -929,14 +929,14 @@ protected static void PropagateBrakeLinePressures(float elapsedClockSeconds, Tra // If Diff is going to take BP vacuum below the value in the Main Reservoir, then only do the difference between the two (remember this is in PSIA) -// if (lead.BrakeSystem.BrakeLine1PressurePSI - TrainPipePressureDiffPSI < lead.VacuumMainResVacuumPSIAorInHg) -// { -// TrainPipePressureDiffPSI = lead.VacuumMainResVacuumPSIAorInHg - lead.BrakeSystem.BrakeLine1PressurePSI; -// } + // if (lead.BrakeSystem.BrakeLine1PressurePSI - TrainPipePressureDiffPSI < lead.VacuumMainResVacuumPSIAorInHg) + // { + // TrainPipePressureDiffPSI = lead.VacuumMainResVacuumPSIAorInHg - lead.BrakeSystem.BrakeLine1PressurePSI; + // } -// if (TrainPipePressureDiffPSI < 0 || lead.VacuumMainResVacuumPSIAorInHg > lead.BrakeSystem.BrakeLine1PressurePSI) -// TrainPipePressureDiffPSI = 0; + // if (TrainPipePressureDiffPSI < 0 || lead.VacuumMainResVacuumPSIAorInHg > lead.BrakeSystem.BrakeLine1PressurePSI) + // TrainPipePressureDiffPSI = 0; // Adjust brake pipe pressure based upon pressure differential // If pipe leakage and brake control valve is in LAP position then pipe is connected to main reservoir and maintained at equalising pressure from reservoir @@ -946,10 +946,10 @@ protected static void PropagateBrakeLinePressures(float elapsedClockSeconds, Tra if (lead.TrainBrakeController.TrainBrakeControllerState != ControllerState.Lap) { lead.BrakeSystem.BrakeLine1PressurePSI -= TrainPipePressureDiffPSI; // Increase brake pipe pressure to cover loss in vacuum pipe -// float VolDiffM3 = (train.TotalTrainBrakeSystemVolumeM3 / lead.VacuumBrakesMainResVolumeM3); -// lead.VacuumMainResVacuumPSIAorInHg += TrainPipePressureDiffPSI * VolDiffM3; -// if (lead.VacuumMainResVacuumPSIAorInHg > OneAtmospherePSI) -// lead.VacuumMainResVacuumPSIAorInHg = OneAtmospherePSI; // Ensure Main Res does not go negative + // float VolDiffM3 = (train.TotalTrainBrakeSystemVolumeM3 / lead.VacuumBrakesMainResVolumeM3); + // lead.VacuumMainResVacuumPSIAorInHg += TrainPipePressureDiffPSI * VolDiffM3; + // if (lead.VacuumMainResVacuumPSIAorInHg > OneAtmospherePSI) + // lead.VacuumMainResVacuumPSIAorInHg = OneAtmospherePSI; // Ensure Main Res does not go negative } // else in LAP psoition brake pipe is isolated, and thus brake pipe pressure decreases, but reservoir remains at same pressure else @@ -998,7 +998,7 @@ protected static void PropagateBrakeLinePressures(float elapsedClockSeconds, Tra // Brake Controller is in Release position - decrease brake pipe value pressure - PSI goes from 14.5 to 4.189 - releasing brakes else if (lead.TrainBrakeController.TrainBrakeControllerState == ControllerState.Release) { - + float TrainPipePressureDiffPSI = 0; if (lead.EngineType == TrainCar.EngineTypes.Diesel || lead.EngineType == TrainCar.EngineTypes.Electric || lead.EngineType == TrainCar.EngineTypes.Control) { diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/BrakeController.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/BrakeController.cs index 2738a55106..0cc8932653 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/BrakeController.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/BrakeController.cs @@ -15,13 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Orts.Parsers.Msts; -using Orts.Simulation.AIs; -using ORTS.Common; -using ORTS.Scripting.Api; using System; using System.Collections.Generic; using System.IO; +using Orts.Parsers.Msts; +using ORTS.Common; +using ORTS.Scripting.Api; namespace Orts.Simulation.RollingStocks.SubSystems.Controllers { @@ -254,7 +253,7 @@ public void Parse(string lowercasetoken, STFReader stf) break; case "engine(trainbrakescontrollermaxreleaserate": - case "engine(enginebrakescontrollermaxreleaserate": + case "engine(enginebrakescontrollermaxreleaserate": ReleaseRatePSIpS = stf.ReadFloatBlock(STFReader.UNITS.PressureRateDefaultPSIpS, null); break; @@ -441,7 +440,7 @@ public void StartIncrease(float? target) SignalEvent(BrakeControllerEvent.StartIncrease, target); } - public void StartDecrease(float? target , bool toZero = false) + public void StartDecrease(float? target, bool toZero = false) { if (toZero) SignalEvent(BrakeControllerEvent.StartDecreaseToZero, target); else SignalEvent(BrakeControllerEvent.StartDecrease, target); diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/ControllerFactory.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/ControllerFactory.cs index 37549545fa..738deaaf1d 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/ControllerFactory.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/ControllerFactory.cs @@ -20,8 +20,8 @@ namespace Orts.Simulation.RollingStocks.SubSystems.Controllers { public enum ControllerTypes - { - MSTSNotchController = 1, + { + MSTSNotchController = 1, BrakeController } @@ -35,13 +35,13 @@ public static void Save(IController controller, BinaryWriter outf) controller.Save(outf); } - public static void Restore(IController controller, BinaryReader inf) + public static void Restore(IController controller, BinaryReader inf) { if (!inf.ReadBoolean()) return; switch ((ControllerTypes)inf.ReadInt32()) - { + { case ControllerTypes.MSTSNotchController: if (controller == null) controller = new MSTSNotchController(); diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/IController.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/IController.cs index 1b768cb20f..5893e908de 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/IController.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/IController.cs @@ -15,8 +15,8 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Orts.Parsers.Msts; using System.IO; +using Orts.Parsers.Msts; namespace Orts.Simulation.RollingStocks.SubSystems.Controllers { diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/MSTSBrakeController.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/MSTSBrakeController.cs index 28b1228ab6..a9b2f150e2 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/MSTSBrakeController.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/MSTSBrakeController.cs @@ -27,7 +27,7 @@ namespace Orts.Simulation.RollingStocks.SubSystems.Controllers * has specific methods to update brake status. * */ - public class MSTSBrakeController: BrakeController + public class MSTSBrakeController : BrakeController { public MSTSNotchController NotchController; @@ -164,7 +164,7 @@ public override void UpdatePressure(ref float pressureBar, float elapsedClockSec case ControllerState.FullServ: epState = x; EnforceMinimalReduction = true; - DecreasePressure(ref pressureBar, MaxPressureBar()-FullServReductionBar(), ApplyRateBarpS(), elapsedClockSeconds); + DecreasePressure(ref pressureBar, MaxPressureBar() - FullServReductionBar(), ApplyRateBarpS(), elapsedClockSeconds); break; case ControllerState.Lap: // Lap position applies min service reduction when first selected, and previous contoller position was Running, then no change in pressure occurs @@ -250,7 +250,7 @@ public override void UpdateEngineBrakePressure(ref float pressureBar, float elap pressureBar = (MaxPressureBar() - FullServReductionBar()) * CurrentValue(); } else - { + { float x = NotchController.GetNotchFraction(); switch (notch.Type) { @@ -267,11 +267,11 @@ public override void UpdateEngineBrakePressure(ref float pressureBar, float elap break; case ControllerState.Apply: case ControllerState.FullServ: - IncreasePressure(ref pressureBar, MaxPressureBar() - FullServReductionBar(), x*ApplyRateBarpS(), elapsedClockSeconds); + IncreasePressure(ref pressureBar, MaxPressureBar() - FullServReductionBar(), x * ApplyRateBarpS(), elapsedClockSeconds); break; case ControllerState.ManualBraking: case ControllerState.VacContServ: - // Continuous service positions for vacuum brakes - allows brake to be adjusted up and down continuously between the ON and OFF position + // Continuous service positions for vacuum brakes - allows brake to be adjusted up and down continuously between the ON and OFF position pressureBar = (1 - x) * MaxPressureBar(); break; case ControllerState.BrakeNotch: diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/MSTSNotchController.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/MSTSNotchController.cs index 2186396fd0..3185210fa3 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/MSTSNotchController.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/MSTSNotchController.cs @@ -15,15 +15,16 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System.Collections.Generic; +using System.IO; using Microsoft.Xna.Framework; using Orts.Parsers.Msts; using ORTS.Scripting.Api; -using System.Collections.Generic; -using System.IO; namespace Orts.Simulation.RollingStocks.SubSystems.Controllers { - public class MSTSNotch { + public class MSTSNotch + { public float Value; public bool Smooth; public ControllerState Type; @@ -132,7 +133,7 @@ public void Save(BinaryWriter outf) * The user need to press the key multiple times to update this controller. * */ - public class MSTSNotchController: IController + public class MSTSNotchController : IController { public float CurrentValue { get; set; } public float IntermediateValue; @@ -243,7 +244,7 @@ public int NotchCount() private float GetNotchBoost(float boost) { - return (ToZero && ((CurrentNotch >= 0 && Notches[CurrentNotch].Smooth) || Notches.Count == 0 || + return (ToZero && ((CurrentNotch >= 0 && Notches[CurrentNotch].Smooth) || Notches.Count == 0 || IntermediateValue - CurrentValue > StepSize) ? FastBoost : boost); } @@ -273,7 +274,7 @@ public int SetValue(float value) if (CurrentNotch >= 0 && !Notches[CurrentNotch].Smooth) CurrentValue = Notches[CurrentNotch].Value; - var change = CurrentNotch > oldNotch || CurrentValue > OldValue + 0.1f || CurrentValue == 1 && OldValue < 1 + var change = CurrentNotch > oldNotch || CurrentValue > OldValue + 0.1f || CurrentValue == 1 && OldValue < 1 ? 1 : CurrentNotch < oldNotch || CurrentValue < OldValue - 0.1f || CurrentValue == 0 && OldValue > 0 ? -1 : 0; if (change != 0) OldValue = CurrentValue; @@ -295,7 +296,7 @@ public float SetPercent(float percent) MSTSNotch notch = Notches[CurrentNotch]; if (CurrentNotch > 0 && v < notch.Value) { - MSTSNotch prev = Notches[CurrentNotch-1]; + MSTSNotch prev = Notches[CurrentNotch - 1]; if (!notch.Smooth && !prev.Smooth && v - prev.Value > .45 * (notch.Value - prev.Value)) break; CurrentNotch--; @@ -325,7 +326,8 @@ public float SetPercent(float percent) return 100 * CurrentValue; } - public void StartIncrease( float? target ) { + public void StartIncrease(float? target) + { controllerTarget = target; ToZero = false; StartIncrease(); @@ -341,20 +343,20 @@ public void StartIncrease() ++CurrentNotch; IntermediateValue = CurrentValue = Notches[CurrentNotch].Value; } - } + } public void StopIncrease() { UpdateValue = 0; } - public void StartDecrease( float? target, bool toZero = false) + public void StartDecrease(float? target, bool toZero = false) { controllerTarget = target; ToZero = toZero; StartDecrease(); } - + public void StartDecrease() { UpdateValue = -1; @@ -398,12 +400,13 @@ public float UpdateAndSetBoost(float elapsedSeconds, float boost) /// /// If a target has been set, then stop once it's reached and also cancel the target. /// - public void CheckControllerTargetAchieved() { - if( controllerTarget != null ) + public void CheckControllerTargetAchieved() + { + if (controllerTarget != null) { - if( UpdateValue > 0.0 ) + if (UpdateValue > 0.0) { - if( CurrentValue >= controllerTarget ) + if (CurrentValue >= controllerTarget) { StopIncrease(); controllerTarget = null; @@ -411,7 +414,7 @@ public float UpdateAndSetBoost(float elapsedSeconds, float boost) } else { - if( CurrentValue <= controllerTarget ) + if (CurrentValue <= controllerTarget) { StopDecrease(); controllerTarget = null; @@ -442,7 +445,7 @@ private float UpdateValues(float elapsedSeconds, float direction, float boost) CurrentNotch++; } //decreasing, again check if the current notch has changed - else if((direction < 0) && (CurrentNotch > 0) && (IntermediateValue < Notches[CurrentNotch].Value)) + else if ((direction < 0) && (CurrentNotch > 0) && (IntermediateValue < Notches[CurrentNotch].Value)) { CurrentNotch--; } @@ -536,25 +539,25 @@ public virtual void Save(BinaryWriter outf) } protected virtual void SaveData(BinaryWriter outf) - { - outf.Write(CurrentValue); + { + outf.Write(CurrentValue); outf.Write(MinimumValue); outf.Write(MaximumValue); outf.Write(StepSize); - outf.Write(CurrentNotch); + outf.Write(CurrentNotch); outf.Write(Notches.Count); - - foreach(MSTSNotch notch in Notches) + + foreach (MSTSNotch notch in Notches) { - notch.Save(outf); - } + notch.Save(outf); + } } public virtual void Restore(BinaryReader inf) { Notches.Clear(); - IntermediateValue = CurrentValue = inf.ReadSingle(); + IntermediateValue = CurrentValue = inf.ReadSingle(); MinimumValue = inf.ReadSingle(); MaximumValue = inf.ReadSingle(); StepSize = inf.ReadSingle(); @@ -567,7 +570,7 @@ public virtual void Restore(BinaryReader inf) for (int i = 0; i < count; ++i) { Notches.Add(new MSTSNotch(inf)); - } + } } public MSTSNotch GetCurrentNotch() @@ -589,12 +592,12 @@ protected void SetCurrentNotch(ControllerState type) } } - public void SetStepSize ( float stepSize) + public void SetStepSize(float stepSize) { StepSize = stepSize; } - public void Normalize (float ratio) + public void Normalize(float ratio) { for (int i = 0; i < Notches.Count; i++) Notches[i].Value /= ratio; @@ -630,7 +633,7 @@ public int GetNotch(float value) { if (Notches[notch].Value <= value) { - break; + break; } } return notch; diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/MultiPositionController.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/MultiPositionController.cs index ca0a36f6f7..1c7d271a57 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/MultiPositionController.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/MultiPositionController.cs @@ -16,7 +16,6 @@ // along with Open Rails. If not, see . using System; -using System.Collections; using System.Collections.Generic; using System.IO; using Orts.Formats.Msts; @@ -73,7 +72,7 @@ public MultiPositionController(MultiPositionController other, MSTSLocomotive loc ControllerId = other.ControllerId; CanControlTrainBrake = other.CanControlTrainBrake; } - + public void Save(BinaryWriter outf) { @@ -103,7 +102,7 @@ public void Restore(BinaryReader inf) public void Parse(STFReader stf) { stf.MustMatch("("); - stf.ParseBlock(new [] { + stf.ParseBlock(new[] { new STFReader.TokenProcessor("positions", () => { stf.MustMatch("("); stf.ParseBlock(new [] { @@ -815,7 +814,7 @@ public Position(string positionType, string positionFlag, string name) Enum.TryParse(positionType, true, out Type); if (!Enum.TryParse(positionFlag, true, out Flag)) { - switch(positionFlag.ToLower()) + switch (positionFlag.ToLower()) { case "cruisecontrol.needincreaseafteranybrake": Flag = ControllerPositionFlag.CCNeedIncreaseAfterAnyBrake; diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/CruiseControl.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/CruiseControl.cs index b3007cab86..55b8d88ef7 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/CruiseControl.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/CruiseControl.cs @@ -71,13 +71,13 @@ public float SetSpeedMpS return selected; } } - public float SetSpeedKpHOrMpH + public float SetSpeedKpHOrMpH { get { return SpeedIsMph ? MpS.ToMpH(SetSpeedMpS) : MpS.ToKpH(SetSpeedMpS); } - } + } public int SelectedNumberOfAxles = 0; public float SpeedRegulatorNominalSpeedStepMpS = 0; public float SpeedRegulatorNominalSpeedStepKpHOrMpH = 0; @@ -88,7 +88,7 @@ public float SetSpeedKpHOrMpH public float AntiWheelSpinSpeedDiffThreshold = 0.5f; public float DynamicBrakeMaxForceAtSelectorStep = 0; float trainBrakePercent; - public float TrainBrakePercent { get { return trainBrakePercent; }} + public float TrainBrakePercent { get { return trainBrakePercent; } } protected float trainLength = 0; public int TrainLengthMeters = 0; public float CurrentSelectedSpeedMpS = 0; @@ -188,7 +188,7 @@ public CruiseControl(CruiseControl other, MSTSLocomotive locomotive) { Simulator = locomotive.Simulator; Locomotive = locomotive; - + RestrictedRegionOdometer = new OdoMeter(locomotive); SpeedIsMph = other.SpeedIsMph; @@ -365,23 +365,23 @@ public void Parse(STFReader stf) } break; case "controllercruisecontrollogic": - { - String speedControlLogic = stf.ReadStringBlock("none").ToLower(); - switch (speedControlLogic) { - case "full": - { - CruiseControlLogic = ControllerCruiseControlLogic.Full; - break; - } - case "speedonly": - { - CruiseControlLogic = ControllerCruiseControlLogic.SpeedOnly; - break; - } + String speedControlLogic = stf.ReadStringBlock("none").ToLower(); + switch (speedControlLogic) + { + case "full": + { + CruiseControlLogic = ControllerCruiseControlLogic.Full; + break; + } + case "speedonly": + { + CruiseControlLogic = ControllerCruiseControlLogic.SpeedOnly; + break; + } + } + break; } - break; - } case "(": stf.SkipRestOfBlock(); break; default: break; } @@ -399,10 +399,10 @@ public void Initialize() DynamicBrakeFullRangeIncreaseTimeSeconds = 4; if (DynamicBrakeFullRangeDecreaseTimeSeconds == 0) DynamicBrakeFullRangeDecreaseTimeSeconds = 6; - + ComputeNumberOfAxles(); if (StartReducingSpeedDeltaDownwards == 0) StartReducingSpeedDeltaDownwards = StartReducingSpeedDelta; - if (StartInAutoMode) SpeedRegMode = SpeedRegulatorMode.Auto; + if (StartInAutoMode) SpeedRegMode = SpeedRegulatorMode.Auto; } private void ComputeNumberOfAxles() @@ -677,7 +677,7 @@ public void SpeedRegulatorModeDecrease() if (SelectedMaxAccelerationPercent > 0) Locomotive.DynamicBrakeController.SetPercent(-1); } if (!ModeSwitchAllowedWithThrottleNotAtZero) - Locomotive.ThrottleController.SetPercent(0); + Locomotive.ThrottleController.SetPercent(0); if (SpeedRegulatorOptions.Contains("regulatormanual")) test = true; if (ZeroSelectedSpeedWhenPassingToThrottleMode || UseThrottleAsSpeedSelector) SelectedSpeedMpS = 0; if (UseThrottleAsForceSelector) SelectedMaxAccelerationPercent = 0; @@ -793,7 +793,7 @@ protected void SpeedRegulatorMaxForceIncrease(float elapsedClockSeconds) return; speedRegulatorIntermediateValue += StepSize * elapsedClockSeconds; selectedMaxAccelerationPercent = Math.Min((float)Math.Truncate(speedRegulatorIntermediateValue + 1), 100); - if (UseThrottleAsForceSelector && ModeSwitchAllowedWithThrottleNotAtZero && + if (UseThrottleAsForceSelector && ModeSwitchAllowedWithThrottleNotAtZero && (Locomotive.CombinedControlType == MSTSLocomotive.CombinedControl.ThrottleDynamic && !Locomotive.DynamicBrake)) Locomotive.ThrottleController.SetPercent(selectedMaxAccelerationPercent); } @@ -919,7 +919,7 @@ public void SpeedRegulatorMaxForceChangeByMouse(float movExtension, float maxVal public bool selectedSpeedIncreasing = false; public void SpeedRegulatorSelectedSpeedStartIncrease() { - var mpc = Locomotive.MultiPositionControllers.Where(x => + var mpc = Locomotive.MultiPositionControllers.Where(x => x.controllerBinding == ControllerBinding.SelectedSpeed && !x.StateChanged).FirstOrDefault(); if (mpc != null) { @@ -947,7 +947,7 @@ public void SpeedRegulatorSelectedSpeedStartIncrease() { SpeedRegMode = SpeedRegulatorMode.Auto; } - if (UseThrottleAsSpeedSelector || HasProportionalSpeedSelector || (UseThrottleAsForceSelector && mpc == null )) + if (UseThrottleAsSpeedSelector || HasProportionalSpeedSelector || (UseThrottleAsForceSelector && mpc == null)) { selectedSpeedIncreasing = true; if (SelectedSpeedMpS == 0) @@ -1069,7 +1069,7 @@ public void SpeedRegulatorSelectedSpeedChangeByMouse(float movExtension, bool me else if (movExtension < 0) return; } - var deltaSpeed = SpeedSelectorIsDiscrete ? + var deltaSpeed = SpeedSelectorIsDiscrete ? MpS.ToMpS((float)Math.Round(movExtension * maxValue / SpeedRegulatorNominalSpeedStepKpHOrMpH) * SpeedRegulatorNominalSpeedStepKpHOrMpH, metric) : MpS.ToMpS((float)Math.Round(movExtension * maxValue), true); if (deltaSpeed > 0) @@ -1246,13 +1246,13 @@ public void CalculateRequiredForce(float elapsedClockSeconds, float AbsWheelSpee AccelerationDemandMpSS = -(float)Math.Sqrt(val); if (RelativeAccelerationMpSS > AccelerationDemandMpSS) { - float maxStep = (RelativeAccelerationMpSS - AccelerationDemandMpSS) * 2; - DecreaseForce(ref CCThrottleOrDynBrakePercent, elapsedClockSeconds, Math.Max(CCThrottleOrDynBrakePercent-maxStep, -100)); + float maxStep = (RelativeAccelerationMpSS - AccelerationDemandMpSS) * 2; + DecreaseForce(ref CCThrottleOrDynBrakePercent, elapsedClockSeconds, Math.Max(CCThrottleOrDynBrakePercent - maxStep, -100)); } else if (RelativeAccelerationMpSS + 0.01f < AccelerationDemandMpSS) { float maxStep = (AccelerationDemandMpSS - RelativeAccelerationMpSS) * 2; - IncreaseForce(ref CCThrottleOrDynBrakePercent, elapsedClockSeconds, Math.Min(CCThrottleOrDynBrakePercent+maxStep, 0)); + IncreaseForce(ref CCThrottleOrDynBrakePercent, elapsedClockSeconds, Math.Min(CCThrottleOrDynBrakePercent + maxStep, 0)); } if (DynamicBrakeIsSelectedForceDependant) { @@ -1392,7 +1392,7 @@ void SetTrainBrake(ref float brakePercent, float elapsedClockSeconds, float delt if (!dynamicBrakeAvailable || deltaSpeedMpS < -SpeedDeltaToEnableTrainBrake) { CCIsUsingTrainBrake = true; - brakePercent = TrainBrakeMinPercentValue - 3.0f + (-deltaSpeedMpS * 10)/SpeedDeltaToEnableTrainBrake; + brakePercent = TrainBrakeMinPercentValue - 3.0f + (-deltaSpeedMpS * 10) / SpeedDeltaToEnableTrainBrake; } else { @@ -1403,9 +1403,9 @@ void SetTrainBrake(ref float brakePercent, float elapsedClockSeconds, float delt { CCIsUsingTrainBrake = true; if (RelativeAccelerationMpSS > -MaxDecelerationMpSS + 0.01f) - brakePercent += 100/TrainBrakeFullRangeIncreaseTimeSeconds*elapsedClockSeconds; + brakePercent += 100 / TrainBrakeFullRangeIncreaseTimeSeconds * elapsedClockSeconds; else if (RelativeAccelerationMpSS < -MaxDecelerationMpSS - 0.01f) - brakePercent -= 100/TrainBrakeFullRangeDecreaseTimeSeconds*elapsedClockSeconds; + brakePercent -= 100 / TrainBrakeFullRangeDecreaseTimeSeconds * elapsedClockSeconds; brakePercent = MathHelper.Clamp(brakePercent, TrainBrakeMinPercentValue - 3.0f, TrainBrakeMaxPercentValue); } } @@ -1521,7 +1521,7 @@ public float GetDataOf(CabViewControl cvc) data = Speed0Pressed ? 1 : 0; break; } - case CABViewControlTypes.ORTS_CC_SPEED_DELTA: + case CABViewControlTypes.ORTS_CC_SPEED_DELTA: { data = SpeedDeltaPressed ? 1 : 0; break; diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Door.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Door.cs index 97c0ea072c..916b43dec1 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Door.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Door.cs @@ -50,20 +50,20 @@ public virtual void Parse(string lowercasetoken, STFReader stf) { switch (lowercasetoken) { - case "wagon(ortsdoors(closingdelay": - { - float delayS = stf.ReadFloatBlock(STFReader.UNITS.Time, 0f); - LeftDoor.ClosingDelayS = delayS; - RightDoor.ClosingDelayS = delayS; - break; - } - case "wagon(ortsdoors(openingdelay": - { - float delayS = stf.ReadFloatBlock(STFReader.UNITS.Time, 0f); - LeftDoor.OpeningDelayS = delayS; - RightDoor.OpeningDelayS = delayS; - break; - } + case "wagon(ortsdoors(closingdelay": + { + float delayS = stf.ReadFloatBlock(STFReader.UNITS.Time, 0f); + LeftDoor.ClosingDelayS = delayS; + RightDoor.ClosingDelayS = delayS; + break; + } + case "wagon(ortsdoors(openingdelay": + { + float delayS = stf.ReadFloatBlock(STFReader.UNITS.Time, 0f); + LeftDoor.OpeningDelayS = delayS; + RightDoor.OpeningDelayS = delayS; + break; + } } } @@ -106,7 +106,7 @@ public virtual void Update(float elapsedClockSeconds) public static DoorSide FlippedDoorSide(DoorSide trainSide) { - switch(trainSide) + switch (trainSide) { case DoorSide.Left: return DoorSide.Right; @@ -119,7 +119,7 @@ public static DoorSide FlippedDoorSide(DoorSide trainSide) } public class Door : ISubSystem { - + // Parameters public float OpeningDelayS { get; set; } = 0f; public float ClosingDelayS { get; set; } = 0f; @@ -130,9 +130,9 @@ public class Door : ISubSystem public readonly DoorSide Side; protected Timer OpeningTimer; protected Timer ClosingTimer; - + public DoorState State { get; protected set; } = DoorState.Closed; - public bool Locked {get; protected set; } + public bool Locked { get; protected set; } public Door(MSTSWagon wagon, DoorSide side) { @@ -180,7 +180,7 @@ public virtual void Restore(BinaryReader inf) public virtual void Update(float elapsedClockSeconds) { - switch(State) + switch (State) { case DoorState.Opening: if (!OpeningTimer.Started) OpeningTimer.Start(); diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/EOT.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/EOT.cs index 74deb01d05..d0e70997a4 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/EOT.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/EOT.cs @@ -16,25 +16,14 @@ // along with Open Rails. If not, see . -using Microsoft.Xna.Framework; -using Orts.Formats.Msts; -using Orts.Parsers.Msts; -using Orts.Simulation.AIs; -using Orts.Simulation.Physics; -using Orts.Simulation.RollingStocks; -using Orts.Simulation.RollingStocks.SubSystems; -using Orts.Simulation.RollingStocks.SubSystems.PowerSupplies; -using Orts.Simulation.Signalling; -using Orts.Simulation.Timetables; -using ORTS.Common; -using ORTS.Scripting.Api; -using ORTS.Settings; using System; using System.Collections.Generic; -using System.Diagnostics; using System.IO; using System.Linq; -using Event = Orts.Common.Event; +using Orts.Formats.Msts; +using Orts.Parsers.Msts; +using Orts.Simulation.Physics; +using ORTS.Scripting.Api; namespace Orts.Simulation.RollingStocks.SubSystems { @@ -47,7 +36,7 @@ public enum EOTLevel public class FullEOTPaths : List { - public FullEOTPaths (string eotPath) + public FullEOTPaths(string eotPath) { var directories = Directory.GetDirectories(eotPath); foreach (var directory in directories) @@ -268,7 +257,7 @@ public void ArmTwoWay() EOTState = EOTstate.ArmedTwoWay; } - public void EmergencyBrake (bool toState) + public void EmergencyBrake(bool toState) { if (EOTState == EOTstate.ArmedTwoWay) { diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/FreightAnimations.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/FreightAnimations.cs index 1da8bb1d97..5bd5522592 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/FreightAnimations.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/FreightAnimations.cs @@ -15,16 +15,16 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Orts.Formats.Msts; -using Orts.Parsers.Msts; -using Orts.Simulation.RollingStocks.SubSystems.Controllers; -using ORTS.Common; -using Microsoft.Xna.Framework; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; +using Microsoft.Xna.Framework; +using Orts.Formats.Msts; +using Orts.Parsers.Msts; +using Orts.Simulation.RollingStocks.SubSystems.Controllers; +using ORTS.Common; namespace Orts.Simulation.RollingStocks.SubSystems { @@ -87,7 +87,7 @@ public FreightAnimations(STFReader stf, MSTSWagon wagon) new STFReader.TokenProcessor("isgondola", ()=>{ IsGondola = stf.ReadBoolBlock(false);}), new STFReader.TokenProcessor("loadingarealength", ()=>{ LoadingAreaLength = stf.ReadFloatBlock(STFReader.UNITS.Distance, 12.19f); }), new STFReader.TokenProcessor("aboveloadingarealength", ()=>{ AboveLoadingAreaLength = stf.ReadFloatBlock(STFReader.UNITS.Distance, 12.19f); }), - new STFReader.TokenProcessor("intakepoint", ()=> + new STFReader.TokenProcessor("intakepoint", ()=> { GeneralIntakePoint = new IntakePoint(stf); }), @@ -291,7 +291,7 @@ public FreightAnimations(FreightAnimations copyFACollection, MSTSWagon wagon) StaticFreightAnimationsPresent = copyFACollection.StaticFreightAnimationsPresent; DiscreteFreightAnimationsPresent = copyFACollection.DiscreteFreightAnimationsPresent; -// Load(Wagon, LoadDataList); + // Load(Wagon, LoadDataList); } public void Load(string loadFilePath, LoadPosition loadPosition, LoadState loadState) @@ -306,7 +306,7 @@ public void Load(string loadFilePath, LoadPosition loadPosition, LoadState loadS } else { - container.LoadFromContainerFile(loadFilePath, Wagon.Simulator.BasePath +@"\trains\trainset\"); + container.LoadFromContainerFile(loadFilePath, Wagon.Simulator.BasePath + @"\trains\trainset\"); ContainerManager.LoadedContainers.Add(loadFilePath, container); } container.ComputeLoadWeight(loadState); @@ -454,7 +454,7 @@ public bool Validity(MSTSWagon wagon, Container container, LoadPosition loadPosi if (Animations.Count == 0 && loadPosition != LoadPosition.Above) return true; freightAnimDiscreteCount = 0; foreach (var animation in Animations) - if (animation is FreightAnimationDiscrete) + if (animation is FreightAnimationDiscrete) freightAnimDiscreteCount++; if (freightAnimDiscreteCount == 0 && loadPosition != LoadPosition.Above) return true; // there are already other containers present; check that there aren't superpositions @@ -597,7 +597,7 @@ public void UpdateEmptyFreightAnims(float containerLengthM) continue; } else - { + { var multiplier = 1; if (anim.LoadPosition == LoadPosition.Front) multiplier = -1; emptyAnim.Offset.Z = Offset.Z + multiplier * (LoadingAreaLength / 2 - anim.LoadingAreaLength) / 2; @@ -821,7 +821,7 @@ public bool CheckForMerge(int i) case LoadPosition.CenterFront: switch (EmptyAnimations[other].LoadPosition) { - case LoadPosition.CenterRear: + case LoadPosition.CenterRear: if (Math.Abs(EmptyAnimations[i].LoadingAreaLength - EmptyAnimations[other].LoadingAreaLength) < 0.02) { EmptyAnimations[i].LoadingAreaLength += EmptyAnimations[other].LoadingAreaLength; @@ -1037,7 +1037,7 @@ public FreightAnimationContinuous(FreightAnimationContinuous freightAnimContin, FullORTSDavisDragConstant = freightAnimContin.FullORTSDavisDragConstant; FullMaxBrakeForceN = freightAnimContin.FullMaxBrakeForceN; FullMaxHandbrakeForceN = freightAnimContin.FullMaxHandbrakeForceN; - FullCentreOfGravityM_Y = freightAnimContin.FullCentreOfGravityM_Y; + FullCentreOfGravityM_Y = freightAnimContin.FullCentreOfGravityM_Y; } } @@ -1081,11 +1081,11 @@ public FreightAnimationStatic(STFReader stf) { var typeString = stf.ReadStringBlock(null); switch (typeString) - { + { default: SubType = FreightAnimationStatic.Type.DEFAULT; break; - } + } }), new STFReader.TokenProcessor("shape", ()=>{ ShapeFileName = stf.ReadStringBlock(null); }), new STFReader.TokenProcessor("freightweight", ()=>{ FreightWeight = stf.ReadFloatBlock(STFReader.UNITS.Mass, 0); }), @@ -1174,7 +1174,7 @@ public enum Type public float AboveLoadingAreaLength = -1f; public LoadPosition LoadPosition = LoadPosition.Center; - // for copy + // for copy public FreightAnimationDiscrete(FreightAnimationDiscrete freightAnimDiscrete, FreightAnimations freightAnimations) { FreightAnimations = freightAnimations; diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/ISubSystem.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/ISubSystem.cs index c187186ab0..f84c79b2d1 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/ISubSystem.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/ISubSystem.cs @@ -15,8 +15,8 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Orts.Parsers.Msts; using System.IO; +using Orts.Parsers.Msts; namespace Orts.Simulation.RollingStocks.SubSystems { diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/BatterySwitch.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/BatterySwitch.cs index fc5c56f3c3..6c99dde613 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/BatterySwitch.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/BatterySwitch.cs @@ -15,11 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System.IO; using Orts.Common; using Orts.Parsers.Msts; using ORTS.Scripting.Api; -using System; -using System.IO; namespace Orts.Simulation.RollingStocks.SubSystems.PowerSupplies { diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/CircuitBreaker.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/CircuitBreaker.cs index ea9f674f71..cc513f0504 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/CircuitBreaker.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/CircuitBreaker.cs @@ -109,7 +109,7 @@ public void Initialize() { if (ScriptName != null) { - switch(ScriptName) + switch (ScriptName) { case "Automatic": Script = new AutomaticCircuitBreaker() as CircuitBreaker; diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/ControlCarPowerSupply.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/ControlCarPowerSupply.cs index da226ab81d..b24b9d3f67 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/ControlCarPowerSupply.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/ControlCarPowerSupply.cs @@ -15,10 +15,7 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Orts.Common; -using Orts.Parsers.Msts; using ORTS.Scripting.Api; -using System.IO; namespace Orts.Simulation.RollingStocks.SubSystems.PowerSupplies { @@ -32,13 +29,13 @@ public class ScriptedControlCarPowerSupply : ScriptedLocomotivePowerSupply, ISub public bool Activated = false; private ControlCarPowerSupply Script => AbstractScript as ControlCarPowerSupply; -// public ScriptedTractionCutOffRelay TractionCutOffRelay { get; protected set; } + // public ScriptedTractionCutOffRelay TractionCutOffRelay { get; protected set; } public ScriptedControlCarPowerSupply(MSTSControlTrailerCar controlcar) : base(controlcar) { - // ControlTrailer = controlcar; - // TractionCutOffRelay = new ScriptedTractionCutOffRelay(this); + // ControlTrailer = controlcar; + // TractionCutOffRelay = new ScriptedTractionCutOffRelay(this); } diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs index 9606e7855d..fac70dfdaa 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs @@ -15,17 +15,17 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Microsoft.Xna.Framework; -using Orts.Parsers.Msts; -using Orts.Simulation.RollingStocks.SubSystems.PowerTransmissions; -using ORTS.Common; -using ORTS.Scripting.Api; using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Text; +using Microsoft.Xna.Framework; +using Orts.Parsers.Msts; +using Orts.Simulation.RollingStocks.SubSystems.PowerTransmissions; +using ORTS.Common; +using ORTS.Scripting.Api; namespace Orts.Simulation.RollingStocks.SubSystems.PowerSupplies { @@ -199,7 +199,7 @@ public void Restore(BinaryReader inf) DEList[i].InitFromMSTS(); DEList[i].Initialize(); } - + } foreach (DieselEngine de in DEList) de.Restore(inf); @@ -270,7 +270,7 @@ public float MaxOutputPowerW } } - /// + /// /// Maximum rail output power for all diesl prime movers /// public float MaximumRailOutputPowerW @@ -346,7 +346,7 @@ public float TractiveForceN if (Locomotive.DieselTransmissionType == MSTSDieselLocomotive.DieselTransmissionTypes.Mechanic) { temp += (de.GearBox.TractiveForceN); - + } else { @@ -486,7 +486,7 @@ public int NumOfActiveEngines get { int num = 0; - foreach(DieselEngine eng in DEList) + foreach (DieselEngine eng in DEList) { if (eng.State == DieselEngineState.Running) num++; @@ -578,31 +578,31 @@ public enum Cooling public enum SettingsFlags { - IdleRPM = 0x0001, - MaxRPM = 0x0002, - StartingRPM = 0x0004, - StartingConfirmRPM = 0x0008, - ChangeUpRPMpS = 0x0010, - ChangeDownRPMpS = 0x0020, + IdleRPM = 0x0001, + MaxRPM = 0x0002, + StartingRPM = 0x0004, + StartingConfirmRPM = 0x0008, + ChangeUpRPMpS = 0x0010, + ChangeDownRPMpS = 0x0020, RateOfChangeUpRPMpSS = 0x0040, RateOfChangeDownRPMpSS = 0x0080, - MaximalDieselPowerW = 0x0100, - IdleExhaust = 0x0200, - MaxExhaust = 0x0400, - ExhaustDynamics = 0x0800, - ExhaustColor = 0x1000, + MaximalDieselPowerW = 0x0100, + IdleExhaust = 0x0200, + MaxExhaust = 0x0400, + ExhaustDynamics = 0x0800, + ExhaustColor = 0x1000, ExhaustTransientColor = 0x2000, - DieselPowerTab = 0x4000, + DieselPowerTab = 0x4000, DieselConsumptionTab = 0x8000, - ThrottleRPMTab = 0x10000, - DieselTorqueTab = 0x20000, - MinOilPressure = 0x40000, - MaxOilPressure = 0x80000, - MaxTemperature = 0x100000, - Cooling = 0x200000, - TempTimeConstant = 0x400000, - OptTemperature = 0x800000, - IdleTemperature = 0x1000000 + ThrottleRPMTab = 0x10000, + DieselTorqueTab = 0x20000, + MinOilPressure = 0x40000, + MaxOilPressure = 0x80000, + MaxTemperature = 0x100000, + Cooling = 0x200000, + TempTimeConstant = 0x400000, + OptTemperature = 0x800000, + IdleTemperature = 0x1000000 } public int Id @@ -701,7 +701,7 @@ public bool IsInitialized /// /// The RPM controller tries to reach this value /// - public float DemandedRPM; + public float DemandedRPM; float demandedThrottlePercent; float throttleAcclerationFactor = 1.0f; @@ -718,7 +718,7 @@ public bool IsInitialized /// public float MaxRPM; - /// + /// /// Govenor RPM - maximum speed that engine is held to /// public float GovernorRPM; @@ -751,7 +751,7 @@ public bool IsInitialized /// Current power available to the traction motors /// public float CurrentDieselOutputPowerW; - /// + /// /// Maximum power available to the rail /// public float MaximumRailOutputPowerW; @@ -780,7 +780,7 @@ public bool IsInitialized /// public Interpolator DieselPowerTab; - /// + /// /// Rail power table - Max rail output power vs. RPM /// public Interpolator RailPowerTab; @@ -805,7 +805,7 @@ public bool IsInitialized /// Engine output torque table - Torque vs. RPM /// public Interpolator DieselTorqueTab; - /// + /// /// Current exhaust number of particles /// public float ExhaustParticles = 10.0f; @@ -828,10 +828,10 @@ public bool IsInitialized public Color ExhaustCompressorBlownColor = Color.Gray; - public float InitialMagnitude = 1.5f; + public float InitialMagnitude = 1.5f; public float MaxMagnitude = 1.5f; public float MagnitudeRange; - public float ExhaustMagnitude = 1.5f; + public float ExhaustMagnitude = 1.5f; public float InitialExhaust = 0.7f; public float MaxExhaust = 2.8f; @@ -849,7 +849,7 @@ public float DieselOilPressurePSI { get { - float k = (DieselMaxOilPressurePSI - DieselMinOilPressurePSI)/(MaxRPM - IdleRPM); + float k = (DieselMaxOilPressurePSI - DieselMinOilPressurePSI) / (MaxRPM - IdleRPM); float q = DieselMaxOilPressurePSI - k * MaxRPM; float res = k * RawRpM + q - dieseloilfailurePSI; if (res < 0f) @@ -963,23 +963,23 @@ public virtual void Parse(STFReader stf) switch (lowercasetoken) { case "idlerpm": IdleRPM = stf.ReadFloatBlock(STFReader.UNITS.None, 0); initLevel |= SettingsFlags.IdleRPM; break; - case "maxrpm": MaxRPM = stf.ReadFloatBlock(STFReader.UNITS.None, 0);initLevel |= SettingsFlags.MaxRPM; break; + case "maxrpm": MaxRPM = stf.ReadFloatBlock(STFReader.UNITS.None, 0); initLevel |= SettingsFlags.MaxRPM; break; case "governorrpm": GovernorRPM = stf.ReadFloatBlock(STFReader.UNITS.None, 0); break; case "startingrpm": StartingRPM = stf.ReadFloatBlock(STFReader.UNITS.None, 0); initLevel |= SettingsFlags.StartingRPM; break; case "startingconfirmrpm": StartingConfirmationRPM = stf.ReadFloatBlock(STFReader.UNITS.None, 0); initLevel |= SettingsFlags.StartingConfirmRPM; break; case "changeuprpmps": ChangeUpRPMpS = stf.ReadFloatBlock(STFReader.UNITS.None, 0); initLevel |= SettingsFlags.ChangeUpRPMpS; break; case "changedownrpmps": ChangeDownRPMpS = stf.ReadFloatBlock(STFReader.UNITS.None, 0); initLevel |= SettingsFlags.ChangeDownRPMpS; break; - case "rateofchangeuprpmpss": RateOfChangeUpRPMpSS = stf.ReadFloatBlock(STFReader.UNITS.None, 0);initLevel |= SettingsFlags.RateOfChangeUpRPMpSS; break; - case "rateofchangedownrpmpss": RateOfChangeDownRPMpSS = stf.ReadFloatBlock(STFReader.UNITS.None, 0);initLevel |= SettingsFlags.RateOfChangeDownRPMpSS; break; - case "maximalpower": MaximumDieselPowerW = stf.ReadFloatBlock(STFReader.UNITS.Power, 0);initLevel |= SettingsFlags.MaximalDieselPowerW; break; - case "idleexhaust": InitialExhaust = stf.ReadFloatBlock(STFReader.UNITS.None, 0); initLevel |= SettingsFlags.IdleExhaust; break; - case "maxexhaust": MaxExhaust = stf.ReadFloatBlock(STFReader.UNITS.None, 0);initLevel |= SettingsFlags.MaxExhaust; break; + case "rateofchangeuprpmpss": RateOfChangeUpRPMpSS = stf.ReadFloatBlock(STFReader.UNITS.None, 0); initLevel |= SettingsFlags.RateOfChangeUpRPMpSS; break; + case "rateofchangedownrpmpss": RateOfChangeDownRPMpSS = stf.ReadFloatBlock(STFReader.UNITS.None, 0); initLevel |= SettingsFlags.RateOfChangeDownRPMpSS; break; + case "maximalpower": MaximumDieselPowerW = stf.ReadFloatBlock(STFReader.UNITS.Power, 0); initLevel |= SettingsFlags.MaximalDieselPowerW; break; + case "idleexhaust": InitialExhaust = stf.ReadFloatBlock(STFReader.UNITS.None, 0); initLevel |= SettingsFlags.IdleExhaust; break; + case "maxexhaust": MaxExhaust = stf.ReadFloatBlock(STFReader.UNITS.None, 0); initLevel |= SettingsFlags.MaxExhaust; break; case "exhaustdynamics": ExhaustAccelIncrease = stf.ReadFloatBlock(STFReader.UNITS.None, 0); initLevel |= SettingsFlags.ExhaustDynamics; break; case "exhaustdynamicsdown": ExhaustDecelReduction = stf.ReadFloatBlock(STFReader.UNITS.None, null); initLevel |= SettingsFlags.ExhaustDynamics; break; - case "exhaustcolor": ExhaustSteadyColor = stf.ReadColorBlock(Color.Gray); initLevel |= SettingsFlags.ExhaustColor; break; - case "exhausttransientcolor": ExhaustTransientColor = stf.ReadColorBlock(Color.Black);initLevel |= SettingsFlags.ExhaustTransientColor; break; + case "exhaustcolor": ExhaustSteadyColor = stf.ReadColorBlock(Color.Gray); initLevel |= SettingsFlags.ExhaustColor; break; + case "exhausttransientcolor": ExhaustTransientColor = stf.ReadColorBlock(Color.Black); initLevel |= SettingsFlags.ExhaustTransientColor; break; case "dieselpowertab": DieselPowerTab = new Interpolator(stf); initLevel |= SettingsFlags.DieselPowerTab; break; - case "dieselconsumptiontab": DieselConsumptionTab = new Interpolator(stf);initLevel |= SettingsFlags.DieselConsumptionTab; break; + case "dieselconsumptiontab": DieselConsumptionTab = new Interpolator(stf); initLevel |= SettingsFlags.DieselConsumptionTab; break; case "throttlerpmtab": ThrottleRPMTab = new Interpolator(stf); initLevel |= SettingsFlags.ThrottleRPMTab; @@ -997,7 +997,7 @@ public virtual void Parse(STFReader stf) case "minoilpressure": DieselMinOilPressurePSI = stf.ReadFloatBlock(STFReader.UNITS.PressureDefaultPSI, 0); initLevel |= SettingsFlags.MinOilPressure; break; case "maxoilpressure": DieselMaxOilPressurePSI = stf.ReadFloatBlock(STFReader.UNITS.PressureDefaultPSI, 0); initLevel |= SettingsFlags.MaxOilPressure; break; case "maxtemperature": DieselMaxTemperatureDeg = stf.ReadFloatBlock(STFReader.UNITS.Temperature, 0); initLevel |= SettingsFlags.MaxTemperature; break; - case "cooling": EngineCooling = (Cooling)stf.ReadIntBlock((int)Cooling.Proportional); initLevel |= SettingsFlags.Cooling; break ; //ReadInt changed to ReadIntBlock + case "cooling": EngineCooling = (Cooling)stf.ReadIntBlock((int)Cooling.Proportional); initLevel |= SettingsFlags.Cooling; break; //ReadInt changed to ReadIntBlock case "temptimeconstant": DieselTempTimeConstantSec = stf.ReadFloatBlock(STFReader.UNITS.Time, 0); initLevel |= SettingsFlags.TempTimeConstant; break; case "opttemperature": DieselOptimalTemperatureDegC = stf.ReadFloatBlock(STFReader.UNITS.Temperature, 95f); initLevel |= SettingsFlags.OptTemperature; break; case "idletemperature": DieselIdleTemperatureDegC = stf.ReadFloatBlock(STFReader.UNITS.Temperature, 75f); initLevel |= SettingsFlags.IdleTemperature; break; @@ -1099,7 +1099,7 @@ public void Update(float elapsedClockSeconds) if ((State == DieselEngineState.Running) && (Locomotive.ThrottlePercent > 0)) { var abstempMotiveForce = Math.Abs(Locomotive.PrevMotiveForceN); - OutputPowerW = ( abstempMotiveForce > 0 ? abstempMotiveForce * Locomotive.AbsSpeedMpS : 0) / Locomotive.DieselEngines.NumOfActiveEngines; + OutputPowerW = (abstempMotiveForce > 0 ? abstempMotiveForce * Locomotive.AbsSpeedMpS : 0) / Locomotive.DieselEngines.NumOfActiveEngines; } else { @@ -1519,7 +1519,7 @@ public void Update(float elapsedClockSeconds) } DieselTemperatureDeg += elapsedClockSeconds * (DieselMaxTemperatureDeg - DieselTemperatureDeg) / DieselTempTimeConstantSec; - switch(EngineCooling) + switch (EngineCooling) { case Cooling.NoCooling: DieselTemperatureDeg += elapsedClockSeconds * (LoadPercent * 0.01f * (95f - 60f) + 60f - DieselTemperatureDeg) / DieselTempTimeConstantSec; @@ -1530,12 +1530,12 @@ public void Update(float elapsedClockSeconds) DieselTempCoolingRunning = true; break; case Cooling.Hysteresis: - if(DieselTemperatureDeg > DieselMaxTemperatureDeg) + if (DieselTemperatureDeg > DieselMaxTemperatureDeg) DieselTempCoolingRunning = true; - if(DieselTemperatureDeg < (DieselMaxTemperatureDeg - DieselTempCoolingHyst)) + if (DieselTemperatureDeg < (DieselMaxTemperatureDeg - DieselTempCoolingHyst)) DieselTempCoolingRunning = false; - if(DieselTempCoolingRunning) + if (DieselTempCoolingRunning) DieselTemperatureDeg += elapsedClockSeconds * (DieselMaxTemperatureDeg - DieselTemperatureDeg) / DieselTempTimeConstantSec; else DieselTemperatureDeg -= elapsedClockSeconds * (DieselMaxTemperatureDeg - 2f * DieselTempCoolingHyst - DieselTemperatureDeg) / DieselTempTimeConstantSec; @@ -1546,7 +1546,7 @@ public void Update(float elapsedClockSeconds) cooling = cooling < 0f ? 0 : cooling; if (DieselTemperatureDeg >= (80f)) DieselTempCoolingRunning = true; - if(DieselTemperatureDeg < (80f - DieselTempCoolingHyst)) + if (DieselTemperatureDeg < (80f - DieselTempCoolingHyst)) DieselTempCoolingRunning = false; if (!DieselTempCoolingRunning) @@ -1557,7 +1557,7 @@ public void Update(float elapsedClockSeconds) DieselTemperatureDeg = DieselMaxTemperatureDeg - DieselTempCoolingHyst; break; } - if(DieselTemperatureDeg < 40f) + if (DieselTemperatureDeg < 40f) DieselTemperatureDeg = 40f; if (GearBox != null) @@ -1729,7 +1729,7 @@ public void InitFromMSTS() if (Locomotive.Simulator.Settings.VerboseConfigurationMessages) Trace.TraceInformation("IdleRpM not found in Diesel Engine Configuration (BASIC Config): set at arbitary value = {0}", IdleRPM); - } + } } if ((initLevel & SettingsFlags.MaxRPM) == 0) @@ -2158,10 +2158,10 @@ public void InitDieselRailPowers(MSTSDieselLocomotive loco) ReverseThrottleRPMTab = new Interpolator(rpm, throttle); // create reverse table } - // TODO - this value needs to be divided by the number of diesel engines in the locomotive + // TODO - this value needs to be divided by the number of diesel engines in the locomotive - // Set MaximumRailOutputPower if not already set - if (MaximumRailOutputPowerW == 0) + // Set MaximumRailOutputPower if not already set + if (MaximumRailOutputPowerW == 0) { if (loco.TractiveForceCurves != null) { diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselPowerSupply.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselPowerSupply.cs index e78fdbac51..09db4722bc 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselPowerSupply.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselPowerSupply.cs @@ -15,10 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System.IO; using Orts.Common; using Orts.Parsers.Msts; using ORTS.Scripting.Api; -using System.IO; namespace Orts.Simulation.RollingStocks.SubSystems.PowerSupplies { diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DualModePowerSupply.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DualModePowerSupply.cs index b1e22e27b5..9de7a5ea33 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DualModePowerSupply.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DualModePowerSupply.cs @@ -15,10 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System.IO; using Orts.Parsers.Msts; using ORTS.Common; using ORTS.Scripting.Api; -using System.IO; namespace Orts.Simulation.RollingStocks.SubSystems.PowerSupplies { @@ -165,7 +165,7 @@ public override void Initialize() { PantographFilter = new IIRFilter(IIRFilter.FilterTypes.Butterworth, 1, IIRFilter.HzToRad(0.7f), 0.001f); VoltageFilter = new IIRFilter(IIRFilter.FilterTypes.Butterworth, 1, IIRFilter.HzToRad(0.7f), 0.001f); - + PowerOnTimer = new Timer(this); PowerOnTimer.Setup(PowerOnDelayS()); diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/ElectricPowerSupply.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/ElectricPowerSupply.cs index b24cf5d3d7..f70086c05f 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/ElectricPowerSupply.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/ElectricPowerSupply.cs @@ -15,11 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System.IO; using Orts.Common; using Orts.Parsers.Msts; using ORTS.Common; using ORTS.Scripting.Api; -using System.IO; namespace Orts.Simulation.RollingStocks.SubSystems.PowerSupplies { @@ -165,7 +165,7 @@ public override void Initialize() { PantographFilter = new IIRFilter(IIRFilter.FilterTypes.Butterworth, 1, IIRFilter.HzToRad(0.7f), 0.001f); VoltageFilter = new IIRFilter(IIRFilter.FilterTypes.Butterworth, 1, IIRFilter.HzToRad(0.7f), 0.001f); - + PowerOnTimer = new Timer(this); PowerOnTimer.Setup(PowerOnDelayS()); diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/ElectricTrainSupplySwitch.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/ElectricTrainSupplySwitch.cs index 7703382e04..a0b6a69c0a 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/ElectricTrainSupplySwitch.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/ElectricTrainSupplySwitch.cs @@ -15,10 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System.IO; using Orts.Common; using Orts.Parsers.Msts; using ORTS.Scripting.Api; -using System.IO; namespace Orts.Simulation.RollingStocks.SubSystems.PowerSupplies { diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/MasterKey.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/MasterKey.cs index bca51013da..5e85bfbac8 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/MasterKey.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/MasterKey.cs @@ -15,12 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System.IO; +using System.Linq; using Orts.Common; using Orts.Parsers.Msts; using ORTS.Scripting.Api; -using System; -using System.IO; -using System.Linq; namespace Orts.Simulation.RollingStocks.SubSystems.PowerSupplies { @@ -32,7 +31,7 @@ public enum ModeType AlwaysOn, Manual } - + // Parameters public ModeType Mode { get; protected set; } = ModeType.AlwaysOn; public float DelayS { get; protected set; } = 0f; @@ -43,7 +42,8 @@ public enum ModeType protected Timer Timer; public bool CommandSwitch { get; protected set; } = false; public bool On { get; protected set; } = false; - public bool OtherCabInUse { + public bool OtherCabInUse + { get { foreach (MSTSLocomotive locomotive in Locomotive.Train.Cars.OfType()) diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/Pantograph.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/Pantograph.cs index e7b64aa38e..fd83648314 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/Pantograph.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/Pantograph.cs @@ -15,13 +15,13 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Orts.Parsers.Msts; -using ORTS.Scripting.Api; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; +using Orts.Parsers.Msts; +using ORTS.Scripting.Api; using Event = Orts.Common.Event; namespace Orts.Simulation.RollingStocks.SubSystems.PowerSupplies @@ -195,7 +195,8 @@ public class Pantograph : ISubSystem public PantographState State { get; private set; } public float DelayS { get; private set; } public float TimeS { get; private set; } - public bool CommandUp { + public bool CommandUp + { get { bool value; @@ -258,7 +259,7 @@ public void Copy(Pantograph pantograph) public void Restore(BinaryReader inf) { - State = (PantographState) Enum.Parse(typeof(PantographState), inf.ReadString()); + State = (PantographState)Enum.Parse(typeof(PantographState), inf.ReadString()); DelayS = inf.ReadSingle(); TimeS = inf.ReadSingle(); } diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/PassengerCarPowerSupply.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/PassengerCarPowerSupply.cs index 2dd491fcb5..e48b3f85de 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/PassengerCarPowerSupply.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/PassengerCarPowerSupply.cs @@ -343,7 +343,8 @@ protected virtual void AssignScriptFunctions() Script.SetCurrentVentilationState = (value) => VentilationState = value; Script.SetCurrentHeatingState = (value) => HeatingState = value; Script.SetCurrentAirConditioningState = (value) => AirConditioningState = value; - Script.SetCurrentElectricTrainSupplyPowerW = (value) => { + Script.SetCurrentElectricTrainSupplyPowerW = (value) => + { if (value >= 0f) { ElectricTrainSupplyPowerW = value; @@ -443,7 +444,7 @@ public override void Update(float elapsedClockSeconds) } float airConditioningElectricPowerW = CurrentAirConditioningState() == PowerSupplyState.PowerOn ? AirConditioningPowerW() : 0f; - float airConditioningThermalPowerW = CurrentAirConditioningState() == PowerSupplyState.PowerOn ? - AirConditioningPowerW() * AirConditioningYield() : 0f; + float airConditioningThermalPowerW = CurrentAirConditioningState() == PowerSupplyState.PowerOn ? -AirConditioningPowerW() * AirConditioningYield() : 0f; SetCurrentElectricTrainSupplyPowerW(ContinuousPowerW() + heatingPowerW + airConditioningElectricPowerW); SetCurrentHeatFlowRateW(heatingPowerW + airConditioningThermalPowerW); diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/TractionCutOffRelay.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/TractionCutOffRelay.cs index fb63e798f3..b19c60a3dd 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/TractionCutOffRelay.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/TractionCutOffRelay.cs @@ -93,7 +93,7 @@ public void Initialize() { if (ScriptName != null) { - switch(ScriptName) + switch (ScriptName) { case "Automatic": Script = new AutomaticTractionCutOffRelay() as TractionCutOffRelay; diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/Axle.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/Axle.cs index 6c62bd2bfb..b7f1959ea3 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/Axle.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/Axle.cs @@ -93,7 +93,7 @@ public ElectricMotor Motor { motor = value; DriveType = motor != null ? AxleDriveType.MotorDriven : AxleDriveType.ForceDriven; - switch(DriveType) + switch (DriveType) { case AxleDriveType.MotorDriven: totalInertiaKgm2 = inertiaKgm2 + transmissionRatio * transmissionRatio * motor.InertiaKgm2; @@ -155,7 +155,7 @@ public float InertiaKgm2 break; } } - get + get { return inertiaKgm2; } @@ -432,7 +432,7 @@ void Integrate(float elapsedClockSeconds) if (elapsedClockSeconds <= 0) return; float prevSpeedMpS = AxleSpeedMpS; - if (Math.Abs(integratorError) > Math.Max((Math.Abs(SlipSpeedMpS)-1)*0.01f, 0.001f)) + if (Math.Abs(integratorError) > Math.Max((Math.Abs(SlipSpeedMpS) - 1) * 0.01f, 0.001f)) { ++NumOfSubstepsPS; waitBeforeSpeedingUp = 100; @@ -446,13 +446,13 @@ void Integrate(float elapsedClockSeconds) } } - NumOfSubstepsPS = Math.Max(Math.Min(NumOfSubstepsPS, 50), 1); + NumOfSubstepsPS = Math.Max(Math.Min(NumOfSubstepsPS, 50), 1); float dt = elapsedClockSeconds / NumOfSubstepsPS; float hdt = dt / 2.0f; float axleInForceSumN = 0; float axleOutForceSumN = 0; - for (int i=0; i Math.Abs(driveForceN - k1.Item3)) { AxlePositionRad += AxleSpeedMpS * hdt; @@ -515,7 +515,7 @@ void StationaryCalculation(float elapsedClockSeconds) } float x = (float)((1 - Math.Sqrt(1 - forceRatio * forceRatio)) / forceRatio); AxleSpeedMpS = TrainSpeedMpS + MpS.FromKpH(AdhesionK * x / AdhesionLimit); - AxleForceN = (force + res.Item3)/2; + AxleForceN = (force + res.Item3) / 2; } /// diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/ElectricMotor.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/ElectricMotor.cs index f246c1d471..5afaaee465 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/ElectricMotor.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/ElectricMotor.cs @@ -16,7 +16,6 @@ // along with Open Rails. If not, see . using ORTS.Common; -using System; namespace Orts.Simulation.RollingStocks.SubSystems.PowerTransmissions { @@ -60,7 +59,7 @@ public virtual float GetDevelopedTorqueNm(float motorSpeedRadpS) public virtual void Update(float timeSpan) { - temperatureK = tempIntegrator.Integrate(timeSpan, (temperatureK) => 1.0f/(SpecificHeatCapacityJ_kg_C * WeightKg)*((powerLossesW - CoolingPowerW) / (ThermalCoeffJ_m2sC * SurfaceM) - temperatureK)); + temperatureK = tempIntegrator.Integrate(timeSpan, (temperatureK) => 1.0f / (SpecificHeatCapacityJ_kg_C * WeightKg) * ((powerLossesW - CoolingPowerW) / (ThermalCoeffJ_m2sC * SurfaceM) - temperatureK)); } public virtual void Reset() diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/GearBox.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/GearBox.cs index 98cbc68fbd..ea9c33ba91 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/GearBox.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/GearBox.cs @@ -15,17 +15,17 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; using Microsoft.Xna.Framework; using Orts.Common; using Orts.Parsers.Msts; using Orts.Simulation.RollingStocks.SubSystems.PowerSupplies; using ORTS.Common; using ORTS.Scripting.Api; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System; -using System.Linq; namespace Orts.Simulation.RollingStocks.SubSystems.PowerTransmissions { @@ -233,7 +233,7 @@ public class GearBox : ISubSystem public bool ManualGearUp = false; public bool ManualGearDown = false; public bool clutchLockOut = false; - + public int currentGearIndex = -1; public int nextGearIndex = -1; @@ -241,7 +241,7 @@ public Gear CurrentGear { get { - if ((currentGearIndex >= 0)&&(currentGearIndex < NumOfGears)) + if ((currentGearIndex >= 0) && (currentGearIndex < NumOfGears)) return Gears[currentGearIndex]; else return null; @@ -260,7 +260,7 @@ public int CurrentGearIndex } } -public Gear NextGear + public Gear NextGear { get { @@ -276,7 +276,7 @@ public Gear NextGear case GearBoxOperation.Manual: case GearBoxOperation.Semiautomatic: int temp = 0; - if(value == null) + if (value == null) nextGearIndex = -1; else { @@ -310,8 +310,8 @@ public bool AutoGearUp() { if (!gearedUp) { - if(++nextGearIndex >= Gears.Count) - nextGearIndex = (Gears.Count - 1); + if (++nextGearIndex >= Gears.Count) + nextGearIndex = (Gears.Count - 1); else gearedUp = true; } @@ -327,8 +327,8 @@ public bool AutoGearDown() { if (!gearedDown) { - if(--nextGearIndex <= 0) - nextGearIndex = 0; + if (--nextGearIndex <= 0) + nextGearIndex = 0; else gearedDown = true; } @@ -444,7 +444,7 @@ public int GearIndication { get { - if (ReverseGearBoxIndication ) + if (ReverseGearBoxIndication) { int tempgear = NumOfGears - CurrentGearIndex; tempgear = MathHelper.Clamp(tempgear, 0, NumOfGears); @@ -457,11 +457,11 @@ public int GearIndication } } - public float CurrentSpeedMpS + public float CurrentSpeedMpS { get { - if(DieselEngine.Locomotive.Direction == Direction.Reverse) + if (DieselEngine.Locomotive.Direction == Direction.Reverse) return -(DieselEngine.Locomotive.SpeedMpS); else return (DieselEngine.Locomotive.SpeedMpS); @@ -492,7 +492,7 @@ public float HuDShaftRPM /// /// ShaftRpM is the speed of the input shaft to the gearbox due to the speed of the wheel rotation /// - public float ShaftRPM + public float ShaftRPM { get { @@ -538,24 +538,27 @@ public bool IsOverspeedError if (CurrentGear == null) return false; else - return ((DieselEngine.RealRPM / DieselEngine.MaxRPM * 100f) > CurrentGear.OverspeedPercentage); - } + return ((DieselEngine.RealRPM / DieselEngine.MaxRPM * 100f) > CurrentGear.OverspeedPercentage); + } } - public bool IsOverspeedWarning + public bool IsOverspeedWarning { get { if (CurrentGear == null) return false; else - return ((DieselEngine.RealRPM / DieselEngine.MaxRPM * 100f) > 100f); + return ((DieselEngine.RealRPM / DieselEngine.MaxRPM * 100f) > 100f); } } float clutch; - public float ClutchPercent { set { clutch = (value > 100.0f ? 100f : (value < -100f ? -100f : value)) / 100f; } - get { return clutch * 100f; } } + public float ClutchPercent + { + set { clutch = (value > 100.0f ? 100f : (value < -100f ? -100f : value)) / 100f; } + get { return clutch * 100f; } + } public bool AutoClutch = true; @@ -564,7 +567,7 @@ public bool IsOverspeedWarning public TypesGearBox GearBoxType = TypesGearBox.Unknown; public GearBoxOperation GearBoxOperation = GearBoxOperation.Manual; public GearBoxOperation OriginalGearBoxOperation = GearBoxOperation.Manual; - + public float rpmRatio; public float torqueCurveMultiplier; public float throttleFraction; @@ -663,7 +666,7 @@ public float TractiveForceN { var tractiveEffortLimitN = (DieselEngine.DieselPowerTab[DieselEngine.RealRPM] * (DieselEngine.LoadPercent / 100f)) / CurrentSpeedMpS; - if (tractiveForceN > tractiveEffortLimitN ) + if (tractiveForceN > tractiveEffortLimitN) { tractiveForceN = tractiveEffortLimitN; } @@ -717,7 +720,7 @@ public float TractiveForceN return 0; } else - { + { if (ClutchPercent >= -20) { float tractiveForceN = DieselEngine.DieselTorqueTab[DieselEngine.RealRPM] * DieselEngine.DemandedThrottlePercent / DieselEngine.DieselTorqueTab.MaxY() * 0.01f * CurrentGear.MaxTractiveForceN; @@ -815,7 +818,7 @@ public void Initialize() // For purposes of calculating engine efficiency the tractive force at maximum gear speed needs to be used. Gears[i].TractiveForceatMaxSpeedN = GearBoxParams.GearBoxTractiveForceAtSpeedN[i] / Locomotive.DieselEngines.Count; - } + } Gears[i].OverspeedPercentage = GearBoxParams.GearBoxOverspeedPercentageForFailure; Gears[i].UpGearProportion = GearBoxParams.GearBoxUpGearProportion; @@ -858,7 +861,7 @@ public void InitializeMoving() if (Gears[iGear].MaxSpeedMpS < CurrentSpeedMpS) continue; else currentGearIndex = nextGearIndex = iGear; break; - } + } gearedUp = false; gearedDown = false; diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/SeriesMotor.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/SeriesMotor.cs index ed8aebff4d..72876e085d 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/SeriesMotor.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/SeriesMotor.cs @@ -21,7 +21,7 @@ namespace Orts.Simulation.RollingStocks.SubSystems.PowerTransmissions public class SeriesMotor : ElectricMotor { float armatureResistanceOhms; - public float ArmatureResistanceOhms + public float ArmatureResistanceOhms { set { @@ -163,7 +163,7 @@ public override void Update(float timeSpan) else { fieldCurrentA = 0.0f; - } + } UpdateField(); diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/TrainControlSystem.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/TrainControlSystem.cs index 1d6253c23d..a1acd06418 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/TrainControlSystem.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/TrainControlSystem.cs @@ -128,7 +128,8 @@ public MonitoringDevice(MonitoringDevice other) MonitoringDevice AWSMonitor; private bool simulatorEmergencyBraking = false; - public bool SimulatorEmergencyBraking { + public bool SimulatorEmergencyBraking + { get { return simulatorEmergencyBraking; @@ -296,7 +297,7 @@ public void Initialize() Script.TrainSpeedLimitMpS = () => Math.Min(Locomotive.Train.AllowedMaxSpeedMpS, Locomotive.Train.TrainMaxSpeedMpS); Script.TrainMaxSpeedMpS = () => Locomotive.Train.TrainMaxSpeedMpS; // max speed for train in a specific section, independently from speedpost and signal limits Script.CurrentSignalSpeedLimitMpS = () => Locomotive.Train.allowedMaxSpeedSignalMpS; - Script.NextSignalSpeedLimitMpS = (value) => NextGenericSignalItem(value, ref ItemSpeedLimit, float.MaxValue,Train.TrainObjectItem.TRAINOBJECTTYPE.SIGNAL, "NORMAL"); + Script.NextSignalSpeedLimitMpS = (value) => NextGenericSignalItem(value, ref ItemSpeedLimit, float.MaxValue, Train.TrainObjectItem.TRAINOBJECTTYPE.SIGNAL, "NORMAL"); Script.NextSignalAspect = (value) => NextGenericSignalItem(value, ref ItemAspect, float.MaxValue, Train.TrainObjectItem.TRAINOBJECTTYPE.SIGNAL, "NORMAL"); Script.NextSignalDistanceM = (value) => NextGenericSignalItem(value, ref ItemDistance, float.MaxValue, Train.TrainObjectItem.TRAINOBJECTTYPE.SIGNAL, "NORMAL"); Script.NextNormalSignalDistanceHeadsAspect = () => NextNormalSignalDistanceHeadsAspect(); @@ -425,9 +426,9 @@ public void Initialize() Script.SetThrottleController = (value) => Locomotive.ThrottleController.SetValue(value); Script.SetDynamicBrakeController = (value) => { - if (Locomotive.DynamicBrakeController == null) return; - Locomotive.DynamicBrakeChangeActiveState(value > 0); - Locomotive.DynamicBrakeController.SetValue(value); + if (Locomotive.DynamicBrakeController == null) return; + Locomotive.DynamicBrakeChangeActiveState(value > 0); + Locomotive.DynamicBrakeController.SetValue(value); }; Script.SetPantographsDown = () => { @@ -444,7 +445,7 @@ public void Initialize() return; } Locomotive.Train.SignalEvent(PowerSupplyEvent.RaisePantograph, pantoID); - }; + }; Script.SetPantographDown = (pantoID) => { if (pantoID < Pantographs.MinPantoID || pantoID > Pantographs.MaxPantoID) @@ -511,7 +512,8 @@ public void Initialize() this.CurrentSpeedLimitMpS = value; ETCSStatus.AllowedSpeedMpS = value; }; - Script.SetNextSpeedLimitMpS = (value) => { + Script.SetNextSpeedLimitMpS = (value) => + { this.NextSpeedLimitMpS = value; ETCSStatus.TargetSpeedMpS = value; }; @@ -536,7 +538,7 @@ public void Initialize() CustomizedCabviewControlNames[id] = value; } }; - Script.RequestToggleManualMode = () => + Script.RequestToggleManualMode = () => { if (Locomotive.Train.ControlMode == Train.TRAIN_CONTROL.OUT_OF_CONTROL && Locomotive.Train.ControlModeBeforeOutOfControl == Train.TRAIN_CONTROL.EXPLORER) { @@ -581,7 +583,7 @@ private Aspect NextNormalSignalDistanceHeadsAspect() } private bool DoesNextNormalSignalHaveTwoAspects() - // ...and the two aspects of each head are STOP and ( CLEAR_2 or CLEAR_1 or RESTRICTING) + // ...and the two aspects of each head are STOP and ( CLEAR_2 or CLEAR_1 or RESTRICTING) { var signal = Locomotive.Train.NextSignalObject[Locomotive.Train.MUDirection == Direction.Reverse ? 1 : 0]; if (signal != null) @@ -648,54 +650,54 @@ SignalFeatures NextGenericSignalFeatures(string signalFunctionTypeName, int item { case Train.TrainObjectItem.TRAINOBJECTTYPE.SIGNAL: case Train.TrainObjectItem.TRAINOBJECTTYPE.SPEED_SIGNAL: - { - var playerTrainSignalList = Locomotive.Train.PlayerTrainSignals[dir][function]; - if (itemSequenceIndex > playerTrainSignalList.Count - 1) - goto Exit; // no n-th signal available - var trainSignal = playerTrainSignalList[itemSequenceIndex]; - if (trainSignal.DistanceToTrainM > maxDistanceM) - goto Exit; // the requested signal is too distant - - // All OK, we can retrieve the data for the required signal; - distanceM = trainSignal.DistanceToTrainM; - mainHeadSignalTypeName = trainSignal.SignalObject.SignalHeads[0].SignalTypeName; - if (signalFunctionTypeName == "NORMAL") - { - aspect = (Aspect)trainSignal.SignalState; - speedLimitMpS = trainSignal.AllowedSpeedMpS; - altitudeM = trainSignal.SignalObject.tdbtraveller.Y; - } - else { - aspect = (Aspect)Locomotive.Train.signalRef.TranslateToTCSAspect(trainSignal.SignalObject.this_sig_lr(function)); - } + var playerTrainSignalList = Locomotive.Train.PlayerTrainSignals[dir][function]; + if (itemSequenceIndex > playerTrainSignalList.Count - 1) + goto Exit; // no n-th signal available + var trainSignal = playerTrainSignalList[itemSequenceIndex]; + if (trainSignal.DistanceToTrainM > maxDistanceM) + goto Exit; // the requested signal is too distant + + // All OK, we can retrieve the data for the required signal; + distanceM = trainSignal.DistanceToTrainM; + mainHeadSignalTypeName = trainSignal.SignalObject.SignalHeads[0].SignalTypeName; + if (signalFunctionTypeName == "NORMAL") + { + aspect = (Aspect)trainSignal.SignalState; + speedLimitMpS = trainSignal.AllowedSpeedMpS; + altitudeM = trainSignal.SignalObject.tdbtraveller.Y; + } + else + { + aspect = (Aspect)Locomotive.Train.signalRef.TranslateToTCSAspect(trainSignal.SignalObject.this_sig_lr(function)); + } - var functionHead = trainSignal.SignalObject.SignalHeads.Find(head => head.Function == function); - signalTypeName = functionHead.SignalTypeName; - if (functionHead.signalType.DrawStates.Any(d => d.Value.Index == functionHead.draw_state)) - { - drawStateName = functionHead.signalType.DrawStates.First(d => d.Value.Index == functionHead.draw_state).Value.Name; + var functionHead = trainSignal.SignalObject.SignalHeads.Find(head => head.Function == function); + signalTypeName = functionHead.SignalTypeName; + if (functionHead.signalType.DrawStates.Any(d => d.Value.Index == functionHead.draw_state)) + { + drawStateName = functionHead.signalType.DrawStates.First(d => d.Value.Index == functionHead.draw_state).Value.Name; + } + textAspect = functionHead?.TextSignalAspect ?? ""; + break; } - textAspect = functionHead?.TextSignalAspect ?? ""; - break; - } case Train.TrainObjectItem.TRAINOBJECTTYPE.SPEEDPOST: - { - var playerTrainSpeedpostList = Locomotive.Train.PlayerTrainSpeedposts[dir].Where(x => !x.IsWarning).ToList(); - if (itemSequenceIndex > playerTrainSpeedpostList.Count - 1) - goto Exit; // no n-th speedpost available - var trainSpeedpost = playerTrainSpeedpostList[itemSequenceIndex]; - if (trainSpeedpost.DistanceToTrainM > maxDistanceM) - goto Exit; // the requested speedpost is too distant - - // All OK, we can retrieve the data for the required speedpost; - distanceM = trainSpeedpost.DistanceToTrainM; - speedLimitMpS = trainSpeedpost.AllowedSpeedMpS; - break; - } + { + var playerTrainSpeedpostList = Locomotive.Train.PlayerTrainSpeedposts[dir].Where(x => !x.IsWarning).ToList(); + if (itemSequenceIndex > playerTrainSpeedpostList.Count - 1) + goto Exit; // no n-th speedpost available + var trainSpeedpost = playerTrainSpeedpostList[itemSequenceIndex]; + if (trainSpeedpost.DistanceToTrainM > maxDistanceM) + goto Exit; // the requested speedpost is too distant + + // All OK, we can retrieve the data for the required speedpost; + distanceM = trainSpeedpost.DistanceToTrainM; + speedLimitMpS = trainSpeedpost.AllowedSpeedMpS; + break; + } } - Exit: +Exit: return new SignalFeatures(mainHeadSignalTypeName: mainHeadSignalTypeName, signalTypeName: signalTypeName, aspect: aspect, drawStateName: drawStateName, distanceM: distanceM, speedLimitMpS: speedLimitMpS, altitudeM: altitudeM, textAspect: textAspect); } @@ -732,7 +734,7 @@ SpeedPostFeatures NextSpeedPostFeatures(int itemSequenceIndex, float maxDistance speedLimitMpS = trainSpeedpost.AllowedSpeedMpS; altitudeM = trainSpeedpost.SignalObject.tdbtraveller.Y; - Exit: +Exit: return new SpeedPostFeatures(speedPostTypeName: speedPostTypeName, isWarning: isWarning, distanceM: distanceM, speedLimitMpS: speedLimitMpS, altitudeM: altitudeM); } @@ -761,7 +763,7 @@ private bool DoesStartFromTerminalStation() public void SignalEvent(Event evt, TrainControlSystem script) { try - { + { foreach (var eventHandler in Locomotive.EventHandlers) eventHandler.HandleEvent(evt, script); } @@ -934,7 +936,7 @@ private T LoadParameter(string sectionName, string keyName, T defaultValue) public string GetDisplayString(int commandIndex) { if (CustomizedCabviewControlNames.TryGetValue(commandIndex - 1, out string name)) return name; - return "ORTS_TCS"+commandIndex; + return "ORTS_TCS" + commandIndex; } public void Save(BinaryWriter outf) @@ -1101,7 +1103,7 @@ public bool OverspeedReset float VigilanceAlarmTimeoutS; float CurrentSpeedLimitMpS; float NextSpeedLimitMpS; - + MonitoringStatus Status; public ScriptedTrainControlSystem.MonitoringDevice VigilanceMonitor; @@ -1216,7 +1218,7 @@ public void UpdateInputs() CurrentSpeedLimitMpS = TrainSpeedLimitMpS(); // TODO: NextSignalSpeedLimitMpS(0) should return 0 if the signal is at stop; cause seems to be updateSpeedInfo() within Train.cs - NextSpeedLimitMpS = NextSignalAspect(0) != Aspect.Stop ? (NextSignalSpeedLimitMpS(0) > 0 && NextSignalSpeedLimitMpS(0) < TrainSpeedLimitMpS() ? NextSignalSpeedLimitMpS(0) : TrainSpeedLimitMpS() ) : 0; + NextSpeedLimitMpS = NextSignalAspect(0) != Aspect.Stop ? (NextSignalSpeedLimitMpS(0) > 0 && NextSignalSpeedLimitMpS(0) < TrainSpeedLimitMpS() ? NextSignalSpeedLimitMpS(0) : TrainSpeedLimitMpS()) : 0; SetCurrentSpeedLimitMpS(CurrentSpeedLimitMpS); SetNextSpeedLimitMpS(NextSpeedLimitMpS); @@ -1253,7 +1255,7 @@ private void UpdateETCSPlanning() { maxDistanceAheadM = NextSignalDistanceM(i); if (NextSignalAspect(i) == Aspect.Stop || NextSignalAspect(i) == Aspect.None) break; - float speedLimMpS = NextSignalSpeedLimitMpS(i); + float speedLimMpS = NextSignalSpeedLimitMpS(i); if (speedLimMpS >= 0) ETCSStatus.SpeedTargets.Add(new PlanningTarget(maxDistanceAheadM, speedLimMpS)); } float prevDist = 0; @@ -1269,7 +1271,7 @@ private void UpdateETCSPlanning() prevSpeed = speed; } ETCSStatus.SpeedTargets.Sort((x, y) => x.DistanceToTrainM.CompareTo(y.DistanceToTrainM)); - ETCSStatus.SpeedTargets.Add(new PlanningTarget(maxDistanceAheadM, 0)); + ETCSStatus.SpeedTargets.Add(new PlanningTarget(maxDistanceAheadM, 0)); ETCSStatus.GradientProfile.Clear(); ETCSStatus.GradientProfile.Add(new GradientProfileElement(0, (int)(CurrentGradientPercent() * 10))); ETCSStatus.GradientProfile.Add(new GradientProfileElement(maxDistanceAheadM, 0)); // End of profile @@ -1277,7 +1279,7 @@ private void UpdateETCSPlanning() public override void HandleEvent(TCSEvent evt, string message) { - switch(evt) + switch (evt) { case TCSEvent.AlerterPressed: case TCSEvent.AlerterReleased: @@ -1297,7 +1299,7 @@ public override void HandleEvent(TCSEvent evt, string message) VigilanceMonitorState = MonitorState.StandBy; break; - // case VigilanceState.Emergency: do nothing + // case VigilanceState.Emergency: do nothing } } break; @@ -1412,12 +1414,12 @@ void UpdateVigilance() void UpdateSpeedControl() { var interventionSpeedMpS = CurrentSpeedLimitMpS + MpS.FromKpH(5.0f); // Default margin : 5 km/h - + if (OverspeedMonitor.TriggerOnTrackOverspeed) { interventionSpeedMpS = CurrentSpeedLimitMpS + OverspeedMonitor.TriggerOnTrackOverspeedMarginMpS; } - + SetInterventionSpeedLimitMpS(interventionSpeedMpS); switch (OverspeedMonitorState) diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/TrainCar.cs b/Source/Orts.Simulation/Simulation/RollingStocks/TrainCar.cs index ec545107ea..8d62cb15fe 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/TrainCar.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/TrainCar.cs @@ -33,6 +33,11 @@ // Debug Brake Slide Calculations //#define DEBUG_BRAKE_SLIDE +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; using Microsoft.Xna.Framework; using Orts.Common; using Orts.Formats.Msts; @@ -47,12 +52,6 @@ using Orts.Simulation.Timetables; using ORTS.Common; using ORTS.Scripting.Api; -using ORTS.Settings; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; using Event = Orts.Common.Event; namespace Orts.Simulation.RollingStocks @@ -107,7 +106,7 @@ public abstract class TrainCar static float dbfmaxsafecurvespeedmps;//Debrief eval public static int DbfEvalTrainOverturned;//Debrief eval public bool ldbfevaltrainoverturned = false; - + // original consist of which car was part (used in timetable for couple/uncouple options) public string OrgConsist = string.Empty; @@ -677,7 +676,7 @@ public enum WagonSpecialTypes } public WagonSpecialTypes WagonSpecialType; - protected float CurveResistanceZeroSpeedFactor = 0.5f; // Based upon research (Russian experiments - 1960) the older formula might be about 2x actual value + protected float CurveResistanceZeroSpeedFactor = 0.5f; // Based upon research (Russian experiments - 1960) the older formula might be about 2x actual value protected float RigidWheelBaseM; // Vehicle rigid wheelbase, read from MSTS Wagon file protected float TrainCrossSectionAreaM2; // Cross sectional area of the train protected float DoubleTunnelCrossSectAreaM2; @@ -701,7 +700,7 @@ public struct CarTunnelInfoData public virtual void Initialize() { CurveSpeedDependent = Simulator.Settings.CurveSpeedDependent; - + //CurveForceFilter.Initialize(); // Initialize tunnel resistance values @@ -806,7 +805,7 @@ public virtual void Update(float elapsedClockSeconds) InitializeCarTemperatures(); AmbientTemperatureInitialised = true; } - + // Update temperature variation for height of car above sea level // Typically in clear conditions there is a 9.8 DegC variation for every 1000m (1km) rise, in snow/rain there is approx 5.5 DegC variation for every 1000m (1km) rise float TemperatureHeightVariationDegC = 0; @@ -821,9 +820,9 @@ public virtual void Update(float elapsedClockSeconds) { TemperatureHeightVariationDegC = Me.ToKiloM(CarHeightAboveSeaLevelM) * DryLapseTemperatureC; } - + TemperatureHeightVariationDegC = MathHelper.Clamp(TemperatureHeightVariationDegC, 0.00f, 30.0f); - + CarOutsideTempC = InitialCarOutsideTempC - TemperatureHeightVariationDegC; // gravity force, M32 is up component of forward vector @@ -899,9 +898,9 @@ public void InitializeCarTemperatures() double longitude = 0; new WorldLatLon().ConvertWTC(WorldPosition.TileX, WorldPosition.TileZ, WorldPosition.Location, ref latitude, ref longitude); - + float LatitudeDeg = MathHelper.ToDegrees((float)latitude); - + // Sets outside temperature dependent upon the season if (Simulator.Season == SeasonType.Winter) @@ -989,7 +988,7 @@ public virtual void UpdateBrakeSlideCalculation() if (this is MSTSDieselLocomotive || this is MSTSElectricLocomotive) { // If advanced adhesion model indicates wheel slip warning, then check other conditions (throttle and brake force) to determine whether it is a wheel slip or brake skid - if (WheelSlipWarning && ThrottlePercent < 0.1f && BrakeRetardForceN > 25.0) + if (WheelSlipWarning && ThrottlePercent < 0.1f && BrakeRetardForceN > 25.0) { BrakeSkidWarning = true; // set brake skid flag true } @@ -1025,7 +1024,7 @@ public virtual void UpdateBrakeSlideCalculation() BrakeSkidWarning = true; // wagon wheel is about to slip } } - else if ( BrakeWheelTreadForceN < 0.75f * WagonBrakeAdhesiveForceN) + else if (BrakeWheelTreadForceN < 0.75f * WagonBrakeAdhesiveForceN) { BrakeSkidWarning = false; // wagon wheel is back to normal } @@ -1037,7 +1036,7 @@ public virtual void UpdateBrakeSlideCalculation() WheelBrakeSlideProtectionDumpValveLockout = false; } - + // Calculate adhesive force based upon whether in skid or not @@ -1049,7 +1048,7 @@ public virtual void UpdateBrakeSlideCalculation() { WagonBrakeAdhesiveForceN = MassKG * GravitationalAccelerationMpS2 * Train.WagonCoefficientFriction; // Adhesive force wheel normal } - + // Test if wheel forces are high enough to induce a slip. Set slip flag if slip occuring if (!BrakeSkid && AbsSpeedMpS > 0.01) // Train must be moving forward to experience skid @@ -1067,7 +1066,7 @@ public virtual void UpdateBrakeSlideCalculation() { BrakeSkid = false; // wagon wheel is not slipping } - + } else { @@ -1203,11 +1202,11 @@ public void UpdateTrainDerailmentRisk(float elapsedClockSeconds) // To achieve an accurate coupler angle calculation the following length need to be calculated. These values can be included in the ENG/WAG file for greatest accuracy, or alternatively OR will // calculate some default values based upon the length of the car specified in the "Size" statement. This value may however be inaccurate, and sets the "visual" distance for placement of the // animated coupler. So often it is a good idea to add the values in the WAG file. - + var OverhangThisCarM = 0.5f * (CarBodyLengthM - CarBogieCentreLengthM); // Vehicle overhang - B var BogieDistanceThisCarM = 0.5f * CarBogieCentreLengthM; // 0.5 * distance between bogie centres - A var CouplerDistanceThisCarM = 0.5f * (CarCouplerFaceLengthM - CarBodyLengthM); - + var OverhangBehindCarM = 2.545f; // Vehicle overhang - B var BogieDistanceBehindCarM = 8.23f; // 0.5 * distance between bogie centres - A var CouplerDistanceBehindCarM = 0.5f * (CarCouplerFaceLengthM - CarBodyLengthM); @@ -1232,7 +1231,7 @@ public void UpdateTrainDerailmentRisk(float elapsedClockSeconds) { couplerDistanceM = 0.0001f; // Stop couplerDistance equalling zero as this causes NaN calculations in following calculations. } - + float BogieCentresAdjVehiclesM = OverhangThisCarM + OverhangBehindCarM + couplerDistanceM; // L value = Overhangs + Coupler spacing - D if (CarBehind != null) @@ -1394,7 +1393,7 @@ public void UpdateTrainDerailmentRisk(float elapsedClockSeconds) // Trace.TraceInformation("Buff - CarId {0} Thiscar {1} A {2} B {3} C {4} 180 {5}", CarID, WagonFrontCouplerBuffAngleRad, X, Y, Z, MathHelper.ToRadians(180.0f)); - // Trace.TraceInformation("Buff - CarId {0} StringThis {1} StringBehind {2} BuffThis {3} BuffAhead {4}", CarID, WagonRearCouplerAngleRad, CarBehind.WagonFrontCouplerAngleRad, WagonRearCouplerBuffAngleRad, CarBehind.WagonFrontCouplerBuffAngleRad); + // Trace.TraceInformation("Buff - CarId {0} StringThis {1} StringBehind {2} BuffThis {3} BuffAhead {4}", CarID, WagonRearCouplerAngleRad, CarBehind.WagonFrontCouplerAngleRad, WagonRearCouplerBuffAngleRad, CarBehind.WagonFrontCouplerBuffAngleRad); } @@ -1541,14 +1540,14 @@ public void UpdateTrainDerailmentRisk(float elapsedClockSeconds) float BB1 = 0; // Prevent NaN if WagonNumBogies = 0 - if ( WagonNumBogies != 0) + if (WagonNumBogies != 0) { // AA1 = CarAhead.CouplerForceU * (float)Math.Sin(WagonCouplerAngleDerailRad) / WagonNumBogies; AA1 = Math.Abs(CarAhead.CouplerForceUSmoothed.SmoothedValue) * (float)Math.Sin(WagonCouplerAngleDerailRad) / WagonNumBogies; } else { - // AA1 = CarAhead.CouplerForceU * (float)Math.Sin(WagonCouplerAngleDerailRad); + // AA1 = CarAhead.CouplerForceU * (float)Math.Sin(WagonCouplerAngleDerailRad); AA1 = Math.Abs(CarAhead.CouplerForceUSmoothed.SmoothedValue) * (float)Math.Sin(WagonCouplerAngleDerailRad); } @@ -1587,7 +1586,7 @@ public void UpdateTrainDerailmentRisk(float elapsedClockSeconds) var wagonAdhesion = Train.WagonCoefficientFriction; // Calculate Nadal derailment coefficient limit - NadalDerailmentCoefficient = ((float) Math.Tan(MaximumWheelFlangeAngleRad) - wagonAdhesion) / (1f + wagonAdhesion * (float) Math.Tan(MaximumWheelFlangeAngleRad)); + NadalDerailmentCoefficient = ((float)Math.Tan(MaximumWheelFlangeAngleRad) - wagonAdhesion) / (1f + wagonAdhesion * (float)Math.Tan(MaximumWheelFlangeAngleRad)); // Calculate Angle of Attack - AOA = sin-1(2 * bogie wheel base / curve radius) AngleOfAttackRad = (float)Math.Asin(2 * RigidWheelBaseM / CurrentCurveRadius); @@ -1606,7 +1605,7 @@ public void UpdateTrainDerailmentRisk(float elapsedClockSeconds) var parameterB = parameterB_1 + parameterB_2; - DerailClimbDistanceM = Me.FromFt( (float)((parameterA * parameterB * Me.ToIn(WheelFlangeLengthM)) / ((angleofAttackmRad + (parameterB * Me.ToIn(WheelFlangeLengthM))))) ); + DerailClimbDistanceM = Me.FromFt((float)((parameterA * parameterB * Me.ToIn(WheelFlangeLengthM)) / ((angleofAttackmRad + (parameterB * Me.ToIn(WheelFlangeLengthM)))))); // calculate the time taken to travel the derail climb distance var derailTimeS = DerailClimbDistanceM / AbsSpeedMpS; @@ -1626,13 +1625,13 @@ public void UpdateTrainDerailmentRisk(float elapsedClockSeconds) { DerailExpected = true; Simulator.Confirmer.Message(ConfirmLevel.Warning, Simulator.Catalog.GetStringFmt("Car {0} has derailed on the curve.", CarID)); - // Trace.TraceInformation("Car Derail - CarID: {0}, Coupler: {1}, CouplerSmoothed {2}, Lateral {3}, Vertical {4}, Angle {5} Nadal {6} Coeff {7}", CarID, CouplerForceU, CouplerForceUSmoothed.SmoothedValue, TotalWagonLateralDerailForceN, TotalWagonVerticalDerailForceN, WagonCouplerAngleDerailRad, NadalDerailmentCoefficient, DerailmentCoefficient); - // Trace.TraceInformation("Car Ahead Derail - CarID: {0}, Coupler: {1}, CouplerSmoothed {2}, Lateral {3}, Vertical {4}, Angle {5}", CarAhead.CarID, CarAhead.CouplerForceU, CarAhead.CouplerForceUSmoothed.SmoothedValue, CarAhead.TotalWagonLateralDerailForceN, CarAhead.TotalWagonVerticalDerailForceN, CarAhead.WagonCouplerAngleDerailRad); + // Trace.TraceInformation("Car Derail - CarID: {0}, Coupler: {1}, CouplerSmoothed {2}, Lateral {3}, Vertical {4}, Angle {5} Nadal {6} Coeff {7}", CarID, CouplerForceU, CouplerForceUSmoothed.SmoothedValue, TotalWagonLateralDerailForceN, TotalWagonVerticalDerailForceN, WagonCouplerAngleDerailRad, NadalDerailmentCoefficient, DerailmentCoefficient); + // Trace.TraceInformation("Car Ahead Derail - CarID: {0}, Coupler: {1}, CouplerSmoothed {2}, Lateral {3}, Vertical {4}, Angle {5}", CarAhead.CarID, CarAhead.CouplerForceU, CarAhead.CouplerForceUSmoothed.SmoothedValue, CarAhead.TotalWagonLateralDerailForceN, CarAhead.TotalWagonVerticalDerailForceN, CarAhead.WagonCouplerAngleDerailRad); } else if (DerailPossible) { DerailElapsedTimeS += elapsedClockSeconds; - // Trace.TraceInformation("Car Derail Time - CarID: {0}, Coupler: {1}, CouplerSmoothed {2}, Lateral {3}, Vertical {4}, Angle {5}, Elapsed {6}, DeratilTime {7}, Distance {8} Nadal {9} Coeff {10}", CarID, CouplerForceU, CouplerForceUSmoothed.SmoothedValue, TotalWagonLateralDerailForceN, TotalWagonVerticalDerailForceN, WagonCouplerAngleDerailRad, DerailElapsedTimeS, derailTimeS, DerailClimbDistanceM, NadalDerailmentCoefficient, DerailmentCoefficient); + // Trace.TraceInformation("Car Derail Time - CarID: {0}, Coupler: {1}, CouplerSmoothed {2}, Lateral {3}, Vertical {4}, Angle {5}, Elapsed {6}, DeratilTime {7}, Distance {8} Nadal {9} Coeff {10}", CarID, CouplerForceU, CouplerForceUSmoothed.SmoothedValue, TotalWagonLateralDerailForceN, TotalWagonVerticalDerailForceN, WagonCouplerAngleDerailRad, DerailElapsedTimeS, derailTimeS, DerailClimbDistanceM, NadalDerailmentCoefficient, DerailmentCoefficient); } else { @@ -1645,11 +1644,11 @@ public void UpdateTrainDerailmentRisk(float elapsedClockSeconds) DerailPossible = false; } -// if (CarID == "0 - 84" || CarID == "0 - 83" || CarID == "0 - 82" || CarID == "0 - 81" || CarID == "0 - 80" || CarID == "0 - 79") -// { -// Trace.TraceInformation("Nadal - {0}, Adhesion {1} Flange Angle {2}", NadalDerailmentCoefficient, wagonAdhesion, MaximumWheelFlangeAngleRad); -// Trace.TraceInformation("Derailment - CarID {0}, Nadal {1}, Derail {2} Possible {3} Expected {4} Derail Distance {5} ElapsedTime {6} DerailTime {7}", CarID, NadalDerailmentCoefficient, DerailmentCoefficient, DerailPossible, DerailExpected, DerailClimbDistanceM, DerailElapsedTimeS, derailTimeS); -// } + // if (CarID == "0 - 84" || CarID == "0 - 83" || CarID == "0 - 82" || CarID == "0 - 81" || CarID == "0 - 80" || CarID == "0 - 79") + // { + // Trace.TraceInformation("Nadal - {0}, Adhesion {1} Flange Angle {2}", NadalDerailmentCoefficient, wagonAdhesion, MaximumWheelFlangeAngleRad); + // Trace.TraceInformation("Derailment - CarID {0}, Nadal {1}, Derail {2} Possible {3} Expected {4} Derail Distance {5} ElapsedTime {6} DerailTime {7}", CarID, NadalDerailmentCoefficient, DerailmentCoefficient, DerailPossible, DerailExpected, DerailClimbDistanceM, DerailElapsedTimeS, derailTimeS); + // } } else { @@ -1704,11 +1703,11 @@ public string GetCurveDirection() } // If a westerly direction (ie -ve) convert to an angle between 0 and 360 - if (FrontWagonDirectionDeg< 0) + if (FrontWagonDirectionDeg < 0) FrontWagonDirectionDeg += 360; // Rear Wagon Direction - direction = (float) Math.Atan2(CarBehind.WorldPosition.XNAMatrix.M13, CarBehind.WorldPosition.XNAMatrix.M11); + direction = (float)Math.Atan2(CarBehind.WorldPosition.XNAMatrix.M13, CarBehind.WorldPosition.XNAMatrix.M11); float BehindWagonDirectionDeg = MathHelper.ToDegrees((float)direction); @@ -1724,15 +1723,15 @@ public string GetCurveDirection() } // If a westerly direction (ie -ve) convert to an angle between 0 and 360 - if (BehindWagonDirectionDeg< 0) + if (BehindWagonDirectionDeg < 0) BehindWagonDirectionDeg += 360; - if (FrontWagonDirectionDeg > 270 && BehindWagonDirectionDeg< 90) + if (FrontWagonDirectionDeg > 270 && BehindWagonDirectionDeg < 90) { FrontWagonDirectionDeg -= 360; } - if (FrontWagonDirectionDeg< 90 && BehindWagonDirectionDeg> 270) + if (FrontWagonDirectionDeg < 90 && BehindWagonDirectionDeg > 270) { BehindWagonDirectionDeg -= 360; } @@ -1744,7 +1743,7 @@ public string GetCurveDirection() { curveDirection = "Right"; } - else if (FrontWagonDirectionDeg 0.005) + else if (FrontWagonDirectionDeg < BehindWagonDirectionDeg && directionBandwidth > 0.005) { curveDirection = "Left"; } @@ -2016,7 +2015,7 @@ public virtual void UpdateCurveSpeedLimit() } #endregion - + #region Calculate friction force in curves /// @@ -2029,7 +2028,7 @@ public virtual void UpdateCurveForce(float elapsedClockSeconds) if (CurrentCurveRadius > 0) { if (RigidWheelBaseM == 0) // Calculate default values if no value in Wag File - { + { float Axles = WheelAxles.Count; float Bogies = Parts.Count - 1; float BogieSize = Axles / Bogies; @@ -2094,7 +2093,7 @@ public virtual void UpdateCurveForce(float elapsedClockSeconds) // Approximation for calculating rigid wheelbase for steam locomotives // Wheelbase = 1.25 x (Loco Drive Axles - 1.0) x Drive Wheel diameter - RigidWheelBaseM = 1.25f * (LocoNumDrvAxles - 1.0f) * (DriverWheelRadiusM * 2.0f); + RigidWheelBaseM = 1.25f * (LocoNumDrvAxles - 1.0f) * (DriverWheelRadiusM * 2.0f); } } } @@ -2360,7 +2359,7 @@ public virtual float GetMaximumSimpleCouplerSlack1M() { return 0.03f; } - + public virtual float GetMaximumSimpleCouplerSlack2M() { return 0.035f; @@ -2402,12 +2401,12 @@ public virtual float GetCouplerTensionSlackBM() { return 0.1f; } - + public virtual float GetCouplerCompressionSlackAM() { return 0; } - + public virtual float GetCouplerCompressionSlackBM() { return 0.1f; @@ -2417,12 +2416,12 @@ public virtual float GetMaximumCouplerTensionSlack1M() { return 0.05f; } - + public virtual float GetMaximumCouplerTensionSlack2M() { return 0.1f; } - + public virtual float GetMaximumCouplerTensionSlack3M() { return 0.13f; @@ -2437,7 +2436,7 @@ public virtual float GetMaximumCouplerCompressionSlack2M() { return 0.1f; } - + public virtual float GetMaximumCouplerCompressionSlack3M() { return 0.13f; @@ -2852,7 +2851,7 @@ public void ComputePosition(Traveller traveler, bool backToFront, float elapsedT WorldPosition.XNAMatrix = m; WorldPosition.TileX = tileX; WorldPosition.TileZ = tileZ; - + UpdatedTraveler(traveler, elapsedTimeS, distance, speed); // calculate truck angles @@ -2907,7 +2906,7 @@ internal void UpdatedTraveler(Traveller traveler, float elapsedTimeS, float dist #endregion #region Super-elevation - void UpdateSuperElevation(Traveller traveler, float elapsedTimeS) + void UpdateSuperElevation(Traveller traveler, float elapsedTimeS) { if (Simulator.Settings.UseSuperElevation == 0) return; diff --git a/Source/Orts.Simulation/Simulation/Signalling/CsSignalScript.cs b/Source/Orts.Simulation/Simulation/Signalling/CsSignalScript.cs index 19670b9550..c0e5e49a85 100644 --- a/Source/Orts.Simulation/Simulation/Signalling/CsSignalScript.cs +++ b/Source/Orts.Simulation/Simulation/Signalling/CsSignalScript.cs @@ -1,9 +1,9 @@ -using Orts.Formats.Msts; -using ORTS.Scripting.Api; -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; +using Orts.Formats.Msts; +using ORTS.Scripting.Api; namespace Orts.Simulation.Signalling { @@ -223,7 +223,7 @@ public bool IdSignalHasNormalSubtype(int id, string normalSubtype) /// Id of the signal to query /// Consider only heads with a specific signal function /// Get aspect of nth head of the specified type - public string IdTextSignalAspect(int id, string sigfn, int headindex=0) + public string IdTextSignalAspect(int id, string sigfn, int headindex = 0) { if (SignalObject.signalRef.SignalFunctions.TryGetValue(sigfn, out SignalFunction function)) { @@ -249,7 +249,7 @@ public string IdTextSignalAspect(int id, string sigfn, int headindex=0) /// Check most restrictive head per signal public Aspect DistMultiSigMR(string sigfnA, string sigfnB, bool mostRestrictiveHead = true) { - if(mostRestrictiveHead) return (Aspect)SignalHead.dist_multi_sig_mr(SignalFunction(sigfnA), SignalFunction(sigfnB), DebugFileName); + if (mostRestrictiveHead) return (Aspect)SignalHead.dist_multi_sig_mr(SignalFunction(sigfnA), SignalFunction(sigfnB), DebugFileName); return (Aspect)SignalHead.dist_multi_sig_mr_of_lr(SignalFunction(sigfnA), SignalFunction(sigfnB), DebugFileName); } @@ -389,7 +389,7 @@ internal void AttachToHead(SignalHead signalHead) /// /// Signal ID of the calling signal /// Message sent to signal - public virtual void HandleSignalMessage(int signalId, string message) {} + public virtual void HandleSignalMessage(int signalId, string message) { } /// /// Called when the simulator diff --git a/Source/Orts.Simulation/Simulation/Signalling/DeadlockInfo.cs b/Source/Orts.Simulation/Simulation/Signalling/DeadlockInfo.cs index d3d026741c..25197f8cf3 100644 --- a/Source/Orts.Simulation/Simulation/Signalling/DeadlockInfo.cs +++ b/Source/Orts.Simulation/Simulation/Signalling/DeadlockInfo.cs @@ -19,12 +19,12 @@ // #define DEBUG_DEADLOCK // print details of deadlock processing -using Orts.Simulation.Physics; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; +using Orts.Simulation.Physics; namespace Orts.Simulation.Signalling { diff --git a/Source/Orts.Simulation/Simulation/Signalling/DeadlockPathInfo.cs b/Source/Orts.Simulation/Simulation/Signalling/DeadlockPathInfo.cs index 06ac700b76..980b05c981 100644 --- a/Source/Orts.Simulation/Simulation/Signalling/DeadlockPathInfo.cs +++ b/Source/Orts.Simulation/Simulation/Signalling/DeadlockPathInfo.cs @@ -15,10 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Orts.Simulation.Physics; using System; using System.Collections.Generic; using System.IO; +using Orts.Simulation.Physics; namespace Orts.Simulation.Signalling { diff --git a/Source/Orts.Simulation/Simulation/Signalling/SIGSCRfile.cs b/Source/Orts.Simulation/Simulation/Signalling/SIGSCRfile.cs index c6b8970535..d2e41aa2f7 100644 --- a/Source/Orts.Simulation/Simulation/Signalling/SIGSCRfile.cs +++ b/Source/Orts.Simulation/Simulation/Signalling/SIGSCRfile.cs @@ -1590,14 +1590,14 @@ public void SH_process_script(SignalHead thisHead, SignalScripts.SCRScripts sign } } - // AND or OR indication (to link previous and next part) + // AND or OR indication (to link previous and next part) else if (thisCond is SignalScripts.SCRAndOr) { condstring = (SignalScripts.SCRAndOr)thisCond; } - // subcondition + // subcondition else { @@ -1724,7 +1724,7 @@ public void SH_process_script(SignalHead thisHead, SignalScripts.SCRScripts sign #endif } - // process second term + // process second term else { diff --git a/Source/Orts.Simulation/Simulation/Signalling/SignalWorldObject.cs b/Source/Orts.Simulation/Simulation/Signalling/SignalWorldObject.cs index 4e6ce3cc8d..2c34410f72 100644 --- a/Source/Orts.Simulation/Simulation/Signalling/SignalWorldObject.cs +++ b/Source/Orts.Simulation/Simulation/Signalling/SignalWorldObject.cs @@ -15,11 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Orts.Formats.Msts; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; +using Orts.Formats.Msts; namespace Orts.Simulation.Signalling { diff --git a/Source/Orts.Simulation/Simulation/Signalling/Signals.cs b/Source/Orts.Simulation/Simulation/Signalling/Signals.cs index 0f98248585..672fec734d 100644 --- a/Source/Orts.Simulation/Simulation/Signalling/Signals.cs +++ b/Source/Orts.Simulation/Simulation/Signalling/Signals.cs @@ -26,7 +26,6 @@ using System.Diagnostics; using System.IO; using System.Linq; -using System.Text; using Microsoft.Xna.Framework; using Orts.Formats.Msts; using Orts.Formats.OR; @@ -244,7 +243,7 @@ public Signals(Simulator simulator, SignalConfigurationFile sigcfg, Cancellation Trace.TraceInformation("Signal " + thisSignal.thisRef + " ; TC : " + thisSignal.TCReference + " ; NextTC : " + thisSignal.TCNextTC + - " ; TN : " + thisSignal.trackNode + + " ; TN : " + thisSignal.trackNode + " ; TDB (0) : " + thisSignal.SignalHeads[0].TDBIndex); } @@ -484,7 +483,7 @@ private void BuildSignalWorld(Simulator simulator, SignalConfigurationFile sigcf { SpeedPostWorldList.Add(new SpeedPostWorldObject(speedPostObj)); int thisSpeedPostId = SpeedPostWorldList.Count() - 1; - foreach(TrItemId trItemId in speedPostObj.trItemIDList) + foreach (TrItemId trItemId in speedPostObj.trItemIDList) { if (!SpeedPostRefList.ContainsKey(trItemId.dbID)) { @@ -871,7 +870,7 @@ private void SplitBackfacing(TrItem[] TrItems, TrackNode[] TrackNodes) /// ScanSection : This method checks a section in the TDB for signals or speedposts /// private void ScanSection(TrItem[] TrItems, TrackNode[] trackNodes, int index, - TrackSectionsFile tsectiondat, TrackDatabaseFile tdbfile, Dictionary platformList, List milepostList) + TrackSectionsFile tsectiondat, TrackDatabaseFile tdbfile, Dictionary platformList, List milepostList) { int lastSignal = -1; // Index to last signal found in path; -1 if none int lastMilepost = -1; // Index to last milepost found in path; -1 if none @@ -950,7 +949,7 @@ private void SplitBackfacing(TrItem[] TrItems, TrackNode[] TrackNodes) } } } - } + } /// /// Merge Heads @@ -1099,7 +1098,7 @@ private int AddMilepost(int trackNode, int nodeIndx, SpeedPostItem speedItem, in milepost.TrItemId = (uint)TDBRef; milepost.MilepostValue = speedItem.SpeedInd; MilepostList.Add(milepost); - + #if DEBUG_PRINT File.AppendAllText(@"C:\temp\speedpost.txt", string.Format("\nMilepost placed : at : {0} {1}:{2} {3}. String: {4}\n", @@ -1165,7 +1164,7 @@ private void AddWorldInfo() } } } - + private void InitializeSignals() { foreach (SignalObject signal in SignalObjects) @@ -2113,7 +2112,7 @@ public void ProcessNodes(int iNode, TrItem[] TrItems, TrackNode[] trackNodes, Tr if (speedItem.SigObj >= 0) { if (!speedItem.IsMilePost) - { + { SignalObject thisSpeedpost = SignalObjects[speedItem.SigObj]; float speedpostDistance = thisSpeedpost.DistanceTo(TDBTrav); if (thisSpeedpost.direction == 1) @@ -3434,7 +3433,7 @@ public void requestClearNode(Train.TrainRouted thisTrain, Train.TCSubpathRoute r } // if not cleared to max distance or looped, determine reason - if (!furthestRouteCleared && lastRouteIndex > 0 && routePart[lastRouteIndex].TCSectionIndex >= 0 && endAuthority != Train.END_AUTHORITY.LOOP) + if (!furthestRouteCleared && lastRouteIndex > 0 && routePart[lastRouteIndex].TCSectionIndex >= 0 && endAuthority != Train.END_AUTHORITY.LOOP) { thisElement = routePart[lastRouteIndex]; diff --git a/Source/Orts.Simulation/Simulation/Signalling/SpeedPostWorldObject.cs b/Source/Orts.Simulation/Simulation/Signalling/SpeedPostWorldObject.cs index 8399e842dc..bed7c0c7a1 100644 --- a/Source/Orts.Simulation/Simulation/Signalling/SpeedPostWorldObject.cs +++ b/Source/Orts.Simulation/Simulation/Signalling/SpeedPostWorldObject.cs @@ -1,5 +1,5 @@ -using Orts.Formats.Msts; -using System.IO; +using System.IO; +using Orts.Formats.Msts; namespace Orts.Simulation.Signalling { diff --git a/Source/Orts.Simulation/Simulation/Signalling/TrackCircuitState.cs b/Source/Orts.Simulation/Simulation/Signalling/TrackCircuitState.cs index accd95e65f..a793ec558c 100644 --- a/Source/Orts.Simulation/Simulation/Signalling/TrackCircuitState.cs +++ b/Source/Orts.Simulation/Simulation/Signalling/TrackCircuitState.cs @@ -15,11 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Orts.Simulation.Physics; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; +using Orts.Simulation.Physics; namespace Orts.Simulation.Signalling { diff --git a/Source/Orts.Simulation/Simulation/Signalling/TrainOccupyState.cs b/Source/Orts.Simulation/Simulation/Signalling/TrainOccupyState.cs index ee825649f2..3b15ea3c7b 100644 --- a/Source/Orts.Simulation/Simulation/Signalling/TrainOccupyState.cs +++ b/Source/Orts.Simulation/Simulation/Signalling/TrainOccupyState.cs @@ -15,8 +15,8 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Orts.Simulation.Physics; using System.Collections.Generic; +using Orts.Simulation.Physics; namespace Orts.Simulation.Signalling { diff --git a/Source/Orts.Simulation/Simulation/Signalling/TrainQueue.cs b/Source/Orts.Simulation/Simulation/Signalling/TrainQueue.cs index 7d6ac0d391..42b15f4ccf 100644 --- a/Source/Orts.Simulation/Simulation/Signalling/TrainQueue.cs +++ b/Source/Orts.Simulation/Simulation/Signalling/TrainQueue.cs @@ -15,8 +15,8 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Orts.Simulation.Physics; using System.Collections.Generic; +using Orts.Simulation.Physics; namespace Orts.Simulation.Signalling { diff --git a/Source/Orts.Simulation/Simulation/Simulator.cs b/Source/Orts.Simulation/Simulation/Simulator.cs index ba92d45fd2..640b864f56 100644 --- a/Source/Orts.Simulation/Simulation/Simulator.cs +++ b/Source/Orts.Simulation/Simulation/Simulator.cs @@ -15,6 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; using GNU.Gettext; using Microsoft.Xna.Framework; using Orts.Common; @@ -26,16 +30,11 @@ using Orts.Simulation.Physics; using Orts.Simulation.RollingStocks; using Orts.Simulation.RollingStocks.SubSystems; -using Orts.Simulation.RollingStocks.SubSystems.Brakes; using Orts.Simulation.Signalling; using Orts.Simulation.Timetables; using ORTS.Common; using ORTS.Scripting.Api; using ORTS.Settings; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; using Event = Orts.Common.Event; namespace Orts.Simulation @@ -1347,8 +1346,8 @@ private Train InitializePlayerTrain() train.AITrainBrakePercent = 100; // This seems a tricky way for the brake modules to test if it is an AI train or not train.EqualReservoirPressurePSIorInHg = prevEQres; // The previous command modifies EQ reservoir pressure, causing issues with EP brake systems, so restore to prev value -// if ((PlayerLocomotive as MSTSLocomotive).EOTEnabled != MSTSLocomotive.EOTenabled.no) -// train.EOT = new EOT((PlayerLocomotive as MSTSLocomotive).EOTEnabled, false, train); + // if ((PlayerLocomotive as MSTSLocomotive).EOTEnabled != MSTSLocomotive.EOTenabled.no) + // train.EOT = new EOT((PlayerLocomotive as MSTSLocomotive).EOTEnabled, false, train); return (train); } @@ -1424,8 +1423,8 @@ private AITrain InitializeAPPlayerTrain() if (conFileName.Contains("tilted")) train.IsTilting = true; -// if ((PlayerLocomotive as MSTSLocomotive).EOTEnabled != MSTSLocomotive.EOTenabled.no) -// train.EOT = new EOT((PlayerLocomotive as MSTSLocomotive).EOTEnabled, false, train); + // if ((PlayerLocomotive as MSTSLocomotive).EOTEnabled != MSTSLocomotive.EOTenabled.no) + // train.EOT = new EOT((PlayerLocomotive as MSTSLocomotive).EOTEnabled, false, train); return train; } @@ -1479,7 +1478,7 @@ private void InitializeStaticConsists() if (!File.Exists(wagonFilePath)) { - Trace.TraceWarning($"Ignored missing {(wagon.IsEngine? "engine" : "wagon")} {wagonFilePath} in activity definition {activityObject.Train_Config.TrainCfg.Name}"); + Trace.TraceWarning($"Ignored missing {(wagon.IsEngine ? "engine" : "wagon")} {wagonFilePath} in activity definition {activityObject.Train_Config.TrainCfg.Name}"); continue; } @@ -1889,7 +1888,7 @@ private void StartSwitchPlayerTrain() if (playerTrain != null) { if (playerTrain.ControlMode == Train.TRAIN_CONTROL.MANUAL) TrainSwitcher.SuspendOldPlayer = true; // force suspend state to avoid disappearing of train; - if (TrainSwitcher.SuspendOldPlayer && + if (TrainSwitcher.SuspendOldPlayer && (playerTrain.SpeedMpS < -0.025 || playerTrain.SpeedMpS > 0.025 || playerTrain.PresentPosition[0].TCOffset != playerTrain.PreviousPosition[0].TCOffset)) { Confirmer.Message(ConfirmLevel.Warning, Catalog.GetString("Train can't be suspended with speed not equal 0")); @@ -2108,10 +2107,10 @@ public void RestartWaitingTrain(RestartWaitingTrain restartWaitingTrain) } } if (trainToRestart == null) - Trace.TraceWarning("Train {0} to restart not found", restartWaitingTrain.WaitingTrainToRestart); + Trace.TraceWarning("Train {0} to restart not found", restartWaitingTrain.WaitingTrainToRestart); } - + /// /// Derive log-file name from route path and activity name diff --git a/Source/Orts.Simulation/Simulation/SuperElevation.cs b/Source/Orts.Simulation/Simulation/SuperElevation.cs index 6f3fbcc833..51da49ecbb 100644 --- a/Source/Orts.Simulation/Simulation/SuperElevation.cs +++ b/Source/Orts.Simulation/Simulation/SuperElevation.cs @@ -15,12 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Orts.Formats.Msts; -using ORTS.Common; using System; using System.Collections.Generic; -using System.Linq; -using System.Text; +using Orts.Formats.Msts; +using ORTS.Common; namespace Orts.Simulation { diff --git a/Source/Orts.Simulation/Simulation/Timetables/PoolInfo.cs b/Source/Orts.Simulation/Simulation/Timetables/PoolInfo.cs index af5bea4184..8813141350 100644 --- a/Source/Orts.Simulation/Simulation/Timetables/PoolInfo.cs +++ b/Source/Orts.Simulation/Simulation/Timetables/PoolInfo.cs @@ -75,13 +75,13 @@ public PoolInfo(Simulator simulatorref) switch (poolInfo.Strings[lineindex][0].ToLower().Trim()) { // skip comment - case "#comment" : + case "#comment": lineindex++; break; - + // process name // do not increase lineindex as that is done in called method - case "#name" : + case "#name": TimetablePool newPool = new TimetablePool(poolInfo, ref lineindex, simulator); // store if valid pool if (!String.IsNullOrEmpty(newPool.PoolName)) @@ -97,7 +97,7 @@ public PoolInfo(Simulator simulatorref) } break; - default : + default: if (!String.IsNullOrEmpty(poolInfo.Strings[lineindex][0])) { Trace.TraceInformation("Invalid definition in file " + filePath + " at line " + lineindex + " : " + diff --git a/Source/Orts.Simulation/Simulation/Timetables/ProcessTimetable.cs b/Source/Orts.Simulation/Simulation/Timetables/ProcessTimetable.cs index 3151d24f6f..cc619c5a86 100644 --- a/Source/Orts.Simulation/Simulation/Timetables/ProcessTimetable.cs +++ b/Source/Orts.Simulation/Simulation/Timetables/ProcessTimetable.cs @@ -25,6 +25,11 @@ // +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; using Orts.Formats.Msts; using Orts.Formats.OR; using Orts.Parsers.OR; @@ -34,11 +39,6 @@ using Orts.Simulation.RollingStocks.SubSystems; using Orts.Simulation.Signalling; using ORTS.Common; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; using Event = Orts.Common.Event; namespace Orts.Simulation.Timetables @@ -1508,7 +1508,7 @@ public TTTrainInfo(int icolumn, string trainName, Simulator simulator, int index { TTTrain.TransferTrainDetails.Add(-1, newList); // set key to -1 to work out reference later } - } + } break; case "activate": @@ -1823,7 +1823,7 @@ public void ExtractStartTime(string startString, string consistInfo, Simulator s break; // activated : set activated flag - case "activated" : + case "activated": activationRequired = true; break; @@ -1934,7 +1934,7 @@ public void ExtractStartTime(string startString, string consistInfo, Simulator s if (activationRequired && !String.IsNullOrEmpty(createFromPool)) { activationRequired = false; - Trace.TraceInformation("Trigger activation not allowed when starting from pool, trigger activation reset for train {0}", TTTrain.Name); + Trace.TraceInformation("Trigger activation not allowed when starting from pool, trigger activation reset for train {0}", TTTrain.Name); } } @@ -2448,7 +2448,7 @@ public void AddWagons(ConsistFile consistFile, consistInfo consistDetails, strin wagonFilePath = Path.ChangeExtension(wagonFilePath, ".eng"); else if (wagon.IsEOT) { - wagonFolder = simulator.BasePath + @"\trains\orts_eot\" + wagon.Folder; + wagonFolder = simulator.BasePath + @"\trains\orts_eot\" + wagon.Folder; wagonFilePath = wagonFolder + @"\" + wagon.Name + ".eot"; } @@ -2575,7 +2575,7 @@ public StopInfo ProcessStopInfo(string stationInfo, StationInfo stationDetails) newStop.Commands = new List(); } - newStop.Commands.Add(new TTTrainCommands(String.Concat("stoptime=",stationDetails.actMinStopTime.Value.ToString().Trim()))); + newStop.Commands.Add(new TTTrainCommands(String.Concat("stoptime=", stationDetails.actMinStopTime.Value.ToString().Trim()))); } // process restrict to signal @@ -3418,7 +3418,7 @@ public bool BuildStopInfo(TTTrain actTrain, int actPlatformID, Signals signalRef // create station stop info validStop = actTrain.CreateStationStop(actPlatformID, arrivalTime, departureTime, arrivalDT, departureDT, AITrain.clearingDistanceM, - AITrain.minStopDistanceM, terminal, actMinStopTime,keepClearFront, keepClearRear, forcePosition, closeupSignal, closeup, restrictPlatformToSignal, extendPlatformToSignal, endStop); + AITrain.minStopDistanceM, terminal, actMinStopTime, keepClearFront, keepClearRear, forcePosition, closeupSignal, closeup, restrictPlatformToSignal, extendPlatformToSignal, endStop); // override holdstate using stop info - but only if exit signal is defined diff --git a/Source/Orts.Simulation/Simulation/Timetables/TTPool.cs b/Source/Orts.Simulation/Simulation/Timetables/TTPool.cs index cffaf93d88..f83c8d0718 100644 --- a/Source/Orts.Simulation/Simulation/Timetables/TTPool.cs +++ b/Source/Orts.Simulation/Simulation/Timetables/TTPool.cs @@ -26,11 +26,11 @@ using System.IO; using System.Linq; using System.Text; +using Orts.Parsers.OR; using Orts.Simulation.AIs; using Orts.Simulation.Physics; using Orts.Simulation.RollingStocks; using Orts.Simulation.Signalling; -using Orts.Parsers.OR; using ORTS.Common; namespace Orts.Simulation.Timetables @@ -41,12 +41,12 @@ namespace Orts.Simulation.Timetables /// public class Poolholder { - public Dictionary Pools; + public Dictionary Pools; /// /// loader for timetable mode /// - public Poolholder (Simulator simulatorref, string[] arguments, CancellationToken cancellation) + public Poolholder(Simulator simulatorref, string[] arguments, CancellationToken cancellation) { // process pools PoolInfo TTPool = new PoolInfo(simulatorref); @@ -83,7 +83,7 @@ public Poolholder(BinaryReader inf, Simulator simulatorref) int nopools = inf.ReadInt32(); if (nopools > 0) - { + { Pools = new Dictionary(); for (int iPool = 0; iPool < nopools; iPool++) { @@ -115,7 +115,7 @@ public Poolholder(BinaryReader inf, Simulator simulatorref) /// Save /// /// - public void Save (BinaryWriter outf) + public void Save(BinaryWriter outf) { if (Pools == null) { @@ -330,7 +330,7 @@ public TimetablePool(BinaryReader inf, Simulator simulatorref) newPool.TableVectorIndex = inf.ReadInt32(); newPool.TableMiddleEntry = inf.ReadSingle(); newPool.TableMiddleExit = inf.ReadSingle(); - + newPool.RemLength = inf.ReadSingle(); maxStorage = inf.ReadInt32(); @@ -827,7 +827,7 @@ virtual public Train.TCSubpathRoute SetPoolExit(TTTrain train, out int poolStora { // new route Train.TCSubpathRoute newRoute = null; - poolStorageState = (int) TTTrain.PoolAccessState.PoolInvalid; + poolStorageState = (int)TTTrain.PoolAccessState.PoolInvalid; // set dispose states train.FormsStatic = true; @@ -1280,7 +1280,7 @@ virtual public TrainFromPool ExtractTrain(ref TTTrain train, int presentTime) if (ForceCreation) { - Trace.TraceInformation("Train request : " + train.Name + " from pool " + PoolName + + Trace.TraceInformation("Train request : " + train.Name + " from pool " + PoolName + " : no engines available in pool, engine is created, at " + moveTimeA.ToString("HH:mm:ss") + "\n"); #if DEBUG_POOLINFO sob = new StringBuilder(); @@ -1291,7 +1291,7 @@ virtual public TrainFromPool ExtractTrain(ref TTTrain train, int presentTime) } else { - Trace.TraceInformation("Train request : " + train.Name + " from pool " + PoolName + + Trace.TraceInformation("Train request : " + train.Name + " from pool " + PoolName + " : no engines available in pool, engine is not created , at " + moveTimeA.ToString("HH:mm:ss") + "\n"); #if DEBUG_POOLINFO sob = new StringBuilder(); @@ -1466,7 +1466,7 @@ virtual public TrainFromPool ExtractTrain(ref TTTrain train, int presentTime) train.OrgAINumber = train.Number; train.Number = 0; train.LeadLocomotiveIndex = selectedTrain.LeadLocomotiveIndex; - for (int carid = 0; carid < train.Cars.Count; carid++ ) + for (int carid = 0; carid < train.Cars.Count; carid++) { train.Cars[carid].CarID = selectedTrain.Cars[carid].CarID; } diff --git a/Source/Orts.Simulation/Simulation/Timetables/TTTrain.cs b/Source/Orts.Simulation/Simulation/Timetables/TTTrain.cs index 3e249242dd..032a43fc66 100644 --- a/Source/Orts.Simulation/Simulation/Timetables/TTTrain.cs +++ b/Source/Orts.Simulation/Simulation/Timetables/TTTrain.cs @@ -68,7 +68,7 @@ public class TTTrain : AITrain public string CreateInPool = String.Empty; // train is to be created in pool at start of timetable public string CreateFromPool = String.Empty; // train is to be created from pool public TimetablePool.PoolExitDirectionEnum CreatePoolDirection = TimetablePool.PoolExitDirectionEnum.Undefined; - // required direction on leaving pool (if applicable) + // required direction on leaving pool (if applicable) public string ForcedConsistName = String.Empty; // forced consist name for extraction from pool public string ttanalysisreport = String.Empty; // string holding last analysis report, to avoid continouos output of same string @@ -104,7 +104,7 @@ public enum PoolAccessState // used to ind public int PoolStorageIndex = -1; // index in selected pool path (>=0) public TimetablePool.PoolExitDirectionEnum PoolExitDirection = TimetablePool.PoolExitDirectionEnum.Undefined; - // required exit direction from pool (if applicable) + // required exit direction from pool (if applicable) public TimetableTurntableControl ActiveTurntable = null; //active turntable public int FormedOf = -1; //indicates out of which train this train is formed @@ -491,7 +491,7 @@ public TTTrain(Simulator simulator, BinaryReader inf, AI airef) } int totalNeedTrainTransfer = inf.ReadInt32(); - NeedTrainTransfer = new Dictionary(); + NeedTrainTransfer = new Dictionary(); for (int iNeedTransferList = 0; iNeedTransferList < totalNeedTrainTransfer; iNeedTransferList++) { @@ -837,7 +837,7 @@ public override void Save(BinaryWriter outf) } outf.Write(NeedTrainTransfer.Count); - foreach (KeyValuePair thisNeedTransfer in NeedTrainTransfer) + foreach (KeyValuePair thisNeedTransfer in NeedTrainTransfer) { outf.Write(thisNeedTransfer.Key); outf.Write(thisNeedTransfer.Value); @@ -1405,7 +1405,7 @@ public override bool PostInit() /// <\summary> public StationStop CalculateStationStop(int platformStartID, int arrivalTime, int departTime, DateTime arrivalDT, DateTime departureDT, float clearingDistanceM, - float minStopDistance, bool terminal, int? actMinStopTime, float? keepClearFront, float? keepClearRear, bool forcePosition, bool closeupSignal, + float minStopDistance, bool terminal, int? actMinStopTime, float? keepClearFront, float? keepClearRear, bool forcePosition, bool closeupSignal, bool closeup, bool restrictPlatformToSignal, bool extendPlatformToSignal, bool endStop) { int platformIndex; @@ -1462,7 +1462,7 @@ public override bool PostInit() // determine end stop position depending on direction StationStop dummyStop = CalculateStationStopPosition(thisRoute, routeIndex, thisPlatform, activeSubroute, - keepClearFront, keepClearRear, forcePosition, closeupSignal, closeup, restrictPlatformToSignal, extendPlatformToSignal, + keepClearFront, keepClearRear, forcePosition, closeupSignal, closeup, restrictPlatformToSignal, extendPlatformToSignal, terminal, platformIndex); // build and add station stop @@ -1514,7 +1514,7 @@ public override bool PostInit() /// /// public StationStop CalculateStationStopPosition(TCSubpathRoute thisRoute, int routeIndex, PlatformDetails thisPlatform, int activeSubroute, - float? keepClearFront, float? keepClearRear, bool forcePosition, bool closeupSignal, bool closeup, + float? keepClearFront, float? keepClearRear, bool forcePosition, bool closeupSignal, bool closeup, bool restrictPlatformToSignal, bool ExtendPlatformToSignal, bool terminal, int platformIndex) { StationStop dummyStop = new StationStop(); @@ -1854,7 +1854,7 @@ public override bool PostInit() TrackCircuitSection followingSection = signalRef.TrackCircuitList[endSectionIndex]; float remLength = followingSection.Length - endOffset; - for (int iSection = lastRouteIndex + 1; iSection < thisRoute.Count; iSection++ ) + for (int iSection = lastRouteIndex + 1; iSection < thisRoute.Count; iSection++) { followingSection = signalRef.TrackCircuitList[thisRoute[iSection].TCSectionIndex]; remLength += followingSection.Length; @@ -2104,7 +2104,7 @@ public override bool PostInit() /// /// public bool CreateStationStop(int platformStartID, int arrivalTime, int departTime, DateTime arrivalDT, DateTime departureDT, float clearingDistanceM, - float minStopDistanceM, bool terminal, int? actMinStopTime, float? keepClearFront, float? keepClearRear, bool forcePosition, bool closeupSignal, + float minStopDistanceM, bool terminal, int? actMinStopTime, float? keepClearFront, float? keepClearRear, bool forcePosition, bool closeupSignal, bool closeup, bool restrictPlatformToSignal, bool extendPlatformToSignal, bool endStop) { StationStop thisStation = CalculateStationStop(platformStartID, arrivalTime, departTime, arrivalDT, departureDT, clearingDistanceM, @@ -2303,7 +2303,7 @@ public override bool CheckStationPosition(PlatformDetails thisPlatform, int stat { atStation = true; } - + return (atStation); } @@ -2436,7 +2436,7 @@ public void RecalculateStationStops(bool atStation) PlatformDetails thisPlatform = actualStation.PlatformItem; StationStop newStop = CalculateStationStopPosition(TCRoute.TCRouteSubpaths[actualStation.SubrouteIndex], actualStation.RouteIndex, actualStation.PlatformItem, - actualStation.SubrouteIndex, actualStation.KeepClearFront, actualStation.KeepClearRear, actualStation.ForcePosition, + actualStation.SubrouteIndex, actualStation.KeepClearFront, actualStation.KeepClearRear, actualStation.ForcePosition, actualStation.CloseupSignal, actualStation.Closeup, actualStation.RestrictPlatformToSignal, actualStation.ExtendPlatformToSignal, actualStation.Terminal, actualStation.PlatformReference); @@ -3134,7 +3134,7 @@ public override void SetReversalAction() { return; // station stop required - reversal not valid } - + if (nextActionInfo != null && nextActionInfo.NextAction == AIActionItem.AI_ACTION_TYPE.REVERSAL) { return; // other reversal still active - reversal not valid @@ -3391,7 +3391,7 @@ public override AITrain.AI_MOVEMENT_STATE UpdateStoppedState(float elapsedClockS } - // Other node mode : check distance ahead (path may have cleared) + // Other node mode : check distance ahead (path may have cleared) else if (ControlMode == TRAIN_CONTROL.AUTO_NODE) { @@ -3411,7 +3411,7 @@ public override AITrain.AI_MOVEMENT_STATE UpdateStoppedState(float elapsedClockS } } - // signal node : check state of signal + // signal node : check state of signal else if (ControlMode == TRAIN_CONTROL.AUTO_SIGNAL) { @@ -3567,7 +3567,7 @@ public override AITrain.AI_MOVEMENT_STATE UpdateStoppedState(float elapsedClockS { File.AppendAllText(@"C:\temp\checktrain.txt", "Train " + Number.ToString() + " , forced to BRAKING from invalid stop (now at " + - // FormatStrings.FormatDistance(PresentPosition[0].DistanceTravelledM, true) + ")\n"); + // FormatStrings.FormatDistance(PresentPosition[0].DistanceTravelledM, true) + ")\n"); PresentPosition[0].DistanceTravelledM.ToString() + ")\n"); } } @@ -4246,7 +4246,7 @@ public override void UpdateBrakingState(float elapsedClockSeconds, int presentTi } } - // check if speedlimit on signal is cleared + // check if speedlimit on signal is cleared else if (nextActionInfo.NextAction == AIActionItem.AI_ACTION_TYPE.SPEED_SIGNAL) { @@ -4271,8 +4271,8 @@ public override void UpdateBrakingState(float elapsedClockSeconds, int presentTi nextActionInfo.ActiveItem.ObjectDetails.thisRef.ToString() + " : speed : " + FormatStrings.FormatSpeed(nextActionInfo.ActiveItem.actual_speed, true) + " >= limit : " + FormatStrings.FormatSpeed(AllowedMaxSpeedMpS, true) + " at " + - //FormatStrings.FormatDistance(nextActionInfo.ActivateDistanceM, true) + " (now at " + - //FormatStrings.FormatDistance(PresentPosition[0].DistanceTravelledM, true) + " - " + + //FormatStrings.FormatDistance(nextActionInfo.ActivateDistanceM, true) + " (now at " + + //FormatStrings.FormatDistance(PresentPosition[0].DistanceTravelledM, true) + " - " + nextActionInfo.ActivateDistanceM.ToString() + " (now at " + PresentPosition[0].DistanceTravelledM.ToString() + " - " + FormatStrings.FormatSpeed(SpeedMpS, true) + ")\n"); @@ -4304,7 +4304,7 @@ public override void UpdateBrakingState(float elapsedClockSeconds, int presentTi } } - // check if STOP signal cleared + // check if STOP signal cleared else if (nextActionInfo.NextAction == AIActionItem.AI_ACTION_TYPE.SIGNAL_ASPECT_STOP) { @@ -4326,8 +4326,8 @@ public override void UpdateBrakingState(float elapsedClockSeconds, int presentTi File.AppendAllText(@"C:\temp\checktrain.txt", "Train " + Number.ToString() + " : signal " + nextActionInfo.ActiveItem.ObjectDetails.thisRef.ToString() + " at " + - //FormatStrings.FormatDistance(nextActionInfo.ActivateDistanceM, true) + " cleared (now at " + - //FormatStrings.FormatDistance(PresentPosition[0].DistanceTravelledM, true) + " - " + + //FormatStrings.FormatDistance(nextActionInfo.ActivateDistanceM, true) + " cleared (now at " + + //FormatStrings.FormatDistance(PresentPosition[0].DistanceTravelledM, true) + " - " + nextActionInfo.ActivateDistanceM.ToString() + " cleared (now at " + PresentPosition[0].DistanceTravelledM.ToString() + " - " + FormatStrings.FormatSpeed(SpeedMpS, true) + ")\n"); @@ -4353,8 +4353,8 @@ public override void UpdateBrakingState(float elapsedClockSeconds, int presentTi File.AppendAllText(@"C:\temp\checktrain.txt", Number.ToString() + " : signal " + nextActionInfo.ActiveItem.ObjectDetails.thisRef.ToString() + " at " + - //FormatStrings.FormatDistance(nextActionInfo.ActivateDistanceM, true) + " cleared (now at " + - //FormatStrings.FormatDistance(PresentPosition[0].DistanceTravelledM, true) + " - " + + //FormatStrings.FormatDistance(nextActionInfo.ActivateDistanceM, true) + " cleared (now at " + + //FormatStrings.FormatDistance(PresentPosition[0].DistanceTravelledM, true) + " - " + nextActionInfo.ActivateDistanceM.ToString() + " cleared (now at " + PresentPosition[0].DistanceTravelledM.ToString() + " - " + FormatStrings.FormatSpeed(SpeedMpS, true) + ")\n"); @@ -4363,7 +4363,7 @@ public override void UpdateBrakingState(float elapsedClockSeconds, int presentTi } } - // check if RESTRICTED signal cleared + // check if RESTRICTED signal cleared else if (nextActionInfo.NextAction == AIActionItem.AI_ACTION_TYPE.SIGNAL_ASPECT_RESTRICTED) { @@ -4385,8 +4385,8 @@ public override void UpdateBrakingState(float elapsedClockSeconds, int presentTi File.AppendAllText(@"C:\temp\checktrain.txt", Number.ToString() + " : signal " + nextActionInfo.ActiveItem.ObjectDetails.thisRef.ToString() + " at " + - //FormatStrings.FormatDistance(nextActionInfo.ActivateDistanceM, true) + " cleared (now at " + - //FormatStrings.FormatDistance(PresentPosition[0].DistanceTravelledM, true) + " - " + + //FormatStrings.FormatDistance(nextActionInfo.ActivateDistanceM, true) + " cleared (now at " + + //FormatStrings.FormatDistance(PresentPosition[0].DistanceTravelledM, true) + " - " + nextActionInfo.ActivateDistanceM.ToString() + " cleared (now at " + PresentPosition[0].DistanceTravelledM.ToString() + " - " + FormatStrings.FormatSpeed(SpeedMpS, true) + ")\n"); @@ -4394,7 +4394,7 @@ public override void UpdateBrakingState(float elapsedClockSeconds, int presentTi } } - // check if END_AUTHORITY extended + // check if END_AUTHORITY extended else if (nextActionInfo.NextAction == AIActionItem.AI_ACTION_TYPE.END_OF_AUTHORITY) { @@ -4561,7 +4561,7 @@ public override void UpdateBrakingState(float elapsedClockSeconds, int presentTi } } - // perform slow approach to stop + // perform slow approach to stop else if (distanceToGoM > 0) { if (AITrainBrakePercent < 50) @@ -4603,7 +4603,7 @@ public override void UpdateBrakingState(float elapsedClockSeconds, int presentTi } } - // check if approaching reversal point + // check if approaching reversal point else if (nextActionInfo.NextAction == AIActionItem.AI_ACTION_TYPE.REVERSAL) { @@ -5144,7 +5144,7 @@ public override void UpdateFollowingState(float elapsedClockSeconds, int present File.AppendAllText(@"C:\temp\checktrain.txt", "Update Train Ahead - now at : " + PresentPosition[0].TCSectionIndex.ToString() + " " + - // FormatStrings.FormatDistance(PresentPosition[0].TCOffset, true) + + // FormatStrings.FormatDistance(PresentPosition[0].TCOffset, true) + PresentPosition[0].TCOffset.ToString() + " ; speed : " + FormatStrings.FormatSpeed(SpeedMpS, true) + "\n"); } @@ -5250,11 +5250,11 @@ public override void UpdateFollowingState(float elapsedClockSeconds, int present File.AppendAllText(@"C:\temp\checktrain.txt", "Other train : " + OtherTrain.Number.ToString() + " at : " + OtherTrain.PresentPosition[0].TCSectionIndex.ToString() + " " + - // FormatStrings.FormatDistance(OtherTrain.PresentPosition[0].TCOffset, true) + + // FormatStrings.FormatDistance(OtherTrain.PresentPosition[0].TCOffset, true) + OtherTrain.PresentPosition[0].TCOffset.ToString() + " ; speed : " + FormatStrings.FormatSpeed(OtherTrain.SpeedMpS, true) + "\n"); File.AppendAllText(@"C:\temp\checktrain.txt", - // "DistAhd: " + FormatStrings.FormatDistance(DistanceToEndNodeAuthorityM[0], true) + "\n"); + // "DistAhd: " + FormatStrings.FormatDistance(DistanceToEndNodeAuthorityM[0], true) + "\n"); "DistAhd: " + DistanceToEndNodeAuthorityM[0].ToString() + "\n"); } @@ -5676,7 +5676,7 @@ public override void UpdateRunningState(float elapsedClockSeconds) { if (CheckTrain) { - File.AppendAllText(@"C:\temp\checktrain.txt","Section : > AllowedMaxSpeedMps \n"); + File.AppendAllText(@"C:\temp\checktrain.txt", "Section : > AllowedMaxSpeedMps \n"); } if (AITrainThrottlePercent > 0) @@ -7300,7 +7300,7 @@ public bool CheckTransfer(TTTrain otherTrain, ref int? stationTransferIndex, ref transferTrain = true; trainTransferIndex = otherTrain.OrgAINumber; } - + // if found, no need to look any further if (transferTrain) { @@ -8430,7 +8430,7 @@ public void ProcessWaitRequest(WaitInfo reqWait, TTTrain otherTrain, bool allowS // if same direction and atStart not set also use next section as start for common section search // if same direction and atStart is set use first section as start for common section search as train is to wait in this section lastIndex++; - if (!sameDirection || !atStart) + if (!sameDirection || !atStart) { thisTrainStartRouteIndex = lastIndex; } @@ -11558,7 +11558,7 @@ public int GetUnitsToDetach(DetachInfo.DetachUnitsInfo detachUnits, int numberOf case DetachInfo.DetachUnitsInfo.consists: bool inConsist = false; - + // check if front must be detached if (detachConsist.Contains(Cars[0].OrgConsist)) { @@ -12687,7 +12687,7 @@ public int CreateStaticTrain(TTTrain train, ref List trainList, string formedTrain.AI = train.AI; trainList.Add(formedTrain); - return(formedTrain.Number); + return (formedTrain.Number); } //================================================================================================// @@ -13347,7 +13347,7 @@ public enum DetachUnitsInfo /// /// /// - public DetachInfo(bool atStart, bool atEnd, bool atStation, int sectionIndex, bool leadingPower, bool allLeadingPower, bool trailingPower, bool allTrailingPower, + public DetachInfo(bool atStart, bool atEnd, bool atStation, int sectionIndex, bool leadingPower, bool allLeadingPower, bool trailingPower, bool allTrailingPower, bool onlyPower, bool nonPower, int units, int? time, int formedTrain, bool reverseTrain) { if (atStart) @@ -13760,7 +13760,7 @@ public bool PerformDetach(TTTrain train, bool allowPlayerSelect) // create dummy train - train will be removed but timetable can continue newTrain = new TTTrain(train.AI.Simulator, train); newTrain.AI = train.AI; // set AT as Simulator.AI does not exist in prerun mode - newTrain.ValidRoute[0] = train.signalRef.BuildTempRoute(newTrain, train.PresentPosition[0].TCSectionIndex, + newTrain.ValidRoute[0] = train.signalRef.BuildTempRoute(newTrain, train.PresentPosition[0].TCSectionIndex, train.PresentPosition[0].TCOffset, train.PresentPosition[0].TCDirection, train.Length, true, true, false); train.PresentPosition[0].CopyTo(ref newTrain.PresentPosition[0]); train.PresentPosition[1].CopyTo(ref newTrain.PresentPosition[1]); @@ -13951,7 +13951,7 @@ public bool PerformDetach(TTTrain train, bool allowPlayerSelect) } } - return(true); + return (true); } //================================================================================================// @@ -14550,12 +14550,12 @@ public PickUpInfo(int stationPlatformReference, TTTrainCommands thisCommand, TTT { switch (thisCommand.CommandQualifiers[0].QualifierName) { - case "static" : + case "static": PickUpStatic = true; StationPlatformReference = stationPlatformReference; break; - default : + default: Trace.TraceInformation("Train : {0} : unknown pickup qualifier : {1}", thisTrain.Name, thisCommand.CommandQualifiers[0].QualifierName); break; } @@ -14753,12 +14753,12 @@ public TransferInfo(int stationPlatformReference, TTTrainCommands thisCommand, T switch (thisCommand.CommandQualifiers[0].QualifierName) { // static is allowed, will be inserted with key -99 - case "static" : + case "static": TransferTrain = -99; break; // other qualifiers processed below - default : + default: break; } } @@ -14891,7 +14891,7 @@ public TransferInfo(int stationPlatformReference, TTTrainCommands thisCommand, T /// public TransferInfo(BinaryReader inf) { - TypeOfTransfer = (TransferType) inf.ReadInt32(); + TypeOfTransfer = (TransferType)inf.ReadInt32(); TransferUnitsInfo = (DetachInfo.DetachUnitsInfo)inf.ReadInt32(); TransferUnitCount = inf.ReadInt32(); @@ -15275,7 +15275,7 @@ public void SetTransferXRef(TTTrain dettrain, List trainList, TTTrain p transferTrain = playerTrain; trainFound = true; } - } + } // issue warning if train not found if (!trainFound) diff --git a/Source/Orts.Simulation/Simulation/Timetables/TTTurntable.cs b/Source/Orts.Simulation/Simulation/Timetables/TTTurntable.cs index d2d8a7e6e5..a7afc8ca8c 100644 --- a/Source/Orts.Simulation/Simulation/Timetables/TTTurntable.cs +++ b/Source/Orts.Simulation/Simulation/Timetables/TTTurntable.cs @@ -22,18 +22,17 @@ // #define DEBUG_TURNTABLEINFO // -using Microsoft.Xna.Framework; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; -using System.Text; +using Microsoft.Xna.Framework; +using Orts.Parsers.OR; using Orts.Simulation.AIs; using Orts.Simulation.Physics; using Orts.Simulation.RollingStocks; using Orts.Simulation.Signalling; -using Orts.Parsers.OR; using ORTS.Common; namespace Orts.Simulation.Timetables @@ -922,7 +921,7 @@ public override bool TestPoolExit(TTTrain train) return (validPath); } public bool TestPoolAccess(TTTrain train, out int accessIndex) - { + { bool validPool = false; int reqPath = -1; int reqPathIndex = -1; @@ -2179,7 +2178,7 @@ public int GetAccessPathIndex() // search if section in access path // direction must be reverse as access path is defined outbound int reqPath = -1; - for (int iPath=0; iPath <= parentPool.AdditionalTurntableDetails.AccessPaths.Count - 1 && reqPath < 0; iPath++) + for (int iPath = 0; iPath <= parentPool.AdditionalTurntableDetails.AccessPaths.Count - 1 && reqPath < 0; iPath++) { int routeIndex = parentPool.AdditionalTurntableDetails.AccessPaths[iPath].AccessPath.GetRouteIndex(presentSection, 0); if (routeIndex >= 0 && parentPool.AdditionalTurntableDetails.AccessPaths[iPath].AccessPath[routeIndex].Direction != presentDirection) @@ -2234,7 +2233,7 @@ public int GetAccessPathIndex() if (parentTurntable.TrainsOnMovingTable.Count > 0) { PrepareMoveOffTable(); - } + } return (true); } @@ -2370,7 +2369,7 @@ public int GetAccessPathIndex() } // rotate clockwise or counterclockwise depending on angle - if ( angleToMove < 0) + if (angleToMove < 0) { parentTurntable.AutoCounterclockwise = true; #if DEBUG_TURNTABLEINFO @@ -2824,7 +2823,7 @@ public void RemoveTrainFromTurntable() //================================================================================================// - public bool TestTrainFormation (TTTrain parentTrain) + public bool TestTrainFormation(TTTrain parentTrain) { bool reqReverse = true; diff --git a/Source/Orts.Simulation/Simulation/Transfertables.cs b/Source/Orts.Simulation/Simulation/Transfertables.cs index 9bf0abb633..84e399fd6b 100644 --- a/Source/Orts.Simulation/Simulation/Transfertables.cs +++ b/Source/Orts.Simulation/Simulation/Transfertables.cs @@ -15,19 +15,15 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections.Generic; +using System.IO; using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; using Orts.Parsers.Msts; -using ORTS.Common; -using Orts.Formats.Msts; using Orts.Simulation.Physics; using Orts.Simulation.RollingStocks; using Orts.Simulation.Signalling; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; +using ORTS.Common; namespace Orts.Simulation { @@ -37,7 +33,7 @@ namespace Orts.Simulation /// - + public class Transfertable : MovingTable { public float Span; // horizontal or vertical @@ -62,17 +58,17 @@ public float OffsetDiff public Signals signalRef { get; protected set; } - public Transfertable(STFReader stf, Simulator simulator): base(stf, simulator) + public Transfertable(STFReader stf, Simulator simulator) : base(stf, simulator) { signalRef = Simulator.Signals; string animation; WorldPosition.XNAMatrix.M44 = 100000000; //WorlPosition not yet defined, will be loaded when loading related tile stf.MustMatch("("); - stf.ParseBlock(new[] { + stf.ParseBlock(new[] { new STFReader.TokenProcessor("wfile", ()=>{ WFile = stf.ReadStringBlock(null); WorldPosition.TileX = int.Parse(WFile.Substring(1, 7)); - WorldPosition.TileZ = int.Parse(WFile.Substring(8, 7)); + WorldPosition.TileZ = int.Parse(WFile.Substring(8, 7)); }), new STFReader.TokenProcessor("uid", ()=>{ UID = stf.ReadIntBlock(-1); }), new STFReader.TokenProcessor("animation", ()=>{ animation = stf.ReadStringBlock(null); @@ -324,13 +320,13 @@ public void GeneralStartContinuous(bool isForward) RelativeRearTravellerXNALocation = Vector3.Transform(XNALocation, invAnimationXNAMatrix); train.ControlMode = Train.TRAIN_CONTROL.TURNTABLE; } - Simulator.Confirmer.Information (Simulator.Catalog.GetStringFmt("Transfertable starting transferring train")); + Simulator.Confirmer.Information(Simulator.Catalog.GetStringFmt("Transfertable starting transferring train")); // Computing position of cars relative to center of transfertable - } - Forward = isForward; - Reverse = !isForward; - Continuous = true; + } + Forward = isForward; + Reverse = !isForward; + Continuous = true; } public void ComputeCenter(WorldPosition worldPosition) @@ -393,12 +389,12 @@ public override void Update() Connected = true; Forward = false; ConnectedTrackEnd = ConnectedTarget; - Simulator.Confirmer.Information (Simulator.Catalog.GetStringFmt("Transfertable connected")); + Simulator.Confirmer.Information(Simulator.Catalog.GetStringFmt("Transfertable connected")); GoToTarget = true; TargetOffset = Offsets[ConnectedTarget]; } } - } + } else if (Reverse) { Connected = false; @@ -425,7 +421,7 @@ public override void Update() public void TargetExactlyReached() { Traveller.TravellerDirection direction = Traveller.TravellerDirection.Forward; - direction = SaveConnected ^ !MyTrackNodesOrientation[ConnectedTrackEnd]? direction : (direction == Traveller.TravellerDirection.Forward ? Traveller.TravellerDirection.Backward : Traveller.TravellerDirection.Forward); + direction = SaveConnected ^ !MyTrackNodesOrientation[ConnectedTrackEnd] ? direction : (direction == Traveller.TravellerDirection.Forward ? Traveller.TravellerDirection.Backward : Traveller.TravellerDirection.Forward); GoToTarget = false; if (TrainsOnMovingTable.Count == 1) { @@ -445,7 +441,7 @@ public override bool CheckMovingTableAligned(Train train, bool forward) if ((Connected) && MyTrVectorSectionsIndex[ConnectedTrackEnd] != -1 && MyTrackNodesIndex[ConnectedTrackEnd] != -1 && (MyTrackNodesIndex[ConnectedTrackEnd] == train.FrontTDBTraveller.TN.Index || MyTrackNodesIndex[ConnectedTrackEnd] == train.RearTDBTraveller.TN.Index)) { - return true; + return true; } return false; } @@ -454,7 +450,7 @@ public override bool CheckMovingTableAligned(Train train, bool forward) /// PerformUpdateActions: actions to be performed at every animation step /// /// - public void PerformUpdateActions ( Matrix absAnimationMatrix, WorldPosition worldPosition ) + public void PerformUpdateActions(Matrix absAnimationMatrix, WorldPosition worldPosition) { TransferTrain(absAnimationMatrix); if (GoToTarget && TrainsOnMovingTable.Count == 1 && TrainsOnMovingTable[0].Train.ControlMode == Train.TRAIN_CONTROL.TURNTABLE) diff --git a/Source/Orts.Simulation/Simulation/Traveller.cs b/Source/Orts.Simulation/Simulation/Traveller.cs index bce40933eb..2fcd5bc9cb 100644 --- a/Source/Orts.Simulation/Simulation/Traveller.cs +++ b/Source/Orts.Simulation/Simulation/Traveller.cs @@ -15,15 +15,15 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Microsoft.Xna.Framework; -using Orts.Formats.Msts; -using Orts.Simulation.AIs; -using ORTS.Common; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; +using Microsoft.Xna.Framework; +using Orts.Formats.Msts; +using Orts.Simulation.AIs; +using ORTS.Common; namespace Orts.Simulation { @@ -292,7 +292,7 @@ public Traveller(TrackSectionsFile tSectionDat, TrackNode[] trackNodes, TrackNod { throw new MissingTrackNodeException(); } - + } // Figure out which end of the track node is closest and use that. diff --git a/Source/Orts.Simulation/Simulation/Turntables.cs b/Source/Orts.Simulation/Simulation/Turntables.cs index 358a8cce1c..b6f537c1ee 100644 --- a/Source/Orts.Simulation/Simulation/Turntables.cs +++ b/Source/Orts.Simulation/Simulation/Turntables.cs @@ -15,19 +15,16 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; using Orts.Parsers.Msts; -using ORTS.Common; -using Orts.Formats.Msts; using Orts.Simulation.Physics; using Orts.Simulation.RollingStocks; using Orts.Simulation.Signalling; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; +using ORTS.Common; namespace Orts.Simulation { @@ -148,7 +145,7 @@ private void SaveVector(BinaryWriter outf, Vector3 vector) outf.Write(vector.Z); } - /// + /// /// Restores the general variable parameters /// Called from within the Simulator class. /// @@ -307,7 +304,7 @@ public bool CheckTrainOnMovingTable(Train train) } - public virtual void StartContinuous (bool isClockwise) + public virtual void StartContinuous(bool isClockwise) { } @@ -843,7 +840,7 @@ public override void Update() public void TargetExactlyReached() { Traveller.TravellerDirection direction = ForwardConnected ? Traveller.TravellerDirection.Forward : Traveller.TravellerDirection.Backward; - direction = SaveForwardConnected ^ !MyTrackNodesOrientation[ConnectedTrackEnd]? direction : (direction == Traveller.TravellerDirection.Forward ? Traveller.TravellerDirection.Backward : Traveller.TravellerDirection.Forward); + direction = SaveForwardConnected ^ !MyTrackNodesOrientation[ConnectedTrackEnd] ? direction : (direction == Traveller.TravellerDirection.Forward ? Traveller.TravellerDirection.Backward : Traveller.TravellerDirection.Forward); GoToTarget = false; if (TrainsOnMovingTable.Count == 1) { @@ -864,8 +861,8 @@ public override bool CheckMovingTableAligned(Train train, bool forward) if ((ForwardConnected || RearConnected) && MyTrVectorSectionsIndex[ConnectedTrackEnd] != -1 && MyTrackNodesIndex[ConnectedTrackEnd] != -1 && (MyTrackNodesIndex[ConnectedTrackEnd] == train.FrontTDBTraveller.TN.Index || MyTrackNodesIndex[ConnectedTrackEnd] == train.RearTDBTraveller.TN.Index)) { - direction = ForwardConnected ? Traveller.TravellerDirection.Forward : Traveller.TravellerDirection.Backward; - return true; + direction = ForwardConnected ? Traveller.TravellerDirection.Forward : Traveller.TravellerDirection.Backward; + return true; } direction = Traveller.TravellerDirection.Forward; return false; @@ -900,7 +897,7 @@ public bool CheckOnSection(Traveller trainPosition) /// PerformUpdateActions: actions to be performed at every animation step /// /// - public void PerformUpdateActions ( Matrix absAnimationMatrix) + public void PerformUpdateActions(Matrix absAnimationMatrix) { RotateTrain(absAnimationMatrix); if ((GoToTarget || GoToAutoTarget) && TrainsOnMovingTable.Count == 1 && TrainsOnMovingTable[0].Train.ControlMode == Train.TRAIN_CONTROL.TURNTABLE) @@ -918,7 +915,7 @@ public class TrainOnMovingTable public bool BackOnBoard; public Simulator Simulator; - public TrainOnMovingTable (Train train, Simulator simulator) + public TrainOnMovingTable(Train train, Simulator simulator) { Train = train; Simulator = simulator; @@ -929,7 +926,7 @@ public TrainOnMovingTable(Simulator simulator) Simulator = simulator; } - public void Save (BinaryWriter outf) + public void Save(BinaryWriter outf) { outf.Write(Train.Number); outf.Write(FrontOnBoard); @@ -943,7 +940,7 @@ public void Restore(BinaryReader inf) BackOnBoard = inf.ReadBoolean(); } - public void SetFrontState (bool frontOnBoard) + public void SetFrontState(bool frontOnBoard) { FrontOnBoard = frontOnBoard; } diff --git a/Source/Orts.Simulation/Simulation/Weather.cs b/Source/Orts.Simulation/Simulation/Weather.cs index 2d6fff3cbe..7d388dfc46 100644 --- a/Source/Orts.Simulation/Simulation/Weather.cs +++ b/Source/Orts.Simulation/Simulation/Weather.cs @@ -16,8 +16,6 @@ // along with Open Rails. If not, see . using Microsoft.Xna.Framework; -using System; -using System.Diagnostics; namespace Orts.Simulation { @@ -38,18 +36,18 @@ public class Weather // Overcast factor: 0.0 = almost no clouds; 0.1 = wispy clouds; 1.0 = total overcast. public float OvercastFactor; - + // Pricipitation intensity in particles per second per meter^2 (PPSPM2). public float PricipitationIntensityPPSPM2; - + // Fog/visibility distance. Ranges from 10m (can't see anything), 5km (medium), 20km (clear) to 100km (clear arctic). public float FogDistance; - + // Precipitation liquidity; =1 for rain, =0 for snow; intermediate values possible with dynamic weather; public float PrecipitationLiquidity; public float CalculatedWindDirection; public Vector2 WindSpeedMpS = new Vector2(); - public float WindSpeed {get { return WindSpeedMpS.Length(); } } + public float WindSpeed { get { return WindSpeedMpS.Length(); } } // public float WindDirection { get { return (float)Math.Atan2(WindSpeedMpS.X, WindSpeedMpS.Y); } } public float WindDirection { get { return CalculatedWindDirection; } } } diff --git a/Source/RunActivity/Processes/Profiler.cs b/Source/RunActivity/Processes/Profiler.cs index 8d428efed8..4dc493b485 100644 --- a/Source/RunActivity/Processes/Profiler.cs +++ b/Source/RunActivity/Processes/Profiler.cs @@ -17,11 +17,11 @@ // This file is the responsibility of the 3D & Environment Team. -using ORTS.Common; using System; using System.Diagnostics; using System.IO; using System.Threading; +using ORTS.Common; namespace Orts.Processes { diff --git a/Source/RunActivity/Viewer3D/ALSoundHelper.cs b/Source/RunActivity/Viewer3D/ALSoundHelper.cs index d486dc9a42..6e3acc4eda 100644 --- a/Source/RunActivity/Viewer3D/ALSoundHelper.cs +++ b/Source/RunActivity/Viewer3D/ALSoundHelper.cs @@ -17,11 +17,11 @@ // This file is the responsibility of the 3D & Environment Team. -using Orts.Simulation.RollingStocks; using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; +using Orts.Simulation.RollingStocks; namespace Orts.Viewer3D { @@ -160,7 +160,7 @@ public bool isMine(int bufferID) { return (bufferID != 0 && BufferIDs.Any(value => bufferID == value)); } - + public bool isLast(int soundSourceID) { if (_isSingle) @@ -249,7 +249,7 @@ public bool IsCheckpoint(int soundSourceID, int bufferID, float pitch) } if (bid == -1) return false; - + int len = (int)(CheckFactor * pitch); if (BufferLens[bid] < len) return true; @@ -995,7 +995,7 @@ public void Queue(string Name, PlayMode Mode, bool isExternal, bool isReleasedWi for (int i = 1; i < 5; i++) { - prev = SoundQueue[(QueueHeader - i) % QUEUELENGHT]; + prev = SoundQueue[(QueueHeader - i) % QUEUELENGHT]; prevMode = prev.PlayMode; @@ -1107,7 +1107,7 @@ private void HardCleanQueue() if (h >= QueueTail) { int i; - for (i = h-1; i >= QueueTail; i--) + for (i = h - 1; i >= QueueTail; i--) { SoundQueue[i % QUEUELENGHT].PlayState = PlayState.NOP; } @@ -1151,7 +1151,7 @@ private void Start() public void Stop() { OpenAL.alSourceStop(SoundSourceID); - OpenAL.alSourcei(SoundSourceID, OpenAL.AL_BUFFER, OpenAL.AL_NONE); + OpenAL.alSourcei(SoundSourceID, OpenAL.AL_BUFFER, OpenAL.AL_NONE); SkipProcessed(); isPlaying = false; } @@ -1236,7 +1236,7 @@ public string[] GetPlayingData() if (SoundQueue[QueueTail % QUEUELENGHT].PlayState != PlayState.NOP) { - retval[3] = String.Format("{0} {1}{2}", + retval[3] = String.Format("{0} {1}{2}", SoundQueue[QueueTail % QUEUELENGHT].PlayState, SoundQueue[QueueTail % QUEUELENGHT].PlayMode, SoundQueue[QueueTail % QUEUELENGHT].SoftLoopPoints && SoundQueue[QueueTail % QUEUELENGHT].PlayMode == PlayMode.LoopRelease ? "Soft" : ""); diff --git a/Source/RunActivity/Viewer3D/AnimatedPart.cs b/Source/RunActivity/Viewer3D/AnimatedPart.cs index f33240fdfc..02cccadbe2 100644 --- a/Source/RunActivity/Viewer3D/AnimatedPart.cs +++ b/Source/RunActivity/Viewer3D/AnimatedPart.cs @@ -15,11 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Orts.Formats.Msts; -using ORTS.Common; using System; using System.Collections.Generic; using System.Linq; +using Orts.Formats.Msts; +using ORTS.Common; namespace Orts.Viewer3D { diff --git a/Source/RunActivity/Viewer3D/Cameras.cs b/Source/RunActivity/Viewer3D/Cameras.cs index 92915e5131..7d372c6c1e 100644 --- a/Source/RunActivity/Viewer3D/Cameras.cs +++ b/Source/RunActivity/Viewer3D/Cameras.cs @@ -805,7 +805,7 @@ protected internal override void Restore(BinaryReader inf) if (carIndex < Viewer.SelectedTrain.Cars.Count) attachedCar = Viewer.SelectedTrain.Cars[carIndex]; else if (Viewer.SelectedTrain.Cars.Count > 0) - attachedCar = Viewer.SelectedTrain.Cars[Viewer.SelectedTrain.Cars.Count -1]; + attachedCar = Viewer.SelectedTrain.Cars[Viewer.SelectedTrain.Cars.Count - 1]; } attachedLocation.X = inf.ReadSingle(); attachedLocation.Y = inf.ReadSingle(); @@ -1251,7 +1251,7 @@ protected void UpdateTrainBrowsing(ElapsedTime elapsedTime) { var ZIncrM = -BrowseSpeedMpS * elapsedTime.ClockSeconds; ZDistanceM += ZIncrM; - if (-ZDistanceM >= attachedCar.Train.Length - (trainCars.First().CarLengthM + trainCars.Last().CarLengthM) * 0.5f) + if (-ZDistanceM >= attachedCar.Train.Length - (trainCars.First().CarLengthM + trainCars.Last().CarLengthM) * 0.5f) { ZIncrM = -attachedCar.Train.Length + (trainCars.First().CarLengthM + trainCars.Last().CarLengthM) * 0.5f - (ZDistanceM - ZIncrM); ZDistanceM = -attachedCar.Train.Length + (trainCars.First().CarLengthM + trainCars.Last().CarLengthM) * 0.5f; @@ -1286,7 +1286,7 @@ protected void UpdateTrainBrowsing(ElapsedTime elapsedTime) else browsedTraveller.Move(elapsedTime.ClockSeconds * attachedCar.Train.SpeedMpS); } - protected void ComputeCarOffsets( TrackingCamera camera) + protected void ComputeCarOffsets(TrackingCamera camera) { var trainCars = camera.GetCameraCars(); camera.HighWagonOffsetLimit = trainCars.First().CarLengthM * 0.5f; @@ -1387,7 +1387,7 @@ public override void NextCar() HighWagonOffsetLimit += attachedCar.CarLengthM; ZDistanceM = LowWagonOffsetLimit + attachedCar.CarLengthM * 0.5f; } - // LookedAtPosition = new WorldPosition(attachedCar.WorldPosition); + // LookedAtPosition = new WorldPosition(attachedCar.WorldPosition); } public override void PreviousCar() @@ -1404,7 +1404,7 @@ public override void PreviousCar() LowWagonOffsetLimit -= attachedCar.CarLengthM; ZDistanceM = LowWagonOffsetLimit + attachedCar.CarLengthM * 0.5f; } - // LookedAtPosition = new WorldPosition(attachedCar.WorldPosition); + // LookedAtPosition = new WorldPosition(attachedCar.WorldPosition); } public override void FirstCar() @@ -1416,7 +1416,7 @@ public override void FirstCar() ZDistanceM = 0; HighWagonOffsetLimit = attachedCar.CarLengthM * 0.5f; LowWagonOffsetLimit = -attachedCar.CarLengthM * 0.5f; -// LookedAtPosition = new WorldPosition(attachedCar.WorldPosition); + // LookedAtPosition = new WorldPosition(attachedCar.WorldPosition); } public override void LastCar() @@ -1429,7 +1429,7 @@ public override void LastCar() ZDistanceM = -attachedCar.Train.Length + (trainCars.First().CarLengthM + trainCars.Last().CarLengthM) * 0.5f; LowWagonOffsetLimit = -attachedCar.Train.Length + trainCars.First().CarLengthM * 0.5f; HighWagonOffsetLimit = LowWagonOffsetLimit + attachedCar.CarLengthM; -// LookedAtPosition = new WorldPosition(attachedCar.WorldPosition); + // LookedAtPosition = new WorldPosition(attachedCar.WorldPosition); } public void ToggleBrowseBackwards() @@ -1439,7 +1439,7 @@ public void ToggleBrowseBackwards() { if (!BrowseMode) { -// LookedAtPosition = new WorldPosition(attachedCar.WorldPosition); + // LookedAtPosition = new WorldPosition(attachedCar.WorldPosition); browsedTraveller = new Traveller(attachedCar.Train.FrontTDBTraveller); browsedTraveller.Move(-attachedCar.CarLengthM * 0.5f + ZDistanceM); BrowseDistance = attachedCar.CarLengthM * 0.5f; @@ -1456,18 +1456,18 @@ public void ToggleBrowseForwards() { if (!BrowseMode) { -// LookedAtPosition = new WorldPosition(attachedCar.WorldPosition); + // LookedAtPosition = new WorldPosition(attachedCar.WorldPosition); browsedTraveller = new Traveller(attachedCar.Train.RearTDBTraveller); var trainCars = GetCameraCars(); browsedTraveller.Move((attachedCar.CarLengthM - trainCars.First().CarLengthM - trainCars.Last().CarLengthM) * 0.5f + attachedCar.Train.Length + ZDistanceM); BrowseDistance = attachedCar.CarLengthM * 0.5f; BrowseMode = true; } - } + } BrowseBackwards = false; } } - + public abstract class NonTrackingCamera : AttachedCamera { public NonTrackingCamera(Viewer viewer) @@ -1792,7 +1792,7 @@ protected override void SetCameraCar(TrainCar car) } } - protected void ResetViewPoint (TrainCar car) + protected void ResetViewPoint(TrainCar car) { prevcar = car.CarID; prevViewPoint = ActViewPoint; @@ -1813,7 +1813,7 @@ public override void HandleUserInput(ElapsedTime elapsedTime) if (UserInput.IsPressed(UserCommand.CameraChangePassengerViewPoint)) new CameraChangePassengerViewPointCommand(Viewer.Log); } - + public void SwitchSideCameraCar(TrainCar car) { attachedLocation.X = -attachedLocation.X; @@ -1977,7 +1977,7 @@ public class CabCamera : NonTrackingCamera { private readonly SavingProperty LetterboxProperty; protected int[] sideLocation = new int[2]; - public int SideLocation { get { return attachedCar == null? sideLocation[0] : (attachedCar as MSTSLocomotive).UsingRearCab ? sideLocation[1] : sideLocation[0]; } } + public int SideLocation { get { return attachedCar == null ? sideLocation[0] : (attachedCar as MSTSLocomotive).UsingRearCab ? sideLocation[1] : sideLocation[0]; } } public override Styles Style { get { return Styles.Cab; } } // Cab camera is only possible on the player train. @@ -2045,13 +2045,13 @@ public void Initialize() else if (Viewer.CabExceedsDisplayHorizontally <= 0) { // We must modify FOV to get correct lookout - FieldOfView = MathHelper.ToDegrees((float)(2 * Math.Atan((float)Viewer.DisplaySize.Y / Viewer.DisplaySize.X / Viewer.CabTextureInverseRatio * Math.Tan(MathHelper.ToRadians(Viewer.Settings.ViewingFOV / 2))))); - RotationRatio = (float)(0.962314f * 2 * Math.Tan(MathHelper.ToRadians(FieldOfView / 2)) / Viewer.DisplaySize.Y); + FieldOfView = MathHelper.ToDegrees((float)(2 * Math.Atan((float)Viewer.DisplaySize.Y / Viewer.DisplaySize.X / Viewer.CabTextureInverseRatio * Math.Tan(MathHelper.ToRadians(Viewer.Settings.ViewingFOV / 2))))); + RotationRatio = (float)(0.962314f * 2 * Math.Tan(MathHelper.ToRadians(FieldOfView / 2)) / Viewer.DisplaySize.Y); } else if (Viewer.CabExceedsDisplayHorizontally > 0) { - var halfFOVHorizontalRadians = (float)(Math.Atan((float)Viewer.DisplaySize.X / Viewer.DisplaySize.Y * Math.Tan(MathHelper.ToRadians(Viewer.Settings.ViewingFOV / 2)))); - RotationRatioHorizontal = (float)(0.962314f * 2 * Viewer.DisplaySize.X / Viewer.DisplaySize.Y * Math.Tan(MathHelper.ToRadians(Viewer.Settings.ViewingFOV / 2)) / Viewer.DisplaySize.X); + var halfFOVHorizontalRadians = (float)(Math.Atan((float)Viewer.DisplaySize.X / Viewer.DisplaySize.Y * Math.Tan(MathHelper.ToRadians(Viewer.Settings.ViewingFOV / 2)))); + RotationRatioHorizontal = (float)(0.962314f * 2 * Viewer.DisplaySize.X / Viewer.DisplaySize.Y * Math.Tan(MathHelper.ToRadians(Viewer.Settings.ViewingFOV / 2)) / Viewer.DisplaySize.X); } InitialiseRotation(attachedCar); ScreenChanged(); @@ -2151,7 +2151,7 @@ void PanUp(bool up, float speed) /// and pans the image left/right to reveal details at the sides of the cab. /// The external view also moves sidewards by a similar amount. /// - void ScrollRight (bool right, float speed) + void ScrollRight(bool right, float speed) { int min = 0; int max = Viewer.CabWidthPixels - Viewer.DisplaySize.X - 2 * Viewer.CabXLetterboxPixels; // -ve value @@ -2326,7 +2326,7 @@ public override void HandleUserInput(ElapsedTime elapsedTime) public override void Update(ElapsedTime elapsedTime) { bool trainForwards; - var train = PrepUpdate( out trainForwards); + var train = PrepUpdate(out trainForwards); // Train is close enough if the last car we used is part of the same train and still close enough. var trainClose = (LastCheckCar != null) && (LastCheckCar.Train == train) && (WorldLocation.GetDistance2D(LastCheckCar.WorldPosition.WorldLocation, cameraLocation).Length() < MaximumDistance); @@ -2361,7 +2361,7 @@ public override void Update(ElapsedTime elapsedTime) UpdateListener(); } - protected Train PrepUpdate (out bool trainForwards) + protected Train PrepUpdate(out bool trainForwards) { var train = attachedCar.Train; @@ -2381,7 +2381,7 @@ protected Train PrepUpdate (out bool trainForwards) } - protected WorldLocation GoToNewLocation ( ref Traveller tdb, Train train, bool trainForwards) + protected WorldLocation GoToNewLocation(ref Traveller tdb, Train train, bool trainForwards) { tdb.Move(MaximumDistance * 0.75f); var newLocation = tdb.WorldLocation; @@ -2691,7 +2691,7 @@ public override void Update(ElapsedTime elapsedTime) { tdb = trainForwards ? new Traveller(train.FrontTDBTraveller) : new Traveller(train.RearTDBTraveller, Traveller.TravellerDirection.Backward); // return to standard newLocation = GoToNewLocation(ref tdb, train, trainForwards); - } + } if (newLocation != WorldLocation.None && !trainClose) { diff --git a/Source/RunActivity/Viewer3D/Commands.cs b/Source/RunActivity/Viewer3D/Commands.cs index 503821194b..9bc4d11ad1 100644 --- a/Source/RunActivity/Viewer3D/Commands.cs +++ b/Source/RunActivity/Viewer3D/Commands.cs @@ -17,21 +17,21 @@ // This file is the responsibility of the 3D & Environment Team. +using System; using Orts.Common; using Orts.Viewer3D.Popups; using Orts.Viewer3D.RollingStock; using ORTS.Common; -using System; namespace Orts.Viewer3D { [Serializable()] public abstract class ActivityCommand : PausedCommand - { + { public static ActivityWindow Receiver { get; set; } string EventNameLabel; - public ActivityCommand( CommandLog log, string eventNameLabel, double pauseDurationS ) + public ActivityCommand(CommandLog log, string eventNameLabel, double pauseDurationS) : base(log, pauseDurationS) { EventNameLabel = eventNameLabel; @@ -61,7 +61,7 @@ public ImmediateRefillCommand(CommandLog log) public override void Redo() { if (Receiver == null) return; - Receiver.ImmediateRefill(); + Receiver.ImmediateRefill(); // Report(); } } @@ -105,7 +105,7 @@ public void Redo(string screen, int display) { if (ToState) { - var finalReceiver = Receiver.Camera is ThreeDimCabCamera ? + var finalReceiver = Receiver.Camera is ThreeDimCabCamera ? (Receiver.PlayerLocomotiveViewer as MSTSLocomotiveViewer).ThreeDimentionCabRenderer : (Receiver.PlayerLocomotiveViewer as MSTSLocomotiveViewer)._CabRenderer; finalReceiver.ActiveScreen[display] = screen; @@ -135,7 +135,7 @@ public override void Redo() Receiver.ChangeCab(); // Report(); } - } + } [Serializable()] public sealed class ToggleSwitchAheadCommand : Command @@ -153,7 +153,7 @@ public override void Redo() Receiver.ToggleSwitchAhead(); // Report(); } - } + } [Serializable()] public sealed class ToggleSwitchBehindCommand : Command @@ -171,14 +171,14 @@ public override void Redo() Receiver.ToggleSwitchBehind(); // Report(); } - } + } [Serializable()] public sealed class ToggleAnySwitchCommand : IndexCommand - { + { public static Viewer Receiver { get; set; } - public ToggleAnySwitchCommand( CommandLog log, int index ) + public ToggleAnySwitchCommand(CommandLog log, int index) : base(log, index) { Redo(); @@ -197,7 +197,7 @@ public sealed class UncoupleCommand : Command public static Viewer Receiver { get; set; } int CarPosition; // 0 for head of train - public UncoupleCommand( CommandLog log, int carPosition ) + public UncoupleCommand(CommandLog log, int carPosition) : base(log) { CarPosition = carPosition; @@ -206,7 +206,7 @@ public UncoupleCommand( CommandLog log, int carPosition ) public override void Redo() { - Receiver.UncoupleBehind( CarPosition ); + Receiver.UncoupleBehind(CarPosition); // Report(); } @@ -237,7 +237,7 @@ public override void Redo() [Serializable()] public sealed class ResumeActivityCommand : ActivityCommand { - public ResumeActivityCommand( CommandLog log, string eventNameLabel, double pauseDurationS ) + public ResumeActivityCommand(CommandLog log, string eventNameLabel, double pauseDurationS) : base(log, eventNameLabel, pauseDurationS) { Redo(); @@ -253,12 +253,12 @@ public override void Redo() [Serializable()] public sealed class CloseAndResumeActivityCommand : ActivityCommand { - public CloseAndResumeActivityCommand( CommandLog log, string eventNameLabel, double pauseDurationS ) + public CloseAndResumeActivityCommand(CommandLog log, string eventNameLabel, double pauseDurationS) : base(log, eventNameLabel, pauseDurationS) { Redo(); } - + public override void Redo() { Receiver.CloseBox(); @@ -285,7 +285,7 @@ public override void Redo() [Serializable()] public sealed class QuitActivityCommand : ActivityCommand { - public QuitActivityCommand( CommandLog log, string eventNameLabel, double pauseDurationS ) + public QuitActivityCommand(CommandLog log, string eventNameLabel, double pauseDurationS) : base(log, eventNameLabel, pauseDurationS) { Redo(); @@ -297,13 +297,13 @@ public override void Redo() // Report(); } } - + [Serializable()] public abstract class UseCameraCommand : CameraCommand { public static Viewer Receiver { get; set; } - public UseCameraCommand( CommandLog log ) + public UseCameraCommand(CommandLog log) : base(log) { } @@ -313,7 +313,7 @@ public UseCameraCommand( CommandLog log ) public sealed class UseCabCameraCommand : UseCameraCommand { - public UseCabCameraCommand( CommandLog log ) + public UseCabCameraCommand(CommandLog log) : base(log) { Redo(); @@ -322,24 +322,24 @@ public UseCabCameraCommand( CommandLog log ) public override void Redo() => Receiver.ActivateCabCamera(); } - [Serializable()] - public sealed class ToggleThreeDimensionalCabCameraCommand : UseCameraCommand - { + [Serializable()] + public sealed class ToggleThreeDimensionalCabCameraCommand : UseCameraCommand + { - public ToggleThreeDimensionalCabCameraCommand(CommandLog log) - : base(log) - { - Redo(); - } + public ToggleThreeDimensionalCabCameraCommand(CommandLog log) + : base(log) + { + Redo(); + } public override void Redo() => Receiver.ToggleCabCameraView(); - } - - [Serializable()] + } + + [Serializable()] public sealed class UseFrontCameraCommand : UseCameraCommand { - public UseFrontCameraCommand( CommandLog log ) + public UseFrontCameraCommand(CommandLog log) : base(log) { Redo(); @@ -356,7 +356,7 @@ public override void Redo() public sealed class UseBackCameraCommand : UseCameraCommand { - public UseBackCameraCommand( CommandLog log ) + public UseBackCameraCommand(CommandLog log) : base(log) { Redo(); @@ -373,7 +373,7 @@ public override void Redo() public sealed class UseHeadOutForwardCameraCommand : UseCameraCommand { - public UseHeadOutForwardCameraCommand( CommandLog log ) + public UseHeadOutForwardCameraCommand(CommandLog log) : base(log) { Redo(); @@ -409,7 +409,7 @@ public override void Redo() Receiver.FreeRoamCamera.Activate(); } } - + [Serializable()] public sealed class UsePreviousFreeRoamCameraCommand : UseCameraCommand { @@ -425,12 +425,12 @@ public override void Redo() Receiver.ChangeToPreviousFreeRoamCamera(); } } - + [Serializable()] public sealed class UseHeadOutBackCameraCommand : UseCameraCommand { - public UseHeadOutBackCameraCommand( CommandLog log ) + public UseHeadOutBackCameraCommand(CommandLog log) : base(log) { Redo(); @@ -447,7 +447,7 @@ public override void Redo() public sealed class UseBrakemanCameraCommand : UseCameraCommand { - public UseBrakemanCameraCommand( CommandLog log ) + public UseBrakemanCameraCommand(CommandLog log) : base(log) { Redo(); @@ -464,7 +464,7 @@ public override void Redo() public sealed class UsePassengerCameraCommand : UseCameraCommand { - public UsePassengerCameraCommand( CommandLog log ) + public UsePassengerCameraCommand(CommandLog log) : base(log) { Redo(); @@ -481,7 +481,7 @@ public override void Redo() public sealed class UseTracksideCameraCommand : UseCameraCommand { - public UseTracksideCameraCommand( CommandLog log ) + public UseTracksideCameraCommand(CommandLog log) : base(log) { Redo(); @@ -517,7 +517,7 @@ public abstract class MoveCameraCommand : CameraCommand public static Viewer Receiver { get; set; } protected double EndTime; - public MoveCameraCommand( CommandLog log, double startTime, double endTime ) + public MoveCameraCommand(CommandLog log, double startTime, double endTime) : base(log) { Time = startTime; @@ -526,7 +526,7 @@ public MoveCameraCommand( CommandLog log, double startTime, double endTime ) public override string ToString() { - return base.ToString() + " - " + String.Format( "{0}", FormatStrings.FormatPreciseTime( EndTime ) ); + return base.ToString() + " - " + String.Format("{0}", FormatStrings.FormatPreciseTime(EndTime)); } } @@ -535,7 +535,7 @@ public sealed class CameraRotateUpDownCommand : MoveCameraCommand { float RotationXRadians; - public CameraRotateUpDownCommand( CommandLog log, double startTime, double endTime, float rx ) + public CameraRotateUpDownCommand(CommandLog log, double startTime, double endTime, float rx) : base(log, startTime, endTime) { RotationXRadians = rx; @@ -555,7 +555,7 @@ public override void Redo() public override string ToString() { - return base.ToString() + String.Format( ", {0}", RotationXRadians ); + return base.ToString() + String.Format(", {0}", RotationXRadians); } } @@ -564,7 +564,7 @@ public sealed class CameraRotateLeftRightCommand : MoveCameraCommand { float RotationYRadians; - public CameraRotateLeftRightCommand( CommandLog log, double startTime, double endTime, float ry ) + public CameraRotateLeftRightCommand(CommandLog log, double startTime, double endTime, float ry) : base(log, startTime, endTime) { RotationYRadians = ry; @@ -584,7 +584,7 @@ public override void Redo() public override string ToString() { - return base.ToString() + String.Format( ", {0}", RotationYRadians ); + return base.ToString() + String.Format(", {0}", RotationYRadians); } } @@ -597,7 +597,7 @@ public sealed class CameraMouseRotateCommand : MoveCameraCommand float RotationXRadians; float RotationYRadians; - public CameraMouseRotateCommand( CommandLog log, double startTime, double endTime, float rx, float ry ) + public CameraMouseRotateCommand(CommandLog log, double startTime, double endTime, float rx, float ry) : base(log, startTime, endTime) { RotationXRadians = rx; @@ -619,7 +619,7 @@ public override void Redo() public override string ToString() { - return base.ToString() + String.Format( ", {0} {1} {2}", EndTime, RotationXRadians, RotationYRadians ); + return base.ToString() + String.Format(", {0} {1} {2}", EndTime, RotationXRadians, RotationYRadians); } } @@ -628,7 +628,7 @@ public sealed class CameraXCommand : MoveCameraCommand { float XRadians; - public CameraXCommand( CommandLog log, double startTime, double endTime, float xr ) + public CameraXCommand(CommandLog log, double startTime, double endTime, float xr) : base(log, startTime, endTime) { XRadians = xr; @@ -648,7 +648,7 @@ public override void Redo() public override string ToString() { - return base.ToString() + String.Format( ", {0}", XRadians ); + return base.ToString() + String.Format(", {0}", XRadians); } } @@ -657,7 +657,7 @@ public sealed class CameraYCommand : MoveCameraCommand { float YRadians; - public CameraYCommand( CommandLog log, double startTime, double endTime, float yr ) + public CameraYCommand(CommandLog log, double startTime, double endTime, float yr) : base(log, startTime, endTime) { YRadians = yr; @@ -677,7 +677,7 @@ public override void Redo() public override string ToString() { - return base.ToString() + String.Format( ", {0}", YRadians ); + return base.ToString() + String.Format(", {0}", YRadians); } } @@ -686,7 +686,7 @@ public sealed class CameraZCommand : MoveCameraCommand { float ZRadians; - public CameraZCommand( CommandLog log, double startTime, double endTime, float zr ) + public CameraZCommand(CommandLog log, double startTime, double endTime, float zr) : base(log, startTime, endTime) { ZRadians = zr; @@ -705,45 +705,45 @@ public override void Redo() public override string ToString() { - return base.ToString() + String.Format( ", {0}", ZRadians ); + return base.ToString() + String.Format(", {0}", ZRadians); } } - [Serializable()] - public sealed class CameraMoveXYZCommand : MoveCameraCommand - { - float X, Y, Z; + [Serializable()] + public sealed class CameraMoveXYZCommand : MoveCameraCommand + { + float X, Y, Z; public CameraMoveXYZCommand(CommandLog log, double startTime, double endTime, float xr, float yr, float zr) - : base(log, startTime, endTime) - { - X = xr; Y = yr; Z = zr; - Redo(); - } - - public override void Redo() - { - if (Receiver.Camera is ThreeDimCabCamera) - { - var c = Receiver.Camera as ThreeDimCabCamera; - c.MoveCameraXYZ(X, Y, Z); - c.EndTime = EndTime; - } - // Report(); - } - - public override string ToString() - { - return base.ToString() + String.Format(", {0}", X); - } - } - - [Serializable()] + : base(log, startTime, endTime) + { + X = xr; Y = yr; Z = zr; + Redo(); + } + + public override void Redo() + { + if (Receiver.Camera is ThreeDimCabCamera) + { + var c = Receiver.Camera as ThreeDimCabCamera; + c.MoveCameraXYZ(X, Y, Z); + c.EndTime = EndTime; + } + // Report(); + } + + public override string ToString() + { + return base.ToString() + String.Format(", {0}", X); + } + } + + [Serializable()] public sealed class TrackingCameraXCommand : MoveCameraCommand { float PositionXRadians; - public TrackingCameraXCommand( CommandLog log, double startTime, double endTime, float rx ) + public TrackingCameraXCommand(CommandLog log, double startTime, double endTime, float rx) : base(log, startTime, endTime) { PositionXRadians = rx; @@ -763,7 +763,7 @@ public override void Redo() public override string ToString() { - return base.ToString() + String.Format( ", {0}", PositionXRadians ); + return base.ToString() + String.Format(", {0}", PositionXRadians); } } @@ -772,7 +772,7 @@ public sealed class TrackingCameraYCommand : MoveCameraCommand { float PositionYRadians; - public TrackingCameraYCommand( CommandLog log, double startTime, double endTime, float ry ) + public TrackingCameraYCommand(CommandLog log, double startTime, double endTime, float ry) : base(log, startTime, endTime) { PositionYRadians = ry; @@ -792,7 +792,7 @@ public override void Redo() public override string ToString() { - return base.ToString() + String.Format( ", {0}", PositionYRadians ); + return base.ToString() + String.Format(", {0}", PositionYRadians); } } @@ -801,7 +801,7 @@ public sealed class TrackingCameraZCommand : MoveCameraCommand { float PositionDistanceMetres; - public TrackingCameraZCommand( CommandLog log, double startTime, double endTime, float d ) + public TrackingCameraZCommand(CommandLog log, double startTime, double endTime, float d) : base(log, startTime, endTime) { PositionDistanceMetres = d; @@ -821,7 +821,7 @@ public override void Redo() public override string ToString() { - return base.ToString() + String.Format( ", {0}", PositionDistanceMetres ); + return base.ToString() + String.Format(", {0}", PositionDistanceMetres); } } @@ -829,7 +829,7 @@ public override string ToString() public sealed class NextCarCommand : UseCameraCommand { - public NextCarCommand( CommandLog log ) + public NextCarCommand(CommandLog log) : base(log) { Redo(); @@ -850,7 +850,7 @@ public override void Redo() public sealed class PreviousCarCommand : UseCameraCommand { - public PreviousCarCommand( CommandLog log ) + public PreviousCarCommand(CommandLog log) : base(log) { Redo(); @@ -871,7 +871,7 @@ public override void Redo() public sealed class FirstCarCommand : UseCameraCommand { - public FirstCarCommand( CommandLog log ) + public FirstCarCommand(CommandLog log) : base(log) { Redo(); @@ -892,7 +892,7 @@ public override void Redo() public sealed class LastCarCommand : UseCameraCommand { - public LastCarCommand( CommandLog log ) + public LastCarCommand(CommandLog log) : base(log) { Redo(); @@ -968,7 +968,7 @@ public override void Redo() } } - [Serializable()] + [Serializable()] public sealed class ToggleBrowseForwardsCommand : UseCameraCommand { diff --git a/Source/RunActivity/Viewer3D/Common/Helpers.cs b/Source/RunActivity/Viewer3D/Common/Helpers.cs index 6131238caa..efa903a2a8 100644 --- a/Source/RunActivity/Viewer3D/Common/Helpers.cs +++ b/Source/RunActivity/Viewer3D/Common/Helpers.cs @@ -15,12 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Orts.Formats.Msts; -using Orts.Simulation; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; +using Orts.Formats.Msts; +using Orts.Simulation; namespace Orts.Viewer3D.Common { diff --git a/Source/RunActivity/Viewer3D/DDSLib.cs b/Source/RunActivity/Viewer3D/DDSLib.cs index f6e31c4dbf..b825791c84 100644 --- a/Source/RunActivity/Viewer3D/DDSLib.cs +++ b/Source/RunActivity/Viewer3D/DDSLib.cs @@ -56,9 +56,9 @@ //coment this if you want to save color textures as ABGR. #define COLOR_SAVE_TO_ARGB -using Microsoft.Xna.Framework.Graphics; using System; using System.IO; +using Microsoft.Xna.Framework.Graphics; namespace Orts.Viewer3D { diff --git a/Source/RunActivity/Viewer3D/Debugging/DebugViewerForm.cs b/Source/RunActivity/Viewer3D/Debugging/DebugViewerForm.cs index 3901241601..8d6c13a68a 100644 --- a/Source/RunActivity/Viewer3D/Debugging/DebugViewerForm.cs +++ b/Source/RunActivity/Viewer3D/Debugging/DebugViewerForm.cs @@ -1075,9 +1075,9 @@ public void DrawTrainPath(Train train, float subX, float subY, Pen pathPen, Grap if (stepDistance + stepLength >= initialNodeOffset && stepDistance <= initialNodeOffset + DisplayDistance) { var currentLocation = currentPosition.WorldLocation; - scaledA.X = (float)((previousLocation.TileX * WorldLocation.TileSize + previousLocation.Location.X - subX) * xScale); + scaledA.X = (float)((previousLocation.TileX * WorldLocation.TileSize + previousLocation.Location.X - subX) * xScale); scaledA.Y = (float)(pbCanvas.Height - (previousLocation.TileZ * WorldLocation.TileSize + previousLocation.Location.Z - subY) * yScale); - scaledB.X = (float)((currentLocation.TileX * WorldLocation.TileSize + currentLocation.Location.X - subX) * xScale); + scaledB.X = (float)((currentLocation.TileX * WorldLocation.TileSize + currentLocation.Location.X - subX) * xScale); scaledB.Y = (float)(pbCanvas.Height - (currentPosition.TileZ * WorldLocation.TileSize + currentPosition.Location.Z - subY) * yScale); g.DrawLine(pathPen, scaledA, scaledB); } } diff --git a/Source/RunActivity/Viewer3D/Debugging/MessageViewer.cs b/Source/RunActivity/Viewer3D/Debugging/MessageViewer.cs index bdc71b9fee..04ba9577db 100644 --- a/Source/RunActivity/Viewer3D/Debugging/MessageViewer.cs +++ b/Source/RunActivity/Viewer3D/Debugging/MessageViewer.cs @@ -32,13 +32,13 @@ private void ClearAllClick(object sender, EventArgs e) { messages.Items.Clear(); } - + private void ComposeClick(object sender, EventArgs e) { MSG.Enabled = true; MultiPlayer.MPManager.Instance().ComposingText = true; } - + private void ReplySelectedClick(object sender, EventArgs e) { string msg = MSG.Text @@ -71,7 +71,7 @@ private void ReplySelectedClick(object sender, EventArgs e) MultiPlayer.MPManager.Instance().ComposingText = false; } } - + public bool AddNewMessage(double _, string msg) { if (messages.Items.Count > 10) diff --git a/Source/RunActivity/Viewer3D/Debugging/SoundDebugForm.cs b/Source/RunActivity/Viewer3D/Debugging/SoundDebugForm.cs index fb4d38fafb..ed15ba4e19 100644 --- a/Source/RunActivity/Viewer3D/Debugging/SoundDebugForm.cs +++ b/Source/RunActivity/Viewer3D/Debugging/SoundDebugForm.cs @@ -17,12 +17,12 @@ // This file is the responsibility of the 3D & Environment Team. -using Orts.Simulation.RollingStocks; -using ORTS.Common; using System; using System.Collections.Generic; using System.Drawing; using System.Windows.Forms; +using Orts.Simulation.RollingStocks; +using ORTS.Common; namespace Orts.Viewer3D.Debugging { diff --git a/Source/RunActivity/Viewer3D/DynamicTrack.cs b/Source/RunActivity/Viewer3D/DynamicTrack.cs index abe5f9a987..458cc25293 100644 --- a/Source/RunActivity/Viewer3D/DynamicTrack.cs +++ b/Source/RunActivity/Viewer3D/DynamicTrack.cs @@ -17,13 +17,6 @@ // This file is the responsibility of the 3D & Environment Team. -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Orts.Formats.Msts; -using Orts.Parsers.Msts; -using Orts.Simulation; -using Orts.Viewer3D.Common; -using ORTS.Common; using System; using System.Collections; using System.Collections.Generic; @@ -31,6 +24,13 @@ using System.IO; using System.Xml; using System.Xml.Schema; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Orts.Formats.Msts; +using Orts.Parsers.Msts; +using Orts.Simulation; +using Orts.Viewer3D.Common; +using ORTS.Common; namespace Orts.Viewer3D { @@ -102,7 +102,7 @@ public static void Decompose(Viewer viewer, List trackList, { // Both heading and translation change // nextRoot is found by moving from Point-of-Curve (PC) to // center (O)to Point-of-Tangent (PT). - float radius = subsection.trackSections[0].param2*Math.Sign(-subsection.trackSections[0].param1); // meters + float radius = subsection.trackSections[0].param2 * Math.Sign(-subsection.trackSections[0].param1); // meters Vector3 left = radius * Vector3.Cross(Vector3.Up, heading); // Vector from PC to O Matrix rot = Matrix.CreateRotationY(-length); // Heading change (rotation about O) // Shared method returns displacement from present world position and, by reference, diff --git a/Source/RunActivity/Viewer3D/Forest.cs b/Source/RunActivity/Viewer3D/Forest.cs index d2edd02d7b..04b59da482 100644 --- a/Source/RunActivity/Viewer3D/Forest.cs +++ b/Source/RunActivity/Viewer3D/Forest.cs @@ -17,13 +17,13 @@ // This file is the responsibility of the 3D & Environment Team. +using System; +using System.Collections.Generic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Orts.Formats.Msts; using Orts.Viewer3D.Common; using ORTS.Common; -using System; -using System.Collections.Generic; namespace Orts.Viewer3D { @@ -126,7 +126,7 @@ private List CalculateTrees(TileManager tiles, Fore forestVertex = new Vector3(forest.forestArea.X / 2, 0, forest.forestArea.Z / 2); Vector3.Transform(ref forestVertex, ref position.XNAMatrix, out forestVertex); forestVertices.Add(forestVertex); - bool[] considerTile = new bool [4] {false, false, false, false}; + bool[] considerTile = new bool[4] { false, false, false, false }; foreach (var fVertex in forestVertices) { if (fVertex.X > 1024) considerTile[0] = true; @@ -158,22 +158,22 @@ private List CalculateTrees(TileManager tiles, Fore } if (considerTile[0] && considerTile[2]) { - addList = FindTracksAndRoadsClose(position.TileX + 1, position.TileZ +1); + addList = FindTracksAndRoadsClose(position.TileX + 1, position.TileZ + 1); FindTracksAndRoadsMoreClose(ref sections, addList, forest, position, InvForestXNAMatrix); } if (considerTile[0] && considerTile[3]) { - addList = FindTracksAndRoadsClose(position.TileX + 1, position.TileZ -1); + addList = FindTracksAndRoadsClose(position.TileX + 1, position.TileZ - 1); FindTracksAndRoadsMoreClose(ref sections, addList, forest, position, InvForestXNAMatrix); } if (considerTile[1] && considerTile[2]) { - addList = FindTracksAndRoadsClose(position.TileX-1, position.TileZ + 1); + addList = FindTracksAndRoadsClose(position.TileX - 1, position.TileZ + 1); FindTracksAndRoadsMoreClose(ref sections, addList, forest, position, InvForestXNAMatrix); } if (considerTile[1] && considerTile[3]) { - addList = FindTracksAndRoadsClose(position.TileX-1, position.TileZ - 1); + addList = FindTracksAndRoadsClose(position.TileX - 1, position.TileZ - 1); FindTracksAndRoadsMoreClose(ref sections, addList, forest, position, InvForestXNAMatrix); } } @@ -332,7 +332,7 @@ bool InitTrackSectionCurved(int tileX, int tileZ, float x, float z, TrVectorSect // Do a preliminary cull based on a bounding square around the track section. // Bounding distance is (radius * angle + error) by (radius * angle + error) around starting coordinates but no more than 2 for angle. - var boundingDistance = trackSection.SectionCurve.Radius * Math.Min(Math.Abs(MathHelper.ToRadians(trackSection.SectionCurve.Angle)), 2) + MaximumCenterlineOffset+treeWidth; + var boundingDistance = trackSection.SectionCurve.Radius * Math.Min(Math.Abs(MathHelper.ToRadians(trackSection.SectionCurve.Angle)), 2) + MaximumCenterlineOffset + treeWidth; var dx = Math.Abs(x - sx); var dz = Math.Abs(z - sz); if (dx > boundingDistance || dz > boundingDistance) diff --git a/Source/RunActivity/Viewer3D/InfoDisplay.cs b/Source/RunActivity/Viewer3D/InfoDisplay.cs index aecbdd567c..a134efd7ae 100644 --- a/Source/RunActivity/Viewer3D/InfoDisplay.cs +++ b/Source/RunActivity/Viewer3D/InfoDisplay.cs @@ -126,61 +126,63 @@ public bool IsRecordingSteamPerformance void RecordSteamPerformance() { - MSTSSteamLocomotive steamloco = (MSTSSteamLocomotive)Viewer.PlayerLocomotive; - float SteamspeedMpH = MpS.ToMpH(steamloco.SpeedMpS); - if (SteamspeedMpH >= previousLoggedSteamSpeedMpH + 5) // Add a new record every time speed increases by 5 mph - { - previousLoggedSteamSpeedMpH = (float)(int)SteamspeedMpH; // Keep speed records close to whole numbers - - Logger.Data(MpS.FromMpS(Viewer.PlayerLocomotive.SpeedMpS, false).ToString("F0")); - Logger.Data(S.ToM(steamloco.SteamPerformanceTimeS).ToString("F1")); - Logger.Data(Viewer.PlayerLocomotive.ThrottlePercent.ToString("F0")); - Logger.Data(Viewer.PlayerTrain.MUReverserPercent.ToString("F0")); - Logger.Data(N.ToLbf(Viewer.PlayerLocomotive.MotiveForceN).ToString("F0")); - Logger.Data(steamloco.IndicatedHorsePowerHP.ToString("F0")); - Logger.Data(steamloco.DrawBarPullLbsF.ToString("F0")); - Logger.Data(steamloco.DrawbarHorsePowerHP.ToString("F0")); - Logger.Data(N.ToLbf(steamloco.LocomotiveCouplerForceN).ToString("F0")); - Logger.Data(N.ToLbf(steamloco.LocoTenderFrictionForceN).ToString("F0")); - Logger.Data(N.ToLbf(steamloco.TotalFrictionForceN).ToString("F0")); - Logger.Data(Kg.ToTUK(steamloco.TrainLoadKg).ToString("F0")); - Logger.Data(steamloco.BoilerPressurePSI.ToString("F0")); - Logger.Data(steamloco.LogSteamChestPressurePSI.ToString("F0")); - Logger.Data(steamloco.LogInitialPressurePSI.ToString("F0")); - Logger.Data(steamloco.LogCutoffPressurePSI.ToString("F0")); - Logger.Data(steamloco.LogReleasePressurePSI.ToString("F0")); - Logger.Data(steamloco.LogBackPressurePSI.ToString("F0")); - - Logger.Data(steamloco.MeanEffectivePressurePSI.ToString("F0")); - - - Logger.Data(steamloco.CurrentSuperheatTempF.ToString("F0")); - - Logger.Data(pS.TopH(steamloco.CylinderSteamUsageLBpS).ToString("F0")); - Logger.Data(pS.TopH(steamloco.WaterConsumptionLbpS).ToString("F0")); - Logger.Data(Kg.ToLb(pS.TopH(steamloco.FuelBurnRateSmoothedKGpS)).ToString("F0")); - - - Logger.Data(steamloco.SuperheaterSteamUsageFactor.ToString("F2")); - Logger.Data(steamloco.CumulativeCylinderSteamConsumptionLbs.ToString("F0")); - Logger.Data(steamloco.CumulativeWaterConsumptionLbs.ToString("F0")); - - Logger.Data(steamloco.CutoffPressureDropRatio.ToString("F2")); - - Logger.Data(steamloco.HPCylinderMEPPSI.ToString("F0")); - Logger.Data(steamloco.LogLPInitialPressurePSI.ToString("F0")); - Logger.Data(steamloco.LogLPCutoffPressurePSI.ToString("F0")); - Logger.Data(steamloco.LogLPReleasePressurePSI.ToString("F0")); - Logger.Data(steamloco.LogLPBackPressurePSI.ToString("F0")); - Logger.Data(steamloco.CutoffPressureDropRatio.ToString("F2")); - Logger.Data(steamloco.LPCylinderMEPPSI.ToString("F0")); - - Logger.End(); - } + MSTSSteamLocomotive steamloco = (MSTSSteamLocomotive)Viewer.PlayerLocomotive; + float SteamspeedMpH = MpS.ToMpH(steamloco.SpeedMpS); + if (SteamspeedMpH >= previousLoggedSteamSpeedMpH + 5) // Add a new record every time speed increases by 5 mph + { + previousLoggedSteamSpeedMpH = (float)(int)SteamspeedMpH; // Keep speed records close to whole numbers + + Logger.Data(MpS.FromMpS(Viewer.PlayerLocomotive.SpeedMpS, false).ToString("F0")); + Logger.Data(S.ToM(steamloco.SteamPerformanceTimeS).ToString("F1")); + Logger.Data(Viewer.PlayerLocomotive.ThrottlePercent.ToString("F0")); + Logger.Data(Viewer.PlayerTrain.MUReverserPercent.ToString("F0")); + Logger.Data(N.ToLbf(Viewer.PlayerLocomotive.MotiveForceN).ToString("F0")); + Logger.Data(steamloco.IndicatedHorsePowerHP.ToString("F0")); + Logger.Data(steamloco.DrawBarPullLbsF.ToString("F0")); + Logger.Data(steamloco.DrawbarHorsePowerHP.ToString("F0")); + Logger.Data(N.ToLbf(steamloco.LocomotiveCouplerForceN).ToString("F0")); + Logger.Data(N.ToLbf(steamloco.LocoTenderFrictionForceN).ToString("F0")); + Logger.Data(N.ToLbf(steamloco.TotalFrictionForceN).ToString("F0")); + Logger.Data(Kg.ToTUK(steamloco.TrainLoadKg).ToString("F0")); + Logger.Data(steamloco.BoilerPressurePSI.ToString("F0")); + Logger.Data(steamloco.LogSteamChestPressurePSI.ToString("F0")); + Logger.Data(steamloco.LogInitialPressurePSI.ToString("F0")); + Logger.Data(steamloco.LogCutoffPressurePSI.ToString("F0")); + Logger.Data(steamloco.LogReleasePressurePSI.ToString("F0")); + Logger.Data(steamloco.LogBackPressurePSI.ToString("F0")); + + Logger.Data(steamloco.MeanEffectivePressurePSI.ToString("F0")); + + + Logger.Data(steamloco.CurrentSuperheatTempF.ToString("F0")); + + Logger.Data(pS.TopH(steamloco.CylinderSteamUsageLBpS).ToString("F0")); + Logger.Data(pS.TopH(steamloco.WaterConsumptionLbpS).ToString("F0")); + Logger.Data(Kg.ToLb(pS.TopH(steamloco.FuelBurnRateSmoothedKGpS)).ToString("F0")); + + + Logger.Data(steamloco.SuperheaterSteamUsageFactor.ToString("F2")); + Logger.Data(steamloco.CumulativeCylinderSteamConsumptionLbs.ToString("F0")); + Logger.Data(steamloco.CumulativeWaterConsumptionLbs.ToString("F0")); + + Logger.Data(steamloco.CutoffPressureDropRatio.ToString("F2")); + + Logger.Data(steamloco.HPCylinderMEPPSI.ToString("F0")); + Logger.Data(steamloco.LogLPInitialPressurePSI.ToString("F0")); + Logger.Data(steamloco.LogLPCutoffPressurePSI.ToString("F0")); + Logger.Data(steamloco.LogLPReleasePressurePSI.ToString("F0")); + Logger.Data(steamloco.LogLPBackPressurePSI.ToString("F0")); + Logger.Data(steamloco.CutoffPressureDropRatio.ToString("F2")); + Logger.Data(steamloco.LPCylinderMEPPSI.ToString("F0")); + + Logger.End(); + } } #if DEBUG_DUMP_STEAM_POWER_CURVE - public bool IsRecordingSteamPowerCurve { get + public bool IsRecordingSteamPowerCurve + { + get { return Viewer.Settings.DataLogger && !Viewer.Settings.DataLogPerformance @@ -218,7 +220,7 @@ public void PrepareFrame(RenderFrame frame, ElapsedTime elapsedTime) LastUpdateRealTime = Viewer.RealTime; Profile(elapsedRealSeconds); } - + #if DEBUG_DUMP_STEAM_POWER_CURVE if (IsRecordingSteamPowerCurve) { @@ -234,7 +236,7 @@ public void PrepareFrame(RenderFrame frame, ElapsedTime elapsedTime) else - //Here's where the logger stores the data from each frame + //Here's where the logger stores the data from each frame if (Viewer.Settings.DataLogger) { Logger.Separator = (DataLogger.Separators)Enum.Parse(typeof(DataLogger.Separators), Viewer.Settings.DataLoggerSeparator); @@ -343,7 +345,7 @@ void logSpeed(float speedMpS) { Logger.Data((Viewer.PlayerLocomotive as MSTSElectricLocomotive).Pantographs[1].CommandUp.ToString()); Logger.Data((Viewer.PlayerLocomotive as MSTSElectricLocomotive).Pantographs[2].CommandUp.ToString()); - Logger.Data((Viewer.PlayerLocomotive as MSTSElectricLocomotive).Pantographs.List.Count > 2 ? + Logger.Data((Viewer.PlayerLocomotive as MSTSElectricLocomotive).Pantographs.List.Count > 2 ? (Viewer.PlayerLocomotive as MSTSElectricLocomotive).Pantographs[3].CommandUp.ToString() : null); Logger.Data((Viewer.PlayerLocomotive as MSTSElectricLocomotive).Pantographs.List.Count > 3 ? (Viewer.PlayerLocomotive as MSTSElectricLocomotive).Pantographs[4].CommandUp.ToString() : null); @@ -388,7 +390,7 @@ void logSpeed(float speedMpS) } #endif } - Logger.End(); + Logger.End(); #if DEBUG_DUMP_STEAM_POWER_CURVE } #endif @@ -412,8 +414,8 @@ static void DataLoggerStart(UserSettings settings) if (settings.DataLogPerformance) { headerLine = String.Join(Convert.ToString((char)separator), - new string[] - { + new string[] + { "SVN", "Frame", "Memory", @@ -439,7 +441,7 @@ static void DataLoggerStart(UserSettings settings) headerLine += Convert.ToString((char)separator); headerLine += String.Join(Convert.ToString((char)separator), - new string[] + new string[] { "Time", "Player Direction", @@ -485,8 +487,8 @@ static void DataLoggerStart(UserSettings settings) if (settings.DataLogSteamPerformance) { headerLine = String.Join(Convert.ToString((char)separator), - new string[] - { + new string[] + { "Speed (mph)", "Time (M)", "Throttle (%)", @@ -514,7 +516,7 @@ static void DataLoggerStart(UserSettings settings) "Cumulative Steam (lbs)", "Cumulative Water (lbs)", "Cutoff pressure Ratio", - + "HP MEP (psi)", "LPInitial Pressure (psi)", "LPCutoff Pressure (psi)", @@ -533,10 +535,10 @@ static void DataLoggerStart(UserSettings settings) && !settings.DataLogMisc && !settings.DataLogSteamPerformance) { - + headerLine = String.Join(Convert.ToString((char)separator), - new string[] - { + new string[] + { "speed (mph)", "power (hp)", "throttle (%)", diff --git a/Source/RunActivity/Viewer3D/Lights.cs b/Source/RunActivity/Viewer3D/Lights.cs index 0cc55dc704..00ca5d4eb6 100644 --- a/Source/RunActivity/Viewer3D/Lights.cs +++ b/Source/RunActivity/Viewer3D/Lights.cs @@ -23,6 +23,10 @@ //#define DEBUG_LIGHT_CONE //#define DEBUG_LIGHT_CONE_FULL +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Orts.Formats.Msts; @@ -31,10 +35,6 @@ using Orts.Viewer3D.Processes; using ORTS.Common; using ORTS.Scripting.Api; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; namespace Orts.Viewer3D { @@ -212,23 +212,23 @@ public static void CalculateLightCone(LightState lightState, out Vector3 positio bool UpdateState() { - Debug.Assert(Viewer.PlayerTrain.LeadLocomotive == Viewer.PlayerLocomotive ||Viewer.PlayerTrain.TrainType == Train.TRAINTYPE.AI_PLAYERHOSTING || + Debug.Assert(Viewer.PlayerTrain.LeadLocomotive == Viewer.PlayerLocomotive || Viewer.PlayerTrain.TrainType == Train.TRAINTYPE.AI_PLAYERHOSTING || Viewer.PlayerTrain.TrainType == Train.TRAINTYPE.REMOTE || Viewer.PlayerTrain.TrainType == Train.TRAINTYPE.STATIC, "PlayerTrain.LeadLocomotive must be PlayerLocomotive."); - var locomotive = Car.Train != null && Car.Train.IsActualPlayerTrain ? Viewer.PlayerLocomotive : null; + var locomotive = Car.Train != null && Car.Train.IsActualPlayerTrain ? Viewer.PlayerLocomotive : null; if (locomotive == null && Car.Train != null && Car.Train.TrainType == Train.TRAINTYPE.REMOTE && Car is MSTSLocomotive && (Car as MSTSLocomotive) == Car.Train.LeadLocomotive) locomotive = Car.Train.LeadLocomotive; - var mstsLocomotive = locomotive as MSTSLocomotive; + var mstsLocomotive = locomotive as MSTSLocomotive; // Headlight - var newTrainHeadlight = locomotive != null ? locomotive.Headlight : Car.Train != null && Car.Train.TrainType != Train.TRAINTYPE.STATIC ? 2 : 0; + var newTrainHeadlight = locomotive != null ? locomotive.Headlight : Car.Train != null && Car.Train.TrainType != Train.TRAINTYPE.STATIC ? 2 : 0; // Unit - var locomotiveFlipped = locomotive != null && locomotive.Flipped; - var locomotiveReverseCab = mstsLocomotive != null && mstsLocomotive.UsingRearCab; + var locomotiveFlipped = locomotive != null && locomotive.Flipped; + var locomotiveReverseCab = mstsLocomotive != null && mstsLocomotive.UsingRearCab; var newCarIsReversed = Car.Flipped ^ locomotiveFlipped ^ locomotiveReverseCab; - var newCarIsFirst = Car.Train == null || (locomotiveFlipped ^ locomotiveReverseCab ? Car.Train.LastCar : Car.Train.FirstCar) == Car; - var newCarIsLast = Car.Train == null || (locomotiveFlipped ^ locomotiveReverseCab ? Car.Train.FirstCar : Car.Train.LastCar) == Car; + var newCarIsFirst = Car.Train == null || (locomotiveFlipped ^ locomotiveReverseCab ? Car.Train.LastCar : Car.Train.FirstCar) == Car; + var newCarIsLast = Car.Train == null || (locomotiveFlipped ^ locomotiveReverseCab ? Car.Train.FirstCar : Car.Train.LastCar) == Car; // Penalty - var newPenalty = mstsLocomotive != null && mstsLocomotive.TrainBrakeController.EmergencyBraking; + var newPenalty = mstsLocomotive != null && mstsLocomotive.TrainBrakeController.EmergencyBraking; // Control var newCarIsPlayer = (Car.Train != null && Car.Train == Viewer.PlayerTrain) || (Car.Train != null && Car.Train.TrainType == Train.TRAINTYPE.REMOTE); // Service - if a player or AI train, then will considered to be in servie, loose consists will not be considered to be in service. @@ -678,7 +678,7 @@ public LightConePrimitive(LightViewer lightViewer, RenderProcess renderProcess, IndexBuffer.SetData(indexData); } if (BlendState_SourceZeroDestOne == null) - BlendState_SourceZeroDestOne = new BlendState + BlendState_SourceZeroDestOne = new BlendState { ColorSourceBlend = Blend.Zero, ColorDestinationBlend = Blend.One, diff --git a/Source/RunActivity/Viewer3D/MSTSSky.cs b/Source/RunActivity/Viewer3D/MSTSSky.cs index 77b2bfcbce..e31d0bf4be 100644 --- a/Source/RunActivity/Viewer3D/MSTSSky.cs +++ b/Source/RunActivity/Viewer3D/MSTSSky.cs @@ -43,7 +43,7 @@ public class MSTSSkyConstants public static float mstsskyTilev; public static float mstscloudTileu; public static float mstscloudTilev; - + } #endregion @@ -115,7 +115,7 @@ public MSTSSkyDrawer(Viewer viewer) /// public void PrepareFrame(RenderFrame frame, ElapsedTime elapsedTime) { - // Adjust dome position so the bottom edge is not visible + // Adjust dome position so the bottom edge is not visible Vector3 ViewerXNAPosition = new Vector3(MSTSSkyViewer.Camera.Location.X, MSTSSkyViewer.Camera.Location.Y - 100, -MSTSSkyViewer.Camera.Location.Z); Matrix XNASkyWorldLocation = Matrix.CreateTranslation(ViewerXNAPosition); @@ -249,7 +249,7 @@ public class MSTSSkyMesh : RenderPrimitive private static int mstsskySides = MSTSSkyConstants.skySides; public int mstscloudDomeRadiusDiff = 600; // skyLevels: Used for iterating vertically through the "levels" of the hemisphere polygon - private static int mstsskyLevels = MSTSSkyConstants.skyLevels; + private static int mstsskyLevels = MSTSSkyConstants.skyLevels; private static float mstsskytextureu = MSTSSkyConstants.mstsskyTileu; private static float mstsskytexturev = MSTSSkyConstants.mstsskyTilev; private static float mstscloudtextureu = MSTSSkyConstants.mstscloudTileu; @@ -340,9 +340,9 @@ private void MSTSSkyDomeVertexList(int index, int radius, float tile_u, float ti // UV coordinates - top overlay float uvRadius; - uvRadius = (0.5f - (float)(0.5f * (i - 1)) / mstsskyLevels ); + uvRadius = (0.5f - (float)(0.5f * (i - 1)) / mstsskyLevels); float uv_u = tile_u * (0.5f - ((float)Math.Cos(MathHelper.ToRadians((360 / mstsskySides) * (mstsskySides - j))) * uvRadius)); - float uv_v = tile_v * (0.5f - ((float)Math.Sin(MathHelper.ToRadians((360 / mstsskySides) * (mstsskySides - j))) * uvRadius )); + float uv_v = tile_v * (0.5f - ((float)Math.Sin(MathHelper.ToRadians((360 / mstsskySides) * (mstsskySides - j))) * uvRadius)); // Store the position, texture coordinates and normal (normalized position vector) for the current vertex vertexList[vertexIndex].Position = new Vector3(x, y, z); @@ -354,7 +354,7 @@ private void MSTSSkyDomeVertexList(int index, int radius, float tile_u, float ti // Single vertex at zenith vertexList[vertexIndex].Position = new Vector3(0, radius, 0); vertexList[vertexIndex].Normal = new Vector3(0, 1, 0); - vertexList[vertexIndex].TextureCoordinate = new Vector2(0.5f * tile_u, 0.5f *tile_v); // (top overlay) + vertexList[vertexIndex].TextureCoordinate = new Vector2(0.5f * tile_u, 0.5f * tile_v); // (top overlay) } /// @@ -481,7 +481,7 @@ public class MSTSSkyMaterial : Material private Matrix XNAMoonMatrix; IEnumerator ShaderPassesSky; IEnumerator ShaderPassesMoon; - List>ShaderPassesClouds = new List>(); + List> ShaderPassesClouds = new List>(); private float mstsskytexturex; private float mstsskytexturey; private float mstscloudtexturex; @@ -491,13 +491,13 @@ public MSTSSkyMaterial(Viewer viewer) : base(viewer, null) { MSTSSkyShader = Viewer.MaterialManager.SkyShader; - + //// TODO: This should happen on the loader thread. if (viewer.ENVFile.SkyLayers != null) { var mstsskytexture = Viewer.ENVFile.SkyLayers.ToArray(); int count = Viewer.ENVFile.SkyLayers.Count; - + string[] mstsSkyTexture = new string[Viewer.ENVFile.SkyLayers.Count]; @@ -505,14 +505,14 @@ public MSTSSkyMaterial(Viewer viewer) { mstsSkyTexture[i] = Viewer.Simulator.RoutePath + @"\envfiles\textures\" + mstsskytexture[i].TextureName.ToString(); MSTSSkyTexture.Add(Orts.Formats.Msts.AceFile.Texture2DFromFile(Viewer.RenderProcess.GraphicsDevice, mstsSkyTexture[i])); - if( i == 0 ) + if (i == 0) { MSTSDayTexture = MSTSSkyTexture[i]; mstsskytexturex = mstsskytexture[i].TileX; mstsskytexturey = mstsskytexture[i].TileY; } - else if(mstsskytexture[i].FadeInBeginTime != null) + else if (mstsskytexture[i].FadeInBeginTime != null) { MSTSSkyStarTexture = MSTSSkyTexture[i]; mstsskytexturex = mstsskytexture[i].TileX; diff --git a/Source/RunActivity/Viewer3D/Materials.cs b/Source/RunActivity/Viewer3D/Materials.cs index c27666b4aa..acfb9712b9 100644 --- a/Source/RunActivity/Viewer3D/Materials.cs +++ b/Source/RunActivity/Viewer3D/Materials.cs @@ -87,7 +87,7 @@ public Texture2D Get(string path, Texture2D defaultTexture, bool required = fals else if (Path.GetExtension(path) == ".ace") { var alternativeTexture = Path.ChangeExtension(path, ".dds"); - + if (File.Exists(alternativeTexture)) { DDSLib.DDSFromFile(alternativeTexture, GraphicsDevice, true, out texture); @@ -195,7 +195,7 @@ public static Texture2D Get(GraphicsDevice graphicsDevice, string path) return SharedMaterialManager.MissingTexture; } } - + public void Mark() { TextureMarks.Clear(); @@ -370,7 +370,7 @@ public Material Load(string materialName, string textureName = null, int options return Materials[materialKey]; } - public bool LoadNightTextures() + public bool LoadNightTextures() { int count = 0; foreach (SceneryMaterial material in from material in Materials.Values @@ -391,11 +391,11 @@ public bool LoadNightTextures() } } return true; - } + } - public bool LoadDayTextures() - { - int count = 0; + public bool LoadDayTextures() + { + int count = 0; foreach (SceneryMaterial material in from material in Materials.Values where material is SceneryMaterial select material) @@ -412,9 +412,9 @@ public bool LoadDayTextures() return false; // too bad, no more space, other night textures won't be loaded } } - } - return true; - } + } + return true; + } public void Mark() { @@ -438,7 +438,7 @@ public void Sweep() { foreach (var path in MaterialMarks.Where(kvp => !kvp.Value).Select(kvp => kvp.Key)) Materials.Remove(path); - } + } public void LoadPrep() { @@ -471,13 +471,13 @@ public string GetStatus() float distance = 1000; internal void UpdateShaders() { - if(Viewer.Settings.UseMSTSEnv == false) + if (Viewer.Settings.UseMSTSEnv == false) sunDirection = Viewer.World.Sky.SolarDirection; else sunDirection = Viewer.World.MSTSSky.mstsskysolarDirection; SceneryShader.SetLightVector_ZFar(sunDirection, Viewer.Settings.ViewingDistance); - + // Headlight illumination if (Viewer.PlayerLocomotiveViewer != null && Viewer.PlayerLocomotiveViewer.lightDrawer != null @@ -516,13 +516,13 @@ internal void UpdateShaders() else if (sunDirection.Y >= 0.15) { clampValue = 0.5f; // at daytime min headlight - distance = lightDrawer.LightConeDistance*0.1f; // and min distance + distance = lightDrawer.LightConeDistance * 0.1f; // and min distance } else { clampValue = 1 - 2.5f * (sunDirection.Y + 0.05f); // in the meantime interpolate - distance = lightDrawer.LightConeDistance*(1-4.5f*(sunDirection.Y + 0.05f)); //ditto + distance = lightDrawer.LightConeDistance * (1 - 4.5f * (sunDirection.Y + 0.05f)); //ditto } SceneryShader.SetHeadlight(ref lightDrawer.LightConePosition, ref lightDrawer.LightConeDirection, distance, lightDrawer.LightConeMinDotProduct, (float)(Viewer.Simulator.GameTime - fadeStartTimer), fadeDuration, clampValue, ref lightDrawer.LightConeColor); } @@ -578,7 +578,7 @@ public override string ToString() { if (String.IsNullOrEmpty(Key)) return 0; - return Key.Length%10; + return Key.Length % 10; } [CallOnThread("Loader")] @@ -708,7 +708,8 @@ public class SceneryMaterial : Material IEnumerator ShaderPassesImage; IEnumerator ShaderPassesVegetation; IEnumerator ShaderPasses; - public static readonly DepthStencilState DepthReadCompareLess = new DepthStencilState { + public static readonly DepthStencilState DepthReadCompareLess = new DepthStencilState + { DepthBufferWriteEnable = false, DepthBufferFunction = CompareFunction.Less, }; @@ -723,13 +724,13 @@ public SceneryMaterial(Viewer viewer, string texturePath, SceneryMaterialOptions Texture = SharedMaterialManager.MissingTexture; NightTexture = SharedMaterialManager.MissingTexture; // if "trainset" is in the path (true for night textures for 3DCabs) deferred load of night textures is disabled - if (!String.IsNullOrEmpty(texturePath) && (Options & SceneryMaterialOptions.NightTexture) != 0 && ((!viewer.IsDaytime && !viewer.IsNighttime) + if (!String.IsNullOrEmpty(texturePath) && (Options & SceneryMaterialOptions.NightTexture) != 0 && ((!viewer.IsDaytime && !viewer.IsNighttime) || TexturePath.Contains(@"\trainset\"))) { var nightTexturePath = Helpers.GetNightTextureFile(Viewer.Simulator, texturePath); if (!String.IsNullOrEmpty(nightTexturePath)) NightTexture = Viewer.TextureManager.Get(nightTexturePath.ToLower()); - Texture = Viewer.TextureManager.Get(texturePath, true); + Texture = Viewer.TextureManager.Get(texturePath, true); } else if ((Options & SceneryMaterialOptions.NightTexture) != 0 && viewer.IsDaytime) { @@ -760,14 +761,14 @@ public SceneryMaterial(Viewer viewer, string texturePath, SceneryMaterialOptions } - public bool LoadNightTexture () - { + public bool LoadNightTexture() + { bool oneMore = false; - if (((Options & SceneryMaterialOptions.NightTexture) != 0) && (NightTexture == SharedMaterialManager.MissingTexture)) + if (((Options & SceneryMaterialOptions.NightTexture) != 0) && (NightTexture == SharedMaterialManager.MissingTexture)) { var nightTexturePath = Helpers.GetNightTextureFile(Viewer.Simulator, TexturePath); if (!String.IsNullOrEmpty(nightTexturePath)) - { + { NightTexture = Viewer.TextureManager.Get(nightTexturePath.ToLower()); oneMore = true; } @@ -775,16 +776,16 @@ public bool LoadNightTexture () return oneMore; } - public bool LoadDayTexture () - { - bool oneMore = false; - if (Texture == SharedMaterialManager.MissingTexture && !String.IsNullOrEmpty(TexturePath)) - { + public bool LoadDayTexture() + { + bool oneMore = false; + if (Texture == SharedMaterialManager.MissingTexture && !String.IsNullOrEmpty(TexturePath)) + { Texture = Viewer.TextureManager.Get(TexturePath.ToLower()); oneMore = true; - } - return oneMore; - } + } + return oneMore; + } public override void SetState(GraphicsDevice graphicsDevice, Material previousMaterial) { @@ -894,7 +895,7 @@ public override void SetState(GraphicsDevice graphicsDevice, Material previousMa shader.ImageTexture = NightTexture; shader.ImageTextureIsNight = true; } - else + else { shader.ImageTexture = Texture; shader.ImageTextureIsNight = false; @@ -985,7 +986,8 @@ public override SamplerState GetShadowTextureAddressMode() SamplerStates.Add(textureAddressMode, new Dictionary()); if (!SamplerStates[textureAddressMode].ContainsKey(mipMapBias)) - SamplerStates[textureAddressMode].Add(mipMapBias, new SamplerState { + SamplerStates[textureAddressMode].Add(mipMapBias, new SamplerState + { AddressU = textureAddressMode, AddressV = textureAddressMode, Filter = TextureFilter.Anisotropic, @@ -1027,11 +1029,11 @@ public ShadowMapMaterial(Viewer viewer) var shadowMapResolution = Viewer.Settings.ShadowMapResolution; BlurVertexBuffer = new VertexBuffer(Viewer.RenderProcess.GraphicsDevice, typeof(VertexPositionTexture), 4, BufferUsage.WriteOnly); BlurVertexBuffer.SetData(new[] { - new VertexPositionTexture(new Vector3(-1, +1, 0), new Vector2(0, 0)), - new VertexPositionTexture(new Vector3(-1, -1, 0), new Vector2(0, shadowMapResolution)), - new VertexPositionTexture(new Vector3(+1, +1, 0), new Vector2(shadowMapResolution, 0)), - new VertexPositionTexture(new Vector3(+1, -1, 0), new Vector2(shadowMapResolution, shadowMapResolution)), - }); + new VertexPositionTexture(new Vector3(-1, +1, 0), new Vector2(0, 0)), + new VertexPositionTexture(new Vector3(-1, -1, 0), new Vector2(0, shadowMapResolution)), + new VertexPositionTexture(new Vector3(+1, +1, 0), new Vector2(shadowMapResolution, 0)), + new VertexPositionTexture(new Vector3(+1, -1, 0), new Vector2(shadowMapResolution, shadowMapResolution)), + }); } public void SetState(GraphicsDevice graphicsDevice, Mode mode) @@ -1124,9 +1126,9 @@ public void SetState(GraphicsDevice graphicsDevice, Texture2D screen) shader.Screen = screen; shader.GlassColor = Color.Black; - graphicsDevice.BlendState = BlendState.NonPremultiplied; - graphicsDevice.RasterizerState = RasterizerState.CullNone; - graphicsDevice.DepthStencilState = DepthStencilState.None; + graphicsDevice.BlendState = BlendState.NonPremultiplied; + graphicsDevice.RasterizerState = RasterizerState.CullNone; + graphicsDevice.DepthStencilState = DepthStencilState.None; } public void Render(GraphicsDevice graphicsDevice, RenderPrimitive renderPrimitive, ref Matrix XNAWorldMatrix, ref Matrix XNAViewMatrix, ref Matrix XNAProjectionMatrix) @@ -1146,9 +1148,9 @@ public void Render(GraphicsDevice graphicsDevice, RenderPrimitive renderPrimitiv public override void ResetState(GraphicsDevice graphicsDevice) { - graphicsDevice.BlendState = BlendState.Opaque; - graphicsDevice.RasterizerState = RasterizerState.CullCounterClockwise; - graphicsDevice.DepthStencilState = DepthStencilState.Default; + graphicsDevice.BlendState = BlendState.Opaque; + graphicsDevice.RasterizerState = RasterizerState.CullCounterClockwise; + graphicsDevice.DepthStencilState = DepthStencilState.Default; } public override bool GetBlending() @@ -1220,7 +1222,7 @@ public SolidColorMaterial(Viewer viewer, float a, float r, float g, float b) { basicEffect = new BasicEffect(Viewer.RenderProcess.GraphicsDevice); basicEffect.Alpha = a; - basicEffect.DiffuseColor = new Vector3(r , g , b ); + basicEffect.DiffuseColor = new Vector3(r, g, b); basicEffect.SpecularColor = new Vector3(0.25f, 0.25f, 0.25f); basicEffect.SpecularPower = 5.0f; basicEffect.AmbientLightColor = new Vector3(0.2f, 0.2f, 0.2f); diff --git a/Source/RunActivity/Viewer3D/Noise.cs b/Source/RunActivity/Viewer3D/Noise.cs index 4e849bd1c5..70e9252e65 100644 --- a/Source/RunActivity/Viewer3D/Noise.cs +++ b/Source/RunActivity/Viewer3D/Noise.cs @@ -43,11 +43,11 @@ public static float Generate(float x) float n0, n1; - float t0 = 1.0f - x0*x0; + float t0 = 1.0f - x0 * x0; t0 *= t0; n0 = t0 * t0 * grad(perm[i0 & 0xff], x0); - float t1 = 1.0f - x1*x1; + float t1 = 1.0f - x1 * x1; t1 *= t1; n1 = t1 * t1 * grad(perm[i1 & 0xff], x1); // The maximum value of this noise is 8*(3/4)^4 = 2.53125 @@ -69,23 +69,23 @@ public static float Generate(float x, float y) float n0, n1, n2; // Noise contributions from the three corners // Skew the input space to determine which simplex cell we're in - float s = (x+y)*F2; // Hairy factor for 2D + float s = (x + y) * F2; // Hairy factor for 2D float xs = x + s; float ys = y + s; int i = FastFloor(xs); int j = FastFloor(ys); - float t = (float)(i+j)*G2; - float X0 = i-t; // Unskew the cell origin back to (x,y) space - float Y0 = j-t; - float x0 = x-X0; // The x,y distances from the cell origin - float y0 = y-Y0; + float t = (float)(i + j) * G2; + float X0 = i - t; // Unskew the cell origin back to (x,y) space + float Y0 = j - t; + float x0 = x - X0; // The x,y distances from the cell origin + float y0 = y - Y0; // For the 2D case, the simplex shape is an equilateral triangle. // Determine which simplex we are in. int i1, j1; // Offsets for second (middle) corner of simplex in (i,j) coords - if(x0>y0) {i1=1; j1=0;} // lower triangle, XY order: (0,0)->(1,0)->(1,1) - else {i1=0; j1=1;} // upper triangle, YX order: (0,0)->(0,1)->(1,1) + if (x0 > y0) { i1 = 1; j1 = 0; } // lower triangle, XY order: (0,0)->(1,0)->(1,1) + else { i1 = 0; j1 = 1; } // upper triangle, YX order: (0,0)->(0,1)->(1,1) // A step of (1,0) in (i,j) means a step of (1-c,-c) in (x,y), and // a step of (0,1) in (i,j) means a step of (-c,1-c) in (x,y), where @@ -101,25 +101,28 @@ public static float Generate(float x, float y) int jj = j % 256; // Calculate the contribution from the three corners - float t0 = 0.5f - x0*x0-y0*y0; - if(t0 < 0.0f) n0 = 0.0f; - else { + float t0 = 0.5f - x0 * x0 - y0 * y0; + if (t0 < 0.0f) n0 = 0.0f; + else + { t0 *= t0; - n0 = t0 * t0 * grad(perm[ii+perm[jj]], x0, y0); + n0 = t0 * t0 * grad(perm[ii + perm[jj]], x0, y0); } - float t1 = 0.5f - x1*x1-y1*y1; - if(t1 < 0.0f) n1 = 0.0f; - else { + float t1 = 0.5f - x1 * x1 - y1 * y1; + if (t1 < 0.0f) n1 = 0.0f; + else + { t1 *= t1; - n1 = t1 * t1 * grad(perm[ii+i1+perm[jj+j1]], x1, y1); + n1 = t1 * t1 * grad(perm[ii + i1 + perm[jj + j1]], x1, y1); } - float t2 = 0.5f - x2*x2-y2*y2; - if(t2 < 0.0f) n2 = 0.0f; - else { + float t2 = 0.5f - x2 * x2 - y2 * y2; + if (t2 < 0.0f) n2 = 0.0f; + else + { t2 *= t2; - n2 = t2 * t2 * grad(perm[ii+1+perm[jj+1]], x2, y2); + n2 = t2 * t2 * grad(perm[ii + 1 + perm[jj + 1]], x2, y2); } // Add contributions from each corner to get the final noise value. @@ -127,7 +130,7 @@ public static float Generate(float x, float y) return 40.0f * (n0 + n1 + n2); // TODO: The scale factor is preliminary! } - + public static float Generate(float x, float y, float z) { // Simple skewing factors for the 3D case @@ -137,21 +140,21 @@ public static float Generate(float x, float y, float z) float n0, n1, n2, n3; // Noise contributions from the four corners // Skew the input space to determine which simplex cell we're in - float s = (x+y+z)*F3; // Very nice and simple skew factor for 3D - float xs = x+s; - float ys = y+s; - float zs = z+s; + float s = (x + y + z) * F3; // Very nice and simple skew factor for 3D + float xs = x + s; + float ys = y + s; + float zs = z + s; int i = FastFloor(xs); int j = FastFloor(ys); int k = FastFloor(zs); - float t = (float)(i+j+k)*G3; - float X0 = i-t; // Unskew the cell origin back to (x,y,z) space - float Y0 = j-t; - float Z0 = k-t; - float x0 = x-X0; // The x,y,z distances from the cell origin - float y0 = y-Y0; - float z0 = z-Z0; + float t = (float)(i + j + k) * G3; + float X0 = i - t; // Unskew the cell origin back to (x,y,z) space + float Y0 = j - t; + float Z0 = k - t; + float x0 = x - X0; // The x,y,z distances from the cell origin + float y0 = y - Y0; + float z0 = z - Z0; // For the 3D case, the simplex shape is a slightly irregular tetrahedron. // Determine which simplex we are in. @@ -159,16 +162,18 @@ public static float Generate(float x, float y, float z) int i2, j2, k2; // Offsets for third corner of simplex in (i,j,k) coords /* This code would benefit from a backport from the GLSL version! */ - if(x0>=y0) { - if(y0>=z0) - { i1=1; j1=0; k1=0; i2=1; j2=1; k2=0; } // X Y Z order - else if(x0>=z0) { i1=1; j1=0; k1=0; i2=1; j2=0; k2=1; } // X Z Y order - else { i1=0; j1=0; k1=1; i2=1; j2=0; k2=1; } // Z X Y order - } - else { // x0= y0) + { + if (y0 >= z0) + { i1 = 1; j1 = 0; k1 = 0; i2 = 1; j2 = 1; k2 = 0; } // X Y Z order + else if (x0 >= z0) { i1 = 1; j1 = 0; k1 = 0; i2 = 1; j2 = 0; k2 = 1; } // X Z Y order + else { i1 = 0; j1 = 0; k1 = 1; i2 = 1; j2 = 0; k2 = 1; } // Z X Y order + } + else + { // x0= Viewer.PlayerTrain.Cars.Count? " " :Viewer.PlayerTrain.Cars[CarPosition].CarID), LabelAlignment.Center)); + vbox.Add(ID = new Label(vbox.RemainingWidth, Owner.TextFontDefault.Height, Viewer.Catalog.GetString("Car ID") + " " + (CarPosition >= Viewer.PlayerTrain.Cars.Count ? " " : Viewer.PlayerTrain.Cars[CarPosition].CarID), LabelAlignment.Center)); ID.Color = Color.Red; vbox.AddHorizontalSeparator(); vbox.Add(buttonHandbrake = new Label(vbox.RemainingWidth, Owner.TextFontDefault.Height, Viewer.Catalog.GetString("Toggle Handbrake"), LabelAlignment.Center)); diff --git a/Source/RunActivity/Viewer3D/Popups/CompassWindow.cs b/Source/RunActivity/Viewer3D/Popups/CompassWindow.cs index 7a9f64b944..b21e399d3e 100644 --- a/Source/RunActivity/Viewer3D/Popups/CompassWindow.cs +++ b/Source/RunActivity/Viewer3D/Popups/CompassWindow.cs @@ -17,40 +17,40 @@ // This file is the responsibility of the 3D & Environment Team. +using System; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Orts.Common; using ORTS.Common; -using System; namespace Orts.Viewer3D.Popups { - public class CompassWindow : Window - { - PopupCompass Compass; - Label Latitude; - Label Longitude; + public class CompassWindow : Window + { + PopupCompass Compass; + Label Latitude; + Label Longitude; - public CompassWindow(WindowManager owner) - : base(owner, Window.DecorationSize.X + owner.TextFontDefault.Height * 15, Window.DecorationSize.Y + owner.TextFontDefault.Height * 4, Viewer.Catalog.GetString("Compass")) - { - } + public CompassWindow(WindowManager owner) + : base(owner, Window.DecorationSize.X + owner.TextFontDefault.Height * 15, Window.DecorationSize.Y + owner.TextFontDefault.Height * 4, Viewer.Catalog.GetString("Compass")) + { + } - protected override ControlLayout Layout(ControlLayout layout) - { - var vbox = base.Layout(layout).AddLayoutVertical(); - vbox.Add(Compass = new PopupCompass(vbox.RemainingWidth, vbox.RemainingHeight - vbox.TextHeight)); - { - var hbox = vbox.AddLayoutHorizontalLineOfText(); - var w = hbox.RemainingWidth / 9; - hbox.Add(new Label(1 * w, hbox.RemainingHeight, Viewer.Catalog.GetString("Lat:"), LabelAlignment.Right)); - hbox.Add(Latitude = new Label(3 * w, hbox.RemainingHeight, "000.000000", LabelAlignment.Right)); - hbox.AddSpace(w, hbox.RemainingHeight); - hbox.Add(new Label(1 * w, hbox.RemainingHeight, Viewer.Catalog.GetString("Lon:"), LabelAlignment.Right)); - hbox.Add(Longitude = new Label(3 * w, hbox.RemainingHeight, "000.000000", LabelAlignment.Right)); - } - return vbox; - } + protected override ControlLayout Layout(ControlLayout layout) + { + var vbox = base.Layout(layout).AddLayoutVertical(); + vbox.Add(Compass = new PopupCompass(vbox.RemainingWidth, vbox.RemainingHeight - vbox.TextHeight)); + { + var hbox = vbox.AddLayoutHorizontalLineOfText(); + var w = hbox.RemainingWidth / 9; + hbox.Add(new Label(1 * w, hbox.RemainingHeight, Viewer.Catalog.GetString("Lat:"), LabelAlignment.Right)); + hbox.Add(Latitude = new Label(3 * w, hbox.RemainingHeight, "000.000000", LabelAlignment.Right)); + hbox.AddSpace(w, hbox.RemainingHeight); + hbox.Add(new Label(1 * w, hbox.RemainingHeight, Viewer.Catalog.GetString("Lon:"), LabelAlignment.Right)); + hbox.Add(Longitude = new Label(3 * w, hbox.RemainingHeight, "000.000000", LabelAlignment.Right)); + } + return vbox; + } public override void PrepareFrame(ElapsedTime elapsedTime, bool updateFull) { @@ -70,20 +70,20 @@ public override void PrepareFrame(ElapsedTime elapsedTime, bool updateFull) Latitude.Text = MathHelper.ToDegrees((float)latitude).ToString("F6"); Longitude.Text = MathHelper.ToDegrees((float)longitude).ToString("F6"); } - } - } + } + } - public class PopupCompass : Control - { - static Texture2D CompassTexture; - static int[] HeadingHalfWidths; + public class PopupCompass : Control + { + static Texture2D CompassTexture; + static int[] HeadingHalfWidths; WindowTextFont Font; - public float Heading; + public float Heading; - public PopupCompass(int width, int height) - : base(0, 0, width, height) - { - } + public PopupCompass(int width, int height) + : base(0, 0, width, height) + { + } public override void Initialize(WindowManager windowManager) { @@ -126,5 +126,5 @@ internal override void Draw(SpriteBatch spriteBatch, Point offset) } spriteBatch.Draw(CompassTexture, new Rectangle(offset.X + Position.X + Position.Width / 2, offset.Y + Position.Bottom - height, 1, height), Color.White); } - } + } } diff --git a/Source/RunActivity/Viewer3D/Popups/ComposeMessage.cs b/Source/RunActivity/Viewer3D/Popups/ComposeMessage.cs index 7da738d485..efeef920fc 100644 --- a/Source/RunActivity/Viewer3D/Popups/ComposeMessage.cs +++ b/Source/RunActivity/Viewer3D/Popups/ComposeMessage.cs @@ -17,10 +17,10 @@ // This file is the responsibility of the 3D & Environment Team. +using System.Linq; using Microsoft.Xna.Framework.Input; using Orts.MultiPlayer; using ORTS.Common; -using System.Linq; namespace Orts.Viewer3D.Popups { diff --git a/Source/RunActivity/Viewer3D/Popups/EOTListWindow.cs b/Source/RunActivity/Viewer3D/Popups/EOTListWindow.cs index 51849c3252..aa14104ede 100644 --- a/Source/RunActivity/Viewer3D/Popups/EOTListWindow.cs +++ b/Source/RunActivity/Viewer3D/Popups/EOTListWindow.cs @@ -18,17 +18,11 @@ // This file is the responsibility of the 3D & Environment Team. using System; -using System.Collections.Generic; using System.IO; using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Orts.Simulation; -using Orts.Simulation.AIs; -using Orts.Simulation.Physics; -using Orts.Simulation.RollingStocks.SubSystems; using Orts.Common; +using Orts.Simulation; using ORTS.Common; -using ORTS.Common.Input; namespace Orts.Viewer3D.Popups { @@ -60,13 +54,13 @@ protected override ControlLayout Layout(ControlLayout layout) EOTLabel filename, foldername; line.Add(filename = new EOTLabel(colWidth, line.RemainingHeight, Owner.Viewer, eotType, Path.GetFileNameWithoutExtension(eotType), LabelAlignment.Left)); line.Add(foldername = new EOTLabel(colWidth - Owner.TextFontDefault.Height, line.RemainingHeight, Owner.Viewer, eotType, (Path.GetDirectoryName(eotType)).Remove(0, Owner.Viewer.Simulator.EOTPath.Length), LabelAlignment.Left)); - if (playerLocomotive?.Train != null && eotType.ToLower() == playerLocomotive.Train.EOT?.WagFilePath.ToLower()) - { + if (playerLocomotive?.Train != null && eotType.ToLower() == playerLocomotive.Train.EOT?.WagFilePath.ToLower()) + { filename.Color = Color.Red; foldername.Color = Color.Red; } } - } + } return vbox; } @@ -127,4 +121,4 @@ void EOTListLabel_Click(Control arg1, Point arg2) } } } - } +} diff --git a/Source/RunActivity/Viewer3D/Popups/HUDWindow.cs b/Source/RunActivity/Viewer3D/Popups/HUDWindow.cs index 82ab0736dd..62ba2634f3 100644 --- a/Source/RunActivity/Viewer3D/Popups/HUDWindow.cs +++ b/Source/RunActivity/Viewer3D/Popups/HUDWindow.cs @@ -18,6 +18,11 @@ // This file is the responsibility of the 3D & Environment Team. #define SHOW_PHYSICS_GRAPHS //Matej Pacha - if commented, the physics graphs are not ready for public release +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Orts.Simulation.AIs; @@ -30,12 +35,6 @@ using Orts.Viewer3D.Processes; using ORTS.Common; using ORTS.Scripting.Api; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices; namespace Orts.Viewer3D.Popups { @@ -213,8 +212,8 @@ public override void PrepareFrame(RenderFrame frame, ElapsedTime elapsedTime, bo LocomotiveGraphsThrottle.AddSample(loco.ThrottlePercent * 0.01f); if (locoD != null) { - LocomotiveGraphsInputPower.AddSample(locoD.DieselEngines.MaxOutputPowerW / locoD.DieselEngines.MaxPowerW); - LocomotiveGraphsOutputPower.AddSample(locoD.DieselEngines.PowerW / locoD.DieselEngines.MaxPowerW); + LocomotiveGraphsInputPower.AddSample(locoD.DieselEngines.MaxOutputPowerW / locoD.DieselEngines.MaxPowerW); + LocomotiveGraphsOutputPower.AddSample(locoD.DieselEngines.PowerW / locoD.DieselEngines.MaxPowerW); } if (locoE != null) { @@ -480,7 +479,7 @@ void TextPageCommon(TableData table) else if (Viewer.PlayerTrain.IsWheelSlipWarninq) TableAddLine(table, Viewer.Catalog.GetString("Wheel slip warning") + "???"); - if (Viewer.PlayerTrain.IsBrakeSkid ) + if (Viewer.PlayerTrain.IsBrakeSkid) TableAddLine(table, Viewer.Catalog.GetString("Wheel skid") + "!!!"); if (Viewer.PlayerLocomotive.GetSanderOn()) @@ -492,7 +491,7 @@ void TextPageCommon(TableData table) TableAddLine(table, Viewer.Catalog.GetString("Sander on") + "???"); } - bool flipped = (Viewer.PlayerLocomotive as MSTSLocomotive).GetCabFlipped() ^ (Viewer.PlayerLocomotive as MSTSLocomotive).Flipped; + bool flipped = (Viewer.PlayerLocomotive as MSTSLocomotive).GetCabFlipped() ^ (Viewer.PlayerLocomotive as MSTSLocomotive).Flipped; var doorLeftOpen = Viewer.PlayerLocomotive.Train.DoorState(flipped ? DoorSide.Right : DoorSide.Left) != DoorState.Closed; var doorRightOpen = Viewer.PlayerLocomotive.Train.DoorState(flipped ? DoorSide.Left : DoorSide.Right) != DoorState.Closed; if (doorLeftOpen || doorRightOpen) @@ -531,7 +530,7 @@ void TextPageConsistInfo(TableData table) float tonnage = 0f; foreach (var car in train.Cars) { - if(car.WagonType == TrainCar.WagonTypes.Freight || car.WagonType == TrainCar.WagonTypes.Passenger) + if (car.WagonType == TrainCar.WagonTypes.Freight || car.WagonType == TrainCar.WagonTypes.Passenger) tonnage += car.MassKG; } TableSetCells(table, 0, @@ -646,7 +645,7 @@ void TextPageDistributedPowerInfo(TableData table) var train = locomotive.Train; int numberOfDieselLocomotives = 0; - for (var i = 0; i 1 ? atext[0].PadRight(nvalmargin[nmargin]) + " = " + atext[1]: text); + if (!lDebriefEvalFile) wDbfEval.WriteLine(atext.Length > 1 ? atext[0].PadRight(nvalmargin[nmargin]) + " = " + atext[1] : text); } else { - if (!lDebriefEvalFile) wDbfEval.Write(atext.Length > 1 ? atext[0].PadRight(nvalmargin[nmargin]) + " = " + atext[1]: text.PadRight(nvalmargin[nmargin])); + if (!lDebriefEvalFile) wDbfEval.Write(atext.Length > 1 ? atext[0].PadRight(nvalmargin[nmargin]) + " = " + atext[1] : text.PadRight(nvalmargin[nmargin])); } if (!lDebriefEvalFile) @@ -1140,7 +1139,7 @@ private void outmesssage(string text, int colW, bool bScroll, int nmargin) line.Add(new Label(colW, line.RemainingHeight, Viewer.Catalog.GetString(text))); } } - + private void consolewltext(string text) { if (!lDebriefEvalFile) wDbfEval.WriteLine(text + "."); @@ -1170,7 +1169,7 @@ protected override ControlLayout Layout(ControlLayout layout) var label = new Label(tabWidth, hbox.RemainingHeight, Tabs[i].TabLabel, LabelAlignment.Center) { Color = ActiveTab == i ? Color.White : Color.Gray, Tag = i }; label.Click += label_Click; hbox.Add(label); - + } vbox.AddHorizontalSeparator(); Tabs[ActiveTab].Layout(vbox); @@ -1210,10 +1209,10 @@ public TabData(Tab tab, string tabLabel, Action layout) } } - + ActivityTask LastActivityTask; bool StoppedAt; - + public override void PrepareFrame(ElapsedTime elapsedTime, bool updateFull) { diff --git a/Source/RunActivity/Viewer3D/Popups/LayeredWindow.cs b/Source/RunActivity/Viewer3D/Popups/LayeredWindow.cs index b51b7c18cf..41a68b39f3 100644 --- a/Source/RunActivity/Viewer3D/Popups/LayeredWindow.cs +++ b/Source/RunActivity/Viewer3D/Popups/LayeredWindow.cs @@ -22,20 +22,20 @@ namespace Orts.Viewer3D.Popups { public abstract class LayeredWindow : Window - { - public LayeredWindow(WindowManager owner, int width, int height, string caption) - : base(owner, width, height, caption) - { - } + { + public LayeredWindow(WindowManager owner, int width, int height, string caption) + : base(owner, width, height, caption) + { + } - protected override ControlLayout Layout(ControlLayout layout) - { - return layout; - } + protected override ControlLayout Layout(ControlLayout layout) + { + return layout; + } - public override void Draw(GraphicsDevice graphicsDevice) - { - // Don't draw the normal window stuff here. - } - } + public override void Draw(GraphicsDevice graphicsDevice) + { + // Don't draw the normal window stuff here. + } + } } diff --git a/Source/RunActivity/Viewer3D/Popups/MessagesWindow.cs b/Source/RunActivity/Viewer3D/Popups/MessagesWindow.cs index f7e3306984..72a0c57cf8 100644 --- a/Source/RunActivity/Viewer3D/Popups/MessagesWindow.cs +++ b/Source/RunActivity/Viewer3D/Popups/MessagesWindow.cs @@ -17,13 +17,13 @@ // This file is the responsibility of the 3D & Environment Team. -using Microsoft.Xna.Framework; -using ORTS.Common; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading; +using Microsoft.Xna.Framework; +using ORTS.Common; namespace Orts.Viewer3D.Popups { @@ -40,19 +40,19 @@ public class MessagesWindow : LayeredWindow List Messages = new List(); bool MessagesChanged; - public List GetTextMessages() - { - List text = null; - foreach (var m in Messages) - { - if (true/*m.Text.StartsWith("TEXT")*/) - { - if (text == null) text = new List(); - text.Add(m.Text); - } - } - return text; - } + public List GetTextMessages() + { + List text = null; + foreach (var m in Messages) + { + if (true/*m.Text.StartsWith("TEXT")*/) + { + if (text == null) text = new List(); + text.Add(m.Text); + } + } + return text; + } public MessagesWindow(WindowManager owner) : base(owner, HorizontalPadding, VerticalPadding, "Messages") { @@ -72,14 +72,14 @@ protected internal override void Restore(BinaryReader inf) { base.Restore(inf); var messages = new List(inf.ReadInt32()); - for( var i = 0; i < messages.Capacity; i++ ) + for (var i = 0; i < messages.Capacity; i++) { messages.Add(new Message(inf)); // Reset the EndTime so the message lasts as long on restore as it did orginally. // Without this reset, the band may last a very long time. var last = messages.Count - 1; var message = messages[last]; - message.EndTime = Owner.Viewer.Simulator.GameTime + (message.EndTime - message.StartTime); + message.EndTime = Owner.Viewer.Simulator.GameTime + (message.EndTime - message.StartTime); MessagesChanged = true; } Messages = messages; @@ -118,7 +118,7 @@ protected override ControlLayout Layout(ControlLayout layout) var maxLines = vbox.RemainingHeight / TextSize; var messages = Messages.Take(maxLines).Reverse().ToList(); vbox.AddSpace(0, vbox.RemainingHeight - TextSize * messages.Count); - foreach( var message in messages ) + foreach (var message in messages) { var hbox = vbox.AddLayoutHorizontal(TextSize); var width = Owner.Viewer.WindowManager.TextFontDefault.MeasureString(message.Text); diff --git a/Source/RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs b/Source/RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs index 50d84b2587..d6fe9c7567 100644 --- a/Source/RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs +++ b/Source/RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs @@ -17,22 +17,13 @@ // This file is the responsibility of the 3D & Environment Team. -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using ORTS.Common; -using ORTS.Common.Input; -using Orts.Simulation.Physics; -using Orts.Simulation.RollingStocks; -using Orts.Simulation.RollingStocks.SubSystems.Brakes; using System; using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Text; - -using System.Threading; using System.IO; +using System.Linq; +using Microsoft.Xna.Framework; using Orts.MultiPlayer; +using ORTS.Common; namespace Orts.Viewer3D.Popups { @@ -119,7 +110,7 @@ protected internal override void Initialize() { base.Initialize(); // Reset window size - if(!Owner.Viewer.Simulator.TimetableMode) + if (!Owner.Viewer.Simulator.TimetableMode) UpdateWindowSize(); } @@ -188,7 +179,7 @@ protected override ControlLayout Layout(ControlLayout layout) void FontToBold_Click(Control arg1, Point arg2) { FontChanged = true; - FontToBold = !FontToBold; + FontToBold = !FontToBold; UpdateWindowSize(); } diff --git a/Source/RunActivity/Viewer3D/Popups/NextStationWindow.cs b/Source/RunActivity/Viewer3D/Popups/NextStationWindow.cs index cd39a4bdf4..8ad59badfa 100644 --- a/Source/RunActivity/Viewer3D/Popups/NextStationWindow.cs +++ b/Source/RunActivity/Viewer3D/Popups/NextStationWindow.cs @@ -17,14 +17,14 @@ // This file is the responsibility of the 3D & Environment Team. +using System; +using System.Collections.Generic; using Microsoft.Xna.Framework; using Orts.Simulation; using Orts.Simulation.Physics; -using Orts.Simulation.Timetables; using Orts.Simulation.Signalling; +using Orts.Simulation.Timetables; using ORTS.Common; -using System; -using System.Collections.Generic; namespace Orts.Viewer3D.Popups { diff --git a/Source/RunActivity/Viewer3D/Popups/OSDCars.cs b/Source/RunActivity/Viewer3D/Popups/OSDCars.cs index 4da23f0330..47af9c92b7 100644 --- a/Source/RunActivity/Viewer3D/Popups/OSDCars.cs +++ b/Source/RunActivity/Viewer3D/Popups/OSDCars.cs @@ -17,12 +17,11 @@ // This file is the responsibility of the 3D & Environment Team. +using System.Collections.Generic; using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; using Orts.Simulation.RollingStocks; using ORTS.Common; using ORTS.Settings; -using System.Collections.Generic; namespace Orts.Viewer3D.Popups { diff --git a/Source/RunActivity/Viewer3D/Popups/OSDLocations.cs b/Source/RunActivity/Viewer3D/Popups/OSDLocations.cs index be8ac923d1..a28c0b6b2c 100644 --- a/Source/RunActivity/Viewer3D/Popups/OSDLocations.cs +++ b/Source/RunActivity/Viewer3D/Popups/OSDLocations.cs @@ -17,12 +17,11 @@ // This file is the responsibility of the 3D & Environment Team. +using System.Collections.Generic; using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; using Orts.Simulation; using ORTS.Common; using ORTS.Settings; -using System.Collections.Generic; namespace Orts.Viewer3D.Popups { diff --git a/Source/RunActivity/Viewer3D/Popups/QuitWindow.cs b/Source/RunActivity/Viewer3D/Popups/QuitWindow.cs index d56cf55120..e220059172 100644 --- a/Source/RunActivity/Viewer3D/Popups/QuitWindow.cs +++ b/Source/RunActivity/Viewer3D/Popups/QuitWindow.cs @@ -38,23 +38,23 @@ protected override ControlLayout Layout(ControlLayout layout) Label buttonQuit, buttonSave, buttonContinue; var vbox = base.Layout(layout).AddLayoutVertical(); var heightForLabels = 10; - if (!Orts.MultiPlayer.MPManager.IsMultiPlayer()) - heightForLabels = (vbox.RemainingHeight - 2 * ControlLayout.SeparatorSize) / 3; - else heightForLabels = (vbox.RemainingHeight - 2 * ControlLayout.SeparatorSize) / 2; + if (!Orts.MultiPlayer.MPManager.IsMultiPlayer()) + heightForLabels = (vbox.RemainingHeight - 2 * ControlLayout.SeparatorSize) / 3; + else heightForLabels = (vbox.RemainingHeight - 2 * ControlLayout.SeparatorSize) / 2; var spacing = (heightForLabels - Owner.TextFontDefault.Height) / 2; vbox.AddSpace(0, spacing); vbox.Add(buttonQuit = new Label(vbox.RemainingWidth, Owner.TextFontDefault.Height, Viewer.Catalog.GetStringFmt("Quit {1} ({0})", Owner.Viewer.Settings.Input.Commands[(int)UserCommand.GameQuit], Application.ProductName), LabelAlignment.Center)); vbox.AddSpace(0, spacing); vbox.AddHorizontalSeparator(); - if (!Orts.MultiPlayer.MPManager.IsMultiPlayer()) - { + if (!Orts.MultiPlayer.MPManager.IsMultiPlayer()) + { buttonSave = new Label(vbox.RemainingWidth, Owner.TextFontDefault.Height, Viewer.Catalog.GetStringFmt("Save your game ({0})", Owner.Viewer.Settings.Input.Commands[(int)UserCommand.GameSave]), LabelAlignment.Center); - vbox.AddSpace(0, spacing); - vbox.Add(buttonSave); - vbox.AddSpace(0, spacing); - vbox.AddHorizontalSeparator(); - buttonSave.Click += new Action(buttonSave_Click); - } + vbox.AddSpace(0, spacing); + vbox.Add(buttonSave); + vbox.AddSpace(0, spacing); + vbox.AddHorizontalSeparator(); + buttonSave.Click += new Action(buttonSave_Click); + } vbox.AddSpace(0, spacing); vbox.Add(buttonContinue = new Label(vbox.RemainingWidth, Owner.TextFontDefault.Height, Viewer.Catalog.GetStringFmt("Continue playing ({0})", Owner.Viewer.Settings.Input.Commands[(int)UserCommand.GamePauseMenu]), LabelAlignment.Center)); buttonQuit.Click += new Action(buttonQuit_Click); @@ -75,7 +75,8 @@ void buttonSave_Click(Control arg1, Point arg2) void buttonContinue_Click(Control arg1, Point arg2) { Visible = Owner.Viewer.Simulator.Paused = false; - if( Owner.Viewer.Log.PauseState == ReplayPauseState.During ) { + if (Owner.Viewer.Log.PauseState == ReplayPauseState.During) + { Owner.Viewer.Log.PauseState = ReplayPauseState.Done; } Owner.Viewer.ResumeReplaying(); diff --git a/Source/RunActivity/Viewer3D/Popups/SignallingDebugWindow.cs b/Source/RunActivity/Viewer3D/Popups/SignallingDebugWindow.cs index abf52249ab..a93333cd88 100644 --- a/Source/RunActivity/Viewer3D/Popups/SignallingDebugWindow.cs +++ b/Source/RunActivity/Viewer3D/Popups/SignallingDebugWindow.cs @@ -114,7 +114,7 @@ public override void PrepareFrame(ElapsedTime elapsedTime, bool updateFull) totalDistance += cache.Length; } var nodeIndex = cacheNode.TrackNodeIndex; - while (cacheNode.TrackNodeIndex == nodeIndex && cacheNode.NextSection()); + while (cacheNode.TrackNodeIndex == nodeIndex && cacheNode.NextSection()) ; } var switchErrorDistance = initialNodeOffset + DisplayDistance + SignalWarningDistance; @@ -211,7 +211,7 @@ public override void PrepareFrame(ElapsedTime elapsedTime, bool updateFull) } else if (switchObj != null) { - primitives.Add(new DispatcherLabel(currentPosition.WorldLocation, objDistance >= switchErrorDistance ? Color.Red : Color.White, String.Format("Switch ({0}, {1}-way, {2} set)", switchObj.TrackNode.Index, switchObj.TrackNode.Outpins, switchObj.TrackNode.TrJunctionNode.SelectedRoute + 1), Owner.TextFontDefaultOutlined)); + primitives.Add(new DispatcherLabel(currentPosition.WorldLocation, objDistance >= switchErrorDistance ? Color.Red : Color.White, String.Format("Switch ({0}, {1}-way, {2} set)", switchObj.TrackNode.Index, switchObj.TrackNode.Outpins, switchObj.TrackNode.TrJunctionNode.SelectedRoute + 1), Owner.TextFontDefaultOutlined)); } else if (signalObj != null) { @@ -361,7 +361,8 @@ enum DistanceToType Signal, } - public class TrackSectionCacheEntry { + public class TrackSectionCacheEntry + { public int Age; public Traveller.TravellerDirection Direction; public float Length; diff --git a/Source/RunActivity/Viewer3D/Popups/SwitchWindow.cs b/Source/RunActivity/Viewer3D/Popups/SwitchWindow.cs index e5ba460cb2..b43973da74 100644 --- a/Source/RunActivity/Viewer3D/Popups/SwitchWindow.cs +++ b/Source/RunActivity/Viewer3D/Popups/SwitchWindow.cs @@ -17,6 +17,9 @@ // This file is the responsibility of the 3D & Environment Team. +using System; +using System.Diagnostics; +using System.Linq; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Orts.Formats.Msts; @@ -24,9 +27,6 @@ using Orts.Simulation.Physics; using Orts.Simulation.Signalling; using ORTS.Common; -using System; -using System.Diagnostics; -using System.Linq; namespace Orts.Viewer3D.Popups { diff --git a/Source/RunActivity/Viewer3D/Popups/TTDetachWindow.cs b/Source/RunActivity/Viewer3D/Popups/TTDetachWindow.cs index 0e91698bf8..9cedb62475 100644 --- a/Source/RunActivity/Viewer3D/Popups/TTDetachWindow.cs +++ b/Source/RunActivity/Viewer3D/Popups/TTDetachWindow.cs @@ -17,13 +17,11 @@ // This file is the responsibility of the 3D & Environment Team. +using System; +using System.Collections.Generic; using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; using Orts.Simulation.Timetables; using ORTS.Common; -using System; -using System.Linq; -using System.Collections.Generic; namespace Orts.Viewer3D.Popups { @@ -39,7 +37,7 @@ public class TTDetachWindow : Window DetachInfo reqDetach = null; TTTrain reqTrain; - + public TTDetachWindow(WindowManager owner) : base(owner, Window.DecorationSize.X + WindowImageSizeWidth, Window.DecorationSize.Y + owner.TextFontDefault.Height * WindowImageSizeHeightFactor + ControlLayout.SeparatorSize * 2, Viewer.Catalog.GetString("Timetable Detach Menu")) { @@ -95,7 +93,7 @@ public override void PrepareFrame(ElapsedTime elapsedTime, bool updateFull) } else { - formedTrain = String.Concat(Viewer.Catalog.GetString("static consist"), " : ",reqDetach.DetachFormedTrainName); + formedTrain = String.Concat(Viewer.Catalog.GetString("static consist"), " : ", reqDetach.DetachFormedTrainName); } } diff --git a/Source/RunActivity/Viewer3D/Popups/TrackMonitorWindow.cs b/Source/RunActivity/Viewer3D/Popups/TrackMonitorWindow.cs index e9de5a9a9b..e98fdc3a4c 100644 --- a/Source/RunActivity/Viewer3D/Popups/TrackMonitorWindow.cs +++ b/Source/RunActivity/Viewer3D/Popups/TrackMonitorWindow.cs @@ -45,45 +45,45 @@ public class TrackMonitorWindow : Window static readonly Dictionary AuthorityLabels = new Dictionary { - { Train.END_AUTHORITY.END_OF_TRACK, "End Trck" }, - { Train.END_AUTHORITY.END_OF_PATH, "End Path" }, - { Train.END_AUTHORITY.RESERVED_SWITCH, "Switch" }, + { Train.END_AUTHORITY.END_OF_TRACK, "End Trck" }, + { Train.END_AUTHORITY.END_OF_PATH, "End Path" }, + { Train.END_AUTHORITY.RESERVED_SWITCH, "Switch" }, { Train.END_AUTHORITY.LOOP, "Loop" }, - { Train.END_AUTHORITY.TRAIN_AHEAD, "TrainAhd" }, - { Train.END_AUTHORITY.MAX_DISTANCE, "Max Dist" }, - { Train.END_AUTHORITY.NO_PATH_RESERVED, "No Path" }, + { Train.END_AUTHORITY.TRAIN_AHEAD, "TrainAhd" }, + { Train.END_AUTHORITY.MAX_DISTANCE, "Max Dist" }, + { Train.END_AUTHORITY.NO_PATH_RESERVED, "No Path" }, { Train.END_AUTHORITY.SIGNAL, "Signal" }, { Train.END_AUTHORITY.END_OF_AUTHORITY, "End Auth" }, - }; + }; static readonly Dictionary OutOfControlLabels = new Dictionary { - { Train.OUTOFCONTROL.SPAD, "SPAD" }, - { Train.OUTOFCONTROL.SPAD_REAR, "SPAD-Rear" }, + { Train.OUTOFCONTROL.SPAD, "SPAD" }, + { Train.OUTOFCONTROL.SPAD_REAR, "SPAD-Rear" }, { Train.OUTOFCONTROL.MISALIGNED_SWITCH, "Misalg Sw" }, - { Train.OUTOFCONTROL.OUT_OF_AUTHORITY, "Off Auth" }, - { Train.OUTOFCONTROL.OUT_OF_PATH, "Off Path" }, - { Train.OUTOFCONTROL.SLIPPED_INTO_PATH, "Splipped" }, - { Train.OUTOFCONTROL.SLIPPED_TO_ENDOFTRACK, "Slipped" }, - { Train.OUTOFCONTROL.OUT_OF_TRACK, "Off Track" }, + { Train.OUTOFCONTROL.OUT_OF_AUTHORITY, "Off Auth" }, + { Train.OUTOFCONTROL.OUT_OF_PATH, "Off Path" }, + { Train.OUTOFCONTROL.SLIPPED_INTO_PATH, "Splipped" }, + { Train.OUTOFCONTROL.SLIPPED_TO_ENDOFTRACK, "Slipped" }, + { Train.OUTOFCONTROL.OUT_OF_TRACK, "Off Track" }, { Train.OUTOFCONTROL.SLIPPED_INTO_TURNTABLE, "Slip Turn" }, - { Train.OUTOFCONTROL.UNDEFINED, "Undefined" }, - }; + { Train.OUTOFCONTROL.UNDEFINED, "Undefined" }, + }; public TrackMonitorWindow(WindowManager owner) : base(owner, Window.DecorationSize.X + owner.TextFontDefault.Height * 10, Window.DecorationSize.Y + owner.TextFontDefault.Height * (5 + TrackMonitorHeightInLinesOfText) + ControlLayout.SeparatorSize * 3, Viewer.Catalog.GetString("Track Monitor")) { - ControlModeLabels = new Dictionary + ControlModeLabels = new Dictionary { - { Train.TRAIN_CONTROL.AUTO_SIGNAL , Viewer.Catalog.GetString("Auto Signal") }, - { Train.TRAIN_CONTROL.AUTO_NODE, Viewer.Catalog.GetString("Node") }, - { Train.TRAIN_CONTROL.MANUAL, Viewer.Catalog.GetString("Manual") }, + { Train.TRAIN_CONTROL.AUTO_SIGNAL , Viewer.Catalog.GetString("Auto Signal") }, + { Train.TRAIN_CONTROL.AUTO_NODE, Viewer.Catalog.GetString("Node") }, + { Train.TRAIN_CONTROL.MANUAL, Viewer.Catalog.GetString("Manual") }, { Train.TRAIN_CONTROL.EXPLORER, Viewer.Catalog.GetString("Explorer") }, - { Train.TRAIN_CONTROL.OUT_OF_CONTROL, Viewer.Catalog.GetString("OutOfControl : ") }, + { Train.TRAIN_CONTROL.OUT_OF_CONTROL, Viewer.Catalog.GetString("OutOfControl : ") }, { Train.TRAIN_CONTROL.INACTIVE, Viewer.Catalog.GetString("Inactive") }, { Train.TRAIN_CONTROL.TURNTABLE, Viewer.Catalog.GetString("Turntable") }, - { Train.TRAIN_CONTROL.UNDEFINED, Viewer.Catalog.GetString("Unknown") }, - }; + { Train.TRAIN_CONTROL.UNDEFINED, Viewer.Catalog.GetString("Unknown") }, + }; } public override void TabAction() => Monitor.CycleMode(); @@ -430,7 +430,7 @@ void drawTrack(SpriteBatch spriteBatch, Point offset, float speedMpS, float allo { istrackColorRed = true; DbfEvalIniOverSpeedTimeS = Orts.MultiPlayer.MPManager.Simulator.ClockTime; - } + } if (istrackColorRed && trackColor != Color.Red)//Debrief Eval { @@ -735,7 +735,7 @@ void drawItems(SpriteBatch spriteBatch, Point offset, int startObjectArea, int e } } // reverse display of signals to have correct superposition - for (int iItems = itemList.Count-1 ; iItems >=0; iItems--) + for (int iItems = itemList.Count - 1; iItems >= 0; iItems--) { var thisItem = itemList[iItems]; switch (thisItem.ItemType) @@ -864,7 +864,7 @@ void drawSignalBackward(SpriteBatch spriteBatch, Point offset, int startObjectAr break; } var displayItem = SignalMarkers[aspect]; - + var displayRequired = false; var itemLocation = 0; var itemOffset = 0; diff --git a/Source/RunActivity/Viewer3D/Popups/TracksDebugWindow.cs b/Source/RunActivity/Viewer3D/Popups/TracksDebugWindow.cs index 4bcdbc4bae..6ec4d9d98b 100644 --- a/Source/RunActivity/Viewer3D/Popups/TracksDebugWindow.cs +++ b/Source/RunActivity/Viewer3D/Popups/TracksDebugWindow.cs @@ -17,13 +17,13 @@ // This file is the responsibility of the 3D & Environment Team. +using System; +using System.Collections.Generic; +using System.Linq; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Orts.Simulation; using ORTS.Common; -using System; -using System.Collections.Generic; -using System.Linq; namespace Orts.Viewer3D.Popups { @@ -75,7 +75,7 @@ public override void PrepareFrame(ElapsedTime elapsedTime, bool updateFull) { var previousLocation = currentPosition.WorldLocation; var remaining = currentPosition.MoveInSection(DisplaySegmentLength); - if ((Math.Abs(remaining - DisplaySegmentLength ) < Tolerance) && !currentPosition.NextVectorSection()) + if ((Math.Abs(remaining - DisplaySegmentLength) < Tolerance) && !currentPosition.NextVectorSection()) break; primitives.Add(new DispatcherLineSegment(previousLocation, currentPosition.WorldLocation, Color.LightBlue, 2)); } diff --git a/Source/RunActivity/Viewer3D/Popups/TrainDPUWindow.cs b/Source/RunActivity/Viewer3D/Popups/TrainDPUWindow.cs index f7278763b7..85002313e8 100644 --- a/Source/RunActivity/Viewer3D/Popups/TrainDPUWindow.cs +++ b/Source/RunActivity/Viewer3D/Popups/TrainDPUWindow.cs @@ -17,18 +17,15 @@ // This file is the responsibility of the 3D & Environment Team. -using Microsoft.Xna.Framework.Graphics; -using Orts.Simulation.Physics; -using ORTS.Common; using System; using System.Collections.Generic; +using System.IO; using System.Linq; -using Orts.Simulation.RollingStocks.SubSystems.Brakes; +using Microsoft.Xna.Framework; +using Orts.Simulation.Physics; using Orts.Simulation.RollingStocks; -using System.Text; +using ORTS.Common; using ORTS.Common.Input; -using Microsoft.Xna.Framework; -using System.IO; namespace Orts.Viewer3D.Popups { @@ -41,7 +38,7 @@ public class TrainDpuWindow : Window int LastColLenght = 0; int LastColOverFlow = 0; int LastPlayerTrainCars; - int dpiOffset= 0; + int dpiOffset = 0; public bool normalTextMode = true;// Standard text public bool normalVerticalMode = true;// vertical window size @@ -158,7 +155,7 @@ private static class Symbols public TrainDpuWindow(WindowManager owner) : base(owner, Window.DecorationSize.X + owner.TextFontDefault.Height * 10, Window.DecorationSize.Y + owner.TextFontDefault.Height * 10, Viewer.Catalog.GetString("Train Dpu Info")) { - WindowHeightMin = Location.Height/2; + WindowHeightMin = Location.Height / 2; WindowHeightMax = Location.Height + owner.TextFontDefault.Height * 20; WindowWidthMin = Location.Width; WindowWidthMax = Location.Width + owner.TextFontDefault.Height * 20; @@ -267,11 +264,11 @@ protected override ControlLayout Layout(ControlLayout layout) if (SymbolCol[i].Contains(Symbols.Fence)) { - hbox.Add(indicator = new Label(-(TextSize/2), 0, TextSize, hbox.RemainingHeight, Symbols.Fence, LabelAlignment.Left)); + hbox.Add(indicator = new Label(-(TextSize / 2), 0, TextSize, hbox.RemainingHeight, Symbols.Fence, LabelAlignment.Left)); indicator.Color = Color.Green; // Apply color to LastCol - var lastCol = LastCol[i].Replace("|"," "); + var lastCol = LastCol[i].Replace("|", " "); hbox.Add(indicator = new Label(lastWidth, hbox.RemainingHeight, lastCol, locoGroups ? LabelAlignment.Center : LabelAlignment.Left));//center indicator.Color = colorFirstColEndsWith == Color.White ? colorLastColEndsWith : colorFirstColEndsWith; } @@ -290,8 +287,8 @@ protected override ControlLayout Layout(ControlLayout layout) hbox.Add(indicator = new Label(-(TextSize / 2), 0, TextSize, hbox.RemainingHeight, SymbolCol[i], LabelAlignment.Left)); indicator.Color = colorSymbolCol; } - hbox.Add(indicator = new Label(lastWidth, hbox.RemainingHeight, LastCol[i], locoGroups ? LabelAlignment.Center : LabelAlignment.Left)); - indicator.Color = colorLastColEndsWith; + hbox.Add(indicator = new Label(lastWidth, hbox.RemainingHeight, LastCol[i], locoGroups ? LabelAlignment.Center : LabelAlignment.Left)); + indicator.Color = colorLastColEndsWith; } } } @@ -368,9 +365,9 @@ private void ModifyWindowSize() FirstColLenght = labels.Max(x => x.FirstColWidth); var lastColLenght = 0; - foreach ( var data in labels.Where(x=> x.LastColWidth!=null && x.LastColWidth.Count > 0 )) + foreach (var data in labels.Where(x => x.LastColWidth != null && x.LastColWidth.Count > 0)) { - lastColLenght = data.LastColWidth.Max(x => x) + TextSize/2; + lastColLenght = data.LastColWidth.Max(x => x) + TextSize / 2; LastColLenght = lastColLenght > LastColLenght ? lastColLenght : LastColLenght; } @@ -382,10 +379,10 @@ private void ModifyWindowSize() : (Owner.TextFontDefault.Height + 2) * (rowCount + 1); var desiredWidth = FirstColLenght + (LastColLenght * (dieselLocomotivesCount + 1));// interval between firstcol and lastcol var normalMode = normalTextMode && normalVerticalMode; - var newHeight = desiredHeight < WindowHeightMin? desiredHeight + Owner.TextFontDefault.Height * 2 - : (int)MathHelper.Clamp(desiredHeight, ( normalMode? WindowHeightMin : 100 ), WindowHeightMax); + var newHeight = desiredHeight < WindowHeightMin ? desiredHeight + Owner.TextFontDefault.Height * 2 + : (int)MathHelper.Clamp(desiredHeight, (normalMode ? WindowHeightMin : 100), WindowHeightMax); - var newWidth = (int)MathHelper.Clamp(desiredWidth, (normalTextMode ? WindowWidthMin : 100), WindowWidthMax + (Owner.Viewer.DisplaySize.X/2)); + var newWidth = (int)MathHelper.Clamp(desiredWidth, (normalTextMode ? WindowWidthMin : 100), WindowWidthMax + (Owner.Viewer.DisplaySize.X / 2)); // Move the dialog up if we're expanding it, or down if not; this keeps the center in the same place. var newTop = Location.Y + (Location.Height - newHeight) / 2; @@ -484,7 +481,7 @@ private void UpdateColsWidth(ListLabel label, bool normalmode) if (label.LastCol != null) { - foreach(string data in label.LastCol) + foreach (string data in label.LastCol) { if (data != null) { @@ -506,7 +503,7 @@ private void UpdateColsWidth(ListLabel label, bool normalmode) } //Set a minimum value for LastColWidth to avoid overlap between time value and clickable symbol - if (labels.Count == 1 )//&& lastColWidth.Count > 0) + if (labels.Count == 1)//&& lastColWidth.Count > 0) { lastColWidth.Add(labels[0].LastColWidth[0] + (TextSize * 3) + dpiOffset * 10);// time value + clickable symbol } @@ -649,7 +646,7 @@ void AddLabel(ListLabel label) { var dieselLoco = MSTSDieselLocomotive.GetDpuHeader(normalVerticalMode, numberOfDieselLocomotives, maxNumberOfEngines).Replace("\t", ""); string[] dieselLocoHeader = dieselLoco.Split('\n'); - string[,] tempStatus = new string[numberOfDieselLocomotives,dieselLocoHeader.Length]; + string[,] tempStatus = new string[numberOfDieselLocomotives, dieselLocoHeader.Length]; var k = 0; var dpUnitId = 0; var dpUId = -1; diff --git a/Source/RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs b/Source/RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs index 04ec4288dc..b4790ba61e 100644 --- a/Source/RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs +++ b/Source/RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs @@ -15,17 +15,17 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Microsoft.Xna.Framework; using Orts.Simulation.Physics; using Orts.Simulation.RollingStocks; using Orts.Simulation.RollingStocks.SubSystems; using Orts.Simulation.RollingStocks.SubSystems.Brakes; using ORTS.Common; using ORTS.Common.Input; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using Microsoft.Xna.Framework; namespace Orts.Viewer3D.Popups { @@ -284,7 +284,7 @@ protected override ControlLayout Layout(ControlLayout layout) var vbox = base.Layout(layout).AddLayoutVertical(); if (labels.Count > 0) { - var colWidth = labels.Max(x => x.FirstColWidth) + (normalTextMode? 15: 20); + var colWidth = labels.Max(x => x.FirstColWidth) + (normalTextMode ? 15 : 20); var TimeHboxPositionY = 0; // search wider @@ -522,7 +522,7 @@ private void UpdateColsWidth(ListLabel label, bool normalmode) { var tempFirstCol = firstCol.Substring(0, firstCol.Length - 3); firstColWidth = FontToBold ? Owner.TextFontDefaultBold.MeasureString(tempFirstCol.TrimEnd()) - : !normalTextMode? Owner.TextFontMonoSpacedBold.MeasureString(tempFirstCol.TrimEnd()) + : !normalTextMode ? Owner.TextFontMonoSpacedBold.MeasureString(tempFirstCol.TrimEnd()) : Owner.TextFontDefault.MeasureString(tempFirstCol.TrimEnd()); } else @@ -842,7 +842,7 @@ void AddLabel(ListLabel label) if (trainBrakeStatus.Contains(Viewer.Catalog.GetString("EOT"))) { - int indexOffset = Viewer.Catalog.GetString("EOT").Length + 1; + int indexOffset = Viewer.Catalog.GetString("EOT").Length + 1; if (trainBrakeStatus.IndexOf(Viewer.Catalog.GetString("V"), index) > 0) index = trainBrakeStatus.IndexOf(Viewer.Catalog.GetString("V"), index); else diff --git a/Source/RunActivity/Viewer3D/Popups/TrainListWindow.cs b/Source/RunActivity/Viewer3D/Popups/TrainListWindow.cs index 344417f794..abdfce2999 100644 --- a/Source/RunActivity/Viewer3D/Popups/TrainListWindow.cs +++ b/Source/RunActivity/Viewer3D/Popups/TrainListWindow.cs @@ -19,7 +19,6 @@ using System; using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; using Orts.Simulation.AIs; using Orts.Simulation.Physics; using ORTS.Common; @@ -80,7 +79,7 @@ protected override ControlLayout Layout(ControlLayout layout) foreach (var thisTrain in Owner.Viewer.Simulator.AI.AITrains) { if (thisTrain.MovementState != AITrain.AI_MOVEMENT_STATE.AI_STATIC && thisTrain.TrainType != Train.TRAINTYPE.PLAYER - && ! (thisTrain.TrainType == Train.TRAINTYPE.AI_INCORPORATED && !thisTrain.IncorporatingTrain.IsPathless)) + && !(thisTrain.TrainType == Train.TRAINTYPE.AI_INCORPORATED && !thisTrain.IncorporatingTrain.IsPathless)) { var line = scrollbox.AddLayoutHorizontalLineOfText(); TrainLabel number, name, viewed; @@ -127,7 +126,7 @@ protected override ControlLayout Layout(ControlLayout layout) } number.Color = Color.Yellow; name.Color = Color.Yellow; - } + } } } } @@ -179,7 +178,7 @@ void TrainListLabel_Click(Control arg1, Point arg2) Viewer.Simulator.TrainSwitcher.ClickedTrainFromList = true; } - if (PickedTrainFromList != null && (PickedTrainFromList == Viewer.SelectedTrain || (PickedTrainFromList.TrainType == Train.TRAINTYPE.AI_INCORPORATED && + if (PickedTrainFromList != null && (PickedTrainFromList == Viewer.SelectedTrain || (PickedTrainFromList.TrainType == Train.TRAINTYPE.AI_INCORPORATED && (PickedTrainFromList as AITrain).IncorporatingTrain.IsPathless && (PickedTrainFromList as AITrain).IncorporatingTrain == Viewer.SelectedTrain)) && !PickedTrainFromList.IsActualPlayerTrain && Viewer.Simulator.IsAutopilotMode && PickedTrainFromList.IsPlayable) { @@ -198,4 +197,4 @@ void TrainListLabel_Click(Control arg1, Point arg2) } } } - } +} diff --git a/Source/RunActivity/Viewer3D/Popups/TrainOperationsWindow.cs b/Source/RunActivity/Viewer3D/Popups/TrainOperationsWindow.cs index aff8a029ef..85713b1fc4 100644 --- a/Source/RunActivity/Viewer3D/Popups/TrainOperationsWindow.cs +++ b/Source/RunActivity/Viewer3D/Popups/TrainOperationsWindow.cs @@ -17,13 +17,13 @@ // This file is the responsibility of the 3D & Environment Team. +using System; +using System.Linq; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Orts.Simulation.Physics; using Orts.Simulation.RollingStocks; using ORTS.Common; -using System; -using System.Linq; namespace Orts.Viewer3D.Popups { diff --git a/Source/RunActivity/Viewer3D/Popups/Window.cs b/Source/RunActivity/Viewer3D/Popups/Window.cs index 3dc05fb466..7504e5e9bc 100644 --- a/Source/RunActivity/Viewer3D/Popups/Window.cs +++ b/Source/RunActivity/Viewer3D/Popups/Window.cs @@ -17,12 +17,12 @@ // This file is the responsibility of the 3D & Environment Team. +using System; +using System.IO; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ORTS.Common; using ORTS.Settings; -using System; -using System.IO; namespace Orts.Viewer3D.Popups { @@ -231,43 +231,43 @@ public override void Draw(GraphicsDevice graphicsDevice) var vertexData = new[] { // 0 1 2 3 new VertexPositionTexture(new Vector3(0 * location.Width + 00, 0 * location.Height + 00, 0), new Vector2(0.00f / 2, 0.00f)), - new VertexPositionTexture(new Vector3(0 * location.Width + gp, 0 * location.Height + 00, 0), new Vector2(0.25f / 2, 0.00f)), - new VertexPositionTexture(new Vector3(1 * location.Width - gp, 0 * location.Height + 00, 0), new Vector2(0.75f / 2, 0.00f)), - new VertexPositionTexture(new Vector3(1 * location.Width - 00, 0 * location.Height + 00, 0), new Vector2(1.00f / 2, 0.00f)), + new VertexPositionTexture(new Vector3(0 * location.Width + gp, 0 * location.Height + 00, 0), new Vector2(0.25f / 2, 0.00f)), + new VertexPositionTexture(new Vector3(1 * location.Width - gp, 0 * location.Height + 00, 0), new Vector2(0.75f / 2, 0.00f)), + new VertexPositionTexture(new Vector3(1 * location.Width - 00, 0 * location.Height + 00, 0), new Vector2(1.00f / 2, 0.00f)), // 4 5 6 7 new VertexPositionTexture(new Vector3(0 * location.Width + 00, 0 * location.Height + gp, 0), new Vector2(0.00f / 2, 0.25f)), - new VertexPositionTexture(new Vector3(0 * location.Width + gp, 0 * location.Height + gp, 0), new Vector2(0.25f / 2, 0.25f)), - new VertexPositionTexture(new Vector3(1 * location.Width - gp, 0 * location.Height + gp, 0), new Vector2(0.75f / 2, 0.25f)), - new VertexPositionTexture(new Vector3(1 * location.Width - 00, 0 * location.Height + gp, 0), new Vector2(1.00f / 2, 0.25f)), + new VertexPositionTexture(new Vector3(0 * location.Width + gp, 0 * location.Height + gp, 0), new Vector2(0.25f / 2, 0.25f)), + new VertexPositionTexture(new Vector3(1 * location.Width - gp, 0 * location.Height + gp, 0), new Vector2(0.75f / 2, 0.25f)), + new VertexPositionTexture(new Vector3(1 * location.Width - 00, 0 * location.Height + gp, 0), new Vector2(1.00f / 2, 0.25f)), // 8 9 10 11 new VertexPositionTexture(new Vector3(0 * location.Width + 00, 1 * location.Height - gp, 0), new Vector2(0.00f / 2, 0.75f)), - new VertexPositionTexture(new Vector3(0 * location.Width + gp, 1 * location.Height - gp, 0), new Vector2(0.25f / 2, 0.75f)), - new VertexPositionTexture(new Vector3(1 * location.Width - gp, 1 * location.Height - gp, 0), new Vector2(0.75f / 2, 0.75f)), - new VertexPositionTexture(new Vector3(1 * location.Width - 00, 1 * location.Height - gp, 0), new Vector2(1.00f / 2, 0.75f)), + new VertexPositionTexture(new Vector3(0 * location.Width + gp, 1 * location.Height - gp, 0), new Vector2(0.25f / 2, 0.75f)), + new VertexPositionTexture(new Vector3(1 * location.Width - gp, 1 * location.Height - gp, 0), new Vector2(0.75f / 2, 0.75f)), + new VertexPositionTexture(new Vector3(1 * location.Width - 00, 1 * location.Height - gp, 0), new Vector2(1.00f / 2, 0.75f)), // 12 13 14 15 new VertexPositionTexture(new Vector3(0 * location.Width + 00, 1 * location.Height - 00, 0), new Vector2(0.00f / 2, 1.00f)), - new VertexPositionTexture(new Vector3(0 * location.Width + gp, 1 * location.Height - 00, 0), new Vector2(0.25f / 2, 1.00f)), - new VertexPositionTexture(new Vector3(1 * location.Width - gp, 1 * location.Height - 00, 0), new Vector2(0.75f / 2, 1.00f)), - new VertexPositionTexture(new Vector3(1 * location.Width - 00, 1 * location.Height - 00, 0), new Vector2(1.00f / 2, 1.00f)), - }; + new VertexPositionTexture(new Vector3(0 * location.Width + gp, 1 * location.Height - 00, 0), new Vector2(0.25f / 2, 1.00f)), + new VertexPositionTexture(new Vector3(1 * location.Width - gp, 1 * location.Height - 00, 0), new Vector2(0.75f / 2, 1.00f)), + new VertexPositionTexture(new Vector3(1 * location.Width - 00, 1 * location.Height - 00, 0), new Vector2(1.00f / 2, 1.00f)), + }; WindowVertexBuffer = new VertexBuffer(graphicsDevice, typeof(VertexPositionTexture), vertexData.Length, BufferUsage.WriteOnly); WindowVertexBuffer.SetData(vertexData); } if (WindowIndexBuffer == null) { var indexData = new short[] { - 0, 4, 1, 5, 2, 6, 3, 7, - 11, 6, 10, 5, 9, 4, 8, - 12, 9, 13, 10, 14, 11, 15, - }; + 0, 4, 1, 5, 2, 6, 3, 7, + 11, 6, 10, 5, 9, 4, 8, + 12, 9, 13, 10, 14, 11, 15, + }; WindowIndexBuffer = new IndexBuffer(graphicsDevice, typeof(short), indexData.Length, BufferUsage.WriteOnly); WindowIndexBuffer.SetData(indexData); } graphicsDevice.SetVertexBuffer(WindowVertexBuffer); - graphicsDevice.Indices = WindowIndexBuffer; - graphicsDevice.DrawIndexedPrimitives(PrimitiveType.TriangleStrip, baseVertex: 0, startIndex: 0, primitiveCount: 20); - } + graphicsDevice.Indices = WindowIndexBuffer; + graphicsDevice.DrawIndexedPrimitives(PrimitiveType.TriangleStrip, baseVertex: 0, startIndex: 0, primitiveCount: 20); + } [CallOnThread("Updater")] public virtual void PrepareFrame(ElapsedTime elapsedTime, bool updateFull) @@ -338,7 +338,7 @@ public WindowControlLayout(Window window, int width, int height) internal override bool HandleMouseDown(WindowMouseEvent e) { DragWindowOffset = DragInvalid; - + if (base.HandleMouseDown(e)) return true; diff --git a/Source/RunActivity/Viewer3D/Popups/WindowControls.cs b/Source/RunActivity/Viewer3D/Popups/WindowControls.cs index fa53d3accb..8605e9827e 100644 --- a/Source/RunActivity/Viewer3D/Popups/WindowControls.cs +++ b/Source/RunActivity/Viewer3D/Popups/WindowControls.cs @@ -17,11 +17,11 @@ // This file is the responsibility of the 3D & Environment Team. -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; using System; using System.Collections.Generic; using System.Linq; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; namespace Orts.Viewer3D.Popups { @@ -762,7 +762,7 @@ internal override bool HandleUserInput(WindowMouseEvent e) if (UserInput.IsMouseLeftButtonDown) { Client.Position.Height = Client.CurrentTop; - + if (e.MouseDownPosition.X > Position.Right - TextHeight) { var thumbOffset = (int)((float)(Position.Height - 3 * TextHeight) * (float)ScrollPosition / (float)ScrollSize); @@ -814,7 +814,7 @@ internal override bool HandleMouseMove(WindowMouseEvent e) internal override bool HandleMouseUp(WindowMouseEvent e) { if (Dragging) - Dragging = false; + Dragging = false; return base.HandleMouseUp(e); } diff --git a/Source/RunActivity/Viewer3D/Popups/WindowManager.cs b/Source/RunActivity/Viewer3D/Popups/WindowManager.cs index b0ab63759d..5d569b2e84 100644 --- a/Source/RunActivity/Viewer3D/Popups/WindowManager.cs +++ b/Source/RunActivity/Viewer3D/Popups/WindowManager.cs @@ -19,22 +19,22 @@ // Add DEBUG_WINDOW_ZORDER to project defines to record window visibility and z-order changes. -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using ORTS.Common; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ORTS.Common; namespace Orts.Viewer3D.Popups { public class WindowManager : RenderPrimitive - { - public static Texture2D WhiteTexture; - public static Texture2D ScrollbarTexture; - public static Texture2D LabelShadowTexture; + { + public static Texture2D WhiteTexture; + public static Texture2D ScrollbarTexture; + public static Texture2D LabelShadowTexture; public static Texture2D NoticeTexture; public static Texture2D PauseTexture; @@ -48,7 +48,7 @@ public static void Flush(SpriteBatch spriteBatch) spriteBatch.Draw(FlushTexture, Vector2.Zero, Color.Black); } - public readonly Viewer Viewer; + public readonly Viewer Viewer; public readonly WindowTextManager TextManager; public readonly WindowTextFont TextFontDefault; public readonly WindowTextFont TextFontDefaultBold; @@ -70,7 +70,7 @@ public static void Flush(SpriteBatch spriteBatch) SpriteBatch SpriteBatch; Matrix Identity = Matrix.Identity; Matrix XNAView = Matrix.Identity; - Matrix XNAProjection = Matrix.Identity; + Matrix XNAProjection = Matrix.Identity; internal Point ScreenSize = new Point(10000, 10000); // Arbitrary but necessary. RenderTarget2D Screen; @@ -181,28 +181,28 @@ public void Restore(BinaryReader inf) window.Restore(inf); } - [CallOnThread("Updater")] - public void ScreenChanged() - { - var oldScreenSize = ScreenSize; - ScreenSize = Viewer.DisplaySize; - - // Buffer for screen texture, also same size as viewport and using the backbuffer format. - if (Viewer.Settings.WindowGlass) - { - if (Screen != null) - Screen.Dispose(); + [CallOnThread("Updater")] + public void ScreenChanged() + { + var oldScreenSize = ScreenSize; + ScreenSize = Viewer.DisplaySize; + + // Buffer for screen texture, also same size as viewport and using the backbuffer format. + if (Viewer.Settings.WindowGlass) + { + if (Screen != null) + Screen.Dispose(); Screen = new RenderTarget2D(Viewer.GraphicsDevice, ScreenSize.X, ScreenSize.Y, false, Viewer.GraphicsDevice.PresentationParameters.BackBufferFormat, DepthFormat.Depth24Stencil8); - } + } - // Reposition all the windows. + // Reposition all the windows. foreach (var window in Windows) { if (oldScreenSize.X - window.Location.Width > 0 && oldScreenSize.Y - window.Location.Height > 0) window.MoveTo((ScreenSize.X - window.Location.Width) * window.Location.X / (oldScreenSize.X - window.Location.Width), (ScreenSize.Y - window.Location.Height) * window.Location.Y / (oldScreenSize.Y - window.Location.Height)); window.ScreenChanged(); } - } + } double LastPrepareRealTime; [CallOnThread("Updater")] @@ -223,21 +223,21 @@ public void PrepareFrame(RenderFrame frame, ElapsedTime elapsedTime) [CallOnThread("Render")] public override void Draw(GraphicsDevice graphicsDevice) - { - // Nothing visible? Nothing more to do! - if (!VisibleWindows.Any()) - return; - - // Construct a view where (0, 0) is the top-left and (width, height) is - // bottom-right, so that popups can act more like normal window things. - XNAView = Matrix.CreateTranslation(-ScreenSize.X / 2, -ScreenSize.Y / 2, 0) * - Matrix.CreateScale(1, -1, 1); - // Project into a flat view of the same size as the viewport. - XNAProjection = Matrix.CreateOrthographic(ScreenSize.X, ScreenSize.Y, 0, 100); - - foreach (var window in VisibleWindows) - { - var xnaWorld = window.XNAWorld; + { + // Nothing visible? Nothing more to do! + if (!VisibleWindows.Any()) + return; + + // Construct a view where (0, 0) is the top-left and (width, height) is + // bottom-right, so that popups can act more like normal window things. + XNAView = Matrix.CreateTranslation(-ScreenSize.X / 2, -ScreenSize.Y / 2, 0) * + Matrix.CreateScale(1, -1, 1); + // Project into a flat view of the same size as the viewport. + XNAProjection = Matrix.CreateOrthographic(ScreenSize.X, ScreenSize.Y, 0, 100); + + foreach (var window in VisibleWindows) + { + var xnaWorld = window.XNAWorld; var oldTargets = graphicsDevice.GetRenderTargets(); if (Viewer.Settings.WindowGlass) @@ -270,73 +270,73 @@ public override void Draw(GraphicsDevice graphicsDevice) graphicsDevice.DepthStencilState = DepthStencilState.Default; } - internal void Add(Window window) - { - Windows.Add(window); + internal void Add(Window window) + { + Windows.Add(window); WindowsZOrder = Windows.Concat(new[] { window }).ToArray(); } - public bool HasVisiblePopupWindows() - { + public bool HasVisiblePopupWindows() + { return WindowsZOrder.Any(w => w.Visible); - } + } - public IEnumerable VisibleWindows - { - get - { + public IEnumerable VisibleWindows + { + get + { return WindowsZOrder.Where(w => w.Visible); - } - } + } + } - public const int DragMinimumDistance = 2; + public const int DragMinimumDistance = 2; - Point mouseDownPosition; - public Point MouseDownPosition { get { return mouseDownPosition; } } + Point mouseDownPosition; + public Point MouseDownPosition { get { return mouseDownPosition; } } - Window mouseActiveWindow; - public Window MouseActiveWindow { get { return mouseActiveWindow; } } + Window mouseActiveWindow; + public Window MouseActiveWindow { get { return mouseActiveWindow; } } - double LastUpdateRealTime; - [CallOnThread("Updater")] + double LastUpdateRealTime; + [CallOnThread("Updater")] public void HandleUserInput(ElapsedTime elapsedTime) { - if (UserInput.IsMouseLeftButtonPressed) - { - mouseDownPosition = new Point(UserInput.MouseX, UserInput.MouseY); + if (UserInput.IsMouseLeftButtonPressed) + { + mouseDownPosition = new Point(UserInput.MouseX, UserInput.MouseY); mouseActiveWindow = VisibleWindows.LastOrDefault(w => w.Interactive && w.Location.Contains(mouseDownPosition)); if ((mouseActiveWindow != null) && (mouseActiveWindow != WindowsZOrder.Last())) BringWindowToTop(mouseActiveWindow); - } + } if (UserInput.IsMouseWheelChanged) { mouseActiveWindow = VisibleWindows.LastOrDefault(w => w.Interactive && w.Location.Contains(mouseDownPosition)); - + if (mouseActiveWindow != null) mouseActiveWindow.HandleUserInput(); } if (mouseActiveWindow != null) - { - if (UserInput.IsMouseLeftButtonPressed) - mouseActiveWindow.MouseDown(); - else if (UserInput.IsMouseLeftButtonReleased) - mouseActiveWindow.MouseUp(); + { + if (UserInput.IsMouseLeftButtonPressed) + mouseActiveWindow.MouseDown(); + else if (UserInput.IsMouseLeftButtonReleased) + mouseActiveWindow.MouseUp(); - if (UserInput.IsMouseMoved) - mouseActiveWindow.MouseMove(); + if (UserInput.IsMouseMoved) + mouseActiveWindow.MouseMove(); if (Viewer.RealTime - LastUpdateRealTime >= 0.1) - { - LastUpdateRealTime = Viewer.RealTime; - mouseActiveWindow.HandleUserInput(); - } + { + LastUpdateRealTime = Viewer.RealTime; + mouseActiveWindow.HandleUserInput(); + } - if (UserInput.IsMouseLeftButtonReleased) - mouseActiveWindow = null; + if (UserInput.IsMouseLeftButtonReleased) + mouseActiveWindow = null; } - } + } public void BringWindowToTop(Window mouseActiveWindow) { @@ -368,7 +368,7 @@ public void Mark() WindowManagerMaterial.Mark(); PopupWindowMaterial.Mark(); Label3DMaterial.Mark(); - foreach (var window in Windows) + foreach (var window in Windows) window.Mark(); } diff --git a/Source/RunActivity/Viewer3D/Popups/WindowText.cs b/Source/RunActivity/Viewer3D/Popups/WindowText.cs index 723b04c49b..c084382844 100644 --- a/Source/RunActivity/Viewer3D/Popups/WindowText.cs +++ b/Source/RunActivity/Viewer3D/Popups/WindowText.cs @@ -19,14 +19,14 @@ #define WINDOWTEXT_SPRITEBATCH -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using ORTS.Common; using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Runtime.InteropServices; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ORTS.Common; using Font = System.Drawing.Font; using FontStyle = System.Drawing.FontStyle; using GraphicsUnit = System.Drawing.GraphicsUnit; @@ -149,7 +149,7 @@ internal WindowTextFont(string fontFamily, float sizeInPt, FontStyle style, int OutlineSize = outlineSize; Characters = new CharacterGroup(Font, OutlineSize); if (Viewer3D.Viewer.Catalog != null) - EnsureCharacterData(Viewer3D.Viewer.Catalog.GetString("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890 \",.-+|!$%&/()=?;:'_[]")); + EnsureCharacterData(Viewer3D.Viewer.Catalog.GetString("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890 \",.-+|!$%&/()=?;:'_[]")); } /// diff --git a/Source/RunActivity/Viewer3D/Precipitation.cs b/Source/RunActivity/Viewer3D/Precipitation.cs index 0edbe221c3..9f0135e362 100644 --- a/Source/RunActivity/Viewer3D/Precipitation.cs +++ b/Source/RunActivity/Viewer3D/Precipitation.cs @@ -17,16 +17,15 @@ // This file is the responsibility of the 3D & Environment Team. -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Microsoft.Xna.Framework.Graphics.PackedVector; -using Orts.Simulation; -using ORTS.Common; using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Runtime.InteropServices; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Orts.Simulation; +using ORTS.Common; namespace Orts.Viewer3D { @@ -85,7 +84,7 @@ public void Reset() // Added random Wind.X value for rain and snow. // Max value used by randWind.Next is max value - 1. Wind.X = Viewer.Simulator.WeatherType == Orts.Formats.Msts.WeatherType.Snow ? Viewer.Random.Next(2, 6) : Viewer.Random.Next(15, 21); - + var gameTime = (float)Viewer.Simulator.GameTime; Pricipitation.Initialize(Viewer.Simulator.WeatherType, Wind); // Camera is null during first initialisation. @@ -302,7 +301,7 @@ public void Initialize(Orts.Formats.Msts.WeatherType weather, Vector3 wind) public void DynamicUpdate(WeatherControl weatherControl, Weather weather, Viewer viewer, ref Vector3 wind) { if (weather.PrecipitationLiquidity == 0 || weather.PrecipitationLiquidity == 1) return; - ParticleDuration = ParticleBoxHeightM / ((RainVelocityMpS-SnowVelocityMpS) * weather.PrecipitationLiquidity + SnowVelocityMpS)/ ParticleVelocityFactor; + ParticleDuration = ParticleBoxHeightM / ((RainVelocityMpS - SnowVelocityMpS) * weather.PrecipitationLiquidity + SnowVelocityMpS) / ParticleVelocityFactor; wind.X = 18 * weather.PrecipitationLiquidity + 2; ParticleDirection = wind; } @@ -506,7 +505,7 @@ public PrecipitationMaterial(Viewer viewer) SnowTexture = SharedTextureManager.Get(Viewer.RenderProcess.GraphicsDevice, System.IO.Path.Combine(Viewer.ContentPath, "Snowflake.png")); DynamicPrecipitationTexture[0] = SnowTexture; DynamicPrecipitationTexture[11] = RainTexture; - for (int i = 1; i<=10; i++) + for (int i = 1; i <= 10; i++) { var path = "Raindrop" + i.ToString() + ".png"; DynamicPrecipitationTexture[11 - i] = SharedTextureManager.Get(Viewer.RenderProcess.GraphicsDevice, System.IO.Path.Combine(Viewer.ContentPath, path)); diff --git a/Source/RunActivity/Viewer3D/Processes/Game.cs b/Source/RunActivity/Viewer3D/Processes/Game.cs index 384d9a18bf..47862393f2 100644 --- a/Source/RunActivity/Viewer3D/Processes/Game.cs +++ b/Source/RunActivity/Viewer3D/Processes/Game.cs @@ -17,9 +17,6 @@ // This file is the responsibility of the 3D & Environment Team. -using Orts.Common; -using ORTS.Common; -using ORTS.Settings; using System; using System.Collections.Generic; using System.Diagnostics; @@ -27,6 +24,9 @@ using System.Linq; using System.Threading; using System.Windows.Forms; +using Orts.Common; +using ORTS.Common; +using ORTS.Settings; namespace Orts.Viewer3D.Processes { diff --git a/Source/RunActivity/Viewer3D/Processes/GameStateRunActivity.cs b/Source/RunActivity/Viewer3D/Processes/GameStateRunActivity.cs index ea6d7352e0..ea27152638 100644 --- a/Source/RunActivity/Viewer3D/Processes/GameStateRunActivity.cs +++ b/Source/RunActivity/Viewer3D/Processes/GameStateRunActivity.cs @@ -18,6 +18,14 @@ // Define this to include extra data on loading performance and progress indications. //#define DEBUG_LOADING +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices; +using System.Text.RegularExpressions; +using System.Windows.Forms; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Orts.Common; @@ -27,14 +35,6 @@ using Orts.Viewer3D.Debugging; using ORTS.Common; using ORTS.Settings; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices; -using System.Text.RegularExpressions; -using System.Windows.Forms; namespace Orts.Viewer3D.Processes { @@ -64,14 +64,14 @@ public class GameStateRunActivity : GameState /// *.evaluation.txt for the text evaluation if an activity evaluation has been requested. /// public class SaveSet - { + { public string FileStem { get; } - // Prefix with the activity filename so that, when resuming from the Menu.exe, we can quickly find those Saves - // that are likely to match the previously chosen route and activity. - // Append the current date and time, so that each file is unique. - // This is the "sortable" date format, ISO 8601, but with "." in place of the ":" which is not valid in filenames. - public SaveSet() + // Prefix with the activity filename so that, when resuming from the Menu.exe, we can quickly find those Saves + // that are likely to match the previously chosen route and activity. + // Append the current date and time, so that each file is unique. + // This is the "sortable" date format, ISO 8601, but with "." in place of the ":" which is not valid in filenames. + public SaveSet() { FileStem = String.Format("{0} {1} {2:yyyy-MM-dd HH.mm.ss}", Simulator.Activity != null @@ -138,7 +138,7 @@ internal override void Update(RenderFrame frame, double totalRealSeconds) frame.AddPrimitive(LoadingBar.Material, LoadingBar, RenderPrimitiveGroup.Overlay, ref LoadingMatrix); } - if (Simulator != null && Simulator.TimetableMode && TimetableLoadingBar != null + if (Simulator != null && Simulator.TimetableMode && TimetableLoadingBar != null && Simulator.TimetableLoadedFraction < 0.99f // 0.99 to hide loading bar at end of timetable pre-run ) { @@ -162,7 +162,7 @@ internal override void Load() // Look for an action to perform. var action = ""; - var actions = new[] { "start", "resume", "replay", "replay_from_save", "test"}; + var actions = new[] { "start", "resume", "replay", "replay_from_save", "test" }; foreach (var possibleAction in actions) if (args.Contains("-" + possibleAction) || args.Contains("/" + possibleAction, StringComparer.OrdinalIgnoreCase)) { @@ -351,7 +351,7 @@ void Start(UserSettings settings, string acttype, string[] args) { Client.Send((new MSGPlayer(UserName, Code, Simulator.conFileName, Simulator.patFileName, Simulator.Trains[0], 0, Simulator.Settings.AvatarURL)).ToString()); // wait 5 seconds to see if you get a reply from server with updated position/consist data, else go on - + System.Threading.Thread.Sleep(5000); if (Simulator.Trains[0].jumpRequested) { @@ -374,7 +374,7 @@ public static void Save() { if (MPManager.IsMultiPlayer() && !MPManager.IsServer()) return; //no save for multiplayer sessions yet if (ContainerManager.ActiveOperationsCounter > 0) - // don't save if performing a container load/unload + // don't save if performing a container load/unload { Simulator.Confirmer.Message(ConfirmLevel.Warning, Viewer.Catalog.GetString("Game save is not allowed during container load/unload")); return; @@ -418,7 +418,7 @@ public static void Save() Viewer.Save(outf, saveSet.FileStem); // Save multiplayer parameters if (MPManager.IsMultiPlayer() && MPManager.IsServer()) - MPManager.OnlineTrains.Save (outf); + MPManager.OnlineTrains.Save(outf); SaveEvaluation(outf); @@ -437,7 +437,7 @@ public static void Save() // Copy the evaluation file to the save folder if (File.Exists(Program.EvaluationFilename)) - File.Copy(Program.EvaluationFilename, Path.Combine(UserSettings.UserDataFolder, saveSet.FileStem + ".evaluation.txt"), true); + File.Copy(Program.EvaluationFilename, Path.Combine(UserSettings.UserDataFolder, saveSet.FileStem + ".evaluation.txt"), true); } private static void SaveEvaluation(BinaryWriter outf) @@ -1171,7 +1171,7 @@ string GetActivityName(string path) { if (!HasExtension(path, ".act")) return null; - + ActivityFile act = null; try { @@ -1340,7 +1340,7 @@ public void Dispose() { Material.Dispose(); } - + public override void Draw(GraphicsDevice graphicsDevice) { graphicsDevice.SetVertexBuffer(VertexBuffer); @@ -1389,7 +1389,7 @@ protected override VertexPositionTexture[] GetVerticies(Game game) class LoadingBarPrimitive : LoadingPrimitive { - public LoadingBarPrimitive(Game game ) + public LoadingBarPrimitive(Game game) : base(game) { } diff --git a/Source/RunActivity/Viewer3D/Processes/GameStateViewer3D.cs b/Source/RunActivity/Viewer3D/Processes/GameStateViewer3D.cs index f9f773c752..f77930d2ab 100644 --- a/Source/RunActivity/Viewer3D/Processes/GameStateViewer3D.cs +++ b/Source/RunActivity/Viewer3D/Processes/GameStateViewer3D.cs @@ -17,9 +17,9 @@ // This file is the responsibility of the 3D & Environment Team. +using System; using Orts.MultiPlayer; using Orts.Viewer3D.Debugging; -using System; namespace Orts.Viewer3D.Processes { @@ -127,7 +127,7 @@ internal override void Load() internal override void Dispose() { Viewer.Terminate(); - if (MPManager.Server != null) + if (MPManager.Server != null) MPManager.Server.Stop(); if (MPManager.Client != null) MPManager.Client.Stop(); diff --git a/Source/RunActivity/Viewer3D/Processes/LoaderProcess.cs b/Source/RunActivity/Viewer3D/Processes/LoaderProcess.cs index b3012faa9d..ea9bbdd4e4 100644 --- a/Source/RunActivity/Viewer3D/Processes/LoaderProcess.cs +++ b/Source/RunActivity/Viewer3D/Processes/LoaderProcess.cs @@ -17,11 +17,11 @@ // This file is the responsibility of the 3D & Environment Team. -using Orts.Processes; -using ORTS.Common; using System; using System.Diagnostics; using System.Threading; +using Orts.Processes; +using ORTS.Common; using CancellationToken = ORTS.Common.CancellationToken; using CancellationTokenSource = ORTS.Common.CancellationTokenSource; diff --git a/Source/RunActivity/Viewer3D/Processes/RenderProcess.cs b/Source/RunActivity/Viewer3D/Processes/RenderProcess.cs index eb0283c3b0..9cd56654ef 100644 --- a/Source/RunActivity/Viewer3D/Processes/RenderProcess.cs +++ b/Source/RunActivity/Viewer3D/Processes/RenderProcess.cs @@ -17,13 +17,13 @@ // This file is the responsibility of the 3D & Environment Team. +using System; +using System.Diagnostics; +using System.Windows.Forms; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Orts.Processes; using ORTS.Common; -using System; -using System.Diagnostics; -using System.Windows.Forms; using static ORTS.Settings.UserSettings; namespace Orts.Viewer3D.Processes diff --git a/Source/RunActivity/Viewer3D/Processes/SoundProcess.cs b/Source/RunActivity/Viewer3D/Processes/SoundProcess.cs index aafbc92948..0c5647b855 100644 --- a/Source/RunActivity/Viewer3D/Processes/SoundProcess.cs +++ b/Source/RunActivity/Viewer3D/Processes/SoundProcess.cs @@ -20,13 +20,13 @@ // Define this to log each change of the sound sources. //#define DEBUG_SOURCE_SOURCES -using Orts.Common; -using Orts.Processes; -using ORTS.Common; using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading; +using Orts.Common; +using Orts.Processes; +using ORTS.Common; namespace Orts.Viewer3D.Processes { @@ -152,7 +152,7 @@ void Sound() StartUpdateTime = viewer.RealTime; int RetryUpdate = 0; int restartIndex = -1; - + while (RetryUpdate >= 0) { bool updateInterrupted = false; @@ -229,10 +229,10 @@ void Sound() // Trace.TraceInformation("Sound Source Update Interrupted more than once: {0}", UpdateInterrupts); // the block below could provide better sound response but is more demanding in terms of CPU time, especially for slow CPUs -/* int resptime = (int)((viewer.RealTime - StartUpdateTime) * 1000); - SleepTime = 50 - resptime; - if (SleepTime < 5) - SleepTime = 5;*/ + /* int resptime = (int)((viewer.RealTime - StartUpdateTime) * 1000); + SleepTime = 50 - resptime; + if (SleepTime < 5) + SleepTime = 5;*/ #if DEBUG_SOURCE_SOURCES SoundTime += (int)((viewer.RealTime - StartUpdateTime) * 1000); if (viewer.RealTime - ConsoleWriteTime >= 15f) diff --git a/Source/RunActivity/Viewer3D/Processes/UpdaterProcess.cs b/Source/RunActivity/Viewer3D/Processes/UpdaterProcess.cs index d0aa118dfa..5f244717f8 100644 --- a/Source/RunActivity/Viewer3D/Processes/UpdaterProcess.cs +++ b/Source/RunActivity/Viewer3D/Processes/UpdaterProcess.cs @@ -17,11 +17,11 @@ // This file is the responsibility of the 3D & Environment Team. -using Orts.Processes; -using ORTS.Common; using System; using System.Diagnostics; using System.Threading; +using Orts.Processes; +using ORTS.Common; namespace Orts.Viewer3D.Processes { diff --git a/Source/RunActivity/Viewer3D/Processes/WatchdogProcess.cs b/Source/RunActivity/Viewer3D/Processes/WatchdogProcess.cs index a7abcc1ec9..61e1631cc0 100644 --- a/Source/RunActivity/Viewer3D/Processes/WatchdogProcess.cs +++ b/Source/RunActivity/Viewer3D/Processes/WatchdogProcess.cs @@ -17,9 +17,6 @@ // This file is the responsibility of the 3D & Environment Team. -using Orts.Common; -using Orts.Processes; -using ORTS.Common; using System; using System.Collections.Generic; using System.Diagnostics; @@ -27,6 +24,9 @@ using System.Security; using System.Text; using System.Threading; +using Orts.Common; +using Orts.Processes; +using ORTS.Common; namespace Orts.Viewer3D.Processes { diff --git a/Source/RunActivity/Viewer3D/Processes/WebServerProcess.cs b/Source/RunActivity/Viewer3D/Processes/WebServerProcess.cs index 30b63a0ae6..1795e203a6 100644 --- a/Source/RunActivity/Viewer3D/Processes/WebServerProcess.cs +++ b/Source/RunActivity/Viewer3D/Processes/WebServerProcess.cs @@ -18,17 +18,17 @@ // This file is the responsibility of the 3D & Environment Team. -using EmbedIO.Net; +using System; +using System.Diagnostics; +using System.IO; +using System.Net.Sockets; using System.Threading; +using System.Windows.Forms; +using EmbedIO.Net; +using Orts.Processes; using Orts.Viewer3D.WebServices; using ORTS.Common; -using Orts.Processes; -using System.IO; -using System.Windows.Forms; using CancellationTokenSource = System.Threading.CancellationTokenSource; -using System.Net.Sockets; -using System.Diagnostics; -using System; namespace Orts.Viewer3D.Processes { @@ -71,7 +71,7 @@ void WebServerThread() using (EmbedIO.WebServer server = WebServer.CreateWebServer($"http://*:{Game.Settings.WebServerPort}", myWebContentPath)) server.RunAsync(StopServer.Token).Wait(); } - catch(AggregateException ex) + catch (AggregateException ex) { if (ex.InnerException is SocketException) { diff --git a/Source/RunActivity/Viewer3D/RenderFrame.cs b/Source/RunActivity/Viewer3D/RenderFrame.cs index 057dacc125..f3bc3cd477 100644 --- a/Source/RunActivity/Viewer3D/RenderFrame.cs +++ b/Source/RunActivity/Viewer3D/RenderFrame.cs @@ -77,16 +77,16 @@ public abstract class RenderPrimitive /// . /// public static readonly RenderPrimitiveSequence[] SequenceForBlended = new[] { - RenderPrimitiveSequence.CabBlended, + RenderPrimitiveSequence.CabBlended, RenderPrimitiveSequence.Sky, - RenderPrimitiveSequence.WorldBlended, - RenderPrimitiveSequence.Lights, - RenderPrimitiveSequence.Precipitation, + RenderPrimitiveSequence.WorldBlended, + RenderPrimitiveSequence.Lights, + RenderPrimitiveSequence.Precipitation, RenderPrimitiveSequence.Particles, RenderPrimitiveSequence.InteriorBlended, RenderPrimitiveSequence.Labels, - RenderPrimitiveSequence.OverlayBlended, - }; + RenderPrimitiveSequence.OverlayBlended, + }; /// /// Mapping from to for opaque @@ -94,16 +94,16 @@ public abstract class RenderPrimitive /// . /// public static readonly RenderPrimitiveSequence[] SequenceForOpaque = new[] { - RenderPrimitiveSequence.CabOpaque, + RenderPrimitiveSequence.CabOpaque, RenderPrimitiveSequence.Sky, - RenderPrimitiveSequence.WorldOpaque, - RenderPrimitiveSequence.Lights, - RenderPrimitiveSequence.Precipitation, + RenderPrimitiveSequence.WorldOpaque, + RenderPrimitiveSequence.Lights, + RenderPrimitiveSequence.Precipitation, RenderPrimitiveSequence.Particles, RenderPrimitiveSequence.InteriorOpaque, RenderPrimitiveSequence.Labels, - RenderPrimitiveSequence.OverlayOpaque, - }; + RenderPrimitiveSequence.OverlayOpaque, + }; /// /// This is an adjustment for the depth buffer calculation which may be used to reduce the chance of co-planar primitives from fighting each other. @@ -191,15 +191,15 @@ public int Compare(RenderItem x, RenderItem y) } } - public class RenderItemCollection : IList, IEnumerator - { - RenderItem[] Items = new RenderItem[4]; - int ItemCount; - int EnumeratorIndex; + public class RenderItemCollection : IList, IEnumerator + { + RenderItem[] Items = new RenderItem[4]; + int ItemCount; + int EnumeratorIndex; - public RenderItemCollection() - { - } + public RenderItemCollection() + { + } public int Capacity { @@ -209,165 +209,165 @@ public int Capacity } } - public int Count - { + public int Count + { get { return ItemCount; } - } + } - public void Sort(IComparer comparer) - { - Array.Sort(Items, 0, ItemCount, comparer); - } + public void Sort(IComparer comparer) + { + Array.Sort(Items, 0, ItemCount, comparer); + } - #region IList Members + #region IList Members - public int IndexOf(RenderItem item) - { + public int IndexOf(RenderItem item) + { throw new NotSupportedException(); - } + } - public void Insert(int index, RenderItem item) - { + public void Insert(int index, RenderItem item) + { throw new NotSupportedException(); - } + } - public void RemoveAt(int index) - { + public void RemoveAt(int index) + { throw new NotSupportedException(); - } - - public RenderItem this[int index] - { - get - { - throw new NotSupportedException(); - } - set - { + } + + public RenderItem this[int index] + { + get + { throw new NotSupportedException(); - } - } + } + set + { + throw new NotSupportedException(); + } + } - #endregion + #endregion - #region ICollection Members + #region ICollection Members - public void Add(RenderItem item) - { - if (ItemCount == Items.Length) - { - var items = new RenderItem[Items.Length * 2]; - Array.Copy(Items, 0, items, 0, Items.Length); + public void Add(RenderItem item) + { + if (ItemCount == Items.Length) + { + var items = new RenderItem[Items.Length * 2]; + Array.Copy(Items, 0, items, 0, Items.Length); Items = items; - } - Items[ItemCount] = item; - ItemCount++; - } - - public void Clear() - { - Array.Clear(Items, 0, ItemCount); - ItemCount = 0; - } - - public bool Contains(RenderItem item) - { + } + Items[ItemCount] = item; + ItemCount++; + } + + public void Clear() + { + Array.Clear(Items, 0, ItemCount); + ItemCount = 0; + } + + public bool Contains(RenderItem item) + { throw new NotSupportedException(); - } + } - public void CopyTo(RenderItem[] array, int arrayIndex) - { + public void CopyTo(RenderItem[] array, int arrayIndex) + { throw new NotSupportedException(); - } + } - int ICollection.Count - { + int ICollection.Count + { get { throw new NotSupportedException(); } - } + } - public bool IsReadOnly - { + public bool IsReadOnly + { get { throw new NotSupportedException(); } - } + } - public bool Remove(RenderItem item) - { - throw new NotSupportedException(); - } + public bool Remove(RenderItem item) + { + throw new NotSupportedException(); + } - #endregion + #endregion - #region IEnumerable Members + #region IEnumerable Members - public IEnumerator GetEnumerator() - { - Reset(); - return this; - } + public IEnumerator GetEnumerator() + { + Reset(); + return this; + } - #endregion + #endregion - #region IEnumerable Members + #region IEnumerable Members - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } - #endregion + #endregion - #region IEnumerator Members + #region IEnumerator Members - public RenderItem Current - { + public RenderItem Current + { get { return Items[EnumeratorIndex]; } - } + } - #endregion + #endregion - #region IEnumerator Members + #region IEnumerator Members - object System.Collections.IEnumerator.Current - { + object System.Collections.IEnumerator.Current + { get { return Current; } - } + } - public bool MoveNext() - { - EnumeratorIndex++; - return EnumeratorIndex < ItemCount; - } + public bool MoveNext() + { + EnumeratorIndex++; + return EnumeratorIndex < ItemCount; + } - public void Reset() - { - EnumeratorIndex = -1; - } + public void Reset() + { + EnumeratorIndex = -1; + } - #endregion + #endregion - #region IDisposable Members + #region IDisposable Members - public void Dispose() - { - // No op. - } + public void Dispose() + { + // No op. + } - #endregion + #endregion } public class RenderFrame @@ -391,7 +391,7 @@ public class RenderFrame SpriteBatchMaterial RenderSurfaceMaterial; readonly Material DummyBlendedMaterial; - readonly Dictionary[] RenderItems = new Dictionary[(int)RenderPrimitiveSequence.Sentinel]; + readonly Dictionary[] RenderItems = new Dictionary[(int)RenderPrimitiveSequence.Sentinel]; readonly RenderItemCollection[] RenderShadowSceneryItems; readonly RenderItemCollection[] RenderShadowForestItems; readonly RenderItemCollection[] RenderShadowTerrainItems; @@ -413,7 +413,7 @@ public RenderFrame(Game game) DummyBlendedMaterial = new EmptyMaterial(null); for (int i = 0; i < RenderItems.Length; i++) - RenderItems[i] = new Dictionary(); + RenderItems[i] = new Dictionary(); if (Game.Settings.DynamicShadows) { @@ -479,7 +479,7 @@ public void Clear() } } } - + // Clear out (reset) all of the RenderItem lists. for (var i = 0; i < RenderItems.Length; i++) foreach (var mat in RenderItems[i].Keys) @@ -739,7 +739,7 @@ public void Draw(GraphicsDevice graphicsDevice) } } - void DrawShadows( GraphicsDevice graphicsDevice, bool logging ) + void DrawShadows(GraphicsDevice graphicsDevice, bool logging) { if (logging) Console.WriteLine(" DrawShadows {"); for (var shadowMapIndex = 0; shadowMapIndex < RenderProcess.ShadowMapCount; shadowMapIndex++) @@ -796,7 +796,7 @@ void DrawShadows(GraphicsDevice graphicsDevice, bool logging, int shadowMapIndex // Blur the shadow map. if (Game.Settings.ShadowMapBlur) { - ShadowMap[shadowMapIndex] = ShadowMapMaterial.ApplyBlur(graphicsDevice, ShadowMap[shadowMapIndex], ShadowMapRenderTarget[shadowMapIndex]); + ShadowMap[shadowMapIndex] = ShadowMapMaterial.ApplyBlur(graphicsDevice, ShadowMap[shadowMapIndex], ShadowMapRenderTarget[shadowMapIndex]); #if DEBUG_RENDER_STATE DebugRenderState(graphicsDevice, ShadowMapMaterial.ToString() + " ApplyBlur()"); #endif diff --git a/Source/RunActivity/Viewer3D/RoadCars.cs b/Source/RunActivity/Viewer3D/RoadCars.cs index 43ccf3ad65..c329d652fd 100644 --- a/Source/RunActivity/Viewer3D/RoadCars.cs +++ b/Source/RunActivity/Viewer3D/RoadCars.cs @@ -17,14 +17,14 @@ // This file is the responsibility of the 3D & Environment Team. -using Microsoft.Xna.Framework; -using Orts.Formats.Msts; -using Orts.Simulation; -using ORTS.Common; using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; +using Microsoft.Xna.Framework; +using Orts.Formats.Msts; +using Orts.Simulation; +using ORTS.Common; namespace Orts.Viewer3D { @@ -79,7 +79,7 @@ public RoadCarSpawner(Viewer viewer, WorldPosition position, CarSpawnerObj carSp } var sortedLevelCrossings = new SortedList(); - for (var crossingTraveller = new Traveller(Traveller); crossingTraveller.NextSection(); ) + for (var crossingTraveller = new Traveller(Traveller); crossingTraveller.NextSection();) if (crossingTraveller.IsTrack && crossingTraveller.TN.TrVectorNode.TrItemRefs != null) foreach (var trItemRef in crossingTraveller.TN.TrVectorNode.TrItemRefs) if (Viewer.Simulator.LevelCrossings.RoadCrossingItems.ContainsKey(trItemRef)) @@ -274,7 +274,7 @@ public void Update(ElapsedTime elapsedTime) stopDistances.Add(cars[spawnerIndex - 1].Travelled - cars[spawnerIndex - 1].Length / 2); else stopDistances.Add(cars[spawnerIndex - 1].Travelled - cars[spawnerIndex - 1].Length * 0.65f - 4 - cars[spawnerIndex - 1].Speed * 0.5f); - } + } // Calculate whether we're too close to the minimum stopping distance (and need to slow down) or going too slowly (and need to speed up). var stopDistance = stopDistances.Count > 0 ? stopDistances.Min() - Travelled - Length / 2 : float.MaxValue; @@ -292,7 +292,7 @@ public void Update(ElapsedTime elapsedTime) RearTraveller.Move(distance); } - public void ChangeSpeed (float speed) + public void ChangeSpeed(float speed) { if (speed > 0) { diff --git a/Source/RunActivity/Viewer3D/RollingStock/MSTSDieselLocomotiveViewer.cs b/Source/RunActivity/Viewer3D/RollingStock/MSTSDieselLocomotiveViewer.cs index fabf6e9f34..4573d6bc58 100644 --- a/Source/RunActivity/Viewer3D/RollingStock/MSTSDieselLocomotiveViewer.cs +++ b/Source/RunActivity/Viewer3D/RollingStock/MSTSDieselLocomotiveViewer.cs @@ -112,7 +112,7 @@ public override void InitializeUserInputCommands() public override void PrepareFrame(RenderFrame frame, ElapsedTime elapsedTime) { var car = this.Car as MSTSDieselLocomotive; - + // Diesel exhaust var exhaustParticles = car.Train != null && car.Train.TrainType == Train.TRAINTYPE.STATIC ? 0 : car.ExhaustParticles.SmoothedValue; foreach (var drawer in Exhaust) @@ -122,7 +122,7 @@ public override void PrepareFrame(RenderFrame frame, ElapsedTime elapsedTime) var colorB = car.ExhaustColorB.SmoothedValue / 255f; drawer.SetOutput(exhaustParticles, car.ExhaustMagnitude.SmoothedValue, new Color((byte)car.ExhaustColorR.SmoothedValue, (byte)car.ExhaustColorG.SmoothedValue, (byte)car.ExhaustColorB.SmoothedValue)); } - + base.PrepareFrame(frame, elapsedTime); } } diff --git a/Source/RunActivity/Viewer3D/RollingStock/MSTSElectricLocomotiveViewer.cs b/Source/RunActivity/Viewer3D/RollingStock/MSTSElectricLocomotiveViewer.cs index f4fb5c0d70..7b2d402227 100644 --- a/Source/RunActivity/Viewer3D/RollingStock/MSTSElectricLocomotiveViewer.cs +++ b/Source/RunActivity/Viewer3D/RollingStock/MSTSElectricLocomotiveViewer.cs @@ -38,8 +38,8 @@ public MSTSElectricLocomotiveViewer(Viewer viewer, MSTSElectricLocomotive car) if (ElectricLocomotive.Train != null && (car.Train.TrainType == Train.TRAINTYPE.AI || ((car.Train.TrainType == Train.TRAINTYPE.PLAYER || car.Train.TrainType == Train.TRAINTYPE.AI_PLAYERDRIVEN || car.Train.TrainType == Train.TRAINTYPE.AI_PLAYERHOSTING) && (car.Train.MUDirection != Direction.N && ElectricLocomotive.LocomotivePowerSupply.MainPowerSupplyOn)))) - // following reactivates the sound triggers related to certain states - // for pantos the sound trigger related to the raised panto must be reactivated, else SignalEvent() would raise also another panto + // following reactivates the sound triggers related to certain states + // for pantos the sound trigger related to the raised panto must be reactivated, else SignalEvent() would raise also another panto { var iPanto = 0; Event evt; @@ -99,7 +99,7 @@ public override void InitializeUserInputCommands() new CircuitBreakerClosingOrderButtonCommand(Viewer.Log, true); } }); - UserInputCommands.Add(UserCommand.ControlCircuitBreakerOpeningOrder, new Action[] { () => new CircuitBreakerOpeningOrderButtonCommand(Viewer.Log, false), () => new CircuitBreakerOpeningOrderButtonCommand(Viewer.Log, true)}); + UserInputCommands.Add(UserCommand.ControlCircuitBreakerOpeningOrder, new Action[] { () => new CircuitBreakerOpeningOrderButtonCommand(Viewer.Log, false), () => new CircuitBreakerOpeningOrderButtonCommand(Viewer.Log, true) }); UserInputCommands.Add(UserCommand.ControlCircuitBreakerClosingAuthorization, new Action[] { Noop, () => new CircuitBreakerClosingAuthorizationCommand(Viewer.Log, !ElectricLocomotive.ElectricPowerSupply.CircuitBreaker.DriverClosingAuthorization) }); base.InitializeUserInputCommands(); } diff --git a/Source/RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs b/Source/RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs index e45b980e81..804993df51 100644 --- a/Source/RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs +++ b/Source/RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs @@ -33,8 +33,8 @@ using Orts.Simulation.RollingStocks.SubSystems.Controllers; using Orts.Viewer3D.Common; using Orts.Viewer3D.Popups; -using Orts.Viewer3D.RollingStock.SubSystems; using Orts.Viewer3D.RollingStock.Subsystems.ETCS; +using Orts.Viewer3D.RollingStock.SubSystems; using ORTS.Common; using ORTS.Common.Input; using ORTS.Scripting.Api; @@ -219,7 +219,7 @@ public override void InitializeUserInputCommands() UserInputCommands.Add(UserCommand.ControlDPBrake, new Action[] { Noop, () => new DPDynamicBrakeCommand(Viewer.Log) }); UserInputCommands.Add(UserCommand.ControlDPMore, new Action[] { Noop, () => new DPMoreCommand(Viewer.Log) }); UserInputCommands.Add(UserCommand.ControlDPLess, new Action[] { Noop, () => new DPLessCommand(Viewer.Log) }); - + base.InitializeUserInputCommands(); } @@ -236,7 +236,7 @@ public override void HandleUserInput(ElapsedTime elapsedTime) if (UserInput.IsPressed(UserCommand.DebugResetWheelSlip)) { Locomotive.Train.SignalEvent(Event._ResetWheelSlip); } if (UserInput.IsPressed(UserCommand.DebugToggleAdvancedAdhesion)) { Locomotive.Train.SignalEvent(Event._ResetWheelSlip); Locomotive.Simulator.UseAdvancedAdhesion = !Locomotive.Simulator.UseAdvancedAdhesion; } - ExternalDeviceState[] externalDevices = {UserInput.RDState, UserInput.WebDeviceState}; + ExternalDeviceState[] externalDevices = { UserInput.RDState, UserInput.WebDeviceState }; foreach (var external in externalDevices) { if (external == null) continue; @@ -404,7 +404,7 @@ public override void Unload() if (Locomotive.TrainControlSystem != null && Locomotive.TrainControlSystem.Sounds.Count > 0) foreach (var script in Locomotive.TrainControlSystem.Sounds.Keys) { - Viewer.SoundProcess.RemoveSoundSources(script); + Viewer.SoundProcess.RemoveSoundSources(script); } base.Unload(); } @@ -499,9 +499,9 @@ WagonAndMatchingPickup GetMatchingPickup(Train train, bool onlyUnload = false) pickup.Location = new WorldLocation( worldFile.TileX, worldFile.TileZ, pickup.Position.X, pickup.Position.Y, pickup.Position.Z); - if ((wagon.FreightAnimations != null && ((uint)wagon.FreightAnimations.FreightType == pickup.PickupType || wagon.FreightAnimations.FreightType == MSTSWagon.PickupType.None) && - (uint)intake.Type == pickup.PickupType) - || ((uint)intake.Type == pickup.PickupType && (uint)intake.Type > (uint)MSTSWagon.PickupType.FreightSand && (wagon.WagonType == TrainCar.WagonTypes.Tender || wagon is MSTSLocomotive))) + if ((wagon.FreightAnimations != null && ((uint)wagon.FreightAnimations.FreightType == pickup.PickupType || wagon.FreightAnimations.FreightType == MSTSWagon.PickupType.None) && + (uint)intake.Type == pickup.PickupType) + || ((uint)intake.Type == pickup.PickupType && (uint)intake.Type > (uint)MSTSWagon.PickupType.FreightSand && (wagon.WagonType == TrainCar.WagonTypes.Tender || wagon is MSTSLocomotive))) { if (intake.Type == MSTSWagon.PickupType.Container) { @@ -516,7 +516,7 @@ WagonAndMatchingPickup GetMatchingPickup(Train train, bool onlyUnload = false) intakePosition.X, intakePosition.Y, -intakePosition.Z); var d2 = WorldLocation.GetDistanceSquared(intakeLocation, pickup.Location); - if (intake.Type == MSTSWagon.PickupType.Container && containerStation != null && + if (intake.Type == MSTSWagon.PickupType.Container && containerStation != null && (wagon.Train.FrontTDBTraveller.TN.Index == containerStation.TrackNode.Index || wagon.Train.RearTDBTraveller.TN.Index == containerStation.TrackNode.Index) && d2 < containerStation.MinZSpan * containerStation.MinZSpan) @@ -586,11 +586,11 @@ float GetDistanceToM(WagonAndMatchingPickup match) public void ImmediateRefill() { var loco = this.Locomotive; - + if (loco == null) return; - - foreach(var car in loco.Train.Cars) + + foreach (var car in loco.Train.Cars) { // There is no need to check for the tender. The MSTSSteamLocomotive is the primary key in the refueling process when using immediate refueling. // Electric locomotives may have steam heat boilers fitted, and they can refill these @@ -622,7 +622,7 @@ public void AttemptToRefillOrUnload(bool onlyUnload = false) } float distanceToPickupM = GetDistanceToM(match); if (match.IntakePoint.LinkedFreightAnim != null && match.IntakePoint.LinkedFreightAnim is FreightAnimationDiscrete) - // for container cranes handle distance management using Z span of crane + // for container cranes handle distance management using Z span of crane { var containerStation = Viewer.Simulator.ContainerManager.ContainerHandlingItems.Where(item => item.Key == match.Pickup.TrItemIDList[0].dbID).Select(item => item.Value).First(); if (distanceToPickupM > containerStation.MinZSpan) @@ -1863,14 +1863,14 @@ public override void PrepareFrame(RenderFrame frame, ElapsedTime elapsedTime) if (Gauge.Orientation == 0) { destX = (int)(xratio * (Control.PositionX)) + (int)(xratio * (zeropos < xpos ? zeropos : xpos)); -// destY = (int)(yratio * Control.PositionY); + // destY = (int)(yratio * Control.PositionY); destY = (int)(yratio * (Control.PositionY) - (int)(yratio * (Gauge.Direction == 0 && zeropos > xpos ? (zeropos - xpos) * Math.Sin(DrawRotation) : 0))); destW = ((int)(xratio * xpos) - (int)(xratio * zeropos)) * (xpos >= zeropos ? 1 : -1); destH = (int)(yratio * ypos); } else { - destX = (int)(xratio * Control.PositionX) +(int)(xratio * (Gauge.Direction == 0 && ypos > zeropos ? (ypos - zeropos) * Math.Sin(DrawRotation) : 0)); + destX = (int)(xratio * Control.PositionX) + (int)(xratio * (Gauge.Direction == 0 && ypos > zeropos ? (ypos - zeropos) * Math.Sin(DrawRotation) : 0)); if (Gauge.Direction != 1 && !IsFire) destY = (int)(yratio * (Control.PositionY + zeropos)) + (ypos > zeropos ? (int)(yratio * (zeropos - ypos)) : 0); else @@ -2166,9 +2166,9 @@ public virtual int GetDrawIndex() case CABViewControlTypes.CP_HANDLE: if (Locomotive.CombinedControlType == MSTSLocomotive.CombinedControl.ThrottleDynamic && Locomotive.DynamicBrakePercent >= 0 || Locomotive.CombinedControlType == MSTSLocomotive.CombinedControl.ThrottleAir && Locomotive.TrainBrakeController.CurrentValue > 0) - index = PercentToIndex(Locomotive.GetCombinedHandleValue(false)); - else - index = PercentToIndex(Locomotive.GetCombinedHandleValue(false)); + index = PercentToIndex(Locomotive.GetCombinedHandleValue(false)); + else + index = PercentToIndex(Locomotive.GetCombinedHandleValue(false)); break; case CABViewControlTypes.ORTS_SELECTED_SPEED_DISPLAY: if (Locomotive.CruiseControl == null) @@ -2305,7 +2305,7 @@ public virtual int GetDrawIndex() case CABViewControlTypes.ORTS_CC_SELECTED_SPEED: case CABViewControlTypes.ORTS_MULTI_POSITION_CONTROLLER: case CABViewControlTypes.ORTS_ACCELERATION_IN_TIME: - case CABViewControlTypes.ORTS_CC_SPEED_DELTA: + case CABViewControlTypes.ORTS_CC_SPEED_DELTA: case CABViewControlTypes.ORTS_CC_SPEED_0: index = (int)data; break; @@ -2704,7 +2704,7 @@ public void HandleUserInput() break; } - case CABViewControlTypes.ORTS_CC_SPEED_DELTA: + case CABViewControlTypes.ORTS_CC_SPEED_DELTA: { p = ChangedValue(0); if (p == 1) diff --git a/Source/RunActivity/Viewer3D/RollingStock/MSTSSteamLocomotiveViewer.cs b/Source/RunActivity/Viewer3D/RollingStock/MSTSSteamLocomotiveViewer.cs index 9e913394d3..a8a7e579a5 100644 --- a/Source/RunActivity/Viewer3D/RollingStock/MSTSSteamLocomotiveViewer.cs +++ b/Source/RunActivity/Viewer3D/RollingStock/MSTSSteamLocomotiveViewer.cs @@ -21,9 +21,7 @@ using System.Collections.Generic; using Microsoft.Xna.Framework; using Orts.Common; -using Orts.Simulation; using Orts.Simulation.RollingStocks; -using Orts.Simulation.RollingStocks.SubSystems.Controllers; using ORTS.Common; using ORTS.Common.Input; @@ -153,18 +151,18 @@ protected override void ReverserControlBackwards() { SteamLocomotive.StartReverseDecrease(null); } - + /// /// Overrides the base method as steam locomotives have only rudimentary gear boxes. /// protected override void StartGearBoxIncrease() { SteamLocomotive.SteamStartGearBoxIncrease(); - } - + } + protected override void StopGearBoxIncrease() { - SteamLocomotive.SteamStopGearBoxIncrease(); + SteamLocomotive.SteamStopGearBoxIncrease(); } protected override void StartGearBoxDecrease() @@ -176,7 +174,7 @@ protected override void StopGearBoxDecrease() { SteamLocomotive.SteamStopGearBoxDecrease(); } - + public override void InitializeUserInputCommands() { @@ -268,7 +266,7 @@ public override void PrepareFrame(RenderFrame frame, ElapsedTime elapsedTime) foreach (var drawer in Cylinders) drawer.SetOutput(car.Cylinders1SteamVelocityMpS, car.Cylinders1SteamVolumeM3pS, car.Cylinder1ParticleDurationS); - foreach (var drawer in Cylinders2) + foreach (var drawer in Cylinders2) drawer.SetOutput(car.Cylinders2SteamVelocityMpS, car.Cylinders2SteamVolumeM3pS, car.Cylinder2ParticleDurationS); foreach (var drawer in Cylinders11) @@ -309,16 +307,16 @@ public override void PrepareFrame(RenderFrame frame, ElapsedTime elapsedTime) foreach (var drawer in Blowdown) drawer.SetOutput(car.BlowdownSteamVelocityMpS, car.BlowdownSteamVolumeM3pS, car.BlowdownParticleDurationS); - + // TODO: Drainpipe - Not used in either MSTS or OR - currently disabled by zero values set in SteamLocomotive file - foreach (var drawer in Drainpipe) + foreach (var drawer in Drainpipe) drawer.SetOutput(car.DrainpipeSteamVelocityMpS, car.DrainpipeSteamVolumeM3pS, car.DrainpipeParticleDurationS); - foreach (var drawer in Injectors1) + foreach (var drawer in Injectors1) drawer.SetOutput(car.Injector1SteamVelocityMpS, car.Injector1SteamVolumeM3pS, car.Injector1ParticleDurationS); - foreach (var drawer in Injectors2) - drawer.SetOutput(car.Injector2SteamVelocityMpS, car.Injector2SteamVolumeM3pS, car.Injector2ParticleDurationS); + foreach (var drawer in Injectors2) + drawer.SetOutput(car.Injector2SteamVelocityMpS, car.Injector2SteamVolumeM3pS, car.Injector2ParticleDurationS); foreach (var drawer in SmallEjector) drawer.SetOutput(car.SmallEjectorSteamVelocityMpS, car.SmallEjectorSteamVolumeM3pS, car.SmallEjectorParticleDurationS); @@ -327,14 +325,14 @@ public override void PrepareFrame(RenderFrame frame, ElapsedTime elapsedTime) drawer.SetOutput(car.LargeEjectorSteamVelocityMpS, car.LargeEjectorSteamVolumeM3pS, car.LargeEjectorParticleDurationS); foreach (var drawer in Compressor) - drawer.SetOutput(car.CompressorSteamVelocityMpS, car.CompressorSteamVolumeM3pS, car.CompressorParticleDurationS ); + drawer.SetOutput(car.CompressorSteamVelocityMpS, car.CompressorSteamVolumeM3pS, car.CompressorParticleDurationS); foreach (var drawer in Generator) drawer.SetOutput(car.GeneratorSteamVelocityMpS, car.GeneratorSteamVolumeM3pS, car.GeneratorParticleDurationS); - + foreach (var drawer in SafetyValves) drawer.SetOutput(car.SafetyValvesSteamVelocityMpS, car.SafetyValvesSteamVolumeM3pS, car.SafetyValvesParticleDurationS); - + foreach (var drawer in Stack) { Color_Value = car.SmokeColor.SmoothedValue; diff --git a/Source/RunActivity/Viewer3D/RollingStock/MSTSWagonViewer.cs b/Source/RunActivity/Viewer3D/RollingStock/MSTSWagonViewer.cs index 10ca353178..588a20e675 100644 --- a/Source/RunActivity/Viewer3D/RollingStock/MSTSWagonViewer.cs +++ b/Source/RunActivity/Viewer3D/RollingStock/MSTSWagonViewer.cs @@ -27,7 +27,6 @@ using System.Linq; using Microsoft.Xna.Framework; using Orts.Common; -using Orts.Simulation.Physics; using Orts.Simulation.RollingStocks; using Orts.Simulation.RollingStocks.SubSystems; using Orts.Viewer3D.RollingStock.SubSystems; @@ -107,7 +106,7 @@ public class MSTSWagonViewer : TrainCarViewer public MSTSWagonViewer(Viewer viewer, MSTSWagon car) : base(viewer, car) { - + string steamTexture = viewer.Simulator.BasePath + @"\GLOBAL\TEXTURES\smokemain.ace"; string dieselTexture = viewer.Simulator.BasePath + @"\GLOBAL\TEXTURES\dieselsmoke.ace"; @@ -142,7 +141,7 @@ public MSTSWagonViewer(Viewer viewer, MSTSWagon car) // Exhaust for HEP/Power Generator if (emitter.Key.ToLowerInvariant() == "wagongeneratorfx") WagonGenerator.AddRange(emitter.Value); - + foreach (var drawer in WagonGenerator) { drawer.Initialize(dieselTexture); @@ -245,7 +244,7 @@ public MSTSWagonViewer(Viewer viewer, MSTSWagon car) // This insection initialises the MSTS style freight animation - can either be for a coal load, which will adjust with usage, or a static animation, such as additional shape. if (car.FreightShapeFileName != null) { - + car.HasFreightAnim = true; FreightShape = new AnimatedShape(viewer, wagonFolderSlash + car.FreightShapeFileName + '\0' + wagonFolderSlash, new WorldPosition(car.WorldPosition), ShapeFlags.ShadowCaster); @@ -707,7 +706,7 @@ public override void PrepareFrame(RenderFrame frame, ElapsedTime elapsedTime) private void UpdateAnimation(RenderFrame frame, ElapsedTime elapsedTime) { - + float distanceTravelledM = 0.0f; // Distance travelled by non-driven wheels float distanceTravelledDrivenM = 0.0f; // Distance travelled by driven wheels float AnimationWheelRadiusM = MSTSWagon.WheelRadiusM; // Radius of non driven wheels @@ -756,16 +755,16 @@ private void UpdateAnimation(RenderFrame frame, ElapsedTime elapsedTime) // Wheel rotation (animation) - for non-drive wheels in steam locomotives and all wheels in other stock if (WheelPartIndexes.Count > 0) - { + { var wheelCircumferenceM = MathHelper.TwoPi * AnimationWheelRadiusM; var rotationalDistanceR = MathHelper.TwoPi * distanceTravelledM / wheelCircumferenceM; // in radians WheelRotationR = MathHelper.WrapAngle(WheelRotationR - rotationalDistanceR); var wheelRotationMatrix = Matrix.CreateRotationX(WheelRotationR); foreach (var iMatrix in WheelPartIndexes) - { + { TrainCarShape.XNAMatrices[iMatrix] = wheelRotationMatrix * TrainCarShape.SharedShape.Matrices[iMatrix]; - } - } + } + } #if DEBUG_WHEEL_ANIMATION @@ -810,8 +809,8 @@ private void UpdateAnimation(RenderFrame frame, ElapsedTime elapsedTime) FreightShape.Location.TileX = Car.WorldPosition.TileX; FreightShape.Location.TileZ = Car.WorldPosition.TileZ; - bool SteamAnimShape = false; - float FuelControllerLevel = 0.0f; + bool SteamAnimShape = false; + float FuelControllerLevel = 0.0f; // For coal load variation on locomotives determine the current fuel level - and whether locomotive is a tender or tank type locomotive. if (MSTSWagon.WagonType == TrainCar.WagonTypes.Tender || MSTSWagon is MSTSSteamLocomotive) @@ -834,24 +833,24 @@ private void UpdateAnimation(RenderFrame frame, ElapsedTime elapsedTime) { FuelControllerLevel = NonTenderSteamLocomotive.FuelController.CurrentValue; SteamAnimShape = true; - } + } } } - // Set height of FAs - if relevant conditions met, use default position co-ords defined above - if (FreightShape.XNAMatrices.Length > 0) + // Set height of FAs - if relevant conditions met, use default position co-ords defined above + if (FreightShape.XNAMatrices.Length > 0) + { + // For tender coal load animation + if (MSTSWagon.FreightAnimFlag > 0 && MSTSWagon.FreightAnimMaxLevelM > MSTSWagon.FreightAnimMinLevelM && SteamAnimShape) { - // For tender coal load animation - if (MSTSWagon.FreightAnimFlag > 0 && MSTSWagon.FreightAnimMaxLevelM > MSTSWagon.FreightAnimMinLevelM && SteamAnimShape) - { - FreightShape.XNAMatrices[0].M42 = MSTSWagon.FreightAnimMinLevelM + FuelControllerLevel * (MSTSWagon.FreightAnimMaxLevelM - MSTSWagon.FreightAnimMinLevelM); - } - // reproducing MSTS strange behavior; used to display loco crew when attached to tender - else if (MSTSWagon.WagonType == TrainCar.WagonTypes.Tender) - { - FreightShape.Location.XNAMatrix.M42 += MSTSWagon.FreightAnimMaxLevelM; - } + FreightShape.XNAMatrices[0].M42 = MSTSWagon.FreightAnimMinLevelM + FuelControllerLevel * (MSTSWagon.FreightAnimMaxLevelM - MSTSWagon.FreightAnimMinLevelM); } + // reproducing MSTS strange behavior; used to display loco crew when attached to tender + else if (MSTSWagon.WagonType == TrainCar.WagonTypes.Tender) + { + FreightShape.Location.XNAMatrix.M42 += MSTSWagon.FreightAnimMaxLevelM; + } + } // Display Animation Shape FreightShape.PrepareFrame(frame, elapsedTime); } @@ -936,7 +935,7 @@ private void UpdateCouplers(RenderFrame frame, ElapsedTime elapsedTime) if (FrontCouplerShape != null && !(Viewer.Camera.AttachedCar == this.MSTSWagon && Viewer.Camera.Style == Camera.Styles.ThreeDimCab)) { // Get the movement that would be needed to locate the coupler on the car if they were pointing in the default direction. - var displacement = Car.FrontCoupler.Size; + var displacement = Car.FrontCoupler.Size; displacement.Z += (Car.CarLengthM / 2.0f) + Car.FrontCouplerSlackM - Car.WagonFrontCouplerCurveExtM; if (Car.CarAhead != null) // Display animated coupler if there is a car infront of this car @@ -1187,7 +1186,7 @@ private Quaternion PositionCoupler(TrainCar car, AnimatedShape couplerShape, Vec // ToDO - For some reason aligning the coupler with a flipped car introduces a small error in the coupler position such that the couplers between a normal and flipped // car will not align correctly. // To correct this "somewhat" a test has been introduced to align coupler location with the previous car. See code above in front coupler. - + // Place the coupler in the centre of the car var p = new WorldPosition(car.WorldPosition); couplerShape.Location.Location = new Vector3(p.Location.X, p.Location.Y, p.Location.Z); @@ -1232,7 +1231,7 @@ private void AdjustCouplerAngle(TrainCar adjacentCar, AnimatedShape couplerShape var mRotation = Matrix.CreateRotationY(angle); // Rotate the coupler to align with the calculated angle direction - couplerShape.Location.XNAMatrix = mRotation* couplerShape.Location.XNAMatrix; + couplerShape.Location.XNAMatrix = mRotation * couplerShape.Location.XNAMatrix; } @@ -1256,12 +1255,12 @@ private void AdjustAirHoseAngle(TrainCar adjacentCar, AnimatedShape airhoseShape } - /// - /// Rotate the coupler to align with the direction (attitude) of the car. - /// - /// - /// - private void AlignCouplerWithCar(TrainCar car, AnimatedShape couplerShape) + /// + /// Rotate the coupler to align with the direction (attitude) of the car. + /// + /// + /// + private void AlignCouplerWithCar(TrainCar car, AnimatedShape couplerShape) { var p = new WorldPosition(car.WorldPosition); diff --git a/Source/RunActivity/Viewer3D/RollingStock/SubSystems/ContainerViewer.cs b/Source/RunActivity/Viewer3D/RollingStock/SubSystems/ContainerViewer.cs index 362137fdc6..48a52d21e5 100644 --- a/Source/RunActivity/Viewer3D/RollingStock/SubSystems/ContainerViewer.cs +++ b/Source/RunActivity/Viewer3D/RollingStock/SubSystems/ContainerViewer.cs @@ -15,13 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Microsoft.Xna.Framework; -using Orts.Simulation; -using Orts.Simulation.RollingStocks; -using Orts.Simulation.RollingStocks.SubSystems; -using ORTS.Common; using System.Collections.Generic; using System.Linq; +using Orts.Simulation; +using ORTS.Common; namespace Orts.Viewer3D.RollingStock.SubSystems { @@ -148,13 +145,13 @@ public ContainerViewer(Viewer viewer, Container container) } } } -/* if (ContainerShape.XNAMatrices.Length > 0 && animation is FreightAnimationDiscrete && (animation as FreightAnimationDiscrete).Flipped) - { - var flipper = Matrix.Identity; - flipper.M11 = -1; - flipper.M33 = -1; - ContainerShape.XNAMatrices[0] *= flipper; - }*/ + /* if (ContainerShape.XNAMatrices.Length > 0 && animation is FreightAnimationDiscrete && (animation as FreightAnimationDiscrete).Flipped) + { + var flipper = Matrix.Identity; + flipper.M11 = -1; + flipper.M33 = -1; + ContainerShape.XNAMatrices[0] *= flipper; + }*/ } public void Mark() diff --git a/Source/RunActivity/Viewer3D/RollingStock/SubSystems/CruiseControlViewer.cs b/Source/RunActivity/Viewer3D/RollingStock/SubSystems/CruiseControlViewer.cs index d45a7a6168..94a17abbf1 100644 --- a/Source/RunActivity/Viewer3D/RollingStock/SubSystems/CruiseControlViewer.cs +++ b/Source/RunActivity/Viewer3D/RollingStock/SubSystems/CruiseControlViewer.cs @@ -15,13 +15,9 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Microsoft.Xna.Framework; using System; -using System.Collections.Generic; using Orts.Simulation.RollingStocks; using Orts.Simulation.RollingStocks.SubSystems; -using Orts.Viewer3D.RollingStock; -using ORTS.Common; using ORTS.Common.Input; namespace Orts.Viewer3D.RollingStock.SubSystems diff --git a/Source/RunActivity/Viewer3D/RollingStock/SubSystems/DistributedPowerInterface.cs b/Source/RunActivity/Viewer3D/RollingStock/SubSystems/DistributedPowerInterface.cs index c09b3619c4..9ade555a30 100644 --- a/Source/RunActivity/Viewer3D/RollingStock/SubSystems/DistributedPowerInterface.cs +++ b/Source/RunActivity/Viewer3D/RollingStock/SubSystems/DistributedPowerInterface.cs @@ -17,6 +17,11 @@ // This file is the responsibility of the 3D & Environment Team. +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Orts.Formats.Msts; @@ -24,11 +29,6 @@ using Orts.Viewer3D.Common; using Orts.Viewer3D.Popups; using ORTS.Common; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; using static Orts.Viewer3D.RollingStock.SubSystems.DistributedPowerInterface; namespace Orts.Viewer3D.RollingStock.SubSystems @@ -172,7 +172,7 @@ public DPDefaultWindow(DistributedPowerInterface dpi, CabViewControl control) : sUnits = sUnits.Replace('/', '_'); CABViewControlUnits.TryParse(sUnits, out LoadUnits); } - DPITable = new DPITable(FullTable, LoadUnits, fullScreen:true, dpi:dpi, (control as CVCScreen).Rotation); + DPITable = new DPITable(FullTable, LoadUnits, fullScreen: true, dpi: dpi, (control as CVCScreen).Rotation); AddToLayout(DPITable, new Point(0, 0)); } } @@ -258,13 +258,13 @@ public virtual void Draw(SpriteBatch spriteBatch, Point drawPosition) if (r.DrawAsInteger) DrawIntRectangle(spriteBatch, drawPosition, r.X, r.Y, r.Width, r.Height, r.Color); else DrawRectangle(spriteBatch, drawPosition, r.X, r.Y, r.Width, r.Height, r.Color); } - foreach(var text in Texts) + foreach (var text in Texts) { int x = drawPosition.X + (int)Math.Round(text.Position.X * Scale); int y = drawPosition.Y + (int)Math.Round(text.Position.Y * Scale); text.Draw(spriteBatch, new Point(x, y)); } - foreach(var tex in Textures) + foreach (var tex in Textures) { DrawSymbol(spriteBatch, tex.Texture, drawPosition, tex.Position.Y, tex.Position.Y); } @@ -297,7 +297,7 @@ public void DrawSymbol(SpriteBatch spriteBatch, Texture2D texture, Point origin, { spriteBatch.Draw(texture, new Vector2(origin.X + x * Scale, origin.Y + y * Scale), null, Color.White, 0, Vector2.Zero, Scale * DPI.MipMapScale, SpriteEffects.None, 0); } - public WindowTextFont GetFont(float size, bool bold=false) + public WindowTextFont GetFont(float size, bool bold = false) { return DPI.Viewer.WindowManager.TextManager.GetExact("Arial", GetScaledFontSize(size), bold ? System.Drawing.FontStyle.Bold : System.Drawing.FontStyle.Regular); } @@ -326,7 +326,7 @@ public override void PrepareFrame(DPIStatus status) { if (!Visible) return; base.PrepareFrame(status); - foreach(var area in SubAreas) + foreach (var area in SubAreas) { area.PrepareFrame(status); } @@ -335,7 +335,7 @@ public override void Draw(SpriteBatch spriteBatch, Point drawPosition) { if (!Visible) return; base.Draw(spriteBatch, drawPosition); - foreach(var area in SubAreas) + foreach (var area in SubAreas) { if (area.Visible) area.Draw(spriteBatch, new Point((int)Math.Round(drawPosition.X + area.Position.X * Scale), (int)Math.Round(drawPosition.Y + area.Position.Y * Scale))); } @@ -393,7 +393,7 @@ public class DPITable : DPIWindow public readonly string[] FirstColumn = { "ID", "Throttle", "Load", "BP", "Flow", "Remote", "ER", "BC", "MR" }; - public DPITable(bool fullTable, CABViewControlUnits loadUnits, bool fullScreen, DistributedPowerInterface dpi, float drawRotation) : base(dpi, 640, fullTable? 230 : 162) + public DPITable(bool fullTable, CABViewControlUnits loadUnits, bool fullScreen, DistributedPowerInterface dpi, float drawRotation) : base(dpi, 640, fullTable ? 230 : 162) { DPI = dpi; FullScreen = fullScreen; @@ -417,7 +417,7 @@ public DPITable(bool fullTable, CABViewControlUnits loadUnits, bool fullScreen, public override void ScaleChanged() { -// base.ScaleChanged(); + // base.ScaleChanged(); SetFont(); } void SetFont() @@ -497,7 +497,7 @@ public override void PrepareFrame(DPIStatus dpiStatus) } dieselLocomotivesCount = k;// only leaders loco group - var nRows = Math.Min (FullTable ? NumberOfRowsFull : NumberOfRowsPartial, dieselLocoHeader.Count()); + var nRows = Math.Min(FullTable ? NumberOfRowsFull : NumberOfRowsPartial, dieselLocoHeader.Count()); for (i = 0; i < nRows; i++) { @@ -509,7 +509,7 @@ public override void PrepareFrame(DPIStatus dpiStatus) TableText[i, j + 1].Font = TableTextFont; TableText[i, j + 1].Text = (colorFirstColEndsWith == Color.White) ? text : text.Substring(0, text.Length - 3); ; TableText[i, j + 1].Color = colorFirstColEndsWith; - TableSymbol[i, j + 1].Font = TableSymbolFont; + TableSymbol[i, j + 1].Font = TableSymbolFont; TableSymbol[i, j + 1].Text = (tempStatus[j, i] != null && tempStatus[j, i].Contains("|")) ? Fence : " "; } TableText[i, 0].Font = TableTextFont; @@ -851,14 +851,14 @@ public void Update3DDPITable() // Add a leading space tX = 0.875f; tY = 0.125f; - leadingSpaces++ ; + leadingSpaces++; } else if (iChar == 2 && param.Length < 3) { // Add a further leading space tX = 0.875f; tY = 0.125f; - leadingSpaces++ ; + leadingSpaces++; } else if (iChar < param.Length + 1 + leadingSpaces && param.Length != 0) { diff --git a/Source/RunActivity/Viewer3D/RollingStock/SubSystems/ETCS/DataEntry.cs b/Source/RunActivity/Viewer3D/RollingStock/SubSystems/ETCS/DataEntry.cs index 7a5ddf859a..d8369b75b3 100644 --- a/Source/RunActivity/Viewer3D/RollingStock/SubSystems/ETCS/DataEntry.cs +++ b/Source/RunActivity/Viewer3D/RollingStock/SubSystems/ETCS/DataEntry.cs @@ -15,15 +15,15 @@ // This file is the responsibility of the 3D & Environment Team. -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Orts.Viewer3D.RollingStock.Subsystems.ETCS; -using static Orts.Viewer3D.RollingStock.Subsystems.ETCS.DriverMachineInterface; -using ORTS.Scripting.Api.ETCS; using System; using System.Collections.Generic; using System.Linq; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Orts.Viewer3D.Popups; +using Orts.Viewer3D.RollingStock.Subsystems.ETCS; +using ORTS.Scripting.Api.ETCS; +using static Orts.Viewer3D.RollingStock.Subsystems.ETCS.DriverMachineInterface; namespace Orts.Viewer3D.RollingStock.SubSystems.ETCS { @@ -53,9 +53,9 @@ public class AlphanumericButton : DMIButton TextPrimitive LettersText; readonly int FontHeightNumber = 16; readonly int FontHeightLetters = 10; - public AlphanumericButton(string num, string letters, DataEntryField field) : base(num + " "+ letters, false, () => field.HandleKeyPress(num+ letters), 102, 50, field.DMI, true) + public AlphanumericButton(string num, string letters, DataEntryField field) : base(num + " " + letters, false, () => field.HandleKeyPress(num + letters), 102, 50, field.DMI, true) { - Number = num+" "; + Number = num + " "; Letters = letters; SetText(); } @@ -208,7 +208,7 @@ void SetText() { var font = GetFont(FontHeightDataField); var size = (int)(font.MeasureString(Name) / Scale); - Label = new TextPrimitive(new Point(Width-10-size, (Height-FontHeightDataField)/2), ColorGrey, Name, font); + Label = new TextPrimitive(new Point(Width - 10 - size, (Height - FontHeightDataField) / 2), ColorGrey, Name, font); } } public class FieldDataArea : DMIButton @@ -279,7 +279,7 @@ public DataEntryField(DMIDataEntryValue field, int index, DataEntryWindow window { Name = field.Name; Field = field; - AcceptedValue = PreviousValue = field.Value??""; + AcceptedValue = PreviousValue = field.Value ?? ""; Index = index; DataEntryWindow = window; DMI = DataEntryWindow.DMI; @@ -407,7 +407,7 @@ public void HandleKeyPress(string keyname) } else if (Keyboard is NumericKeyboard) { - if (keyname == "DEL") KeyboardValue = KeyboardValue.Length>0 ? KeyboardValue.Substring(0, KeyboardValue.Length - 1) : ""; + if (keyname == "DEL") KeyboardValue = KeyboardValue.Length > 0 ? KeyboardValue.Substring(0, KeyboardValue.Length - 1) : ""; else KeyboardValue += keyname; CursorIndex = KeyboardValue.Length; } @@ -423,7 +423,7 @@ public void HandleKeyPress(string keyname) if (CursorIndex >= KeyboardValue.Length || !keyname.Contains(KeyboardValue[KeyboardValue.Length - 1])) { KeyboardValue += keyname[0]; - CursorIndex = keyname.Length == 1 ? KeyboardValue.Length : KeyboardValue.Length-1; + CursorIndex = keyname.Length == 1 ? KeyboardValue.Length : KeyboardValue.Length - 1; } else { @@ -442,7 +442,7 @@ public class DataEntryWindow : DMISubwindow { string Title; int NumPages => (Fields.Count - 1) / 4 + 1; - int CurrentPage => ActiveField/4; + int CurrentPage => ActiveField / 4; public int ActiveField; public readonly IList Fields = new List(); DMIButton[] KeyboardButtons = new DMIButton[12]; @@ -483,7 +483,7 @@ void SetText() { var font = GetFont(FontHeightYes); string text = Viewer.Catalog.GetString("Yes"); - Yes = new TextPrimitive(new Point((Width-(int)(font.MeasureString(text)/Scale))/2, (Height-FontHeightYes)/2), Color.Black, text, font); + Yes = new TextPrimitive(new Point((Width - (int)(font.MeasureString(text) / Scale)) / 2, (Height - FontHeightYes) / 2), Color.Black, text, font); } } public DataEntryWindow(DMIDataEntryDefinition definition, DriverMachineInterface dmi) : base(definition.WindowTitle, definition.FullScreen || definition.Fields.Count > 1, dmi) @@ -552,21 +552,21 @@ public DataEntryWindow(DMIDataEntryDefinition definition, DriverMachineInterface return; } if (overrideOperational) foreach (var check in Definition.OperationalCrossChecks) - { - var conflict = check.GetConflictingVariables(values); - foreach (var name in conflict) { - foreach (var field in Fields) + var conflict = check.GetConflictingVariables(values); + foreach (var name in conflict) { - if (field.Name == name) + foreach (var field in Fields) { - checkPassed = false; - field.OperationalCrossCheckInvalid = true; - break; + if (field.Name == name) + { + checkPassed = false; + field.OperationalCrossCheckInvalid = true; + break; + } } } } - } if (!checkPassed) { YesButton.DelayType = true; @@ -611,7 +611,7 @@ public override void Draw(SpriteBatch spriteBatch, Point drawPosition) { var text = Fields[i].DataEchoText; int x = drawPosition.X + (int)Math.Round((204 + 5) * Scale); - int y = drawPosition.Y + (int)Math.Round((100 + 2*i*FontHeightLabel) * Scale); + int y = drawPosition.Y + (int)Math.Round((100 + 2 * i * FontHeightLabel) * Scale); text.Draw(spriteBatch, new Point(x, y)); } } @@ -643,7 +643,7 @@ public void PrepareLayout() areas.Add(PrevButton); } DataEntryCompleteLabel.Position = new Point(0, 330); - YesButton.Position = new Point(0, 330+ DataEntryCompleteLabel.Height); + YesButton.Position = new Point(0, 330 + DataEntryCompleteLabel.Height); areas.Add(DataEntryCompleteLabel); areas.Add(YesButton); for (int i = 4 * (ActiveField / 4); i < Fields.Count && i < (4 * (ActiveField / 4 + 1)); i++) @@ -667,7 +667,7 @@ public void PrepareLayout() KeyboardButtons[11] = keyboard.MoreKey; break; } - else if (i+keyboard.CurrentKeyPage*11 < keyboard.Keys.Count) KeyboardButtons[i] = field.Keyboard.Keys[i + keyboard.CurrentKeyPage * 11]; + else if (i + keyboard.CurrentKeyPage * 11 < keyboard.Keys.Count) KeyboardButtons[i] = field.Keyboard.Keys[i + keyboard.CurrentKeyPage * 11]; } for (int i = 0; i < KeyboardButtons.Length; i++) { @@ -702,7 +702,7 @@ public void FieldSelected(int index) if (field.TechnicalRangeInvalid || field.TechnicalResolutionInvalid || (field.OperationalRangeInvalid && !overrideOperational)) { if (field.OperationalRangeInvalid) Fields[index].DataArea.DelayType = true; - for (int i=0; i SpeedTargets) } if (oth1 && prev.TargetSpeedMpS < cur.TargetSpeedMpS) oth2 = true; } - Exit: +Exit: PASPRectangles = paspRectangles; } @@ -279,7 +279,7 @@ void CreateTargetSpeeds(List speedTargets) { var speedTargetText = new List(speedTargets.Count); var speedTargetTextures = new List(speedTargets.Count); - int ld = 0; + int ld = 0; for (int i = 1; i < speedTargets.Count; i++) { bool overlap = false; @@ -328,7 +328,7 @@ void CreateTrackConditions(List trackConditions) if (condition.DistanceToTrainM > MaxViewingDistanceM || condition.DistanceToTrainM < 0 || prevObject[row] - posy < 20 || posy < 0) continue; prevObject[row] = posy; Texture2D tex; - switch(condition.Type) + switch (condition.Type) { case TrackConditionType.LowerPantograph: tex = TrackConditionTextureData[condition.YellowColour ? 2 : 1]; @@ -367,7 +367,7 @@ void CreateTrackConditions(List trackConditions) tex = TrackConditionTextureData[35]; break; case TrackConditionType.TractionSystemChange: - switch(condition.TractionSystem) + switch (condition.TractionSystem) { case TractionSystem.NonFitted: tex = TrackConditionTextureData[condition.YellowColour ? 26 : 25]; diff --git a/Source/RunActivity/Viewer3D/RollingStock/SubSystems/ETCS/SpeedDistanceMonitoring.cs b/Source/RunActivity/Viewer3D/RollingStock/SubSystems/ETCS/SpeedDistanceMonitoring.cs index a5e19b9e11..549db50354 100644 --- a/Source/RunActivity/Viewer3D/RollingStock/SubSystems/ETCS/SpeedDistanceMonitoring.cs +++ b/Source/RunActivity/Viewer3D/RollingStock/SubSystems/ETCS/SpeedDistanceMonitoring.cs @@ -17,15 +17,14 @@ // This file is the responsibility of the 3D & Environment Team. +using System; +using System.Collections.Generic; +using System.Linq; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using Orts.Simulation.RollingStocks; using Orts.Viewer3D.Popups; using ORTS.Common; using ORTS.Scripting.Api.ETCS; -using System; -using System.Collections.Generic; -using System.Linq; using static Orts.Viewer3D.RollingStock.Subsystems.ETCS.DriverMachineInterface; namespace Orts.Viewer3D.RollingStock.Subsystems.ETCS @@ -536,7 +535,7 @@ public override void PrepareFrame(ETCSStatus status) if (status.CurrentMode == Mode.OS || status.CurrentMode == Mode.SR) return; float dist = status.TargetDistanceM.Value; - + var text = (((int)(dist / 10)) * 10).ToString(); var fontSize = TargetDistanceFont.MeasureString(text) / Scale; TargetDistanceText = new TextPrimitive(new Point((int)(54 - fontSize), (int)(30 - FontHeightTargetDistance) / 2), ColorGrey, text, TargetDistanceFont); diff --git a/Source/RunActivity/Viewer3D/RollingStock/SubSystems/ETCS/TextMessages.cs b/Source/RunActivity/Viewer3D/RollingStock/SubSystems/ETCS/TextMessages.cs index 2bdf353a3a..de2d6ed74b 100644 --- a/Source/RunActivity/Viewer3D/RollingStock/SubSystems/ETCS/TextMessages.cs +++ b/Source/RunActivity/Viewer3D/RollingStock/SubSystems/ETCS/TextMessages.cs @@ -17,14 +17,14 @@ // This file is the responsibility of the 3D & Environment Team. +using System; +using System.Collections.Generic; +using System.Linq; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Orts.Viewer3D.Popups; using Orts.Viewer3D.RollingStock.Subsystems.ETCS; using ORTS.Scripting.Api.ETCS; -using System; -using System.Collections.Generic; -using System.Linq; namespace Orts.Viewer3D.RollingStock.SubSystems.ETCS { @@ -54,7 +54,7 @@ public class MessageArea : DMIButton List MessageList; TextMessage? AcknowledgingMessage; - public MessageArea(DriverMachineInterface dmi) : base(Viewer.Catalog.GetString("Acknowledge"), true, null, 234, (dmi.IsSoftLayout ? 4 : 5)*RowHeight, dmi, false) + public MessageArea(DriverMachineInterface dmi) : base(Viewer.Catalog.GetString("Acknowledge"), true, null, 234, (dmi.IsSoftLayout ? 4 : 5) * RowHeight, dmi, false) { MaxTextLines = dmi.IsSoftLayout ? 4 : 5; @@ -68,7 +68,7 @@ public MessageArea(DriverMachineInterface dmi) : base(Viewer.Catalog.GetString(" CurrentPage++; SetMessages(); } - }, 46, Height/2, dmi); + }, 46, Height / 2, dmi); ButtonScrollDown = new DMIIconButton("NA_14.bmp", "NA_16.bmp", Viewer.Catalog.GetString("Scroll Down"), true, () => { if (CurrentPage > 0) @@ -141,7 +141,7 @@ string[] GetRowSeparated(string text, bool isBold) var size = font.MeasureString(text) / Scale; if (size > 234 - 48) { - int split = text.LastIndexOf(' ', (int)((234 - 48)/size*text.Length)); + int split = text.LastIndexOf(' ', (int)((234 - 48) / size * text.Length)); if (split == -1) split = (int)((234 - 48) / size * text.Length); var remaining = GetRowSeparated(text.Substring(split + 1), isBold); var arr = new string[remaining.Length + 1]; diff --git a/Source/RunActivity/Viewer3D/RollingStock/SubSystems/FreightAnimationsViewer.cs b/Source/RunActivity/Viewer3D/RollingStock/SubSystems/FreightAnimationsViewer.cs index 2a11545fc5..770521233a 100644 --- a/Source/RunActivity/Viewer3D/RollingStock/SubSystems/FreightAnimationsViewer.cs +++ b/Source/RunActivity/Viewer3D/RollingStock/SubSystems/FreightAnimationsViewer.cs @@ -15,11 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System.Collections.Generic; using Microsoft.Xna.Framework; using Orts.Simulation.RollingStocks; using Orts.Simulation.RollingStocks.SubSystems; using ORTS.Common; -using System.Collections.Generic; namespace Orts.Viewer3D.RollingStock.SubSystems { @@ -58,7 +58,7 @@ public FreightAnimationViewer(Viewer viewer, MSTSWagon wagon, string wagonFolder { foreach (var lodControl in FreightShape.SharedShape.LodControls) { - if ( lodControl.DistanceLevels.Length > 0) + if (lodControl.DistanceLevels.Length > 0) { foreach (var distanceLevel in lodControl.DistanceLevels) { diff --git a/Source/RunActivity/Viewer3D/RollingStock/TrainCarViewer.cs b/Source/RunActivity/Viewer3D/RollingStock/TrainCarViewer.cs index 0247023b4a..986d396a5f 100644 --- a/Source/RunActivity/Viewer3D/RollingStock/TrainCarViewer.cs +++ b/Source/RunActivity/Viewer3D/RollingStock/TrainCarViewer.cs @@ -15,10 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System.Diagnostics; using Microsoft.Xna.Framework; using Orts.Simulation.RollingStocks; using ORTS.Common; -using System.Diagnostics; namespace Orts.Viewer3D.RollingStock { diff --git a/Source/RunActivity/Viewer3D/Scenery.cs b/Source/RunActivity/Viewer3D/Scenery.cs index 23621dce9d..f1ebea12b0 100644 --- a/Source/RunActivity/Viewer3D/Scenery.cs +++ b/Source/RunActivity/Viewer3D/Scenery.cs @@ -42,17 +42,17 @@ * */ -using Microsoft.Xna.Framework; -using Orts.Formats.Msts; -using Orts.Formats.OR; -using ORTS.Common; -using Orts.Simulation.RollingStocks; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Text.RegularExpressions; +using Microsoft.Xna.Framework; +using Orts.Formats.Msts; +using Orts.Formats.OR; +using Orts.Simulation.RollingStocks; +using ORTS.Common; namespace Orts.Viewer3D { @@ -384,7 +384,7 @@ public WorldFile(Viewer viewer, int tileX, int tileZ, bool visible) else { var found = false; - foreach (var movingTable in Program.Simulator. MovingTables) + foreach (var movingTable in Program.Simulator.MovingTables) { if (worldObject.UID == movingTable.UID && WFileName == movingTable.WFile) { @@ -504,7 +504,7 @@ public WorldFile(Viewer viewer, int tileX, int tileZ, bool visible) sceneryObjects.Add(new ContainerHandlingItemShape(viewer, shapeFilePath, worldMatrix, shadowCaster ? ShapeFlags.ShadowCaster : ShapeFlags.None, (PickupObj)worldObject)); } else - sceneryObjects.Add(new FuelPickupItemShape(viewer, shapeFilePath, worldMatrix, shadowCaster ? ShapeFlags.ShadowCaster : ShapeFlags.None, (PickupObj)worldObject)); + sceneryObjects.Add(new FuelPickupItemShape(viewer, shapeFilePath, worldMatrix, shadowCaster ? ShapeFlags.ShadowCaster : ShapeFlags.None, (PickupObj)worldObject)); PickupList.Add((PickupObj)worldObject); } else // It's some other type of object - not one of the above. diff --git a/Source/RunActivity/Viewer3D/Shaders.cs b/Source/RunActivity/Viewer3D/Shaders.cs index 0fcced2911..1eaeafabe9 100644 --- a/Source/RunActivity/Viewer3D/Shaders.cs +++ b/Source/RunActivity/Viewer3D/Shaders.cs @@ -124,8 +124,8 @@ public void SetMatrix(Matrix w, ref Matrix v, ref Matrix p) projection.SetValue(p); int vIn = Program.Simulator.Settings.DayAmbientLight; - - float FullBrightness = (float)vIn / 20.0f ; + + float FullBrightness = (float)vIn / 20.0f; //const float HalfShadowBrightness = 0.75; const float HalfNightBrightness = 0.6f; const float ShadowBrightness = 0.5f; @@ -334,7 +334,7 @@ public Vector3 LightVector var skyColor1 = Day2Night(0.25f, -0.25f, -0.5f, value.Y); var skyColor2 = MathHelper.Clamp(skyColor1 + 0.55f, 0, 1); var skyColor3 = 0.001f / (0.8f * Math.Abs(value.Y - 0.1f)); - skyColor.SetValue(new Vector3(skyColor1, skyColor2, skyColor3)); + skyColor.SetValue(new Vector3(skyColor1, skyColor2, skyColor3)); // Fade moon during daylight var moonColor1 = value.Y > 0.1f ? (1 - value.Y) / 1.5f : 1; @@ -363,9 +363,9 @@ public float Time int _moonPhase; public float Random { - set - { - _moonPhase = (int)value; + set + { + _moonPhase = (int)value; moonTexCoord.SetValue(new Vector2((value % 2) / 2, (int)(value / 2) / 4)); } } @@ -386,7 +386,7 @@ public float Overcast public float WindDirection { - set + set { var totalWindDisplacement = 50 * WindSpeed * _time; // This exaggerates the wind speed, but it is necessary to get a visible effect windDisplacement.SetValue(new Vector2(-(float)Math.Sin(value) * totalWindDisplacement, (float)Math.Cos(value) * totalWindDisplacement)); @@ -442,14 +442,14 @@ public SkyShader(GraphicsDevice graphicsDevice) moonMaskTexture = Parameters["MoonMaskTexture"]; cloudMapTexture = Parameters["CloudMapTexture"]; } - + // This function dims the lighting at night, with a transition period as the sun rises or sets static float Day2Night(float startNightTrans, float finishNightTrans, float minDarknessCoeff, float sunDirectionY) { int vIn = Program.Simulator.Settings.DayAmbientLight; - float dayAmbientLight = (float)vIn / 20.0f ; - + float dayAmbientLight = (float)vIn / 20.0f; + // The following two are used to interpoate between day and night lighting (y = mx + b) var slope = (dayAmbientLight - minDarknessCoeff) / (startNightTrans - finishNightTrans); // "m" var incpt = dayAmbientLight - slope * startNightTrans; // "b" diff --git a/Source/RunActivity/Viewer3D/Shapes.cs b/Source/RunActivity/Viewer3D/Shapes.cs index 6ca052ac10..946b52a134 100644 --- a/Source/RunActivity/Viewer3D/Shapes.cs +++ b/Source/RunActivity/Viewer3D/Shapes.cs @@ -27,6 +27,12 @@ // Adds bright green arrows to all normal shapes indicating the direction of their normals. //#define DEBUG_SHAPE_NORMALS +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Threading; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Orts.Formats.Msts; @@ -34,12 +40,6 @@ using Orts.Simulation.RollingStocks; using Orts.Viewer3D.Common; using ORTS.Common; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Threading; using Event = Orts.Common.Event; using Events = Orts.Common.Events; @@ -427,7 +427,7 @@ public override void PrepareFrame(RenderFrame frame, ElapsedTime elapsedTime) } } - //Class AnalogClockShape to animate analog OR-Clocks as child of AnimatedShape <- PoseableShape <- StaticShape + //Class AnalogClockShape to animate analog OR-Clocks as child of AnimatedShape <- PoseableShape <- StaticShape public class AnalogClockShape : AnimatedShape { public AnalogClockShape(Viewer viewer, string path, WorldPosition initialPosition, ShapeFlags flags, float frameRateDivisor = 1.0f) @@ -455,7 +455,7 @@ protected override void AnimateOneMatrix(int iMatrix, float key) var anim_node = SharedShape.Animations[0].anim_nodes[iMatrix]; if (anim_node.controllers.Count == 0) - return; // missing controllers + return; // missing controllers // Start with the intial pose in the shape file. var xnaPose = SharedShape.Matrices[iMatrix]; @@ -1814,7 +1814,8 @@ public MutableShapePrimitive(Material material, int maxVertices, int maxIndices, indexData: new ushort[maxIndices], graphicsDevice: material.Viewer.GraphicsDevice, hierarchy: hierarchy, - hierarchyIndex: hierarchyIndex) { } + hierarchyIndex: hierarchyIndex) + { } public void SetVertexData(VertexPositionNormalTexture[] data, int minVertexIndex, int numVertices, int primitiveCount) { @@ -1994,14 +1995,14 @@ void LoadContent() Trace.Write("S"); var filePath = FilePath; // commented lines allow reading the animation block from an additional file in an Openrails subfolder -// string dir = Path.GetDirectoryName(filePath); -// string file = Path.GetFileName(filePath); -// string orFilePath = dir + @"\openrails\" + file; + // string dir = Path.GetDirectoryName(filePath); + // string file = Path.GetFileName(filePath); + // string orFilePath = dir + @"\openrails\" + file; var sFile = new ShapeFile(filePath, Viewer.Settings.SuppressShapeWarnings); -// if (file.ToLower().Contains("turntable") && File.Exists(orFilePath)) -// { -// sFile.ReadAnimationBlock(orFilePath); -// } + // if (file.ToLower().Contains("turntable") && File.Exists(orFilePath)) + // { + // sFile.ReadAnimationBlock(orFilePath); + // } var textureFlags = Helpers.TextureFlags.None; diff --git a/Source/RunActivity/Viewer3D/Signals.cs b/Source/RunActivity/Viewer3D/Signals.cs index 6638534265..96237e4e61 100644 --- a/Source/RunActivity/Viewer3D/Signals.cs +++ b/Source/RunActivity/Viewer3D/Signals.cs @@ -655,11 +655,11 @@ public SignalLightPrimitive(Viewer viewer, Vector3 position, float radius, Color GlowIntensityNight = glowNight; var verticies = new[] { - new VertexPositionColorTexture(new Vector3(-radius, +radius, 0), color, new Vector2(u1, v0)), - new VertexPositionColorTexture(new Vector3(+radius, +radius, 0), color, new Vector2(u0, v0)), - new VertexPositionColorTexture(new Vector3(-radius, -radius, 0), color, new Vector2(u1, v1)), - new VertexPositionColorTexture(new Vector3(+radius, -radius, 0), color, new Vector2(u0, v1)), - }; + new VertexPositionColorTexture(new Vector3(-radius, +radius, 0), color, new Vector2(u1, v0)), + new VertexPositionColorTexture(new Vector3(+radius, +radius, 0), color, new Vector2(u0, v0)), + new VertexPositionColorTexture(new Vector3(-radius, -radius, 0), color, new Vector2(u1, v1)), + new VertexPositionColorTexture(new Vector3(+radius, -radius, 0), color, new Vector2(u0, v1)), + }; VertexBuffer = new VertexBuffer(viewer.GraphicsDevice, typeof(VertexPositionColorTexture), verticies.Length, BufferUsage.WriteOnly); VertexBuffer.SetData(verticies); diff --git a/Source/RunActivity/Viewer3D/Sky.cs b/Source/RunActivity/Viewer3D/Sky.cs index 99b8e773fd..666e51158d 100644 --- a/Source/RunActivity/Viewer3D/Sky.cs +++ b/Source/RunActivity/Viewer3D/Sky.cs @@ -22,9 +22,9 @@ using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Orts.Common; -using ORTS.Common; using Orts.Viewer3D.Common; using Orts.Viewer3D.Processes; +using ORTS.Common; namespace Orts.Viewer3D { diff --git a/Source/RunActivity/Viewer3D/Sound.cs b/Source/RunActivity/Viewer3D/Sound.cs index a08c7bbe15..3e50dce066 100644 --- a/Source/RunActivity/Viewer3D/Sound.cs +++ b/Source/RunActivity/Viewer3D/Sound.cs @@ -39,6 +39,11 @@ //#define DEBUGSCR +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; using Orts.Common; using Orts.Formats.Msts; using Orts.Simulation; @@ -48,11 +53,6 @@ using Orts.Simulation.Signalling; using ORTS.Common; using ORTS.Settings; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; using Event = Orts.Common.Event; using Events = Orts.Common.Events; @@ -141,7 +141,7 @@ private void LoadTrackSound(string filename, bool isInside) if (filename == null) return; - string[] pathArray = {Viewer.Simulator.RoutePath, Viewer.Simulator.BasePath}; + string[] pathArray = { Viewer.Simulator.RoutePath, Viewer.Simulator.BasePath }; var fullPath = ORTSPaths.GetFileFromFolders(pathArray, @"SOUND\" + filename); if (fullPath == null) { @@ -159,7 +159,7 @@ public override void Uninitialize() //Trace.TraceInformation("TrackSoundSource Uninitialize"); if (_activeInSource != null) _activeInSource.Uninitialize(); - if (_activeOutSource !=null) + if (_activeOutSource != null) _activeOutSource.Uninitialize(); } @@ -193,12 +193,12 @@ public void UpdateTType(bool stateChange) } else if (Car.Train.SpeedMpS < -0.1f) - { - CarIncr = -1; - CarLeading = Car.Train.Cars.Count - 1; - } - else - return; + { + CarIncr = -1; + CarLeading = Car.Train.Cars.Count - 1; + } + else + return; var CarNo = Car.Train.Cars.IndexOf(Car); float trackSoundDistSquared = 0; @@ -248,13 +248,13 @@ public void UpdateTType(bool stateChange) _curTType != SharedSMSFileManager.SwitchSMSNumber && _curTType != SharedSMSFileManager.CurveSMSNumber && _curTType != SharedSMSFileManager.CurveSwitchSMSNumber)) - Car.TrackSoundType = _curTType; - else - { - Car.TrackSoundType = 0; - _curTType = 0; - } - } + Car.TrackSoundType = _curTType; + else + { + Car.TrackSoundType = 0; + _curTType = 0; + } + } else Car.TrackSoundType = _curTType; } else @@ -262,16 +262,16 @@ public void UpdateTType(bool stateChange) var CarAhead = Car.Train.Cars[CarNo - CarIncr]; if (CarAhead.TrackSoundLocation != WorldLocation.None) { -// if (stateChange) -// Trace.TraceInformation("Time {4} TrainName {6} carNo {0} IsOnSwitch {1} IsOnCurve {7} TracksoundType {2} _CurTType {3} AheadTrackSoundType {5}", -// Car.Train.Cars.IndexOf(Car), CarOnSwitch, Car.TrackSoundType, _curTType, Viewer.Simulator.GameTime, CarAhead.TrackSoundType, Car.Train.Name, CarOnCurve); - if ((_curTType == Car.TrackSoundType || stateChange ) && Car.TrackSoundType != CarAhead.TrackSoundType) + // if (stateChange) + // Trace.TraceInformation("Time {4} TrainName {6} carNo {0} IsOnSwitch {1} IsOnCurve {7} TracksoundType {2} _CurTType {3} AheadTrackSoundType {5}", + // Car.Train.Cars.IndexOf(Car), CarOnSwitch, Car.TrackSoundType, _curTType, Viewer.Simulator.GameTime, CarAhead.TrackSoundType, Car.Train.Name, CarOnCurve); + if ((_curTType == Car.TrackSoundType || stateChange) && Car.TrackSoundType != CarAhead.TrackSoundType) { Car.TrackSoundType = CarAhead.TrackSoundType; Car.TrackSoundLocation = new WorldLocation(CarAhead.TrackSoundLocation); Car.TrackSoundDistSquared = WorldLocation.GetDistanceSquared(Car.WorldPosition.WorldLocation, Car.TrackSoundLocation); -// Trace.TraceInformation("Time {4} TrainName {5} carNo {0} IsOnSwitch {1} IsOnCurve {6} TracksoundType {2} _CurTType {3} to standard", -// Car.Train.Cars.IndexOf(Car), CarOnSwitch, Car.TrackSoundType, _curTType, Viewer.Simulator.GameTime, Car.Train.Name, CarOnCurve); + // Trace.TraceInformation("Time {4} TrainName {5} carNo {0} IsOnSwitch {1} IsOnCurve {6} TracksoundType {2} _CurTType {3} to standard", + // Car.Train.Cars.IndexOf(Car), CarOnSwitch, Car.TrackSoundType, _curTType, Viewer.Simulator.GameTime, Car.Train.Name, CarOnCurve); if (stateChange) { _curTType = Car.TrackSoundType; @@ -285,8 +285,8 @@ public void UpdateTType(bool stateChange) Car.TrackSoundDistSquared = trackSoundDistSquared; else { -// if (_curTType != Car.TrackSoundType) Trace.TraceInformation("Time {4} TrainName {5} carNo {0} IsOnSwitch {1} IsOnCurve {6} TracksoundType {2} _CurTType {3} standard", -// Car.Train.Cars.IndexOf(Car), CarOnSwitch, Car.TrackSoundType, _curTType, Viewer.Simulator.GameTime, Car.Train.Name, CarOnCurve); + // if (_curTType != Car.TrackSoundType) Trace.TraceInformation("Time {4} TrainName {5} carNo {0} IsOnSwitch {1} IsOnCurve {6} TracksoundType {2} _CurTType {3} standard", + // Car.Train.Cars.IndexOf(Car), CarOnSwitch, Car.TrackSoundType, _curTType, Viewer.Simulator.GameTime, Car.Train.Name, CarOnCurve); _curTType = Car.TrackSoundType; } } @@ -320,9 +320,9 @@ public void UpdateTType(bool stateChange) #if DEBUGSCR Trace.TraceInformation("Sound region changed from {0} to {1}.", _prevTType, _curTType); #endif -// if (!stateChange) Trace.TraceInformation("StandardChange Time {4} TrainName {5} carNo {0} IsOnSwitch {1} TracksoundType {2} _CurTType {3} _PrevTType {6}", -// Car.Train.Cars.IndexOf(Car), CarOnSwitch, Car.TrackSoundType, _curTType, Viewer.Simulator.GameTime, Car.Train.Name, _prevTType); -// Trace.TraceInformation("Train {0} Speed {1}, Car {2}: Sound Region {3} changed to {4} at distance {5}", Car.Train.Number, Car.Train.SpeedMpS, CarNo, _prevTType, _curTType, Math.Sqrt(trackSoundDistSquared)); + // if (!stateChange) Trace.TraceInformation("StandardChange Time {4} TrainName {5} carNo {0} IsOnSwitch {1} TracksoundType {2} _CurTType {3} _PrevTType {6}", + // Car.Train.Cars.IndexOf(Car), CarOnSwitch, Car.TrackSoundType, _curTType, Viewer.Simulator.GameTime, Car.Train.Name, _prevTType); + // Trace.TraceInformation("Train {0} Speed {1}, Car {2}: Sound Region {3} changed to {4} at distance {5}", Car.Train.Number, Car.Train.SpeedMpS, CarNo, _prevTType, _curTType, Math.Sqrt(trackSoundDistSquared)); if (CarNo == CarLeading) Car.TrackSoundLocation = new WorldLocation(Car.WorldPosition.WorldLocation); _prevTType = _curTType; @@ -334,12 +334,12 @@ public override bool Update() { bool stateChange = false; if (SharedSMSFileManager.AutoTrackSound) stateChange = UpdateCarOnSwitchAndCurve(); -// if (stateChange) Trace.TraceInformation("Time {4} TrainName {5} carNo {0} IsOnSwitch {1} IsOnCurve {6} TracksoundType {2} _CurTType {3} Radius {7} Before", -// Car.Train.Cars.IndexOf(Car), CarOnSwitch, Car.TrackSoundType, _curTType, Viewer.Simulator.GameTime, Car.Train.Name, CarOnCurve, Car.CurrentCurveRadius); + // if (stateChange) Trace.TraceInformation("Time {4} TrainName {5} carNo {0} IsOnSwitch {1} IsOnCurve {6} TracksoundType {2} _CurTType {3} Radius {7} Before", + // Car.Train.Cars.IndexOf(Car), CarOnSwitch, Car.TrackSoundType, _curTType, Viewer.Simulator.GameTime, Car.Train.Name, CarOnCurve, Car.CurrentCurveRadius); if ((!CarOnSwitch && !CarOnCurve) || !SharedSMSFileManager.AutoTrackSound) UpdateTType(stateChange); -// if (stateChange) Trace.TraceInformation("Time {4} TrainName {5} carNo {0} IsOnSwitch {1} IsOnCurve {6} TracksoundType {2} _CurTType {3} Radius {7} After", -// Car.Train.Cars.IndexOf(Car), CarOnSwitch, Car.TrackSoundType, _curTType, Viewer.Simulator.GameTime, Car.Train.Name, CarOnCurve, Car.CurrentCurveRadius); + // if (stateChange) Trace.TraceInformation("Time {4} TrainName {5} carNo {0} IsOnSwitch {1} IsOnCurve {6} TracksoundType {2} _CurTType {3} Radius {7} After", + // Car.Train.Cars.IndexOf(Car), CarOnSwitch, Car.TrackSoundType, _curTType, Viewer.Simulator.GameTime, Car.Train.Name, CarOnCurve, Car.CurrentCurveRadius); bool retval = true; NeedsFrequentUpdate = false; @@ -431,7 +431,7 @@ public bool UpdateCarOnSwitchAndCurve() // resume results and select sound if change if (carPreviouslyOnSwitch ^ CarOnSwitch || carPreviouslyOnCurve ^ CarOnCurve) - { + { stateChange = true; } if (stateChange && (CarOnSwitch || CarOnCurve)) @@ -498,7 +498,7 @@ public static WorldLocation UidLocation(UiD uid) } - + /// /// Represents an sms file /// @@ -515,7 +515,7 @@ private int CutOffDistanceM2 { const int staticDistanceM2 = 4000000; var isPlayer = Car?.Train?.IsActualPlayerTrain ?? false; - var correctedLength = isPlayer ? Car.Train.Length + 50 : 0; + var correctedLength = isPlayer ? Car.Train.Length + 50 : 0; return (int)Math.Max(staticDistanceM2, correctedLength * correctedLength); } } @@ -598,7 +598,7 @@ public SoundSource(Viewer viewer, WorldLocation worldLocation, Events.Source eve /// /// /// - public SoundSource(Viewer viewer, MSTSWagon car, string wavFilePath, ORTSActSoundFileTypes ORTSActSoundFileType, bool preCompiled) + public SoundSource(Viewer viewer, MSTSWagon car, string wavFilePath, ORTSActSoundFileTypes ORTSActSoundFileType, bool preCompiled) { Car = car; Initialize(viewer, car.WorldPosition.WorldLocation, Events.Source.MSTSCar, wavFilePath, ORTSActSoundFileType, preCompiled); @@ -656,7 +656,7 @@ public override void Uninitialize() NeedsFrequentUpdate = false; } } - + /// /// Current location of the sound source /// @@ -721,7 +721,7 @@ public void Initialize(Viewer viewer, WorldLocation worldLocation, Events.Source // find correct ScalabiltyGroup int iSG = 0; - while ( iSG < smsFile.Tr_SMS.ScalabiltyGroups.Count) + while (iSG < smsFile.Tr_SMS.ScalabiltyGroups.Count) { if (smsFile.Tr_SMS.ScalabiltyGroups[iSG].DetailLevel <= Viewer.Settings.SoundDetailLevel) break; @@ -747,7 +747,7 @@ public void Initialize(Viewer viewer, WorldLocation worldLocation, Events.Source } } - /// + /// /// Set properties of this SoundSource with default precompiled parameters, and generate SoundStreams /// /// Current @@ -834,7 +834,7 @@ public void Initialize(Viewer viewer, WorldLocation worldLocation, Events.Source SetRolloffFactor(); // initialization of the only one sound stream - SoundStreams.Add(new SoundStream(WavFileName, eventSource, this)); + SoundStreams.Add(new SoundStream(WavFileName, eventSource, this)); } } @@ -945,7 +945,7 @@ public override void InitInitials() WasOutOfDistance = false; } } - + public override bool Update() { if (Car != null && !Car.IsPartOfActiveTrain) @@ -972,7 +972,7 @@ public override bool Update() Active = true; // restore any looping sounds - foreach(SoundStream stream in SoundStreams) + foreach (SoundStream stream in SoundStreams) stream.Activate(); } } @@ -1075,7 +1075,7 @@ public bool DeActivate() { if (DeactivationConditions == null) return false; - + if (ConditionsMet(DeactivationConditions)) return true; @@ -1159,10 +1159,10 @@ public override void Dispose() } } -///////////////////////////////////////////////////////// -// SOUND STREAM -///////////////////////////////////////////////////////// - + ///////////////////////////////////////////////////////// + // SOUND STREAM + ///////////////////////////////////////////////////////// + /// /// Owned by a , /// can play only one sound at a time, @@ -1274,17 +1274,17 @@ public SoundStream(Orts.Formats.Msts.SMSStream mstsStream, Events.Source eventSo ORTSDiscreteTrigger ortsTrigger = new ORTSDiscreteTrigger(this, eventSource, (Orts.Formats.Msts.Discrete_Trigger)trigger, settings); Triggers.Add(ortsTrigger); // list them here so we can enable and disable } - // unapplicable trigger type + // unapplicable trigger type else { Triggers.Add(new ORTSTrigger()); // null trigger if (SoundSource.SMSFileName != "ingame.sms") Trace.TraceWarning("Trigger type of trigger number {2} in stream number {1} in file {0} is not existent or not applicable", - SoundSource.SMSFileName, SoundSource.SoundStreams.Count, Triggers.Count-1); + SoundSource.SMSFileName, SoundSource.SoundStreams.Count, Triggers.Count - 1); } IsReleasedWithJump |= (Triggers.Last().SoundCommand is ORTSReleaseLoopReleaseWithJump); } // for each mstsStream.Trigger - VariableTriggers = (from t in Triggers + VariableTriggers = (from t in Triggers where t is ORTSVariableTrigger select t).ToList(); } @@ -1338,7 +1338,7 @@ public void Update() foreach (ORTSTrigger trigger in Triggers) trigger.TryTrigger(); - + if (_InitialTrigger != null) { // If no triggers active, Initialize the Initial @@ -1347,8 +1347,8 @@ public void Update() if (VariableTriggers.Count > 0 || Triggers.Count == 1) { TriggersList = from ORTSVariableTrigger t in VariableTriggers - where t.IsBellow - select t as ORTSTrigger; + where t.IsBellow + select t as ORTSTrigger; if (TriggersList.Count() == VariableTriggers.Count && _InitialTrigger.SoundCommand is ORTSSoundPlayCommand && !(_InitialTrigger.SoundCommand is ORTSPlayOneShot && _InitialTrigger.Signaled)) { @@ -1360,9 +1360,9 @@ where t.IsBellow else { TriggersList = from t in Triggers - where t.Signaled && - (t.SoundCommand is ORTSStartLoop || t.SoundCommand is ORTSStartLoopRelease) - select t; + where t.Signaled && + (t.SoundCommand is ORTSStartLoop || t.SoundCommand is ORTSStartLoopRelease) + select t; if (TriggersList.Count() > 1 && _InitialTrigger.Signaled) _InitialTrigger.Signaled = false; } @@ -1382,7 +1382,7 @@ private void SetFreqAndVolume() if (ALSoundSource == null) return; - if (MSTSStream != null && MSTSStream.FrequencyCurve != null) + if (MSTSStream != null && MSTSStream.FrequencyCurve != null) { if (SoundSource.Car != null || SoundSource.Viewer.Camera.AttachedCar != null) { @@ -1565,9 +1565,9 @@ private void Sweep() } // class ORTSStream -///////////////////////////////////////////////////////// -// SOUND TRIGGERS -///////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////// + // SOUND TRIGGERS + ///////////////////////////////////////////////////////// /// /// Trigger is defined in the SMS file as members of a SoundStream. @@ -1603,7 +1603,7 @@ public class ORTSTrigger /// /// Play this sound when a discrete TrainCar event occurs in the simulator /// - public class ORTSDiscreteTrigger: ORTSTrigger, Orts.Common.EventHandler + public class ORTSDiscreteTrigger : ORTSTrigger, Orts.Common.EventHandler { /// /// Event this trigger listens to @@ -1713,7 +1713,7 @@ public ORTSDistanceTravelledTrigger(SoundStream soundStream, Orts.Formats.Msts.D SoundStream = soundStream; car = soundStream.SoundSource.Car; SMS = smsData; - SoundCommand = ORTSSoundCommand.FromMSTS(SMS.SoundCommand, soundStream ); + SoundCommand = ORTSSoundCommand.FromMSTS(SMS.SoundCommand, soundStream); Initialize(); } @@ -1767,7 +1767,7 @@ private void UpdateTriggerDistance() /// /// Play this sound immediately when this SoundSource becomes active, or in case no other VariableTriggers are active /// - public class ORTSInitialTrigger: ORTSTrigger + public class ORTSInitialTrigger : ORTSTrigger { private SoundStream SoundStream; @@ -1821,7 +1821,7 @@ public ORTSRandomTrigger(SoundStream soundStream, Orts.Formats.Msts.Random_Trigg Initialize(); } - public override void Initialize() + public override void Initialize() { UpdateTriggerAtSeconds(); } @@ -1879,7 +1879,7 @@ public ORTSVariableTrigger(SoundStream soundStream, Orts.Formats.Msts.Variable_T Initialize(); } - public override void Initialize() + public override void Initialize() { StartValue = SMS.Event == Orts.Formats.Msts.Variable_Trigger.Events.Distance_Dec_Past ? float.MaxValue : 0; @@ -1893,7 +1893,7 @@ public override void Initialize() IsBellow = StartValue < SMS.Threshold; } - public override void TryTrigger( ) + public override void TryTrigger() { float newValue = ReadValue(); bool triggered = false; @@ -2004,10 +2004,10 @@ private float ReadValue() } // class VariableTrigger -///////////////////////////////////////////////////////// -// SOUND COMMANDS -///////////////////////////////////////////////////////// - + ///////////////////////////////////////////////////////// + // SOUND COMMANDS + ///////////////////////////////////////////////////////// + /// /// Start playing the whole sound stream once, then stop @@ -2033,18 +2033,18 @@ public override void Run() ORTSStream.ALSoundSource.Queue(p, PlayMode.OneShot, ORTSStream.SoundSource.IsExternal, ORTSStream.RepeatedTrigger); } } - } + } /// /// Start looping the whole stream, release it only at the end /// public class ORTSStartLoop : ORTSSoundPlayCommand { - public ORTSStartLoop( SoundStream ortsStream, Orts.Formats.Msts.SoundPlayCommand mstsSoundPlayCommand ) - : base( ortsStream, mstsSoundPlayCommand ) + public ORTSStartLoop(SoundStream ortsStream, Orts.Formats.Msts.SoundPlayCommand mstsSoundPlayCommand) + : base(ortsStream, mstsSoundPlayCommand) { } - public override void Run( ) + public override void Run() { // Support for Loop functions - by GeorgeS string p = GetNextFile(); @@ -2054,7 +2054,7 @@ public override void Run( ) ORTSStream.ALSoundSource.Queue(p, PlayMode.Loop, ORTSStream.SoundSource.IsExternal, false); } } - } + } /// /// Release the sound by playing the looped sustain part till its end, then play the last part @@ -2065,7 +2065,7 @@ public ORTSReleaseLoopRelease(SoundStream ortsStream) : base(ortsStream) { } - + public override void Run() { if (ORTSStream != null && ORTSStream.ALSoundSource != null) @@ -2119,7 +2119,7 @@ public class ORTSDisableTrigger : ORTSSoundCommand { int TriggerIndex; // index into the stream's trigger list - public ORTSDisableTrigger(SoundStream ortsStream, Orts.Formats.Msts.DisableTrigger smsData ) + public ORTSDisableTrigger(SoundStream ortsStream, Orts.Formats.Msts.DisableTrigger smsData) : base(ortsStream) { TriggerIndex = smsData.TriggerID - 1; @@ -2147,7 +2147,7 @@ public ORTSEnableTrigger(SoundStream ortsStream, Orts.Formats.Msts.DisableTrigge public override void Run() { - if ( TriggerIndex >= 0 && TriggerIndex < ORTSStream.Triggers.Count) + if (TriggerIndex >= 0 && TriggerIndex < ORTSStream.Triggers.Count) ORTSStream.Triggers[TriggerIndex].Enabled = true; } } @@ -2263,7 +2263,7 @@ public static ORTSSoundCommand FromMSTS(Orts.Formats.Msts.SoundCommand mstsSound /// public static ORTSSoundCommand Precompiled(string wavFileName, SoundStream soundStream) { - return new ORTSPlayOneShot(soundStream, wavFileName); + return new ORTSPlayOneShot(soundStream, wavFileName); } }// ORTSSoundCommand @@ -2324,8 +2324,8 @@ protected string GetNextFile() //SMSFolder is often same as BasePath, which means this searches the more general folder // before the more specific folder. This is surely not intended. - string[] pathArray = {ORTSStream.SoundSource.SMSFolder, - Program.Simulator.RoutePath + @"\SOUND", + string[] pathArray = {ORTSStream.SoundSource.SMSFolder, + Program.Simulator.RoutePath + @"\SOUND", Program.Simulator.BasePath + @"\SOUND"}; var fullPath = ORTSPaths.GetFileFromFolders(pathArray, Files[iFile]); return (fullPath != null) ? fullPath : ""; @@ -2432,7 +2432,7 @@ public int GetTType(Train train, out float outPrevDist, out float outNextDist) // Try to find forward d = tmp.DistanceTo(trItems[trNode].TileX, trItems[trNode].TileZ, trItems[trNode].X, trItems[trNode].Y, trItems[trNode].Z, 8192); - + if (d != -1) { // This is nearer than previous one @@ -2536,8 +2536,8 @@ public void AddByTile(int TileX, int TileZ) WorldSoundFile wf = new WorldSoundFile(name, Viewer.Simulator.TDB.TrackDB.TrItemTable); if (wf.TR_WorldSoundFile != null) { - string[] pathArray = {Viewer.Simulator.RoutePath, Viewer.Simulator.BasePath}; - + string[] pathArray = { Viewer.Simulator.RoutePath, Viewer.Simulator.BasePath }; + var ls = new List(); foreach (var fss in wf.TR_WorldSoundFile.SoundSources) { @@ -2703,15 +2703,15 @@ private TrItem FindItem(Traveller traveller, Func mov } public class ORTSActSoundSources { - public ORTSActSoundSources( ) + public ORTSActSoundSources() { } public void Update() { - if (Program.Simulator.ActivityRun == null || Program.Simulator.ActivityRun.triggeredEventWrapper == null || + if (Program.Simulator.ActivityRun == null || Program.Simulator.ActivityRun.triggeredEventWrapper == null || (Program.Simulator.ActivityRun.triggeredEventWrapper.ParsedObject.ORTSActSoundFile == null && (Program.Simulator.ActivityRun.triggeredEventWrapper.ParsedObject.Outcomes == null - || Program.Simulator.ActivityRun.triggeredEventWrapper.ParsedObject.Outcomes.ActivitySound == null))) + || Program.Simulator.ActivityRun.triggeredEventWrapper.ParsedObject.Outcomes.ActivitySound == null))) return; var localEventID = Program.Simulator.ActivityRun.triggeredEventWrapper.ParsedObject.ID; string ORTSActSoundFile; @@ -2824,6 +2824,6 @@ public void Update() } return; } - } + } } diff --git a/Source/RunActivity/Viewer3D/SuperElevation.cs b/Source/RunActivity/Viewer3D/SuperElevation.cs index 01e61b466b..275b76ddcd 100644 --- a/Source/RunActivity/Viewer3D/SuperElevation.cs +++ b/Source/RunActivity/Viewer3D/SuperElevation.cs @@ -17,14 +17,14 @@ // This file is the responsibility of the 3D & Environment Team. +using System; +using System.Collections.Generic; +using System.Diagnostics; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Orts.Formats.Msts; using Orts.Simulation; using ORTS.Common; -using System; -using System.Collections.Generic; -using System.Diagnostics; namespace Orts.Viewer3D { diff --git a/Source/RunActivity/Viewer3D/Terrain.cs b/Source/RunActivity/Viewer3D/Terrain.cs index c895096049..9d4e010174 100644 --- a/Source/RunActivity/Viewer3D/Terrain.cs +++ b/Source/RunActivity/Viewer3D/Terrain.cs @@ -19,15 +19,15 @@ //#define SUPERSMOOTHNORMALS +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Orts.Formats.Msts; using Orts.Viewer3D.Common; using ORTS.Common; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; namespace Orts.Viewer3D { @@ -235,7 +235,7 @@ public TerrainPrimitive(Viewer viewer, TileManager tileManager, Tile tile, int x var uv = Tile.Shaders[Patch.ShaderIndex].terrain_uvcalcs; if (ts.Length > 1) PatchMaterial = viewer.MaterialManager.Load(terrainMaterial, Helpers.GetTerrainTextureFile(viewer.Simulator, ts[0].Filename) + "\0" + Helpers.GetTerrainTextureFile(viewer.Simulator, ts[1].Filename) + - (uv[1].D != 0 && uv[1].D != 32 ? "\0" + uv[1].D.ToString(): "")); + (uv[1].D != 0 && uv[1].D != 32 ? "\0" + uv[1].D.ToString() : "")); else PatchMaterial = viewer.MaterialManager.Load(terrainMaterial, Helpers.GetTerrainTextureFile(viewer.Simulator, ts[0].Filename) + "\0" + Helpers.GetTerrainTextureFile(viewer.Simulator, "microtex.ace")); @@ -510,7 +510,7 @@ public TerrainMaterial(Viewer viewer, string terrainTexture, Texture2D defaultTe PatchTexture = Viewer.TextureManager.Get(textures[0], defaultTexture); PatchTextureOverlay = textures.Length > 1 ? Viewer.TextureManager.Get(textures[1]) : null; var converted = textures.Length > 2 && float.TryParse(textures[2], out OverlayScale); - OverlayScale = OverlayScale != 0 && converted ? OverlayScale : 32; + OverlayScale = OverlayScale != 0 && converted ? OverlayScale : 32; } diff --git a/Source/RunActivity/Viewer3D/Tiles.cs b/Source/RunActivity/Viewer3D/Tiles.cs index 3309a961dc..5df8bb0146 100644 --- a/Source/RunActivity/Viewer3D/Tiles.cs +++ b/Source/RunActivity/Viewer3D/Tiles.cs @@ -17,15 +17,15 @@ // This file is the responsibility of the 3D & Environment Team. -using Microsoft.Xna.Framework; -using Orts.Formats.Msts; -using ORTS.Common; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Threading; +using Microsoft.Xna.Framework; +using Orts.Formats.Msts; +using ORTS.Common; namespace Orts.Viewer3D { diff --git a/Source/RunActivity/Viewer3D/Trains.cs b/Source/RunActivity/Viewer3D/Trains.cs index c9583b9202..fd16abc750 100644 --- a/Source/RunActivity/Viewer3D/Trains.cs +++ b/Source/RunActivity/Viewer3D/Trains.cs @@ -17,15 +17,15 @@ // This file is the responsibility of the 3D & Environment Team. -using Orts.Simulation; -using Orts.Simulation.RollingStocks; -using Orts.Viewer3D.RollingStock; -using ORTS.Common; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; +using Orts.Simulation; +using Orts.Simulation.RollingStocks; +using Orts.Viewer3D.RollingStock; +using ORTS.Common; namespace Orts.Viewer3D { @@ -67,27 +67,27 @@ public void Load() if (cancellation.IsCancellationRequested) break; try - { - if (cars.ContainsKey(car)) - newCars.Add(car, cars[car]); - else - newCars.Add(car, LoadCar(car)); - } - catch (Exception error) + { + if (cars.ContainsKey(car)) + newCars.Add(car, cars[car]); + else + newCars.Add(car, LoadCar(car)); + } + catch (Exception error) { Trace.WriteLine(new FileLoadException(car.WagFilePath, error)); } } Cars = newCars; - //for those cars not visible now, will unload them (to remove attached sound) - foreach (var car in cars) - { - if (!visibleCars.Contains(car.Key)) - { - car.Value.Unload(); - } - } - } + //for those cars not visible now, will unload them (to remove attached sound) + foreach (var car in cars) + { + if (!visibleCars.Contains(car.Key)) + { + car.Value.Unload(); + } + } + } // Ensure the player locomotive has a cab view loaded and anything else they need. cars = Cars; diff --git a/Source/RunActivity/Viewer3D/Transfers.cs b/Source/RunActivity/Viewer3D/Transfers.cs index f0a8e330ab..a894726b87 100644 --- a/Source/RunActivity/Viewer3D/Transfers.cs +++ b/Source/RunActivity/Viewer3D/Transfers.cs @@ -17,13 +17,13 @@ // This file is the responsibility of the 3D & Environment Team. +using System; +using System.Collections.Generic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Orts.Formats.Msts; using Orts.Viewer3D.Common; using ORTS.Common; -using System; -using System.Collections.Generic; namespace Orts.Viewer3D { @@ -154,7 +154,8 @@ public TransferMaterial(Viewer viewer, string textureName) : base(viewer, textureName) { Texture = Viewer.TextureManager.Get(textureName, true); - TransferSamplerState = new SamplerState { + TransferSamplerState = new SamplerState + { AddressU = TextureAddressMode.Clamp, AddressV = TextureAddressMode.Clamp, Filter = TextureFilter.Anisotropic, diff --git a/Source/RunActivity/Viewer3D/UserInput.cs b/Source/RunActivity/Viewer3D/UserInput.cs index b8a4819185..af64866906 100644 --- a/Source/RunActivity/Viewer3D/UserInput.cs +++ b/Source/RunActivity/Viewer3D/UserInput.cs @@ -173,10 +173,10 @@ public static bool IsDown(UserCommand command) public static bool IsMouseMoved { get { return MouseState.X != LastMouseState.X || MouseState.Y != LastMouseState.Y; } } public static int MouseMoveX { get { return MouseState.X - LastMouseState.X; } } public static int MouseMoveY { get { return MouseState.Y - LastMouseState.Y; } } - public static bool MouseMovedUp { get { return MouseState.Y < LastMouseState.Y; } } - public static bool MouseMovedDown { get { return MouseState.Y > LastMouseState.Y; } } - public static bool MouseMovedLeft { get { return MouseState.X < LastMouseState.X; } } - public static bool MouseMovedRight { get { return MouseState.X > LastMouseState.X; } } + public static bool MouseMovedUp { get { return MouseState.Y < LastMouseState.Y; } } + public static bool MouseMovedDown { get { return MouseState.Y > LastMouseState.Y; } } + public static bool MouseMovedLeft { get { return MouseState.X < LastMouseState.X; } } + public static bool MouseMovedRight { get { return MouseState.X > LastMouseState.X; } } public static int MouseX { get { return MouseState.X; } } public static int MouseY { get { return MouseState.Y; } } diff --git a/Source/RunActivity/Viewer3D/UserInputExternal.cs b/Source/RunActivity/Viewer3D/UserInputExternal.cs index 2dc517c02f..d0945a247f 100644 --- a/Source/RunActivity/Viewer3D/UserInputExternal.cs +++ b/Source/RunActivity/Viewer3D/UserInputExternal.cs @@ -15,11 +15,8 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; using System.Collections.Generic; using Orts.Formats.Msts; -using Orts.Simulation.RollingStocks; -using ORTS.Common; using ORTS.Common.Input; namespace Orts.Viewer3D @@ -29,12 +26,12 @@ namespace Orts.Viewer3D /// public class ExternalDeviceState { - public Dictionary<(CabViewControlType,int), ExternalDeviceCabControl> CabControls; + public Dictionary<(CabViewControlType, int), ExternalDeviceCabControl> CabControls; public Dictionary Commands; public ExternalDeviceState() { Commands = new Dictionary(); - CabControls = new Dictionary<(CabViewControlType,int), ExternalDeviceCabControl>(); + CabControls = new Dictionary<(CabViewControlType, int), ExternalDeviceCabControl>(); } public virtual void Handled() @@ -50,19 +47,19 @@ public virtual void Handled() } public bool IsPressed(UserCommand command) - { + { return Commands.TryGetValue(command, out var button) && button.IsPressed; - } + } - public bool IsReleased(UserCommand command) - { + public bool IsReleased(UserCommand command) + { return Commands.TryGetValue(command, out var button) && button.IsReleased; - } + } - public bool IsDown(UserCommand command) - { + public bool IsDown(UserCommand command) + { return Commands.TryGetValue(command, out var button) && button.IsDown; - } + } } public class ExternalDeviceButton { diff --git a/Source/RunActivity/Viewer3D/UserInputRailDriver.cs b/Source/RunActivity/Viewer3D/UserInputRailDriver.cs index 897e37f937..5521397aaa 100644 --- a/Source/RunActivity/Viewer3D/UserInputRailDriver.cs +++ b/Source/RunActivity/Viewer3D/UserInputRailDriver.cs @@ -105,12 +105,12 @@ public void HandleHidData(byte[] data, PIEDevice sourceDevice, int error) return; State.SaveButtonData(); - State.Direction.Value = Percentage(data[1], FullReversed, Neutral, FullForward) / 100;; + State.Direction.Value = Percentage(data[1], FullReversed, Neutral, FullForward) / 100; ; State.Throttle.Value = Percentage(data[2], ThrottleIdle, FullThrottle) / 100; - State.DynamicBrake.Value = Percentage(data[2], ThrottleIdle, DynamicBrakeSetup, DynamicBrake) / 100;; - State.TrainBrake.Value = Percentage(data[3], AutoBrakeRelease, FullAutoBrake) / 100;; - State.EngineBrake.Value = Percentage(data[4], IndependentBrakeRelease, IndependentBrakeFull) / 100;; - + State.DynamicBrake.Value = Percentage(data[2], ThrottleIdle, DynamicBrakeSetup, DynamicBrake) / 100; ; + State.TrainBrake.Value = Percentage(data[3], AutoBrakeRelease, FullAutoBrake) / 100; ; + State.EngineBrake.Value = Percentage(data[4], IndependentBrakeRelease, IndependentBrakeFull) / 100; ; + float a = State.EngineBrake.Value; float calOff = (1 - a) * BailOffDisengagedRelease + a * BailOffDisengagedFull; float calOn = (1 - a) * BailOffEngagedRelease + a * BailOffEngagedFull; @@ -138,7 +138,7 @@ public void HandleHidData(byte[] data, PIEDevice sourceDevice, int error) } State.Activation.Changed = false; } - + /// /// Error callback /// @@ -151,14 +151,14 @@ public void HandleHidError(PIEDevice sourceDevice, int error) static float Percentage(float x, float x0, float x100) { - float p= 100 * (x - x0) / (x100 - x0); + float p = 100 * (x - x0) / (x100 - x0); if (p < 5) return 0; if (p > 95) return 100; return p; } - + static float Percentage(float x, float xminus100, float x0, float xplus100) { float p = 100 * (x - x0) / (xplus100 - x0); @@ -202,7 +202,7 @@ void EnableSpeaker(bool on) for (int i = 0; i < WriteBuffer.Length; i++) WriteBuffer[i] = 0; WriteBuffer[1] = 133; - WriteBuffer[7] = (byte) (on ? 1 : 0); + WriteBuffer[7] = (byte)(on ? 1 : 0); Device.WriteData(WriteBuffer); } @@ -221,7 +221,7 @@ public void Update(TrainCar playerLoco) if (!Active || playerLoco == null || Device == null) return; float speed = 10 * MpS.FromMpS(playerLoco.SpeedMpS, playerLoco.IsMetric); - int s = (int) (speed >= 0 ? speed + .5 : -speed + .5); + int s = (int)(speed >= 0 ? speed + .5 : -speed + .5); if (s != LEDSpeed) { if (s < 100) @@ -259,7 +259,7 @@ void ReadCalibrationData(string basePath) return; } } - // TODO: This is... kinda weird and cool at the same time. STF parsing being used on RailDriver's calebration file. Probably should be a dedicated parser, though. + // TODO: This is... kinda weird and cool at the same time. STF parsing being used on RailDriver's calebration file. Probably should be a dedicated parser, though. STFReader reader = new STFReader(file, false); while (!reader.Eof) { @@ -267,8 +267,8 @@ void ReadCalibrationData(string basePath) if (token == "Position") { string name = reader.ReadItem(); - int min= -1; - int max= -1; + int min = -1; + int max = -1; while (token != "}") { token = reader.ReadItem(); @@ -433,7 +433,7 @@ public void AddButtonData(byte[] data) public override string ToString() { - string s= String.Format("{0} {1} {2} {3} {4}", Direction, Throttle, DynamicBrake, TrainBrake, EngineBrake); + string s = String.Format("{0} {1} {2} {3} {4}", Direction, Throttle, DynamicBrake, TrainBrake, EngineBrake); for (int i = 0; i < 6; i++) s += " " + ButtonData[i]; return s; diff --git a/Source/RunActivity/Viewer3D/Viewer.cs b/Source/RunActivity/Viewer3D/Viewer.cs index a800bf689d..f439303478 100644 --- a/Source/RunActivity/Viewer3D/Viewer.cs +++ b/Source/RunActivity/Viewer3D/Viewer.cs @@ -41,7 +41,6 @@ using Orts.Viewer3D.RollingStock; using ORTS.Common; using ORTS.Common.Input; -using ORTS.Scripting.Api; using ORTS.Settings; using Event = Orts.Common.Event; @@ -228,17 +227,17 @@ public bool IsBeforeNoon } public bool IsDaytime // After dawn and before dusk, so definitely daytime - { + { get { return (MaterialManager.sunDirection.Y > 0.05f && IsBeforeNoon) || (MaterialManager.sunDirection.Y > 0.15f && !IsBeforeNoon); - } + } } public bool IsNighttime // Before dawn and after dusk, so definitely nighttime { - get - { + get + { return (MaterialManager.sunDirection.Y < -0.05f && !IsBeforeNoon) || (MaterialManager.sunDirection.Y < -0.15f && IsBeforeNoon); } @@ -689,7 +688,7 @@ public float ComputeCabTextureInverseRatio(string cabTextureFileName) { cabTextureInverseRatio = (float)cabTexture.Height / cabTexture.Width; // if square cab texture files with dimension of at least 1024 pixels are used, they are considered as stretched 4 : 3 ones - if (cabTextureInverseRatio == 1 && cabTexture.Width >= 1024) cabTextureInverseRatio = 0.75f; + if (cabTextureInverseRatio == 1 && cabTexture.Width >= 1024) cabTextureInverseRatio = 0.75f; } return cabTextureInverseRatio; } @@ -909,7 +908,7 @@ void HandleUserInput(ElapsedTime elapsedTime) if (ComposeMessageWindow == null) ComposeMessageWindow = new ComposeMessage(WindowManager); ComposeMessageWindow.InitMessage(); } - if ((MPManager.IsMultiPlayer() || (Settings.MultiplayerClient && MPManager.Simulator.Confirmer != null)) && UserInput.IsPressed(UserCommand.DisplayMultiPlayerWindow)){ MultiPlayerWindow.Visible = !MultiPlayerWindow.Visible; } + if ((MPManager.IsMultiPlayer() || (Settings.MultiplayerClient && MPManager.Simulator.Confirmer != null)) && UserInput.IsPressed(UserCommand.DisplayMultiPlayerWindow)) { MultiPlayerWindow.Visible = !MultiPlayerWindow.Visible; } if (!MPManager.IsMultiPlayer() && UserInput.IsPressed(UserCommand.GamePauseMenu)) { QuitWindow.Visible = Simulator.Paused = !QuitWindow.Visible; } if (MPManager.IsMultiPlayer() && UserInput.IsPressed(UserCommand.GamePauseMenu)) { if (Simulator.Confirmer != null) Simulator.Confirmer.Information(Viewer.Catalog.GetString("In MP, use Alt-F4 to quit directly")); } @@ -983,7 +982,7 @@ void HandleUserInput(ElapsedTime elapsedTime) } if (UserInput.IsPressed(UserCommand.DisplaySwitchWindow)) if (UserInput.IsDown(UserCommand.DisplayNextWindowTab)) SwitchWindow.TabAction(); else SwitchWindow.Visible = !SwitchWindow.Visible; if (UserInput.IsPressed(UserCommand.DisplayTrainOperationsWindow)) if (UserInput.IsDown(UserCommand.DisplayNextWindowTab)) TrainOperationsWindow.TabAction(); else { TrainOperationsWindow.Visible = !TrainOperationsWindow.Visible; if (!TrainOperationsWindow.Visible) CarOperationsWindow.Visible = false; } - if (UserInput.IsPressed(UserCommand.DisplayTrainDpuWindow)) if (UserInput.IsDown(UserCommand.DisplayNextWindowTab)) TrainDpuWindow.Visible = !TrainDpuWindow.Visible ; else TrainDpuWindow.TabAction(); + if (UserInput.IsPressed(UserCommand.DisplayTrainDpuWindow)) if (UserInput.IsDown(UserCommand.DisplayNextWindowTab)) TrainDpuWindow.Visible = !TrainDpuWindow.Visible; else TrainDpuWindow.TabAction(); if (UserInput.IsPressed(UserCommand.DisplayNextStationWindow)) if (UserInput.IsDown(UserCommand.DisplayNextWindowTab)) NextStationWindow.TabAction(); else NextStationWindow.Visible = !NextStationWindow.Visible; if (UserInput.IsPressed(UserCommand.DisplayCompassWindow)) if (UserInput.IsDown(UserCommand.DisplayNextWindowTab)) CompassWindow.TabAction(); else CompassWindow.Visible = !CompassWindow.Visible; if (UserInput.IsPressed(UserCommand.DebugTracks)) if (UserInput.IsDown(UserCommand.DisplayNextWindowTab)) TracksDebugWindow.TabAction(); else TracksDebugWindow.Visible = !TracksDebugWindow.Visible; @@ -1072,7 +1071,7 @@ void HandleUserInput(ElapsedTime elapsedTime) " " + Catalog.GetString("messages suppressed")); } - else + else { Simulator.Confirmer.Message(ConfirmLevel.Warning, Catalog.GetString("All messages visible")); } @@ -1225,7 +1224,7 @@ void HandleUserInput(ElapsedTime elapsedTime) { var success = ((AITrain)PlayerLocomotive.Train).SwitchToPlayerControl(); if (success) - { + { Simulator.Confirmer.Message(ConfirmLevel.Information, Viewer.Catalog.GetString("Switched to player control")); DbfEvalAutoPilot = false;//Debrief eval } @@ -1247,8 +1246,8 @@ void HandleUserInput(ElapsedTime elapsedTime) } } - if (DbfEvalAutoPilot && (Simulator.ClockTime - DbfEvalIniAutoPilotTimeS) > 1.0000 ) - { + if (DbfEvalAutoPilot && (Simulator.ClockTime - DbfEvalIniAutoPilotTimeS) > 1.0000) + { DbfEvalAutoPilotTimeS = DbfEvalAutoPilotTimeS + (Simulator.ClockTime - DbfEvalIniAutoPilotTimeS);//Debrief eval train.DbfEvalValueChanged = true; DbfEvalIniAutoPilotTimeS = Simulator.ClockTime;//Debrief eval @@ -1392,7 +1391,7 @@ void HandleUserInput(ElapsedTime elapsedTime) // explore 2D cabview controls - if (Camera is CabCamera && (PlayerLocomotiveViewer as MSTSLocomotiveViewer)._hasCabRenderer && MouseChangingControl == null && + if (Camera is CabCamera && (PlayerLocomotiveViewer as MSTSLocomotiveViewer)._hasCabRenderer && MouseChangingControl == null && RenderProcess.IsMouseVisible) { var cabRenderer = (PlayerLocomotiveViewer as MSTSLocomotiveViewer)._CabRenderer; @@ -1617,7 +1616,7 @@ static bool IsReverserInNeutral(TrainCar car) // Diesel and electric locos have a Reverser lever and, // in the neutral position, direction == N return car.Direction == Direction.N - // Steam locos never have direction == N, so check for setting close to zero. + // Steam locos never have direction == N, so check for setting close to zero. || Math.Abs(car.Train.MUReverserPercent) <= 1; } /// diff --git a/Source/RunActivity/Viewer3D/Water.cs b/Source/RunActivity/Viewer3D/Water.cs index d19eeacd39..ed1e392048 100644 --- a/Source/RunActivity/Viewer3D/Water.cs +++ b/Source/RunActivity/Viewer3D/Water.cs @@ -17,13 +17,13 @@ // This file is the responsibility of the 3D & Environment Team. +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Orts.Common; using ORTS.Common; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; namespace Orts.Viewer3D { @@ -49,8 +49,8 @@ public WaterPrimitive(Viewer viewer, Tile tile) Size = tile.Size; if (Viewer.ENVFile.WaterLayers != null) - WaterLayers = Viewer.ENVFile.WaterLayers.Select(layer => new KeyValuePair(layer.Height, Viewer.MaterialManager.Load("Water", Viewer.Simulator.RoutePath + @"\envfiles\textures\" + layer.TextureName))).ToArray(); - + WaterLayers = Viewer.ENVFile.WaterLayers.Select(layer => new KeyValuePair(layer.Height, Viewer.MaterialManager.Load("Water", Viewer.Simulator.RoutePath + @"\envfiles\textures\" + layer.TextureName))).ToArray(); + LoadGeometry(Viewer.GraphicsDevice, tile, out PrimitiveCount, out IndexBuffer, out VertexBuffer); VertexBufferBindings = new[] { new VertexBufferBinding(VertexBuffer), new VertexBufferBinding(GetDummyVertexBuffer(viewer.GraphicsDevice)) }; @@ -92,7 +92,7 @@ void LoadGeometry(GraphicsDevice graphicsDevice, Tile tile, out int primitiveCou { for (var x = 0; x < tile.PatchCount; ++x) { - + var patch = tile.GetPatch(x, z); if (!patch.WaterEnabled) diff --git a/Source/RunActivity/Viewer3D/Weather.cs b/Source/RunActivity/Viewer3D/Weather.cs index f74273e204..20f8eb840f 100644 --- a/Source/RunActivity/Viewer3D/Weather.cs +++ b/Source/RunActivity/Viewer3D/Weather.cs @@ -25,7 +25,6 @@ using System.Diagnostics; using System.IO; using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; using Orts.Common; using Orts.Formats.Msts; using Orts.Formats.OR; @@ -107,7 +106,7 @@ public WeatherControl(Viewer viewer) UpdateSoundSources(); UpdateVolume(); // We have a pause in weather change, depending from randomization level - dynamicWeather.stableWeatherTimer = ( 4.0f - Viewer.Settings.ActWeatherRandomizationLevel) * 600 + Viewer.Random.Next(300) - 150; + dynamicWeather.stableWeatherTimer = (4.0f - Viewer.Settings.ActWeatherRandomizationLevel) * 600 + Viewer.Random.Next(300) - 150; weatherChangeOn = true; } @@ -155,7 +154,7 @@ public virtual void RestoreWeatherParameters(BinaryReader inf) { dynamicWeather = new DynamicWeather(); dynamicWeather.Restore(inf); - } + } UpdateVolume(); } @@ -264,7 +263,7 @@ private bool RandomizeInitialWeather() // First define overcast var randValue = Viewer.Random.Next(170); var intermValue = randValue >= 50 ? (float)(randValue - 50f) : (float)randValue; - Weather.OvercastFactor = intermValue >= 20 ? (float)(intermValue - 20f)/100f: (float)intermValue/100f; // give more probability to less overcast + Weather.OvercastFactor = intermValue >= 20 ? (float)(intermValue - 20f) / 100f : (float)intermValue / 100f; // give more probability to less overcast Viewer.Simulator.WeatherType = Orts.Formats.Msts.WeatherType.Clear; // Then check if we are in precipitation zone if (Weather.OvercastFactor > 0.5) @@ -289,9 +288,9 @@ private bool RandomizeInitialWeather() else Weather.PricipitationIntensityPPSPM2 = 0; // and now define visibility randValue = Viewer.Random.Next(2000); - if (Weather.PricipitationIntensityPPSPM2 > 0 || Weather.OvercastFactor > 0.7f ) - // use first digit to define power of ten and the other three to define the multiplying number - Weather.FogDistance = Math.Max ( 100, (float)Math.Pow(10 , ((int)(randValue / 1000) + 2)) * (float)((randValue % 1000 + 1) / 100f)); + if (Weather.PricipitationIntensityPPSPM2 > 0 || Weather.OvercastFactor > 0.7f) + // use first digit to define power of ten and the other three to define the multiplying number + Weather.FogDistance = Math.Max(100, (float)Math.Pow(10, ((int)(randValue / 1000) + 2)) * (float)((randValue % 1000 + 1) / 100f)); else Weather.FogDistance = Math.Max(500, (float)Math.Pow(10, (int)((randValue / 1000) + 3)) * (float)((randValue % 1000 + 1) / 100f)); return true; @@ -316,14 +315,14 @@ private void CheckDesertZone() // Compare player train lat/lon with array of desert zones for (int i = 0; i < DesertZones.Length / 4; i++) { - if (LatitudeDeg > DesertZones[i,0] && LatitudeDeg < DesertZones[i,1] && LongitudeDeg > DesertZones[i,2] && LongitudeDeg < DesertZones[i,3] + if (LatitudeDeg > DesertZones[i, 0] && LatitudeDeg < DesertZones[i, 1] && LongitudeDeg > DesertZones[i, 2] && LongitudeDeg < DesertZones[i, 3] && Viewer.PlayerLocomotive.Train.FrontTDBTraveller.Location.Y < 1000 || - LatitudeDeg > DesertZones[i, 0] + 1 && LatitudeDeg < DesertZones[i, 1] -1 && LongitudeDeg > DesertZones[i, 2] + 1 && LongitudeDeg < DesertZones[i, 3] -1) + LatitudeDeg > DesertZones[i, 0] + 1 && LatitudeDeg < DesertZones[i, 1] - 1 && LongitudeDeg > DesertZones[i, 2] + 1 && LongitudeDeg < DesertZones[i, 3] - 1) { DesertZone = true; return; } - } + } } [CallOnThread("Updater")] @@ -442,7 +441,7 @@ public virtual void Update(ElapsedTime elapsedTime) if (dynamicWeather != null) dynamicWeather.ORTSPrecipitationIntensity = -1; } if (UserInput.IsDown(UserCommand.DebugPrecipitationIncrease) || UserInput.IsDown(UserCommand.DebugPrecipitationDecrease)) UpdateVolume(); - + // Change in precipitation liquidity, passing from rain to snow and vice-versa if (UserInput.IsDown(UserCommand.DebugPrecipitationLiquidityIncrease)) { @@ -510,7 +509,7 @@ public virtual void Update(ElapsedTime elapsedTime) } if (Program.Simulator != null && Program.Simulator.ActivityRun != null && Program.Simulator.ActivityRun.triggeredEventWrapper != null && (Program.Simulator.ActivityRun.triggeredEventWrapper.ParsedObject.ORTSWeatherChange != null || Program.Simulator.ActivityRun.triggeredEventWrapper.ParsedObject.Outcomes.ORTSWeatherChange != null)) - // Start a weather change sequence in activity mode + // Start a weather change sequence in activity mode { // if not yet weather changes, create the instance if (dynamicWeather == null) @@ -519,10 +518,10 @@ public virtual void Update(ElapsedTime elapsedTime) } var weatherChange = Program.Simulator.ActivityRun.triggeredEventWrapper.ParsedObject.ORTSWeatherChange ?? Program.Simulator.ActivityRun.triggeredEventWrapper.ParsedObject.Outcomes.ORTSWeatherChange; dynamicWeather.WeatherChange_Init(weatherChange, this); - Program.Simulator.ActivityRun.triggeredEventWrapper = null; + Program.Simulator.ActivityRun.triggeredEventWrapper = null; } if (weatherChangeOn) - // manage the weather change sequence + // manage the weather change sequence { dynamicWeather.WeatherChange_Update(elapsedTime, this); } @@ -699,7 +698,7 @@ public void WeatherChange_Update(ElapsedTime elapsedTime, WeatherControl weather { precipitationIntensityTimer -= elapsedTime.ClockSeconds; if (precipitationIntensityTimer <= 0) precipitationIntensityTimer = 0; - else if (weatherControl.RandomizedWeather == false ) wChangeOn = true; + else if (weatherControl.RandomizedWeather == false) wChangeOn = true; var oldPricipitationIntensityPPSPM2 = weatherControl.Weather.PricipitationIntensityPPSPM2; weatherControl.Weather.PricipitationIntensityPPSPM2 = ORTSPrecipitationIntensity - precipitationIntensityTimer * precipitationIntensityChangeRate; if (weatherControl.Weather.PricipitationIntensityPPSPM2 > 0) @@ -814,7 +813,7 @@ public void WeatherChange_Update(ElapsedTime elapsedTime, WeatherControl weather ORTSPrecipitationIntensityTransitionTimeS = weatherChangeTimer; } if (ORTSPrecipitationIntensity >= 0) - { + { precipitationIntensityTimer = (float)ORTSPrecipitationIntensityTransitionTimeS; precipitationIntensityChangeRate = precipitationIntensityTimer > 0 ? (MathHelper.Clamp(ORTSPrecipitationIntensity, 0, PrecipitationViewer.MaxIntensityPPSPM2) - weatherControl.Weather.PricipitationIntensityPPSPM2) / ORTSPrecipitationIntensityTransitionTimeS : 0; @@ -991,7 +990,7 @@ void CheckValue(ref float setValue, bool randomize, float minValue, float maxVal // overcast if (setValue < 0 && randomize) { - setValue = (float)(Viewer.Random.Next((int)maxValue*100)/100); // ensure there is a value if range is 0 - 1 + setValue = (float)(Viewer.Random.Next((int)maxValue * 100) / 100); // ensure there is a value if range is 0 - 1 } else { @@ -1067,7 +1066,7 @@ void SetInitialWeatherParameters(double realTime) else if (lastWeather is WeatherSettingOvercast) { WeatherSettingOvercast lastWeatherOvercast = lastWeather as WeatherSettingOvercast; - AWOvercastCloudcover = Math.Max(0, Math.Min(1, (lastWeatherOvercast.Overcast/100) + + AWOvercastCloudcover = Math.Max(0, Math.Min(1, (lastWeatherOvercast.Overcast / 100) + ((float)Viewer.Random.Next((int)(-0.5f * lastWeatherOvercast.OvercastVariation), (int)(0.5f * lastWeatherOvercast.OvercastVariation)) / 100))); AWActualVisibility = Weather.FogDistance = lastWeatherOvercast.OvercastVisibilityM; @@ -1258,7 +1257,7 @@ public override void Update(ElapsedTime elapsedTime) // check for change in required weather // time to change but no change after midnight and further weather available - if (Time < 24*3600 && Time > AWNextChangeTime && AWActiveIndex < (weatherDetails.Count - 1)) + if (Time < 24 * 3600 && Time > AWNextChangeTime && AWActiveIndex < (weatherDetails.Count - 1)) { // if precipitation still active or fog not lifted, postpone change by one minute if (AWPrecipitationActiveType != WeatherType.Clear || fogActive) @@ -1350,7 +1349,7 @@ void StartPrecipitation(WeatherSettingPrecipitation lastWeatherPrecipitation, fl // determine actual duration of precipitation float maxDuration = AWNextChangeTime - weatherDetails[AWActiveIndex].Time; - AWPrecipitationTotalDuration = (float)maxDuration * (lastWeatherPrecipitation.PrecipitationProbability/100f); // nominal value + AWPrecipitationTotalDuration = (float)maxDuration * (lastWeatherPrecipitation.PrecipitationProbability / 100f); // nominal value AWPrecipitationTotalDuration = (0.9f + ((float)Viewer.Random.Next(20) / 20)) * AWPrecipitationTotalDuration; // randomized value, +- 10% AWPrecipitationTotalDuration = Math.Min(AWPrecipitationTotalDuration, maxDuration); // but never exceeding maximum duration AWPrecipitationNextSpell = lastWeatherPrecipitation.Time; // set start of spell to start of weather change @@ -1394,7 +1393,7 @@ void StartPrecipitation(WeatherSettingPrecipitation lastWeatherPrecipitation, fl float baseDensitiy = PrecipitationViewer.MaxIntensityPPSPM2 * lastWeatherPrecipitation.PrecipitationDensity; AWPrecipitationActualPPSPM2 = MathHelper.Clamp(((1.0f + ((float)Viewer.Random.Next(-precvariation, precvariation) / 100)) * baseDensitiy), PrecipitationViewer.MinIntensityPPSPM2, PrecipitationViewer.MaxIntensityPPSPM2); - AWPrecipitationRequiredPPSPM2 = MathHelper.Clamp(((1.0f + ((float)Viewer.Random.Next(-precvariation, precvariation) / 100)) * baseDensitiy), + AWPrecipitationRequiredPPSPM2 = MathHelper.Clamp(((1.0f + ((float)Viewer.Random.Next(-precvariation, precvariation) / 100)) * baseDensitiy), PrecipitationViewer.MinIntensityPPSPM2, PrecipitationViewer.MaxIntensityPPSPM2); // rate of change is max. difference over random timespan between 1 and 10 mins. @@ -1408,7 +1407,7 @@ void StartPrecipitation(WeatherSettingPrecipitation lastWeatherPrecipitation, fl float endrate = 1.75f * lastWeatherPrecipitation.PrecipitationRateOfChange + (0.5F * (float)(Viewer.Random.Next((int)(lastWeatherPrecipitation.PrecipitationRateOfChange * 100))) / 100f); float spellEndPhase = Math.Min(60f + (300f * endrate), 600); - + float avduration = AWPrecipitationTotalDuration / AWPrecipitationTotalSpread; float actduration = (0.5f + ((float)Viewer.Random.Next(100) / 100)) * avduration; float spellEndTime = Math.Min(startTime + actduration, AWNextChangeTime); @@ -1585,7 +1584,7 @@ public override void SaveWeatherParameters(BinaryWriter outf) outf.Write(1); // save input details - foreach(WeatherSetting autoweather in weatherDetails) + foreach (WeatherSetting autoweather in weatherDetails) { if (autoweather is WeatherSettingFog) { diff --git a/Source/RunActivity/Viewer3D/WebServices/ControlValue.cs b/Source/RunActivity/Viewer3D/WebServices/ControlValue.cs index 3df7f95c91..a81512ef26 100644 --- a/Source/RunActivity/Viewer3D/WebServices/ControlValue.cs +++ b/Source/RunActivity/Viewer3D/WebServices/ControlValue.cs @@ -15,8 +15,8 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Orts.Viewer3D.RollingStock; using System.Collections.Generic; +using Orts.Viewer3D.RollingStock; namespace Orts.Viewer3D.WebServices { @@ -55,11 +55,15 @@ public static IList GetWebControlValueList(this MSTSLocomotiveView foreach (var controlRenderer in viewer._CabRenderer.ControlMap.Values) { controlValueList.Add(new ControlValue - { TypeName = controlRenderer.GetControlType().ToString() - , MinValue = controlRenderer.Control.MinValue - , MaxValue = controlRenderer.Control.MaxValue - , RangeFraction = controlRenderer.GetRangeFraction() - }); + { + TypeName = controlRenderer.GetControlType().ToString() + , + MinValue = controlRenderer.Control.MinValue + , + MaxValue = controlRenderer.Control.MaxValue + , + RangeFraction = controlRenderer.GetRangeFraction() + }); } return controlValueList; } diff --git a/Source/RunActivity/Viewer3D/WebServices/TrackMonitorDisplay.cs b/Source/RunActivity/Viewer3D/WebServices/TrackMonitorDisplay.cs index 73b643d451..f2e553c2c8 100644 --- a/Source/RunActivity/Viewer3D/WebServices/TrackMonitorDisplay.cs +++ b/Source/RunActivity/Viewer3D/WebServices/TrackMonitorDisplay.cs @@ -15,14 +15,13 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections.Generic; +using System.Linq; using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; using Orts.Simulation.Physics; using Orts.Simulation.RollingStocks; using ORTS.Common; -using System; -using System.Collections.Generic; -using System.Linq; using static Orts.Simulation.Physics.Train.TrainObjectItem; namespace Orts.Viewer3D.WebServices @@ -523,7 +522,7 @@ private static void DrawMPModeInfo(List labels, Train.TrainInfo train // Draw forward items DrawTrackItems(labels, trainInfo.ObjectInfoForward, zeroObjectPointTop, distanceFactor, markerIntervalM, direction: TrainDirection.Forward, useMetric); } - if (trainInfo.direction !=0) + if (trainInfo.direction != 0) { // Draw fixed distance indications float markerIntervalM = DrawDistanceMarkers(labels, distanceFactor, zeroObjectPointBottom, numberOfMarkers: 4, direction: TrainDirection.Backward, useMetric); diff --git a/Source/RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs b/Source/RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs index c375afdfb9..b3c012842f 100644 --- a/Source/RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs +++ b/Source/RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs @@ -15,15 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Orts.Simulation.Physics; -using Orts.Simulation.RollingStocks; -using Orts.Simulation.RollingStocks.SubSystems.Brakes; -using ORTS.Common; -using ORTS.Common.Input; using System; using System.Collections.Generic; using System.Drawing; using System.Linq; +using Orts.Simulation.Physics; +using Orts.Simulation.RollingStocks; namespace Orts.Viewer3D.WebServices { diff --git a/Source/RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs b/Source/RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs index 2a03fff1d4..72558857ac 100644 --- a/Source/RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs +++ b/Source/RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs @@ -15,16 +15,16 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; using Orts.Simulation.Physics; using Orts.Simulation.RollingStocks; using Orts.Simulation.RollingStocks.SubSystems; using Orts.Simulation.RollingStocks.SubSystems.Brakes; using ORTS.Common; using ORTS.Common.Input; -using System; -using System.Collections.Generic; -using System.Drawing; -using System.Linq; namespace Orts.Viewer3D.WebServices { diff --git a/Source/RunActivity/Viewer3D/WebServices/WebServer.cs b/Source/RunActivity/Viewer3D/WebServices/WebServer.cs index e3184d9afd..cd5417bbbd 100644 --- a/Source/RunActivity/Viewer3D/WebServices/WebServer.cs +++ b/Source/RunActivity/Viewer3D/WebServices/WebServer.cs @@ -20,6 +20,12 @@ // Based on an idea by Dan Reynolds (HighAspect) - 2017-12-21 // =========================================================================================== +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; using EmbedIO; using EmbedIO.Routing; using EmbedIO.WebApi; @@ -28,17 +34,8 @@ using Newtonsoft.Json.Serialization; using Orts.Common; using Orts.Formats.Msts; -using Orts.Simulation.Physics; using Orts.Viewer3D.RollingStock; using ORTS.Common; -using ORTS.Settings; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading; -using System.Threading.Tasks; -using static Orts.Common.InfoApiMap; namespace Orts.Viewer3D.WebServices { @@ -90,7 +87,7 @@ await text.WriteAsync(JsonConvert.SerializeObject(data, new JsonSerializerSettin })); } } - + public static async Task DeserializationCallback(IHttpContext context) { using (var text = context.OpenRequestText()) diff --git a/Source/RunActivity/Viewer3D/Wire.cs b/Source/RunActivity/Viewer3D/Wire.cs index a171594f4d..b5a4a85d50 100644 --- a/Source/RunActivity/Viewer3D/Wire.cs +++ b/Source/RunActivity/Viewer3D/Wire.cs @@ -23,16 +23,16 @@ * */ -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Orts.Formats.Msts; -using Orts.Simulation; -using ORTS.Common; using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Orts.Formats.Msts; +using Orts.Simulation; +using ORTS.Common; namespace Orts.Viewer3D { @@ -351,7 +351,7 @@ public void VerticalAccumulate(int count) VerticalNumSegments += (uint)count - 1; } } - + // Dynamic Wire profile class public class WireProfile : TrProfile { @@ -570,7 +570,7 @@ public class WirePrimitive : DynamicTrackPrimitive if (DTrackData.IsCurved == 0) ObjectRadius = 0.5f * DTrackData.param1; // half-length else ObjectRadius = DTrackData.param2 * (float)Math.Sin(0.5 * Math.Abs(DTrackData.param1)); // half chord length } - + /// /// Builds a Wire LOD to WireProfile specifications as one vertex buffer and one index buffer. /// The order in which the buffers are built reflects the nesting in the TrProfile. The nesting order is: diff --git a/Source/RunActivity/Viewer3D/World.cs b/Source/RunActivity/Viewer3D/World.cs index f4850e7c40..0dfaf2b347 100644 --- a/Source/RunActivity/Viewer3D/World.cs +++ b/Source/RunActivity/Viewer3D/World.cs @@ -18,12 +18,12 @@ // This file is the responsibility of the 3D & Environment Team. using System; +using System.Collections.Generic; using System.Diagnostics; using Microsoft.Xna.Framework; using Orts.Common; -using ORTS.Common; using Orts.Viewer3D.RollingStock.SubSystems; -using System.Collections.Generic; +using ORTS.Common; namespace Orts.Viewer3D { diff --git a/Source/Tests/AssertWarnings.cs b/Source/Tests/AssertWarnings.cs index 963de4da31..c28bf71e3f 100644 --- a/Source/Tests/AssertWarnings.cs +++ b/Source/Tests/AssertWarnings.cs @@ -16,10 +16,7 @@ // along with Open Rails. If not, see . using System; -using System.Collections.Generic; using System.Diagnostics; -using System.Linq; -using System.Text; using System.Text.RegularExpressions; using Xunit; diff --git a/Source/Tests/Orts.Common/Conversions.cs b/Source/Tests/Orts.Common/Conversions.cs index aba52830f0..4b6695c5b2 100644 --- a/Source/Tests/Orts.Common/Conversions.cs +++ b/Source/Tests/Orts.Common/Conversions.cs @@ -15,9 +15,9 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using ORTS.Common; using System; using System.Collections.Generic; +using ORTS.Common; using Xunit; namespace Tests.Orts.Common diff --git a/Source/Tests/Orts.Parsers.Msts/StfReader.cs b/Source/Tests/Orts.Parsers.Msts/StfReader.cs index 58f67130e9..d0e426ba59 100644 --- a/Source/Tests/Orts.Parsers.Msts/StfReader.cs +++ b/Source/Tests/Orts.Parsers.Msts/StfReader.cs @@ -15,14 +15,14 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Microsoft.Xna.Framework; -using Orts.Parsers.Msts; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Text.RegularExpressions; +using Microsoft.Xna.Framework; +using Orts.Parsers.Msts; using Xunit; #region Integration tests (all tests from original reader) @@ -754,7 +754,7 @@ public static void BeThrowable() } namespace Tests.Orts.Parsers.Msts.StfReader -{ +{ // NEW_READER compilation flag is set for those tests that can be performed (compiled) only for the new STFReader, // but not on the old reader. The new reader should also pass all tests that compile on the old reader. // This means in this file NEW_READER flag adds a number of tests, but it should also work if the flag is not set. @@ -1441,7 +1441,7 @@ public static void SkipBlockOnCommentOtherCase() var reader = Create.Reader("Comment(a)" + someFollowingToken); Assert.Equal(someFollowingToken, reader.ReadItem()); } - + [Fact] public static void DontWarnOnMissingBlockAfterComment() { @@ -2223,8 +2223,8 @@ public static void ReturnValueInBlockAndSkipRestOfBlock() public class OnReadingBoolBlockShould { static readonly bool SOMEDEFAULT = false; - static readonly bool[] SOMEDEFAULTS1 = new bool[] { false, true, false, true, true, true, true }; - static readonly string[] STRINGDEFAULTS1 = new string[] { "false", "true", "0", "1", "1.1", "-2.9e3", "non" }; + static readonly bool[] SOMEDEFAULTS1 = new bool[] { false, true, false, true, true, true, true }; + static readonly string[] STRINGDEFAULTS1 = new string[] { "false", "true", "0", "1", "1.1", "-2.9e3", "non" }; [Fact] public static void OnEofWarnAndReturnDefault() @@ -2250,16 +2250,16 @@ public static void OnBlockEndReturnGivenDefault() [Fact] public static void ReturnStringValueInBlock() { - string[] inputValues = {"true", "false"}; - bool[] expectedValues = {true, false}; + string[] inputValues = { "true", "false" }; + bool[] expectedValues = { true, false }; StfTokenReaderCommon.ReturnValueInBlock(expectedValues, inputValues, reader => reader.ReadBoolBlock(false)); } [Fact] public static void ReturnIntValueInBlock() { - string[] inputValues = {"0", "1", "-2"}; - bool[] expectedValues = {false, true, true}; + string[] inputValues = { "0", "1", "-2" }; + bool[] expectedValues = { false, true, true }; StfTokenReaderCommon.ReturnValueInBlock(expectedValues, inputValues, reader => reader.ReadBoolBlock(false)); } @@ -2269,9 +2269,9 @@ public static void ReturnDefaultValueOtherwiseInBlock() bool[] expectedValues; string[] inputValues = { "0.1", "1.1", "something", "()" }; bool expectedValue = false; - expectedValues = new bool[]{ expectedValue, expectedValue, expectedValue, expectedValue}; + expectedValues = new bool[] { expectedValue, expectedValue, expectedValue, expectedValue }; StfTokenReaderCommon.ReturnValueInBlock(expectedValues, inputValues, reader => reader.ReadBoolBlock(expectedValue)); - + expectedValue = true; expectedValues = new bool[] { expectedValue, expectedValue, expectedValue, expectedValue }; StfTokenReaderCommon.ReturnValueInBlock(expectedValues, inputValues, reader => reader.ReadBoolBlock(expectedValue)); @@ -2318,7 +2318,7 @@ public static void OnNonBoolOrIntInBlockReturnFalseWithoutWarning() var reader = Create.Reader(inputString); foreach (string testValue in testValues) { - bool result = ! expectedResult; + bool result = !expectedResult; result = reader.ReadBoolBlock(expectedResult); Assert.Equal(expectedResult, result); } diff --git a/Source/Tests/Orts.Parsers.OR/TimetableReaderTests.cs b/Source/Tests/Orts.Parsers.OR/TimetableReaderTests.cs index 9d6d82c889..c733dc3d93 100644 --- a/Source/Tests/Orts.Parsers.OR/TimetableReaderTests.cs +++ b/Source/Tests/Orts.Parsers.OR/TimetableReaderTests.cs @@ -15,12 +15,8 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Orts.Parsers.OR; -using System; -using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text; +using Orts.Parsers.OR; using Xunit; namespace Tests.Orts.Parsers.OR @@ -50,7 +46,8 @@ public static void DetectSeparator() } using (var file = new TestFile(":")) { - Assert.Throws(() => { + Assert.Throws(() => + { var tr = new TimetableReader(file.FileName); }); } diff --git a/Source/Tests/TestFile.cs b/Source/Tests/TestFile.cs index c435c78433..e0e08c625b 100644 --- a/Source/Tests/TestFile.cs +++ b/Source/Tests/TestFile.cs @@ -16,10 +16,7 @@ // along with Open Rails. If not, see . using System; -using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text; namespace Tests { diff --git a/Source/Updater/UpdaterProgress.cs b/Source/Updater/UpdaterProgress.cs index 9442d0d6ee..ca0830a186 100644 --- a/Source/Updater/UpdaterProgress.cs +++ b/Source/Updater/UpdaterProgress.cs @@ -15,11 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using GNU.Gettext; -using GNU.Gettext.WinForms; -using ORTS.Common; -using ORTS.Settings; -using ORTS.Updater; using System; using System.ComponentModel; using System.Diagnostics; @@ -29,6 +24,11 @@ using System.Linq; using System.Threading; using System.Windows.Forms; +using GNU.Gettext; +using GNU.Gettext.WinForms; +using ORTS.Common; +using ORTS.Settings; +using ORTS.Updater; namespace Updater { From 2d95fc4cbbb2d947a5bc682a56f6ac72e9929dd2 Mon Sep 17 00:00:00 2001 From: Looky1173 Date: Mon, 29 May 2023 16:27:34 +0200 Subject: [PATCH 02/33] Initial experiments with the Dispatcher window --- Source/ORTS.Common/Input/UserCommand.cs | 1 + Source/ORTS.Settings/InputSettings.cs | 1 + Source/RunActivity/Program.cs | 4 + .../Debugging/DebugViewerBetaForm.Designer.cs | 120 ++++++++++++++++++ .../Viewer3D/Debugging/DebugViewerBetaForm.cs | 84 ++++++++++++ .../Debugging/DebugViewerBetaForm.resx | 120 ++++++++++++++++++ .../Viewer3D/Processes/GameStateViewer3D.cs | 4 + Source/RunActivity/Viewer3D/Viewer.cs | 2 + 8 files changed, 336 insertions(+) create mode 100644 Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs create mode 100644 Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs create mode 100644 Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.resx diff --git a/Source/ORTS.Common/Input/UserCommand.cs b/Source/ORTS.Common/Input/UserCommand.cs index 36b17946d5..ba7ec3ac3c 100644 --- a/Source/ORTS.Common/Input/UserCommand.cs +++ b/Source/ORTS.Common/Input/UserCommand.cs @@ -23,6 +23,7 @@ public enum UserCommand [GetString("Game Change Cab")] GameChangeCab, [GetString("Game Request Control")] GameRequestControl, [GetString("Game Multi Player Dispatcher")] GameMultiPlayerDispatcher, + [GetString("Game Multi Player Dispatcher Beta")] GameMultiPlayerDispatcherBeta, [GetString("Game Multi Player Texting")] GameMultiPlayerTexting, [GetString("Game Switch Manual Mode")] GameSwitchManualMode, [GetString("Game Reset Out Of Control Mode")] GameResetOutOfControlMode, diff --git a/Source/ORTS.Settings/InputSettings.cs b/Source/ORTS.Settings/InputSettings.cs index d3030e1ca0..9cfe3206f4 100644 --- a/Source/ORTS.Settings/InputSettings.cs +++ b/Source/ORTS.Settings/InputSettings.cs @@ -513,6 +513,7 @@ static void InitializeCommands(UserCommandInput[] Commands) Commands[(int)UserCommand.GameClearSignalForward] = new UserCommandKeyInput(0x0F); Commands[(int)UserCommand.GameFullscreen] = new UserCommandKeyInput(0x1C, KeyModifiers.Alt); Commands[(int)UserCommand.GameMultiPlayerDispatcher] = new UserCommandKeyInput(0x0A, KeyModifiers.Control); + Commands[(int)UserCommand.GameMultiPlayerDispatcherBeta] = new UserCommandKeyInput(0x0A, KeyModifiers.Control | KeyModifiers.Shift); Commands[(int)UserCommand.GameMultiPlayerTexting] = new UserCommandKeyInput(0x14, KeyModifiers.Alt); Commands[(int)UserCommand.GamePause] = new UserCommandKeyInput(Keys.Pause); Commands[(int)UserCommand.GamePauseMenu] = new UserCommandKeyInput(0x01); diff --git a/Source/RunActivity/Program.cs b/Source/RunActivity/Program.cs index 89d13a81b3..852ecc2751 100644 --- a/Source/RunActivity/Program.cs +++ b/Source/RunActivity/Program.cs @@ -20,6 +20,7 @@ using System.Linq; using System.Reflection; using System.Runtime.InteropServices; +using System.Windows.Forms; using Orts.Common; using Orts.Simulation; using Orts.Viewer3D; @@ -41,6 +42,7 @@ static class Program public static Simulator Simulator; public static Viewer Viewer; public static DispatchViewer DebugViewer; + public static DispatchViewerBeta DebugViewerBeta; public static SoundDebugForm SoundDebugForm; public static ORTraceListener ORTraceListener; public static string logFileName = ""; // contains path to file @@ -60,6 +62,8 @@ static void Main(string[] args) path = Path.Combine(path, (Environment.Is64BitProcess) ? "X64" : "X86"); NativeMethods.SetDllDirectory(path); + Application.SetCompatibleTextRenderingDefault(false); + var game = new Game(settings); game.PushState(new GameStateRunActivity(args)); game.Run(); diff --git a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs new file mode 100644 index 0000000000..76e794defe --- /dev/null +++ b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs @@ -0,0 +1,120 @@ +namespace Orts.Viewer3D.Debugging +{ + partial class DispatchViewerBeta + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + this.panel2 = new System.Windows.Forms.Panel(); + this.label1 = new System.Windows.Forms.Label(); + this.linkLabel1 = new System.Windows.Forms.LinkLabel(); + this.dispatcherInfoPanel = new System.Windows.Forms.Panel(); + this.flowLayoutPanel1.SuspendLayout(); + this.dispatcherInfoPanel.SuspendLayout(); + this.SuspendLayout(); + // + // flowLayoutPanel1 + // + this.flowLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.flowLayoutPanel1.Controls.Add(this.dispatcherInfoPanel); + this.flowLayoutPanel1.Controls.Add(this.panel2); + this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0); + this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(0); + this.flowLayoutPanel1.Name = "flowLayoutPanel1"; + this.flowLayoutPanel1.Size = new System.Drawing.Size(784, 560); + this.flowLayoutPanel1.TabIndex = 1; + // + // panel2 + // + this.panel2.Location = new System.Drawing.Point(3, 33); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(200, 100); + this.panel2.TabIndex = 1; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(116)))), ((int)(((byte)(166))))); + this.label1.Location = new System.Drawing.Point(11, 8); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(273, 13); + this.label1.TabIndex = 0; + this.label1.Text = "You are a dispatcher in this multiplayer session"; + // + // linkLabel1 + // + this.linkLabel1.ActiveLinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(79)))), ((int)(((byte)(114))))); + this.linkLabel1.AutoSize = true; + this.linkLabel1.Cursor = System.Windows.Forms.Cursors.Hand; + this.linkLabel1.LinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(116)))), ((int)(((byte)(166))))); + this.linkLabel1.Location = new System.Drawing.Point(711, 8); + this.linkLabel1.Name = "linkLabel1"; + this.linkLabel1.Size = new System.Drawing.Size(60, 13); + this.linkLabel1.TabIndex = 1; + this.linkLabel1.TabStop = true; + this.linkLabel1.Text = "Learn more"; + // + // dispatcherInfoPanel + // + this.dispatcherInfoPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.dispatcherInfoPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.dispatcherInfoPanel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(234)))), ((int)(((byte)(248))))); + this.dispatcherInfoPanel.Controls.Add(this.linkLabel1); + this.dispatcherInfoPanel.Controls.Add(this.label1); + this.dispatcherInfoPanel.Location = new System.Drawing.Point(0, 0); + this.dispatcherInfoPanel.Margin = new System.Windows.Forms.Padding(0); + this.dispatcherInfoPanel.Name = "dispatcherInfoPanel"; + this.dispatcherInfoPanel.Size = new System.Drawing.Size(784, 30); + this.dispatcherInfoPanel.TabIndex = 0; + this.dispatcherInfoPanel.Visible = false; + // + // DispatchViewerBeta + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(784, 561); + this.Controls.Add(this.flowLayoutPanel1); + this.Name = "DispatchViewerBeta"; + this.Text = "DebugViewerBetaForm"; + this.flowLayoutPanel1.ResumeLayout(false); + this.dispatcherInfoPanel.ResumeLayout(false); + this.dispatcherInfoPanel.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; + private System.Windows.Forms.Panel dispatcherInfoPanel; + private System.Windows.Forms.LinkLabel linkLabel1; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Panel panel2; + } +} diff --git a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs new file mode 100644 index 0000000000..bbfa9415c0 --- /dev/null +++ b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs @@ -0,0 +1,84 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Net; +using System.Windows.Forms; +using GNU.Gettext.WinForms; +using Microsoft.Xna.Framework; +using Orts.Formats.Msts; +using Orts.MultiPlayer; +using Orts.Simulation; +using Orts.Simulation.Physics; +using Orts.Simulation.RollingStocks; +using Orts.Simulation.Signalling; +using Orts.Viewer3D.Popups; +using ORTS.Common; + +namespace Orts.Viewer3D.Debugging +{ + public partial class DispatchViewerBeta : Form + { + /// + /// Used to periodically check if we should shift the view when the + /// user is holding down a "shift view" button. + /// + private Timer UITimer; + + public Viewer Viewer; + + public DispatchViewerBeta(Simulator simulator, Viewer viewer) + { + InitializeComponent(); + + Viewer = viewer; + + initializeForm(); + + // Initialise the timer used to handle user input + UITimer = new Timer(); + UITimer.Interval = 100; + UITimer.Tick += new EventHandler(UITimer_Tick); + UITimer.Start(); + } + + void initializeForm() + { + if (MPManager.IsMultiPlayer() && MPManager.IsServer()) + { + dispatcherInfoPanel.Visible = true; + } + } + + void UITimer_Tick(object sender, EventArgs e) + { + if (Viewer.DebugViewerBetaEnabled == false) // Ctrl+9 sets this true to initialise the window and make it visible + { + Visible = false; + return; + } + Visible = true; + } + + private void label1_Click(object sender, EventArgs e) + { + + } + + private void label1_Click_1(object sender, EventArgs e) + { + + } + } +} diff --git a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.resx b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.resx new file mode 100644 index 0000000000..1af7de150c --- /dev/null +++ b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Source/RunActivity/Viewer3D/Processes/GameStateViewer3D.cs b/Source/RunActivity/Viewer3D/Processes/GameStateViewer3D.cs index f77930d2ab..edb2d6242f 100644 --- a/Source/RunActivity/Viewer3D/Processes/GameStateViewer3D.cs +++ b/Source/RunActivity/Viewer3D/Processes/GameStateViewer3D.cs @@ -56,6 +56,10 @@ internal override void BeginRender(RenderFrame frame) Program.DebugViewer.Hide(); Viewer.DebugViewerEnabled = false; + Program.DebugViewerBeta = new DispatchViewerBeta(Viewer.Simulator, Viewer); + Program.DebugViewerBeta.Hide(); + Viewer.DebugViewerBetaEnabled = false; + Program.SoundDebugForm = new SoundDebugForm(Viewer); Program.SoundDebugForm.Hide(); Viewer.SoundDebugFormEnabled = false; diff --git a/Source/RunActivity/Viewer3D/Viewer.cs b/Source/RunActivity/Viewer3D/Viewer.cs index f439303478..ae7bbab25c 100644 --- a/Source/RunActivity/Viewer3D/Viewer.cs +++ b/Source/RunActivity/Viewer3D/Viewer.cs @@ -189,6 +189,7 @@ void CameraActivate() public Vector3 FarPoint { get; private set; } public bool DebugViewerEnabled { get; set; } + public bool DebugViewerBetaEnabled { get; set; } public bool SoundDebugFormEnabled { get; set; } public TRPFile TRP; // Track profile file @@ -1156,6 +1157,7 @@ void HandleUserInput(ElapsedTime elapsedTime) if (UserInput.IsPressed(UserCommand.GameResetOutOfControlMode)) new ResetOutOfControlModeCommand(Log); if (UserInput.IsPressed(UserCommand.GameMultiPlayerDispatcher)) { DebugViewerEnabled = !DebugViewerEnabled; return; } + if (UserInput.IsPressed(UserCommand.GameMultiPlayerDispatcherBeta)) { DebugViewerBetaEnabled = !DebugViewerBetaEnabled; return; } if (UserInput.IsPressed(UserCommand.DebugSoundForm)) { SoundDebugFormEnabled = !SoundDebugFormEnabled; return; } if (UserInput.IsPressed(UserCommand.CameraJumpSeeSwitch)) From 47879c8228a19617d94127f3060fde3b2da560e2 Mon Sep 17 00:00:00 2001 From: Looky1173 Date: Sat, 19 Aug 2023 16:42:35 +0200 Subject: [PATCH 03/33] Dispatcher window improvements continued --- .gitignore | 3 +- Source/RunActivity/PostBuildActions.bat | 2 + Source/RunActivity/Program.cs | 1 + .../Debugging/DebugViewerBetaForm.Designer.cs | 943 +++++++- .../Viewer3D/Debugging/DebugViewerBetaForm.cs | 2050 ++++++++++++++++- .../Debugging/DebugViewerBetaForm.resx | 9 + .../Debugging/DebugViewerForm.Designer.cs | 16 +- .../Viewer3D/Debugging/DebugViewerForm.cs | 5 +- .../Viewer3D/Debugging/MapDataProvider.cs | 310 +++ .../Viewer3D/Processes/RenderProcess.cs | 7 +- Source/RunActivity/Viewer3D/Viewer.cs | 3 +- 11 files changed, 3253 insertions(+), 96 deletions(-) create mode 100644 Source/RunActivity/Viewer3D/Debugging/MapDataProvider.cs diff --git a/.gitignore b/.gitignore index c78c509839..fdab9c6cdc 100644 --- a/.gitignore +++ b/.gitignore @@ -365,4 +365,5 @@ ASALocalRun/ healthchecksdb # Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ \ No newline at end of file +MigrationBackup/ +/Source/RunActivity/Properties/launchSettings.json diff --git a/Source/RunActivity/PostBuildActions.bat b/Source/RunActivity/PostBuildActions.bat index cc11252309..f7bc0c6d87 100644 --- a/Source/RunActivity/PostBuildActions.bat +++ b/Source/RunActivity/PostBuildActions.bat @@ -1,3 +1,5 @@ +EXIT + CD ..\..\ IF EXIST "Program\Content\Web" RMDIR "Program\Content\Web" /S /Q IF NOT EXIST "Program\Content\Web" MKDIR "Program\Content\Web" diff --git a/Source/RunActivity/Program.cs b/Source/RunActivity/Program.cs index 852ecc2751..e6486add32 100644 --- a/Source/RunActivity/Program.cs +++ b/Source/RunActivity/Program.cs @@ -62,6 +62,7 @@ static void Main(string[] args) path = Path.Combine(path, (Environment.Is64BitProcess) ? "X64" : "X86"); NativeMethods.SetDllDirectory(path); + Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); var game = new Game(settings); diff --git a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs index 76e794defe..e3d4ea33a0 100644 --- a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs +++ b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs @@ -28,93 +28,914 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { - this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); - this.panel2 = new System.Windows.Forms.Panel(); + this.components = new System.ComponentModel.Container(); + System.Windows.Forms.ListViewItem listViewItem1 = new System.Windows.Forms.ListViewItem(new string[] { + "Player1 (you)"}, -1, System.Drawing.Color.Empty, System.Drawing.Color.Empty, new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)))); + System.Windows.Forms.ListViewItem listViewItem2 = new System.Windows.Forms.ListViewItem("Player2"); + System.Windows.Forms.ListViewItem listViewItem3 = new System.Windows.Forms.ListViewItem("Player3"); + System.Windows.Forms.ListViewItem listViewItem4 = new System.Windows.Forms.ListViewItem("..."); + this.playerRolePanel = new System.Windows.Forms.Panel(); + this.playerRoleLink = new System.Windows.Forms.LinkLabel(); + this.playerRoleExplanation = new System.Windows.Forms.Label(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); + this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel(); + this.messagesPanel = new System.Windows.Forms.Panel(); + this.messages = new System.Windows.Forms.ListBox(); + this.button2 = new System.Windows.Forms.Button(); + this.button1 = new System.Windows.Forms.Button(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.canvasPanel = new System.Windows.Forms.Panel(); + this.timeLabel = new System.Windows.Forms.Label(); + this.mapCustomizationButton = new System.Windows.Forms.Button(); + this.mapCustomizationPanel = new System.Windows.Forms.Panel(); + this.showAllTrainsRadio = new System.Windows.Forms.RadioButton(); + this.showActiveTrainsRadio = new System.Windows.Forms.RadioButton(); + this.showTrainStateCheckbox = new System.Windows.Forms.CheckBox(); + this.showTrainLabelsCheckbox = new System.Windows.Forms.CheckBox(); + this.showSignalStateCheckbox = new System.Windows.Forms.CheckBox(); + this.showSignalsCheckbox = new System.Windows.Forms.CheckBox(); + this.showSwitchesCheckbox = new System.Windows.Forms.CheckBox(); + this.showSidingLabelsCheckbox = new System.Windows.Forms.CheckBox(); + this.showPlatformLabelsCheckbox = new System.Windows.Forms.CheckBox(); + this.showPlatformsCheckbox = new System.Windows.Forms.CheckBox(); this.label1 = new System.Windows.Forms.Label(); - this.linkLabel1 = new System.Windows.Forms.LinkLabel(); - this.dispatcherInfoPanel = new System.Windows.Forms.Panel(); - this.flowLayoutPanel1.SuspendLayout(); - this.dispatcherInfoPanel.SuspendLayout(); + this.rotateThemesButton = new System.Windows.Forms.Button(); + this.showTimeCheckbox = new System.Windows.Forms.CheckBox(); + this.useAntiAliasingCheckbox = new System.Windows.Forms.CheckBox(); + this.mapCanvas = new System.Windows.Forms.PictureBox(); + this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel(); + this.panel1 = new System.Windows.Forms.Panel(); + this.multiplayerSettingsPanel = new System.Windows.Forms.Panel(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.penaltyCheckbox = new System.Windows.Forms.CheckBox(); + this.checkBox5 = new System.Windows.Forms.CheckBox(); + this.allowJoiningCheckbox = new System.Windows.Forms.CheckBox(); + this.mapSettingsPanel = new System.Windows.Forms.Panel(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.button5 = new System.Windows.Forms.Button(); + this.centerOnMyTrainButton = new System.Windows.Forms.Button(); + this.seeTrainInGameButton = new System.Windows.Forms.Button(); + this.label3 = new System.Windows.Forms.Label(); + this.mapResolutionUpDown = new System.Windows.Forms.NumericUpDown(); + this.checkBox3 = new System.Windows.Forms.CheckBox(); + this.allowChangingSignalsCheckbox = new System.Windows.Forms.CheckBox(); + this.drawPathCheckbox = new System.Windows.Forms.CheckBox(); + this.playersPanel = new System.Windows.Forms.Panel(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.playersView = new System.Windows.Forms.ListView(); + this.messageActionsMenu = new System.Windows.Forms.ContextMenuStrip(this.components); + this.messageSelectedPlayerMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.replyToSelectedPlayerMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.playerActionsMenu = new System.Windows.Forms.ContextMenuStrip(this.components); + this.makeThisPlayerAnAssistantToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.jumpToThisPlayerInGameToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.followToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.kickFromMultiplayerSessionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.playerRolePanel.SuspendLayout(); + this.tableLayoutPanel1.SuspendLayout(); + this.tableLayoutPanel2.SuspendLayout(); + this.tableLayoutPanel3.SuspendLayout(); + this.messagesPanel.SuspendLayout(); + this.canvasPanel.SuspendLayout(); + this.mapCustomizationPanel.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.mapCanvas)).BeginInit(); + this.tableLayoutPanel4.SuspendLayout(); + this.multiplayerSettingsPanel.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.mapSettingsPanel.SuspendLayout(); + this.groupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.mapResolutionUpDown)).BeginInit(); + this.playersPanel.SuspendLayout(); + this.groupBox3.SuspendLayout(); + this.messageActionsMenu.SuspendLayout(); + this.playerActionsMenu.SuspendLayout(); this.SuspendLayout(); // - // flowLayoutPanel1 + // playerRolePanel // - this.flowLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.flowLayoutPanel1.Controls.Add(this.dispatcherInfoPanel); - this.flowLayoutPanel1.Controls.Add(this.panel2); - this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0); - this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(0); - this.flowLayoutPanel1.Name = "flowLayoutPanel1"; - this.flowLayoutPanel1.Size = new System.Drawing.Size(784, 560); - this.flowLayoutPanel1.TabIndex = 1; + this.playerRolePanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.playerRolePanel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(234)))), ((int)(((byte)(248))))); + this.playerRolePanel.Controls.Add(this.playerRoleLink); + this.playerRolePanel.Controls.Add(this.playerRoleExplanation); + this.playerRolePanel.Location = new System.Drawing.Point(0, 0); + this.playerRolePanel.Margin = new System.Windows.Forms.Padding(0); + this.playerRolePanel.Name = "playerRolePanel"; + this.playerRolePanel.Size = new System.Drawing.Size(784, 30); + this.playerRolePanel.TabIndex = 0; + this.playerRolePanel.Visible = false; + // + // playerRoleLink + // + this.playerRoleLink.ActiveLinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(79)))), ((int)(((byte)(114))))); + this.playerRoleLink.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.playerRoleLink.AutoSize = true; + this.playerRoleLink.LinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(116)))), ((int)(((byte)(166))))); + this.playerRoleLink.Location = new System.Drawing.Point(717, 9); + this.playerRoleLink.Name = "playerRoleLink"; + this.playerRoleLink.Size = new System.Drawing.Size(60, 13); + this.playerRoleLink.TabIndex = 1; + this.playerRoleLink.TabStop = true; + this.playerRoleLink.Text = "Learn more"; + this.playerRoleLink.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.playerRoleLink_LinkClicked); + // + // playerRoleExplanation + // + this.playerRoleExplanation.AutoSize = true; + this.playerRoleExplanation.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.playerRoleExplanation.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(116)))), ((int)(((byte)(166))))); + this.playerRoleExplanation.Location = new System.Drawing.Point(12, 9); + this.playerRoleExplanation.Name = "playerRoleExplanation"; + this.playerRoleExplanation.Size = new System.Drawing.Size(284, 13); + this.playerRoleExplanation.TabIndex = 0; + this.playerRoleExplanation.Text = "You are the dispatcher in this multiplayer session"; + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.ColumnCount = 1; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel1.Controls.Add(this.playerRolePanel, 0, 0); + this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel2, 0, 1); + this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); + this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(0); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 1; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(784, 561); + this.tableLayoutPanel1.TabIndex = 3; + // + // tableLayoutPanel2 + // + this.tableLayoutPanel2.ColumnCount = 2; + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 200F)); + this.tableLayoutPanel2.Controls.Add(this.tableLayoutPanel3, 0, 0); + this.tableLayoutPanel2.Controls.Add(this.tableLayoutPanel4, 1, 0); + this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel2.Location = new System.Drawing.Point(0, 30); + this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(0); + this.tableLayoutPanel2.Name = "tableLayoutPanel2"; + this.tableLayoutPanel2.RowCount = 1; + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel2.Size = new System.Drawing.Size(784, 531); + this.tableLayoutPanel2.TabIndex = 0; + // + // tableLayoutPanel3 + // + this.tableLayoutPanel3.ColumnCount = 1; + this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel3.Controls.Add(this.messagesPanel, 0, 0); + this.tableLayoutPanel3.Controls.Add(this.canvasPanel, 0, 1); + this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel3.Location = new System.Drawing.Point(0, 0); + this.tableLayoutPanel3.Margin = new System.Windows.Forms.Padding(0); + this.tableLayoutPanel3.Name = "tableLayoutPanel3"; + this.tableLayoutPanel3.RowCount = 2; + this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel3.Size = new System.Drawing.Size(584, 531); + this.tableLayoutPanel3.TabIndex = 0; + // + // messagesPanel + // + this.messagesPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.messagesPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.messagesPanel.Controls.Add(this.messages); + this.messagesPanel.Controls.Add(this.button2); + this.messagesPanel.Controls.Add(this.button1); + this.messagesPanel.Controls.Add(this.textBox1); + this.messagesPanel.Controls.Add(this.label2); + this.messagesPanel.Location = new System.Drawing.Point(0, 0); + this.messagesPanel.Margin = new System.Windows.Forms.Padding(0); + this.messagesPanel.Name = "messagesPanel"; + this.messagesPanel.Padding = new System.Windows.Forms.Padding(10); + this.messagesPanel.Size = new System.Drawing.Size(584, 163); + this.messagesPanel.TabIndex = 0; + this.messagesPanel.Visible = false; + // + // messages + // + this.messages.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.messages.Enabled = false; + this.messages.FormattingEnabled = true; + this.messages.IntegralHeight = false; + this.messages.Location = new System.Drawing.Point(16, 26); + this.messages.Name = "messages"; + this.messages.Size = new System.Drawing.Size(554, 97); + this.messages.TabIndex = 5; + // + // button2 + // + this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.button2.Enabled = false; + this.button2.Location = new System.Drawing.Point(421, 128); + this.button2.Margin = new System.Windows.Forms.Padding(0); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(126, 23); + this.button2.TabIndex = 4; + this.button2.Text = "Message all players"; + this.button2.UseVisualStyleBackColor = true; + // + // button1 + // + this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.button1.AutoSize = true; + this.button1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.button1.Enabled = false; + this.button1.Location = new System.Drawing.Point(547, 128); + this.button1.Margin = new System.Windows.Forms.Padding(0); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(23, 23); + this.button1.TabIndex = 3; + this.button1.Text = ">"; + this.button1.UseVisualStyleBackColor = true; + // + // textBox1 + // + this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.textBox1.Enabled = false; + this.textBox1.Location = new System.Drawing.Point(16, 130); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(402, 20); + this.textBox1.TabIndex = 2; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(13, 10); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(58, 13); + this.label2.TabIndex = 0; + this.label2.Text = "Messages:"; + // + // canvasPanel + // + this.canvasPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.canvasPanel.Controls.Add(this.timeLabel); + this.canvasPanel.Controls.Add(this.mapCustomizationButton); + this.canvasPanel.Controls.Add(this.mapCustomizationPanel); + this.canvasPanel.Controls.Add(this.mapCanvas); + this.canvasPanel.Dock = System.Windows.Forms.DockStyle.Fill; + this.canvasPanel.Location = new System.Drawing.Point(0, 163); + this.canvasPanel.Margin = new System.Windows.Forms.Padding(0); + this.canvasPanel.Name = "canvasPanel"; + this.canvasPanel.Padding = new System.Windows.Forms.Padding(13); + this.canvasPanel.Size = new System.Drawing.Size(584, 368); + this.canvasPanel.TabIndex = 1; + // + // timeLabel + // + this.timeLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.timeLabel.AutoSize = true; + this.timeLabel.BackColor = System.Drawing.Color.Transparent; + this.timeLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.timeLabel.Location = new System.Drawing.Point(25, 333); + this.timeLabel.Name = "timeLabel"; + this.timeLabel.Size = new System.Drawing.Size(92, 13); + this.timeLabel.TabIndex = 1; + this.timeLabel.Text = "Simulation time"; // - // panel2 + // mapCustomizationButton // - this.panel2.Location = new System.Drawing.Point(3, 33); - this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(200, 100); - this.panel2.TabIndex = 1; + this.mapCustomizationButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.mapCustomizationButton.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.mapCustomizationButton.FlatAppearance.BorderSize = 0; + this.mapCustomizationButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.mapCustomizationButton.Location = new System.Drawing.Point(443, 324); + this.mapCustomizationButton.Name = "mapCustomizationButton"; + this.mapCustomizationButton.Size = new System.Drawing.Size(120, 23); + this.mapCustomizationButton.TabIndex = 0; + this.mapCustomizationButton.Text = "Map customization"; + this.mapCustomizationButton.UseVisualStyleBackColor = true; + this.mapCustomizationButton.Click += new System.EventHandler(this.mapCustomizationButton_Click); + // + // mapCustomizationPanel + // + this.mapCustomizationPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.mapCustomizationPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.mapCustomizationPanel.Controls.Add(this.showAllTrainsRadio); + this.mapCustomizationPanel.Controls.Add(this.showActiveTrainsRadio); + this.mapCustomizationPanel.Controls.Add(this.showTrainStateCheckbox); + this.mapCustomizationPanel.Controls.Add(this.showTrainLabelsCheckbox); + this.mapCustomizationPanel.Controls.Add(this.showSignalStateCheckbox); + this.mapCustomizationPanel.Controls.Add(this.showSignalsCheckbox); + this.mapCustomizationPanel.Controls.Add(this.showSwitchesCheckbox); + this.mapCustomizationPanel.Controls.Add(this.showSidingLabelsCheckbox); + this.mapCustomizationPanel.Controls.Add(this.showPlatformLabelsCheckbox); + this.mapCustomizationPanel.Controls.Add(this.showPlatformsCheckbox); + this.mapCustomizationPanel.Controls.Add(this.label1); + this.mapCustomizationPanel.Controls.Add(this.rotateThemesButton); + this.mapCustomizationPanel.Controls.Add(this.showTimeCheckbox); + this.mapCustomizationPanel.Controls.Add(this.useAntiAliasingCheckbox); + this.mapCustomizationPanel.Location = new System.Drawing.Point(373, 3); + this.mapCustomizationPanel.Name = "mapCustomizationPanel"; + this.mapCustomizationPanel.Size = new System.Drawing.Size(190, 315); + this.mapCustomizationPanel.TabIndex = 0; + this.mapCustomizationPanel.Visible = false; + // + // showAllTrainsRadio + // + this.showAllTrainsRadio.AutoSize = true; + this.showAllTrainsRadio.Location = new System.Drawing.Point(10, 279); + this.showAllTrainsRadio.Name = "showAllTrainsRadio"; + this.showAllTrainsRadio.Size = new System.Drawing.Size(64, 17); + this.showAllTrainsRadio.TabIndex = 19; + this.showAllTrainsRadio.Text = "All trains"; + this.showAllTrainsRadio.UseVisualStyleBackColor = true; + // + // showActiveTrainsRadio + // + this.showActiveTrainsRadio.AutoSize = true; + this.showActiveTrainsRadio.Checked = true; + this.showActiveTrainsRadio.Location = new System.Drawing.Point(10, 260); + this.showActiveTrainsRadio.Name = "showActiveTrainsRadio"; + this.showActiveTrainsRadio.Size = new System.Drawing.Size(106, 17); + this.showActiveTrainsRadio.TabIndex = 18; + this.showActiveTrainsRadio.TabStop = true; + this.showActiveTrainsRadio.Text = "Only active trains"; + this.showActiveTrainsRadio.UseVisualStyleBackColor = true; + // + // showTrainStateCheckbox + // + this.showTrainStateCheckbox.AutoSize = true; + this.showTrainStateCheckbox.Location = new System.Drawing.Point(28, 241); + this.showTrainStateCheckbox.Name = "showTrainStateCheckbox"; + this.showTrainStateCheckbox.Size = new System.Drawing.Size(76, 17); + this.showTrainStateCheckbox.TabIndex = 17; + this.showTrainStateCheckbox.Text = "Train state"; + this.showTrainStateCheckbox.UseVisualStyleBackColor = true; + // + // showTrainLabelsCheckbox + // + this.showTrainLabelsCheckbox.AutoSize = true; + this.showTrainLabelsCheckbox.Location = new System.Drawing.Point(10, 222); + this.showTrainLabelsCheckbox.Name = "showTrainLabelsCheckbox"; + this.showTrainLabelsCheckbox.Size = new System.Drawing.Size(80, 17); + this.showTrainLabelsCheckbox.TabIndex = 16; + this.showTrainLabelsCheckbox.Text = "Train labels"; + this.showTrainLabelsCheckbox.UseVisualStyleBackColor = true; + // + // showSignalStateCheckbox + // + this.showSignalStateCheckbox.AutoSize = true; + this.showSignalStateCheckbox.Location = new System.Drawing.Point(28, 203); + this.showSignalStateCheckbox.Name = "showSignalStateCheckbox"; + this.showSignalStateCheckbox.Size = new System.Drawing.Size(81, 17); + this.showSignalStateCheckbox.TabIndex = 15; + this.showSignalStateCheckbox.Text = "Signal state"; + this.showSignalStateCheckbox.UseVisualStyleBackColor = true; + // + // showSignalsCheckbox + // + this.showSignalsCheckbox.AutoSize = true; + this.showSignalsCheckbox.Location = new System.Drawing.Point(10, 184); + this.showSignalsCheckbox.Name = "showSignalsCheckbox"; + this.showSignalsCheckbox.Size = new System.Drawing.Size(60, 17); + this.showSignalsCheckbox.TabIndex = 14; + this.showSignalsCheckbox.Text = "Signals"; + this.showSignalsCheckbox.UseVisualStyleBackColor = true; + // + // showSwitchesCheckbox + // + this.showSwitchesCheckbox.AutoSize = true; + this.showSwitchesCheckbox.Location = new System.Drawing.Point(10, 165); + this.showSwitchesCheckbox.Name = "showSwitchesCheckbox"; + this.showSwitchesCheckbox.Size = new System.Drawing.Size(69, 17); + this.showSwitchesCheckbox.TabIndex = 13; + this.showSwitchesCheckbox.Text = "Switches"; + this.showSwitchesCheckbox.UseVisualStyleBackColor = true; + // + // showSidingLabelsCheckbox + // + this.showSidingLabelsCheckbox.AutoSize = true; + this.showSidingLabelsCheckbox.Location = new System.Drawing.Point(10, 146); + this.showSidingLabelsCheckbox.Name = "showSidingLabelsCheckbox"; + this.showSidingLabelsCheckbox.Size = new System.Drawing.Size(85, 17); + this.showSidingLabelsCheckbox.TabIndex = 12; + this.showSidingLabelsCheckbox.Text = "Siding labels"; + this.showSidingLabelsCheckbox.UseVisualStyleBackColor = true; + // + // showPlatformLabelsCheckbox + // + this.showPlatformLabelsCheckbox.AutoSize = true; + this.showPlatformLabelsCheckbox.Location = new System.Drawing.Point(10, 127); + this.showPlatformLabelsCheckbox.Name = "showPlatformLabelsCheckbox"; + this.showPlatformLabelsCheckbox.Size = new System.Drawing.Size(94, 17); + this.showPlatformLabelsCheckbox.TabIndex = 11; + this.showPlatformLabelsCheckbox.Text = "Platform labels"; + this.showPlatformLabelsCheckbox.UseVisualStyleBackColor = true; + // + // showPlatformsCheckbox + // + this.showPlatformsCheckbox.AutoSize = true; + this.showPlatformsCheckbox.Location = new System.Drawing.Point(10, 108); + this.showPlatformsCheckbox.Name = "showPlatformsCheckbox"; + this.showPlatformsCheckbox.Size = new System.Drawing.Size(69, 17); + this.showPlatformsCheckbox.TabIndex = 10; + this.showPlatformsCheckbox.Text = "Platforms"; + this.showPlatformsCheckbox.UseVisualStyleBackColor = true; // // label1 // this.label1.AutoSize = true; this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(116)))), ((int)(((byte)(166))))); - this.label1.Location = new System.Drawing.Point(11, 8); + this.label1.Location = new System.Drawing.Point(7, 91); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(273, 13); - this.label1.TabIndex = 0; - this.label1.Text = "You are a dispatcher in this multiplayer session"; - // - // linkLabel1 - // - this.linkLabel1.ActiveLinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(79)))), ((int)(((byte)(114))))); - this.linkLabel1.AutoSize = true; - this.linkLabel1.Cursor = System.Windows.Forms.Cursors.Hand; - this.linkLabel1.LinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(116)))), ((int)(((byte)(166))))); - this.linkLabel1.Location = new System.Drawing.Point(711, 8); - this.linkLabel1.Name = "linkLabel1"; - this.linkLabel1.Size = new System.Drawing.Size(60, 13); - this.linkLabel1.TabIndex = 1; - this.linkLabel1.TabStop = true; - this.linkLabel1.Text = "Learn more"; - // - // dispatcherInfoPanel - // - this.dispatcherInfoPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.label1.Size = new System.Drawing.Size(81, 13); + this.label1.TabIndex = 9; + this.label1.Text = "Map features"; + // + // rotateThemesButton + // + this.rotateThemesButton.AutoSize = true; + this.rotateThemesButton.Enabled = false; + this.rotateThemesButton.Location = new System.Drawing.Point(10, 52); + this.rotateThemesButton.Name = "rotateThemesButton"; + this.rotateThemesButton.Size = new System.Drawing.Size(167, 23); + this.rotateThemesButton.TabIndex = 8; + this.rotateThemesButton.Text = "Rotate between themes"; + this.rotateThemesButton.UseVisualStyleBackColor = true; + // + // showTimeCheckbox + // + this.showTimeCheckbox.AutoSize = true; + this.showTimeCheckbox.Checked = true; + this.showTimeCheckbox.CheckState = System.Windows.Forms.CheckState.Checked; + this.showTimeCheckbox.Location = new System.Drawing.Point(10, 29); + this.showTimeCheckbox.Name = "showTimeCheckbox"; + this.showTimeCheckbox.Size = new System.Drawing.Size(124, 17); + this.showTimeCheckbox.TabIndex = 1; + this.showTimeCheckbox.Text = "Show simulation time"; + this.showTimeCheckbox.UseVisualStyleBackColor = true; + // + // useAntiAliasingCheckbox + // + this.useAntiAliasingCheckbox.AutoSize = true; + this.useAntiAliasingCheckbox.Location = new System.Drawing.Point(10, 10); + this.useAntiAliasingCheckbox.Name = "useAntiAliasingCheckbox"; + this.useAntiAliasingCheckbox.Size = new System.Drawing.Size(103, 17); + this.useAntiAliasingCheckbox.TabIndex = 0; + this.useAntiAliasingCheckbox.Text = "Use anti-aliasing"; + this.useAntiAliasingCheckbox.UseVisualStyleBackColor = true; + // + // mapCanvas + // + this.mapCanvas.Dock = System.Windows.Forms.DockStyle.Fill; + this.mapCanvas.Location = new System.Drawing.Point(13, 13); + this.mapCanvas.Margin = new System.Windows.Forms.Padding(0); + this.mapCanvas.Name = "mapCanvas"; + this.mapCanvas.Size = new System.Drawing.Size(558, 342); + this.mapCanvas.TabIndex = 0; + this.mapCanvas.TabStop = false; + this.mapCanvas.MouseDown += new System.Windows.Forms.MouseEventHandler(this.mapCanvas_MouseDown); + this.mapCanvas.MouseMove += new System.Windows.Forms.MouseEventHandler(this.mapCanvas_MouseMove); + this.mapCanvas.MouseUp += new System.Windows.Forms.MouseEventHandler(this.mapCanvas_MouseUp); + // + // tableLayoutPanel4 + // + this.tableLayoutPanel4.ColumnCount = 1; + this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel4.Controls.Add(this.panel1, 0, 0); + this.tableLayoutPanel4.Controls.Add(this.multiplayerSettingsPanel, 0, 1); + this.tableLayoutPanel4.Controls.Add(this.mapSettingsPanel, 0, 2); + this.tableLayoutPanel4.Controls.Add(this.playersPanel, 0, 3); + this.tableLayoutPanel4.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel4.Location = new System.Drawing.Point(584, 0); + this.tableLayoutPanel4.Margin = new System.Windows.Forms.Padding(0); + this.tableLayoutPanel4.Name = "tableLayoutPanel4"; + this.tableLayoutPanel4.RowCount = 4; + this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel4.Size = new System.Drawing.Size(200, 531); + this.tableLayoutPanel4.TabIndex = 1; + // + // panel1 + // + this.panel1.Location = new System.Drawing.Point(3, 3); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(194, 14); + this.panel1.TabIndex = 3; + // + // multiplayerSettingsPanel + // + this.multiplayerSettingsPanel.AutoSize = true; + this.multiplayerSettingsPanel.Controls.Add(this.groupBox2); + this.multiplayerSettingsPanel.Location = new System.Drawing.Point(0, 20); + this.multiplayerSettingsPanel.Margin = new System.Windows.Forms.Padding(0); + this.multiplayerSettingsPanel.Name = "multiplayerSettingsPanel"; + this.multiplayerSettingsPanel.Padding = new System.Windows.Forms.Padding(10, 0, 10, 0); + this.multiplayerSettingsPanel.Size = new System.Drawing.Size(200, 83); + this.multiplayerSettingsPanel.TabIndex = 1; + this.multiplayerSettingsPanel.Visible = false; + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.penaltyCheckbox); + this.groupBox2.Controls.Add(this.checkBox5); + this.groupBox2.Controls.Add(this.allowJoiningCheckbox); + this.groupBox2.Location = new System.Drawing.Point(10, 0); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(180, 80); + this.groupBox2.TabIndex = 0; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "Multiplayer settings"; + // + // penaltyCheckbox + // + this.penaltyCheckbox.AutoSize = true; + this.penaltyCheckbox.Checked = true; + this.penaltyCheckbox.CheckState = System.Windows.Forms.CheckState.Checked; + this.penaltyCheckbox.Location = new System.Drawing.Point(7, 57); + this.penaltyCheckbox.Name = "penaltyCheckbox"; + this.penaltyCheckbox.Size = new System.Drawing.Size(163, 17); + this.penaltyCheckbox.TabIndex = 2; + this.penaltyCheckbox.Text = "Penalty for speeding && SPAD"; + this.penaltyCheckbox.UseVisualStyleBackColor = true; + this.penaltyCheckbox.CheckedChanged += new System.EventHandler(this.penaltyCheckbox_CheckedChanged); + // + // checkBox5 + // + this.checkBox5.AutoSize = true; + this.checkBox5.Enabled = false; + this.checkBox5.Location = new System.Drawing.Point(7, 38); + this.checkBox5.Name = "checkBox5"; + this.checkBox5.Size = new System.Drawing.Size(99, 17); + this.checkBox5.TabIndex = 1; + this.checkBox5.Text = "Prefer green (?)"; + this.checkBox5.UseVisualStyleBackColor = true; + // + // allowJoiningCheckbox + // + this.allowJoiningCheckbox.AutoSize = true; + this.allowJoiningCheckbox.Checked = true; + this.allowJoiningCheckbox.CheckState = System.Windows.Forms.CheckState.Checked; + this.allowJoiningCheckbox.Location = new System.Drawing.Point(7, 19); + this.allowJoiningCheckbox.Name = "allowJoiningCheckbox"; + this.allowJoiningCheckbox.Size = new System.Drawing.Size(141, 17); + this.allowJoiningCheckbox.TabIndex = 0; + this.allowJoiningCheckbox.Text = "Allow new players to join"; + this.allowJoiningCheckbox.UseVisualStyleBackColor = true; + this.allowJoiningCheckbox.CheckedChanged += new System.EventHandler(this.allowJoiningCheckbox_CheckedChanged); + // + // mapSettingsPanel + // + this.mapSettingsPanel.AutoSize = true; + this.mapSettingsPanel.Controls.Add(this.groupBox1); + this.mapSettingsPanel.Location = new System.Drawing.Point(0, 103); + this.mapSettingsPanel.Margin = new System.Windows.Forms.Padding(0); + this.mapSettingsPanel.Name = "mapSettingsPanel"; + this.mapSettingsPanel.Padding = new System.Windows.Forms.Padding(10, 0, 10, 0); + this.mapSettingsPanel.Size = new System.Drawing.Size(200, 191); + this.mapSettingsPanel.TabIndex = 0; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.button5); + this.groupBox1.Controls.Add(this.centerOnMyTrainButton); + this.groupBox1.Controls.Add(this.seeTrainInGameButton); + this.groupBox1.Controls.Add(this.label3); + this.groupBox1.Controls.Add(this.mapResolutionUpDown); + this.groupBox1.Controls.Add(this.checkBox3); + this.groupBox1.Controls.Add(this.allowChangingSignalsCheckbox); + this.groupBox1.Controls.Add(this.drawPathCheckbox); + this.groupBox1.Location = new System.Drawing.Point(10, 3); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(180, 185); + this.groupBox1.TabIndex = 0; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Map settings and controls"; + // + // button5 + // + this.button5.AutoSize = true; + this.button5.Enabled = false; + this.button5.Location = new System.Drawing.Point(7, 156); + this.button5.Name = "button5"; + this.button5.Size = new System.Drawing.Size(167, 23); + this.button5.TabIndex = 7; + this.button5.Text = "Follow my train on the map"; + this.button5.UseVisualStyleBackColor = true; + // + // centerOnMyTrainButton + // + this.centerOnMyTrainButton.AutoSize = true; + this.centerOnMyTrainButton.Location = new System.Drawing.Point(7, 127); + this.centerOnMyTrainButton.Name = "centerOnMyTrainButton"; + this.centerOnMyTrainButton.Size = new System.Drawing.Size(167, 23); + this.centerOnMyTrainButton.TabIndex = 6; + this.centerOnMyTrainButton.Text = "Jump to my train on the map"; + this.centerOnMyTrainButton.UseVisualStyleBackColor = true; + this.centerOnMyTrainButton.Click += new System.EventHandler(this.centerOnMyTrainButton_Click); + // + // seeTrainInGameButton + // + this.seeTrainInGameButton.AutoSize = true; + this.seeTrainInGameButton.Enabled = false; + this.seeTrainInGameButton.Location = new System.Drawing.Point(7, 98); + this.seeTrainInGameButton.Name = "seeTrainInGameButton"; + this.seeTrainInGameButton.Size = new System.Drawing.Size(167, 23); + this.seeTrainInGameButton.TabIndex = 5; + this.seeTrainInGameButton.Text = "Jump to my train in game"; + this.seeTrainInGameButton.UseVisualStyleBackColor = true; + this.seeTrainInGameButton.Click += new System.EventHandler(this.seeTrainInGameButton_Click); + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(4, 78); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(96, 13); + this.label3.TabIndex = 4; + this.label3.Text = "Map resolution (m):"; + // + // mapResolutionUpDown + // + this.mapResolutionUpDown.Increment = new decimal(new int[] { + 50, + 0, + 0, + 0}); + this.mapResolutionUpDown.Location = new System.Drawing.Point(102, 75); + this.mapResolutionUpDown.Margin = new System.Windows.Forms.Padding(0); + this.mapResolutionUpDown.Maximum = new decimal(new int[] { + 200000, + 0, + 0, + 0}); + this.mapResolutionUpDown.Minimum = new decimal(new int[] { + 80, + 0, + 0, + 0}); + this.mapResolutionUpDown.Name = "mapResolutionUpDown"; + this.mapResolutionUpDown.Size = new System.Drawing.Size(72, 20); + this.mapResolutionUpDown.TabIndex = 3; + this.mapResolutionUpDown.ThousandsSeparator = true; + this.mapResolutionUpDown.Value = new decimal(new int[] { + 5000, + 0, + 0, + 0}); + this.mapResolutionUpDown.ValueChanged += new System.EventHandler(this.mapResolutionUpDown_ValueChanged); + // + // checkBox3 + // + this.checkBox3.AutoSize = true; + this.checkBox3.Enabled = false; + this.checkBox3.Location = new System.Drawing.Point(7, 57); + this.checkBox3.Name = "checkBox3"; + this.checkBox3.Size = new System.Drawing.Size(138, 17); + this.checkBox3.TabIndex = 2; + this.checkBox3.Text = "Allow throwing switches"; + this.checkBox3.UseVisualStyleBackColor = true; + // + // allowChangingSignalsCheckbox + // + this.allowChangingSignalsCheckbox.AutoSize = true; + this.allowChangingSignalsCheckbox.Enabled = false; + this.allowChangingSignalsCheckbox.Location = new System.Drawing.Point(7, 38); + this.allowChangingSignalsCheckbox.Name = "allowChangingSignalsCheckbox"; + this.allowChangingSignalsCheckbox.Size = new System.Drawing.Size(133, 17); + this.allowChangingSignalsCheckbox.TabIndex = 1; + this.allowChangingSignalsCheckbox.Text = "Allow changing signals"; + this.allowChangingSignalsCheckbox.UseVisualStyleBackColor = true; + // + // drawPathCheckbox + // + this.drawPathCheckbox.AutoSize = true; + this.drawPathCheckbox.Checked = true; + this.drawPathCheckbox.CheckState = System.Windows.Forms.CheckState.Checked; + this.drawPathCheckbox.Location = new System.Drawing.Point(7, 19); + this.drawPathCheckbox.Name = "drawPathCheckbox"; + this.drawPathCheckbox.Size = new System.Drawing.Size(135, 17); + this.drawPathCheckbox.TabIndex = 0; + this.drawPathCheckbox.Text = "Draw next path section"; + this.drawPathCheckbox.UseVisualStyleBackColor = true; + this.drawPathCheckbox.CheckedChanged += new System.EventHandler(this.drawPathCheckbox_CheckedChanged); + // + // playersPanel + // + this.playersPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.playersPanel.Controls.Add(this.groupBox3); + this.playersPanel.Dock = System.Windows.Forms.DockStyle.Fill; + this.playersPanel.Location = new System.Drawing.Point(0, 294); + this.playersPanel.Margin = new System.Windows.Forms.Padding(0); + this.playersPanel.Name = "playersPanel"; + this.playersPanel.Padding = new System.Windows.Forms.Padding(10, 0, 10, 10); + this.playersPanel.Size = new System.Drawing.Size(200, 237); + this.playersPanel.TabIndex = 2; + // + // groupBox3 + // + this.groupBox3.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.groupBox3.Controls.Add(this.playersView); + this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox3.Location = new System.Drawing.Point(10, 0); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(180, 227); + this.groupBox3.TabIndex = 0; + this.groupBox3.TabStop = false; + this.groupBox3.Text = "Players"; + // + // playersView + // + this.playersView.Activation = System.Windows.Forms.ItemActivation.OneClick; + this.playersView.Alignment = System.Windows.Forms.ListViewAlignment.Left; + this.playersView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.dispatcherInfoPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.dispatcherInfoPanel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(234)))), ((int)(((byte)(248))))); - this.dispatcherInfoPanel.Controls.Add(this.linkLabel1); - this.dispatcherInfoPanel.Controls.Add(this.label1); - this.dispatcherInfoPanel.Location = new System.Drawing.Point(0, 0); - this.dispatcherInfoPanel.Margin = new System.Windows.Forms.Padding(0); - this.dispatcherInfoPanel.Name = "dispatcherInfoPanel"; - this.dispatcherInfoPanel.Size = new System.Drawing.Size(784, 30); - this.dispatcherInfoPanel.TabIndex = 0; - this.dispatcherInfoPanel.Visible = false; + this.playersView.Enabled = false; + this.playersView.HideSelection = false; + this.playersView.HoverSelection = true; + this.playersView.Items.AddRange(new System.Windows.Forms.ListViewItem[] { + listViewItem1, + listViewItem2, + listViewItem3, + listViewItem4}); + this.playersView.Location = new System.Drawing.Point(7, 19); + this.playersView.MultiSelect = false; + this.playersView.Name = "playersView"; + this.playersView.Size = new System.Drawing.Size(167, 202); + this.playersView.TabIndex = 1; + this.playersView.UseCompatibleStateImageBehavior = false; + this.playersView.View = System.Windows.Forms.View.List; + this.playersView.MouseClick += new System.Windows.Forms.MouseEventHandler(this.playersView_MouseClick); + // + // messageActionsMenu + // + this.messageActionsMenu.Enabled = false; + this.messageActionsMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.messageSelectedPlayerMenuItem, + this.replyToSelectedPlayerMenuItem}); + this.messageActionsMenu.Name = "contextMenuStrip2"; + this.messageActionsMenu.ShowImageMargin = false; + this.messageActionsMenu.Size = new System.Drawing.Size(197, 48); + // + // messageSelectedPlayerMenuItem + // + this.messageSelectedPlayerMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.messageSelectedPlayerMenuItem.Enabled = false; + this.messageSelectedPlayerMenuItem.Name = "messageSelectedPlayerMenuItem"; + this.messageSelectedPlayerMenuItem.Size = new System.Drawing.Size(196, 22); + this.messageSelectedPlayerMenuItem.Text = "Message the selected player"; + // + // replyToSelectedPlayerMenuItem + // + this.replyToSelectedPlayerMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.replyToSelectedPlayerMenuItem.Enabled = false; + this.replyToSelectedPlayerMenuItem.Name = "replyToSelectedPlayerMenuItem"; + this.replyToSelectedPlayerMenuItem.Size = new System.Drawing.Size(196, 22); + this.replyToSelectedPlayerMenuItem.Text = "Reply to the selected player"; + // + // playerActionsMenu + // + this.playerActionsMenu.Enabled = false; + this.playerActionsMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.makeThisPlayerAnAssistantToolStripMenuItem, + this.jumpToThisPlayerInGameToolStripMenuItem, + this.followToolStripMenuItem, + this.kickFromMultiplayerSessionToolStripMenuItem}); + this.playerActionsMenu.Name = "contextMenuStrip3"; + this.playerActionsMenu.Size = new System.Drawing.Size(230, 92); + // + // makeThisPlayerAnAssistantToolStripMenuItem + // + this.makeThisPlayerAnAssistantToolStripMenuItem.Enabled = false; + this.makeThisPlayerAnAssistantToolStripMenuItem.Name = "makeThisPlayerAnAssistantToolStripMenuItem"; + this.makeThisPlayerAnAssistantToolStripMenuItem.Size = new System.Drawing.Size(229, 22); + this.makeThisPlayerAnAssistantToolStripMenuItem.Text = "Make this player an assistant"; + // + // jumpToThisPlayerInGameToolStripMenuItem + // + this.jumpToThisPlayerInGameToolStripMenuItem.Enabled = false; + this.jumpToThisPlayerInGameToolStripMenuItem.Name = "jumpToThisPlayerInGameToolStripMenuItem"; + this.jumpToThisPlayerInGameToolStripMenuItem.Size = new System.Drawing.Size(229, 22); + this.jumpToThisPlayerInGameToolStripMenuItem.Text = "Jump to this player in game"; + // + // followToolStripMenuItem + // + this.followToolStripMenuItem.Enabled = false; + this.followToolStripMenuItem.Name = "followToolStripMenuItem"; + this.followToolStripMenuItem.Size = new System.Drawing.Size(229, 22); + this.followToolStripMenuItem.Text = "Follow on the map"; + // + // kickFromMultiplayerSessionToolStripMenuItem + // + this.kickFromMultiplayerSessionToolStripMenuItem.Enabled = false; + this.kickFromMultiplayerSessionToolStripMenuItem.Name = "kickFromMultiplayerSessionToolStripMenuItem"; + this.kickFromMultiplayerSessionToolStripMenuItem.Size = new System.Drawing.Size(229, 22); + this.kickFromMultiplayerSessionToolStripMenuItem.Text = "Kick from multiplayer session"; // // DispatchViewerBeta // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(784, 561); - this.Controls.Add(this.flowLayoutPanel1); + this.Controls.Add(this.tableLayoutPanel1); + this.MinimumSize = new System.Drawing.Size(600, 400); this.Name = "DispatchViewerBeta"; - this.Text = "DebugViewerBetaForm"; - this.flowLayoutPanel1.ResumeLayout(false); - this.dispatcherInfoPanel.ResumeLayout(false); - this.dispatcherInfoPanel.PerformLayout(); + this.Text = "Dispatcher window"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.DispatchViewerBeta_FormClosing); + this.playerRolePanel.ResumeLayout(false); + this.playerRolePanel.PerformLayout(); + this.tableLayoutPanel1.ResumeLayout(false); + this.tableLayoutPanel2.ResumeLayout(false); + this.tableLayoutPanel3.ResumeLayout(false); + this.messagesPanel.ResumeLayout(false); + this.messagesPanel.PerformLayout(); + this.canvasPanel.ResumeLayout(false); + this.canvasPanel.PerformLayout(); + this.mapCustomizationPanel.ResumeLayout(false); + this.mapCustomizationPanel.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.mapCanvas)).EndInit(); + this.tableLayoutPanel4.ResumeLayout(false); + this.tableLayoutPanel4.PerformLayout(); + this.multiplayerSettingsPanel.ResumeLayout(false); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + this.mapSettingsPanel.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.mapResolutionUpDown)).EndInit(); + this.playersPanel.ResumeLayout(false); + this.groupBox3.ResumeLayout(false); + this.messageActionsMenu.ResumeLayout(false); + this.playerActionsMenu.ResumeLayout(false); this.ResumeLayout(false); } #endregion - private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; - private System.Windows.Forms.Panel dispatcherInfoPanel; - private System.Windows.Forms.LinkLabel linkLabel1; + public System.Windows.Forms.Panel playerRolePanel; + private System.Windows.Forms.Label playerRoleExplanation; + private System.Windows.Forms.LinkLabel playerRoleLink; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3; + public System.Windows.Forms.Panel messagesPanel; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.ContextMenuStrip messageActionsMenu; + private System.Windows.Forms.ToolStripMenuItem messageSelectedPlayerMenuItem; + private System.Windows.Forms.ToolStripMenuItem replyToSelectedPlayerMenuItem; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel4; + private System.Windows.Forms.Panel mapSettingsPanel; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.CheckBox checkBox3; + private System.Windows.Forms.CheckBox allowChangingSignalsCheckbox; + private System.Windows.Forms.CheckBox drawPathCheckbox; + public System.Windows.Forms.Panel multiplayerSettingsPanel; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.CheckBox penaltyCheckbox; + private System.Windows.Forms.CheckBox checkBox5; + private System.Windows.Forms.CheckBox allowJoiningCheckbox; + private System.Windows.Forms.NumericUpDown mapResolutionUpDown; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Button button5; + private System.Windows.Forms.Button centerOnMyTrainButton; + private System.Windows.Forms.Button seeTrainInGameButton; + private System.Windows.Forms.Panel playersPanel; + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.ListView playersView; + private System.Windows.Forms.ContextMenuStrip playerActionsMenu; + private System.Windows.Forms.ToolStripMenuItem makeThisPlayerAnAssistantToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem followToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem jumpToThisPlayerInGameToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem kickFromMultiplayerSessionToolStripMenuItem; + private System.Windows.Forms.Panel canvasPanel; + public System.Windows.Forms.PictureBox mapCanvas; + private System.Windows.Forms.Button mapCustomizationButton; + private System.Windows.Forms.Panel mapCustomizationPanel; + private System.Windows.Forms.CheckBox useAntiAliasingCheckbox; + private System.Windows.Forms.ListBox messages; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.CheckBox showTimeCheckbox; + private System.Windows.Forms.Button rotateThemesButton; + public System.Windows.Forms.Label timeLabel; + private System.Windows.Forms.CheckBox showSignalsCheckbox; + private System.Windows.Forms.CheckBox showSwitchesCheckbox; + private System.Windows.Forms.CheckBox showSidingLabelsCheckbox; + private System.Windows.Forms.CheckBox showPlatformLabelsCheckbox; + private System.Windows.Forms.CheckBox showPlatformsCheckbox; private System.Windows.Forms.Label label1; - private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.CheckBox showSignalStateCheckbox; + private System.Windows.Forms.RadioButton showActiveTrainsRadio; + private System.Windows.Forms.CheckBox showTrainStateCheckbox; + private System.Windows.Forms.CheckBox showTrainLabelsCheckbox; + private System.Windows.Forms.RadioButton showAllTrainsRadio; } } + diff --git a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs index bbfa9415c0..c960fbb05d 100644 --- a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs +++ b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs @@ -1,21 +1,9 @@ using System; using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; -using System; -using System.Collections.Generic; using System.Diagnostics; using System.Drawing; -using System.IO; using System.Linq; -using System.Net; using System.Windows.Forms; -using GNU.Gettext.WinForms; using Microsoft.Xna.Framework; using Orts.Formats.Msts; using Orts.MultiPlayer; @@ -25,26 +13,117 @@ using Orts.Simulation.Signalling; using Orts.Viewer3D.Popups; using ORTS.Common; +using Color = System.Drawing.Color; namespace Orts.Viewer3D.Debugging { public partial class DispatchViewerBeta : Form { + #region Variables + /// + /// Reference to the main simulator object. + /// + public readonly Simulator simulator; + private MapDataProvider MapDataProvider; /// /// Used to periodically check if we should shift the view when the /// user is holding down a "shift view" button. /// private Timer UITimer; - public Viewer Viewer; + private int IM_Width; + private int IM_Height; + + /// + /// True when the user is dragging the route view + /// + public bool Dragging; + private WorldPosition worldPos; + public float xScale = 1; // pixels / metre + public float yScale = 1; // pixels / metre + + string name = ""; + + public List switchItemsDrawn; + public List signalItemsDrawn; + public SwitchWidget switchPickedItem; + public SignalWidget signalPickedItem; + public bool switchPickedItemHandled; + public double switchPickedTime; + public bool signalPickedItemHandled; + public double signalPickedTime; + public bool DrawPath = true; //draw train path + TrackNode[] nodes; + + public List selectedTrainList; + /// + /// contains the last position of the mouse + /// + private System.Drawing.Point LastCursorPosition = new System.Drawing.Point(); + public Pen redPen = new Pen(Color.Red); + public Pen greenPen = new Pen(Color.Green); + public Pen orangePen = new Pen(Color.Orange); + public Pen trainPen = new Pen(Color.DarkGreen); + public Pen pathPen = new Pen(Color.DeepPink); + public Pen grayPen = new Pen(Color.Gray); + public Pen PlatformPen = new Pen(Color.Blue); + public Pen TrackPen = new Pen(Color.FromArgb(46, 64, 83)); + public Pen ZoomTargetPen = new Pen(Color.FromArgb(46, 64, 83)); + // the train selected by leftclicking the mouse + public Train PickedTrain; + /// + /// Defines the area to view, in meters. The left edge is meters from the leftmost extent of the route. + /// + public RectangleF ViewWindow; + + // Extents of the route in meters measured from the World origin + public float minX = float.MaxValue; + public float minY = float.MaxValue; + public float maxX = float.MinValue; + public float maxY = float.MinValue; + + public int RedrawCount; + public Font trainFont = new Font("Segoe UI Semibold", 10, FontStyle.Bold); + public Font sidingFont = new Font("Segoe UI Semibold", 10, FontStyle.Regular); + public Font PlatformFont = new Font("Segoe UI Semibold", 10, FontStyle.Regular); + public Font SignalFont = new Font("Segoe UI Semibold", 10, FontStyle.Regular); + private SolidBrush trainBrush = new SolidBrush(Color.Red); + public SolidBrush sidingBrush = new SolidBrush(Color.Blue); + public SolidBrush PlatformBrush = new SolidBrush(Color.DarkBlue); + public SolidBrush SignalBrush = new SolidBrush(Color.DarkRed); + public SolidBrush InactiveTrainBrush = new SolidBrush(Color.DarkRed); + + private double lastUpdateTime; + + private bool MapCustomizationVisible = false; + #endregion + public DispatchViewerBeta(Simulator simulator, Viewer viewer) { InitializeComponent(); + if (simulator == null) + throw new ArgumentNullException("simulator", "Simulator object cannot be null."); + + this.simulator = simulator; Viewer = viewer; + MapDataProvider = new MapDataProvider(this); + nodes = simulator.TDB.TrackDB.TrackNodes; + + InitializeForm(); - initializeForm(); + ViewWindow = new RectangleF(0, 0, 5000f, 5000f); + mapResolutionUpDown.Accelerations.Add(new NumericUpDownAcceleration(1, 100)); + /*boxSetSignal.Items.Add("System Controlled"); + boxSetSignal.Items.Add("Stop"); + boxSetSignal.Items.Add("Approach"); + boxSetSignal.Items.Add("Proceed"); + chkAllowUserSwitch.Checked = false;*/ + selectedTrainList = new List(); + + InitializeData(); + InitializeImage(); // Initialise the timer used to handle user input UITimer = new Timer(); @@ -53,32 +132,1957 @@ public DispatchViewerBeta(Simulator simulator, Viewer viewer) UITimer.Start(); } - void initializeForm() + void InitializeForm() { if (MPManager.IsMultiPlayer() && MPManager.IsServer()) { - dispatcherInfoPanel.Visible = true; + playerRolePanel.Visible = true; + messagesPanel.Visible = true; + multiplayerSettingsPanel.Visible = true; } } - void UITimer_Tick(object sender, EventArgs e) + #region initData + private void InitializeData() { - if (Viewer.DebugViewerBetaEnabled == false) // Ctrl+9 sets this true to initialise the window and make it visible + /*if (!loaded) { - Visible = false; + // do this only once + loaded = true; + //trackSections.DataSource = new List(simulator.InterlockingSystem.Tracks.Values).ToArray(); + Localizer.Localize(this, Viewer.Catalog); + }*/ + + switchItemsDrawn = new List(); + signalItemsDrawn = new List(); + switches = new List(); + for (int i = 0; i < nodes.Length; i++) + { + TrackNode currNode = nodes[i]; + + if (currNode != null) + { + + if (currNode.TrEndNode) + { + //buffers.Add(new PointF(currNode.UiD.TileX * 2048 + currNode.UiD.X, currNode.UiD.TileZ * 2048 + currNode.UiD.Z)); + } + else if (currNode.TrVectorNode != null) + { + + if (currNode.TrVectorNode.TrVectorSections.Length > 1) + { + AddSegments(segments, currNode, currNode.TrVectorNode.TrVectorSections, ref minX, ref minY, ref maxX, ref maxY, simulator); + } + else + { + TrVectorSection s = currNode.TrVectorNode.TrVectorSections[0]; + + foreach (TrPin pin in currNode.TrPins) + { + + TrackNode connectedNode = nodes[pin.Link]; + + dVector A = new dVector(s.TileX, s.X, s.TileZ, +s.Z); + dVector B = new dVector(connectedNode.UiD.TileX, connectedNode.UiD.X, connectedNode.UiD.TileZ, connectedNode.UiD.Z); + segments.Add(new LineSegment(A, B, /*s.InterlockingTrack.IsOccupied*/ false, null)); + } + + + } + } + else if (currNode.TrJunctionNode != null) + { + foreach (TrPin pin in currNode.TrPins) + { + var vectorSections = nodes[pin.Link]?.TrVectorNode?.TrVectorSections; + if (vectorSections == null || vectorSections.Length < 1) + continue; + TrVectorSection item = pin.Direction == 1 ? vectorSections.First() : vectorSections.Last(); + dVector A = new dVector(currNode.UiD.TileX, currNode.UiD.X, currNode.UiD.TileZ, +currNode.UiD.Z); + dVector B = new dVector(item.TileX, +item.X, item.TileZ, +item.Z); + var x = dVector.DistanceSqr(A, B); + if (x < 0.1) continue; + segments.Add(new LineSegment(B, A, /*s.InterlockingTrack.IsOccupied*/ false, item)); + } + switches.Add(new SwitchWidget(currNode)); + } + } + } + + var maxsize = maxX - minX > maxY - minY ? maxX - minX : maxY - minY; + // Take up to next 100 + maxsize = (int)(maxsize / 100 + 1) * 100; + mapResolutionUpDown.Maximum = (decimal)maxsize; + Inited = true; + + if (simulator.TDB == null || simulator.TDB.TrackDB == null || simulator.TDB.TrackDB.TrItemTable == null) return; + + MapDataProvider.PopulateItemLists(); + } + + bool Inited; + public List segments = new List(); + public List switches; + public List signals = new List(); + public List sidings = new List(); + public List platforms = new List(); + + /// + /// Initialises the picturebox and the image it contains. + /// + public void InitializeImage() + { + /*mapCanvas.Width = IM_Width; + mapCanvas.Height = IM_Height;*/ + + if (mapCanvas.Image != null) + { + mapCanvas.Image.Dispose(); } - Visible = true; + + mapCanvas.Image = new Bitmap(mapCanvas.Width, mapCanvas.Height); + /*imageList1 = new ImageList(); + playersView.View = View.LargeIcon; + imageList1.ImageSize = new Size(64, 64); + playersView.LargeImageList = imageList1;*/ } + #endregion - private void label1_Click(object sender, EventArgs e) + #region Draw + public bool firstShow = true; + public bool followTrain; + public float subX, subY; + public float oldWidth; + public float oldHeight; + + //determine locations of buttons and boxes + void DetermineLocations() { + IM_Width = mapCanvas.Width; + IM_Height = mapCanvas.Height; + + if (mapCanvas.Image != null) + { + mapCanvas.Image.Dispose(); + } + mapCanvas.Image = new Bitmap(mapCanvas.Width, mapCanvas.Height); + /*if (Height < 600 || Width < 800) return; + if (oldHeight != Height || oldWidth != label1.Left)//use the label "Res" as anchor point to determine the picture size + { + oldWidth = label1.Left; oldHeight = Height; + IM_Width = label1.Left - 20; + IM_Height = Height - mapCanvas.Top; + mapCanvas.Width = IM_Width; + mapCanvas.Height = Height - mapCanvas.Top - 40; + if (mapCanvas.Image != null) + { + mapCanvas.Image.Dispose(); + } + + mapCanvas.Image = new Bitmap(mapCanvas.Width, mapCanvas.Height); + + if (btnAssist.Left - 10 < composeMSG.Right) + { + var size = composeMSG.Width; + composeMSG.Left = msgAll.Left = msgSelected.Left = reply2Selected.Left = btnAssist.Left - 10 - size; + MSG.Width = messages.Width = composeMSG.Left - 20; + MSG.Width = messages.Width = composeMSG.Left - 20; + } + firstShow = true; + }*/ } - private void label1_Click_1(object sender, EventArgs e) + /// + /// Regenerates the 2D view. At the moment, examines the track network + /// each time the view is drawn. Later, the traversal and drawing can be separated. + /// + public void GenerateView(bool dragging = false) { + if (!Inited) return; + + timeLabel.Visible = showTimeCheckbox.Checked; + if (showTimeCheckbox.Checked) + MapDataProvider.ShowSimulationTime(); + + if (mapCanvas.Image == null) InitializeImage(); + DetermineLocations(); + + /*if (firstShow) + { + if (!MPManager.IsServer()) + { + chkAllowUserSwitch.Visible = false; + chkAllowUserSwitch.Checked = false; + rmvButton.Visible = false; + btnAssist.Visible = false; + btnNormal.Visible = false; + msgAll.Text = "MSG to Server"; + } + else + { + msgAll.Text = "MSG to All"; + } + if (MPManager.IsServer()) + { + rmvButton.Visible = true; + chkAllowNew.Visible = true; + chkAllowUserSwitch.Visible = true; + } + else + { + rmvButton.Visible = false; + chkAllowNew.Visible = false; + chkAllowUserSwitch.Visible = false; + chkBoxPenalty.Visible = false; + chkPreferGreen.Visible = false; + } + }*/ + if (firstShow || followTrain) + { + //see who should I look at: + //if the player is selected in the avatar list, show the player, otherwise, show the one with the lowest index + WorldPosition pos = Program.Simulator.PlayerLocomotive == null ? Program.Simulator.Trains.First().Cars.First().WorldPosition : Program.Simulator.PlayerLocomotive.WorldPosition; + if (playersView.SelectedIndices.Count > 0 && !playersView.SelectedIndices.Contains(0)) + { + int i = playersView.SelectedIndices.Cast().Min(); + string name = (playersView.Items[i].Text ?? "").Split(' ').First().Trim(); + if (MPManager.OnlineTrains.Players.TryGetValue(name, out OnlinePlayer player)) + pos = player?.Train?.Cars?.FirstOrDefault()?.WorldPosition; + else if (MPManager.Instance().lostPlayer.TryGetValue(name, out OnlinePlayer lost)) + pos = lost?.Train?.Cars?.FirstOrDefault()?.WorldPosition; + } + if (pos == null) + pos = PickedTrain?.Cars?.FirstOrDefault()?.WorldPosition; + if (pos != null) + { + var ploc = new PointF(pos.TileX * 2048 + pos.Location.X, pos.TileZ * 2048 + pos.Location.Z); + ViewWindow.X = ploc.X - minX - ViewWindow.Width / 2; ViewWindow.Y = ploc.Y - minY - ViewWindow.Width / 2; + firstShow = false; + } + } + + using (Graphics g = Graphics.FromImage(mapCanvas.Image)) + { + // Optional anti-aliasing + if (useAntiAliasingCheckbox.Checked == true) + g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality; + + subX = minX + ViewWindow.X; subY = minY + ViewWindow.Y; + g.Clear(Color.White); + + xScale = mapCanvas.Width / ViewWindow.Width; + yScale = mapCanvas.Height / ViewWindow.Height; + xScale = yScale = Math.Max(xScale, yScale); // Make X and Y scales the same to maintain correct angles + + // Set the default pen to represent 1 meter + var scale = (float)Math.Round((double)xScale); // Round to nearest pixels/meter + var penWidth = (int)MathHelper.Clamp(scale, 1, 4); // Keep 1 <= width <= 4 pixels + + PointF[] points = new PointF[3]; + Pen p = grayPen; + + // TODO: Refactor + p.Width = MathHelper.Clamp(xScale, 1, 3); + greenPen.Width = orangePen.Width = redPen.Width = p.Width; pathPen.Width = 2 * p.Width; + trainPen.Width = p.Width * 6; + + grayPen.Width = greenPen.Width = orangePen.Width = redPen.Width = penWidth; + pathPen.Width = penWidth * 2; + + float[] dashPattern = { 4, 2 }; + ZoomTargetPen.DashPattern = dashPattern; + + + + var forwardDist = 100 / xScale; if (forwardDist < 5) forwardDist = 5; + + /*PointF scaledA = new PointF(0, 0); + PointF scaledB = new PointF(0, 0); + PointF scaledC = new PointF(0, 0);*/ + + // Draw platforms first because track is drawn over the thicker platform line + DrawPlatforms(g, penWidth); + + PointF scaledA, scaledB; + DrawTrack(g, p, out scaledA, out scaledB); + + if (Dragging == false) + { + // Draw trains and path + DrawTrains(g, scaledA, scaledB); + + // Keep widgetWidth <= 15 pixels + var widgetWidth = Math.Min(penWidth * 6, 15); + + // Draw signals on top of path so they are easier to see. + signalItemsDrawn.Clear(); + ShowSignals(g, scaledB, widgetWidth); + + // Draw switches + switchItemsDrawn.Clear(); + ShowSwitches(g, widgetWidth); + + // Draw labels for sidings and platforms last so they go on top for readability + MapDataProvider.CleanTextCells(); // Empty the listing of labels ready for adding labels again + ShowPlatformLabels(g); // Platforms take priority over sidings and signal states + ShowSidingLabels(g); + } + + DrawZoomTarget(g); + + /* + foreach (var line in segments) + { + + scaledA.X = (line.A.TileX * 2048 - subX + (float)line.A.X) * xScale; scaledA.Y = mapCanvas.Height - (line.A.TileZ * 2048 - subY + (float)line.A.Z) * yScale; + scaledB.X = (line.B.TileX * 2048 - subX + (float)line.B.X) * xScale; scaledB.Y = mapCanvas.Height - (line.B.TileZ * 2048 - subY + (float)line.B.Z) * yScale; + + if ((scaledA.X < 0 && scaledB.X < 0) || (scaledA.X > mapCanvas.Width && scaledB.X > IM_Width) || (scaledA.Y > IM_Height && scaledB.Y > IM_Height) || (scaledA.Y < 0 && scaledB.Y < 0)) + continue; + + if (line.isCurved == true) + { + scaledC.X = ((float)line.C.X - subX) * xScale; scaledC.Y = mapCanvas.Height - ((float)line.C.Z - subY) * yScale; + points[0] = scaledA; points[1] = scaledC; points[2] = scaledB; + g.DrawCurve(p, points); + } + else + { + g.DrawLine(p, scaledA, scaledB); + } + } + + switchItemsDrawn.Clear(); + signalItemsDrawn.Clear(); + float x, y; + PointF scaledItem = new PointF(0f, 0f); + var width = 6f * p.Width; if (width > 15) width = 15;//not to make it too large + for (var i = 0; i < switches.Count; i++) + { + SwitchWidget sw = switches[i]; + + x = (sw.Location.X - subX) * xScale; y = mapCanvas.Height - (sw.Location.Y - subY) * yScale; + + if (x < 0 || x > IM_Width || y > IM_Height || y < 0) continue; + + scaledItem.X = x; scaledItem.Y = y; + + if (sw.Item.TrJunctionNode.SelectedRoute == sw.main) g.FillEllipse(Brushes.Black, GetRect(scaledItem, width)); + else g.FillEllipse(Brushes.Gray, GetRect(scaledItem, width)); + + sw.Location2D.X = scaledItem.X; sw.Location2D.Y = scaledItem.Y; + switchItemsDrawn.Add(sw); + } + + foreach (var s in signals) + { + if (float.IsNaN(s.Location.X) || float.IsNaN(s.Location.Y)) continue; + x = (s.Location.X - subX) * xScale; y = mapCanvas.Height - (s.Location.Y - subY) * yScale; + if (x < 0 || x > IM_Width || y > IM_Height || y < 0) continue; + scaledItem.X = x; scaledItem.Y = y; + s.Location2D.X = scaledItem.X; s.Location2D.Y = scaledItem.Y; + if (s.Signal.isSignalNormal())//only show nor + { + var color = Brushes.Green; + var pen = greenPen; + if (s.IsProceed == 0) + { + } + else if (s.IsProceed == 1) + { + color = Brushes.Orange; + pen = orangePen; + } + else + { + color = Brushes.Red; + pen = redPen; + } + g.FillEllipse(color, GetRect(scaledItem, width)); + signalItemsDrawn.Add(s); + if (s.hasDir) + { + scaledB.X = (s.Dir.X - subX) * xScale; scaledB.Y = mapCanvas.Height - (s.Dir.Y - subY) * yScale; + g.DrawLine(pen, scaledItem, scaledB); + } + } + } + */ + /*if (true) + { + CleanVerticalCells();//clean the drawing area for text of sidings and platforms + foreach (var sw in sidings) + scaledItem = DrawSiding(g, scaledItem, sw); + foreach (var pw in platforms) + scaledItem = DrawPlatform(g, scaledItem, pw); + + var margin = 30 * xScale;//margins to determine if we want to draw a train + var margin2 = 5000 * xScale; + + //variable for drawing train path + var mDist = 5000f; var pDist = 50; //segment length when draw path + + selectedTrainList.Clear(); + foreach (var t in simulator.Trains) selectedTrainList.Add(t); + + var redTrain = selectedTrainList.Count; + + //choosen trains will be drawn later using blue, so it will overlap on the red lines + var chosen = playersView.SelectedItems; + if (chosen.Count > 0) + { + for (var i = 0; i < chosen.Count; i++) + { + var name = chosen[i].Text.Split(' ')[0].Trim(); //filter out (H) in the text + var train = MPManager.OnlineTrains.findTrain(name); + if (train != null) { selectedTrainList.Remove(train); selectedTrainList.Add(train); redTrain--; } + //if selected include myself, will show it as blue + if (MPManager.GetUserName() == name && Program.Simulator.PlayerLocomotive != null) + { + selectedTrainList.Remove(Program.Simulator.PlayerLocomotive.Train); selectedTrainList.Add(Program.Simulator.PlayerLocomotive.Train); + redTrain--; + } + + } + } + + //trains selected in the avatar view list will be drawn in blue, others will be drawn in red + pathPen.Color = Color.Red; + var drawRed = 0; + int ValidTrain = selectedTrainList.Count(); + //add trains quit into the end, will draw them in gray + var quitTrains = MPManager.Instance().lostPlayer.Values + .Select((OnlinePlayer lost) => lost?.Train) + .Where((Train t) => t != null) + .Where((Train t) => !selectedTrainList.Contains(t)); + selectedTrainList.AddRange(quitTrains); + foreach (Train t in selectedTrainList) + { + drawRed++;//how many red has been drawn + if (drawRed > redTrain) pathPen.Color = Color.Blue; //more than the red should be drawn, thus draw in blue + + name = ""; + TrainCar firstCar = null; + if (t.LeadLocomotive != null) + { + worldPos = t.LeadLocomotive.WorldPosition; + name = t.GetTrainName(t.LeadLocomotive.CarID); + firstCar = t.LeadLocomotive; + } + else if (t.Cars != null && t.Cars.Count > 0) + { + worldPos = t.Cars[0].WorldPosition; + name = t.GetTrainName(t.Cars[0].CarID); + if (t.TrainType == Train.TRAINTYPE.AI) + name = t.Number.ToString() + ":" + t.Name; + firstCar = t.Cars[0]; + } + else continue; + + if (xScale < 0.3 || t.FrontTDBTraveller == null || t.RearTDBTraveller == null) + { + worldPos = firstCar.WorldPosition; + scaledItem.X = (worldPos.TileX * 2048 - subX + worldPos.Location.X) * xScale; + scaledItem.Y = mapCanvas.Height - (worldPos.TileZ * 2048 - subY + worldPos.Location.Z) * yScale; + if (scaledItem.X < -margin2 || scaledItem.X > IM_Width + margin2 || scaledItem.Y > IM_Height + margin2 || scaledItem.Y < -margin2) continue; + if (drawRed > ValidTrain) g.FillRectangle(Brushes.Gray, GetRect(scaledItem, 15f)); + else + { + if (t == PickedTrain) g.FillRectangle(Brushes.Red, GetRect(scaledItem, 15f)); + else g.FillRectangle(Brushes.DarkGreen, GetRect(scaledItem, 15f)); + scaledItem.Y -= 25; + DrawTrainPath(t, subX, subY, pathPen, g, scaledA, scaledB, pDist, mDist); + } + g.DrawString(name, trainFont, trainBrush, scaledItem); + continue; + } + var loc = t.FrontTDBTraveller.WorldLocation; + x = (loc.TileX * 2048 + loc.Location.X - subX) * xScale; y = mapCanvas.Height - (loc.TileZ * 2048 + loc.Location.Z - subY) * yScale; + if (x < -margin2 || x > IM_Width + margin2 || y > IM_Height + margin2 || y < -margin2) continue; + + //train quit will not draw path, others will draw it + if (drawRed <= ValidTrain) DrawTrainPath(t, subX, subY, pathPen, g, scaledA, scaledB, pDist, mDist); + + trainPen.Color = Color.DarkGreen; + foreach (var car in t.Cars) + { + Traveller t1 = new Traveller(t.RearTDBTraveller); + worldPos = car.WorldPosition; + var dist = t1.DistanceTo(worldPos.WorldLocation.TileX, worldPos.WorldLocation.TileZ, worldPos.WorldLocation.Location.X, worldPos.WorldLocation.Location.Y, worldPos.WorldLocation.Location.Z); + if (dist > 0) + { + t1.Move(dist - 1 + car.CarLengthM / 2); + x = (t1.TileX * 2048 + t1.Location.X - subX) * xScale; y = mapCanvas.Height - (t1.TileZ * 2048 + t1.Location.Z - subY) * yScale; + //x = (worldPos.TileX * 2048 + worldPos.Location.X - minX - ViewWindow.X) * xScale; y = pictureBox1.Height - (worldPos.TileZ * 2048 + worldPos.Location.Z - minY - ViewWindow.Y) * yScale; + if (x < -margin || x > IM_Width + margin || y > IM_Height + margin || y < -margin) continue; + + scaledItem.X = x; scaledItem.Y = y; + + t1.Move(-car.CarLengthM); + x = (t1.TileX * 2048 + t1.Location.X - subX) * xScale; y = mapCanvas.Height - (t1.TileZ * 2048 + t1.Location.Z - subY) * yScale; + if (x < -margin || x > IM_Width + margin || y > IM_Height + margin || y < -margin) continue; + + scaledA.X = x; scaledA.Y = y; + + //if the train has quit, will draw in gray, if the train is selected by left click of the mouse, will draw it in red + if (drawRed > ValidTrain) trainPen.Color = Color.Gray; + else if (t == PickedTrain) trainPen.Color = Color.Red; + g.DrawLine(trainPen, scaledA, scaledItem); + } + } + worldPos = firstCar.WorldPosition; + scaledItem.X = (worldPos.TileX * 2048 - subX + worldPos.Location.X) * xScale; + scaledItem.Y = -25 + mapCanvas.Height - (worldPos.TileZ * 2048 - subY + worldPos.Location.Z) * yScale; + + g.DrawString(name, trainFont, trainBrush, scaledItem); + + } + if (switchPickedItemHandled) + switchPickedItem = null; + if (signalPickedItemHandled) + signalPickedItem = null; + }*/ + } + + mapCanvas.Invalidate(); // Triggers a re-paint } - } + + private void DrawPlatforms(Graphics g, int penWidth) + { + if (!showPlatformsCheckbox.Checked) + return; + + // Platforms can be obtrusive, so draw in solid blue only when zoomed in and fade them as we zoom out + switch (penWidth) + { + case 1: + PlatformPen.Color = Color.FromArgb(174, 214, 241); break; + case 2: + PlatformPen.Color = Color.FromArgb(93, 173, 226); break; + default: + PlatformPen.Color = Color.FromArgb(46, 134, 193); break; + } + + var width = grayPen.Width * 3; + PlatformPen.Width = width; + foreach (var p in platforms) + { + var scaledA = new PointF((p.Extent1.X - subX) * xScale, mapCanvas.Height - (p.Extent1.Y - subY) * yScale); + var scaledB = new PointF((p.Extent2.X - subX) * xScale, mapCanvas.Height - (p.Extent2.Y - subY) * yScale); + + MapDataProvider.FixForBadData(width, ref scaledA, ref scaledB, p.Extent1, p.Extent2); + g.DrawLine(PlatformPen, scaledA, scaledB); + } + } + + private void DrawTrack(Graphics g, Pen p, out PointF scaledA, out PointF scaledB) + { + + PointF[] points = new PointF[3]; + scaledA = new PointF(0, 0); + scaledB = new PointF(0, 0); + PointF scaledC = new PointF(0, 0); + foreach (var line in segments) + { + scaledA.X = (line.A.TileX * 2048 - subX + (float)line.A.X) * xScale; + scaledA.Y = mapCanvas.Height - (line.A.TileZ * 2048 - subY + (float)line.A.Z) * yScale; + scaledB.X = (line.B.TileX * 2048 - subX + (float)line.B.X) * xScale; + scaledB.Y = mapCanvas.Height - (line.B.TileZ * 2048 - subY + (float)line.B.Z) * yScale; + + if ((scaledA.X < 0 && scaledB.X < 0) + || (scaledA.Y < 0 && scaledB.Y < 0)) + continue; + + if (line.isCurved == true) + { + scaledC.X = ((float)line.C.X - subX) * xScale; scaledC.Y = mapCanvas.Height - ((float)line.C.Z - subY) * yScale; + points[0] = scaledA; points[1] = scaledC; points[2] = scaledB; + g.DrawCurve(TrackPen, points); + } + else g.DrawLine(TrackPen, scaledA, scaledB); + } + } + + private void DrawTrains(Graphics g, PointF scaledA, PointF scaledB) + { + var margin = 30 * xScale; //margins to determine if we want to draw a train + var margin2 = 5000 * xScale; + + //variable for drawing train path + var mDist = 5000f; var pDist = 50; //segment length when drawing path + + selectedTrainList.Clear(); + + if (simulator.TimetableMode) + { + // Add the player's train + if (simulator.PlayerLocomotive.Train is Orts.Simulation.AIs.AITrain) + selectedTrainList.Add(simulator.PlayerLocomotive.Train as Orts.Simulation.AIs.AITrain); + + // and all the other trains + foreach (var train in simulator.AI.AITrains) + selectedTrainList.Add(train); + } + else + { + foreach (var train in simulator.Trains) + selectedTrainList.Add(train); + } + + foreach (var train in selectedTrainList) + { + string trainName; + WorldPosition worldPos; + TrainCar locoCar = null; + if (train.LeadLocomotive != null) + { + trainName = train.GetTrainName(train.LeadLocomotive.CarID); + locoCar = train.LeadLocomotive; + } + else if (train.Cars != null && train.Cars.Count > 0) + { + trainName = train.GetTrainName(train.Cars[0].CarID); + if (train.TrainType == Train.TRAINTYPE.AI) + trainName = train.Number.ToString() + ":" + train.Name; + + locoCar = train.Cars.Where(r => r is MSTSLocomotive).FirstOrDefault(); + + // Skip trains with no loco + if (locoCar == null) + continue; + } + else + continue; + + // Draw the path, then each car of the train, then maybe the name + var loc = train.FrontTDBTraveller.WorldLocation; + float x = (loc.TileX * 2048 + loc.Location.X - subX) * xScale; + float y = mapCanvas.Height - (loc.TileZ * 2048 + loc.Location.Z - subY) * yScale; + + // If train out of view then skip it. + if (x < -margin2 + || y < -margin2) + continue; + + DrawTrainPath(train, subX, subY, pathPen, g, scaledA, scaledB, pDist, mDist); + + // If zoomed out, so train occupies less than 2 * minTrainPx pixels, then + // draw the train as 2 squares of combined length minTrainPx. + const int minTrainPx = 24; + + // pen | train | Values for a good presentation + // 1 10 + // 2 12 + // 3 14 + // 4 16 + trainPen.Width = grayPen.Width * 6; + + var minTrainLengthM = minTrainPx / xScale; // Calculate length equivalent to a set number of pixels + bool drawEveryCar = IsDrawEveryCar(train, minTrainLengthM); + + foreach (var car in train.Cars) + DrawCar(g, train, car, locoCar, margin, minTrainPx, drawEveryCar); + + worldPos = locoCar.WorldPosition; + var scaledTrain = new PointF(); + scaledTrain.X = (worldPos.TileX * 2048 - subX + worldPos.Location.X) * xScale; + scaledTrain.Y = -25 + mapCanvas.Height - (worldPos.TileZ * 2048 - subY + worldPos.Location.Z) * yScale; + if (showTrainLabelsCheckbox.Checked) + DrawTrainLabels(g, train, trainName, locoCar, scaledTrain); + } + } + + private void DrawCar(Graphics g, Train train, TrainCar car, TrainCar locoCar, float margin, int minTrainPx, bool drawEveryCar) + { + if (drawEveryCar == false) + // Skip the intermediate cars + if (car != train.Cars.First() && car != train.Cars.Last()) + return; + + var t = new Traveller(train.RearTDBTraveller); + var worldPos = car.WorldPosition; + var dist = t.DistanceTo(worldPos.WorldLocation.TileX, worldPos.WorldLocation.TileZ, worldPos.WorldLocation.Location.X, worldPos.WorldLocation.Location.Y, worldPos.WorldLocation.Location.Z); + if (dist > -1) + { + var scaledTrain = new PointF(); + float x; + float y; + if (drawEveryCar) + { + t.Move(dist + car.CarLengthM / 2); // Move along from centre of car to front of car + x = (t.TileX * 2048 + t.Location.X - subX) * xScale; + y = mapCanvas.Height - (t.TileZ * 2048 + t.Location.Z - subY) * yScale; + + // If car out of view then skip it. + if (x < -margin || y < -margin) + return; + + t.Move(-car.CarLengthM + (1 / xScale)); // Move from front of car to rear less 1 pixel to create a visible gap + scaledTrain.X = x; scaledTrain.Y = y; + } + else // Draw the train as 2 boxes of fixed size + { + trainPen.Width = minTrainPx / 2; + if (car == train.Cars.First()) + { + // Draw first half a train back from the front of the first car as abox + t.Move(dist + car.CarLengthM / 2); + x = (t.TileX * 2048 + t.Location.X - subX) * xScale; + y = mapCanvas.Height - (t.TileZ * 2048 + t.Location.Z - subY) * yScale; + + // If car out of view then skip it. + if (x < -margin || y < -margin) + return; + + t.Move(-(minTrainPx - 2) / xScale / 2); // Move from front of car to rear less 1 pixel to create a visible gap + } + else // car == t.Cars.Last() + { + // Draw half a train back from the rear of the first box + worldPos = train.Cars.First().WorldPosition; + dist = t.DistanceTo(worldPos.WorldLocation.TileX, worldPos.WorldLocation.TileZ, worldPos.WorldLocation.Location.X, worldPos.WorldLocation.Location.Y, worldPos.WorldLocation.Location.Z); + t.Move(dist + train.Cars.First().CarLengthM / 2 - minTrainPx / xScale / 2); + x = (t.TileX * 2048 + t.Location.X - subX) * xScale; + y = mapCanvas.Height - (t.TileZ * 2048 + t.Location.Z - subY) * yScale; + if (x < -margin || y < -margin) + return; + t.Move(-minTrainPx / xScale / 2); + } + scaledTrain.X = x; scaledTrain.Y = y; + } + x = (t.TileX * 2048 + t.Location.X - subX) * xScale; + y = mapCanvas.Height - (t.TileZ * 2048 + t.Location.Z - subY) * yScale; + + // If car out of view then skip it. + if (x < -margin || y < -margin) + return; + + SetTrainColor(train, locoCar, car); + g.DrawLine(trainPen, new PointF(x, y), scaledTrain); + } + } + + private void SetTrainColor(Train t, TrainCar locoCar, TrainCar car) + { + // Draw train in green with locos in brown + // HSL values + // Saturation: 100/100 + // Hue: if loco then H=50/360 else H=120/360 + // Lightness: if active then L=40/100 else L=30/100 + // RGB values + // active loco: RGB 204,170,0 + // inactive loco: RGB 153,128,0 + // active car: RGB 0,204,0 + // inactive car: RGB 0,153,0 + if (MapDataProvider.IsActiveTrain(t as Simulation.AIs.AITrain)) + if (car is MSTSLocomotive) + trainPen.Color = (car == locoCar) ? Color.FromArgb(204, 170, 0) : Color.FromArgb(153, 128, 0); + else + trainPen.Color = Color.FromArgb(0, 204, 0); + else + if (car is MSTSLocomotive) + trainPen.Color = Color.FromArgb(153, 128, 0); + else + trainPen.Color = Color.FromArgb(0, 153, 0); + + // Draw player train with loco in red + if (t.TrainType == Train.TRAINTYPE.PLAYER && car == locoCar) + trainPen.Color = Color.Red; + } + + private void DrawTrainLabels(Graphics g, Train t, string trainName, TrainCar firstCar, PointF scaledTrain) + { + WorldPosition worldPos = firstCar.WorldPosition; + scaledTrain.X = (worldPos.TileX * 2048 - subX + worldPos.Location.X) * xScale; + scaledTrain.Y = -25 + mapCanvas.Height - (worldPos.TileZ * 2048 - subY + worldPos.Location.Z) * yScale; + if (showActiveTrainsRadio.Checked) + { + if (t is Simulation.AIs.AITrain && MapDataProvider.IsActiveTrain(t as Simulation.AIs.AITrain)) + ShowTrainNameAndState(g, scaledTrain, t, trainName); + } + else + { + ShowTrainNameAndState(g, scaledTrain, t, trainName); + } + } + + private void ShowTrainNameAndState(Graphics g, PointF scaledItem, Train t, string trainName) + { + if (simulator.TimetableMode) + { + var tTTrain = t as Simulation.Timetables.TTTrain; + if (tTTrain != null) + { + // Remove name of timetable, e.g.: ":SCE" + var lastPos = trainName.LastIndexOf(":"); + var shortName = (lastPos > 0) ? trainName.Substring(0, lastPos) : trainName; + + if (MapDataProvider.IsActiveTrain(tTTrain)) + { + if (showTrainStateCheckbox.Checked) + { + // 4:AI mode, 6:Mode, 7:Auth, 9:Signal, 12:Path + var status = tTTrain.GetStatus(Viewer.MilepostUnitsMetric); + + // Add in fields 4 and 7 + status = tTTrain.AddMovementState(status, Viewer.MilepostUnitsMetric); + + var statuses = $"{status[4]} {status[6]} {status[7]} {status[9]}"; + + // Add path if it contains any deadlock information + if (MapDataProvider.ContainsDeadlockIndicators(status[12])) + statuses += status[12]; + + g.DrawString($"{shortName} {statuses}", trainFont, trainBrush, scaledItem); + } + else + g.DrawString(shortName, trainFont, trainBrush, scaledItem); + } + else + g.DrawString(shortName, trainFont, InactiveTrainBrush, scaledItem); + } + } + else + g.DrawString(trainName, trainFont, trainBrush, scaledItem); + } + + private void ShowSwitches(Graphics g, float width) + { + if (!showSwitchesCheckbox.Checked) + return; + + for (var i = 0; i < switches.Count; i++) + { + SwitchWidget sw = switches[i]; + + var x = (sw.Location.X - subX) * xScale; + var y = mapCanvas.Height - (sw.Location.Y - subY) * yScale; + if (x < 0 || y < 0) + continue; + + var scaledItem = new PointF() { X = x, Y = y }; + + if (sw.Item.TrJunctionNode.SelectedRoute == sw.main) + g.FillEllipse(Brushes.Black, DispatchViewer.GetRect(scaledItem, width)); + else + g.FillEllipse(Brushes.Gray, DispatchViewer.GetRect(scaledItem, width)); + + sw.Location2D.X = scaledItem.X; sw.Location2D.Y = scaledItem.Y; + switchItemsDrawn.Add(sw); + } + } + + private void ShowSignals(Graphics g, PointF scaledB, float width) + { + if (!showSignalsCheckbox.Checked) + return; + + foreach (var s in signals) + { + if (float.IsNaN(s.Location.X) || float.IsNaN(s.Location.Y)) + continue; + var x = (s.Location.X - subX) * xScale; + var y = mapCanvas.Height - (s.Location.Y - subY) * yScale; + if (x < 0 || y < 0) + continue; + + var scaledItem = new PointF() { X = x, Y = y }; + s.Location2D.X = scaledItem.X; s.Location2D.Y = scaledItem.Y; + if (s.Signal.isSignalNormal()) + { + var color = Brushes.Lime; // bright colour for readability + var pen = greenPen; + if (s.IsProceed == 0) + { + } + else if (s.IsProceed == 1) + { + color = Brushes.Yellow; // bright colour for readbility + pen = orangePen; + } + else + { + color = Brushes.Red; + pen = redPen; + } + g.FillEllipse(color, DispatchViewer.GetRect(scaledItem, width)); + signalItemsDrawn.Add(s); + if (s.hasDir) + { + scaledB.X = (s.Dir.X - subX) * xScale; scaledB.Y = mapCanvas.Height - (s.Dir.Y - subY) * yScale; + g.DrawLine(pen, scaledItem, scaledB); + } + ShowSignalState(g, scaledItem, s); + } + } + } + + private void ShowSignalState(Graphics g, PointF scaledItem, SignalWidget sw) + { + if (!showSignalStateCheckbox.Checked) + return; + + var item = sw.Item as SignalItem; + var trainNumber = sw.Signal?.enabledTrain?.Train?.Number; + var trainString = (trainNumber == null) ? "" : $" train: {trainNumber}"; + var offset = 0; + var position = scaledItem; + foreach (var signalHead in sw.Signal.SignalHeads) + { + offset++; + position.X += offset * 10; + position.Y += offset * 15; + var text = $" {item?.SigObj} {signalHead.SignalTypeName} {signalHead.state} {trainString}"; + scaledItem.Y = MapDataProvider.GetUnusedYLocation(scaledItem.X, mapCanvas.Height - (sw.Location.Y - subY) * yScale, text); + if (scaledItem.Y >= 0f) // -1 indicates no free slot to draw label + g.DrawString(text, SignalFont, SignalBrush, scaledItem); + } + + } + + private void ShowSidingLabels(Graphics g) + { + if (!showSidingLabelsCheckbox.Checked) + return; + + foreach (var s in sidings) + { + var scaledItem = new PointF(); + + scaledItem.X = (s.Location.X - subX) * xScale; + scaledItem.Y = MapDataProvider.GetUnusedYLocation(scaledItem.X, mapCanvas.Height - (s.Location.Y - subY) * yScale, s.Name); + if (scaledItem.Y >= 0f) // -1 indicates no free slot to draw label + g.DrawString(s.Name, sidingFont, sidingBrush, scaledItem); + } + } + + private void ShowPlatformLabels(Graphics g) + { + var platformMarginPxX = 5; + + if (!showPlatformLabelsCheckbox.Checked) + return; + + foreach (var p in platforms) + { + var scaledItem = new PointF(); + scaledItem.X = (p.Location.X - subX) * xScale + platformMarginPxX; + var yPixels = mapCanvas.Height - (p.Location.Y - subY) * yScale; + + // If track is close to horizontal, then start label search 1 row down to minimise overwriting platform line. + if (p.Extent1.X != p.Extent2.X + && Math.Abs((p.Extent1.Y - p.Extent2.Y) / (p.Extent1.X - p.Extent2.X)) < 0.1) + yPixels += DispatchViewer.spacing; + + scaledItem.Y = MapDataProvider.GetUnusedYLocation(scaledItem.X, mapCanvas.Height - (p.Location.Y - subY) * yScale, p.Name); + if (scaledItem.Y >= 0f) // -1 indicates no free slot to draw label + g.DrawString(p.Name, PlatformFont, PlatformBrush, scaledItem); + } + } + + /// + /// If the train is long enough then draw every car else just draw it as one or two blocks + /// + /// + /// + /// + private bool IsDrawEveryCar(Train train, float minTrainLengthM) + { + float trainLengthM = 0f; + foreach (var car in train.Cars) + { + trainLengthM += car.CarLengthM; + if (trainLengthM > minTrainLengthM) + { + return true; + } + } + return false; + } + + /// + /// Indicates the location around which the image is zoomed. + /// If user drags an item of interest into this target box and zooms in, the item will remain in view. + /// + /// + private void DrawZoomTarget(Graphics g) + { + if (!Dragging) + return; + + const int size = 24; + var top = mapCanvas.Height / 2 - size / 2; + var left = mapCanvas.Width / 2 - size / 2; + g.DrawRectangle(ZoomTargetPen, left, top, size, size); + + } + + + + + + + + + + + + + + private PointF DrawSiding(Graphics g, PointF scaledItem, SidingWidget s) + { + scaledItem.X = (s.Location.X - subX) * xScale; + scaledItem.Y = DetermineSidingLocation(scaledItem.X, mapCanvas.Height - (s.Location.Y - subY) * yScale, s.Name); + if (scaledItem.Y >= 0f) //if we need to draw the siding names + { + g.DrawString(s.Name, sidingFont, sidingBrush, scaledItem); + } + return scaledItem; + } + + private PointF DrawPlatform(Graphics g, PointF scaledItem, PlatformWidget s) + { + scaledItem.X = (s.Location.X - subX) * xScale; + scaledItem.Y = DetermineSidingLocation(scaledItem.X, mapCanvas.Height - (s.Location.Y - subY) * yScale, s.Name); + if (scaledItem.Y >= 0f) //if we need to draw the siding names + { + g.DrawString(s.Name, sidingFont, sidingBrush, scaledItem); + } + return scaledItem; + } + + public Vector2[][] alignedTextY; + public int[] alignedTextNum; + public const int spacing = 12; + private void CleanVerticalCells() + { + if (alignedTextY == null || alignedTextY.Length != IM_Height / spacing) //first time to put text, or the text height has changed + { + alignedTextY = new Vector2[IM_Height / spacing][]; + alignedTextNum = new int[IM_Height / spacing]; + for (var i = 0; i < IM_Height / spacing; i++) + alignedTextY[i] = new Vector2[4]; //each line has at most 4 sidings + } + for (var i = 0; i < IM_Height / spacing; i++) + { + alignedTextNum[i] = 0; + } + } + + private float DetermineSidingLocation(float startX, float wantY, string name) + { + //out of drawing area + if (startX < -64 || startX > IM_Width || wantY < -spacing || wantY > IM_Height) return -1f; + + int position = (int)(wantY / spacing);//the cell of the text it wants in + if (position > alignedTextY.Length) return wantY;//position is larger than the number of cells + var endX = startX + name.Length * trainFont.Size; + int desiredPosition = position; + while (position < alignedTextY.Length && position >= 0) + { + //if the line contains no text yet, put it there + if (alignedTextNum[position] == 0) + { + alignedTextY[position][alignedTextNum[position]].X = startX; + alignedTextY[position][alignedTextNum[position]].Y = endX;//add info for the text (i.e. start and end location) + alignedTextNum[position]++; + return position * spacing; + } + + bool conflict = false; + //check if it is intersect any one in the cell + foreach (Vector2 v in alignedTextY[position]) + { + //check conflict with a text, v.x is the start of the text, v.y is the end of the text + if ((startX > v.X && startX < v.Y) || (endX > v.X && endX < v.Y) || (v.X > startX && v.X < endX) || (v.Y > startX && v.Y < endX)) + { + conflict = true; + break; + } + } + if (conflict == false) //no conflict + { + if (alignedTextNum[position] >= alignedTextY[position].Length) return -1f; + alignedTextY[position][alignedTextNum[position]].X = startX; + alignedTextY[position][alignedTextNum[position]].Y = endX;//add info for the text (i.e. start and end location) + alignedTextNum[position]++; + return position * spacing; + } + position--; + //cannot move up, then try to move it down + if (position - desiredPosition < -1) + { + position = desiredPosition + 2; + } + //could not find any position up or down, just return negative + if (position == desiredPosition) return -1f; + } + return position * spacing; + } + + const float SignalErrorDistance = 100; + const float SignalWarningDistance = 500; + const float DisplayDistance = 1000; + const float DisplaySegmentLength = 10; + const float MaximumSectionDistance = 10000; + + Dictionary Cache = new Dictionary(); + SignallingDebugWindow.TrackSectionCacheEntry GetCacheEntry(Traveller position) + { + SignallingDebugWindow.TrackSectionCacheEntry rv; + if (Cache.TryGetValue(position.TrackNodeIndex, out rv) && (rv.Direction == position.Direction)) + return rv; + Cache[position.TrackNodeIndex] = rv = new SignallingDebugWindow.TrackSectionCacheEntry() + { + Direction = position.Direction, + Length = 0, + Objects = new List(), + }; + var nodeIndex = position.TrackNodeIndex; + var trackNode = new Traveller(position); + while (true) + { + rv.Length += MaximumSectionDistance - trackNode.MoveInSection(MaximumSectionDistance); + if (!trackNode.NextSection()) + break; + if (trackNode.IsEnd) + rv.Objects.Add(new SignallingDebugWindow.TrackSectionEndOfLine() { Distance = rv.Length }); + else if (trackNode.IsJunction) + rv.Objects.Add(new SignallingDebugWindow.TrackSectionSwitch() { Distance = rv.Length, TrackNode = trackNode.TN, NodeIndex = nodeIndex }); + else + rv.Objects.Add(new SignallingDebugWindow.TrackSectionObject() { Distance = rv.Length }); // Always have an object at the end. + if (trackNode.TrackNodeIndex != nodeIndex) + break; + } + trackNode = new Traveller(position); + + rv.Objects = rv.Objects.OrderBy(tso => tso.Distance).ToList(); + return rv; + } + + //draw the train path if it is within the window + public void DrawTrainPath(Train train, float subX, float subY, Pen pathPen, Graphics g, PointF scaledA, PointF scaledB, float stepDist, float MaximumSectionDistance) + { + if (DrawPath != true) return; + bool ok = false; + if (train == Program.Simulator.PlayerLocomotive.Train) ok = true; + if (MPManager.IsMultiPlayer()) + { + if (MPManager.OnlineTrains.findTrain(train)) + ok = true; + } + if (train.FirstCar != null & train.FirstCar.CarID.Contains("AI")) // AI train + ok = true; + if (Math.Abs(train.SpeedMpS) > 0.001) + ok = true; + + if (ok == false) return; + + var DisplayDistance = MaximumSectionDistance; + var position = train.MUDirection != Direction.Reverse ? new Traveller(train.FrontTDBTraveller) : new Traveller(train.RearTDBTraveller, Traveller.TravellerDirection.Backward); + var caches = new List(); + // Work backwards until we end up on a different track section. + var cacheNode = new Traveller(position); + cacheNode.ReverseDirection(); + var initialNodeOffsetCount = 0; + while (cacheNode.TrackNodeIndex == position.TrackNodeIndex && cacheNode.NextSection()) + initialNodeOffsetCount++; + // Now do it again, but don't go the last track section (because it is from a different track node). + cacheNode = new Traveller(position); + cacheNode.ReverseDirection(); + for (var i = 1; i < initialNodeOffsetCount; i++) + cacheNode.NextSection(); + // Push the location right up to the end of the section. + cacheNode.MoveInSection(MaximumSectionDistance); + // Now back facing the right way, calculate the distance to the train location. + cacheNode.ReverseDirection(); + var initialNodeOffset = cacheNode.DistanceTo(position.TileX, position.TileZ, position.X, position.Y, position.Z); + // Go and collect all the cache entries for the visible range of vector nodes (straights, curves). + var totalDistance = 0f; + while (!cacheNode.IsEnd && totalDistance - initialNodeOffset < DisplayDistance) + { + if (cacheNode.IsTrack) + { + var cache = GetCacheEntry(cacheNode); + cache.Age = 0; + caches.Add(cache); + totalDistance += cache.Length; + } + var nodeIndex = cacheNode.TrackNodeIndex; + while (cacheNode.TrackNodeIndex == nodeIndex && cacheNode.NextSection()) ; + } + + var switchErrorDistance = initialNodeOffset + DisplayDistance + SignalWarningDistance; + var signalErrorDistance = initialNodeOffset + DisplayDistance + SignalWarningDistance; + var currentDistance = 0f; + foreach (var cache in caches) + { + foreach (var obj in cache.Objects) + { + var objDistance = currentDistance + obj.Distance; + if (objDistance < initialNodeOffset) + continue; + + var switchObj = obj as SignallingDebugWindow.TrackSectionSwitch; + if (switchObj != null) + { + for (var pin = switchObj.TrackNode.Inpins; pin < switchObj.TrackNode.Inpins + switchObj.TrackNode.Outpins; pin++) + { + if (switchObj.TrackNode.TrPins[pin].Link == switchObj.NodeIndex) + { + if (pin - switchObj.TrackNode.Inpins != switchObj.TrackNode.TrJunctionNode.SelectedRoute) + switchErrorDistance = objDistance; + break; + } + } + if (switchErrorDistance < DisplayDistance) + break; + } + + } + if (switchErrorDistance < DisplayDistance || signalErrorDistance < DisplayDistance) + break; + currentDistance += cache.Length; + } + + var currentPosition = new Traveller(position); + currentPosition.Move(-initialNodeOffset); + currentDistance = 0; + + foreach (var cache in caches) + { + var lastObjDistance = 0f; + foreach (var obj in cache.Objects) + { + var objDistance = currentDistance + obj.Distance; + + for (var step = lastObjDistance; step < obj.Distance; step += DisplaySegmentLength) + { + var stepDistance = currentDistance + step; + var stepLength = DisplaySegmentLength > obj.Distance - step ? obj.Distance - step : DisplaySegmentLength; + var previousLocation = currentPosition.WorldLocation; + currentPosition.Move(stepLength); + if (stepDistance + stepLength >= initialNodeOffset && stepDistance <= initialNodeOffset + DisplayDistance) + { + var currentLocation = currentPosition.WorldLocation; + scaledA.X = (float)((previousLocation.TileX * WorldLocation.TileSize + previousLocation.Location.X - subX) * xScale); + scaledA.Y = (float)(mapCanvas.Height - (previousLocation.TileZ * WorldLocation.TileSize + previousLocation.Location.Z - subY) * yScale); + scaledB.X = (float)((currentLocation.TileX * WorldLocation.TileSize + currentLocation.Location.X - subX) * xScale); + scaledB.Y = (float)(mapCanvas.Height - (currentPosition.TileZ * WorldLocation.TileSize + currentPosition.Location.Z - subY) * yScale); g.DrawLine(pathPen, scaledA, scaledB); + } + } + lastObjDistance = obj.Distance; + + if (objDistance >= switchErrorDistance) + break; + } + currentDistance += cache.Length; + if (currentDistance >= switchErrorDistance) + break; + + } + + currentPosition = new Traveller(position); + currentPosition.Move(-initialNodeOffset); + currentDistance = 0; + foreach (var cache in caches) + { + var lastObjDistance = 0f; + foreach (var obj in cache.Objects) + { + currentPosition.Move(obj.Distance - lastObjDistance); + lastObjDistance = obj.Distance; + + var objDistance = currentDistance + obj.Distance; + if (objDistance < initialNodeOffset || objDistance > initialNodeOffset + DisplayDistance) + continue; + + var switchObj = obj as SignallingDebugWindow.TrackSectionSwitch; + if (switchObj != null) + { + for (var pin = switchObj.TrackNode.Inpins; pin < switchObj.TrackNode.Inpins + switchObj.TrackNode.Outpins; pin++) + { + if (switchObj.TrackNode.TrPins[pin].Link == switchObj.NodeIndex && pin - switchObj.TrackNode.Inpins != switchObj.TrackNode.TrJunctionNode.SelectedRoute) + { + foreach (var sw in switchItemsDrawn) + { + if (sw.Item.TrJunctionNode == switchObj.TrackNode.TrJunctionNode) + { + var r = 6 * greenPen.Width; + g.DrawLine(pathPen, new PointF(sw.Location2D.X - r, sw.Location2D.Y - r), new PointF(sw.Location2D.X + r, sw.Location2D.Y + r)); + g.DrawLine(pathPen, new PointF(sw.Location2D.X - r, sw.Location2D.Y + r), new PointF(sw.Location2D.X + r, sw.Location2D.Y - r)); + break; + } + } + } + } + } + + if (objDistance >= switchErrorDistance) + break; + } + currentDistance += cache.Length; + if (currentDistance >= switchErrorDistance) + break; + } + // Clean up any cache entries who haven't been using for 30 seconds. + var oldCaches = Cache.Where(kvp => kvp.Value.Age > 30 * 4).ToArray(); + foreach (var oldCache in oldCaches) + Cache.Remove(oldCache.Key); + + } + #endregion + + /// + /// Generates a rectangle representing a dot being drawn. + /// + /// Center point of the dot, in pixels. + /// Size of the dot's diameter, in pixels + /// + static public RectangleF GetRect(PointF p, float size) + { + return new RectangleF(p.X - size / 2f, p.Y - size / 2f, size, size); + } + + /// + /// Generates line segments from an array of TrVectorSection. Also computes + /// the bounds of the entire route being drawn. + /// + /// + /// + /// + /// + /// + /// + /// + private static void AddSegments(List segments, TrackNode node, TrVectorSection[] items, ref float minX, ref float minY, ref float maxX, ref float maxY, Simulator simulator) + { + + bool occupied = false; + + double tempX1, tempX2, tempZ1, tempZ2; + + for (int i = 0; i < items.Length - 1; i++) + { + dVector A = new dVector(items[i].TileX, items[i].X, items[i].TileZ, items[i].Z); + dVector B = new dVector(items[i + 1].TileX, items[i + 1].X, items[i + 1].TileZ, items[i + 1].Z); + + tempX1 = A.TileX * 2048 + A.X; tempX2 = B.TileX * 2048 + B.X; + tempZ1 = A.TileZ * 2048 + A.Z; tempZ2 = B.TileZ * 2048 + B.Z; + CalcBounds(ref maxX, tempX1, true); + CalcBounds(ref maxY, tempZ1, true); + CalcBounds(ref maxX, tempX2, true); + CalcBounds(ref maxY, tempZ2, true); + + CalcBounds(ref minX, tempX1, false); + CalcBounds(ref minY, tempZ1, false); + CalcBounds(ref minX, tempX2, false); + CalcBounds(ref minY, tempZ2, false); + + segments.Add(new LineSegment(A, B, occupied, items[i])); + } + } + + /// + /// Given a value representing a limit, evaluate if the given value exceeds the current limit. + /// If so, expand the limit. + /// + /// The current limit. + /// The value to compare the limit to. + /// True when comparison is greater-than. False if less-than. + private static void CalcBounds(ref float limit, double v, bool gt) + { + float value = (float)v; + if (gt) + { + if (value > limit) + { + limit = value; + } + } + else + { + if (value < limit) + { + limit = value; + } + } + } + + void UITimer_Tick(object sender, EventArgs e) + { + if (Viewer.DebugViewerBetaEnabled == false) // Ctrl+9 sets this true to initialise the window and make it visible + { + Visible = false; + return; + } + Visible = true; + + if (Program.Simulator.GameTime - lastUpdateTime < 1) + return; + + lastUpdateTime = Program.Simulator.GameTime; + + GenerateView(); + } + + private void allowJoiningCheckbox_CheckedChanged(object sender, EventArgs e) + { + MPManager.Instance().AllowNewPlayer = allowJoiningCheckbox.Checked; + } + + private void drawPathCheckbox_CheckedChanged(object sender, EventArgs e) + { + DrawPath = drawPathCheckbox.Checked; + } + + private void mapResolutionUpDown_ValueChanged(object sender, EventArgs e) + { + // Center point of the map viewport before the change in resolution + PointF center = new PointF(ViewWindow.X + ViewWindow.Width / 2f, ViewWindow.Y + ViewWindow.Height / 2f); + + float newSizeH = (float)mapResolutionUpDown.Value; + float verticalByHorizontal = ViewWindow.Height / ViewWindow.Width; + float newSizeV = newSizeH * verticalByHorizontal; + + ViewWindow = new RectangleF(center.X - newSizeH / 2f, center.Y - newSizeV / 2f, newSizeH, newSizeV); + + GenerateView(); + } + + private float ScrollSpeedX + { + get + { + return ViewWindow.Width * 0.10f; + } + } + + private float ScrollSpeedY + { + get + { + return ViewWindow.Width * 0.10f; + } + } + + protected override void OnMouseWheel(MouseEventArgs e) + { + decimal tempValue = mapResolutionUpDown.Value; + if (e.Delta < 0) tempValue /= 0.95m; + else if (e.Delta > 0) tempValue *= 0.95m; + else return; + + if (tempValue < mapResolutionUpDown.Minimum) tempValue = mapResolutionUpDown.Minimum; + if (tempValue > mapResolutionUpDown.Maximum) tempValue = mapResolutionUpDown.Maximum; + mapResolutionUpDown.Value = tempValue; + } + + private bool Zooming; + private bool LeftClick; + private bool RightClick; + + private void mapCanvas_MouseDown(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) LeftClick = true; + if (e.Button == MouseButtons.Right) RightClick = true; + + if (LeftClick == true && RightClick == false) + { + if (Dragging == false) + { + Dragging = true; + Cursor.Current = Cursors.NoMove2D; + } + } + else if (LeftClick == true && RightClick == true) + { + if (Zooming == false) Zooming = true; + } + LastCursorPosition.X = e.X; + LastCursorPosition.Y = e.Y; + MPManager.Instance().ComposingText = false; + /*lblInstruction1.Visible = true; + lblInstruction2.Visible = true; + lblInstruction3.Visible = true; + lblInstruction4.Visible = true;*/ + } + + private void mapCanvas_MouseUp(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) LeftClick = false; + if (e.Button == MouseButtons.Right) RightClick = false; + + if (LeftClick == false) + { + Dragging = false; + Zooming = false; + } + + if ((ModifierKeys & Keys.Shift) == Keys.Shift) + { + CanvasMoveAndZoomInOut(e.X, e.Y, 1200); + } + else if ((ModifierKeys & Keys.Alt) == Keys.Alt) + { + CanvasMoveAndZoomInOut(e.X, e.Y, 30000); + } + else if ((ModifierKeys & Keys.Control) == Keys.Control) + { + CanvasMoveAndZoomInOut(e.X, e.Y, mapResolutionUpDown.Maximum); + } + else if (LeftClick == false) + { + if (LastCursorPosition.X == e.X && LastCursorPosition.Y == e.Y) + { + var range = 5 * (int)xScale; if (range > 10) range = 10; + /*var temp = findItemFromMouse(e.X, e.Y, range); + if (temp != null) + { + if (temp is SwitchWidget) + { + switchPickedItem = (SwitchWidget)temp; + signalPickedItem = null; + HandlePickedSwitch(); + } + if (temp is SignalWidget) + { + signalPickedItem = (SignalWidget)temp; + switchPickedItem = null; + HandlePickedSignal(); + } + } + else + { + switchPickedItem = null; + signalPickedItem = null; + UnHandleItemPick(); + PickedTrain = null; + }*/ + } + + } + /*lblInstruction1.Visible = false; + lblInstruction2.Visible = false; + lblInstruction3.Visible = false; + lblInstruction4.Visible = false;*/ + } + + private void mapCanvas_MouseMove(object sender, MouseEventArgs e) + { + if (Dragging && !Zooming) + { + int diffX = LastCursorPosition.X - e.X; + int diffY = LastCursorPosition.Y - e.Y; + + ViewWindow.Offset(diffX * ScrollSpeedX / 10, -diffY * ScrollSpeedY / 10); + GenerateView(); + } + else if (Zooming) + { + decimal tempValue = mapResolutionUpDown.Value; + if (LastCursorPosition.Y - e.Y < 0) tempValue /= 0.95m; + else if (LastCursorPosition.Y - e.Y > 0) tempValue *= 0.95m; + + if (tempValue < mapResolutionUpDown.Minimum) tempValue = mapResolutionUpDown.Minimum; + if (tempValue > mapResolutionUpDown.Maximum) tempValue = mapResolutionUpDown.Maximum; + mapResolutionUpDown.Value = tempValue; + GenerateView(); + } + LastCursorPosition.X = e.X; + LastCursorPosition.Y = e.Y; + } + + private void CanvasMoveAndZoomInOut(int x, int y, decimal scale) + { + int diffX = x - mapCanvas.Width / 2; + int diffY = y - mapCanvas.Height / 2; + ViewWindow.Offset(diffX / xScale, -diffY / yScale); + if (scale < mapResolutionUpDown.Minimum) scale = mapResolutionUpDown.Minimum; + if (scale > mapResolutionUpDown.Maximum) scale = mapResolutionUpDown.Maximum; + mapResolutionUpDown.Value = scale; + GenerateView(); + } + + private void playerRoleLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + Process.Start("https://open-rails.readthedocs.io/en/latest/multiplayer.html#in-game-controls"); + } + + private void mapCustomizationButton_Click(object sender, EventArgs e) + { + MapCustomizationVisible = !MapCustomizationVisible; + mapCustomizationPanel.Visible = MapCustomizationVisible; + + if (MapCustomizationVisible == true) + { + mapCustomizationButton.BackColor = Color.FromArgb(214, 234, 248); + mapCustomizationButton.ForeColor = Color.FromArgb(40, 116, 166); + } + else + { + mapCustomizationButton.BackColor = SystemColors.Control; + mapCustomizationButton.ForeColor = SystemColors.ControlText; + } + } + + private void playersView_MouseClick(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Right) + { + var focusedItem = playersView.FocusedItem; + if (focusedItem != null && focusedItem.Bounds.Contains(e.Location)) + { + playerActionsMenu.Show(Cursor.Position); + } + } + } + + public bool ClickedTrain; + private void seeTrainInGameButton_Click(object sender, EventArgs e) + { + if (PickedTrain != null) ClickedTrain = true; + else ClickedTrain = false; + } + + private void centerOnMyTrainButton_Click(object sender, EventArgs e) + { + followTrain = false; + firstShow = true; + GenerateView(); + } + + private void penaltyCheckbox_CheckedChanged(object sender, EventArgs e) + { + MPManager.Instance().CheckSpad = penaltyCheckbox.Checked; + if (penaltyCheckbox.Checked == false) { MPManager.BroadCast(new MSGMessage("All", "OverSpeedOK", "OK to go overspeed and pass stop light").ToString()); } + else { MPManager.BroadCast(new MSGMessage("All", "NoOverSpeed", "Penalty for overspeed and passing stop light").ToString()); } + } + + private void DispatchViewerBeta_FormClosing(object sender, FormClosingEventArgs e) + { + // Prevent the window from closing; instead, hide it + e.Cancel = true; + Viewer.DebugViewerBetaEnabled = false; + } + + + } + + #region SignalWidget + /// + /// Defines a signal being drawn in a 2D view. + /// + public class SignalWidget : ItemWidget + { + public TrItem Item; + /// + /// The underlying signal object as referenced by the TrItem. + /// + public SignalObject Signal; + + public PointF Dir; + public bool hasDir; + /// + /// For now, returns true if any of the signal heads shows any "clear" aspect. + /// This obviously needs some refinement. + /// + public int IsProceed + { + get + { + int returnValue = 2; + + foreach (var head in Signal.SignalHeads.Where(x => x.Function == SignalFunction.NORMAL)) + { + if (head.state == MstsSignalAspect.CLEAR_1 + || head.state == MstsSignalAspect.CLEAR_2) + { + returnValue = 0; + } + if (head.state == MstsSignalAspect.APPROACH_1 + || head.state == MstsSignalAspect.APPROACH_2 + || head.state == MstsSignalAspect.APPROACH_3) + { + returnValue = 1; + } + } + + return returnValue; + } + } + + /// + /// + /// + /// + /// + public SignalWidget(SignalItem item, SignalObject signal) + { + Item = item; + Signal = signal; + hasDir = false; + Location.X = item.TileX * 2048 + item.X; + Location.Y = item.TileZ * 2048 + item.Z; + var node = Program.Simulator.TDB.TrackDB.TrackNodes?[signal.trackNode]; + Vector2 v2; + if (node?.TrVectorNode != null) + { + var ts = node.TrVectorNode.TrVectorSections?.FirstOrDefault(); + if (ts == null) + return; + v2 = new Vector2(ts.TileX * 2048 + ts.X, ts.TileZ * 2048 + ts.Z); + } + else if (node?.TrJunctionNode != null) + { + var ts = node?.UiD; + if (ts == null) + return; + v2 = new Vector2(ts.TileX * 2048 + ts.X, ts.TileZ * 2048 + ts.Z); + } + else + { + return; + } + var v1 = new Vector2(Location.X, Location.Y); + var v3 = v1 - v2; + v3.Normalize(); + void copyTo(Vector2 input, ref PointF output) + { + output.X = input.X; + output.Y = input.Y; + } + copyTo(v1 - Vector2.Multiply(v3, signal.direction == 0 ? 12f : -12f), ref Dir); + //shift signal along the dir for 2m, so signals will not be overlapped + copyTo(v1 - Vector2.Multiply(v3, signal.direction == 0 ? 1.5f : -1.5f), ref Location); + hasDir = true; + } + } + #endregion + + #region SwitchWidget + /// + /// Defines a signal being drawn in a 2D view. + /// + public class SwitchWidget : ItemWidget + { + public TrackNode Item; + public uint main; + + /// + /// + /// + /// + /// + public SwitchWidget(TrackNode item) + { + Item = item; + var TS = Program.Simulator.TSectionDat.TrackShapes.Get(item.TrJunctionNode.ShapeIndex); // TSECTION.DAT tells us which is the main route + + if (TS != null) + { + main = TS.MainRoute; + } + else + { + main = 0; + } + + Location.X = Item.UiD.TileX * 2048 + Item.UiD.X; Location.Y = Item.UiD.TileZ * 2048 + Item.UiD.Z; + } + } + + #endregion + + #region BufferWidget + public class BufferWidget : ItemWidget + { + public TrackNode Item; + + /// + /// + /// + /// + /// + public BufferWidget(TrackNode item) + { + Item = item; + + Location.X = Item.UiD.TileX * 2048 + Item.UiD.X; Location.Y = Item.UiD.TileZ * 2048 + Item.UiD.Z; + } + } + #endregion + + #region ItemWidget + public class ItemWidget + { + public PointF Location; + public PointF Location2D; + + /// + /// + /// + /// + public ItemWidget() + { + + Location = new PointF(float.NegativeInfinity, float.NegativeInfinity); + Location2D = new PointF(float.NegativeInfinity, float.NegativeInfinity); + } + } + #endregion + + #region TrainWidget + public class TrainWidget : ItemWidget + { + public Train Train; + + /// + /// + /// + /// + public TrainWidget(Train t) + { + Train = t; + } + } + #endregion + + #region LineSegment + /// + /// Defines a geometric line segment. + /// + public class LineSegment + { + public dVector A; + public dVector B; + public dVector C; + //public float radius; + public bool isCurved; + + public float angle1, angle2; + + public LineSegment(dVector A, dVector B, bool Occupied, TrVectorSection Section) + { + this.A = A; + this.B = B; + + isCurved = false; + if (Section == null) return; + //MySection = Section; + uint k = Section.SectionIndex; + TrackSection ts = Program.Simulator.TSectionDat.TrackSections.Get(k); + if (ts != null) + { + if (ts.SectionCurve != null) + { + float diff = (float)(ts.SectionCurve.Radius * (1 - Math.Cos(ts.SectionCurve.Angle * 3.14f / 360))); + if (diff < 3) return; //not need to worry, curve too small + //curve = ts.SectionCurve; + Vector3 v = new Vector3((float)((B.TileX - A.TileX) * 2048 + B.X - A.X), 0, (float)((B.TileZ - A.TileZ) * 2048 + B.Z - A.Z)); + isCurved = true; + Vector3 v2 = Vector3.Cross(Vector3.Up, v); v2.Normalize(); + v = v / 2; v.X += A.TileX * 2048 + (float)A.X; v.Z += A.TileZ * 2048 + (float)A.Z; + if (ts.SectionCurve.Angle > 0) + { + v = v2 * -diff + v; + } + else v = v2 * diff + v; + C = new dVector(0, v.X, 0, v.Z); + } + } + } + } + #endregion + + #region SidingWidget + + /// + /// Defines a siding name being drawn in a 2D view. + /// + public struct SidingWidget + { + public uint Id; + public PointF Location; + public string Name; + public uint LinkId; + + /// + /// The underlying track item. + /// + public SidingItem Item; + + /// + /// + /// + /// + /// + public SidingWidget(SidingItem item) + { + Id = item.TrItemId; + LinkId = item.LinkedSidingId; + Item = item; + Name = item.ItemName; + Location = new PointF(item.TileX * 2048 + item.X, item.TileZ * 2048 + item.Z); + } + } + #endregion + + public struct PlatformWidget + { + public uint Id; + public PointF Location; + public string Name; + public PointF Extent1; + public PointF Extent2; + public uint LinkId; + public string Station; + + /// + /// The underlying track item. + /// + public PlatformItem Item; + + /// + /// + /// + /// + /// + public PlatformWidget(PlatformItem item) + { + Id = item.TrItemId; + LinkId = item.LinkedPlatformItemId; + Item = item; + Name = item.ItemName; + Station = item.Station; + Location = new PointF(item.TileX * 2048 + item.X, item.TileZ * 2048 + item.Z); + Extent1 = default; + Extent2 = default; + } + } + + public class dVector + { + public int TileX, TileZ; + public double X, Z; + + public dVector(int tilex1, double x1, int tilez1, double z1) + { + TileX = tilex1; + TileZ = tilez1; + X = x1; + Z = z1; + } + + static public double DistanceSqr(dVector v1, dVector v2) + { + return Math.Pow((v1.TileX - v2.TileX) * 2048 + v1.X - v2.X, 2) + + Math.Pow((v1.TileZ - v2.TileZ) * 2048 + v1.Z - v2.Z, 2); + } + } + } diff --git a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.resx b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.resx index 1af7de150c..c01dbc95a6 100644 --- a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.resx +++ b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.resx @@ -117,4 +117,13 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 19, 16 + + + 174, 16 + + + 110 + \ No newline at end of file diff --git a/Source/RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs b/Source/RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs index 4d19ee119c..bdfa6c0ffe 100644 --- a/Source/RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs +++ b/Source/RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs @@ -159,7 +159,7 @@ private void InitializeComponent() this.resLabel.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.resLabel.Location = new System.Drawing.Point(887, 35); this.resLabel.Name = "resLabel"; - this.resLabel.Size = new System.Drawing.Size(19, 16); + this.resLabel.Size = new System.Drawing.Size(18, 16); this.resLabel.TabIndex = 8; this.resLabel.Text = "m"; // @@ -477,7 +477,7 @@ private void InitializeComponent() this.lblSimulationTimeText.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lblSimulationTimeText.Location = new System.Drawing.Point(5, 34); this.lblSimulationTimeText.Name = "lblSimulationTimeText"; - this.lblSimulationTimeText.Size = new System.Drawing.Size(104, 16); + this.lblSimulationTimeText.Size = new System.Drawing.Size(103, 16); this.lblSimulationTimeText.TabIndex = 36; this.lblSimulationTimeText.Text = "Simulation Time"; this.lblSimulationTimeText.Visible = false; @@ -488,7 +488,7 @@ private void InitializeComponent() this.lblSimulationTime.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lblSimulationTime.Location = new System.Drawing.Point(115, 34); this.lblSimulationTime.Name = "lblSimulationTime"; - this.lblSimulationTime.Size = new System.Drawing.Size(101, 16); + this.lblSimulationTime.Size = new System.Drawing.Size(100, 16); this.lblSimulationTime.TabIndex = 37; this.lblSimulationTime.Text = "SimulationTime"; this.lblSimulationTime.Visible = false; @@ -677,7 +677,7 @@ private void InitializeComponent() // lblInstruction1 // this.lblInstruction1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.lblInstruction1.Location = new System.Drawing.Point(8, 672); + this.lblInstruction1.Location = new System.Drawing.Point(8, 709); this.lblInstruction1.Name = "lblInstruction1"; this.lblInstruction1.Padding = new System.Windows.Forms.Padding(3); this.lblInstruction1.Size = new System.Drawing.Size(327, 22); @@ -749,7 +749,7 @@ private void InitializeComponent() // lblInstruction2 // this.lblInstruction2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.lblInstruction2.Location = new System.Drawing.Point(8, 693); + this.lblInstruction2.Location = new System.Drawing.Point(8, 730); this.lblInstruction2.Name = "lblInstruction2"; this.lblInstruction2.Padding = new System.Windows.Forms.Padding(3); this.lblInstruction2.Size = new System.Drawing.Size(327, 21); @@ -760,7 +760,7 @@ private void InitializeComponent() // lblInstruction3 // this.lblInstruction3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.lblInstruction3.Location = new System.Drawing.Point(8, 714); + this.lblInstruction3.Location = new System.Drawing.Point(8, 751); this.lblInstruction3.Name = "lblInstruction3"; this.lblInstruction3.Padding = new System.Windows.Forms.Padding(3); this.lblInstruction3.Size = new System.Drawing.Size(327, 21); @@ -771,7 +771,7 @@ private void InitializeComponent() // lblInstruction4 // this.lblInstruction4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.lblInstruction4.Location = new System.Drawing.Point(8, 735); + this.lblInstruction4.Location = new System.Drawing.Point(8, 772); this.lblInstruction4.Name = "lblInstruction4"; this.lblInstruction4.Padding = new System.Windows.Forms.Padding(3); this.lblInstruction4.Size = new System.Drawing.Size(327, 21); @@ -799,7 +799,7 @@ private void InitializeComponent() this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScroll = true; - this.ClientSize = new System.Drawing.Size(923, 768); + this.ClientSize = new System.Drawing.Size(923, 749); this.Controls.Add(this.cbShowPlatforms); this.Controls.Add(this.lblInstruction4); this.Controls.Add(this.lblInstruction3); diff --git a/Source/RunActivity/Viewer3D/Debugging/DebugViewerForm.cs b/Source/RunActivity/Viewer3D/Debugging/DebugViewerForm.cs index 8d6c13a68a..c21f053304 100644 --- a/Source/RunActivity/Viewer3D/Debugging/DebugViewerForm.cs +++ b/Source/RunActivity/Viewer3D/Debugging/DebugViewerForm.cs @@ -2137,6 +2137,9 @@ private void ClipDrag(int diffX, int diffY) #endregion } + + /* NOTE: Commented out to avoid duplication in namespace; copied to `DebugViewerBetaForm.cs` */ + /* #region SignalWidget /// /// Defines a signal being drawn in a 2D view. @@ -2447,5 +2450,5 @@ static public double DistanceSqr(dVector v1, dVector v2) return Math.Pow((v1.TileX - v2.TileX) * 2048 + v1.X - v2.X, 2) + Math.Pow((v1.TileZ - v2.TileZ) * 2048 + v1.Z - v2.Z, 2); } - } + }*/ } diff --git a/Source/RunActivity/Viewer3D/Debugging/MapDataProvider.cs b/Source/RunActivity/Viewer3D/Debugging/MapDataProvider.cs new file mode 100644 index 0000000000..c0b2b90bc5 --- /dev/null +++ b/Source/RunActivity/Viewer3D/Debugging/MapDataProvider.cs @@ -0,0 +1,310 @@ +// COPYRIGHT 2023 by the Open Rails project. +// +// This file is part of Open Rails. +// +// Open Rails is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Open Rails is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Open Rails. If not, see . + +using System; +using System.Diagnostics; +using System.Drawing; +using System.Linq; +using Microsoft.Xna.Framework; +using Orts.Formats.Msts; +using Orts.MultiPlayer; +using Orts.Simulation; +using Orts.Simulation.Physics; +using Orts.Simulation.RollingStocks; +using Orts.Simulation.Signalling; +using ORTS.Common; +using Color = System.Drawing.Color; + +namespace Orts.Viewer3D.Debugging +{ + public class MapDataProvider + { + public DispatchViewerBeta F { get; set; } // Shortest possible abbreviation so code is easier to read + + public MapDataProvider(DispatchViewerBeta form) + { + F = form; + } + + public void SetControls() + { + UpdateControlVisibility(); + } + + private void UpdateControlVisibility() + { + var isMultiPlayer = MPManager.IsMultiPlayer(); + + if (isMultiPlayer && MPManager.IsServer()) + { + F.playerRolePanel.Visible = true; + F.messagesPanel.Visible = true; + F.multiplayerSettingsPanel.Visible = true; + } + } + + public void PopulateItemLists() + { + foreach (var item in F.simulator.TDB.TrackDB.TrItemTable) + { + switch (item.ItemType) + { + case TrItem.trItemType.trSIGNAL: + if (item is SignalItem si) + { + if (si.SigObj >= 0 && si.SigObj < F.simulator.Signals.SignalObjects.Length) + { + var s = F.simulator.Signals.SignalObjects[si.SigObj]; + if (s != null && s.Type == SignalObjectType.Signal && s.isSignalNormal()) + F.signals.Add(new SignalWidget(si, s)); + } + } + break; + + case TrItem.trItemType.trSIDING: + // Sidings have 2 ends but are not always listed in pairs in the *.tdb file + // Neither are their names unique (e.g. Bernina Bahn). + // Find whether this siding is a new one or the other end of an old one. + // If other end, then find the right-hand one as the location for a single label. + // Note: Find() within a foreach() loop is O(n^2) but is only done at start. + var oldSidingIndex = F.sidings.FindIndex(r => r.LinkId == item.TrItemId && r.Name == item.ItemName); + if (oldSidingIndex < 0) + { + var newSiding = new SidingWidget(item as SidingItem); + F.sidings.Add(newSiding); + } + else + { + var oldSiding = F.sidings[oldSidingIndex]; + var oldLocation = oldSiding.Location; + var newLocation = new PointF(item.TileX * 2048 + item.X, item.TileZ * 2048 + item.Z); + + // Because these are structs, not classes, compiler won't let you overwrite them. + // Instead create a single item which replaces the 2 platform items. + var replacement = new SidingWidget(item as SidingItem) + { + Location = GetMidPoint(oldLocation, newLocation) + }; + + // Replace the old siding item with the replacement + F.sidings.RemoveAt(oldSidingIndex); + F.sidings.Add(replacement); + } + break; + + case TrItem.trItemType.trPLATFORM: + // Platforms have 2 ends but are not always listed in pairs in the *.tdb file + // Neither are their names unique (e.g. Bernina Bahn). + // Find whether this platform is a new one or the other end of an old one. + // If other end, then find the right-hand one as the location for a single label. + var oldPlatformIndex = F.platforms.FindIndex(r => r.LinkId == item.TrItemId && r.Name == item.ItemName); + if (oldPlatformIndex < 0) + { + var newPlatform = new PlatformWidget(item as PlatformItem) + { + Extent1 = new PointF(item.TileX * 2048 + item.X, item.TileZ * 2048 + item.Z) + }; + F.platforms.Add(newPlatform); + } + else + { + var oldPlatform = F.platforms[oldPlatformIndex]; + var oldLocation = oldPlatform.Location; + var newLocation = new PointF(item.TileX * 2048 + item.X, item.TileZ * 2048 + item.Z); + + // Because these are structs, not classes, compiler won't let you overwrite them. + // Instead create a single item which replaces the 2 platform items. + var replacement = new PlatformWidget(item as PlatformItem) + { + Extent1 = oldLocation + , + Extent2 = newLocation + // Give it the right-hand location + , + Location = GetRightHandPoint(oldLocation, newLocation) + }; + + // Replace the old platform item with the replacement + F.platforms.RemoveAt(oldPlatformIndex); + F.platforms.Add(replacement); + } + break; + + default: + break; + } + } + + foreach (var p in F.platforms) + if (p.Extent1.IsEmpty || p.Extent2.IsEmpty) + Trace.TraceWarning("Platform '{0}' is incomplete as the two ends do not match. It will not show in full in the Timetable Tab of the Map Window", p.Name); + } + + /// + /// Returns the mid-point between two locations + /// + /// + /// + /// + /// + private PointF GetMidPoint(PointF location1, PointF location2) + { + return new PointF() + { + X = (location1.X + location2.X) / 2 + , + Y = (location1.Y + location2.Y) / 2 + }; + } + + private PointF GetRightHandPoint(PointF location1, PointF location2) + { + return (location1.X > location2.X) ? location1 : location2; + } + + public void ShowSimulationTime() + { + var ct = TimeSpan.FromSeconds(Program.Simulator.ClockTime); + F.timeLabel.Text = $"{ct:hh}:{ct:mm}:{ct:ss}"; + } + + /// + /// In case of missing X,Y values, just draw a blob at the non-zero end. + /// + public void FixForBadData(float width, ref PointF scaledA, ref PointF scaledB, PointF Extent1, PointF Extent2) + { + if (Extent1.X == 0 || Extent1.Y == 0) + { + scaledA.X = scaledB.X + width; + scaledA.Y = scaledB.Y + width; + } + else if (Extent2.X == 0 || Extent2.Y == 0) + { + scaledB.X = scaledA.X + width; + scaledB.Y = scaledA.Y + width; + } + } + + public bool IsActiveTrain(Simulation.AIs.AITrain t) + { + if (t == null) + return false; + return (t.MovementState != Simulation.AIs.AITrain.AI_MOVEMENT_STATE.AI_STATIC + && !(t.TrainType == Train.TRAINTYPE.AI_INCORPORATED && !t.IncorporatingTrain.IsPathless) + ) + || t.TrainType == Train.TRAINTYPE.PLAYER; + } + + /* + * # section is claimed by a train which is waiting for a signal. + * & section is occupied by more than one train. + * deadlock info (always linked to a switch node): + * · * possible deadlock location - start of a single track section shared with a train running in opposite direction. + * · ^ active deadlock - train from opposite direction is occupying or has reserved at least part of the common + * single track section. Train will be stopped at this location – generally at the last signal ahead of this node. + * · ~ active deadlock at that location for other train - can be significant as this other train can block this + * train’s path. + */ + private static readonly char[] DeadlockIndicators = "#&*^~".ToCharArray(); + + public static bool ContainsDeadlockIndicators(string text) + { + return text.IndexOfAny(DeadlockIndicators) >= 0; + } + + // The canvas is split into equally pitched rows. + // Each row has an array of 4 slots with StartX, EndX positions and a count of how many slots have been filled. + // Arrays are used instead of lists to avoid delays for memory management. + public void CleanTextCells() + { + if (F.alignedTextY == null || F.alignedTextY.Length != F.mapCanvas.Height / DispatchViewer.spacing) //first time to put text, or the text height has changed + { + F.alignedTextY = new Vector2[F.mapCanvas.Height / DispatchViewer.spacing][]; + F.alignedTextNum = new int[F.mapCanvas.Height / DispatchViewer.spacing]; + for (var i = 0; i < F.mapCanvas.Height / DispatchViewer.spacing; i++) + F.alignedTextY[i] = new Vector2[5]; //each line has at most 5 slots + } + for (var i = 0; i < F.mapCanvas.Height / DispatchViewer.spacing; i++) + F.alignedTextNum[i] = 0; + } + + // Returns a vertical position for the text that doesn't clash or returns -1 + // If the preferred space for text is occupied, then the slot above (-ve Y) is tested, then 2 sltos above, then 1 below. + public float GetUnusedYLocation(float startX, float wantY, string name) + { + const float noFreeSlotFound = -1f; + + var desiredPositionY = (int)(wantY / DispatchViewer.spacing); // The positionY of the ideal row for the text. + var endX = startX + name.Length * F.trainFont.Size; + //out of drawing area + if (endX < 0) + return noFreeSlotFound; + + int positionY = desiredPositionY; + while (positionY >= 0 && positionY < F.alignedTextY.Length) + { + //if the line contains no text yet, put it there + if (F.alignedTextNum[positionY] == 0) + return SaveLabelLocation(startX, endX, positionY); + + bool conflict = false; + + //check if it intersects with any labels already in this row + for (var col = 0; col < F.alignedTextNum[positionY]; col++) + { + var v = F.alignedTextY[positionY][col]; + //check conflict with a text, v.X is the start of the text, v.Y is the end of the text + if ((endX >= v.X && startX <= v.Y)) + { + conflict = true; + break; + } + } + + if (conflict) + { + positionY--; // Try a different row: -1, -2, +2, +1 + + if (positionY - desiredPositionY <= -2) // Cannot move up (-ve Y), so try to move it down (+ve Y) + positionY = desiredPositionY + 2; // Try +2 then +1 + + if (positionY == desiredPositionY) // Back to original position again + return noFreeSlotFound; + } + else + { + // Check that row has an unused column in its fixed size array + if (F.alignedTextNum[positionY] >= F.alignedTextY[positionY].Length) + return noFreeSlotFound; + + return SaveLabelLocation(startX, endX, positionY); + } + } + return noFreeSlotFound; + } + + private float SaveLabelLocation(float startX, float endX, int positionY) + { + // add start and end location for the new label + F.alignedTextY[positionY][F.alignedTextNum[positionY]] = new Vector2 { X = startX, Y = endX }; + + F.alignedTextNum[positionY]++; + + return positionY * DispatchViewer.spacing; + } + } +} diff --git a/Source/RunActivity/Viewer3D/Processes/RenderProcess.cs b/Source/RunActivity/Viewer3D/Processes/RenderProcess.cs index 9cd56654ef..3a8a13a312 100644 --- a/Source/RunActivity/Viewer3D/Processes/RenderProcess.cs +++ b/Source/RunActivity/Viewer3D/Processes/RenderProcess.cs @@ -259,7 +259,12 @@ internal void Update(GameTime gameTime) if (IsMouseVisible != Game.IsMouseVisible) Game.IsMouseVisible = IsMouseVisible; - Cursor.Current = ActualCursor; + // Restrict `ActualCursor` to the main window so that it won't affect other popup + // windows, such as the Dispatch window. This prevents cursor flickering. + if (GameForm.Focused == true) + { + GameForm.Cursor = ActualCursor; + } if (ToggleFullScreenRequested) { diff --git a/Source/RunActivity/Viewer3D/Viewer.cs b/Source/RunActivity/Viewer3D/Viewer.cs index ae7bbab25c..1f9570858b 100644 --- a/Source/RunActivity/Viewer3D/Viewer.cs +++ b/Source/RunActivity/Viewer3D/Viewer.cs @@ -1294,9 +1294,10 @@ void HandleUserInput(ElapsedTime elapsedTime) //} //in the dispatcher window, when one clicks a train and "See in Game", will jump to see that train - if (Program.DebugViewer != null && Program.DebugViewer.ClickedTrain == true) + if ((Program.DebugViewer != null && Program.DebugViewer.ClickedTrain == true) || (Program.DebugViewerBeta != null && Program.DebugViewerBeta.ClickedTrain == true)) { Program.DebugViewer.ClickedTrain = false; + Program.DebugViewerBeta.ClickedTrain = false; if (SelectedTrain != Program.DebugViewer.PickedTrain) { SelectedTrain = Program.DebugViewer.PickedTrain; From bc03dd8717561981c074133429945b9cac178efa Mon Sep 17 00:00:00 2001 From: Looky1173 Date: Sat, 19 Aug 2023 16:51:11 +0200 Subject: [PATCH 04/33] Revert "Code Cleanup" This reverts commit 22f43400285c645d1fb30b3f85e14e9588f4cfdb. --- Source/ContentChecker/AceLoader.cs | 5 + Source/ContentChecker/ActivityLoader.cs | 8 + Source/ContentChecker/CabviewLoader.cs | 6 + Source/ContentChecker/CarSpawnLoader.cs | 3 + Source/ContentChecker/ConsistLoader.cs | 6 + Source/ContentChecker/EngineLoader.cs | 6 + .../ContentChecker/EnvironmentFileLoader.cs | 6 + Source/ContentChecker/HazardLoader.cs | 6 + Source/ContentChecker/Loader.cs | 7 +- Source/ContentChecker/LoaderFactory.cs | 2 + Source/ContentChecker/NotRecognizedLoader.cs | 6 + Source/ContentChecker/NotUsedLoader.cs | 6 + Source/ContentChecker/PathLoader.cs | 6 + Source/ContentChecker/Program.cs | 10 +- Source/ContentChecker/RoadDataBaseLoader.cs | 6 + Source/ContentChecker/ServiceLoader.cs | 6 + .../ContentChecker/ShapeDescriptionLoader.cs | 6 + Source/ContentChecker/ShapeLoader.cs | 6 + Source/ContentChecker/SignalConfigLoader.cs | 5 + Source/ContentChecker/SignalScriptLoader.cs | 6 +- Source/ContentChecker/SmsLoader.cs | 10 +- .../ContentChecker/TerrainAltitudeLoader.cs | 4 + Source/ContentChecker/TerrainFlagsLoader.cs | 4 + Source/ContentChecker/TerrainLoader.cs | 4 + Source/ContentChecker/TimeTableLoader.cs | 3 + Source/ContentChecker/TrackDataBaseLoader.cs | 5 + Source/ContentChecker/TrackFileLoader.cs | 12 +- Source/ContentChecker/TrackTypeLoader.cs | 6 + Source/ContentChecker/TrafficLoader.cs | 6 + Source/ContentChecker/TsectionGlobalLoader.cs | 7 +- Source/ContentChecker/TsectionLoader.cs | 8 +- Source/ContentChecker/WagonLoader.cs | 6 + Source/ContentChecker/WavLoader.cs | 8 +- Source/ContentChecker/WorldFileLoader.cs | 8 +- Source/ContentChecker/WorldSoundLoader.cs | 4 + .../ActivityEditor/AboutActEdit.cs | 4 + .../ControlStartProperties.cs | 7 + .../ControlStoppedProperties.cs | 6 + .../ActionProperties/HornProperties.cs | 7 + .../ActivityEditor/Activity/StartActivity.cs | 6 + .../ActivityEditor/Activity/WaitActivity.cs | 6 + .../ActivityEditor/Engine/AEActivity.cs | 7 + .../ActivityEditor/Engine/AEConfig.cs | 20 +- .../ActivityEditor/Engine/AERouteConfig.cs | 11 +- .../ActivityEditor/Engine/ActEditor.cs | 14 +- .../ActivityEditor/Engine/ProcessState.cs | 2 + .../ActivityEditor/Engine/PseudoSim.cs | 29 +- .../ActivityEditor/Engine/SimpleTextEd.cs | 12 +- .../ActivityEditor/Engine/Viewer2D.cs | 150 +++--- .../ActivityEditor/Internat/IntalMngr.cs | 8 +- .../ActivityEditor/Preference/AEPreference.cs | 31 +- .../ActivityEditor/Preference/Options.cs | 23 +- .../ActivityEditor/ActivityEditor/Program.cs | 7 +- .../Route Metadata/BufferInterface.cs | 7 + .../Route Metadata/ConnectorInterface.cs | 7 + .../Route Metadata/StationDisplay.cs | 19 +- .../Route Metadata/TrackSegmentInterface.cs | 6 + .../ActivityEditor/ActivityEditor/Settings.cs | 22 +- .../ActivityEditor/Wizard/ActivityDescr.cs | 34 +- .../ActivityEditor/Wizard/SelectRoute.cs | 5 +- .../ActivityEditor/Wizard/SinglePage.cs | 3 +- .../ActivityEditor/Wizard/TrainInfo.cs | 10 +- .../ActivityEditor/Wizard/WizardForm.cs | 164 ++++--- .../Contrib/ActivityEditor/LibAE/AEUtility.cs | 10 +- .../LibAE/Formats/ActivityInfo.cs | 13 +- .../LibAE/Formats/MSTSDataConfig.cs | 9 +- .../ActivityEditor/LibAE/Formats/PathEvent.cs | 19 +- .../ActivityEditor/LibAE/Formats/TrackDef.cs | 13 +- .../Contrib/ActivityEditor/LibAE/RouteInfo.cs | 2 + Source/Contrib/ContentManager/Content.cs | 12 +- Source/Contrib/ContentManager/ContentInfo.cs | 7 +- .../Contrib/ContentManager/ContentManager.cs | 2 +- .../ContentManager/ContentManagerGUI.cs | 2 +- Source/Contrib/ContentManager/ContentOR.cs | 3 + .../Contrib/ContentManager/Models/Activity.cs | 4 +- Source/Contrib/ContentManager/Models/Car.cs | 5 +- .../Contrib/ContentManager/Models/Consist.cs | 8 +- Source/Contrib/ContentManager/Models/Path.cs | 4 +- Source/Contrib/ContentManager/Models/Route.cs | 5 +- .../Contrib/ContentManager/Models/Service.cs | 6 +- Source/Contrib/ContentManager/Program.cs | 2 + Source/Contrib/DataCollector/Program.cs | 4 +- .../Contrib/DataConverter/ClockConverter.cs | 9 +- .../Contrib/DataConverter/TerrainConverter.cs | 2 +- Source/Contrib/DataValidator/Program.cs | 2 +- .../Contrib/DataValidator/TerrainValidator.cs | 6 +- Source/Contrib/DataValidator/Validator.cs | 2 + Source/Contrib/SimulatorTester/Program.cs | 8 +- .../TrackViewer/Drawing/BasicShapes.cs | 77 +-- .../TrackViewer/Drawing/CloseToMouse.cs | 22 +- .../TrackViewer/Drawing/DebugWindow.cs | 6 +- .../Contrib/TrackViewer/Drawing/DrawArea.cs | 13 +- .../Contrib/TrackViewer/Drawing/DrawColors.cs | 58 +-- .../Drawing/DrawLongitudeLatitude.cs | 8 +- .../TrackViewer/Drawing/DrawMultiplePaths.cs | 10 +- .../TrackViewer/Drawing/DrawScaleRuler.cs | 21 +- .../TrackViewer/Drawing/DrawTerrain.cs | 4 +- .../TrackViewer/Drawing/DrawTrackDB.cs | 66 +-- .../TrackViewer/Drawing/DrawWorldTiles.cs | 12 +- .../TrackViewer/Drawing/DrawableTrackItem.cs | 40 +- .../TrackViewer/Drawing/Labels/DrawLabels.cs | 24 +- .../Drawing/Labels/EditLabel.xaml.cs | 7 +- .../Drawing/Labels/StorableLabels.cs | 7 +- .../TrackViewer/Drawing/ShadowDrawArea.cs | 72 +-- .../TrackViewer/Editing/AutoConnectTools.cs | 28 +- .../Editing/AutoFixAllPaths.xaml.cs | 24 +- .../Editing/Charts/DrawPathChart.cs | 64 +-- .../Editing/Charts/PathChartData.cs | 38 +- .../Editing/Charts/PathChartWindow.xaml.cs | 15 +- .../TrackViewer/Editing/ConnectableNode.cs | 17 +- .../TrackViewer/Editing/DrawEditorAction.cs | 4 +- .../TrackViewer/Editing/DrawPATfile.cs | 18 +- .../Contrib/TrackViewer/Editing/DrawPath.cs | 50 +- .../TrackViewer/Editing/EditorActions.cs | 96 ++-- .../TrackViewer/Editing/ModificationTools.cs | 16 +- .../Contrib/TrackViewer/Editing/PathEditor.cs | 52 +- .../Editing/PathMetadataDialog.xaml.cs | 19 +- .../TrackViewer/Editing/SavePatFile.cs | 36 +- .../TrackViewer/Editing/TrackExtensions.cs | 15 +- .../Contrib/TrackViewer/Editing/Trainpath.cs | 22 +- .../TrackViewer/Editing/TrainpathNode.cs | 66 +-- .../Editing/WaitPointDialog.xaml.cs | 24 +- Source/Contrib/TrackViewer/Program.cs | 2 +- Source/Contrib/TrackViewer/TrackViewer.cs | 37 +- .../TrackViewer/UserInterface/Languages.cs | 5 +- .../UserInterface/MenuControl.xaml.cs | 17 +- .../UserInterface/OtherPathsWindow.xaml.cs | 14 +- .../UserInterface/SearchControl.xaml.cs | 17 +- .../UserInterface/StatusBarControl.xaml.cs | 24 +- .../UserInterface/TVInputSettings.cs | 35 +- .../TrackViewer/UserInterface/TVUserInput.cs | 2 +- Source/Launcher/Program.cs | 2 +- Source/Menu/ImportExportSaveForm.cs | 16 +- Source/Menu/MainForm.cs | 21 +- Source/Menu/Options.cs | 14 +- Source/Menu/Program.cs | 4 +- Source/Menu/ResumeForm.cs | 39 +- Source/Menu/SortableBindingList.cs | 3 + Source/Menu/Task.cs | 1 + Source/Menu/TestingForm.cs | 6 +- Source/ORTS.Common/Conversions.cs | 56 ++- Source/ORTS.Common/Coordinates.cs | 4 +- Source/ORTS.Common/DataLogger.cs | 9 +- Source/ORTS.Common/Filter.cs | 33 +- Source/ORTS.Common/FxCopAttributes.cs | 69 +-- Source/ORTS.Common/InfoApiMap.cs | 5 +- Source/ORTS.Common/Integrator.cs | 3 + Source/ORTS.Common/SettingsBase.cs | 158 +++--- Source/ORTS.Common/SettingsStore.cs | 129 ++--- Source/ORTS.Common/SmoothedData.cs | 2 + Source/ORTS.Common/SystemInfo.cs | 5 +- .../ORTS.Common/TrackMonitorSignalAspect.cs | 5 + Source/ORTS.Common/VersionInfo.cs | 1 + Source/ORTS.Common/WorldLatLon.cs | 2 +- Source/ORTS.Common/enums.cs | 5 + Source/ORTS.Content/MSTSPath.cs | 30 +- Source/ORTS.IO/BufferedInMemoryStream.cs | 228 ++++----- Source/ORTS.IO/ByteEncoding.cs | 159 +++--- Source/ORTS.Menu/Activities.cs | 1 + Source/ORTS.Menu/Consists.cs | 1 + Source/ORTS.Menu/Folders.cs | 2 +- Source/ORTS.Menu/ORTimetables.cs | 5 +- Source/ORTS.Menu/Paths.cs | 5 +- Source/ORTS.Menu/Routes.cs | 4 +- Source/ORTS.Settings/FolderSettings.cs | 4 + Source/ORTS.Settings/InputSettings.cs | 10 +- Source/ORTS.Settings/UpdateState.cs | 2 +- Source/ORTS.Updater/NativeMethods.cs | 3 + Source/ORTS.Updater/UpdateManager.cs | 8 +- Source/Orts.Formats.Msts/ActivityFile.cs | 372 ++++++-------- Source/Orts.Formats.Msts/CabViewFile.cs | 150 +++--- .../CameraConfigurationFile.cs | 11 +- Source/Orts.Formats.Msts/CarSpawnerFile.cs | 22 +- Source/Orts.Formats.Msts/ConsistFile.cs | 3 + Source/Orts.Formats.Msts/EngineFile.cs | 2 + Source/Orts.Formats.Msts/HazardFile.cs | 80 +-- Source/Orts.Formats.Msts/LightCollection.cs | 7 +- Source/Orts.Formats.Msts/PathFile.cs | 96 ++-- Source/Orts.Formats.Msts/RoadDatabaseFile.cs | 53 +- Source/Orts.Formats.Msts/RouteFile.cs | 29 +- Source/Orts.Formats.Msts/ServiceFile.cs | 47 +- .../Orts.Formats.Msts/ShapeDescriptorFile.cs | 1 + Source/Orts.Formats.Msts/ShapeFile.cs | 3 +- .../SignalConfigurationFile.cs | 8 +- Source/Orts.Formats.Msts/SignalEnums.cs | 5 + Source/Orts.Formats.Msts/SignalScripts.cs | 3 +- .../Orts.Formats.Msts/SoundManagmentFile.cs | 77 +-- Source/Orts.Formats.Msts/SpeedpostDatFile.cs | 23 +- Source/Orts.Formats.Msts/TrackDatabaseFile.cs | 102 ++-- Source/Orts.Formats.Msts/TrackSectionsFile.cs | 463 +++++++++--------- Source/Orts.Formats.Msts/TrackTypesFile.cs | 18 +- Source/Orts.Formats.Msts/TrafficFile.cs | 7 +- Source/Orts.Formats.Msts/WagonFile.cs | 2 + Source/Orts.Formats.Msts/WorldFile.cs | 76 ++- Source/Orts.Formats.OR/AEItems.cs | 32 +- Source/Orts.Formats.OR/AESegment.cs | 4 +- Source/Orts.Formats.OR/AESignals.cs | 4 +- Source/Orts.Formats.OR/AEStationPath.cs | 36 +- Source/Orts.Formats.OR/AETraveller.cs | 12 +- Source/Orts.Formats.OR/AuxActionRef.cs | 14 +- Source/Orts.Formats.OR/ClocksFile.cs | 10 +- Source/Orts.Formats.OR/ContainerFile.cs | 13 +- Source/Orts.Formats.OR/DrawUtility.cs | 54 +- Source/Orts.Formats.OR/ExtCarSpawnerFile.cs | 6 +- Source/Orts.Formats.OR/GlobalItem.cs | 4 +- .../LoadStationsPopulationFile.cs | 6 + Source/Orts.Formats.OR/MSTSCoord.cs | 10 +- Source/Orts.Formats.OR/MSTSData.cs | 6 +- .../Orts.Formats.OR/RouteConfigurationFile.cs | 84 ++-- Source/Orts.Formats.OR/RouteItems.cs | 12 +- Source/Orts.Formats.OR/TimetableFile.cs | 2 +- Source/Orts.Formats.OR/TimetableGroupFile.cs | 2 +- Source/Orts.Formats.OR/TrackCircuitElement.cs | 2 +- Source/Orts.Formats.OR/TrackNodeAE.cs | 2 +- Source/Orts.Formats.OR/WeatherFile.cs | 7 +- Source/Orts.Parsers.Msts/Interpolator.cs | 100 ++-- Source/Orts.Parsers.Msts/SBR.cs | 8 +- Source/Orts.Parsers.Msts/STFReader.cs | 13 +- Source/Orts.Parsers.Msts/TokenID.cs | 10 +- Source/Orts.Parsers.OR/JsonReader.cs | 5 +- Source/Orts.Parsers.OR/TimetableReader.cs | 1 + Source/Orts.Simulation/Common/CommandLog.cs | 124 ++--- Source/Orts.Simulation/Common/Commands.cs | 74 ++- Source/Orts.Simulation/Common/ErrorLogger.cs | 2 +- Source/Orts.Simulation/Common/Events.cs | 12 +- Source/Orts.Simulation/Common/Math.cs | 152 +++--- Source/Orts.Simulation/Common/ORTSPaths.cs | 6 +- .../Common/Scripting/BrakeController.cs | 2 +- .../Common/Scripting/Commands.cs | 2 +- .../Common/Scripting/Common.cs | 2 +- .../PowerSupply/ControlCarPowerSupply.cs | 2 + .../PowerSupply/LocomotivePowerSupply.cs | 2 +- .../Scripting/PowerSupply/PowerSupply.cs | 2 +- .../Common/Scripting/ScriptManager.cs | 7 +- .../Common/Scripting/TrainControlSystem.cs | 26 +- Source/Orts.Simulation/Common/SteamTable.cs | 144 +++--- .../Orts.Simulation/MultiPlayer/ClientComm.cs | 264 +++++----- Source/Orts.Simulation/MultiPlayer/Decoder.cs | 90 ++-- .../Orts.Simulation/MultiPlayer/MPManager.cs | 46 +- Source/Orts.Simulation/MultiPlayer/Message.cs | 172 +++---- .../MultiPlayer/OnlinePlayer.cs | 272 +++++----- .../MultiPlayer/OnlineTrains.cs | 20 +- Source/Orts.Simulation/MultiPlayer/Server.cs | 107 ++-- .../Orts.Simulation/MultiPlayer/ServerComm.cs | 92 ++-- Source/Orts.Simulation/Simulation/AIs/AI.cs | 18 +- .../Simulation/AIs/AIAuxAction.cs | 73 +-- .../Orts.Simulation/Simulation/AIs/AIPath.cs | 64 +-- .../Orts.Simulation/Simulation/AIs/AITrain.cs | 64 +-- Source/Orts.Simulation/Simulation/Activity.cs | 86 ++-- .../Orts.Simulation/Simulation/Confirmer.cs | 111 ++--- .../Orts.Simulation/Simulation/Container.cs | 65 +-- .../Orts.Simulation/Simulation/FuelPickup.cs | 4 +- Source/Orts.Simulation/Simulation/Hazzard.cs | 222 ++++----- .../Simulation/LevelCrossing.cs | 30 +- .../Simulation/Physics/Train.cs | 168 ++++--- .../RollingStocks/LocomotiveAttributes.cs | 5 +- .../RollingStocks/MSTSControlTrailerCar.cs | 6 +- .../RollingStocks/MSTSDieselLocomotive.cs | 50 +- .../RollingStocks/MSTSElectricLocomotive.cs | 15 +- .../RollingStocks/MSTSLocomotive.cs | 268 +++++----- .../RollingStocks/MSTSSteamLocomotive.cs | 203 ++++---- .../Simulation/RollingStocks/MSTSWagon.cs | 218 ++++----- .../Simulation/RollingStocks/RollingStock.cs | 8 +- .../SubSystems/Brakes/BrakeSystem.cs | 2 +- .../SubSystems/Brakes/MSTS/AirSinglePipe.cs | 91 ++-- .../SubSystems/Brakes/MSTS/EPBrakeSystem.cs | 9 +- .../SubSystems/Brakes/MSTS/ManualBraking.cs | 16 +- .../SubSystems/Brakes/MSTS/SMEBrakeSystem.cs | 9 +- .../Brakes/MSTS/SingleTransferPipe.cs | 19 +- .../Brakes/MSTS/StraightVacuumSinglePipe.cs | 31 +- .../Brakes/MSTS/VacuumSinglePipe.cs | 76 +-- .../SubSystems/Controllers/BrakeController.cs | 11 +- .../Controllers/ControllerFactory.cs | 8 +- .../SubSystems/Controllers/IController.cs | 2 +- .../Controllers/MSTSBrakeController.cs | 10 +- .../Controllers/MSTSNotchController.cs | 61 ++- .../Controllers/MultiPositionController.cs | 7 +- .../RollingStocks/SubSystems/CruiseControl.cs | 66 +-- .../RollingStocks/SubSystems/Door.cs | 38 +- .../RollingStocks/SubSystems/EOT.cs | 23 +- .../SubSystems/FreightAnimations.cs | 30 +- .../RollingStocks/SubSystems/ISubSystem.cs | 2 +- .../SubSystems/PowerSupplies/BatterySwitch.cs | 3 +- .../PowerSupplies/CircuitBreaker.cs | 2 +- .../PowerSupplies/ControlCarPowerSupply.cs | 9 +- .../SubSystems/PowerSupplies/DieselEngine.cs | 118 ++--- .../PowerSupplies/DieselPowerSupply.cs | 2 +- .../PowerSupplies/DualModePowerSupply.cs | 4 +- .../PowerSupplies/ElectricPowerSupply.cs | 4 +- .../ElectricTrainSupplySwitch.cs | 2 +- .../SubSystems/PowerSupplies/MasterKey.cs | 10 +- .../SubSystems/PowerSupplies/Pantograph.cs | 9 +- .../PowerSupplies/PassengerCarPowerSupply.cs | 5 +- .../PowerSupplies/TractionCutOffRelay.cs | 2 +- .../SubSystems/PowerTransmissions/Axle.cs | 14 +- .../PowerTransmissions/ElectricMotor.cs | 3 +- .../SubSystems/PowerTransmissions/GearBox.cs | 59 ++- .../PowerTransmissions/SeriesMotor.cs | 4 +- .../SubSystems/TrainControlSystem.cs | 126 +++-- .../Simulation/RollingStocks/TrainCar.cs | 103 ++-- .../Simulation/Signalling/CsSignalScript.cs | 12 +- .../Simulation/Signalling/DeadlockInfo.cs | 2 +- .../Simulation/Signalling/DeadlockPathInfo.cs | 2 +- .../Simulation/Signalling/SIGSCRfile.cs | 6 +- .../Signalling/SignalWorldObject.cs | 2 +- .../Simulation/Signalling/Signals.cs | 17 +- .../Signalling/SpeedPostWorldObject.cs | 4 +- .../Signalling/TrackCircuitState.cs | 2 +- .../Simulation/Signalling/TrainOccupyState.cs | 2 +- .../Simulation/Signalling/TrainQueue.cs | 2 +- .../Orts.Simulation/Simulation/Simulator.cs | 25 +- .../Simulation/SuperElevation.cs | 6 +- .../Simulation/Timetables/PoolInfo.cs | 8 +- .../Simulation/Timetables/ProcessTimetable.cs | 22 +- .../Simulation/Timetables/TTPool.cs | 20 +- .../Simulation/Timetables/TTTrain.cs | 92 ++-- .../Simulation/Timetables/TTTurntable.cs | 15 +- .../Simulation/Transfertables.cs | 40 +- .../Orts.Simulation/Simulation/Traveller.cs | 10 +- .../Orts.Simulation/Simulation/Turntables.cs | 31 +- Source/Orts.Simulation/Simulation/Weather.cs | 10 +- Source/RunActivity/Processes/Profiler.cs | 2 +- Source/RunActivity/Viewer3D/ALSoundHelper.cs | 14 +- Source/RunActivity/Viewer3D/AnimatedPart.cs | 4 +- Source/RunActivity/Viewer3D/Cameras.cs | 46 +- Source/RunActivity/Viewer3D/Commands.cs | 184 +++---- Source/RunActivity/Viewer3D/Common/Helpers.cs | 4 +- Source/RunActivity/Viewer3D/DDSLib.cs | 2 +- .../Viewer3D/Debugging/DebugViewerForm.cs | 4 +- .../Viewer3D/Debugging/MessageViewer.cs | 6 +- .../Viewer3D/Debugging/SoundDebugForm.cs | 4 +- Source/RunActivity/Viewer3D/DynamicTrack.cs | 16 +- Source/RunActivity/Viewer3D/Forest.cs | 16 +- Source/RunActivity/Viewer3D/InfoDisplay.cs | 132 +++-- Source/RunActivity/Viewer3D/Lights.cs | 28 +- Source/RunActivity/Viewer3D/MSTSSky.cs | 22 +- Source/RunActivity/Viewer3D/Materials.cs | 92 ++-- Source/RunActivity/Viewer3D/Noise.cs | 175 ++++--- .../RunActivity/Viewer3D/ParticleEmitter.cs | 10 +- .../Viewer3D/Popups/ActivityWindow.cs | 9 +- .../Viewer3D/Popups/CarOperationsWindow.cs | 4 +- .../Viewer3D/Popups/CompassWindow.cs | 74 +-- .../Viewer3D/Popups/ComposeMessage.cs | 2 +- .../Viewer3D/Popups/EOTListWindow.cs | 16 +- .../RunActivity/Viewer3D/Popups/HUDWindow.cs | 35 +- .../RunActivity/Viewer3D/Popups/HelpWindow.cs | 23 +- .../Viewer3D/Popups/LayeredWindow.cs | 28 +- .../Viewer3D/Popups/MessagesWindow.cs | 36 +- .../Viewer3D/Popups/MultiPlayerWindow.cs | 19 +- .../Viewer3D/Popups/NextStationWindow.cs | 6 +- Source/RunActivity/Viewer3D/Popups/OSDCars.cs | 3 +- .../Viewer3D/Popups/OSDLocations.cs | 3 +- .../RunActivity/Viewer3D/Popups/QuitWindow.cs | 25 +- .../Viewer3D/Popups/SignallingDebugWindow.cs | 7 +- .../Viewer3D/Popups/SwitchWindow.cs | 6 +- .../Viewer3D/Popups/TTDetachWindow.cs | 10 +- .../Viewer3D/Popups/TrackMonitorWindow.cs | 52 +- .../Viewer3D/Popups/TracksDebugWindow.cs | 8 +- .../Viewer3D/Popups/TrainDPUWindow.cs | 39 +- .../Viewer3D/Popups/TrainDrivingWindow.cs | 16 +- .../Viewer3D/Popups/TrainListWindow.cs | 9 +- .../Viewer3D/Popups/TrainOperationsWindow.cs | 4 +- Source/RunActivity/Viewer3D/Popups/Window.cs | 46 +- .../Viewer3D/Popups/WindowControls.cs | 8 +- .../Viewer3D/Popups/WindowManager.cs | 154 +++--- .../RunActivity/Viewer3D/Popups/WindowText.cs | 8 +- Source/RunActivity/Viewer3D/Precipitation.cs | 15 +- Source/RunActivity/Viewer3D/Processes/Game.cs | 6 +- .../Processes/GameStateRunActivity.cs | 46 +- .../Viewer3D/Processes/GameStateViewer3D.cs | 4 +- .../Viewer3D/Processes/LoaderProcess.cs | 4 +- .../Viewer3D/Processes/RenderProcess.cs | 6 +- .../Viewer3D/Processes/SoundProcess.cs | 16 +- .../Viewer3D/Processes/UpdaterProcess.cs | 4 +- .../Viewer3D/Processes/WatchdogProcess.cs | 6 +- .../Viewer3D/Processes/WebServerProcess.cs | 16 +- Source/RunActivity/Viewer3D/RenderFrame.cs | 254 +++++----- Source/RunActivity/Viewer3D/RoadCars.cs | 14 +- .../MSTSDieselLocomotiveViewer.cs | 4 +- .../MSTSElectricLocomotiveViewer.cs | 6 +- .../RollingStock/MSTSLocomotiveViewer.cs | 38 +- .../RollingStock/MSTSSteamLocomotiveViewer.cs | 30 +- .../Viewer3D/RollingStock/MSTSWagonViewer.cs | 65 +-- .../SubSystems/ContainerViewer.cs | 21 +- .../SubSystems/CruiseControlViewer.cs | 4 + .../SubSystems/DistributedPowerInterface.cs | 34 +- .../RollingStock/SubSystems/ETCS/DataEntry.cs | 52 +- .../SubSystems/ETCS/DriverMachineInterface.cs | 24 +- .../RollingStock/SubSystems/ETCS/Menus.cs | 2 +- .../SubSystems/ETCS/PlanningWindow.cs | 14 +- .../ETCS/SpeedDistanceMonitoring.cs | 9 +- .../SubSystems/ETCS/TextMessages.cs | 12 +- .../SubSystems/FreightAnimationsViewer.cs | 4 +- .../Viewer3D/RollingStock/TrainCarViewer.cs | 2 +- Source/RunActivity/Viewer3D/Scenery.cs | 14 +- Source/RunActivity/Viewer3D/Shaders.cs | 20 +- Source/RunActivity/Viewer3D/Shapes.cs | 33 +- Source/RunActivity/Viewer3D/Signals.cs | 10 +- Source/RunActivity/Viewer3D/Sky.cs | 2 +- Source/RunActivity/Viewer3D/Sound.cs | 182 +++---- Source/RunActivity/Viewer3D/SuperElevation.cs | 6 +- Source/RunActivity/Viewer3D/Terrain.cs | 12 +- Source/RunActivity/Viewer3D/Tiles.cs | 6 +- Source/RunActivity/Viewer3D/Trains.cs | 40 +- Source/RunActivity/Viewer3D/Transfers.cs | 7 +- Source/RunActivity/Viewer3D/UserInput.cs | 8 +- .../RunActivity/Viewer3D/UserInputExternal.cs | 23 +- .../Viewer3D/UserInputRailDriver.cs | 28 +- Source/RunActivity/Viewer3D/Viewer.cs | 27 +- Source/RunActivity/Viewer3D/Water.cs | 12 +- Source/RunActivity/Viewer3D/Weather.cs | 45 +- .../Viewer3D/WebServices/ControlValue.cs | 16 +- .../WebServices/TrackMonitorDisplay.cs | 9 +- .../Viewer3D/WebServices/TrainDpuDisplay.cs | 7 +- .../WebServices/TrainDrivingDisplay.cs | 8 +- .../Viewer3D/WebServices/WebServer.cs | 17 +- Source/RunActivity/Viewer3D/Wire.cs | 14 +- Source/RunActivity/Viewer3D/World.cs | 4 +- Source/Tests/AssertWarnings.cs | 3 + Source/Tests/Orts.Common/Conversions.cs | 2 +- Source/Tests/Orts.Parsers.Msts/StfReader.cs | 26 +- .../Orts.Parsers.OR/TimetableReaderTests.cs | 9 +- Source/Tests/TestFile.cs | 3 + Source/Updater/UpdaterProgress.cs | 10 +- 424 files changed, 6618 insertions(+), 6104 deletions(-) diff --git a/Source/ContentChecker/AceLoader.cs b/Source/ContentChecker/AceLoader.cs index e22c3b2f4e..271cb9dcc3 100644 --- a/Source/ContentChecker/AceLoader.cs +++ b/Source/ContentChecker/AceLoader.cs @@ -15,6 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; using Orts.Formats.Msts; namespace ContentChecker diff --git a/Source/ContentChecker/ActivityLoader.cs b/Source/ContentChecker/ActivityLoader.cs index 6cfc100a9f..f302a1347d 100644 --- a/Source/ContentChecker/ActivityLoader.cs +++ b/Source/ContentChecker/ActivityLoader.cs @@ -15,6 +15,14 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; + +using Orts.Formats.Msts; + namespace ContentChecker { /// diff --git a/Source/ContentChecker/CabviewLoader.cs b/Source/ContentChecker/CabviewLoader.cs index 982e24be1c..ebb724b814 100644 --- a/Source/ContentChecker/CabviewLoader.cs +++ b/Source/ContentChecker/CabviewLoader.cs @@ -15,6 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; + using Orts.Formats.Msts; namespace ContentChecker diff --git a/Source/ContentChecker/CarSpawnLoader.cs b/Source/ContentChecker/CarSpawnLoader.cs index 0674c00b92..e1640324d5 100644 --- a/Source/ContentChecker/CarSpawnLoader.cs +++ b/Source/ContentChecker/CarSpawnLoader.cs @@ -15,7 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; using System.IO; using Orts.Formats.Msts; diff --git a/Source/ContentChecker/ConsistLoader.cs b/Source/ContentChecker/ConsistLoader.cs index 7a2d92c1cf..a590a80635 100644 --- a/Source/ContentChecker/ConsistLoader.cs +++ b/Source/ContentChecker/ConsistLoader.cs @@ -15,6 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; + using Orts.Formats.Msts; namespace ContentChecker diff --git a/Source/ContentChecker/EngineLoader.cs b/Source/ContentChecker/EngineLoader.cs index d4727e8642..f859f84fb3 100644 --- a/Source/ContentChecker/EngineLoader.cs +++ b/Source/ContentChecker/EngineLoader.cs @@ -15,6 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; + using Orts.Formats.Msts; namespace ContentChecker diff --git a/Source/ContentChecker/EnvironmentFileLoader.cs b/Source/ContentChecker/EnvironmentFileLoader.cs index 17fbc3155e..4f7a7762de 100644 --- a/Source/ContentChecker/EnvironmentFileLoader.cs +++ b/Source/ContentChecker/EnvironmentFileLoader.cs @@ -15,6 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; + using Orts.Formats.Msts; namespace ContentChecker diff --git a/Source/ContentChecker/HazardLoader.cs b/Source/ContentChecker/HazardLoader.cs index 47d6fc1efe..2273a20950 100644 --- a/Source/ContentChecker/HazardLoader.cs +++ b/Source/ContentChecker/HazardLoader.cs @@ -15,6 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; + using Orts.Formats.Msts; namespace ContentChecker diff --git a/Source/ContentChecker/Loader.cs b/Source/ContentChecker/Loader.cs index 2f564e4474..563fe174d8 100644 --- a/Source/ContentChecker/Loader.cs +++ b/Source/ContentChecker/Loader.cs @@ -38,9 +38,12 @@ // done at a higher level, currently. using System; +using System.Collections.Generic; using System.Diagnostics; -using System.Windows.Forms; +using System.Linq; +using System.Text; using Microsoft.Xna.Framework.Graphics; +using System.Windows.Forms; namespace ContentChecker { @@ -67,7 +70,7 @@ abstract class Loader /// The number of files that were actually loaded public int FilesLoaded { get; protected set; } /// The number of files that were not loaded but skipped - public int FilesSkipped { get; protected set; } + public int FilesSkipped {get; protected set;} /// The action to take when an additonal file has been identified. This is intended to be set externally protected Action AddAdditionalFileAction { get; set; } diff --git a/Source/ContentChecker/LoaderFactory.cs b/Source/ContentChecker/LoaderFactory.cs index 75be12673f..28f698384f 100644 --- a/Source/ContentChecker/LoaderFactory.cs +++ b/Source/ContentChecker/LoaderFactory.cs @@ -24,6 +24,8 @@ // 3. The filename in case also the SIMIS header is not unique, or the file does not have a SIMIS header using System; +using System.Collections.Generic; +using System.Linq; using System.IO; namespace ContentChecker diff --git a/Source/ContentChecker/NotRecognizedLoader.cs b/Source/ContentChecker/NotRecognizedLoader.cs index ad8a5ffa95..4ee87e84dc 100644 --- a/Source/ContentChecker/NotRecognizedLoader.cs +++ b/Source/ContentChecker/NotRecognizedLoader.cs @@ -16,6 +16,12 @@ // along with Open Rails. If not, see . using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; + +using Orts.Viewer3D; namespace ContentChecker { diff --git a/Source/ContentChecker/NotUsedLoader.cs b/Source/ContentChecker/NotUsedLoader.cs index 03486c6391..16869a9946 100644 --- a/Source/ContentChecker/NotUsedLoader.cs +++ b/Source/ContentChecker/NotUsedLoader.cs @@ -16,6 +16,12 @@ // along with Open Rails. If not, see . using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; + +using Orts.Viewer3D; namespace ContentChecker { diff --git a/Source/ContentChecker/PathLoader.cs b/Source/ContentChecker/PathLoader.cs index a3856ae304..612c97a9ab 100644 --- a/Source/ContentChecker/PathLoader.cs +++ b/Source/ContentChecker/PathLoader.cs @@ -15,6 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; + using Orts.Formats.Msts; namespace ContentChecker diff --git a/Source/ContentChecker/Program.cs b/Source/ContentChecker/Program.cs index c74d0b43b0..f5900037f6 100644 --- a/Source/ContentChecker/Program.cs +++ b/Source/ContentChecker/Program.cs @@ -68,9 +68,8 @@ static void Main(string[] args) /// The command line arguments that need to be checked for an iption /// The list of option names that need to be found /// true if one of the optionNames is given - static bool OptionsContain(string[] args, IEnumerable optionNames) - { - return optionNames.Any((option) => args.Contains(option, StringComparer.OrdinalIgnoreCase)); + static bool OptionsContain(string[] args, IEnumerable optionNames) { + return optionNames.Any((option) => args.Contains(option, StringComparer.OrdinalIgnoreCase) ); } /// @@ -196,8 +195,7 @@ static void LoadFiles(IEnumerable files, bool verbose, AdditionType addi { LoadAllFlat(); } - else - { + else { LoadWithAdditional(additionType); } @@ -320,7 +318,7 @@ static void SetConsoleBufferSize() int minimumBuffer = BUFFERMARGIN + Console.CursorTop; if (Console.BufferHeight < minimumBuffer) { - Console.SetBufferSize(Console.BufferWidth, minimumBuffer + BUFFEREXTENSION); + Console.SetBufferSize(Console.BufferWidth, minimumBuffer + BUFFEREXTENSION ); } } diff --git a/Source/ContentChecker/RoadDataBaseLoader.cs b/Source/ContentChecker/RoadDataBaseLoader.cs index 8248c77e25..9d3b85bb19 100644 --- a/Source/ContentChecker/RoadDataBaseLoader.cs +++ b/Source/ContentChecker/RoadDataBaseLoader.cs @@ -15,6 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; + using Orts.Formats.Msts; namespace ContentChecker diff --git a/Source/ContentChecker/ServiceLoader.cs b/Source/ContentChecker/ServiceLoader.cs index f0cde00dc1..d960271a12 100644 --- a/Source/ContentChecker/ServiceLoader.cs +++ b/Source/ContentChecker/ServiceLoader.cs @@ -15,6 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; + using Orts.Formats.Msts; namespace ContentChecker diff --git a/Source/ContentChecker/ShapeDescriptionLoader.cs b/Source/ContentChecker/ShapeDescriptionLoader.cs index 33d4701ed5..cbc8781dea 100644 --- a/Source/ContentChecker/ShapeDescriptionLoader.cs +++ b/Source/ContentChecker/ShapeDescriptionLoader.cs @@ -15,6 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; + using Orts.Formats.Msts; namespace ContentChecker diff --git a/Source/ContentChecker/ShapeLoader.cs b/Source/ContentChecker/ShapeLoader.cs index ac6b96c35e..516e8d7dd6 100644 --- a/Source/ContentChecker/ShapeLoader.cs +++ b/Source/ContentChecker/ShapeLoader.cs @@ -15,6 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; + using Orts.Formats.Msts; namespace ContentChecker diff --git a/Source/ContentChecker/SignalConfigLoader.cs b/Source/ContentChecker/SignalConfigLoader.cs index a0639ce066..e1c346b5cc 100644 --- a/Source/ContentChecker/SignalConfigLoader.cs +++ b/Source/ContentChecker/SignalConfigLoader.cs @@ -15,6 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; using System.IO; using Orts.Formats.Msts; diff --git a/Source/ContentChecker/SignalScriptLoader.cs b/Source/ContentChecker/SignalScriptLoader.cs index ff277abb57..9a961bba7d 100644 --- a/Source/ContentChecker/SignalScriptLoader.cs +++ b/Source/ContentChecker/SignalScriptLoader.cs @@ -17,6 +17,9 @@ using System; using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; using System.IO; using Orts.Formats.Msts; @@ -62,8 +65,7 @@ public override void TryLoading(string file) FilesLoaded = 0; Console.WriteLine("signal script files can not be loaded independently. Try the option /d"); } - else - { + else { // we want to load the signal scripts one by one, not as a group var scriptFiles = new List() { Path.GetFileName(file) }; var scrfile = new SIGSCRfile(new SignalScripts(_sigcfg.ScriptPath, scriptFiles, diff --git a/Source/ContentChecker/SmsLoader.cs b/Source/ContentChecker/SmsLoader.cs index ed67c20b8b..94042a3496 100644 --- a/Source/ContentChecker/SmsLoader.cs +++ b/Source/ContentChecker/SmsLoader.cs @@ -15,11 +15,15 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; using System.Collections.Generic; using System.Diagnostics; -using Orts.Formats.Msts; +using System.Linq; +using System.IO; using Path = System.IO.Path; +using Orts.Formats.Msts; + namespace ContentChecker { /// @@ -98,8 +102,8 @@ void GetRouteAndBasePath(string file, out string routePath, out string basePath) basePath = null; Stack subDirectories = new Stack(); string directory = Path.GetDirectoryName(file); - var root = Path.GetPathRoot(file); - while (directory.Length > root.Length) + var root=Path.GetPathRoot(file); + while (directory.Length > root.Length ) { string subdDirectoryName = Path.GetFileName(directory); if (subdDirectoryName.ToLowerInvariant().Equals("routes")) diff --git a/Source/ContentChecker/TerrainAltitudeLoader.cs b/Source/ContentChecker/TerrainAltitudeLoader.cs index f90c5314e9..ed0cc42f9e 100644 --- a/Source/ContentChecker/TerrainAltitudeLoader.cs +++ b/Source/ContentChecker/TerrainAltitudeLoader.cs @@ -16,6 +16,10 @@ // along with Open Rails. If not, see . using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; using Orts.Formats.Msts; diff --git a/Source/ContentChecker/TerrainFlagsLoader.cs b/Source/ContentChecker/TerrainFlagsLoader.cs index 97f8d8f8e8..7378b48e6c 100644 --- a/Source/ContentChecker/TerrainFlagsLoader.cs +++ b/Source/ContentChecker/TerrainFlagsLoader.cs @@ -16,6 +16,10 @@ // along with Open Rails. If not, see . using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; using Orts.Formats.Msts; diff --git a/Source/ContentChecker/TerrainLoader.cs b/Source/ContentChecker/TerrainLoader.cs index 20c19a7871..a16922c417 100644 --- a/Source/ContentChecker/TerrainLoader.cs +++ b/Source/ContentChecker/TerrainLoader.cs @@ -15,6 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; using System.IO; using Orts.Formats.Msts; diff --git a/Source/ContentChecker/TimeTableLoader.cs b/Source/ContentChecker/TimeTableLoader.cs index 19339be1c6..56387ff48a 100644 --- a/Source/ContentChecker/TimeTableLoader.cs +++ b/Source/ContentChecker/TimeTableLoader.cs @@ -16,6 +16,9 @@ // along with Open Rails. If not, see . using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; using System.IO; using Orts.Formats.OR; diff --git a/Source/ContentChecker/TrackDataBaseLoader.cs b/Source/ContentChecker/TrackDataBaseLoader.cs index 0cbc16aff5..05028416fb 100644 --- a/Source/ContentChecker/TrackDataBaseLoader.cs +++ b/Source/ContentChecker/TrackDataBaseLoader.cs @@ -15,6 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; using System.IO; using Orts.Formats.Msts; diff --git a/Source/ContentChecker/TrackFileLoader.cs b/Source/ContentChecker/TrackFileLoader.cs index 3af19851f9..3fb113afcd 100644 --- a/Source/ContentChecker/TrackFileLoader.cs +++ b/Source/ContentChecker/TrackFileLoader.cs @@ -17,10 +17,12 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.IO; -using Orts.Formats.Msts; using Path = System.IO.Path; +using Orts.Formats.Msts; + namespace ContentChecker { /// @@ -72,21 +74,19 @@ protected override void AddReferencedFiles() void AddAdditionalSMS(string smsFileName) { - if (smsFileName == null) { return; } + if (smsFileName == null) { return; } string smsInRoute = Path.Combine(Path.Combine(routePath, "SOUND"), smsFileName); if (File.Exists(smsInRoute)) { AddAdditionalFileAction.Invoke(smsInRoute, new SmsLoader()); } - else - { + else { string smsInBase = Path.Combine(Path.Combine(basePath, "SOUND"), smsFileName); AddAdditionalFileAction.Invoke(smsInBase, new SmsLoader()); } } - protected override void AddAllFiles() - { + protected override void AddAllFiles() { AddMainFiles(); AddAllActivities(); AddAllTiles(); diff --git a/Source/ContentChecker/TrackTypeLoader.cs b/Source/ContentChecker/TrackTypeLoader.cs index e19064793c..e110980ab5 100644 --- a/Source/ContentChecker/TrackTypeLoader.cs +++ b/Source/ContentChecker/TrackTypeLoader.cs @@ -15,6 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; + using Orts.Formats.Msts; namespace ContentChecker diff --git a/Source/ContentChecker/TrafficLoader.cs b/Source/ContentChecker/TrafficLoader.cs index 261a1ef211..5e5ead2f4c 100644 --- a/Source/ContentChecker/TrafficLoader.cs +++ b/Source/ContentChecker/TrafficLoader.cs @@ -15,6 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; + using Orts.Formats.Msts; namespace ContentChecker diff --git a/Source/ContentChecker/TsectionGlobalLoader.cs b/Source/ContentChecker/TsectionGlobalLoader.cs index 8c1ddcde85..d33a203e6f 100644 --- a/Source/ContentChecker/TsectionGlobalLoader.cs +++ b/Source/ContentChecker/TsectionGlobalLoader.cs @@ -15,10 +15,15 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; using System.IO; -using Orts.Formats.Msts; using Path = System.IO.Path; +using Orts.Formats.Msts; + namespace ContentChecker { /// diff --git a/Source/ContentChecker/TsectionLoader.cs b/Source/ContentChecker/TsectionLoader.cs index afdb6e467e..011cc72a16 100644 --- a/Source/ContentChecker/TsectionLoader.cs +++ b/Source/ContentChecker/TsectionLoader.cs @@ -15,9 +15,15 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using Orts.Formats.Msts; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; using Path = System.IO.Path; +using Orts.Formats.Msts; + namespace ContentChecker { /// diff --git a/Source/ContentChecker/WagonLoader.cs b/Source/ContentChecker/WagonLoader.cs index 343db5f414..03356e8b4d 100644 --- a/Source/ContentChecker/WagonLoader.cs +++ b/Source/ContentChecker/WagonLoader.cs @@ -15,6 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; + using Orts.Formats.Msts; namespace ContentChecker diff --git a/Source/ContentChecker/WavLoader.cs b/Source/ContentChecker/WavLoader.cs index 3480bb6a06..1da6871fd5 100644 --- a/Source/ContentChecker/WavLoader.cs +++ b/Source/ContentChecker/WavLoader.cs @@ -15,6 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; + using Orts.Viewer3D; namespace ContentChecker @@ -31,7 +37,7 @@ class WavLoader : Loader /// The file that needs to be loaded public override void TryLoading(string file) { - var soundPiece = new SoundPiece(file, false, false); + var soundPiece = new SoundPiece(file, false, false); } } } diff --git a/Source/ContentChecker/WorldFileLoader.cs b/Source/ContentChecker/WorldFileLoader.cs index 7db3ba4ada..0bb7f4b7f8 100644 --- a/Source/ContentChecker/WorldFileLoader.cs +++ b/Source/ContentChecker/WorldFileLoader.cs @@ -15,6 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; + using Orts.Formats.Msts; namespace ContentChecker @@ -31,7 +37,7 @@ class WorldFileLoader : Loader /// The file that needs to be loaded public override void TryLoading(string file) { - var wf = new WorldFile(file); + var wf = new WorldFile(file); } } } diff --git a/Source/ContentChecker/WorldSoundLoader.cs b/Source/ContentChecker/WorldSoundLoader.cs index 88e9bb5178..c7ef9974b1 100644 --- a/Source/ContentChecker/WorldSoundLoader.cs +++ b/Source/ContentChecker/WorldSoundLoader.cs @@ -16,6 +16,10 @@ // along with Open Rails. If not, see . using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; using Orts.Formats.Msts; diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/AboutActEdit.cs b/Source/Contrib/ActivityEditor/ActivityEditor/AboutActEdit.cs index 762ab4473b..cc6bd0767b 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/AboutActEdit.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/AboutActEdit.cs @@ -1,4 +1,8 @@ using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Linq; using System.Reflection; using System.Windows.Forms; diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/ActionProperties/ControlStartProperties.cs b/Source/Contrib/ActivityEditor/ActivityEditor/ActionProperties/ControlStartProperties.cs index 8e2cb0b0a5..eb3c6af310 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/ActionProperties/ControlStartProperties.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/ActionProperties/ControlStartProperties.cs @@ -1,5 +1,12 @@ using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; using System.Windows.Forms; +using LibAE.Formats; using Orts.Formats.OR; namespace ActivityEditor.ActionProperties diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/ActionProperties/ControlStoppedProperties.cs b/Source/Contrib/ActivityEditor/ActivityEditor/ActionProperties/ControlStoppedProperties.cs index 04723f7170..02edc59f23 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/ActionProperties/ControlStoppedProperties.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/ActionProperties/ControlStoppedProperties.cs @@ -1,4 +1,10 @@ using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; using System.Windows.Forms; namespace ActivityEditor.ActionProperties diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/ActionProperties/HornProperties.cs b/Source/Contrib/ActivityEditor/ActivityEditor/ActionProperties/HornProperties.cs index 7b17e85121..7e5c877bd7 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/ActionProperties/HornProperties.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/ActionProperties/HornProperties.cs @@ -1,5 +1,12 @@ using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; using System.Windows.Forms; +using LibAE.Formats; using Orts.Formats.OR; namespace ActivityEditor.ActionProperties diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Activity/StartActivity.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Activity/StartActivity.cs index f93eb77c4a..638d950dab 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Activity/StartActivity.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Activity/StartActivity.cs @@ -1,4 +1,10 @@ using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; using System.Windows.Forms; using ActivityEditor.Engine; diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Activity/WaitActivity.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Activity/WaitActivity.cs index dd70bba91f..f28555520b 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Activity/WaitActivity.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Activity/WaitActivity.cs @@ -1,4 +1,10 @@ using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; using System.Windows.Forms; namespace ActivityEditor.Activity diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Engine/AEActivity.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Engine/AEActivity.cs index 9ff3b91406..969b201bbb 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Engine/AEActivity.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Engine/AEActivity.cs @@ -20,9 +20,16 @@ /// Updates : /// +using System; +using System.IO; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Windows.Forms; +using AEWizard; +using LibAE; using LibAE.Formats; +using System.Xml.Serialization; using Orts.Formats.OR; namespace ActivityEditor.Engine diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Engine/AEConfig.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Engine/AEConfig.cs index 09a5ebd103..a1b1c31e23 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Engine/AEConfig.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Engine/AEConfig.cs @@ -22,13 +22,21 @@ using System; +using System.IO; using System.Collections.Generic; -using System.Drawing; +using System.Linq; +using System.Text; using System.Windows.Forms; +using System.Drawing; +using System.Drawing.Drawing2D; using ActivityEditor.Route_Metadata; +using LibAE; using LibAE.Formats; -using Orts.Formats.OR; +using Orts.Formats.Msts; +using Orts.Parsers.Msts; +using ORTS; using ORTS.Common; +using Orts.Formats.OR; namespace ActivityEditor.Engine { @@ -47,7 +55,7 @@ public class AEConfig public List tagWidgetInfo; private TypeEditor typeConfig; // Properties - + public AERouteConfig aeRouteConfig { get; set; } public Viewer2D Viewer { get; set; } public PseudoSim simulator { get { return Viewer.Simulator; } protected set { } } @@ -217,7 +225,7 @@ public void LoadRoute() tagGBList = new List(); stationWidgetInfo = new List(); stationGBList = new List(); - + Viewer.actParent.SuspendLayout(); //System.Drawing.Point current = activityAe.GetPanelPosition(); foreach (var item in getORWidget()) @@ -228,8 +236,8 @@ public void LoadRoute() int cnt = rnd.Next(999999); TagWidgetInfo newTagWidget = new TagWidgetInfo(Viewer, ((TagItem)item), cnt); AddTagWidgetInfo(newTagWidget); - - + + } } diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Engine/AERouteConfig.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Engine/AERouteConfig.cs index 90273ab7fe..3e1aaf5964 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Engine/AERouteConfig.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Engine/AERouteConfig.cs @@ -22,9 +22,18 @@ using System; +using System.IO; +using System.Collections.Generic; using System.Linq; +using System.Text; using System.Windows.Forms; +using System.Drawing; +using System.Drawing.Drawing2D; +using LibAE; +using LibAE.Formats; using Orts.Formats.Msts; +using Orts.Parsers.Msts; +using ORTS; using Orts.Formats.OR; namespace ActivityEditor.Engine @@ -42,7 +51,7 @@ public class AERouteConfig // MSTS data public TrackNode[] nodes { get { return simulator.nodes; } set { } } AEConfig Parent; - + public TrackSectionsFile TSectionDat { get { return Viewer.Simulator.TSectionDat; } protected set { } } public Viewer2D Viewer { get { return Parent.Viewer; } protected set { } } public PseudoSim simulator { get { return Viewer.Simulator; } protected set { } } diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Engine/ActEditor.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Engine/ActEditor.cs index 463ff55ac5..7f012ed70e 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Engine/ActEditor.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Engine/ActEditor.cs @@ -14,6 +14,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using ActivityEditor.Engine; +using AEWizard; +using LibAE.Formats; +using Orts.Formats.OR; +using ORTS.Common; /// This module ... /// /// Author: Stéfan Paitoni @@ -25,11 +30,6 @@ using System.Drawing; using System.IO; using System.Windows.Forms; -using ActivityEditor.Engine; -using AEWizard; -using LibAE.Formats; -using Orts.Formats.OR; -using ORTS.Common; namespace ActivityEditor { @@ -59,7 +59,7 @@ public partial class ActEditor : Form private bool loadEnabled = false; public List viewer2ds; public Viewer2D selectedViewer; - + private bool focusOnViewer = false; // Commented out as never used @@ -304,7 +304,7 @@ private void AddActivityEval_Click(object sender, EventArgs e) } #endregion - + private void MoveSelected_Click(object sender, EventArgs e) { DisplayStatusMessage("Please, Place Move Tool"); diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Engine/ProcessState.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Engine/ProcessState.cs index 5071358fd5..fb776e8266 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Engine/ProcessState.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Engine/ProcessState.cs @@ -21,6 +21,8 @@ /// +using System; +using System.IO; using System.Threading; namespace ActivityEditor.Engine diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Engine/PseudoSim.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Engine/PseudoSim.cs index 43986f7062..11128fa5f6 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Engine/PseudoSim.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Engine/PseudoSim.cs @@ -21,16 +21,25 @@ /// -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; using ActivityEditor.Engine; +using ActivityEditor.Preference; using LibAE; +using LibAE.Formats; using Orts.Formats.Msts; using Orts.Formats.OR; +using Orts.Parsers.Msts; +using ORTS; using ORTS.Common; using ORTS.Settings; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading; +using System.Windows.Forms; +using System.Xml.Serialization; namespace ActivityEditor { @@ -147,7 +156,7 @@ public void LoadItemsFromMSTS() { foundBuffer = new AEBufferItem((TrackNode)currNode); mstsItems.buffers.Add(foundBuffer); - } + } #if SHOW_STOPWATCH ts = stopWatch.Elapsed; stopWatch.Reset(); @@ -202,11 +211,11 @@ public void LoadItemsFromMSTS() { TrackNode connectedNode = nodes[pin.Link]; int direction = DrawUtility.getDirection(currNode, connectedNode); - if (MSTSCoord.near(currNode.getMSTSCoord(direction), connectedNode.getMSTSCoord(direction))) + if (MSTSCoord.near (currNode.getMSTSCoord(direction), connectedNode.getMSTSCoord(direction))) continue; AESegment aeSegment = new AESegment(currNode.getMSTSCoord(direction), connectedNode.getMSTSCoord(direction)); TrackSegment lineSeg = new TrackSegment(aeSegment, currNode, 0, direction, TSectionDat); - addTrItems(lineSeg, currNode); + addTrItems (lineSeg, currNode); mstsItems.AddSegment(lineSeg); } #if SHOW_STOPWATCH @@ -250,7 +259,7 @@ public void LoadItemsFromMSTS() maxsize = 2000; ZoomFactor = (decimal)maxsize; #endif - #region AddItem +#region AddItem Program.actEditor.DisplayStatusMessage("Init data for display... Load MSTS Items..."); @@ -288,7 +297,7 @@ public void LoadItemsFromMSTS() File.AppendAllText(@"C:\temp\stopwatch.txt", "Signals: " + elapsedTime + "\n"); stopWatch.Stop(); #endif - #endregion +#endregion } public void AddSegments(TrackNode node) @@ -307,7 +316,7 @@ public void AddSegments(TrackNode node) foreach (var idxTrItem in values) { if (!idxTrItem.Key) - break; + break; foreach (var val in idxTrItem) { var item = TDB.TrackDB.TrItemTable[val.Value]; diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Engine/SimpleTextEd.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Engine/SimpleTextEd.cs index c79d2f96e7..414d5f8993 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Engine/SimpleTextEd.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Engine/SimpleTextEd.cs @@ -1,18 +1,24 @@ using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; using System.Windows.Forms; namespace ActivityEditor.Engine { public partial class SimpleTextEd : Form { - + public SimpleTextEd() { InitializeComponent(); } + - - protected void Save_Click(Object sender, EventArgs e) + protected void Save_Click(Object sender, EventArgs e) { } } diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Engine/Viewer2D.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Engine/Viewer2D.cs index 81624e7785..5b973d4fb7 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Engine/Viewer2D.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Engine/Viewer2D.cs @@ -21,19 +21,27 @@ /// +using ActivityEditor.Activity; +using LibAE; +using LibAE.Formats; +using Microsoft.Xna.Framework; +using Orts.Formats.Msts; +using Orts.Formats.OR; +using Orts.Parsers.Msts; +using ORTS; +using ORTS.Common; using System; using System.Collections.Generic; +using System.ComponentModel; +using System.Data; using System.Drawing; using System.Drawing.Drawing2D; using System.IO; +using System.Linq; using System.Reflection; +using System.Text; using System.Windows.Forms; -using ActivityEditor.Activity; -using LibAE; -using LibAE.Formats; -using Orts.Formats.Msts; -using Orts.Formats.OR; -using ORTS.Common; +using System.Xml.Serialization; using Color = System.Drawing.Color; namespace ActivityEditor.Engine @@ -96,11 +104,11 @@ public partial class Viewer2D : Form public double snapSize { get; set; } // Keep the distance between the map origin and the visible section - private PointF RouteScreenOrig = new PointF(0, 0); + private PointF RouteScreenOrig = new PointF(0,0); private SizeF Distant2Origin = new SizeF(0, 0); // Son équivalent en int pour le forms private System.Drawing.SizeF StartDrawing = new System.Drawing.SizeF(0, 0); - private SizeF correctY = new SizeF(0, 0); + private SizeF correctY = new SizeF (0,0); private Size routePicture = new Size(0, 0); @@ -121,7 +129,7 @@ public partial class Viewer2D : Form // For Debugging - #region InitViewer +#region InitViewer /// /// Initialise a new instance of the Viewer for ROUTE Configuration, @@ -206,8 +214,8 @@ public Viewer2D(ActEditor parent, ActivityInfo activityInfo) InitData(); actParent.SelectTools(ViewerMode); } - #endregion - #region initData +#endregion +#region initData private void InitData() { @@ -220,7 +228,7 @@ private void InitData() Program.actEditor.DisplayStatusMessage("Init data for display..."); //aeConfig.aeRouteConfig.InitORData(Simulator); tilesList = areaRoute.tilesList; - + sizeX = (Math.Abs(areaRoute.tileMaxX - areaRoute.tileMinX) + 1) * 2048f; sizeZ = (Math.Abs(areaRoute.tileMaxZ - areaRoute.tileMinZ) + 1) * 2048f; @@ -274,9 +282,9 @@ public float getUsedScale() { return usedScale; } - #endregion + #endregion - #region Draw + #region Draw public bool firstShow = true; public bool followTrain = false; @@ -299,9 +307,9 @@ public void needRedim() } // TODO: Check this when the forms is minimized if (routeDrawing.Width <= 0 || routeDrawing.Height <= 0) - routeDrawing.Image = new Bitmap(1, 1); + routeDrawing.Image = new Bitmap(1, 1); else - routeDrawing.Image = new Bitmap(routeDrawing.Width, routeDrawing.Height); + routeDrawing.Image = new Bitmap(routeDrawing.Width, routeDrawing.Height); routePicture = routeDrawing.Size; firstShow = true; } @@ -327,7 +335,7 @@ public void GenerateView() subY = 0; // areaRoute.getMinY() + ViewWindow.Y; g.Clear(Color.White); ComputeStartDrawing(); - + usedScale = (currentRules / routeDrawing.Width); usedScale = (float)Math.Round((double)usedScale, 2, MidpointRounding.AwayFromZero); if (usedScale == 0) @@ -335,7 +343,7 @@ public void GenerateView() if (Program.aePreference.ShowRuler) showRules(g, usedScale); snapSize = (double)(Program.aePreference.getSnapCircle() * usedScale); - + PointF[] points = new PointF[3]; Pen p = darkGrayPen; Pen t = bluePen; @@ -348,7 +356,7 @@ public void GenerateView() PointF scaledA = new PointF(0, 0); PointF scaledB = new PointF(0, 0); - SizeF decal = (correctY - StartDrawing); + SizeF decal = (correctY - StartDrawing); PointF scaledC = new PointF(0, 0); PointF centerCurve = new PointF(0, 0); #region showItem @@ -358,8 +366,8 @@ public void GenerateView() { // X,Y tile are on center of tile foreach (var tile in tilesList) { - scaledA.X = decal.Width + (((tile.TileX * 2048f) - subX - 1024f) / usedScale); - scaledA.Y = decal.Height - (((tile.TileZ * 2048f) - subY + 1024f) / usedScale); + scaledA.X = decal.Width + (((tile.TileX * 2048f) - subX -1024f) / usedScale); + scaledA.Y = decal.Height - (((tile.TileZ * 2048f) - subY + 1024f) / usedScale); int width = (int)(2048 / usedScale); int height = (int)(2048 / usedScale); g.DrawRectangle(pen, (int)scaledA.X, (int)scaledA.Y, width, height); @@ -384,7 +392,7 @@ public void GenerateView() } } - foreach (var junction in aeItems.getSwitches()) + foreach (var junction in aeItems.getSwitches()) { junction.SynchroLocation(); scaledA.X = decal.Width + (((float)junction.Location.X - subX) / usedScale); @@ -514,8 +522,8 @@ public void GenerateView() station.Location2D.X = scaledA.X; station.Location2D.Y = scaledA.Y; System.Drawing.Rectangle rect = new System.Drawing.Rectangle((int)scaledA.X, - (int)scaledA.Y, - (int)(10 / usedScale), (int)(10 / usedScale)); + (int)scaledA.Y, + (int)(10/usedScale), (int)(10/usedScale)); if (item.stationWidget.icoAngle != 0f) { myMatrix.RotateAt(item.stationWidget.icoAngle, scaledA, MatrixOrder.Append); @@ -556,9 +564,9 @@ public void GenerateView() { System.Drawing.Drawing2D.Matrix matrixSA = new System.Drawing.Drawing2D.Matrix(); - rect = new System.Drawing.Rectangle((int)X, - (int)(Y - (2 / usedScale)), - (int)(2 / usedScale), (int)(2 / usedScale)); + rect = new System.Drawing.Rectangle((int)X, + (int)(Y - (2 / usedScale)), + (int)(2/usedScale), (int)(2/usedScale)); if (SAWidget.getStationConnector().getDirConnector() == AllowedDir.IN) { matrixSA.RotateAt((float)SAWidget.getStationConnector().angle, new System.Drawing.Point(X, Y), MatrixOrder.Append); @@ -593,10 +601,10 @@ public void GenerateView() { g.DrawEllipse(Pens.Red, X - 4, Y - 4, 8, 8); } - if (SAWidget.getStationConnector().getLabel().Length > 0 && + if (SAWidget.getStationConnector().getLabel().Length > 0 && Program.aePreference.ShowPlSiLabel && Program.aePreference.PlSiZoom >= usedScale && SAWidget.isItSeen()) - g.DrawString(SAWidget.getStationConnector().getLabel(), stationFont, sidingBrush, new System.Drawing.Point(X + 15, Y + 10)); + g.DrawString(SAWidget.getStationConnector().getLabel(), stationFont, sidingBrush, new System.Drawing.Point(X+15, Y+10)); } } else @@ -627,8 +635,8 @@ public void GenerateView() if (item is PathEventItem) { PointF coord = ((PathEventItem)item).Coord.ConvertToPointF(); - scaledA.X = (decal.Width + (coord.X - subX) / usedScale) - 8; - scaledA.Y = (decal.Height - ((coord.Y - subY) / usedScale)) - 8; + scaledA.X = (decal.Width + (coord.X - subX) / usedScale) -8; + scaledA.Y = (decal.Height - ((coord.Y - subY) / usedScale)) -8; if ((scaledA.X < 0) || (scaledA.X > IM_Width) || (scaledA.Y > IM_Height) || (scaledA.Y < 0)) continue; @@ -643,7 +651,7 @@ public void GenerateView() } } } - #endregion + #endregion #region showCursor @@ -685,7 +693,7 @@ public void GenerateView() g.DrawImage(tool, rect); } } - #endregion + #endregion float x, y; PointF scaledItem = new PointF(0f, 0f); @@ -695,7 +703,7 @@ public void GenerateView() if (usedScale < Program.aePreference.getPlSiZoom()) { #if !DRAW_ALL - #region drawSignal +#region drawSignal foreach (var s in aeItems.getSignals()) { s.SynchroLocation(); @@ -727,11 +735,11 @@ public void GenerateView() color = Brushes.Red; pen = redPen; } - System.Drawing.Rectangle rect = new System.Drawing.Rectangle((int)scaledItem.X - 12, (int)scaledItem.Y - 5, (int)widthDraw, (int)widthDraw); + System.Drawing.Rectangle rect = new System.Drawing.Rectangle((int)scaledItem.X-12, (int)scaledItem.Y-5, (int)widthDraw, (int)widthDraw); g.DrawEllipse(Pens.DarkBlue, (int)scaledItem.X - 1, (int)scaledItem.Y - 1, 2, 2); if (s.hasDir) { - System.Drawing.Point rotationLoc = new System.Drawing.Point((int)scaledItem.X - 5, (int)scaledItem.Y + 5); + System.Drawing.Point rotationLoc = new System.Drawing.Point((int)scaledItem.X-5, (int)scaledItem.Y+5); System.Drawing.Drawing2D.Matrix myMatrix = new System.Drawing.Drawing2D.Matrix(); scaledB.X = decal.Width + (s.Dir.X - subX) / usedScale; scaledB.Y = decal.Height - (s.Dir.Y - subY) / usedScale; @@ -782,8 +790,8 @@ public void GenerateView() g.ResetTransform(); } } - #endregion - #region crossOver +#endregion +#region crossOver foreach (AECrossOver crossOver in aeItems.getCrossOver()) { System.Drawing.Drawing2D.Matrix matrixSA = new System.Drawing.Drawing2D.Matrix(); @@ -806,7 +814,7 @@ public void GenerateView() } #endregion - #region drawSiding +#region drawSiding foreach (SideItem siding in aeItems.getSidings()) { System.Drawing.Drawing2D.Matrix matrixSA = new System.Drawing.Drawing2D.Matrix(); @@ -833,7 +841,7 @@ public void GenerateView() { matrixSA.RotateAt((float)tempo, new System.Drawing.Point((int)x, (int)y), MatrixOrder.Append); g.Transform = matrixSA; - g.DrawString(siding.Name, sidingFont, sidingBrush, x + 15, y + 10); + g.DrawString(siding.Name, sidingFont, sidingBrush, x+15, y+10); } } else @@ -844,13 +852,13 @@ public void GenerateView() { matrixSA.RotateAt((float)tempo, new System.Drawing.Point((int)x, (int)y), MatrixOrder.Append); g.Transform = matrixSA; - g.DrawString(siding.Name, sidingFont, sidingBrush, x + 15, y + 10); + g.DrawString(siding.Name, sidingFont, sidingBrush, x+15, y+10); } } g.ResetTransform(); } } - #endregion +#endregion #endif } routeDrawing.Invalidate(); @@ -889,9 +897,9 @@ void showRules(Graphics g, float usedScale) g.DrawIcon(Ruler, rect); g.ResetTransform(); -#endif + #endif } - #endregion +#endregion private void ComputeStartDrawing() { @@ -906,7 +914,7 @@ private void ComputeStartDrawing() #region MouseEvent - private bool zoomed = false; + private bool zoomed = false; private void routeDrawingMouseDown(object sender, MouseEventArgs e) { bool shiftKey = false; @@ -954,7 +962,7 @@ private void LeftMouseDown(object sender, MouseEventArgs e, bool shiftKey) aeConfig.AddORItem(info); stationItem = (StationItem)itemToUpdate; itemToUpdate = info; - + } else { @@ -1041,7 +1049,7 @@ private void routeDrawingMouseMove(object sender, MouseEventArgs e) { PointF point = convertScreen2ViewCoord(e.X, e.Y); MSTSCoord coord = Simulator.mstsDataConfig.TileBase.getMstsCoord(point); - aeConfig.UpdateItem(itemToUpdate, coord, controlKey, false); + aeConfig.UpdateItem (itemToUpdate, coord, controlKey, false); //((StationAreaWidget)itemToUpdate).UpdatePointArea(aeConfig.getSegments(), ); } @@ -1049,21 +1057,21 @@ private void routeDrawingMouseMove(object sender, MouseEventArgs e) { CurrentMousePosition.X = e.X; CurrentMousePosition.Y = e.Y; - if (ToolClicked == ToolClicks.MOVE - && itemToUpdate != null + if (ToolClicked == ToolClicks.MOVE + && itemToUpdate != null && itemToUpdate.IsMovable()) { if (e.X < 10 || e.Y < 10 || e.X > routePicture.Width - 10 || e.Y > routePicture.Height - 10) { dragWindow(e, -1); } - PointF point = convertScreen2ViewCoord(e.X, e.Y); + PointF point = convertScreen2ViewCoord (e.X, e.Y); MSTSCoord coord = Simulator.mstsDataConfig.TileBase.getMstsCoord(point); aeConfig.UpdateItem(itemToUpdate, coord, controlKey, false); //itemToUpdate.configCoord(coord, aeConfig.getSegments(), controlKey); } else if (ToolClicked == ToolClicks.ROTATE - && itemToUpdate != null + && itemToUpdate != null && itemToUpdate.IsRotable()) { PointF point = e.Location; @@ -1105,7 +1113,7 @@ private void routeDrawingMouseMove(object sender, MouseEventArgs e) { currentRules *= facteur; } - + ZoomAndAlignWindow(coordZoomPoint, refZoomPoint); } @@ -1166,7 +1174,7 @@ private void routeDrawingMouseUp(object sender, MouseEventArgs e) } } else if (ToolClicked == ToolClicks.AREA && - itemToUpdate != null && + itemToUpdate != null && (itemToUpdate.GetType() == typeof(StationItem) || itemToUpdate.GetType() == typeof(StationAreaItem))) { @@ -1287,9 +1295,9 @@ public void routeDrawing_PreviewKeyDown(object sender, KeyEventArgs e) break; } } - #endregion + #endregion - #region AlignView +#region AlignView private void ZoomViewWindow() { float width = ViewWindow.Width * (currentRules / origRules); @@ -1300,7 +1308,7 @@ private void ZoomViewWindow() ComputeUsedScale(); } - private void CenterAndZoomWindow() + private void CenterAndZoomWindow () { PointF point = convertScreen2ViewCoord(ViewWindow.Width / 2f, ViewWindow.Height / 2f); MSTSCoord coord = Simulator.mstsDataConfig.TileBase.getMstsCoord(point); @@ -1313,7 +1321,7 @@ private void ZoomAndAlignWindow(MSTSCoord coord, PointF point) { ZoomViewWindow(); - RealignViewWindow(coord, System.Drawing.Point.Truncate(point)); + RealignViewWindow(coord, System.Drawing.Point.Truncate (point)); GenerateView(); } @@ -1343,9 +1351,9 @@ private void RealignViewWindow(MSTSCoord coord, System.Drawing.Point refPoint) Distant2Origin.Height = (Distant2Origin.Height) + ((current.Y - refCoord.Y) * localScale); return; } + - - #endregion +#endregion #region SaveLoad public bool Save() @@ -1435,7 +1443,7 @@ void AddStationArea() } - private void AddActStart(TrackSegment segment, System.Drawing.Point CurrentMousePosition) + private void AddActStart (TrackSegment segment, System.Drawing.Point CurrentMousePosition) { int cnt = rnd.Next(999999); double dist; @@ -1457,7 +1465,7 @@ private void AddActStart(TrackSegment segment, System.Drawing.Point CurrentMouse tmp.PerformLayout(); } - private void AddActStop(TrackSegment segment, System.Drawing.Point CurrentMousePosition) + private void AddActStop (TrackSegment segment, System.Drawing.Point CurrentMousePosition) { int cnt = rnd.Next(999999); double dist; @@ -1471,7 +1479,7 @@ private void AddActStop(TrackSegment segment, System.Drawing.Point CurrentMouseP tmp.PerformLayout(); } - private void AddActWait(TrackSegment segment, System.Drawing.Point CurrentMousePosition) + private void AddActWait (TrackSegment segment, System.Drawing.Point CurrentMousePosition) { int cnt = rnd.Next(999999); double dist; @@ -1515,26 +1523,26 @@ void PlaceToolItem() case (int)ToolClicks.START: item = findSegmentFromMouse(CurrentMousePosition); if (item != null && - item.GetType() == typeof(TrackSegment) && - ((TrackSegment)item).isSnap()) + item.GetType () == typeof (TrackSegment) && + ((TrackSegment)item).isSnap ()) { - AddActStart((TrackSegment)item, CurrentMousePosition); + AddActStart ((TrackSegment)item, CurrentMousePosition); } break; case (int)ToolClicks.STOP: item = findSegmentFromMouse(CurrentMousePosition); if (item != null && - item.GetType() == typeof(TrackSegment) && - ((TrackSegment)item).isSnap()) + item.GetType () == typeof (TrackSegment) && + ((TrackSegment)item).isSnap ()) { - AddActStop((TrackSegment)item, CurrentMousePosition); + AddActStop ((TrackSegment)item, CurrentMousePosition); } break; case (int)ToolClicks.WAIT: item = findSegmentFromMouse(CurrentMousePosition); if (item != null && - item.GetType() == typeof(TrackSegment) && + item.GetType () == typeof (TrackSegment) && ((TrackSegment)item).isSnap()) { AddActWait((TrackSegment)item, CurrentMousePosition); @@ -1783,7 +1791,7 @@ private GlobalItem findSegmentFromMouse(System.Drawing.Point CurrentMousePositio if (aeItems != null) { PointF pt = convertScreen2ViewCoord((float)CurrentMousePosition.X, (float)CurrentMousePosition.Y); - item = aeItems.findSegmentFromMouse(pt, (double)(Program.aePreference.getSnapCircle() / 2)); + item = aeItems.findSegmentFromMouse(pt, (double)(Program.aePreference.getSnapCircle()/2)); // sideItem = aeItems.findSegmentFromMouse(pt, snapSize); } return item; @@ -1809,7 +1817,7 @@ public GlobalItem findItemFromMouse(PointF point) PointF pt = convertScreen2ViewCoord((float)point.X, (float)point.Y); //PointF tf2 = new PointF(0f, 0f); //GlobalItem componentItem = Simulator.orRouteConfig.findMetadataItem(pt, snapSize, aeItems); - GlobalItem item = Simulator.orRouteConfig.FindMetadataItem(pt, (double)(Program.aePreference.getSnapCircle() / 2), aeItems); + GlobalItem item = Simulator.orRouteConfig.FindMetadataItem(pt, (double)(Program.aePreference.getSnapCircle()/2), aeItems); return item; } diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Internat/IntalMngr.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Internat/IntalMngr.cs index e955211828..f78710b549 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Internat/IntalMngr.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Internat/IntalMngr.cs @@ -16,9 +16,15 @@ // along with Open Rails. If not, see . // +using System; +using System.Collections.Generic; +using System.Resources; +using System.Threading; using System.Globalization; using System.Reflection; -using System.Resources; +using System.Linq; +using System.Text; +using ORTS; using ORTS.Settings; namespace ActivityEditor.Internat diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Preference/AEPreference.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Preference/AEPreference.cs index 975f0a9a4d..42fb466a00 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Preference/AEPreference.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Preference/AEPreference.cs @@ -21,12 +21,15 @@ /// using System; -using System.Collections.Generic; using System.IO; +using System.Collections.Generic; using System.Linq; +using System.Text; using System.Xml.Serialization; -using Orts.Formats.OR; +using ORTS; using ORTS.Settings; +using LibAE.Formats; +using Orts.Formats.OR; namespace ActivityEditor.Preference { @@ -69,7 +72,7 @@ public bool classFilled public bool ShowTrackInfo { get; set; } public bool ActivateHorn { get; set; } [XmlIgnore] - public ActionContainer ActionContainer + public ActionContainer ActionContainer { get { @@ -79,11 +82,11 @@ public ActionContainer ActionContainer } return null; } - protected set { } + protected set { } } // Info for AuxAction option window. [XmlIgnore] - public List AvailableActions + public List AvailableActions { get { @@ -106,15 +109,15 @@ public List UsedActions } public bool AllSignalProperty - { - get - { - return ShowAllSignal; - } - set - { - ShowAllSignal = value; - } + { + get + { + return ShowAllSignal; + } + set + { + ShowAllSignal = value; + } } public AEPreference() diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Preference/Options.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Preference/Options.cs index 820d0563e8..123fc85895 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Preference/Options.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Preference/Options.cs @@ -1,8 +1,13 @@ using System; +using System.IO; using System.Collections.Generic; +using System.ComponentModel; +using System.Data; using System.Drawing; -using System.IO; +using System.Linq; +using System.Text; using System.Windows.Forms; +using LibAE.Formats; using ActivityEditor.ActionProperties; using Orts.Formats.OR; @@ -22,7 +27,7 @@ public Options() this.MSTSPath.Text = Program.aePreference.MSTSPath; this.AEPath.Text = Program.aePreference.AEPath; ListRoutePaths.DataSource = Program.aePreference.RoutePaths; - routePaths = new List(); + routePaths = new List (); this.showTiles.Checked = Program.aePreference.ShowTiles; this.snapTrack.Checked = Program.aePreference.ShowSnapLine; this.SnapInfo.Checked = Program.aePreference.ShowSnapInfo; @@ -32,7 +37,7 @@ public Options() this.ListAvailable.DataSource = Program.aePreference.AvailableActions; this.ListUsed.DataSource = Program.aePreference.UsedActions; } - + private void DrawOnTab(object sender, DrawItemEventArgs e) { Font font; @@ -46,9 +51,9 @@ private void DrawOnTab(object sender, DrawItemEventArgs e) font = new Font(e.Font, e.Font.Style); back_brush = new SolidBrush(Color.DimGray); fore_brush = new SolidBrush(Color.White); - bounds = new Rectangle(bounds.X + (this.tabControl1.Padding.X / 2), - bounds.Y + this.tabControl1.Padding.Y, - bounds.Width - this.tabControl1.Padding.X, + bounds = new Rectangle(bounds.X + (this.tabControl1.Padding.X / 2), + bounds.Y + this.tabControl1.Padding.Y, + bounds.Width - this.tabControl1.Padding.X, bounds.Height - (this.tabControl1.Padding.Y * 2)); } else @@ -127,7 +132,7 @@ private void RemoveRoutePaths_Click(object sender, EventArgs e) } } - private void configureRoutePath() + private void configureRoutePath () { if (Program.aePreference.RoutePaths.Count <= 0) { @@ -150,7 +155,7 @@ private void CheckedChanged(object sender, EventArgs e) { this.snapCircle.Enabled = ShowSnap.Checked; this.snapCircleLabel.Enabled = ShowSnap.Checked; - this.snapCircle.Value = Program.aePreference.getSnapCircle() > 0 ? Program.aePreference.getSnapCircle() : 2; + this.snapCircle.Value = Program.aePreference.getSnapCircle()>0?Program.aePreference.getSnapCircle():2; Program.aePreference.ShowSnapCircle = ShowSnap.Checked; } @@ -196,7 +201,7 @@ private void showRuler_CheckedChanged(object sender, EventArgs e) private void optionOK_click(object sender, EventArgs e) { Close(); - Program.aePreference.ShowAllSignal = this.checkBox1.Checked; + Program.aePreference.ShowAllSignal = this.checkBox1.Checked ; Program.aePreference.ShowSnapCircle = this.ShowSnap.Checked; Program.aePreference.ShowPlSiLabel = this.ShowLabelPlat.Checked; Program.aePreference.MSTSPath = this.MSTSPath.Text; diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Program.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Program.cs index 14dde81b82..da67b57eed 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Program.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Program.cs @@ -24,11 +24,14 @@ using System; using System.Collections.Generic; using System.IO; +using ActivityEditor.Engine; +using ActivityEditor.Preference; using System.Linq; using System.Windows.Forms; -using ActivityEditor.Internat; -using ActivityEditor.Preference; +using ORTS; using ORTS.Settings; +using LibAE.Formats; +using ActivityEditor.Internat; namespace ActivityEditor { diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Route Metadata/BufferInterface.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Route Metadata/BufferInterface.cs index 669a53f13e..8716542d09 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Route Metadata/BufferInterface.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Route Metadata/BufferInterface.cs @@ -1,6 +1,13 @@ using System; using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; using System.Windows.Forms; +using LibAE; +using LibAE.Formats; using Orts.Formats.OR; namespace ActivityEditor.Engine diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Route Metadata/ConnectorInterface.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Route Metadata/ConnectorInterface.cs index 7440448db2..410fa888e2 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Route Metadata/ConnectorInterface.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Route Metadata/ConnectorInterface.cs @@ -20,7 +20,14 @@ /// using System; using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; using System.Windows.Forms; +using LibAE; +using LibAE.Formats; using Orts.Formats.OR; namespace ActivityEditor.Engine diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Route Metadata/StationDisplay.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Route Metadata/StationDisplay.cs index a88e55a22e..8e6deaad48 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Route Metadata/StationDisplay.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Route Metadata/StationDisplay.cs @@ -1,6 +1,13 @@ using System; -using System.Diagnostics; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; using System.Windows.Forms; +using System.Diagnostics; +using LibAE.Formats; using Orts.Formats.OR; namespace ActivityEditor.Route_Metadata @@ -17,7 +24,7 @@ public StationDisplay(StationItem item) tablePaths.SuspendLayout(); StationName.Text = station.nameStation; ClearTable(); - + int cntPath = this.tablePaths.RowCount; foreach (var pointArea in item.stationArea) { @@ -42,7 +49,7 @@ public StationDisplay(StationItem item) { foreach (var possibility in destinPoint.Value) { - AddPathData(originPoint.Key, possibility.Value); + AddPathData(originPoint.Key, possibility.Value); } } } @@ -122,15 +129,15 @@ public void AddPathData(string label, StationPath path) double yard = Math.Round(path.Platform, 1); Label platformLength = new Label() { Text = yard.ToString(), Anchor = AnchorStyles.Left, AutoSize = true }; this.tablePaths.Controls.Add(platformLength, 2, cntRows); - yard = Math.Round(path.Siding, 1); - Label sidingLength = new Label() { Text = yard.ToString(), Anchor = AnchorStyles.Left, AutoSize = true }; + yard = Math.Round (path.Siding,1); + Label sidingLength = new Label(){ Text = yard.ToString(), Anchor = AnchorStyles.Left, AutoSize = true }; this.tablePaths.Controls.Add(sidingLength, 3, cntRows); Label nbrPlatform = new Label() { Text = path.NbrPlatform.ToString(), Anchor = AnchorStyles.Left, AutoSize = true }; this.tablePaths.Controls.Add(nbrPlatform, 4, cntRows); Label nbrSiding = new Label() { Text = path.NbrSiding.ToString(), Anchor = AnchorStyles.Left, AutoSize = true }; this.tablePaths.Controls.Add(nbrSiding, 5, cntRows); - Label passingYardLength = new Label() { Text = passingYard.ToString(), Anchor = AnchorStyles.Left, AutoSize = true }; + Label passingYardLength = new Label(){ Text = passingYard.ToString(), Anchor = AnchorStyles.Left, AutoSize = true }; this.tablePaths.Controls.Add(passingYardLength, 6, cntRows); CinBoth = new Label() { Text = "--", Anchor = AnchorStyles.Left, AutoSize = true }; cntRows++; diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Route Metadata/TrackSegmentInterface.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Route Metadata/TrackSegmentInterface.cs index c5e275f46a..b69f29dfe4 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Route Metadata/TrackSegmentInterface.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Route Metadata/TrackSegmentInterface.cs @@ -1,6 +1,12 @@ using System; using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; using System.Windows.Forms; +using LibAE.Formats; using Orts.Formats.OR; namespace ActivityEditor.Route_Metadata diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Settings.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Settings.cs index 7bdca8aa3e..f55e848f66 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Settings.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Settings.cs @@ -22,18 +22,16 @@ namespace ActivityEditor.Properties { - - + + // This class allows you to handle specific events on the settings class: // The SettingChanging event is raised before a setting's value is changed. // The PropertyChanged event is raised after a setting's value is changed. // The SettingsLoaded event is raised after the setting values are loaded. // The SettingsSaving event is raised before the setting values are saved. - internal sealed partial class Settings - { - - public Settings() - { + internal sealed partial class Settings { + + public Settings() { // // To add event handlers for saving and changing settings, uncomment the lines below: // // this.SettingChanging += this.SettingChangingEventHandler; @@ -41,14 +39,12 @@ public Settings() // this.SettingsSaving += this.SettingsSavingEventHandler; // } - - private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) - { + + private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) { // Add code to handle the SettingChangingEvent event here. } - - private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) - { + + private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) { // Add code to handle the SettingsSaving event here. } } diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Wizard/ActivityDescr.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Wizard/ActivityDescr.cs index c3bfef6718..d7875647dc 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Wizard/ActivityDescr.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Wizard/ActivityDescr.cs @@ -4,10 +4,10 @@ namespace AEWizard { - /// - /// Represents a single page within a wizard dialog. - /// - public class ActivityDescr : SinglePage + /// + /// Represents a single page within a wizard dialog. + /// + public class ActivityDescr : SinglePage { private FlowLayoutPanel panel1; private TextBox textBox1; @@ -20,7 +20,7 @@ public class ActivityDescr : SinglePage public String RoutePath; public ActivityInfo activityInfo { get; set; } - // ================================================================== + // ================================================================== // Public Constructors // ================================================================== @@ -29,11 +29,11 @@ public class ActivityDescr : SinglePage /// class. /// public ActivityDescr() - { + { // Required for Windows Form Designer support InitializeComponent(); - - } + + } public void completePage() { @@ -43,13 +43,13 @@ public void completePage() // ================================================================== // Protected Properties // ================================================================== - - - + + + // ================================================================== // Private Methods // ================================================================== - + #region Windows Form Designer generated code /// /// Required method for Designer support - do not modify @@ -158,13 +158,13 @@ private void InitializeComponent() this.ResumeLayout(false); } - #endregion + #endregion // ================================================================== // Protected Internal Methods // ================================================================== - + /// /// Called when the page is no longer the active page. /// @@ -198,7 +198,7 @@ protected internal override bool OnSetActive() // Activate the page return true; } - + /// /// Called when the user clicks the Back button in a wizard. /// @@ -220,7 +220,7 @@ protected internal override string OnWizardBack() return WizardForm.NextPage; } - + /// /// Called when the user clicks the Finish button in a wizard. /// @@ -240,7 +240,7 @@ protected internal override bool OnWizardFinish() return false; return true; } - + /// /// Called when the user clicks the Next button in a wizard. /// diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Wizard/SelectRoute.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Wizard/SelectRoute.cs index 7b7f8966a1..e262ff56e9 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Wizard/SelectRoute.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Wizard/SelectRoute.cs @@ -1,5 +1,8 @@ using System; using System.Windows.Forms; +using System.Collections.Generic; + +using LibAE; using Orts.Formats.OR; namespace AEWizard @@ -166,7 +169,7 @@ protected internal override bool OnWizardFinish() routeInfo.route = routePathCB.Text; return true; } - + } } diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Wizard/SinglePage.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Wizard/SinglePage.cs index 9201bd8419..ca859504d5 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Wizard/SinglePage.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Wizard/SinglePage.cs @@ -1,4 +1,5 @@ -using System.Windows.Forms; +using System; +using System.Windows.Forms; //using LibAE; diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Wizard/TrainInfo.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Wizard/TrainInfo.cs index ee6fd7448d..586a1ed1df 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Wizard/TrainInfo.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Wizard/TrainInfo.cs @@ -1,5 +1,7 @@ -using System.Linq; +using System; using System.Windows.Forms; +using System.Linq; +using LibAE; using LibAE.Formats; namespace AEWizard @@ -24,16 +26,16 @@ public void completePage() { this.trainConsistCB.DataSource = activityInfo.trainConsists.Select(o => o.consistName).ToList(); } - // ================================================================== + // ================================================================== // Protected Properties // ================================================================== - + /// /// Gets the WizardForm /// to which this WizardPage /// belongs. /// - + // ================================================================== // Private Methods // ================================================================== diff --git a/Source/Contrib/ActivityEditor/ActivityEditor/Wizard/WizardForm.cs b/Source/Contrib/ActivityEditor/ActivityEditor/Wizard/WizardForm.cs index aefb212b9f..b5b214a494 100644 --- a/Source/Contrib/ActivityEditor/ActivityEditor/Wizard/WizardForm.cs +++ b/Source/Contrib/ActivityEditor/ActivityEditor/Wizard/WizardForm.cs @@ -7,8 +7,12 @@ using System; using System.Collections; +using System.Collections.Generic; + +using System.IO; using System.Drawing; using System.Windows.Forms; +using LibAE; using LibAE.Formats; using Orts.Formats.OR; @@ -18,35 +22,35 @@ namespace AEWizard /// Used to identify the various buttons that may appear within a wizard /// dialog. /// - [Flags] + [Flags] public enum WizardButton { /// /// Identifies the Back button. /// - Back = 0x00000001, - + Back = 0x00000001, + /// /// Identifies the Next button. /// - Next = 0x00000002, - + Next = 0x00000002, + /// /// Identifies the Finish button. /// - Finish = 0x00000004, - + Finish = 0x00000004, + /// /// Identifies the disabled Finish button. /// DisabledFinish = 0x00000008, } - + /// /// Represents a wizard dialog. /// public class WizardForm : Form - { + { ActivityInfo activityInfo; RouteInfo routeInfo; // ================================================================== @@ -66,17 +70,17 @@ public class WizardForm : Form /// pressed. /// public const string NoPageChange = null; - - + + // ================================================================== // Private Fields // ================================================================== - + /// /// Array of wizard pages. /// private ArrayList m_pages = new ArrayList(); - + /// /// Index of the selected page; -1 if no page selected. /// @@ -86,7 +90,7 @@ public class WizardForm : Form // ================================================================== // Protected Fields // ================================================================== - + /// /// The Back button. /// @@ -123,15 +127,15 @@ public class WizardForm : Form // ================================================================== // Public Constructors // ================================================================== - + /// /// Initializes a new instance of the WizardForm /// class. /// public WizardForm(ActivityInfo activity) - { - // Required for Windows Form Designer support - InitializeComponent(); + { + // Required for Windows Form Designer support + InitializeComponent(); activityInfo = activity; wiz1 = new ActivityDescr(); wiz1.activityInfo = activity; @@ -139,13 +143,13 @@ public WizardForm(ActivityInfo activity) wiz2 = new TrainInfo(); wiz2.activityInfo = activity; wiz2.completePage(); - Controls.AddRange(new Control[] + Controls.AddRange(new Control[] { wiz1, wiz2 }); // Ensure Finish and Next buttons are positioned similarly - m_finishButton.Location = m_nextButton.Location; - } + m_finishButton.Location = m_nextButton.Location; + } public WizardForm(RouteInfo info) { InitializeComponent(); @@ -163,14 +167,14 @@ public WizardForm(RouteInfo info) // ================================================================== // Private Methods // ================================================================== - + #region Windows Form Designer generated code - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { this.m_backButton = new System.Windows.Forms.Button(); this.m_nextButton = new System.Windows.Forms.Button(); this.m_cancelButton = new System.Windows.Forms.Button(); @@ -243,7 +247,7 @@ private void InitializeComponent() this.ResumeLayout(false); } - #endregion + #endregion /// /// Activates the page at the specified index in the page array. @@ -251,29 +255,29 @@ private void InitializeComponent() /// /// Index of new page to be selected. /// - private void ActivatePage(int newIndex) + private void ActivatePage( int newIndex ) { // Ensure the index is valid - if (newIndex < 0 || newIndex >= m_pages.Count) + if( newIndex < 0 || newIndex >= m_pages.Count ) throw new ArgumentOutOfRangeException(); // Deactivate the current page if applicable SinglePage currentPage = null; - if (m_selectedIndex != -1) + if( m_selectedIndex != -1 ) { currentPage = (SinglePage)m_pages[m_selectedIndex]; - if (!currentPage.OnKillActive()) + if( !currentPage.OnKillActive() ) return; } // Activate the new page - SinglePage newPage = (SinglePage)m_pages[newIndex]; - if (!newPage.OnSetActive()) + SinglePage newPage = (SinglePage)m_pages[ newIndex ]; + if( !newPage.OnSetActive() ) return; // Update state m_selectedIndex = newIndex; - if (currentPage != null) + if( currentPage != null ) currentPage.Visible = false; newPage.Visible = true; newPage.Focus(); @@ -282,32 +286,32 @@ private void ActivatePage(int newIndex) /// /// Handles the Click event for the Back button. /// - private void OnClickBack(object sender, EventArgs e) + private void OnClickBack( object sender, EventArgs e ) { // Ensure a page is currently selected - if (m_selectedIndex != -1) + if( m_selectedIndex != -1 ) { // Inform selected page that the Back button was clicked string pageName = ((SinglePage)m_pages[ - m_selectedIndex]).OnWizardBack(); - switch (pageName) + m_selectedIndex ]).OnWizardBack(); + switch( pageName ) { // Do nothing case NoPageChange: break; - + // Activate the next appropriate page case NextPage: - if (m_selectedIndex - 1 >= 0) - ActivatePage(m_selectedIndex - 1); + if( m_selectedIndex - 1 >= 0 ) + ActivatePage( m_selectedIndex - 1 ); break; // Activate the specified page if it exists default: - foreach (SinglePage page in m_pages) + foreach( SinglePage page in m_pages ) { - if (page.Name == pageName) - ActivatePage(m_pages.IndexOf(page)); + if( page.Name == pageName ) + ActivatePage( m_pages.IndexOf( page ) ); } break; } @@ -317,7 +321,7 @@ private void OnClickBack(object sender, EventArgs e) /// /// Handles the Click event for the Cancel button. /// - private void OnClickCancel(object sender, EventArgs e) + private void OnClickCancel( object sender, EventArgs e ) { // Close wizard DialogResult = DialogResult.Cancel; @@ -326,17 +330,17 @@ private void OnClickCancel(object sender, EventArgs e) /// /// Handles the Click event for the Finish button. /// - private void OnClickFinish(object sender, EventArgs e) + private void OnClickFinish( object sender, EventArgs e ) { // Ensure a page is currently selected - if (m_selectedIndex != -1) + if( m_selectedIndex != -1 ) { // Inform selected page that the Finish button was clicked - SinglePage page = (SinglePage)m_pages[m_selectedIndex]; - if (page.OnWizardFinish()) + SinglePage page = (SinglePage)m_pages[ m_selectedIndex ]; + if( page.OnWizardFinish() ) { // Deactivate page and close wizard - if (page.OnKillActive()) + if( page.OnKillActive() ) DialogResult = DialogResult.OK; } } @@ -345,15 +349,15 @@ private void OnClickFinish(object sender, EventArgs e) /// /// Handles the Click event for the Next button. /// - private void OnClickNext(object sender, EventArgs e) + private void OnClickNext( object sender, EventArgs e ) { // Ensure a page is currently selected - if (m_selectedIndex != -1) + if( m_selectedIndex != -1 ) { // Inform selected page that the Next button was clicked string pageName = ((SinglePage)m_pages[ - m_selectedIndex]).OnWizardNext(); - switch (pageName) + m_selectedIndex ]).OnWizardNext(); + switch( pageName ) { // Do nothing case NoPageChange: @@ -361,16 +365,16 @@ private void OnClickNext(object sender, EventArgs e) // Activate the next appropriate page case NextPage: - if (m_selectedIndex + 1 < m_pages.Count) - ActivatePage(m_selectedIndex + 1); + if( m_selectedIndex + 1 < m_pages.Count ) + ActivatePage( m_selectedIndex + 1 ); break; // Activate the specified page if it exists default: - foreach (SinglePage page in m_pages) + foreach( SinglePage page in m_pages ) { - if (page.Name == pageName) - ActivatePage(m_pages.IndexOf(page)); + if( page.Name == pageName ) + ActivatePage( m_pages.IndexOf( page ) ); } break; } @@ -381,25 +385,25 @@ private void OnClickNext(object sender, EventArgs e) // ================================================================== // Protected Methods // ================================================================== - + /// /// System.Windows.Forms.Control.OnControlAdded /// - protected override void OnControlAdded(ControlEventArgs e) + protected override void OnControlAdded( ControlEventArgs e ) { // Invoke base class implementation - base.OnControlAdded(e); - + base.OnControlAdded( e ); + // Set default properties for all WizardPage instances added to // this form SinglePage page = e.Control as SinglePage; - if (page != null) + if( page != null ) { page.Visible = false; - page.Location = new Point(0, 0); - page.Size = new Size(Width, m_separator.Location.Y); - m_pages.Add(page); - if (m_selectedIndex == -1) + page.Location = new Point( 0, 0 ); + page.Size = new Size( Width, m_separator.Location.Y ); + m_pages.Add( page ); + if( m_selectedIndex == -1 ) m_selectedIndex = 0; } } @@ -407,33 +411,33 @@ protected override void OnControlAdded(ControlEventArgs e) /// /// System.Windows.Forms.Form.OnLoad /// - protected override void OnLoad(EventArgs e) + protected override void OnLoad( EventArgs e ) { // Invoke base class implementation - base.OnLoad(e); - + base.OnLoad( e ); + // Activate the first page in the wizard - if (m_pages.Count > 0) - ActivatePage(0); + if( m_pages.Count > 0 ) + ActivatePage( 0 ); } // ================================================================== // Public Methods // ================================================================== - + /// /// Sets the text in the Finish button. /// /// /// Text to be displayed on the Finish button. /// - public void SetFinishText(string text) + public void SetFinishText( string text ) { // Set the Finish button text m_finishButton.Text = text; } - + /// /// Enables or disables the Back, Next, or Finish buttons in the /// wizard. @@ -448,7 +452,7 @@ public void SetFinishText(string text) /// WizardPage.OnSetActive. You can display a Finish or a /// Next button at one time, but not both. /// - public void SetWizardButtons(WizardButton flags) + public void SetWizardButtons( WizardButton flags ) { // Enable/disable and show/hide buttons appropriately m_backButton.Enabled = @@ -463,7 +467,7 @@ public void SetWizardButtons(WizardButton flags) m_finishButton.Visible = (flags & WizardButton.Finish) == WizardButton.Finish || (flags & WizardButton.DisabledFinish) == WizardButton.DisabledFinish; - + // Set the AcceptButton depending on whether or not the Finish // button is visible or not AcceptButton = m_finishButton.Visible ? m_finishButton : diff --git a/Source/Contrib/ActivityEditor/LibAE/AEUtility.cs b/Source/Contrib/ActivityEditor/LibAE/AEUtility.cs index 2c7916c9a3..ee22c52b20 100644 --- a/Source/Contrib/ActivityEditor/LibAE/AEUtility.cs +++ b/Source/Contrib/ActivityEditor/LibAE/AEUtility.cs @@ -20,8 +20,12 @@ /// Updates : /// +using System; +using System.IO; using System.Collections.Generic; using System.Linq; +using System.Text; +using MSTS; namespace LibAE { @@ -83,14 +87,14 @@ public TilesInfo(AreaRoute areaRoute, float x, float z) areaRoute.maxX = Utility.CalcBounds(areaRoute.maxX, ((x + 1f) * 2048f) + 1024f, true); areaRoute.maxY = Utility.CalcBounds(areaRoute.maxY, ((z + 1f) * 2048f) + 1024f, true); - areaRoute.setMinX(Utility.CalcBounds(areaRoute.getMinX(), (x * 2048f) - 1024f, false)); - areaRoute.setMinY(Utility.CalcBounds(areaRoute.getMinY(), (z * 2048f) - 1024f, false)); + areaRoute.setMinX(Utility.CalcBounds(areaRoute.getMinX(), (x * 2048f) -1024f, false)); + areaRoute.setMinY(Utility.CalcBounds(areaRoute.getMinY(), (z * 2048f) -1024f, false)); } } public static class Utility { - + /// /// Given a value representing a limit, evaluate if the given value exceeds the current limit. /// If so, expand the limit. diff --git a/Source/Contrib/ActivityEditor/LibAE/Formats/ActivityInfo.cs b/Source/Contrib/ActivityEditor/LibAE/Formats/ActivityInfo.cs index a7e9443f5a..7607bf06fd 100644 --- a/Source/Contrib/ActivityEditor/LibAE/Formats/ActivityInfo.cs +++ b/Source/Contrib/ActivityEditor/LibAE/Formats/ActivityInfo.cs @@ -21,11 +21,16 @@ /// using System; -using System.Collections.Generic; using System.IO; +using System.Collections.Generic; using System.Linq; +using System.Text; using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using MSTS; using Orts.Formats.Msts; +using Orts.Parsers.Msts; +using ORTS.Common; using Orts.Formats.OR; namespace LibAE.Formats @@ -38,7 +43,7 @@ public class ConsistInfo [JsonProperty("ConsistPath")] string consistPath; - public ConsistInfo(string name, string path) + public ConsistInfo (string name, string path) { consistName = name; consistPath = path; @@ -72,7 +77,7 @@ public ActivityInfo() } - public void config(List routes) + public void config (List routes) { foreach (string routeParent in routes) { @@ -96,7 +101,7 @@ public void config(List routes) string fullPathConsist = Path.GetFullPath(consist); ConsistFile consistName = new ConsistFile(fullPathConsist); ConsistInfo conInfo = new ConsistInfo(consistName.ToString(), fullPathConsist); - trainConsists.Add(conInfo); + trainConsists.Add(conInfo); } } } diff --git a/Source/Contrib/ActivityEditor/LibAE/Formats/MSTSDataConfig.cs b/Source/Contrib/ActivityEditor/LibAE/Formats/MSTSDataConfig.cs index 025314e175..d1f1e50f89 100644 --- a/Source/Contrib/ActivityEditor/LibAE/Formats/MSTSDataConfig.cs +++ b/Source/Contrib/ActivityEditor/LibAE/Formats/MSTSDataConfig.cs @@ -20,9 +20,14 @@ /// Updates : /// +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; using System.IO; -using Orts.Formats.OR; +using Orts.Parsers.Msts; using ORTS.Common; +using Orts.Formats.OR; namespace LibAE { @@ -30,7 +35,7 @@ public class MSTSDataConfig : MSTSData { public MSTSBase TileBase { get; protected set; } - public MSTSDataConfig(string mstsPath, string Route, TypeEditor interfaceType) : base(mstsPath, Route) + public MSTSDataConfig(string mstsPath, string Route, TypeEditor interfaceType) : base (mstsPath, Route) { string routePath = Path.Combine(Route, TRK.Tr_RouteFile.FileName); TileBase = new MSTSBase(TDB); diff --git a/Source/Contrib/ActivityEditor/LibAE/Formats/PathEvent.cs b/Source/Contrib/ActivityEditor/LibAE/Formats/PathEvent.cs index cbbd97816e..29027c5f30 100644 --- a/Source/Contrib/ActivityEditor/LibAE/Formats/PathEvent.cs +++ b/Source/Contrib/ActivityEditor/LibAE/Formats/PathEvent.cs @@ -22,10 +22,21 @@ /// using System; -using System.Drawing; +using System.Windows; using System.IO; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Drawing; +using System.Drawing.Drawing2D; using System.Reflection; +using Microsoft.Xna.Framework; +using MSTS; +using ORTS; +using LibAE; + using Newtonsoft.Json; +using Newtonsoft.Json.Linq; using Orts.Formats.OR; using ORTS.Common; @@ -41,7 +52,7 @@ enum TypeEvent ACTIVITY_STOP = 2, ACTIVITY_WAIT = 3 }; - #endregion +#endregion #region PathEventItem @@ -92,7 +103,7 @@ public ActStartItem(TypeEditor interfaceType) typeItem = (int)TypeEvent.ACTIVITY_START; st = a.GetManifestResourceStream("LibAE.Icon.Start.ico"); StartIcon = new System.Drawing.Icon(st); - + } public void setNameStart(int info) @@ -127,7 +138,7 @@ public ActStopItem(TypeEditor interfaceType) Assembly a = Assembly.GetExecutingAssembly(); typeItem = (int)TypeEvent.ACTIVITY_STOP; - st = a.GetManifestResourceStream("LibAE.Icon.Stop.ico"); + st = a.GetManifestResourceStream("LibAE.Icon.Stop.ico"); StopIcon = new System.Drawing.Icon(st); } diff --git a/Source/Contrib/ActivityEditor/LibAE/Formats/TrackDef.cs b/Source/Contrib/ActivityEditor/LibAE/Formats/TrackDef.cs index 6575e8086c..535d35f3ad 100644 --- a/Source/Contrib/ActivityEditor/LibAE/Formats/TrackDef.cs +++ b/Source/Contrib/ActivityEditor/LibAE/Formats/TrackDef.cs @@ -1,4 +1,15 @@ -namespace LibAE.Formats +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using LibAE; +using Microsoft.Xna.Framework; +using MSTS; +using Orts.Formats.Msts; +using Orts.Parsers.Msts; +using ORTS.Common; + +namespace LibAE.Formats { #if false //================================================================================================// diff --git a/Source/Contrib/ActivityEditor/LibAE/RouteInfo.cs b/Source/Contrib/ActivityEditor/LibAE/RouteInfo.cs index 7a8b9e9eb2..8302f3c353 100644 --- a/Source/Contrib/ActivityEditor/LibAE/RouteInfo.cs +++ b/Source/Contrib/ActivityEditor/LibAE/RouteInfo.cs @@ -15,9 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; using System.Collections.Generic; using System.IO; using System.Linq; +using System.Text; namespace Orts.Formats.OR { diff --git a/Source/Contrib/ContentManager/Content.cs b/Source/Contrib/ContentManager/Content.cs index 317d95bc11..8ae78b7047 100644 --- a/Source/Contrib/ContentManager/Content.cs +++ b/Source/Contrib/ContentManager/Content.cs @@ -20,6 +20,8 @@ using System; using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; namespace ORTS.ContentManager { @@ -112,16 +114,16 @@ public virtual Content Get(string name, ContentType type) { Debug.WriteLine(String.Format("{0} naively scanning for {2} '{1}'", this, name, type)); #endif - foreach (var child in children) - { - if (child.Name.Equals(name, StringComparison.OrdinalIgnoreCase)) + foreach (var child in children) { + if (child.Name.Equals(name, StringComparison.OrdinalIgnoreCase)) + { #if DEBUG_CONTENT_GET_SCAN Debug.WriteLine(String.Format("{0} naive scan found match for {2} '{1}'", this, name, type)); #endif - return child; + return child; + } } - } #if DEBUG_CONTENT_GET_SCAN } #endif diff --git a/Source/Contrib/ContentManager/ContentInfo.cs b/Source/Contrib/ContentManager/ContentInfo.cs index f888183732..986998eef3 100644 --- a/Source/Contrib/ContentManager/ContentInfo.cs +++ b/Source/Contrib/ContentManager/ContentInfo.cs @@ -18,14 +18,14 @@ // Uncomment this define to show a textual representation of the serialised Content items for debugging. //#define DEBUG_CONTENT_SERIALIZATION +using Orts.Formats.Msts; +using ORTS.ContentManager.Models; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.Serialization.Formatters.Binary; using System.Text; -using Orts.Formats.Msts; -using ORTS.ContentManager.Models; using Path = ORTS.ContentManager.Models.Path; namespace ORTS.ContentManager @@ -39,8 +39,7 @@ public static string GetText(Content content) details.AppendFormat("Name:\t{1}{0}", Environment.NewLine, content.Name); details.AppendFormat("Path:\t{1}{0}", Environment.NewLine, content.PathName); - try - { + try { var stream = new MemoryStream(); var serializer = new BinaryFormatter(); serializer.Serialize(stream, content); diff --git a/Source/Contrib/ContentManager/ContentManager.cs b/Source/Contrib/ContentManager/ContentManager.cs index 4ee37f1aa6..dcbcaf1e54 100644 --- a/Source/Contrib/ContentManager/ContentManager.cs +++ b/Source/Contrib/ContentManager/ContentManager.cs @@ -15,9 +15,9 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using ORTS.Settings; using System; using System.Collections.Generic; -using ORTS.Settings; namespace ORTS.ContentManager { diff --git a/Source/Contrib/ContentManager/ContentManagerGUI.cs b/Source/Contrib/ContentManager/ContentManagerGUI.cs index 8ebed3772c..b96fe608bc 100644 --- a/Source/Contrib/ContentManager/ContentManagerGUI.cs +++ b/Source/Contrib/ContentManager/ContentManagerGUI.cs @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using ORTS.Settings; using System; using System.Collections.Generic; using System.ComponentModel; @@ -24,7 +25,6 @@ using System.Runtime.InteropServices; using System.Text.RegularExpressions; using System.Windows.Forms; -using ORTS.Settings; namespace ORTS.ContentManager { diff --git a/Source/Contrib/ContentManager/ContentOR.cs b/Source/Contrib/ContentManager/ContentOR.cs index eec73f86d3..06127a6cfc 100644 --- a/Source/Contrib/ContentManager/ContentOR.cs +++ b/Source/Contrib/ContentManager/ContentOR.cs @@ -16,7 +16,10 @@ // along with Open Rails. If not, see . using System; +using System.Collections.Generic; using System.IO; +using System.Linq; +using System.Text; namespace ORTS.ContentManager { diff --git a/Source/Contrib/ContentManager/Models/Activity.cs b/Source/Contrib/ContentManager/Models/Activity.cs index 50f318cbd4..464ddb34f1 100644 --- a/Source/Contrib/ContentManager/Models/Activity.cs +++ b/Source/Contrib/ContentManager/Models/Activity.cs @@ -15,12 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using Orts.Formats.Msts; +using Orts.Parsers.OR; using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; -using Orts.Formats.Msts; -using Orts.Parsers.OR; namespace ORTS.ContentManager.Models { diff --git a/Source/Contrib/ContentManager/Models/Car.cs b/Source/Contrib/ContentManager/Models/Car.cs index a2d8e79a3e..a0395e175e 100644 --- a/Source/Contrib/ContentManager/Models/Car.cs +++ b/Source/Contrib/ContentManager/Models/Car.cs @@ -15,9 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using Orts.Formats.Msts; using System; +using System.Collections.Generic; using System.Diagnostics; -using Orts.Formats.Msts; +using System.Linq; +using System.Text; namespace ORTS.ContentManager.Models { diff --git a/Source/Contrib/ContentManager/Models/Consist.cs b/Source/Contrib/ContentManager/Models/Consist.cs index a665b8e654..a4b6c69390 100644 --- a/Source/Contrib/ContentManager/Models/Consist.cs +++ b/Source/Contrib/ContentManager/Models/Consist.cs @@ -15,11 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using Orts.Formats.Msts; using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; -using Orts.Formats.Msts; +using System.Text; namespace ORTS.ContentManager.Models { @@ -38,12 +39,11 @@ public Consist(Content content) Name = file.Name; Cars = from car in file.Train.TrainCfg.WagonList - select new Car(car); + select new Car(car); } } - public enum Direction - { + public enum Direction{ Forwards, Backwards, } diff --git a/Source/Contrib/ContentManager/Models/Path.cs b/Source/Contrib/ContentManager/Models/Path.cs index e6ed6064e0..fd503f394c 100644 --- a/Source/Contrib/ContentManager/Models/Path.cs +++ b/Source/Contrib/ContentManager/Models/Path.cs @@ -15,10 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using Orts.Formats.Msts; using System; using System.Collections.Generic; using System.Diagnostics; -using Orts.Formats.Msts; +using System.Linq; +using System.Text; namespace ORTS.ContentManager.Models { diff --git a/Source/Contrib/ContentManager/Models/Route.cs b/Source/Contrib/ContentManager/Models/Route.cs index ea9f7bf8a3..11e8782cd8 100644 --- a/Source/Contrib/ContentManager/Models/Route.cs +++ b/Source/Contrib/ContentManager/Models/Route.cs @@ -15,10 +15,13 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using Orts.Formats.Msts; using System; +using System.Collections.Generic; using System.Diagnostics; using System.IO; -using Orts.Formats.Msts; +using System.Linq; +using System.Text; namespace ORTS.ContentManager.Models { diff --git a/Source/Contrib/ContentManager/Models/Service.cs b/Source/Contrib/ContentManager/Models/Service.cs index 8b9700f19c..124aef6257 100644 --- a/Source/Contrib/ContentManager/Models/Service.cs +++ b/Source/Contrib/ContentManager/Models/Service.cs @@ -15,13 +15,13 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using Orts.Formats.Msts; +using Orts.Parsers.OR; using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Text.RegularExpressions; -using Orts.Formats.Msts; -using Orts.Parsers.OR; namespace ORTS.ContentManager.Models { @@ -103,7 +103,7 @@ public Service(Content content) } } ID = serviceColumn.ToString(); - var timeRE = new Regex(@"^(\d\d):(\d\d)(?:-(\d\d):(\d\d))?"); + var timeRE = new Regex(@"^(\d\d):(\d\d)(?:-(\d\d):(\d\d))?"); var startTimeMatch = timeRE.Match(file.Strings[startRow][serviceColumn]); if (startTimeMatch.Success) { diff --git a/Source/Contrib/ContentManager/Program.cs b/Source/Contrib/ContentManager/Program.cs index 37c99c01cf..f2b50f3060 100644 --- a/Source/Contrib/ContentManager/Program.cs +++ b/Source/Contrib/ContentManager/Program.cs @@ -16,6 +16,8 @@ // along with Open Rails. If not, see . using System; +using System.Collections.Generic; +using System.Linq; using System.Windows.Forms; namespace ORTS.ContentManager diff --git a/Source/Contrib/DataCollector/Program.cs b/Source/Contrib/DataCollector/Program.cs index d5f097c50f..a45ac4ce0c 100644 --- a/Source/Contrib/DataCollector/Program.cs +++ b/Source/Contrib/DataCollector/Program.cs @@ -15,13 +15,13 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using Orts.Formats.Msts; +using ORTS.Common; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; -using Orts.Formats.Msts; -using ORTS.Common; namespace DataCollector { diff --git a/Source/Contrib/DataConverter/ClockConverter.cs b/Source/Contrib/DataConverter/ClockConverter.cs index c6a6bc4a0d..40382aebb4 100644 --- a/Source/Contrib/DataConverter/ClockConverter.cs +++ b/Source/Contrib/DataConverter/ClockConverter.cs @@ -15,13 +15,16 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using Newtonsoft.Json; +using Orts.Formats.Msts; +using Orts.Formats.OR; +using Orts.Parsers.Msts; using System; using System.Collections.Generic; using System.IO; using System.Linq; -using Newtonsoft.Json; -using Orts.Formats.OR; -using Orts.Parsers.Msts; +using System.Text; +using System.Xml.Linq; namespace Orts.DataConverter { diff --git a/Source/Contrib/DataConverter/TerrainConverter.cs b/Source/Contrib/DataConverter/TerrainConverter.cs index 45b2d77541..e7f89e57c0 100644 --- a/Source/Contrib/DataConverter/TerrainConverter.cs +++ b/Source/Contrib/DataConverter/TerrainConverter.cs @@ -15,13 +15,13 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using Orts.Formats.Msts; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Xml.Linq; -using Orts.Formats.Msts; namespace Orts.DataConverter { diff --git a/Source/Contrib/DataValidator/Program.cs b/Source/Contrib/DataValidator/Program.cs index 2253141ef3..1c385f5440 100644 --- a/Source/Contrib/DataValidator/Program.cs +++ b/Source/Contrib/DataValidator/Program.cs @@ -15,12 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using Orts.Common; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; -using Orts.Common; using ORTS.Common; namespace DataValidator diff --git a/Source/Contrib/DataValidator/TerrainValidator.cs b/Source/Contrib/DataValidator/TerrainValidator.cs index 88b343009d..7c57061f12 100644 --- a/Source/Contrib/DataValidator/TerrainValidator.cs +++ b/Source/Contrib/DataValidator/TerrainValidator.cs @@ -15,9 +15,13 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using Orts.Formats.Msts; +using Orts.Parsers.Msts; using System; +using System.Collections.Generic; using System.Diagnostics; -using Orts.Formats.Msts; +using System.Linq; +using System.Text; namespace DataValidator { diff --git a/Source/Contrib/DataValidator/Validator.cs b/Source/Contrib/DataValidator/Validator.cs index a608cfbdf2..c8001da1e0 100644 --- a/Source/Contrib/DataValidator/Validator.cs +++ b/Source/Contrib/DataValidator/Validator.cs @@ -18,6 +18,8 @@ using System; using System.Collections.Generic; using System.Diagnostics; +using System.Linq; +using System.Text; namespace DataValidator { diff --git a/Source/Contrib/SimulatorTester/Program.cs b/Source/Contrib/SimulatorTester/Program.cs index 8c605ff109..ab260064c0 100644 --- a/Source/Contrib/SimulatorTester/Program.cs +++ b/Source/Contrib/SimulatorTester/Program.cs @@ -17,13 +17,13 @@ using System; using System.Collections.Generic; -using System.Diagnostics; -using System.IO; using System.Linq; -using System.Windows.Forms; -using Orts.Common; using Orts.Simulation; using ORTS.Common; +using System.IO; +using System.Windows.Forms; +using Orts.Common; +using System.Diagnostics; namespace SimulatorTester { diff --git a/Source/Contrib/TrackViewer/Drawing/BasicShapes.cs b/Source/Contrib/TrackViewer/Drawing/BasicShapes.cs index 24c84902c1..41b9c5725a 100644 --- a/Source/Contrib/TrackViewer/Drawing/BasicShapes.cs +++ b/Source/Contrib/TrackViewer/Drawing/BasicShapes.cs @@ -17,6 +17,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Text; using System.Windows.Media.Imaging; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -34,11 +35,11 @@ namespace ORTS.TrackViewer.Drawing static class BasicShapes { private static SpriteBatch spriteBatch; - + //size of a identifying feature in the texture (in pixels), so we can scale as needed private static Dictionary textureScales = new Dictionary(); private static Dictionary textureOffsets = new Dictionary(); - private static Dictionary textures = new Dictionary(); + private static Dictionary textures = new Dictionary(); private static FontManager fontManager; @@ -50,14 +51,14 @@ static class BasicShapes /// The full directory name where content like .png files can be found public static void LoadContent(GraphicsDevice graphicsDevice, SpriteBatch spriteBatchIn, string contentPath) { - spriteBatch = spriteBatchIn; + spriteBatch = spriteBatchIn; textures["blankPixel"] = new Texture2D(graphicsDevice, 1, 1); textures["blankPixel"].SetData(new[] { Color.White }); int diameter = 64; // Needs to be power of two for mipmapping textures["circle"] = CreateCircleTexture(graphicsDevice, diameter); textureScales["circle"] = diameter; - textureOffsets["circle"] = new Vector2(diameter / 2, diameter / 2); + textureOffsets["circle"] = new Vector2(diameter/2, diameter/2); textures["disc"] = CreateDiscTexture(graphicsDevice, diameter); textureScales["disc"] = diameter; @@ -72,13 +73,13 @@ public static void LoadContent(GraphicsDevice graphicsDevice, SpriteBatch sprite textureOffsets["crossedRing"] = new Vector2(diameter / 2, diameter / 2); - LoadAndHighlightTexture(graphicsDevice, contentPath, "signal", "Signal", 29, 18); + LoadAndHighlightTexture(graphicsDevice, contentPath, "signal", "Signal",29, 18); LoadAndHighlightTexture(graphicsDevice, contentPath, "hazard", "Hazard"); - LoadAndHighlightTexture(graphicsDevice, contentPath, "pathNormal", "pathNormal", 31, 31); - LoadAndHighlightTexture(graphicsDevice, contentPath, "pathStart", "pathStart", 31, 31); - LoadAndHighlightTexture(graphicsDevice, contentPath, "pathEnd", "pathEnd", 31, 31); - LoadAndHighlightTexture(graphicsDevice, contentPath, "pathWait", "pathWait", 31, 31); + LoadAndHighlightTexture(graphicsDevice, contentPath, "pathNormal", "pathNormal",31,31); + LoadAndHighlightTexture(graphicsDevice, contentPath, "pathStart", "pathStart",31,31); + LoadAndHighlightTexture(graphicsDevice, contentPath, "pathEnd", "pathEnd",31,31); + LoadAndHighlightTexture(graphicsDevice, contentPath, "pathWait", "pathWait",31,31); LoadAndHighlightTexture(graphicsDevice, contentPath, "pathReverse", "pathReverse", 31, 31); //LoadAndHighlightTexture(graphicsDevice, contentPath, "pathSiding", "pathSiding", 31, 31); @@ -88,7 +89,7 @@ public static void LoadContent(GraphicsDevice graphicsDevice, SpriteBatch sprite LoadAndHighlightTexture(graphicsDevice, contentPath, "pickup", "Pickup"); LoadAndHighlightTexture(graphicsDevice, contentPath, "platform", "Platform", 31, 37); LoadAndHighlightTexture(graphicsDevice, contentPath, "sound", "Sound"); - LoadAndHighlightTexture(graphicsDevice, contentPath, "playerTrain", "steamTrain", 31, 31); + LoadAndHighlightTexture(graphicsDevice, contentPath, "playerTrain", "steamTrain",31,31); PrepareArcDrawing(); fontManager = FontManager.Instance; @@ -104,11 +105,11 @@ public static void LoadContent(GraphicsDevice graphicsDevice, SpriteBatch sprite /// the name of the file (without extension) private static void LoadAndHighlightTexture(GraphicsDevice graphicsDevice, string contentPath, string textureName, string fileName) { - LoadAndHighlightTexture(graphicsDevice, contentPath, textureName, fileName, 0, 0); + LoadAndHighlightTexture( graphicsDevice, contentPath, textureName, fileName, 0, 0); } private static void LoadAndHighlightTexture(GraphicsDevice graphicsDevice, string contentPath, string textureName, string fileName, int offsetX, int offsetY) { - string fullFileName = System.IO.Path.Combine(contentPath, fileName + ".png"); + string fullFileName = System.IO.Path.Combine(contentPath, fileName +".png"); Texture2D tempTexture; try { @@ -152,7 +153,7 @@ static Texture2D ColorScaledTexture(Texture2D texture, GraphicsDevice graphicsDe /// The white texture private static Texture2D CreateCircleTexture(GraphicsDevice graphicsDevice, int outerRadius) { - int radius = (outerRadius - 2) / 2; // So circle doesn't go out of bounds + int radius = (outerRadius - 2)/2; // So circle doesn't go out of bounds Texture2D texture = new Texture2D(graphicsDevice, outerRadius, outerRadius, mipmap: false, SurfaceFormat.Color); Color[] data = new Color[outerRadius * outerRadius]; @@ -209,7 +210,7 @@ private static Texture2D CreateDiscTexture(GraphicsDevice graphicsDevice, int ou texture.SetData(data); return texture; } - + /// /// private method to create a texture2D containing a ring (circle with thick border) /// @@ -230,7 +231,7 @@ private static Texture2D CreateRingTexture(GraphicsDevice graphicsDevice, int ou { int i = (x + radius) * outerRadius + (y + radius); int r2 = x * x + y * y; - if (r2 <= radius * radius && r2 > innerRadius * innerRadius) + if (r2 <= radius * radius && r2 > innerRadius * innerRadius) { data[i] = Color.White; } @@ -282,7 +283,7 @@ private static Texture2D CreateCrossedRingTexture(GraphicsDevice graphicsDevice, data[i] = Color.White; } } - + } } @@ -337,13 +338,13 @@ public static void DrawDashedLine(float width, Color color, Vector2 point1, Vect float angle = (float)Math.Atan2(point2.Y - point1.Y, point2.X - point1.X); float cosAngle = (float)Math.Cos(angle); float sinAngle = (float)Math.Sin(angle); - + float length = Vector2.Distance(point1, point2); - + int pixelsPerSegment = 10; // this is a target value. We will always start and end with a segment. - int nsegments = 1 + (int)Math.Floor(length / (2 * pixelsPerSegment)); + int nsegments = 1 + (int) Math.Floor(length / (2 * pixelsPerSegment)); float lengthPerSegment = length / (2 * nsegments - 1); - Vector2 segmentOffset = 2 * lengthPerSegment * new Vector2(cosAngle, sinAngle); + Vector2 segmentOffset = 2*lengthPerSegment * new Vector2(cosAngle, sinAngle); for (int i = 0; i < nsegments; i++) { @@ -363,8 +364,8 @@ public static void DrawDashedLine(float width, Color color, Vector2 point1, Vect public static void DrawLine(float width, Color color, Vector2 point, float length, float angle) { // offset to compensate for the width of the line - Vector2 offset = new Vector2(width * (float)Math.Sin(angle) / 2, -width * (float)Math.Cos(angle) / 2); - spriteBatch.Draw(textures["blankPixel"], point + offset, null, color, + Vector2 offset = new Vector2(width * (float) Math.Sin(angle)/2, -width * (float)Math.Cos(angle)/2); + spriteBatch.Draw(textures["blankPixel"], point+offset, null, color, angle, Vector2.Zero, new Vector2(length, width), SpriteEffects.None, 0); } @@ -384,14 +385,14 @@ public static void DrawArc(float width, Color color, Vector2 point, float radius // Positive arcDegree means curving to the left, negative arcDegree means curving to the right int sign = (arcDegrees > 0) ? -1 : 1; arcDegrees = Math.Abs(arcDegrees); - + // We will draw an arc as a succession of straight lines. We do this in a way that reduces the amount // of goniometric calculations needed. // The idea is to start to find the center of the circle. The direction from center to origin is // 90 degrees different from angle Vector2 centerToPointDirection = sign * new Vector2(-(float)Math.Sin(angle), (float)Math.Cos(angle)); // unit vector Vector2 center = point - radius * centerToPointDirection; ; - + // To determine the amount of straight lines we need to calculate we first // determine then lenght of the arc, and divide that by the maximum we allow; // All angles go in steps of minAngleDegree @@ -400,12 +401,12 @@ public static void DrawArc(float width, Color color, Vector2 point, float radius // Here alpha is the angle drawn for a single arc-segment. Approximately error ~ radius * alpha^2/8. // The amount of pixels in the line is about L ~ radius * alpha => L ~ sqrt(8 * radius * error). // We found that for thight curves, error can not be larger than half a pixel (otherwise it becomes visible) - maxStraightPixels = (float)Math.Sqrt(4 * radius); + maxStraightPixels = (float)Math.Sqrt(4*radius); float numberStraightLines = (float)Math.Ceiling(arcLength / maxStraightPixels); // amount of minAngleDegrees we need to cover: - int arcStepsRemaining = (int)(Math.Round(arcDegrees / minAngleDegree)); + int arcStepsRemaining = (int) (Math.Round(arcDegrees/minAngleDegree)); // amount of minAngleDegrees we cover per straight line: - int arcStepsPerLine = (int)(Math.Ceiling(arcDegrees / (minAngleDegree * numberStraightLines))); + int arcStepsPerLine = (int) (Math.Ceiling(arcDegrees/(minAngleDegree*numberStraightLines))); // Add offset in angles if (arcDegreesOffset != 0f) @@ -421,9 +422,9 @@ public static void DrawArc(float width, Color color, Vector2 point, float radius while (arcStepsRemaining > 0) { int arcSteps = Math.Min(arcStepsRemaining, arcStepsPerLine); //angle steps we cover in this line - point = center + centerToPointDirection * (radius - sign * width / 2); // correct for width of line + point = center + centerToPointDirection * (radius-sign*width/2); // correct for width of line float length = radius * arcSteps * minAngleRad + 1; // the +1 to prevent white lines in between arc sections - + spriteBatch.Draw(textures["blankPixel"], point, null, color, angle, Vector2.Zero, new Vector2(length, width), SpriteEffects.None, 0); @@ -436,8 +437,8 @@ public static void DrawArc(float width, Color color, Vector2 point, float radius angle -= sign * arcSteps * minAngleRad; //Rotate the centerToPointDirection, and calculate new point centerToPointDirection = new Vector2( - cosTable[arcSteps] * centerToPointDirection.X + sign * sinTable[arcSteps] * centerToPointDirection.Y, - -sign * sinTable[arcSteps] * centerToPointDirection.X + cosTable[arcSteps] * centerToPointDirection.Y + cosTable[arcSteps] * centerToPointDirection.X + sign*sinTable[arcSteps] * centerToPointDirection.Y, + -sign*sinTable[arcSteps] * centerToPointDirection.X + cosTable[arcSteps] * centerToPointDirection.Y ); } } @@ -507,17 +508,17 @@ public static void DrawTexture(Vector2 point, string textureName, float angle, f private static void PrepareArcDrawing() { minAngleRad = MathHelper.ToRadians(minAngleDegree); - arcTableSize = (int)(Math.Ceiling(maxAngleDegree / minAngleDegree) + 1); + arcTableSize = (int)(Math.Ceiling(maxAngleDegree/minAngleDegree)+1); cosTable = new float[arcTableSize]; sinTable = new float[arcTableSize]; for (int i = 0; i < arcTableSize; i++) { - cosTable[i] = (float)Math.Cos(i * minAngleRad); - sinTable[i] = (float)Math.Sin(i * minAngleRad); + cosTable[i] = (float) Math.Cos(i * minAngleRad); + sinTable[i] = (float) Math.Sin(i * minAngleRad); } } - + private static float minAngleDegree = 0.1f; // we do not care for angles smaller than 0.1 degrees private static float maxAngleDegree = 90; // allows for drawing up to 90 degree arcs private static float maxStraightPixels; // Maximum amount of pixels in a straight line part of an arc @@ -544,19 +545,19 @@ public class FontManager private int defaultFontSize; /// Fontsize to be used for exanding text private int expandingFontSize; - + /// The text manager that supports the font(s) private WindowTextManager textManager; /// List of fonts private Dictionary fonts; - + /// /// Constructor, private so only called during class initialization /// private FontManager() { - fontSizes = new int[] { 10, 11, 12, 13, 14, 16, 18, 20 }; + fontSizes = new int[] {10,11,12,13,14,16,18,20}; defaultFontSize = 10; expandingFontSize = defaultFontSize; diff --git a/Source/Contrib/TrackViewer/Drawing/CloseToMouse.cs b/Source/Contrib/TrackViewer/Drawing/CloseToMouse.cs index fcd3c3f0ed..70c76ed256 100644 --- a/Source/Contrib/TrackViewer/Drawing/CloseToMouse.cs +++ b/Source/Contrib/TrackViewer/Drawing/CloseToMouse.cs @@ -17,9 +17,10 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Text; using Microsoft.Xna.Framework; -using Orts.Formats.Msts; using ORTS.Common; +using Orts.Formats.Msts; namespace ORTS.TrackViewer.Drawing { @@ -79,7 +80,7 @@ public abstract class CloseToMousePoint : CloseToMouse /// /// CloseToMouse item specifically for junctions and endnode. But will take any track point /// - public class CloseToMouseJunctionOrEnd : CloseToMousePoint + public class CloseToMouseJunctionOrEnd:CloseToMousePoint { /// Tracknode of the closest junction or end node public TrackNode JunctionOrEndNode { get; private set; } @@ -141,13 +142,13 @@ public void CheckMouseDistance(WorldLocation location, WorldLocation mouseLocati /// /// CloseToMouse track item. Stores item as well as its type (name) /// - public class CloseToMouseItem : CloseToMousePoint + public class CloseToMouseItem:CloseToMousePoint { /// Link to the item that is closest to the mouse public DrawableTrackItem DrawableTrackItem { get; protected set; } - + /// The index of the original item in whatever table it was defined - public override uint Index { get { return DrawableTrackItem.Index; } } + public override uint Index { get { return DrawableTrackItem.Index;} } /// The X-coordinate within a tile of the original item in the track database public override float X { get { return worldLocation.Location.X; } } /// The Z-coordinate within a tile of the original item in the track database @@ -155,7 +156,7 @@ public class CloseToMouseItem : CloseToMousePoint /// The world location of the item that is closest to the mouse private WorldLocation worldLocation; - + /// /// Constructor, creating an empty object /// @@ -183,7 +184,7 @@ public override void Reset() base.Reset(); DrawableTrackItem = null; worldLocation = WorldLocation.None; - } + } /// /// Check wether this track Item is closest to the mouse location @@ -296,7 +297,7 @@ public override void Reset() /// the vectorSection that will be stored when indeed it is closest to the mouse location /// Current index of the trackvectorsection /// - public void CheckMouseDistance(WorldLocation location, WorldLocation mouseLocation, + public void CheckMouseDistance(WorldLocation location, WorldLocation mouseLocation, TrackNode trackNode, TrVectorSection vectorSection, int tvsi, double pixelsPerMeter) { storedMouseLocation = mouseLocation; @@ -339,7 +340,7 @@ void CalcRealDistances() TrackSection trackSection = tsectionDat.TrackSections.Get(trackCandidate.vectorSection.SectionIndex); DistanceLon distanceLon = CalcRealDistanceSquared(trackCandidate.vectorSection, trackSection); double realDistanceSquared = (double)distanceLon.distanceSquared; - + // Add the trackCandidate to the sorted list with its new distance squared as key if (!sortedTrackCandidates.ContainsKey(realDistanceSquared)) { @@ -419,8 +420,7 @@ DistanceLon CalcRealDistanceSquared(TrVectorSection trackVectorSection, TrackSec /// /// Struct to store a candidate for the track closest to the mouse, so we can keep an ordered list. /// - struct TrackCandidate - { + struct TrackCandidate { public TrackNode trackNode; public TrVectorSection vectorSection; public int trackVectorSectionIndex; // which section within a trackNode that is a vector node diff --git a/Source/Contrib/TrackViewer/Drawing/DebugWindow.cs b/Source/Contrib/TrackViewer/Drawing/DebugWindow.cs index dfae7754ab..f0bfb03a90 100644 --- a/Source/Contrib/TrackViewer/Drawing/DebugWindow.cs +++ b/Source/Contrib/TrackViewer/Drawing/DebugWindow.cs @@ -16,7 +16,10 @@ // along with Open Rails. If not, see . using System; using System.Collections.Generic; +using System.Linq; +using System.Text; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; namespace ORTS.TrackViewer.Drawing { @@ -32,8 +35,7 @@ public class DebugWindow /// /// Draw all available debug windows /// - public static void DrawAll() - { + public static void DrawAll() { //Just a safety. Normally there should be no DebugWindows once released. if (!System.Diagnostics.Debugger.IsAttached) return; foreach (DebugWindow window in debugWindows) diff --git a/Source/Contrib/TrackViewer/Drawing/DrawArea.cs b/Source/Contrib/TrackViewer/Drawing/DrawArea.cs index 00ffb55480..147758c932 100644 --- a/Source/Contrib/TrackViewer/Drawing/DrawArea.cs +++ b/Source/Contrib/TrackViewer/Drawing/DrawArea.cs @@ -27,9 +27,14 @@ // Note: screen (area and window) coordinates are given by x, y (from left to right, and top to bottom), // whereas world locations are in x, z (from left to right but from bottom to top). using System; +using System.Collections.Generic; using System.Linq; +using System.Text; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Content; +using Microsoft.Xna.Framework.Graphics; using ORTS.Common; +using ORTS.TrackViewer.Properties; namespace ORTS.TrackViewer.Drawing { @@ -769,7 +774,7 @@ public void DrawTexture(WorldLocation location, string textureName, float size, /// Rotation angle for the texture /// Size of the texture in world-meters ///Whether the texture needs to be flipped (vertically) - public void DrawTexture(WorldLocation location, string textureName, float size, float angle, bool flip) + public void DrawTexture(WorldLocation location, string textureName, float size, float angle, bool flip) { if (OutOfArea(location)) return; float pixelSize = GetWindowSize(size); @@ -846,12 +851,12 @@ public double AddStep(int stepsToAdd) while (stepIndex >= discreteSteps.Count()) { stepIndex -= discreteSteps.Count(); - powerOfTen++; + powerOfTen ++; } while (stepIndex < 0) { stepIndex += discreteSteps.Count(); - powerOfTen--; + powerOfTen --; if (powerOfTen < minPowerOfTen) { powerOfTen = minPowerOfTen; @@ -868,7 +873,7 @@ public double AddStep(int stepsToAdd) public void ApproximateTo(double requestedValue) { powerOfTen = Convert.ToInt32(Math.Floor(Math.Log10(requestedValue))) - 1; - double restValue = requestedValue * Math.Pow(10, -(double)powerOfTen); + double restValue = requestedValue * Math.Pow(10 , -(double)powerOfTen); for (stepIndex = 0; stepIndex < discreteSteps.Count() && discreteSteps[stepIndex] < restValue; stepIndex++) { }; if (stepIndex == discreteSteps.Count()) { // the value requested is larger than 90. 10^n, which means we get 100.10^n. diff --git a/Source/Contrib/TrackViewer/Drawing/DrawColors.cs b/Source/Contrib/TrackViewer/Drawing/DrawColors.cs index 1bd04fb8d3..09256865f1 100644 --- a/Source/Contrib/TrackViewer/Drawing/DrawColors.cs +++ b/Source/Contrib/TrackViewer/Drawing/DrawColors.cs @@ -17,6 +17,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Text; using Microsoft.Xna.Framework; using ORTS.TrackViewer.UserInterface; @@ -37,9 +38,9 @@ namespace ORTS.TrackViewer.Drawing static class DrawColors { - public static ColorScheme colorsNormal = new ColorScheme(); + public static ColorScheme colorsNormal = new ColorScheme(); public static ColorScheme colorsHighlight = new ColorScheme(HighlightType.Highlight); - public static ColorScheme colorsHotlight = new ColorScheme(HighlightType.Hotlight); // even more highlighting + public static ColorScheme colorsHotlight = new ColorScheme(HighlightType.Hotlight); // even more highlighting public static ColorScheme colorsRoads = new ColorScheme(); public static ColorScheme colorsRoadsHighlight = new ColorScheme(HighlightType.Highlight); public static ColorScheme colorsRoadsHotlight = new ColorScheme(HighlightType.Hotlight); @@ -52,7 +53,7 @@ static class DrawColors static ColorsGroupTrack roadTrackGroupColoured = new ColorsGroupTrack(); static ColorsGroupTrack trackGroupTerrain = new ColorsGroupTrack(); static ColorsGroupTrack roadTrackGroupTerrain = new ColorsGroupTrack(); - + static ColorsGroupBackground backgroundWithTilesGroup = new ColorsGroupBackground(); static ColorsGroupBackground backgroundWithoutTilesGroup = new ColorsGroupBackground(); @@ -71,7 +72,7 @@ public static void Initialize(IPreferenceChanger preferenceChanger) SetShadedColors(preferenceChanger); SetColoursFromOptions(true, false, false); //just a default - } + } private static void SetPathColors(IPreferenceChanger preferenceChanger) { @@ -82,7 +83,7 @@ private static void SetPathColors(IPreferenceChanger preferenceChanger) ColorWithHighlights brokenNode = new ColorWithHighlights(Color.Red, 40); ColorWithHighlights pathMain = new ColorWithHighlights(Color.Yellow, 20); - pathMain.MakeIntoUserPreference(preferenceChanger, "pathmain", + pathMain.MakeIntoUserPreference(preferenceChanger, "pathmain", TrackViewer.catalog.GetString("Select path color (main)")); ColorsGroupTrack pathMainGroup = new ColorsGroupTrack { @@ -94,7 +95,7 @@ private static void SetPathColors(IPreferenceChanger preferenceChanger) colorsPathMain.TrackColors = pathMainGroup; ColorWithHighlights pathSiding = new ColorWithHighlights(Color.Orange, 20); - pathSiding.MakeIntoUserPreference(preferenceChanger, "pathsiding", + pathSiding.MakeIntoUserPreference(preferenceChanger, "pathsiding", TrackViewer.catalog.GetString("Select path color (siding)")); ColorsGroupTrack pathSidingGroup = new ColorsGroupTrack { @@ -106,7 +107,7 @@ private static void SetPathColors(IPreferenceChanger preferenceChanger) colorsPathSiding.TrackColors = pathSidingGroup; - + } private static void SetTrackColors(IPreferenceChanger preferenceChanger) @@ -150,7 +151,7 @@ private static void SetBackgroundColors(IPreferenceChanger preferenceChanger) { ColorWithHighlights fixedBackgroundColor = new ColorWithHighlights(Color.White, 20); ColorWithHighlights changingBackgroundColor = new ColorWithHighlights(Color.PaleGreen, 20); - changingBackgroundColor.MakeIntoUserPreference(preferenceChanger, "background", + changingBackgroundColor.MakeIntoUserPreference(preferenceChanger, "background", TrackViewer.catalog.GetString("Select background color")); backgroundWithoutTilesGroup.Tile = changingBackgroundColor; backgroundWithoutTilesGroup.ClearWindow = changingBackgroundColor; @@ -177,37 +178,37 @@ private static void SetItemColors(IPreferenceChanger preferenceChanger) ColorWithHighlights itemColor; itemColor = new ColorWithHighlights(Color.Black, 40); - itemColor.MakeIntoUserPreference(preferenceChanger, "text", + itemColor.MakeIntoUserPreference(preferenceChanger, "text", TrackViewer.catalog.GetString("Select item text color")); itemColors.Text = itemColor; itemColor = new ColorWithHighlights(Color.Blue, 120); - itemColor.MakeIntoUserPreference(preferenceChanger, "junction", + itemColor.MakeIntoUserPreference(preferenceChanger, "junction", TrackViewer.catalog.GetString("Select junction color")); itemColors.Junction = itemColor; itemColor = new ColorWithHighlights(Color.LimeGreen, 40); - itemColor.MakeIntoUserPreference(preferenceChanger, "endnode", + itemColor.MakeIntoUserPreference(preferenceChanger, "endnode", TrackViewer.catalog.GetString("Select endnode color")); itemColors.EndNode = itemColor; itemColor = new ColorWithHighlights(Color.Sienna, 40); - itemColor.MakeIntoUserPreference(preferenceChanger, "siding", + itemColor.MakeIntoUserPreference(preferenceChanger, "siding", TrackViewer.catalog.GetString("Select siding color")); itemColors.Siding = itemColor; itemColor = new ColorWithHighlights(Color.Gray, 40); - itemColor.MakeIntoUserPreference(preferenceChanger, "crossing", + itemColor.MakeIntoUserPreference(preferenceChanger, "crossing", TrackViewer.catalog.GetString("Select crossing color")); itemColors.Crossing = itemColor; itemColor = new ColorWithHighlights(Color.DarkGray, 40); - itemColor.MakeIntoUserPreference(preferenceChanger, "roadcrossing", + itemColor.MakeIntoUserPreference(preferenceChanger, "roadcrossing", TrackViewer.catalog.GetString("Select road crossing color")); itemColors.RoadCrossing = itemColor; itemColor = new ColorWithHighlights(Color.Purple, 40); - itemColor.MakeIntoUserPreference(preferenceChanger, "speedpost", + itemColor.MakeIntoUserPreference(preferenceChanger, "speedpost", TrackViewer.catalog.GetString("Select speedpost color")); itemColors.Speedpost = itemColor; @@ -313,8 +314,7 @@ public static ColorScheme ShadeColor(ColorWithHighlights referenceColor, int ind #endregion #region ColorGroup classes - class ColorsGroupBasic - { + class ColorsGroupBasic { public ColorWithHighlights Junction { get; set; } public ColorWithHighlights EndNode { get; set; } public ColorWithHighlights Crossing { get; set; } @@ -352,10 +352,10 @@ class ColorsGroupTrack /// class ColorScheme { - public ColorsGroupBasic TrackItemColors { get; set; } + public ColorsGroupBasic TrackItemColors {get; set;} public ColorsGroupBackground BackgroundColors { get; set; } public ColorsGroupTrack TrackColors { get; set; } - + public Color Junction { get { return TrackItemColors.Junction.Colors[highlightType]; } } public Color EndNode { get { return TrackItemColors.EndNode.Colors[highlightType]; } } public Color Crossing { get { return TrackItemColors.Crossing.Colors[highlightType]; } } @@ -373,12 +373,12 @@ class ColorScheme public Color TrackCurved { get { return TrackColors.TrackCurved.Colors[highlightType]; } } public Color BrokenPath { get { return TrackColors.BrokenPath.Colors[highlightType]; } } public Color BrokenNode { get { return TrackColors.BrokenNode.Colors[highlightType]; } } - + public Color ClearWindow { get { return BackgroundColors.ClearWindow.Colors[highlightType]; } } public Color Tile { get { return BackgroundColors.Tile.Colors[highlightType]; } } - public Color None { get { return Color.White; } } - + public Color None { get { return Color.White; } } + private static Dictionary nameExtensions = new Dictionary { {HighlightType.Normal, ""}, @@ -423,7 +423,7 @@ enum HighlightType Highlight, Hotlight, } - + /// /// Class to store not only a color but also its highlighted variants /// @@ -432,8 +432,8 @@ class ColorWithHighlights /// /// The current normal, highlight and hotlight colors. /// - public IDictionary Colors { get; private set; } - + public IDictionary Colors { get; private set; } + //Some things we store to be used when color is changed using preference. private byte highlightDelta; private Color defaultColor; @@ -507,7 +507,7 @@ public void ChangeColors(Color normalColor, Color highlightColor, Color hotlight Colors[HighlightType.Hotlight] = hotlightColor; } - /// + /// /// Make this color with highlights changable via some preference changing mechanism /// /// The object that can change a preference @@ -531,7 +531,7 @@ public void MakeIntoUserPreference(IPreferenceChanger preferenceChanger, string string defaultColorOption = defaultColorName + defaultOptionExtension; colorOptions.Insert(0, defaultColorOption); - var callBack = normalOnly ? new StringPreferenceDelegate(PreferenceChangedCallbackNormalOnly) : new StringPreferenceDelegate(PreferenceChangedCallback); + var callBack = normalOnly ? new StringPreferenceDelegate(PreferenceChangedCallbackNormalOnly): new StringPreferenceDelegate(PreferenceChangedCallback); preferenceChanger.AddStringPreference(name, description, colorOptions.ToArray(), defaultColorOption, callBack); } @@ -573,7 +573,7 @@ private void PreferenceChangedCallbackNormalOnly(string selectedColorName) /// /// The color for which you want the name private static string FindColorName(Color color) - { + { // foreach (KeyValuePair entry in namedColors) { @@ -647,7 +647,7 @@ static byte ReshadeSingleChannel(byte original, int index, int count) } else { - newvalue = 255 - ((255 - original) * (count + index + 1) / (2 * count)); + newvalue = 255 - ((255-original) * (count + index + 1) / (2 * count)); } return (byte)newvalue; } diff --git a/Source/Contrib/TrackViewer/Drawing/DrawLongitudeLatitude.cs b/Source/Contrib/TrackViewer/Drawing/DrawLongitudeLatitude.cs index 9c66a3ce36..4ddfbcb8fc 100644 --- a/Source/Contrib/TrackViewer/Drawing/DrawLongitudeLatitude.cs +++ b/Source/Contrib/TrackViewer/Drawing/DrawLongitudeLatitude.cs @@ -16,8 +16,8 @@ // along with Open Rails. If not, see . using System; using Microsoft.Xna.Framework; -using Orts.Common; using ORTS.Common; +using Orts.Common; namespace ORTS.TrackViewer.Drawing { @@ -48,15 +48,15 @@ public DrawLongitudeLatitude(int xLowerLeft, int yLowerLeft) public void Draw(WorldLocation mstsLocation) { if (!Properties.Settings.Default.showLonLat) return; - + double latitude = 1f; double longitude = 1f; worldLoc.ConvertWTC(mstsLocation.TileX, mstsLocation.TileZ, mstsLocation.Location, ref latitude, ref longitude); string latitudeDegrees = MathHelper.ToDegrees((float)latitude).ToString("F5", System.Globalization.CultureInfo.CurrentCulture); string longitudeDegrees = MathHelper.ToDegrees((float)longitude).ToString("F5", System.Globalization.CultureInfo.CurrentCulture); - string locationText = String.Format(System.Globalization.CultureInfo.CurrentCulture, + string locationText = String.Format(System.Globalization.CultureInfo.CurrentCulture, "Lon = {0}; Lat = {1}", longitudeDegrees, latitudeDegrees); - BasicShapes.DrawString(lowerLeft, DrawColors.colorsNormal.Text, locationText); + BasicShapes.DrawString(lowerLeft, DrawColors.colorsNormal.Text, locationText); } } } diff --git a/Source/Contrib/TrackViewer/Drawing/DrawMultiplePaths.cs b/Source/Contrib/TrackViewer/Drawing/DrawMultiplePaths.cs index 29381c1852..3c02a5e466 100644 --- a/Source/Contrib/TrackViewer/Drawing/DrawMultiplePaths.cs +++ b/Source/Contrib/TrackViewer/Drawing/DrawMultiplePaths.cs @@ -14,9 +14,11 @@ // // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; +using System.Text; using Microsoft.Xna.Framework; using Orts.Formats.Msts; @@ -32,7 +34,7 @@ namespace ORTS.TrackViewer.Drawing /// public class DrawMultiplePaths { - + /// For each path name, store the full file name of the .pat file Dictionary fullPathNames; /// The paths that have already been loaded (.pat file has been read and parsed) @@ -41,14 +43,14 @@ public class DrawMultiplePaths Dictionary drawPaths; /// List of trainpaths that have been selected List selectedTrainpaths; - + private TrackDB trackDB; private TrackSectionsFile tsectionDat; /// /// Constructor /// - public DrawMultiplePaths(RouteData routeData, Collection paths) + public DrawMultiplePaths (RouteData routeData, Collection paths) { this.trackDB = routeData.TrackDB; this.tsectionDat = routeData.TsectionDat; @@ -136,7 +138,7 @@ void ReColorAll() drawPaths[trainpath].ColorSchemeLast = shadedColor; } } - + /// /// Draws the paths that have been selected /// diff --git a/Source/Contrib/TrackViewer/Drawing/DrawScaleRuler.cs b/Source/Contrib/TrackViewer/Drawing/DrawScaleRuler.cs index 74dbb78cab..b26e7b2fef 100644 --- a/Source/Contrib/TrackViewer/Drawing/DrawScaleRuler.cs +++ b/Source/Contrib/TrackViewer/Drawing/DrawScaleRuler.cs @@ -17,7 +17,9 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Text; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; namespace ORTS.TrackViewer.Drawing { @@ -60,7 +62,7 @@ public DrawScaleRuler() // here we define, a bit manually, which scales are supported. rulerDataMeters.Add(new RulerDatum(5, 100000, " 100km")); rulerDataMeters.Add(new RulerDatum(5, 50000, " 50km")); - rulerDataMeters.Add(new RulerDatum(4, 20000, " 20km")); + rulerDataMeters.Add(new RulerDatum(4, 20000, " 20km")); rulerDataMeters.Add(new RulerDatum(5, 10000, " 10km")); rulerDataMeters.Add(new RulerDatum(5, 5000, " 5km")); rulerDataMeters.Add(new RulerDatum(4, 2000, " 2km")); @@ -91,7 +93,7 @@ public DrawScaleRuler() rulerDataMiles.Add(new RulerDatum(5, 4.57f, " 5yd")); rulerDataMiles.Add(new RulerDatum(4, 1.82f, " 2yd")); rulerDataMiles.Add(new RulerDatum(5, 0.91f, " 1yd")); - + } /// @@ -103,7 +105,7 @@ public DrawScaleRuler() public void SetLocationAndSize(int xLowerLeft, int yLowerLeft, int fontHeight) { lowerLeftPoint = new Vector2(xLowerLeft, yLowerLeft); - halfFontHeight = (int)(fontHeight / 2); + halfFontHeight = (int)(fontHeight/2); maxPixelWidth = 11 * fontHeight; } @@ -118,21 +120,20 @@ public void SetCurrentRuler(double pixelsPerMeter) List rulerData = (Properties.Settings.Default.useMilesNotMeters) ? rulerDataMiles : rulerDataMeters; - + // to make sure we have something for all zoom levels currentRuler = rulerData.Last(); - + foreach (RulerDatum rulerDatum in rulerData) { - int pixelWidth = (int)Math.Round(pixelsPerMeter * rulerDatum.value); - if (pixelWidth < maxPixelWidth) - { + int pixelWidth = (int) Math.Round(pixelsPerMeter * rulerDatum.value); + if ( pixelWidth < maxPixelWidth ) { currentRuler = rulerDatum; break; } } - fullPixelWidth = (int)Math.Round(pixelsPerMeter * currentRuler.value); + fullPixelWidth = (int) Math.Round(pixelsPerMeter * currentRuler.value); } /// @@ -150,7 +151,7 @@ public void Draw() Vector2 lowerRightPoint = new Vector2(lowerLeftPoint.X + fullPixelWidth, lowerLeftPoint.Y); Vector2 bigMarker = new Vector2(0, -halfFontHeight); - Vector2 smallMarker = new Vector2(0, -(int)(halfFontHeight / 2)); + Vector2 smallMarker = new Vector2(0, -(int)(halfFontHeight/2)); Color color = DrawColors.colorsNormal.Text; BasicShapes.DrawLine(1, color, lowerLeftPoint, lowerRightPoint); diff --git a/Source/Contrib/TrackViewer/Drawing/DrawTerrain.cs b/Source/Contrib/TrackViewer/Drawing/DrawTerrain.cs index fe79d008e3..78b828b2de 100644 --- a/Source/Contrib/TrackViewer/Drawing/DrawTerrain.cs +++ b/Source/Contrib/TrackViewer/Drawing/DrawTerrain.cs @@ -51,11 +51,13 @@ // * the zoom size (1, 2, 8, 16) using System; -using System.Collections.Generic; using System.IO; +using System.Collections.Generic; using System.Linq; +using System.Text; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; + using Orts.Formats.Msts; using Orts.Viewer3D; using ORTS.Common; diff --git a/Source/Contrib/TrackViewer/Drawing/DrawTrackDB.cs b/Source/Contrib/TrackViewer/Drawing/DrawTrackDB.cs index f252ccfe12..304afa9f47 100644 --- a/Source/Contrib/TrackViewer/Drawing/DrawTrackDB.cs +++ b/Source/Contrib/TrackViewer/Drawing/DrawTrackDB.cs @@ -16,13 +16,16 @@ // along with Open Rails. If not, see . using System; using System.Collections.Generic; -using System.Diagnostics; -using System.IO; using System.Linq; +using System.Text; +using System.IO; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; + using Orts.Formats.Msts; using Orts.Parsers.Msts; using ORTS.Common; +using System.Diagnostics; namespace ORTS.TrackViewer.Drawing { @@ -84,7 +87,7 @@ public RouteData(string routePath, MessageDelegate messageDelegate) } catch { - } + } string ORfilepath = System.IO.Path.Combine(routePath, "OpenRails"); if (File.Exists(ORfilepath + @"\sigcfg.dat")) @@ -223,7 +226,7 @@ public class DrawTrackDB #region private members - /// Track Section Data + /// Track Section Data private TrackSectionsFile tsectionDat; /// Track database private TrackDB trackDB; @@ -315,7 +318,7 @@ void FindSignalDetails() foreach (TrackNode tn in trackDB.TrackNodes) { if (tn == null) continue; - TrVectorNode tvn = tn.TrVectorNode; + TrVectorNode tvn= tn.TrVectorNode; if (tvn == null) continue; if (tvn.TrItemRefs == null) continue; @@ -396,7 +399,7 @@ void FindSidingsAndPlatforms() { PlatformLocations[platform.ItemName] = new WorldLocation(trackItem.TileX, trackItem.TileZ, trackItem.X, trackItem.Y, trackItem.Z); StationLocations[platform.Station] = PlatformLocations[platform.ItemName]; - } + } } } #endregion @@ -412,10 +415,10 @@ void PrepareDrawing(DrawArea drawArea) // determine the min and max values of the tiles that we actually need to draw // in some cases (e.g. during initialization) the drawing area itself is really outside the track database, // so we have to account for that. - int actualTileXLeft = Math.Max(Math.Min(drawArea.LocationUpperLeft.TileX, MaxTileX), MinTileX); + int actualTileXLeft = Math.Max(Math.Min(drawArea.LocationUpperLeft.TileX , MaxTileX), MinTileX); int actualTileXRight = Math.Min(Math.Max(drawArea.LocationLowerRight.TileX, MinTileX), MaxTileX); - int actualTileZBot = Math.Max(Math.Min(drawArea.LocationLowerRight.TileZ, MaxTileZ), MinTileZ); - int actualTileZTop = Math.Min(Math.Max(drawArea.LocationUpperLeft.TileZ, MinTileZ), MaxTileZ); + int actualTileZBot = Math.Max(Math.Min(drawArea.LocationLowerRight.TileZ, MaxTileZ), MinTileZ); + int actualTileZTop = Math.Min(Math.Max(drawArea.LocationUpperLeft.TileZ , MinTileZ), MaxTileZ); SetTileIndexes(actualTileXLeft, actualTileXRight, actualTileZBot, actualTileZTop); } @@ -449,9 +452,9 @@ void FillAvailableIndexes() SetTileIndexes(MinTileX, MaxTileX, MinTileZ, MaxTileZ); availableRailVectorNodeIndexes = new List[tileXIndexStop + 1][]; availableRoadVectorNodeIndexes = new List[tileXIndexStop + 1][]; - availablePointNodeIndexes = new List[tileXIndexStop + 1][]; - availableRailItemIndexes = new List[tileXIndexStop + 1][]; - availableRoadItemIndexes = new List[tileXIndexStop + 1][]; + availablePointNodeIndexes = new List[tileXIndexStop + 1][]; + availableRailItemIndexes = new List [tileXIndexStop + 1][]; + availableRoadItemIndexes = new List [tileXIndexStop + 1][]; InitIndexedLists(availableRailVectorNodeIndexes); InitIndexedLists(availableRoadVectorNodeIndexes); InitIndexedLists(availablePointNodeIndexes); @@ -475,8 +478,7 @@ void FillAvailableIndexes() TrVectorSection tvs = tn.TrVectorNode.TrVectorSections[tvsi]; if (tvs == null) continue; List locationList = FindLocationList(tni, tvsi, true); - foreach (WorldLocation location in locationList) - { + foreach (WorldLocation location in locationList) { AddLocationToAvailableList(location, availableRailVectorNodeIndexes, tn); } } @@ -531,7 +533,7 @@ void FillAvailableIndexes() AddLocationToAvailableList(drawableTrackItem.WorldLocation, availableRoadItemIndexes, drawableTrackItem); } } - + // remove double entries MakeUniqueLists(availableRailVectorNodeIndexes); MakeUniqueLists(availableRoadVectorNodeIndexes); @@ -587,7 +589,7 @@ void MakeUniqueLists(List[][] arrayOfLists) { arrayOfLists[xindex][zindex] = arrayOfLists[xindex][zindex].Distinct().ToList(); } - } + } } /// @@ -604,7 +606,7 @@ List FindLocationList(uint trackNodeIndex, int trackVectorSection TrackNode tn = useRailTracks ? trackDB.TrackNodes[trackNodeIndex] : roadTrackDB.TrackNodes[trackNodeIndex]; if (tn == null) return resultList; - + TrVectorSection tvs = tn.TrVectorNode.TrVectorSections[trackVectorSectionIndex]; if (tvs == null) return resultList; @@ -612,7 +614,7 @@ List FindLocationList(uint trackNodeIndex, int trackVectorSection if (trackSection == null) return resultList; float trackSectionLength = DrawTrackDB.GetLength(trackSection); - + // We want to make sure all tiles that a track crosses are noted. // To do this, we make a box around the track (straight or curved), and for all locations of that box // we calculate the min and max values of the tileX and tileZ. We then return a list of 4 worldlocations @@ -620,7 +622,7 @@ List FindLocationList(uint trackNodeIndex, int trackVectorSection // The assumption here is that no single track section crosses a while tile of 2014 meters List boxList = new List(); WorldLocation beginLocation = FindLocationInSection(tvs, trackSection, 0); - WorldLocation endLocation = FindLocationInSection(tvs, trackSection, trackSectionLength); + WorldLocation endLocation = FindLocationInSection(tvs, trackSection, trackSectionLength); boxList.Add(beginLocation); boxList.Add(endLocation); if (trackSection.SectionCurve != null) @@ -628,12 +630,12 @@ List FindLocationList(uint trackNodeIndex, int trackVectorSection // For curved, here, the box has a width. It will be a rectangle containing begin and end node on one side. // On the other side it will touch the middle point of the curve/arc. // The box will then contain the full curve as long as the curve is not more than 180 degrees - WorldLocation midLocation = FindLocationInSection(tvs, trackSection, trackSectionLength / 2); + WorldLocation midLocation = FindLocationInSection(tvs, trackSection, trackSectionLength/2); // (deltaX, deltaZ) is a vector from begin to end. double deltaX = (endLocation.Location.X - endLocation.Location.X); double deltaZ = (endLocation.Location.Z - endLocation.Location.Z); - deltaX += WorldLocation.TileSize * (endLocation.TileX - endLocation.TileX); + deltaX += WorldLocation.TileSize * (endLocation.TileX - endLocation.TileX); deltaZ += WorldLocation.TileSize * (endLocation.TileZ - endLocation.TileZ); WorldLocation begin2Location = new WorldLocation(midLocation); @@ -876,7 +878,7 @@ public void DrawJunctionAndEndNodes(DrawArea drawArea) } } } - + /// /// Draw a specific junction node. /// @@ -910,7 +912,7 @@ private void DrawEndNode(DrawArea drawArea, TrackNode tn, ColorScheme colors) /// Area to draw the items on public void DrawTrackItems(DrawArea drawArea) { - + for (int xindex = tileXIndexStart; xindex <= tileXIndexStop; xindex++) { for (int zindex = tileZIndexStart; zindex <= tileZIndexStop; zindex++) @@ -924,7 +926,7 @@ public void DrawTrackItems(DrawArea drawArea) } } } - } + } /// /// Draw the various road track items, mainly car spawners but also level crossings (again). @@ -935,7 +937,7 @@ public void DrawRoadTrackItems(DrawArea drawArea) ClosestTrackItem.Reset(); // dirtily assumes this is called before normal track items // we only want the carspawners here if (!Properties.Settings.Default.showCarSpawners && !Properties.Settings.Default.showRoadCrossings) return; - + for (int xindex = tileXIndexStart; xindex <= tileXIndexStop; xindex++) { for (int zindex = tileZIndexStart; zindex <= tileZIndexStop; zindex++) @@ -965,13 +967,13 @@ public WorldLocation TrackNodeHighlightOverride(int tni) if (tn == null) return WorldLocation.None; IsHighlightOverridden = true; - if (tn.TrJunctionNode != null) + if (tn.TrJunctionNode != null ) { searchJunctionOrEnd = new CloseToMouseJunctionOrEnd(tn, "junction"); return UidLocation(tn.UiD); } - if (tn.TrEndNode) + if (tn.TrEndNode ) { searchJunctionOrEnd = new CloseToMouseJunctionOrEnd(tn, "endnode"); return UidLocation(tn.UiD); @@ -999,7 +1001,7 @@ public WorldLocation TrackNodeHighlightOverrideRoad(int tni) if (tn == null) return WorldLocation.None; IsHighlightOverridden = true; - + if (tn.TrEndNode) { searchJunctionOrEnd = new CloseToMouseJunctionOrEnd(tn, "endnode"); @@ -1012,7 +1014,7 @@ public WorldLocation TrackNodeHighlightOverrideRoad(int tni) TrackNode nodeAhead = roadTrackDB.TrackNodes[tn.TrPins[1].Link]; return TrackLocation(tn, nodeBehind, nodeAhead); } - + /// /// Find the item with the given index. And if it exists, prepare for highlighting it /// @@ -1216,9 +1218,9 @@ public WorldLocation FindLocation(uint trackNodeIndex, int trackVectorSectionInd { try { - TrackNode tn = useRailTracks ? - trackDB.TrackNodes[trackNodeIndex] : roadTrackDB.TrackNodes[trackNodeIndex]; - + TrackNode tn = useRailTracks ? + trackDB.TrackNodes[trackNodeIndex]: roadTrackDB.TrackNodes[trackNodeIndex]; + TrVectorSection tvs = tn.TrVectorNode.TrVectorSections[trackVectorSectionIndex]; TrackSection trackSection = tsectionDat.TrackSections.Get(tvs.SectionIndex); diff --git a/Source/Contrib/TrackViewer/Drawing/DrawWorldTiles.cs b/Source/Contrib/TrackViewer/Drawing/DrawWorldTiles.cs index 53ca481e8a..f68d7d2828 100644 --- a/Source/Contrib/TrackViewer/Drawing/DrawWorldTiles.cs +++ b/Source/Contrib/TrackViewer/Drawing/DrawWorldTiles.cs @@ -16,8 +16,10 @@ // along with Open Rails. If not, see . using System; using System.Collections.Generic; -using System.IO; using System.Linq; +using System.Text; +using System.IO; + using ORTS.Common; namespace ORTS.TrackViewer.Drawing @@ -38,7 +40,7 @@ public class DrawWorldTiles // for each index=TileX, a list containing start and stop tileZ's // in many cases each list will contain only two elements. But in the case of holes, it might be more. private Dictionary> worldTileRanges; - + /// /// Default constructor /// @@ -51,7 +53,7 @@ public DrawWorldTiles() /// From the names of these file we determine the tile location, and store these locations for later drawing /// /// - public void SetRoute(string routePath) + public void SetRoute(string routePath) { worldTileRanges = new Dictionary>(); Dictionary> worldTiles = new Dictionary>(); @@ -78,7 +80,7 @@ public void SetRoute(string routePath) //now make ranges out of it. For each available TileX a range is given by a minimum and maximum value of //TileZ such that all tiles from the minimum till/including the maximum are available //multiple ranges can occur for a single tileX. - + foreach (int TileX in worldTiles.Keys) { worldTileRanges[TileX] = new List(); @@ -110,7 +112,7 @@ public void Draw(DrawArea drawArea) for (int i = 0; i < worldTileRanges[TileX].Count; i += 2) { int TileZstart = worldTileRanges[TileX][i]; - int TileZstop = worldTileRanges[TileX][i + 1]; + int TileZstop = worldTileRanges[TileX][i+1]; WorldLocation bot = new WorldLocation(TileX, TileZstart, 0, 0, -1024); WorldLocation top = new WorldLocation(TileX, TileZstop, 0, 0, 1024); drawArea.DrawLineAlways(2048, DrawColors.colorsNormal.Tile, bot, top); diff --git a/Source/Contrib/TrackViewer/Drawing/DrawableTrackItem.cs b/Source/Contrib/TrackViewer/Drawing/DrawableTrackItem.cs index 6090a9d244..ca8a4ae63f 100644 --- a/Source/Contrib/TrackViewer/Drawing/DrawableTrackItem.cs +++ b/Source/Contrib/TrackViewer/Drawing/DrawableTrackItem.cs @@ -16,9 +16,13 @@ // along with Open Rails. If not, see . using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; using Orts.Formats.Msts; -using Orts.Simulation; using ORTS.Common; +using ORTS.TrackViewer.Properties; +using Orts.Simulation; namespace ORTS.TrackViewer.Drawing { @@ -55,17 +59,17 @@ protected DrawableTrackItem(TrItem originalTrItem) /// A drawable trackitem, with proper subclass public static DrawableTrackItem CreateDrawableTrItem(TrItem originalTrItem) { - if (originalTrItem is SignalItem) { return new DrawableSignalItem(originalTrItem); } - if (originalTrItem is PlatformItem) { return new DrawablePlatformItem(originalTrItem); } - if (originalTrItem is SidingItem) { return new DrawableSidingItem(originalTrItem); } - if (originalTrItem is SpeedPostItem) { return new DrawableSpeedPostItem(originalTrItem); } - if (originalTrItem is HazzardItem) { return new DrawableHazardItem(originalTrItem); } - if (originalTrItem is PickupItem) { return new DrawablePickupItem(originalTrItem); } - if (originalTrItem is LevelCrItem) { return new DrawableLevelCrItem(originalTrItem); } - if (originalTrItem is SoundRegionItem) { return new DrawableSoundRegionItem(originalTrItem); } - if (originalTrItem is RoadLevelCrItem) { return new DrawableRoadLevelCrItem(originalTrItem); } + if (originalTrItem is SignalItem) { return new DrawableSignalItem(originalTrItem); } + if (originalTrItem is PlatformItem) { return new DrawablePlatformItem(originalTrItem); } + if (originalTrItem is SidingItem) { return new DrawableSidingItem(originalTrItem); } + if (originalTrItem is SpeedPostItem) { return new DrawableSpeedPostItem(originalTrItem); } + if (originalTrItem is HazzardItem) { return new DrawableHazardItem(originalTrItem); } + if (originalTrItem is PickupItem) { return new DrawablePickupItem(originalTrItem); } + if (originalTrItem is LevelCrItem) { return new DrawableLevelCrItem(originalTrItem); } + if (originalTrItem is SoundRegionItem){ return new DrawableSoundRegionItem(originalTrItem); } + if (originalTrItem is RoadLevelCrItem){ return new DrawableRoadLevelCrItem(originalTrItem); } if (originalTrItem is CarSpawnerItem) { return new DrawableCarSpawnerItem(originalTrItem); } - if (originalTrItem is CrossoverItem) { return new DrawableCrossoverItem(originalTrItem); } + if (originalTrItem is CrossoverItem) { return new DrawableCrossoverItem(originalTrItem); } return new DrawableEmptyItem(originalTrItem); } @@ -130,9 +134,9 @@ public void FindAngle(TrackSectionsFile tsectionDat, TrackDB trackDB, TrackNode this.angle = signalTraveller.RotY; // Shift signal a little bit to be able to distinguish backfacing from normal facing - Microsoft.Xna.Framework.Vector3 shiftedLocation = this.WorldLocation.Location + - 0.0001f * new Microsoft.Xna.Framework.Vector3((float)Math.Cos(this.angle), 0f, -(float)Math.Sin(this.angle)); - this.WorldLocation = new WorldLocation(this.WorldLocation.TileX, this.WorldLocation.TileZ, shiftedLocation); + Microsoft.Xna.Framework.Vector3 shiftedLocation = this.WorldLocation.Location + + 0.0001f * new Microsoft.Xna.Framework.Vector3((float) Math.Cos(this.angle), 0f, -(float) Math.Sin(this.angle)); + this.WorldLocation = new WorldLocation(this.WorldLocation.TileX, this.WorldLocation.TileZ, shiftedLocation ); } catch { } } @@ -162,7 +166,7 @@ public void DetermineIfNormal(SignalConfigurationFile sigcfgFile) /// Do we need to draw anyway, independent of settings? internal override bool Draw(DrawArea drawArea, ColorScheme colors, bool drawAlways) { - if (drawAlways + if ( drawAlways || Properties.Settings.Default.showAllSignals || (Properties.Settings.Default.showSignals && isNormal) ) @@ -333,13 +337,13 @@ internal override bool Draw(DrawArea drawArea, ColorScheme colors, bool drawAlwa drawArea.DrawExpandingString(this.WorldLocation, this.itemName); returnValue = true; } - if (Properties.Settings.Default.showStationNames || - (drawAlways && !Properties.Settings.Default.showPlatformNames)) + if (Properties.Settings.Default.showStationNames || + (drawAlways && !Properties.Settings.Default.showPlatformNames) ) { // if drawAlways and no station nor platform name requested, then also show station drawArea.DrawExpandingString(this.WorldLocation, this.stationName); returnValue = true; } - + return returnValue; } } diff --git a/Source/Contrib/TrackViewer/Drawing/Labels/DrawLabels.cs b/Source/Contrib/TrackViewer/Drawing/Labels/DrawLabels.cs index 4d15a2b125..4e421ca43e 100644 --- a/Source/Contrib/TrackViewer/Drawing/Labels/DrawLabels.cs +++ b/Source/Contrib/TrackViewer/Drawing/Labels/DrawLabels.cs @@ -14,11 +14,15 @@ // // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System.IO; +using System; +using System.Collections.Generic; using System.Linq; +using System.Text; +using System.IO; using System.Windows; using System.Windows.Controls; using Newtonsoft.Json; + using ORTS.Common; namespace ORTS.TrackViewer.Drawing.Labels @@ -84,7 +88,7 @@ public void Draw(DrawArea drawArea) DrawLabel(label); } float distanceSquared = WorldLocation.GetDistanceSquared2D(label.WorldLocation, drawArea.MouseLocation); - if (distanceSquared < closestDistanceSquared) + if (distanceSquared < closestDistanceSquared ) { closestDistanceSquared = distanceSquared; closestToMouseLabel = label; @@ -103,7 +107,7 @@ public void Draw(DrawArea drawArea) /// The lable to draw private void DrawLabel(StorableLabel label) { - drawArea.DrawExpandingString(label.WorldLocation, label.LabelText, 0, -fontHeight / 2); + drawArea.DrawExpandingString(label.WorldLocation, label.LabelText, 0, -fontHeight/2); } #endregion @@ -116,7 +120,7 @@ private void DrawLabel(StorableLabel label) /// Current Y-location of the mouse to determine popu location internal void AddLabel(int mouseX, int mouseY) { - var labelInputPopup = new EditLabel(" /// Either the filename or empty when cancelled by the user - private string GetSaveFileName() - { + private string GetSaveFileName() { var dialog = new Microsoft.Win32.SaveFileDialog { OverwritePrompt = true, @@ -237,8 +240,7 @@ internal void LoadLabels() /// Ask the user for a filename to be used for loading /// /// Either the filename or empty when cancelled by the user - private string GetLoadFileName() - { + private string GetLoadFileName() { var dialog = new Microsoft.Win32.OpenFileDialog { FileName = "labels.json", @@ -264,7 +266,7 @@ private void LoadJson(string fileName) MessageBox.Show(TrackViewer.catalog.GetString("The .json file could not be read properly.")); return; } - + bool itemsWereRemoved = labelsNew.Sanitize(); int itemsLeft = labelsNew.Labels.Count(); string message = string.Empty; @@ -318,8 +320,8 @@ internal void OnLeftMouseMoved() //The new location is then 'original' + 'current' - 'start'. draggingStartLocation.NormalizeTo(drawArea.MouseLocation.TileX, drawArea.MouseLocation.TileZ); WorldLocation shiftedLocation = new WorldLocation( - draggingLabelToReplace.WorldLocation.TileX + drawArea.MouseLocation.TileX - draggingStartLocation.TileX, - draggingLabelToReplace.WorldLocation.TileZ + drawArea.MouseLocation.TileZ - draggingStartLocation.TileZ, + draggingLabelToReplace.WorldLocation.TileX + drawArea.MouseLocation.TileX - draggingStartLocation.TileX, + draggingLabelToReplace.WorldLocation.TileZ + drawArea.MouseLocation.TileZ - draggingStartLocation.TileZ, draggingLabelToReplace.WorldLocation.Location.X + drawArea.MouseLocation.Location.X - draggingStartLocation.Location.X, 0, draggingLabelToReplace.WorldLocation.Location.Z + drawArea.MouseLocation.Location.Z - draggingStartLocation.Location.Z diff --git a/Source/Contrib/TrackViewer/Drawing/Labels/EditLabel.xaml.cs b/Source/Contrib/TrackViewer/Drawing/Labels/EditLabel.xaml.cs index 1e0722ca2c..7ddf53bcc2 100644 --- a/Source/Contrib/TrackViewer/Drawing/Labels/EditLabel.xaml.cs +++ b/Source/Contrib/TrackViewer/Drawing/Labels/EditLabel.xaml.cs @@ -15,6 +15,9 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Windows; using System.Windows.Input; @@ -67,7 +70,7 @@ private void ButtonCancel_Click(object sender, RoutedEventArgs e) { this.Close(); } - + /// /// Delete the label /// @@ -78,7 +81,7 @@ private void ButtonDelete_Click(object sender, RoutedEventArgs e) this.Close(); callback(null); } - + /// /// Handle an enter/return press on the textbox. If return is pressed, just do the same as the save button. /// diff --git a/Source/Contrib/TrackViewer/Drawing/Labels/StorableLabels.cs b/Source/Contrib/TrackViewer/Drawing/Labels/StorableLabels.cs index 4bebf8a6c2..ba2e75828c 100644 --- a/Source/Contrib/TrackViewer/Drawing/Labels/StorableLabels.cs +++ b/Source/Contrib/TrackViewer/Drawing/Labels/StorableLabels.cs @@ -16,6 +16,8 @@ // along with Open Rails. If not, see . using System; using System.Collections.Generic; +using System.Linq; +using System.Text; using Newtonsoft.Json; using ORTS.Common; @@ -61,8 +63,7 @@ public void Add(WorldLocation location, string text) internal void Replace(StorableLabel oldLabel, StorableLabel newLabel) { int index = _labels.IndexOf(oldLabel); - if (index != -1) - { + if (index != -1) { _labels[index] = newLabel; } } @@ -110,7 +111,7 @@ public struct StorableLabel /// /// The location in MSTS coordinates of the label /// The text of the label - public StorableLabel(WorldLocation location, string text) + public StorableLabel(WorldLocation location, string text ) { LabelText = text; WorldLocation = location; diff --git a/Source/Contrib/TrackViewer/Drawing/ShadowDrawArea.cs b/Source/Contrib/TrackViewer/Drawing/ShadowDrawArea.cs index 07a9dcf417..92b6acb883 100644 --- a/Source/Contrib/TrackViewer/Drawing/ShadowDrawArea.cs +++ b/Source/Contrib/TrackViewer/Drawing/ShadowDrawArea.cs @@ -16,6 +16,10 @@ // along with Open Rails. If not, see . using System; +using System.Diagnostics; +using System.Collections.Generic; +using System.Linq; +using System.Text; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -64,7 +68,7 @@ namespace ORTS.TrackViewer.Drawing /// Also in the Game.Draw, but before spriteBatch.begin: yourShadowDrawArea.DrawShadowTextures(DrawSomething, background color); /// /// - public class ShadowDrawArea : DrawArea, IDisposable + public class ShadowDrawArea: DrawArea, IDisposable { #region private Fields int blockW; // Width of single block in pixels @@ -76,7 +80,7 @@ public class ShadowDrawArea : DrawArea, IDisposable double shadowOffsetZ; // lower-left location (in real world coordinates) of the combined texture // fields related to when and what we are re-drawing - bool needToRedraw = true; + bool needToRedraw = true; bool needToRedrawLater = true; bool[] needToDrawRectangle; // Array of booleans describing which of the rectangles still need to be redrawn int nextRectangleToDraw; // integer from 0 to Nblocks-1, describing which of the subblocks will be drawn @@ -109,8 +113,8 @@ public class ShadowDrawArea : DrawArea, IDisposable /// /// Constructor. Just calling the base constructor /// - public ShadowDrawArea(DrawScaleRuler drawScaleRuler) - : base(drawScaleRuler) + public ShadowDrawArea(DrawScaleRuler drawScaleRuler) + :base(drawScaleRuler) { shadowDrawArea = new ShadowDrawArea(); } @@ -121,7 +125,7 @@ public ShadowDrawArea(DrawScaleRuler drawScaleRuler) /// Therefore, it is a shadowDrawArea, but we will not use any of its additional functionality. /// Hence also private /// - ShadowDrawArea() : base(null) { } + ShadowDrawArea(): base(null){} /// /// Sets the screen size on which we can draw (in pixels). @@ -170,7 +174,7 @@ public override void SetScreenSize(int areaOffsetX, int areaOffsetY, int areaWid private void SetRendertargetSizes() { if (graphicsDevice == null) { return; } - + blockW = (AreaW * Nsampling + Ninner - 1) / Ninner; // in case areaW*Nsampling is not a multiple of Ninner this blockH = (AreaH * Nsampling + Ninner - 1) / Ninner; // makes sure block size at least covers all of area, to prevent constant redrawing @@ -198,7 +202,7 @@ private void SetRendertargetSizes() shadowMapsSingle[i].Dispose(); } shadowRenderTargetSingle[i] = new RenderTarget2D(graphicsDevice, 1 * blockW, 1 * blockH, false, SurfaceFormat.Color, - DepthFormat.Depth16, 0, RenderTargetUsage.PreserveContents); + DepthFormat.Depth16, 0, RenderTargetUsage.PreserveContents); shadowMapsSingle[i] = new Texture2D(graphicsDevice, 1, 1); } } @@ -223,7 +227,7 @@ void FillXYorder() orderIndex++; } - for (int iRing = Nrings - 1; iRing >= 0; iRing--) // work from the inside out. + for (int iRing = Nrings-1; iRing >= 0; iRing--) // work from the inside out. { int Nside = Nouter - 1 - 2 * iRing; // The amount of blocks - 1 in a side, for the given ring. Alwasy Nouter - 1 for last ring! //left side @@ -339,19 +343,19 @@ private void DetermineRedrawingNeeds() double ShiftLimitInBlocks = (Nborder > 1) ? Nborder - 1 : 0.5; double shiftLimitX = ShiftLimitInBlocks * blockW / shadowScale; double shiftLimitZ = ShiftLimitInBlocks * blockH / shadowScale; - if (OffsetX < shadowOffsetX + shiftLimitX) { ShiftBlocks(ShiftDirection.Right); } - if (OffsetZ < shadowOffsetZ + shiftLimitZ) { ShiftBlocks(ShiftDirection.Up); } + if (OffsetX < shadowOffsetX + shiftLimitX) { ShiftBlocks(ShiftDirection.Right); } + if (OffsetZ < shadowOffsetZ + shiftLimitZ) { ShiftBlocks(ShiftDirection.Up); } if (OffsetX + insetRealW > shadowOffsetX + shadowRealW - shiftLimitX) { ShiftBlocks(ShiftDirection.Left); } if (OffsetZ + insetRealH > shadowOffsetZ + shadowRealH - shiftLimitZ) { ShiftBlocks(ShiftDirection.Down); } - - //double ringW = Nborder * blockW / shadowScale; - //double ringH = Nborder * blockH / shadowScale; - ////we will redraw later in case we are close, we do not want to do this too much though - //if (offsetX < shadowOffsetX + 0.2 * ringW) { needToRedrawLater = true; } - //if (offsetZ < shadowOffsetZ + 0.2 * ringH) { needToRedrawLater = true; } - //if (offsetX + insetRealW > shadowOffsetX + shadowRealW - 0.2 * ringW) { needToRedrawLater = true; } - //if (offsetZ + insetRealH > shadowOffsetZ + shadowRealH - 0.2 * ringW) { needToRedrawLater = true; } - + + //double ringW = Nborder * blockW / shadowScale; + //double ringH = Nborder * blockH / shadowScale; + ////we will redraw later in case we are close, we do not want to do this too much though + //if (offsetX < shadowOffsetX + 0.2 * ringW) { needToRedrawLater = true; } + //if (offsetZ < shadowOffsetZ + 0.2 * ringH) { needToRedrawLater = true; } + //if (offsetX + insetRealW > shadowOffsetX + shadowRealW - 0.2 * ringW) { needToRedrawLater = true; } + //if (offsetZ + insetRealH > shadowOffsetZ + shadowRealH - 0.2 * ringW) { needToRedrawLater = true; } + } /// @@ -373,22 +377,20 @@ private void AddAllToRedrawList() private void SetNextRectangleToDraw(bool recheck) { if (recheck) { nextRectangleToDraw = -1; } - do - { - nextRectangleToDraw++; + do { + nextRectangleToDraw ++; } while (nextRectangleToDraw < Nsubblocks && !needToDrawRectangle[nextRectangleToDraw]); } - enum ShiftDirection { Left, Right, Up, Down }; + enum ShiftDirection {Left, Right, Up, Down}; /// /// Instead of redrawing a lot of subblocks, we will just move most of the blocks by one block to any direction /// and only mark a single column or row for redrawing. /// /// The direction to shift - private void ShiftBlocks(ShiftDirection direction) - { - + private void ShiftBlocks(ShiftDirection direction) { + switch (direction) { case ShiftDirection.Right: @@ -427,7 +429,7 @@ private void ShiftBlocks(ShiftDirection direction) /// The real world location is so far left, that we can discard the right-most column of blocks and add a new column on the left /// private void ShiftSubBlocksRight() - { + { for (int row = 0; row < Nouter; row++) { RenderTarget2D tempTarget = shadowRenderTargetSingle[orderFromLocation[Nouter - 1][row]]; @@ -439,7 +441,7 @@ private void ShiftSubBlocksRight() shadowRenderTargetSingle[orderFromLocation[0][row]] = tempTarget; needToDrawRectangle[orderFromLocation[0][row]] = true; } - } + } /// /// The real world location is so far right, that we can discard the right-most column of blocks and add a new column on the right @@ -544,11 +546,10 @@ private void RenderASingleBlockTexture(Color backgroundColor, DrawingDelegate dr needToDrawRectangle[nextRectangleToDraw] = false; } - catch - { + catch { graphicsDevice.SetRenderTarget(null); // return control to main render target } - graphicsDevice.SetRenderTarget(null); + graphicsDevice.SetRenderTarget(null); } /// @@ -568,14 +569,13 @@ private void RenderCombinedTexture(Color backgroundColor) for (int i = 0; i < Nsubblocks; i++) { Vector2 position = new Vector2(xOrder[i] * blockW, (Nouter - 1 - zOrder[i]) * blockH); - spriteBatch.Draw(shadowMapsSingle[i], position, null, Color.White, 0, Vector2.Zero, Vector2.One, SpriteEffects.None, 0); + spriteBatch.Draw(shadowMapsSingle[i], position, null, Color.White, 0, Vector2.Zero, Vector2.One, SpriteEffects.None, 0); } spriteBatch.End(); graphicsDevice.SetRenderTarget(null); shadowMapCombined = shadowRenderTargetCombined; } - catch - { + catch { graphicsDevice.SetRenderTarget(null); // return control to main render target } } @@ -607,12 +607,12 @@ public void DrawShadowedTextures() float scaleRatio = (float)(Scale / shadowScale); Vector2 scaleAsVector = new Vector2(scaleRatio); Microsoft.Xna.Framework.Rectangle? sourceRectangle = new Microsoft.Xna.Framework.Rectangle( - Convert.ToInt32(shadowScale * (OffsetX - shadowOffsetX)), + Convert.ToInt32( shadowScale * ( OffsetX - shadowOffsetX)), Convert.ToInt32(blockH * Nouter - shadowScale * (AreaH / Scale + OffsetZ - shadowOffsetZ)), Convert.ToInt32(AreaW * shadowScale / Scale), Convert.ToInt32(AreaH * shadowScale / Scale)); - + Vector2 position = new Vector2(AreaOffsetX, AreaOffsetY); Vector2 origin = Vector2.Zero; diff --git a/Source/Contrib/TrackViewer/Editing/AutoConnectTools.cs b/Source/Contrib/TrackViewer/Editing/AutoConnectTools.cs index ab087d6224..8bb059923f 100644 --- a/Source/Contrib/TrackViewer/Editing/AutoConnectTools.cs +++ b/Source/Contrib/TrackViewer/Editing/AutoConnectTools.cs @@ -18,10 +18,11 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; +using System.Text; namespace ORTS.TrackViewer.Editing { - + /// /// Class to define common methods related to autoconnecting a path. Autoconnecting means really searching /// for a possible connection between two nodes, and creating the path if the user wants to. @@ -76,7 +77,7 @@ public void AddDisallowedJunction(int junctionIndex) { DisAllowedJunctionIndexes.Add(junctionIndex); } - + /// /// Try to find a connection between two given nodes. Depth-first search via main track at junctions. /// Also reversing the start or reconnectNode is tried, in case one of these nodes has a non-defined orientation @@ -105,7 +106,7 @@ public bool FindConnection(TrainpathNode fromNode, TrainpathNode toNode, int? fi // We try to find a connection between two non-broken nodes. // We store the connection as a stack of linking tvns (track-node-vector-indexes) // The connection will only contain junctions (apart from maybe start and end=reconnect nodes) - + autoConnectFromNode = new ConnectableNode(fromNode, true, true); autoConnectToNodeOptions = new ReconnectNodeOptions(true); autoConnectToNodeOptions.AddNode(toNode, false); // only one option here @@ -202,9 +203,9 @@ public void CreateFoundConnection(ModificationTools modificationTools, bool isMa autoConnectFromNode = swap; } - + TrainpathNode currentNode = autoConnectFromNode.OriginalNode; - + if ((currentNode is TrainpathVectorNode) && !sameTrackConnect) { // in case the first node is a vector node (and not a direct connect), go to its junction first currentNode = modificationTools.AddAdditionalNode(currentNode, isMainPath); @@ -322,7 +323,7 @@ private bool FindConnectionSameTrack(int? firstTvnIndex) bool foundConnection = autoConnectToNodeOptions.FoundConnectionSameTrack(autoConnectFromNode, firstTvnIndex); return foundConnection; } - + /// /// Try to find a connection. Depth-first search via main track at junctions. Stores the found connection in a list of /// TrackNodeVectorIndexes (tvn's). No reversing of the nodes will be allowed. @@ -335,10 +336,9 @@ private bool FindConnectionThisOrientation(int? firstTvnIndex) { linkingTvns.Clear(); sameTrackConnect = false; - + int firstJunctionIndex = autoConnectFromNode.ConnectingJunctionIndex; - if (DisAllowedJunctionIndexes.Contains(firstJunctionIndex)) - { + if (DisAllowedJunctionIndexes.Contains(firstJunctionIndex)) { return false; } @@ -424,7 +424,7 @@ private bool TryToFindConnectionVia(int currentJunctionIndex, int nextTvn) return succeeded; } - + /// /// Can a node in a path be reversed without breaking something? /// @@ -461,7 +461,7 @@ private static bool CanReverse(TrainpathNode node) return incomingAllowsReversal && outgoingAllowsReversal; } - + #endregion #region debug methods @@ -481,10 +481,10 @@ public string LinkingTvnsAsString() /// This allows the Start node to be changed (e.g. regarding exact location on track, or perhaps moved to another /// track), and still be able to find reconnections. /// - public class ContinuousAutoConnecting : AutoConnectTools + public class ContinuousAutoConnecting:AutoConnectTools { /// The Start/From node needs to be reversed to be able to make the connection - public bool NeedsReverse { get { return this.FromNodeNeedsReverse; } } + public bool NeedsReverse { get { return this.FromNodeNeedsReverse;} } /// The connection is made forward along the path from the Start/From node private bool isForward; @@ -505,7 +505,7 @@ public ContinuousAutoConnecting(TrainpathNode startNode, bool isConnectingForwar { isForward = isConnectingForward; List reconnectNodes = this.FindReconnectNodeCandidates(startNode, isConnectingForward, true); - + autoConnectToNodeOptions = new ReconnectNodeOptions(isConnectingForward); int count = 0; foreach (TrainpathNode node in reconnectNodes) diff --git a/Source/Contrib/TrackViewer/Editing/AutoFixAllPaths.xaml.cs b/Source/Contrib/TrackViewer/Editing/AutoFixAllPaths.xaml.cs index 595854f23c..2fdb05c383 100644 --- a/Source/Contrib/TrackViewer/Editing/AutoFixAllPaths.xaml.cs +++ b/Source/Contrib/TrackViewer/Editing/AutoFixAllPaths.xaml.cs @@ -16,12 +16,14 @@ // along with Open Rails. If not, see . using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; using System.Windows; using System.Windows.Controls; -using ORTS.Menu; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Text; + using ORTS.TrackViewer.Drawing; +using ORTS.Menu; namespace ORTS.TrackViewer.Editing { @@ -34,12 +36,12 @@ public partial class AutoFixAllPaths : Window DrawTrackDB drawTrackDB; Dictionary> pathsThatAre = new Dictionary> - { - ["UnmodifiedFine"] = new List(), - ["UnmodifiedBroken"] = new List(), - ["ModifiedFine"] = new List(), - ["ModifiedBroken"] = new List(), - }; + { + ["UnmodifiedFine"] = new List(), + ["UnmodifiedBroken"] = new List(), + ["ModifiedFine"] = new List(), + ["ModifiedBroken"] = new List(), + }; List modifiedPaths; /// @@ -58,7 +60,7 @@ public AutoFixAllPaths(RouteData routeData, DrawTrackDB drawTrackDB) /// /// The list of paths that are availabel and that need to be checked and possibly fixed /// Callback that will be called showing the current processing that is being done - public void FixallAndShowResults(Collection Paths, Action callback) + public void FixallAndShowResults(Collection Paths, Action callback ) { _Fixall(Paths, callback); _ShowResults(); @@ -186,7 +188,7 @@ private void SaveOverview_Click(object sender, RoutedEventArgs e) if (String.IsNullOrEmpty(fullFilePath)) return; System.IO.StreamWriter file = new System.IO.StreamWriter(fullFilePath, false, System.Text.Encoding.Unicode); - string[] statusses = { "ModifiedBroken", "ModifiedFine", "UnmodifiedBroken", "UnmodifiedFine" }; + string[] statusses = { "ModifiedBroken", "ModifiedFine", "UnmodifiedBroken", "UnmodifiedFine"}; foreach (string status in statusses) { file.WriteLine(""); diff --git a/Source/Contrib/TrackViewer/Editing/Charts/DrawPathChart.cs b/Source/Contrib/TrackViewer/Editing/Charts/DrawPathChart.cs index 5a67f1183c..98cba40ac2 100644 --- a/Source/Contrib/TrackViewer/Editing/Charts/DrawPathChart.cs +++ b/Source/Contrib/TrackViewer/Editing/Charts/DrawPathChart.cs @@ -17,14 +17,19 @@ // using System; using System.Collections.Generic; -using System.IO; using System.Linq; +using System.Text; +using System.IO; + using System.Windows; using System.Windows.Controls; using System.Windows.Media; using System.Windows.Shapes; + using Newtonsoft.Json; + using ORTS.Common; + using ORTS.TrackViewer.Drawing; @@ -38,7 +43,7 @@ public class DrawPathChart { /// Does the chart window have focus (actived) or not public bool IsActived { get { return this.chartWindow.IsActivated; } } - + // Injection dependencies private PathEditor pathEditor; private ORTS.TrackViewer.Drawing.RouteData routeData; @@ -158,14 +163,14 @@ private void OnPathChanged() chartWindow.Draw(); chartWindow.SetTitle(pathEditor.CurrentTrainPath.PathName); } - + /// /// Zoom the chart window /// /// The number of zoom steps (negative for zooming in) public void Zoom(int zoomSteps) { - this.chartWindow.ZoomChange(Math.Exp(-0.1 * zoomSteps)); + this.chartWindow.ZoomChange(Math.Exp(-0.1*zoomSteps)); } /// @@ -412,7 +417,7 @@ protected static void DrawText(Canvas drawingCanvas, double leftX, double center textBlock.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity)); // find out how tall it wants to be Canvas.SetLeft(textBlock, leftX); Canvas.SetTop(textBlock, centerY - textBlock.DesiredSize.Height / 2); // So no it should be centered vertically - + drawingCanvas.Children.Add(textBlock); } @@ -454,8 +459,8 @@ protected static void DrawTextVertical(Canvas drawingCanvas, double centerX, dou Foreground = new SolidColorBrush(color) }; textBlock.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity)); // find out how tall it wants to be - Canvas.SetLeft(textBlock, centerX - textBlock.DesiredSize.Height / 2); - Canvas.SetTop(textBlock, bottomY); + Canvas.SetLeft(textBlock, centerX - textBlock.DesiredSize.Height/2); + Canvas.SetTop(textBlock, bottomY); textBlock.RenderTransform = new RotateTransform(-90); drawingCanvas.Children.Add(textBlock); @@ -477,8 +482,8 @@ protected static void DrawImage(Canvas drawingCanvas, double centerX, double cen Height = imageSize, Fill = new ImageBrush(BitmapImageManager.Instance.GetImage(imageName)) }; - Canvas.SetLeft(rect, centerX - imageSize / 2); - Canvas.SetTop(rect, centerY - imageSize / 2); + Canvas.SetLeft(rect, centerX-imageSize/2); + Canvas.SetTop(rect, centerY-imageSize/2); drawingCanvas.Children.Add(rect); } #endregion @@ -496,7 +501,7 @@ protected void DetermineScaling() /// Determine the scaling needed: store the minimum and maximum of the x and y values, both for the whole set of data as for the set of data visible after zooming /// /// The method to get a value (normally a field) of a PathChartPoint, that is then used for drawing - protected void DetermineScaling(Func getField) + protected void DetermineScaling(Func getField) { this.minX = this.pathData.PointWithMinima.DistanceAlongPath; this.maxX = this.pathData.PointWithMaxima.DistanceAlongPath; @@ -654,7 +659,7 @@ private void DrawHorizontalGridLines(Canvas drawingCanvas, Canvas legendCanvas) /// The height for this label private void DrawHeightLabel(Canvas drawingCanvas, decimal height) { - string textToDraw = String.Format("{0}{1}", height / niceScale.Scale, niceScale.Unit); + string textToDraw = String.Format("{0}{1}", height/niceScale.Scale, niceScale.Unit); DrawText(drawingCanvas, 5, ScaledY((double)height), textToDraw, Colors.Black); } @@ -679,7 +684,7 @@ private void PrintGradesAndStations(Canvas drawingCanvas) if (lastTextToDraw != newTextToDraw) { - DrawTextVertical(drawingCanvas, (lastX + newX) / 2, ScaledY(this.minY), lastTextToDraw, Colors.Black); + DrawTextVertical(drawingCanvas, (lastX+newX)/2, ScaledY(this.minY), lastTextToDraw, Colors.Black); lastX = newX; lastTextToDraw = newTextToDraw; } @@ -694,11 +699,11 @@ private void PrintGradesAndStations(Canvas drawingCanvas) private void ShowSpecialNodes(Canvas drawingCanvas) { - foreach (KeyValuePair item in this.pathData.DistanceAlongPath) + foreach (KeyValuePair item in this.pathData.DistanceAlongPath) { if (item.Key.NodeType == TrainpathNodeType.Reverse) { - + DrawImage(drawingCanvas, ScaledX(item.Value), ScaledY(item.Key.Location.Location.Y), "pathReverse"); } if (item.Key.NodeType == TrainpathNodeType.Stop) @@ -722,7 +727,7 @@ private void ShowSpecialNodes(Canvas drawingCanvas) /// The chart that shows the grade of the path (in percentages) /// Also prints the text of the x-location /// - public class GradeChart : SubChart + public class GradeChart: SubChart { /// /// Constructor @@ -739,7 +744,7 @@ protected override void DrawSubChart(Canvas drawingCanvas, Canvas legendCanvas) { DetermineScaling(p => p.GradePercent); CleanScaling(); - + DrawHorizontalGridLines(drawingCanvas, legendCanvas); DrawDataPolyLine(drawingCanvas, p => p.GradePercent, true); @@ -798,7 +803,7 @@ private void CleanScaling() maxY = Math.Ceiling(maxY); } } - } + } #endregion #region CurvatureChart @@ -829,14 +834,14 @@ protected override void DrawSubChart(Canvas drawingCanvas, Canvas legendCanvas) private void DrawDegreesTurned(Canvas drawingCanvas) { - double pixelsPerKm = 1000 * this.canvasWidth / (this.zoomedMaxX - this.zoomedMinX); + double pixelsPerKm = 1000*this.canvasWidth / (this.zoomedMaxX - this.zoomedMinX); if (pixelsPerKm < 100) { // do not draw if we do not have enoug pixels return; } bool InCurve = false; - double accumulatedCurveRad = 0; + double accumulatedCurveRad=0; double distanceAlongPathAtStart = 0; char degree = (char)176; foreach (PathChartPoint sourcePoint in this.pathData.PathChartPoints) @@ -850,7 +855,7 @@ private void DrawDegreesTurned(Canvas drawingCanvas) if (InCurve) { // end of a curve - string textToDraw = String.Format("{0:F0}{1}", 180 * accumulatedCurveRad / Math.PI, degree); + string textToDraw = String.Format("{0:F0}{1}", 180*accumulatedCurveRad/Math.PI, degree); DrawTextCentered(drawingCanvas, ScaledX((sourcePoint.DistanceAlongPath + distanceAlongPathAtStart) / 2), 30, textToDraw, Colors.Red); } InCurve = false; @@ -877,7 +882,7 @@ private void DrawDegreesTurned(Canvas drawingCanvas) /// The single point for which to determine the deviation from 0 private float CurvatureDeviation(PathChartPoint pathPoint) { - float deviation = 10 * Math.Sign(pathPoint.Curvature); + float deviation = 10 * Math.Sign(pathPoint.Curvature); //deviation = pathPoint.Curvature; return deviation; } @@ -932,7 +937,7 @@ private void PrintHorizontalScaleLabels(Canvas drawingCanvas) DrawText(drawingCanvas, ScaledX((double)niceValue), 5, textToDraw, Colors.Black); } } - + } #endregion @@ -1087,7 +1092,7 @@ public class NiceScaling /// The string to use as unit /// optional: The minimum number of nice ticks /// When set, the nice values will never exceed the given ranges - public NiceScaling(double valueMin, double valueMax, double scale, string unit, int minNumberOfTicks = 4, bool strict = false) + public NiceScaling(double valueMin, double valueMax, double scale, string unit, int minNumberOfTicks=4, bool strict=false) { if (valueMin == valueMax) { @@ -1112,9 +1117,9 @@ public NiceScaling(double valueMin, double valueMax, double scale, string unit, this.Unit = unit; - double valueScaledMin = valueMin / scale; - double valueScaledMax = valueMax / scale; - double subDivisionMax = (valueScaledMax - valueScaledMin) / minNumberOfTicks; + double valueScaledMin = valueMin/scale; + double valueScaledMax = valueMax/scale; + double subDivisionMax = (valueScaledMax - valueScaledMin)/minNumberOfTicks; double sub10log = Math.Floor(Math.Log10(subDivisionMax)); double power10 = Math.Pow(10.0, sub10log); @@ -1132,11 +1137,10 @@ public NiceScaling(double valueMin, double valueMax, double scale, string unit, { valueScaledStart += valueScaledStep; } - + List values = new List(); decimal valueScaled = valueScaledStart; - while (valueScaled < (decimal)valueScaledMax) - { + while (valueScaled < (decimal)valueScaledMax) { values.Add(valueScaled * this.Scale); valueScaled += valueScaledStep; } @@ -1144,7 +1148,7 @@ public NiceScaling(double valueMin, double valueMax, double scale, string unit, NiceValues = values.ToArray(); ValueMin = valueScaledStart * this.Scale; - ValueMax = valueScaled * this.Scale; + ValueMax = valueScaled * this.Scale; } } #endregion diff --git a/Source/Contrib/TrackViewer/Editing/Charts/PathChartData.cs b/Source/Contrib/TrackViewer/Editing/Charts/PathChartData.cs index 8aae77cfa7..de1734b9c5 100644 --- a/Source/Contrib/TrackViewer/Editing/Charts/PathChartData.cs +++ b/Source/Contrib/TrackViewer/Editing/Charts/PathChartData.cs @@ -18,10 +18,12 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Text; using Newtonsoft.Json; + +using ORTS.Common; using Orts.Formats.Msts; using Orts.Simulation; -using ORTS.Common; namespace ORTS.TrackViewer.Editing.Charts { @@ -47,7 +49,7 @@ public class PathChartData public IDictionary DistanceAlongPath; /// Is there actually a path loaded with one or more points [JsonIgnore] - public bool HasPath { get { return PathChartPoints != null && PathChartPoints.Count() > 0; } } + public bool HasPath { get { return PathChartPoints != null && PathChartPoints.Count() > 0;} } [JsonProperty("PathName")] private string PathName { get; set; } @@ -114,7 +116,7 @@ public void Update(Trainpath trainpath) lastDistance += relativePoint.DistanceAlongNextSection; AddPoint(localPathChartPoints, absolutePoint); } - + node = node.NextMainNode; } @@ -162,8 +164,8 @@ private void AddPoint(List localPathChartPoints, PathChartPoint /// private void StoreAllMinMax() { - this.PointWithMaxima = new PathChartPoint(new PathChartPoint(this.MaxHeightM, this.MaxCurvature, this.MaxGradePercent / 100, 0), this.MaxDistanceAlongPath); - this.PointWithMinima = new PathChartPoint(new PathChartPoint(this.MinHeightM, this.MinCurvature, this.MinGradePercent / 100, 0), this.MinDistanceAlongPath); + this.PointWithMaxima = new PathChartPoint(new PathChartPoint(this.MaxHeightM, this.MaxCurvature, this.MaxGradePercent/100, 0), this.MaxDistanceAlongPath); + this.PointWithMinima = new PathChartPoint(new PathChartPoint(this.MinHeightM, this.MinCurvature, this.MinGradePercent/100, 0), this.MinDistanceAlongPath); } #endregion @@ -214,7 +216,7 @@ private IEnumerable DetermineChartPoints(TrainpathNode thisNode) float sectionOffsetStop; DetermineSectionDetails(thisNode, nextNode, tn, out isForward, out tvsiStart, out sectionOffsetStart); - DetermineSectionDetails(nextNode, thisNode, tn, out isReverse, out tvsiStop, out sectionOffsetStop); + DetermineSectionDetails(nextNode, thisNode, tn, out isReverse, out tvsiStop, out sectionOffsetStop); float height; if (isForward) @@ -226,7 +228,7 @@ private IEnumerable DetermineChartPoints(TrainpathNode thisNode) height = vectorNode.TrVectorSections[tvsi].Y; AddPointAndTrackItems(newPoints, vectorNode, trackItemsInTracknode, isForward, height, tvsi, 0, sectionOffsetNext); - sectionOffsetNext = SectionLengthAlongTrack(tn, tvsi - 1); + sectionOffsetNext = SectionLengthAlongTrack(tn, tvsi-1); } //Also works in case this is the only point we are adding @@ -240,7 +242,7 @@ private IEnumerable DetermineChartPoints(TrainpathNode thisNode) for (int tvsi = tvsiStop; tvsi < tvsiStart; tvsi++) { // The height needs to come from the end of the section, so the where the next section starts. And we only know the height at the start. - height = vectorNode.TrVectorSections[tvsi + 1].Y; + height = vectorNode.TrVectorSections[tvsi+1].Y; AddPointAndTrackItems(newPoints, vectorNode, trackItemsInTracknode, isForward, height, tvsi, sectionOffsetNext, SectionLengthAlongTrack(tn, tvsi)); sectionOffsetNext = 0; @@ -351,7 +353,7 @@ private float GetCurvature(TrVectorNode vectorNode, int tvsi, bool isForward) } } } - + return curvature; } @@ -389,7 +391,7 @@ private void DetermineSectionDetails(TrainpathNode startNode, TrainpathNode next sectionOffsetStart = currentNodeAsVector.TrackSectionOffset; } } - + /// /// Determine the length of the section along the track. /// @@ -441,7 +443,7 @@ private bool DetermineIfForward(TrainpathNode currentNode, TrainpathNode nextNod /// private int DetermineTrackVectorSection(TrainpathNode node, int tvn) { // It would be nice if we could separate this into different classes for vector and junction, but this would mean creating three additional classes for only a few methods - TrainpathVectorNode nodeAsVector = node as TrainpathVectorNode; + TrainpathVectorNode nodeAsVector = node as TrainpathVectorNode; if (nodeAsVector != null) { return nodeAsVector.TrackVectorSectionIndex; @@ -449,12 +451,10 @@ private int DetermineTrackVectorSection(TrainpathNode node, int tvn) else { TrainpathJunctionNode currentNodeAsJunction = node as TrainpathJunctionNode; - if (currentNodeAsJunction.JunctionIndex == trackDB.TrackNodes[node.NextMainTvnIndex].JunctionIndexAtStart()) - { + if (currentNodeAsJunction.JunctionIndex == trackDB.TrackNodes[node.NextMainTvnIndex].JunctionIndexAtStart()) { return 0; } - else - { + else{ return trackDB.TrackNodes[node.NextMainTvnIndex].TrVectorNode.TrVectorSections.Count() - 1; } } @@ -499,7 +499,7 @@ public struct PathChartPoint /// The node describing where the location of the point is public PathChartPoint(TrainpathNode node) { - HeightM = node.Location.Location.Y; + HeightM = node.Location.Location.Y; DistanceAlongPath = 0; Curvature = 0; GradePercent = 0; @@ -522,7 +522,7 @@ public PathChartPoint(float height, float curvature, float grade, float distance HeightM = height; DistanceAlongPath = 0; Curvature = curvature; - GradePercent = grade * 100; + GradePercent = grade*100; DistanceAlongNextSection = distanceAlongSection; TrackItemText = itemText; TrackItemType = type; @@ -629,7 +629,7 @@ public IEnumerable GetItemsInTracknode(TrackNode tn) { var travellerAtItem = new Traveller(tsectionDat, trackDB.TrackNodes, tn, trItem.TileX, trItem.TileZ, trItem.X, trItem.Z, Traveller.TravellerDirection.Forward); - + if (travellerAtItem != null) { tracknodeItems.Add(new ChartableTrackItem(trItem, travellerAtItem)); @@ -679,7 +679,7 @@ struct ChartableTrackItem public float TrackVectorSectionOffset; /// The type of item public ChartableTrackItemType ItemType; - + /// /// Constructor /// diff --git a/Source/Contrib/TrackViewer/Editing/Charts/PathChartWindow.xaml.cs b/Source/Contrib/TrackViewer/Editing/Charts/PathChartWindow.xaml.cs index a6ffedc971..45d4ef9116 100644 --- a/Source/Contrib/TrackViewer/Editing/Charts/PathChartWindow.xaml.cs +++ b/Source/Contrib/TrackViewer/Editing/Charts/PathChartWindow.xaml.cs @@ -1,8 +1,16 @@ using System; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Windows; using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; namespace ORTS.TrackViewer.Editing.Charts { @@ -25,7 +33,7 @@ partial class PathChartWindow : Window public PathChartWindow() { InitializeComponent(); - + chartCanvasses = new Dictionary { {"height", HeightCanvas}, {"grade", GradeCanvas}, @@ -68,8 +76,7 @@ public void Draw() { ISubChart subChart; subCharts.TryGetValue(chartName, out subChart); - if (subChart != null) - { + if (subChart != null) { subChart.Draw(zoomRatioStart, zoomRatioStop, chartCanvasses[chartName], legendCanvasses[chartName]); } } @@ -137,7 +144,7 @@ private void OnMouseWheel(object sender, MouseWheelEventArgs e) } private bool mouseIsMoving = false; - private double realXatMouse = 0; + private double realXatMouse=0; private void Window_MouseDown(object sender, MouseButtonEventArgs e) { if (e.LeftButton != MouseButtonState.Pressed) diff --git a/Source/Contrib/TrackViewer/Editing/ConnectableNode.cs b/Source/Contrib/TrackViewer/Editing/ConnectableNode.cs index 56e4942cf0..9156bfa37c 100644 --- a/Source/Contrib/TrackViewer/Editing/ConnectableNode.cs +++ b/Source/Contrib/TrackViewer/Editing/ConnectableNode.cs @@ -14,7 +14,10 @@ // // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; using System.Collections.Generic; +using System.Linq; +using System.Text; namespace ORTS.TrackViewer.Editing { @@ -85,7 +88,7 @@ private void DetermineJunctionForVectorNode() { int tvnIndex = OriginalNodeAsVector.TvnIndex; - if ((IsFrom && IsConnectingForward) || (!IsFrom && !IsConnectingForward)) + if ( (IsFrom && IsConnectingForward) || (!IsFrom && !IsConnectingForward)) { // the first junction node of the reconnect path is after the vector node. this.ConnectingJunctionIndex = OriginalNodeAsVector.GetNextJunctionIndex(tvnIndex); @@ -112,8 +115,7 @@ public void ReverseOrientation() DetermineJunction(); } - public override string ToString() - { + public override string ToString() { return "Connectable " + OriginalNode.ToString(); } } @@ -197,15 +199,14 @@ public bool FoundConnectionSameTrack(ConnectableNode fromNode, int? firstTvnInde } ConnectableNode candidate = connectableNodeOptions[0]; - - if (ExistsConnectionSameTrack(fromNode, candidate, firstTvnIndex)) - { + + if (ExistsConnectionSameTrack(fromNode, candidate, firstTvnIndex)) { ActualReconnectNode = candidate; return true; } return false; - + } /// @@ -243,7 +244,7 @@ private bool ExistsConnectionSameTrack(ConnectableNode fromNode, ConnectableNode { if (fromAsVector.ForwardOriented == fromAsVector.IsEarlierOnTrackThan(toAsVector)) return false; } - + return true; } diff --git a/Source/Contrib/TrackViewer/Editing/DrawEditorAction.cs b/Source/Contrib/TrackViewer/Editing/DrawEditorAction.cs index 8ec21a050f..b5c6ce41a4 100644 --- a/Source/Contrib/TrackViewer/Editing/DrawEditorAction.cs +++ b/Source/Contrib/TrackViewer/Editing/DrawEditorAction.cs @@ -36,7 +36,7 @@ public DrawEditorAction(int xLowerLeft, int yLowerLeft) lowerLeft = new Vector2(xLowerLeft, yLowerLeft); } - + /// /// Draw (print) the values of longitude and latitude /// @@ -44,7 +44,7 @@ public DrawEditorAction(int xLowerLeft, int yLowerLeft) public void Draw(PathEditor editor) { if (editor == null) { return; } - if (!Properties.Settings.Default.showEditorAction) { return; } + if (!Properties.Settings.Default.showEditorAction) { return;} BasicShapes.DrawString(lowerLeft, DrawColors.colorsNormal.Text, editor.CurrentActionDescription); } } diff --git a/Source/Contrib/TrackViewer/Editing/DrawPATfile.cs b/Source/Contrib/TrackViewer/Editing/DrawPATfile.cs index 157c82613e..f7303dc07c 100644 --- a/Source/Contrib/TrackViewer/Editing/DrawPATfile.cs +++ b/Source/Contrib/TrackViewer/Editing/DrawPATfile.cs @@ -15,7 +15,9 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . using System; +using System.Collections.Generic; using System.Linq; +using System.Text; using Orts.Formats.Msts; using ORTS.Common; @@ -43,7 +45,7 @@ public class DrawPATfile /// Number of nodes that will be drawn. Start with a few private int numberToDraw = int.MaxValue / 2; // large, but not close to overflow - + /// Index of the last main node that has been drawn private int currentMainNodeIndex; @@ -58,7 +60,7 @@ public class DrawPATfile /// Constructor /// /// Contains the information (mainly filepath) needed for loading the .pat file - public DrawPATfile(ORTS.Menu.Path path) + public DrawPATfile (ORTS.Menu.Path path) { FileName = path.FilePath.Split('\\').Last(); patFile = new PathFile(path.FilePath); @@ -70,7 +72,7 @@ public DrawPATfile(ORTS.Menu.Path path) /// Area to draw upon public void Draw(DrawArea drawArea) { - + //draw actual path currentMainNodeIndex = 0; // starting point int currentSidingNodeIndex = -1; // we start without siding path @@ -96,11 +98,11 @@ public void Draw(DrawArea drawArea) TrPathNode curMainNode = patFile.TrPathNodes[currentMainNodeIndex]; WorldLocation curMainLoc = GetPdpLocation(patFile.TrackPDPs[(int)curMainNode.fromPDP]); - + // from this main line point to the next siding node. // If there is a next siding node, we also reset the currentSidingNodeIndex // but probably it is not allowed to have siding - int nextSidingNodeIndex = (int)curMainNode.nextSidingNode; + int nextSidingNodeIndex = (int)curMainNode.nextSidingNode; if (nextSidingNodeIndex >= 0) { // draw the start of a siding path @@ -112,7 +114,7 @@ public void Draw(DrawArea drawArea) } // From this main line point to the next - int nextMainNodeIndex = (int)curMainNode.nextMainNode; + int nextMainNodeIndex = (int)curMainNode.nextMainNode; if (nextMainNodeIndex >= 0) { TrPathNode nextNode = patFile.TrPathNodes[nextMainNodeIndex]; @@ -122,7 +124,7 @@ public void Draw(DrawArea drawArea) currentMainNodeIndex = nextMainNodeIndex; } } - + } /// @@ -140,7 +142,7 @@ private static WorldLocation GetPdpLocation(TrackPDP pdp) /// public void ExtendPath() { - int maxNumber = patFile.TrPathNodes.Count - 1; + int maxNumber = patFile.TrPathNodes.Count-1; if (++numberToDraw > maxNumber) numberToDraw = maxNumber; } diff --git a/Source/Contrib/TrackViewer/Editing/DrawPath.cs b/Source/Contrib/TrackViewer/Editing/DrawPath.cs index dd7ccd218f..06d3954e73 100644 --- a/Source/Contrib/TrackViewer/Editing/DrawPath.cs +++ b/Source/Contrib/TrackViewer/Editing/DrawPath.cs @@ -15,10 +15,13 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . using System; -using System.Collections.Generic; using System.Collections.ObjectModel; +using System.Collections.Generic; using System.Linq; +using System.Text; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; + using Orts.Formats.Msts; using ORTS.Common; using ORTS.TrackViewer.Drawing; @@ -52,7 +55,7 @@ public class DrawPath /// /// Constructor /// - public DrawPath(TrackDB trackDB, TrackSectionsFile tsectionDat) + public DrawPath (TrackDB trackDB, TrackSectionsFile tsectionDat) { this.trackDB = trackDB; this.tsectionDat = tsectionDat; @@ -71,7 +74,7 @@ public void Draw(DrawArea drawArea, TrainpathNode firstNode) DrawnPathData dummyData = new DrawnPathData(); Draw(drawArea, firstNode, null, int.MaxValue, dummyData); } - + /// /// Draw the actual path coded in the PATfile (for a number of nodes that can be extended or reduced) /// @@ -81,15 +84,15 @@ public void Draw(DrawArea drawArea, TrainpathNode firstNode) /// The requested number of nodes to draw /// Data structure that we will fill with information about the path we have drawn /// the number of nodes actually drawn (not taking into account nodes on a siding) - public int Draw(DrawArea drawArea, + public int Draw(DrawArea drawArea, TrainpathNode firstNode, TrainpathNode firstNodeOfTail, - int numberToDraw, + int numberToDraw, DrawnPathData drawnPathData) { //List of all nodes that need to be drawn. List drawnNodes = new List(); - + // start of path TrainpathNode currentSidingNode = null; // we start without siding path CurrentMainNode = firstNode; @@ -99,19 +102,19 @@ public void Draw(DrawArea drawArea, TrainpathNode firstNode) DrawTail(drawArea, ColorSchemeMain, null, firstNodeOfTail); return 0; } - + drawnNodes.Add(CurrentMainNode); drawnPathData.AddNode(CurrentMainNode); // We want to draw only a certain number of nodes. And if there is a siding, for the siding // we also want to draw the same number of nodes from where it splits from the main track - TrainpathNode LastVectorStart = null; + TrainpathNode LastVectorStart= null; TrainpathNode LastVectorEnd = null; int LastVectorTvn = 0; int numberDrawn = 1; while (numberDrawn < numberToDraw) { - + // If we have a current siding track, we draw it if (currentSidingNode != null) { @@ -134,14 +137,14 @@ public void Draw(DrawArea drawArea, TrainpathNode firstNode) sidingNodesToDraw = 0; } currentSidingNode = nextNodeOnSiding; - + } } - + // Draw the start of a siding path, so from this main line point to the next siding node. // If there is a next siding node, we also reset the currentSidingNode // but probably it is not allowed to have siding on a siding - TrainpathNode nextSidingNode = CurrentMainNode.NextSidingNode; + TrainpathNode nextSidingNode = CurrentMainNode.NextSidingNode; if (nextSidingNode != null) { DrawPathOnVectorNode(drawArea, ColorSchemeSiding, CurrentMainNode, nextSidingNode, CurrentMainNode.NextSidingTvnIndex); @@ -180,8 +183,7 @@ public void Draw(DrawArea drawArea, TrainpathNode firstNode) //Draw all the nodes themselves TrainpathNode lastNode = null; - foreach (TrainpathNode node in drawnNodes) - { + foreach (TrainpathNode node in drawnNodes) { DrawNodeItself(drawArea, node, false); lastNode = node; } @@ -197,7 +199,7 @@ public void Draw(DrawArea drawArea, TrainpathNode firstNode) return numberDrawn; } - + /// /// Draw the current path node texture, showing what kind of node it is @@ -212,7 +214,7 @@ private void DrawNodeItself(DrawArea drawArea, TrainpathNode trainpathNode, bool int maxPixelSize = 24; float angle = trainpathNode.TrackAngle; - Color colorMain = isLastNode ? this.ColorSchemeLast.TrackStraight : ColorSchemeMain.TrackStraight; + Color colorMain = isLastNode ? this.ColorSchemeLast.TrackStraight : ColorSchemeMain.TrackStraight ; Color colorSiding = this.ColorSchemeSiding.TrackStraight; Color colorBroken = this.ColorSchemeMain.BrokenNode; @@ -237,7 +239,7 @@ private void DrawNodeItself(DrawArea drawArea, TrainpathNode trainpathNode, bool break; default: bool isSidingNode = (trainpathNode.NextMainNode == null) && - ((trainpathNode.NextSidingNode != null) || trainpathNode.IsBroken); // The IsBroken condition should indicate a dangling siding node + ( (trainpathNode.NextSidingNode != null) || trainpathNode.IsBroken); // The IsBroken condition should indicate a dangling siding node Color normalColor = (isSidingNode) ? colorSiding : colorMain; drawArea.DrawTexture(trainpathNode.Location, "pathNormal", pathPointSize, minPixelSize, maxPixelSize, normalColor, angle); break; @@ -248,7 +250,7 @@ private void DrawNodeItself(DrawArea drawArea, TrainpathNode trainpathNode, bool drawArea.DrawTexture(trainpathNode.Location, "crossedRing", pathPointSize, minPixelSize, maxPixelSize, colorBroken); } //drawArea.DrawExpandingString(trainpathNode.Location, trainpathNode.NodeType.ToString()); //debug only - + } /// @@ -275,7 +277,7 @@ private void DrawPathOnVectorNode(DrawArea drawArea, ColorScheme colors, Trainpa //Default situation (and most occuring) is to draw the complete vector node int tvsiStart = 0; - int tvsiStop = tn.TrVectorNode.TrVectorSections.Length - 1; + int tvsiStop = tn.TrVectorNode.TrVectorSections.Length-1; float sectionOffsetStart = 0; float sectionOffsetStop = -1; if (currentNode is TrainpathJunctionNode) @@ -391,13 +393,13 @@ private void DrawPathOnVectorNode(DrawArea drawArea, ColorScheme colors, Trainpa if (trackSection == null) return; WorldLocation thisLocation = new WorldLocation(tvs.TileX, tvs.TileZ, tvs.X, 0, tvs.Z); - + if (trackSection.SectionCurve != null) { //curved section float radius = trackSection.SectionCurve.Radius; int sign = (trackSection.SectionCurve.Angle < 0) ? -1 : 1; - float angleLength = (stopOffset < 0) ? trackSection.SectionCurve.Angle : sign * MathHelper.ToDegrees(stopOffset / radius); - float angleStart = sign * MathHelper.ToDegrees(startOffset / radius); + float angleLength = (stopOffset < 0) ? trackSection.SectionCurve.Angle : sign*MathHelper.ToDegrees(stopOffset/radius); + float angleStart = sign*MathHelper.ToDegrees(startOffset / radius); angleLength -= angleStart; drawArea.DrawArc(trackSection.SectionSize.Width, colors.TrackCurved, thisLocation, @@ -421,7 +423,7 @@ private void DrawPathOnVectorNode(DrawArea drawArea, ColorScheme colors, Trainpa /// node to draw to private static void DrawPathBrokenNode(DrawArea drawArea, ColorScheme colors, TrainpathNode currentNode, TrainpathNode nextNode) { - drawArea.DrawLine(1f, colors.BrokenPath, currentNode.Location, nextNode.Location); + drawArea.DrawLine(1f, colors.BrokenPath , currentNode.Location, nextNode.Location); } /// @@ -454,7 +456,7 @@ public class DrawnPathData /// List of main-track nodes that were actually drawn and can therefore be selected for editing /// public Collection DrawnNodes { get; private set; } - + /// /// Keys are tracknode indexes, value is a list of (main) track node (in pairs) that are both /// on the tracknode and the path between them has been drawn diff --git a/Source/Contrib/TrackViewer/Editing/EditorActions.cs b/Source/Contrib/TrackViewer/Editing/EditorActions.cs index 622d7ebe10..24015fdb0f 100644 --- a/Source/Contrib/TrackViewer/Editing/EditorActions.cs +++ b/Source/Contrib/TrackViewer/Editing/EditorActions.cs @@ -15,8 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections.ObjectModel; using System.Collections.Generic; using System.Linq; +using System.Text; using System.Windows; using System.Windows.Controls; using Orts.Formats.Msts; @@ -47,7 +50,7 @@ public abstract class EditorAction protected TrainpathNode ActiveNode { get; private set; } /// The currently active location on a track node on which the action of (some) subclasses will act protected TrainpathVectorNode ActiveTrackLocation { get; private set; } - + /// x-location of the mouse protected int MouseX { get; set; } /// y-location of the mouse @@ -91,7 +94,7 @@ protected EditorAction(string menuHeader, string pngFileName) ModificationTools = new ModificationTools(); } - + /// /// Set the state of the item in the menu (depending on whether the action can be executed or not. /// @@ -166,7 +169,7 @@ public override string ToString() } } #endregion - + #region AddStart /// /// Subclass to implement the action: Add Start Node @@ -194,7 +197,7 @@ protected override void ExecuteAction() } /// Returns the net amount of main nodes added. - protected override int NetMainNodesAdded() + protected override int NetMainNodesAdded() { return ModificationTools.NetNodesAdded + 1; // first node is not counted automatically } @@ -424,7 +427,7 @@ public abstract class EditorActionWait : EditorAction /// (Wait) node for which you want to edit the metadata. protected void EditWaitMetaData(TrainpathVectorNode nodeToEdit) { - if (nodeToEdit.WaitTimeS == 0) + if (nodeToEdit.WaitTimeS == 0 ) { nodeToEdit.WaitTimeS = 602; // some initial value: 10 minutes, 2 seconds } @@ -553,7 +556,7 @@ protected EditorActionOtherExit(string header, string pngFileName) protected bool CanTakeOtherExit(bool addPassingPath) { TrainpathJunctionNode activeNodeAsJunction = ActiveNode as TrainpathJunctionNode; - + return CanTakeOtherExitBasic(activeNodeAsJunction) && CanReconnectOtherExit(activeNodeAsJunction, addPassingPath); @@ -598,7 +601,7 @@ protected bool CanReconnectOtherExit(TrainpathJunctionNode activeNodeAsJunction, else { // if there is no siding path, we can just reconnect either a new main or a siding path: - if (!ActiveNode.HasSidingPath) return true; + if (!ActiveNode.HasSidingPath) return true; // We already have a siding path, so we cannot add another if (addPassingPath) return false; @@ -660,7 +663,7 @@ private TrainpathJunctionNode FindReconnectNode(TrainpathJunctionNode startJunct int junctionsToCheck = maxNumberNodesToCheckForReconnect; while (junctionsToCheck > 0) { - int nextJunctionIndex = TrackExtensions.GetNextJunctionIndex(junctionIndex, TvnIndex); + int nextJunctionIndex = TrackExtensions.GetNextJunctionIndex(junctionIndex, TvnIndex); foreach (TrainpathJunctionNode reconnectNode in reconnectNodes) { if (reconnectNode.JunctionIndex == nextJunctionIndex) @@ -687,7 +690,7 @@ private TrainpathJunctionNode FindReconnectNode(TrainpathJunctionNode startJunct } return null; } - + } #endregion @@ -712,7 +715,7 @@ protected override bool CanExecuteAction() protected override void ExecuteAction() { TrainpathJunctionNode activeNodeAsJunction = ActiveNode as TrainpathJunctionNode; - + if (ReconnectNode == null) { //really take other exit and discard rest of path activeNodeAsJunction.NextMainTvnIndex = NewTvnIndex; @@ -796,7 +799,7 @@ protected override bool CanExecuteAction() if (!CanTakeOtherExitBasic(activeNodeAsJunction)) return false; if (ActiveNode.HasSidingPath) return false; if (activeNodeAsJunction.IsSimpleSidingStart()) return false; - + //The idea was that if a normal passing path is possible, then there is no need for a complex passing path //However, if you want to connect not to the default recnnect node, we do need this //if (CanReconnectOtherExit(activeNodeAsJunction, true)) return false; @@ -844,7 +847,7 @@ bool NewNodeWouldBeOnMainTrack() } } #endregion - + #region RemovePassingPath /// /// Subclass to implement the action: Remove as passing path @@ -867,12 +870,12 @@ protected override void ExecuteAction() TrainpathNode mainNode = ActiveNode; mainNode.NodeType = TrainpathNodeType.Other; // this was SidingStart mainNode.NextSidingNode = null; - + if (!mainNode.HasSidingPath) { // only a broken stub created by StartPassingPath return; } - + //make sure the main path does no longer show it has a siding path. while (mainNode.NodeType != TrainpathNodeType.SidingEnd) { @@ -955,8 +958,8 @@ protected override bool CanExecuteAction() if (ActiveNode.NodeType == TrainpathNodeType.Start) return false; if (ActiveNode.NextMainNode == null) return false; if (ActiveNode.IsBroken) return false; - if (ActiveNode.NodeType == TrainpathNodeType.SidingEnd) return false; - + if (ActiveNode.NodeType == TrainpathNodeType.SidingEnd) return false; + if (ActiveNode.HasSidingPath) { // a siding start itself should still be fine. @@ -964,7 +967,7 @@ protected override bool CanExecuteAction() } return true; - + } /// Execute the action. This assumes that the action can be executed @@ -976,12 +979,12 @@ protected override void ExecuteAction() TrainpathNode lastEditableNode = ActiveNode.PrevNode; ActiveNode.PrevNode = null; - + lastEditableNode.NextMainNode = null; } } #endregion - + #region AutoFixBrokenNodes /// /// Subclass to implement the action: Auto-fix broken nodes @@ -1190,8 +1193,7 @@ protected override bool CanExecuteAction() /// This action can only be done if there is a passing path stub, that is, a start of a passing path /// that contains only a single siding node that is broken and not reconnected. /// - void FindPassingPathStub() - { + void FindPassingPathStub() { sidingStartNode = null; autoConnectTools.ResetDisallowedJunctions(); @@ -1200,7 +1202,7 @@ void FindPassingPathStub() while (mainNode != null) { TrainpathJunctionNode mainNodeAsJunction = mainNode as TrainpathJunctionNode; - + if (mainNodeAsJunction != null) { if (mainNode.NodeType == TrainpathNodeType.SidingStart) @@ -1238,7 +1240,7 @@ protected override void ExecuteAction() TrainpathNode sidingEnd = ActiveNode; sidingStartNode.NextSidingNode.SetNonBroken(); - + sidingStartNode.NodeType = TrainpathNodeType.SidingStart; sidingEnd.NodeType = TrainpathNodeType.SidingEnd; @@ -1280,14 +1282,13 @@ public EditorActionTakeOtherExitPassingPath() protected override bool CanExecuteAction() { if (Trainpath.FirstNode == null) return false; - if (ActiveNode.IsBroken) return false; + if (ActiveNode.IsBroken) return false; if (ActiveNode.NextMainNode != null) return false; if (ActiveNode.NextSidingNode == null) return false; if (ActiveNode.NextSidingNode.NodeType == TrainpathNodeType.SidingEnd) return false; // not enough room to take other exit. TrainpathJunctionNode activeNodeAsJunction = (ActiveNode as TrainpathJunctionNode); - if ((activeNodeAsJunction == null) || (!activeNodeAsJunction.IsFacingPoint)) - { + if ((activeNodeAsJunction == null) || (!activeNodeAsJunction.IsFacingPoint) ) { return false; } @@ -1296,7 +1297,7 @@ protected override bool CanExecuteAction() if (!FindDisAllowedJunctionIndexes()) return false; int newNextTvnIndex = activeNodeAsJunction.OtherExitTvnIndex(); - return autoConnectTools.FindConnection(ActiveNode, sidingEndNode, newNextTvnIndex); + return autoConnectTools.FindConnection(ActiveNode,sidingEndNode, newNextTvnIndex); } /// @@ -1385,7 +1386,7 @@ protected override int NetMainNodesAdded() public abstract class EditorActionMouseDrag : EditorAction { /// Constructor - protected EditorActionMouseDrag(string header, string pngFileName) : base(header, pngFileName) { } + protected EditorActionMouseDrag(string header, string pngFileName) : base(header, pngFileName) {} /// /// Dragging has commenced. Perform initialization actions @@ -1454,7 +1455,7 @@ protected virtual void CleanUp() } #endregion - + #region MouseDragVectorNode /// /// Subclass to implement the actions related to mouse dragging. @@ -1476,7 +1477,7 @@ protected override bool CanExecuteAction() if (ActiveNode.IsBroken) return false; nodeBeingDragged = ActiveNode as TrainpathVectorNode; if (nodeBeingDragged == null) return false; - + switch (ActiveNode.NodeType) { case TrainpathNodeType.Start: @@ -1484,10 +1485,10 @@ protected override bool CanExecuteAction() case TrainpathNodeType.Stop: case TrainpathNodeType.Reverse: return true; - default: + default: return false; } - + } /// Execute the action. This assumes that the action can be executed @@ -1501,15 +1502,15 @@ protected override void ExecuteAction() /// Note that undo/redo is already taken care of. /// protected override void InitDragging() - { + { switch (ActiveNode.NodeType) { - case TrainpathNodeType.Start: FindDraggingLimitsStart(); break; - case TrainpathNodeType.End: FindDraggingLimitsEnd(); break; - case TrainpathNodeType.Stop: FindDraggingLimitsStop(); break; + case TrainpathNodeType.Start: FindDraggingLimitsStart(); break; + case TrainpathNodeType.End: FindDraggingLimitsEnd(); break; + case TrainpathNodeType.Stop: FindDraggingLimitsStop(); break; case TrainpathNodeType.Reverse: FindDraggingLimitsReverse(); break; default: break; - } + } } /// @@ -1518,13 +1519,13 @@ protected override void InitDragging() protected override bool SucceededDragging() { - if ((nodeBeingDragged.TvnIndex == ActiveTrackLocation.TvnIndex) + if ( (nodeBeingDragged.TvnIndex == ActiveTrackLocation.TvnIndex) && (ActiveTrackLocation.Location != WorldLocation.None) && (ActiveTrackLocation.IsBetween(dragLimitNode1, dragLimitNode2))) { - nodeBeingDragged.Location = ActiveTrackLocation.Location; + nodeBeingDragged.Location = ActiveTrackLocation.Location; nodeBeingDragged.TrackVectorSectionIndex = ActiveTrackLocation.TrackVectorSectionIndex; - nodeBeingDragged.TrackSectionOffset = ActiveTrackLocation.TrackSectionOffset; + nodeBeingDragged.TrackSectionOffset = ActiveTrackLocation.TrackSectionOffset; return true; } @@ -1546,7 +1547,7 @@ void FindDraggingLimitsStart() dragLimitNode2 = nodeBeingDragged.NextMainNode; } } - + void FindDraggingLimitsEnd() { dragLimitNode1 = nodeBeingDragged.PrevNode; @@ -1563,7 +1564,7 @@ void FindDraggingLimitsReverse() { // we now need to find which of the next and previous nodes is closest to the reverse point TrainpathVectorNode prevVectorNode = nodeBeingDragged.PrevNode as TrainpathVectorNode; TrainpathVectorNode nextVectorNode = nodeBeingDragged.NextMainNode as TrainpathVectorNode; - + if (prevVectorNode == null) { // prev is a junction node. Then either the next node is a vector node, or it is the same junction. Just take it dragLimitNode1 = nodeBeingDragged.NextMainNode; @@ -1574,8 +1575,7 @@ void FindDraggingLimitsReverse() } else { // both are vector nodes. - if (prevVectorNode.IsBetween(nextVectorNode, nodeBeingDragged)) - { + if (prevVectorNode.IsBetween(nextVectorNode,nodeBeingDragged)) { dragLimitNode1 = nodeBeingDragged.PrevNode; } else @@ -1629,7 +1629,7 @@ public class EditorActionMouseDragAutoConnect : EditorActionMouseDrag private ContinuousAutoConnecting autoConnectReverse; private TrainpathVectorNode nodeBeingDragged; // link to a possibly possibly temporary node that is being dragged. private int netNodesDeleted; - + //private DebugWindow debugWindow; /// Constructor public EditorActionMouseDragAutoConnect() @@ -1830,7 +1830,7 @@ private bool CouldAndMadeConnectionEnd() if (connectionIsGood) { - PrepareNodeCountUpdate(autoConnectReverse.ReconnectTrainpathNode, nodeBeingDragged, 0); + PrepareNodeCountUpdate(autoConnectReverse.ReconnectTrainpathNode, nodeBeingDragged, 0); autoConnectReverse.CreateFoundConnection(ModificationTools, true); // note: reverse is not yet done, compare 'normal connection' } @@ -1877,7 +1877,7 @@ protected override int NetMainNodesAdded() // * Passing paths. } #endregion - + #region NonInteractiveActions /// /// Subclass to implement the 'action': add Missing ambiguity nodes. This is not an interactive action, but still and edit to the path. @@ -1894,7 +1894,7 @@ protected override bool CanExecuteAction() } /// Execute the action. This assumes that the action can be executed - protected override void ExecuteAction() { } + protected override void ExecuteAction() {} /// /// Add additional main nodes (to the end of the current path) diff --git a/Source/Contrib/TrackViewer/Editing/ModificationTools.cs b/Source/Contrib/TrackViewer/Editing/ModificationTools.cs index 00a006dadc..cd0b3e0e79 100644 --- a/Source/Contrib/TrackViewer/Editing/ModificationTools.cs +++ b/Source/Contrib/TrackViewer/Editing/ModificationTools.cs @@ -15,6 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; using Orts.Simulation; namespace ORTS.TrackViewer.Editing @@ -30,7 +34,7 @@ public class ModificationTools #region node counting /// Keeps cound of the net amount of nodes that have been added public int NetNodesAdded { get; private set; } - + /// /// Reset the amount of nodes added /// @@ -138,7 +142,7 @@ TrainpathJunctionNode AddAdditionalJunctionNode(TrainpathNode lastNode, int next newNode.SetFacingPoint(); newNode.DetermineOrientation(lastNode, nextTvnIndex); - NetNodesAdded++; + NetNodesAdded ++ ; return newNode; } @@ -170,7 +174,7 @@ public TrainpathVectorNode AddAdditionalVectorNode(TrainpathNode lastNode, Train lastNode.NextSidingNode = newNode; } - NetNodesAdded++; + NetNodesAdded ++; return newNode; } @@ -302,10 +306,10 @@ public void AddDisambiguityNodeIfNeeded(TrainpathNode currentNode) { //Check if we need to add an disambiguity node TrainpathJunctionNode currentNodeAsJunction = currentNode as TrainpathJunctionNode; - if ((currentNodeAsJunction != null) + if ( (currentNodeAsJunction != null) && (currentNode.NextMainNode != null) && (currentNode.NextMainNode is TrainpathJunctionNode) - && (currentNodeAsJunction.IsSimpleSidingStart()) + && (currentNodeAsJunction.IsSimpleSidingStart()) ) { TrainpathVectorNode halfwayNode = CreateHalfWayNode(currentNodeAsJunction, currentNodeAsJunction.NextMainTvnIndex); @@ -381,7 +385,7 @@ public void StitchTwoPaths(TrainpathNode lastNodeFirstPath, TrainpathNode firstN //in case the first node of the second path is a vector, make sure that its next tvn index is copied if (firstNodeSecondPathAsVector != null) - { + { if (isMainPath) { lastNodeFirstPath.NextMainTvnIndex = firstNodeSecondPathAsVector.TvnIndex; diff --git a/Source/Contrib/TrackViewer/Editing/PathEditor.cs b/Source/Contrib/TrackViewer/Editing/PathEditor.cs index b9e22e7afc..aaca7f4d5b 100644 --- a/Source/Contrib/TrackViewer/Editing/PathEditor.cs +++ b/Source/Contrib/TrackViewer/Editing/PathEditor.cs @@ -16,14 +16,17 @@ // along with Open Rails. If not, see . // -using System.Collections.Generic; +using System; using System.Collections.ObjectModel; +using System.Collections.Generic; using System.Linq; -using System.Windows; -using System.Windows.Controls; +using System.Text; +using ORTS.TrackViewer.Drawing; + using Orts.Formats.Msts; using ORTS.Common; -using ORTS.TrackViewer.Drawing; +using System.Windows.Controls; +using System.Windows; namespace ORTS.TrackViewer.Editing { @@ -53,9 +56,8 @@ public class PathEditor /// The current path that we are editing public Trainpath CurrentTrainPath { get; private set; } /// Editing is active or not - public bool EditingIsActive - { - get { return _editingIsActive; } + public bool EditingIsActive { + get {return _editingIsActive;} set { _editingIsActive = value; OnActiveOrPathChanged(); } } @@ -86,7 +88,7 @@ public bool EditingIsActive DrawTrackDB drawTrackDB; // We need to know what has been drawn, especially to get track closest to mouse TrackDB trackDB; TrackSectionsFile tsectionDat; - + DrawPath drawPath; // drawing of the path itself TrainpathNode activeNode; // active Node (if present) for which actions can be performed @@ -100,7 +102,7 @@ public bool EditingIsActive Separator separatorActiveTrack; Separator separatorBroken; - const int practicalInfinityInt = int.MaxValue / 2; // large, but not close to overflow + const int practicalInfinityInt = int.MaxValue/2; // large, but not close to overflow int numberToDraw = practicalInfinityInt; // number of nodes to draw, start with all int maxNodesToAdd; // if at end of path, how many nodes do we allow to be added @@ -162,7 +164,7 @@ void CreateNonMenuActions() /// The route information that contains track data base and track section data /// The drawn tracks to know about where the mouse is/// The directory where paths will be stored public PathEditor(RouteData routeData, DrawTrackDB drawTrackDB, string pathsDirectory) - : this(routeData, drawTrackDB) + :this(routeData, drawTrackDB) { CurrentTrainPath = new Trainpath(trackDB, tsectionDat); FileName = CurrentTrainPath.PathId + ".pat"; @@ -178,7 +180,7 @@ public PathEditor(RouteData routeData, DrawTrackDB drawTrackDB, string pathsDire /// The drawn tracks to know about where the mouse is /// Path to the .pat file public PathEditor(RouteData routeData, DrawTrackDB drawTrackDB, ORTS.Menu.Path path) - : this(routeData, drawTrackDB) + :this(routeData, drawTrackDB) { FileName = path.FilePath.Split('\\').Last(); CurrentTrainPath = new Trainpath(trackDB, tsectionDat, path.FilePath); @@ -272,8 +274,7 @@ private void CreateDirectActions() /// /// Create the context menu from previously defined items. /// - private void CreateContextMenu() - { + private void CreateContextMenu() { contextMenu = new ContextMenu(); separatorActiveNode = new Separator(); @@ -291,7 +292,7 @@ private void CreateContextMenu() contextMenu.Items.Add(action.ActionMenuItem); } contextMenu.Items.Add(separatorActiveNode); - + foreach (EditorAction action in editorActionsActiveTrack) { @@ -304,7 +305,7 @@ private void CreateContextMenu() contextMenu.Items.Add(action.ActionMenuItem); } contextMenu.Items.Add(separatorBroken); - + foreach (EditorAction action in editorActionsOthers) { contextMenu.Items.Add(action.ActionMenuItem); @@ -312,7 +313,7 @@ private void CreateContextMenu() contextMenu.Closed += new RoutedEventHandler(ContextMenu_Closed); } - + /// /// Popup the context menu at the given location. Also disable updates related to mouse movement while menu is open. /// @@ -356,7 +357,7 @@ public void PopupContextMenu(int mouseX, int mouseY) someOtherActionIsPossible = someOtherActionIsPossible || actionCanBeExecuted; } - noActionPossibleMenuItem.Visibility = + noActionPossibleMenuItem.Visibility = (someNodeActionIsPossible || someTrackActionIsPossible || someOtherActionIsPossible) ? Visibility.Collapsed : Visibility.Visible; @@ -511,8 +512,8 @@ void DrawUntilHere(int newNumberToDraw) public void Draw(DrawArea drawArea) { DrawnPathData drawnPathData = new DrawnPathData(); - - int numberDrawn = drawPath.Draw(drawArea, CurrentTrainPath.FirstNode, CurrentTrainPath.FirstNodeOfTail, numberToDraw, + + int numberDrawn = drawPath.Draw(drawArea, CurrentTrainPath.FirstNode, CurrentTrainPath.FirstNodeOfTail, numberToDraw, drawnPathData); if (numberDrawn < numberToDraw) @@ -610,7 +611,7 @@ void FindActiveTrackLocation(DrawnPathData drawnPathData) activeTrackLocation.TrackSectionOffset = distance; activeTrackLocation.Location = location; - if ((CurrentTrainPath.FirstNode != null) && (activeMouseDragAction == null)) + if ( (CurrentTrainPath.FirstNode != null) && (activeMouseDragAction == null) ) { //Only in case this is not the first path. TrainpathNode prevNode = FindPrevNodeOfActiveTrack(drawnPathData, tni_int); if (prevNode == null || prevNode.HasSidingPath) @@ -755,15 +756,13 @@ public void ExtendWithPath(ORTS.Menu.Path path) // We have a current path and a new path. // First check if the new path is usable TrainpathNode newStart = newPath.FirstNode; - if (newPath.FirstNode == null || newPath.FirstNode.NextMainNode == null) - { + if (newPath.FirstNode == null || newPath.FirstNode.NextMainNode == null) { MessageBox.Show(TrackViewer.catalog.GetString("The selected path contains no or only 1 node. The current path was not extended.")); return; } TrainpathNode lastNode = CurrentTrainPath.FirstNode; - while (lastNode.NextMainNode != null) - { + while (lastNode.NextMainNode != null) { lastNode = lastNode.NextMainNode; } if (CurrentTrainPath.HasEnd) @@ -835,7 +834,7 @@ public void SaveStationNames() /// The screen y-location of where the edit metadata popup needs to be placed public void ReversePath(int popupX, int popupY) { - if (!CanReverse()) return; + if (! CanReverse()) return; CurrentTrainPath.StoreCurrentPath(); CurrentTrainPath.ReversePath(); EditMetaData(popupX, popupY); @@ -890,8 +889,7 @@ public bool AutoFixAllBrokenNodes() actionFixInvalid.DoAction(); brokenNodes = CurrentTrainPath.GetBrokenNodes(); } - else - { + else { fixSucceeded = false; nodeToTry++; } diff --git a/Source/Contrib/TrackViewer/Editing/PathMetadataDialog.xaml.cs b/Source/Contrib/TrackViewer/Editing/PathMetadataDialog.xaml.cs index 24668b0713..23fa615d6a 100644 --- a/Source/Contrib/TrackViewer/Editing/PathMetadataDialog.xaml.cs +++ b/Source/Contrib/TrackViewer/Editing/PathMetadataDialog.xaml.cs @@ -1,5 +1,16 @@ -using System.Windows; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Windows; using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; namespace ORTS.TrackViewer.Editing { @@ -18,10 +29,10 @@ public PathMetadataDialog(string[] metadata, bool isPlayerPath) InitializeComponent(); this.Left = 100; this.Top = 10; - pathID.Text = metadata[0]; - pathName.Text = metadata[1]; + pathID.Text = metadata[0]; + pathName.Text = metadata[1]; pathStart.Text = metadata[2]; - pathEnd.Text = metadata[3]; + pathEnd.Text = metadata[3]; pathIsPlayerPath.IsChecked = isPlayerPath; pathID.Focus(); pathID.SelectAll(); diff --git a/Source/Contrib/TrackViewer/Editing/SavePatFile.cs b/Source/Contrib/TrackViewer/Editing/SavePatFile.cs index 75cef0bfbe..b9d2fcb61f 100644 --- a/Source/Contrib/TrackViewer/Editing/SavePatFile.cs +++ b/Source/Contrib/TrackViewer/Editing/SavePatFile.cs @@ -17,8 +17,9 @@ // using System; using System.Collections.Generic; -using System.IO; using System.Linq; +using System.Text; +using System.IO; using System.Windows.Forms; namespace ORTS.TrackViewer.Editing @@ -89,15 +90,15 @@ static bool UserCancelledBecauseOfUnfinishedPath(Trainpath trainpath) List cancelReasons = new List(); if (!trainpath.HasEnd) cancelReasons.Add(TrackViewer.catalog.GetString("* The path does not have a well-defined end-point")); //if (trainpath.IsBroken) cancelReasons.Add(TrackViewer.catalog.GetString("* The path has broken nodes or links")); - if (trainpath.FirstNodeOfTail != null) cancelReasons.Add(TrackViewer.catalog.GetString("* The path has a stored and not-yet reconnected tail")); - + if (trainpath.FirstNodeOfTail!=null) cancelReasons.Add(TrackViewer.catalog.GetString("* The path has a stored and not-yet reconnected tail")); + if (cancelReasons.Count == 0) return false; string message = TrackViewer.catalog.GetString("The current path is not finished:") + "\n"; message += String.Join("\n", cancelReasons.ToArray()); message += "\n" + TrackViewer.catalog.GetString("Do you want to continue?"); - DialogResult dialogResult = MessageBox.Show(message, + DialogResult dialogResult = MessageBox.Show(message, TrackViewer.catalog.GetString("Trackviewer Path Editor"), MessageBoxButtons.OKCancel, MessageBoxIcon.Question); return (dialogResult == DialogResult.Cancel); @@ -142,7 +143,7 @@ static void CreatePDPsAndTrpathNodes(Trainpath trainpath) { trackPDPs = new List(); trpathnodes = new List(); - pdpOfJunction = new Dictionary(); + pdpOfJunction = new Dictionary(); uint nextMainIndex = 1; TrainpathNode currentMainNode = trainpath.FirstNode; @@ -153,7 +154,7 @@ static void CreatePDPsAndTrpathNodes(Trainpath trainpath) if (currentMainNode.NextSidingNode == null) { AddNode(currentMainNode, nextMainIndex, nonext); - } + } else { // This is a siding start. @@ -182,7 +183,7 @@ static void CreatePDPsAndTrpathNodes(Trainpath trainpath) extraMainNodes++; tempMainNode = tempMainNode.NextMainNode; // It should exist, if not path editor itself is broken. } - + if (extraSidingNodes == 0) { @@ -199,14 +200,14 @@ static void CreatePDPsAndTrpathNodes(Trainpath trainpath) currentSidingNode = currentMainNode.NextSidingNode; while (currentSidingNode.NextSidingNode.NextSidingNode != null) { - nextSidingIndex++; + nextSidingIndex++; AddNode(currentSidingNode, nonext, nextSidingIndex); currentSidingNode = currentSidingNode.NextSidingNode; } // Write the final siding node, linking to main path again. AddNode(currentSidingNode, nonext, nextMainIndex + extraMainNodes); - + } } nextMainIndex++; @@ -228,7 +229,7 @@ private static void AddNode(TrainpathNode node, uint nextMainIndex, uint nextSid int pdpIndex; string trackPDPstart = String.Format(System.Globalization.CultureInfo.InvariantCulture, "\tTrackPDP ( {0,6:D} {1,6:D} {2,9} {3,9:F3} {4,9:F3}", - node.Location.TileX, node.Location.TileZ, + node.Location.TileX, node.Location.TileZ, node.Location.Location.X.ToString("F3", System.Globalization.CultureInfo.CreateSpecificCulture("en-US")), node.Location.Location.Y.ToString("F3", System.Globalization.CultureInfo.CreateSpecificCulture("en-US")), node.Location.Location.Z.ToString("F3", System.Globalization.CultureInfo.CreateSpecificCulture("en-US"))); @@ -263,7 +264,7 @@ private static void AddNode(TrainpathNode node, uint nextMainIndex, uint nextSid "{0} {1} {2} )", trackPDPstart, 1, 1)); } } - + trpathnodes.Add(String.Format(System.Globalization.CultureInfo.InvariantCulture, "\t\tTrPathNode ( {0} {1} {2} {3} )", node.FlagsToString(), nextMainIndex, nextSidingIndex, pdpIndex)); @@ -289,19 +290,18 @@ private static void WriteToFile(Trainpath trainpath) file.WriteLine(")"); file.WriteLine("TrackPath ("); file.WriteLine("\tTrPathName ( \"" + trainpath.PathId + "\" )"); - + // How to format hex? "{0:X8}" is not working for me. Neither is {0:X08}. // Fortunately, {0:X} will use 8 characters anyway. Maybe because it knows the length from the number of bits in the number string flagsString = string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0:X}", trainpath.PathFlags); - file.WriteLine("\tTrPathFlags ( " + flagsString + " )"); - + file.WriteLine("\tTrPathFlags ( " + flagsString + " )"); + file.WriteLine("\tName ( \"" + trainpath.PathName + "\" )"); - file.WriteLine("\tTrPathStart ( \"" + trainpath.PathStart + "\" )"); + file.WriteLine("\tTrPathStart ( \"" + trainpath.PathStart + "\" )"); file.WriteLine("\tTrPathEnd ( \"" + trainpath.PathEnd + "\" )"); - file.Write("\tTrPathNodes ( "); + file.Write ("\tTrPathNodes ( "); file.WriteLine(trpathnodes.Count()); - foreach (string line in trpathnodes) - { + foreach (string line in trpathnodes) { file.WriteLine(line); } file.WriteLine("\t)"); diff --git a/Source/Contrib/TrackViewer/Editing/TrackExtensions.cs b/Source/Contrib/TrackViewer/Editing/TrackExtensions.cs index 86f7264d29..b891037447 100644 --- a/Source/Contrib/TrackViewer/Editing/TrackExtensions.cs +++ b/Source/Contrib/TrackViewer/Editing/TrackExtensions.cs @@ -15,6 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; using Orts.Formats.Msts; namespace ORTS.TrackViewer.Editing @@ -45,7 +49,7 @@ public static void Initialize(TrackNode[] trackNodesIn, TrackSectionsFile tsecti { trackNodes = trackNodesIn; tsectionDat = tsectionDatIn; - + mainRouteIndex = new uint[trackNodes.Length]; sidingRouteIndex = new uint[trackNodes.Length]; for (int tni = 0; tni < trackNodes.Length; tni++) @@ -63,7 +67,7 @@ public static void Initialize(TrackNode[] trackNodesIn, TrackSectionsFile tsecti } catch (System.IO.InvalidDataException exception) { - exception.ToString(); + exception.ToString(); } mainRouteIndex[tni] = tn.Inpins + mainRoute; @@ -92,7 +96,7 @@ public static void Initialize(TrackNode[] trackNodesIn, TrackSectionsFile tsecti /// Return the tracknode corresponding the given index public static TrackNode TrackNode(int tvnIndex) { return trackNodes[tvnIndex]; } - + /// /// Get the index of the junction node at the other side of the linking track vector node. /// This uses only the track database, no trainpath nodes. @@ -130,8 +134,7 @@ public static int GetLeavingTvnIndex(int junctionIndex, int incomingTvnIndex) if (junctionIndex <= 0) return 0; // something wrong in database TrackNode junctionTrackNode = trackNodes[junctionIndex]; - if (junctionTrackNode == null) - { + if (junctionTrackNode == null) { return 0; } @@ -145,7 +148,7 @@ public static int GetLeavingTvnIndex(int junctionIndex, int incomingTvnIndex) } return junctionTrackNode.TrailingTvn(); } - + } } diff --git a/Source/Contrib/TrackViewer/Editing/Trainpath.cs b/Source/Contrib/TrackViewer/Editing/Trainpath.cs index d0e434970d..7360d0a787 100644 --- a/Source/Contrib/TrackViewer/Editing/Trainpath.cs +++ b/Source/Contrib/TrackViewer/Editing/Trainpath.cs @@ -19,10 +19,12 @@ // Hence a different class using System; -using System.Collections.Generic; using System.Collections.ObjectModel; +using System.Collections.Generic; using System.Linq; +using System.Text; using System.Windows.Forms; + using Orts.Formats.Msts; using Orts.Simulation; @@ -217,7 +219,7 @@ private static bool PatFileIsIncomplete(PathFile patFile) if (patFile.End == null) { return true; } if (patFile.TrackPDPs.Count == 0) { return true; } if (patFile.TrPathNodes.Count == 0) { return true; } - + return false; } @@ -600,7 +602,7 @@ public string[] StationNames() } return RemoveDoubles(stationNames); - + } private List StationNamesBetweenNodes(TrainpathNode firstNode, TrainpathNode secondNode) @@ -619,7 +621,7 @@ private List StationNamesBetweenNodes(TrainpathNode firstNode, Trainpath TrItem trItem = trackDB.TrItemTable[trackItemIndex]; if (trItem.ItemType == TrItem.trItemType.trPLATFORM) { - var traveller = new Traveller(tsectionDat, trackDB.TrackNodes, tn, + var traveller = new Traveller(tsectionDat, trackDB.TrackNodes, tn, trItem.TileX, trItem.TileZ, trItem.X, trItem.Z, Traveller.TravellerDirection.Forward); if (traveller != null) { @@ -630,7 +632,7 @@ private List StationNamesBetweenNodes(TrainpathNode firstNode, Trainpath stationNames.Add(platform.Station); } } - + } } @@ -701,14 +703,14 @@ public void ReversePath() //all intermediate nodes for (int i = 1; i < lastIndex; i++) { - mainNodes[i].NextMainNode = mainNodes[i + 1]; - mainNodes[i].NextMainTvnIndex = mainNodes[i + 1].NextMainTvnIndex; // note main TVN index was in reverse direction + mainNodes[i].NextMainNode = mainNodes[i+1]; + mainNodes[i].NextMainTvnIndex = mainNodes[i+1].NextMainTvnIndex; // note main TVN index was in reverse direction mainNodes[i].PrevNode = mainNodes[i - 1]; if (mainNodes[i].NodeType != TrainpathNodeType.Reverse) { // reverse nodes have input and output swapped, but they are not changed themselves! mainNodes[i].ReverseOrientation(); } - + if (mainNodes[i].NodeType == TrainpathNodeType.SidingStart) { ReverseSidingPath(mainNodes[i]); @@ -745,10 +747,10 @@ static void ReverseSidingPath(TrainpathNode oldSidingStart) sidingNodes[0].NextSidingTvnIndex = sidingNodes[1].NextSidingTvnIndex; sidingNodes[0].NodeType = TrainpathNodeType.SidingStart; // no reversing because this node is reversed as part of main path. - + // making new connections for all intermediate nodes, and reversing them as well // Note order is important. - for (int i = 1; i < lastIndex; i++) + for (int i = 1 ; i < lastIndex ; i++) { sidingNodes[i].NextSidingNode = sidingNodes[i + 1]; sidingNodes[i].NextSidingTvnIndex = sidingNodes[i + 1].NextSidingTvnIndex; // this was oriented in the other direction! diff --git a/Source/Contrib/TrackViewer/Editing/TrainpathNode.cs b/Source/Contrib/TrackViewer/Editing/TrainpathNode.cs index 60d2733b81..78748c2aa2 100644 --- a/Source/Contrib/TrackViewer/Editing/TrainpathNode.cs +++ b/Source/Contrib/TrackViewer/Editing/TrainpathNode.cs @@ -38,11 +38,14 @@ // Because the path is a double linked list, to prevent issues with garbage collection, an Unlink method is provided that removes the lilnks. using System; +using System.Collections.Generic; using System.Linq; +using System.Text; + using Orts.Formats.Msts; -using Orts.Simulation; using ORTS.Common; using ORTS.TrackViewer.Drawing; +using Orts.Simulation; namespace ORTS.TrackViewer.Editing { @@ -50,8 +53,7 @@ namespace ORTS.TrackViewer.Editing /// /// Enumerate the various types of nodes that are available /// - public enum TrainpathNodeType - { + public enum TrainpathNodeType { /// Node is the start node Start, /// Node is the end node (and not just the last node) @@ -108,7 +110,7 @@ public abstract class TrainpathNode /// True if the node is broken because off-track and therefore not drawable public bool IsBrokenOffTrack { get { return (brokenStatus == NodeStatus.NotOnJunction) || (brokenStatus == NodeStatus.NotOnTrack); } } private NodeStatus brokenStatus; - + // From simple linking: /// Next path node on main path public TrainpathNode NextMainNode { get; set; } @@ -121,7 +123,7 @@ public abstract class TrainpathNode /// This does include siding start, but Siding end is the first node that has no siding path anymore. /// public bool HasSidingPath { get; set; } - + //To find these, both the current node and the next node need to be known. /// Index of main vector node leaving this path node public int NextMainTvnIndex { get; set; } @@ -142,16 +144,14 @@ public abstract class TrainpathNode /// A sub-class object properly initialized public static TrainpathNode CreatePathNode(TrPathNode tpn, TrackPDP pdp, TrackDB trackDB, TrackSectionsFile tsectionDat) { - if (pdp.IsJunction) - { + if (pdp.IsJunction) { // we do not use tpn: this means we do not interpret the flags return new TrainpathJunctionNode(pdp, trackDB, tsectionDat); } - else - { + else { return new TrainpathVectorNode(tpn, pdp, trackDB, tsectionDat); } - + } /// @@ -171,7 +171,7 @@ protected TrainpathNode(TrackDB trackDB, TrackSectionsFile tsectionDat) /// constructor, in case node is not created from PAT file. /// protected TrainpathNode(TrainpathNode otherNode) - : this(otherNode.TrackDB, otherNode.TsectionDat) + :this(otherNode.TrackDB, otherNode.TsectionDat) { } @@ -181,7 +181,7 @@ protected TrainpathNode(TrainpathNode otherNode) /// The trainpath constructor will initialize the rest. /// protected TrainpathNode(TrackPDP pdp, TrackDB trackDB, TrackSectionsFile tsectionDat) - : this(trackDB, tsectionDat) + :this(trackDB, tsectionDat) { Location = new WorldLocation(pdp.TileX, pdp.TileZ, pdp.X, pdp.Y, pdp.Z); if (pdp.IsInvalid) // not a valid point @@ -279,7 +279,7 @@ public string BrokenStatusString() } } - + /// /// String output for shorter debug information @@ -293,7 +293,7 @@ public string ToStringConnection() { return String.Format(System.Globalization.CultureInfo.CurrentCulture, "({0}-{1}-{2}){3}", (this.PrevNode == null) ? "-" : this.PrevNode.ToString(), - this.ToString(), + this.ToString(), (this.NextMainNode == null) ? "-" : this.NextMainNode.ToString(), (this.NextSidingNode == null) ? String.Empty : this.NextSidingNode.ToString()); } @@ -318,7 +318,7 @@ public class TrainpathJunctionNode : TrainpathNode public int SidingTvn { get { return TrackDB.TrackNodes[JunctionIndex].SidingTvn(); } } /// Return the vector node index of the trailing path leaving this junction public int TrailingTvn { get { return TrackDB.TrackNodes[JunctionIndex].TrailingTvn(); } } - + /// The maximum distance a junction node is allowed from its closest junction before it is said to be broken const float maxDistanceAway = 2.5f; @@ -328,7 +328,7 @@ public class TrainpathJunctionNode : TrainpathNode /// /// Just another node that already has trackDB and tsectionDB set public TrainpathJunctionNode(TrainpathNode otherNode) - : base(otherNode) + :base(otherNode) { } @@ -338,7 +338,7 @@ public TrainpathJunctionNode(TrainpathNode otherNode) /// Corresponding PDP in the .patfile /// /// - public TrainpathJunctionNode(TrackPDP pdp, TrackDB trackDB, TrackSectionsFile tsectionDat) + public TrainpathJunctionNode(TrackPDP pdp, TrackDB trackDB, TrackSectionsFile tsectionDat) : base(pdp, trackDB, tsectionDat) { JunctionIndex = FindJunctionOrEndIndex(true); @@ -387,7 +387,7 @@ public int FindJunctionOrEndIndex(bool wantJunctionNode) } } - bool broken = (bestDistance2 > maxDistanceAway * maxDistanceAway); + bool broken = (bestDistance2 > maxDistanceAway*maxDistanceAway); if (broken) { SetBroken(NodeStatus.NotOnJunction); @@ -404,7 +404,7 @@ public void SetFacingPoint() TrackNode tn = TrackDB.TrackNodes[JunctionIndex]; if (tn == null) return; // Leave IsFacingPoint to what it is. if (tn.TrJunctionNode == null) return; // Leave IsFacingPoint to what it is. - + //First try using the next main index if (NextMainNode != null && NextMainTvnIndex >= 0) { @@ -589,7 +589,7 @@ public bool IsSimpleSidingStart() public int OtherExitTvnIndex() { // selecting whether to do this on main or siding is simple: if there is no next main, has to be siding - int CurrentNextTvnIndex = (NextMainTvnIndex > 0) ? NextMainTvnIndex : NextSidingTvnIndex; + int CurrentNextTvnIndex = (NextMainTvnIndex > 0 ) ? NextMainTvnIndex : NextSidingTvnIndex; if (CurrentNextTvnIndex == MainTvn) { return SidingTvn; @@ -613,8 +613,8 @@ public void SetLocationFromTrackNode() /// public override string ToString() { - return String.Format(System.Globalization.CultureInfo.CurrentCulture, - "Junction {0}={1} ({2})", this.JunctionIndex, this.NodeType.ToString(), + return String.Format(System.Globalization.CultureInfo.CurrentCulture, + "Junction {0}={1} ({2})", this.JunctionIndex, this.NodeType.ToString(), this.IsFacingPoint ? "Facing" : "Trailing" ); } @@ -649,7 +649,7 @@ public class TrainpathVectorNode : TrainpathNode public float TrackSectionOffset { get; set; } /// number of seconds to wait after stopping at this node. /// For openrails advanced shunting it can mean something else (3HHMM, 4NNSS, 5???? formats) - public int WaitTimeS { get; set; } + public int WaitTimeS { get; set; } private bool _forwardOriented = true; /// is the path oriented forward or not (with respect of orientation of track itself @@ -665,7 +665,7 @@ public bool ForwardOriented /// /// public TrainpathVectorNode(TrackDB trackDB, TrackSectionsFile tsectionDat) - : base(trackDB, tsectionDat) + :base(trackDB, tsectionDat) { TvnIndex = 0; } @@ -675,7 +675,7 @@ public TrainpathVectorNode(TrackDB trackDB, TrackSectionsFile tsectionDat) /// /// Just another node that already has trackDB and tsectionDB set public TrainpathVectorNode(TrainpathNode otherNode) - : base(otherNode) + :base(otherNode) { TvnIndex = 0; } @@ -686,7 +686,7 @@ public TrainpathVectorNode(TrainpathNode otherNode) /// just another node to have access to trackDB and tsectiondat /// The traveller that contains the exact location and distance on track to initialize the node public TrainpathVectorNode(TrainpathNode otherNode, Traveller traveller) - : base(otherNode) + :base(otherNode) { CopyDataFromTraveller(traveller); Location = traveller.WorldLocation; // Not part of CopyDataFromTraveller @@ -698,7 +698,7 @@ public TrainpathVectorNode(TrainpathNode otherNode, Traveller traveller) /// /// public TrainpathVectorNode(TrainpathVectorNode nodeCandidate) - : base(nodeCandidate) + :base(nodeCandidate) { TvnIndex = nodeCandidate.TvnIndex; TrackVectorSectionIndex = nodeCandidate.TrackVectorSectionIndex; @@ -797,7 +797,7 @@ public override int FindTvnIndex(TrainpathNode nextNode) return this.TvnIndex; } - TrainpathJunctionNode nextAsJunctionNode = nextNode as TrainpathJunctionNode; + TrainpathJunctionNode nextAsJunctionNode = nextNode as TrainpathJunctionNode; if ((nextAsJunctionNode != null) && nextAsJunctionNode.ConnectsToTrack(TvnIndex)) { // vector node to junction node, junction must connect to tvnIndex return this.TvnIndex; @@ -829,7 +829,7 @@ public override void DetermineOrientation(TrainpathNode previousNode, int linkin ReverseOrientation(); } } - + /// /// Reverse the orientation of the node /// @@ -857,7 +857,7 @@ public bool IsEarlierOnTrackThan(TrainpathNode otherNode) || ((TrackVectorSectionIndex == otherVectorNode.TrackVectorSectionIndex) && (TrackSectionOffset < otherVectorNode.TrackSectionOffset)); - } + } /// /// Is the current node between the two other nodes or not. @@ -914,7 +914,7 @@ public override string FlagsToString() { int AAAA = 0; int BBBB = 0; - + switch (NodeType) { case TrainpathNodeType.Start: @@ -931,7 +931,7 @@ public override string FlagsToString() default: BBBB = 4; //intermediate point; break; - + } return string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0:x4}{1:x4}", AAAA, BBBB); @@ -960,7 +960,7 @@ public int GetPrevJunctionIndex(int linkingTrackNodeIndex) TrackNode linkingTrackNode = TrackDB.TrackNodes[linkingTrackNodeIndex]; bool towardsNodeIsForwardOriented = (this.NodeType == TrainpathNodeType.Reverse) - ? !ForwardOriented + ? !ForwardOriented : ForwardOriented; return towardsNodeIsForwardOriented ? linkingTrackNode.JunctionIndexAtStart() diff --git a/Source/Contrib/TrackViewer/Editing/WaitPointDialog.xaml.cs b/Source/Contrib/TrackViewer/Editing/WaitPointDialog.xaml.cs index 94d975441b..dc2e6649ee 100644 --- a/Source/Contrib/TrackViewer/Editing/WaitPointDialog.xaml.cs +++ b/Source/Contrib/TrackViewer/Editing/WaitPointDialog.xaml.cs @@ -15,10 +15,19 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . using System; -using System.Text.RegularExpressions; +using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Windows; using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; +using System.Text.RegularExpressions; namespace ORTS.TrackViewer.Editing { @@ -47,7 +56,7 @@ public WaitPointDialog(int mouseX, int mouseY, int currentWaitTimeS) waitTimeMinutes.Text = "1"; waitTimeSeconds.Text = "1"; blowHornSeconds.Text = "1"; - + if (currentWaitTimeS >= 30000 && currentWaitTimeS < 40000) { // Absolute time to wait until. @@ -97,7 +106,7 @@ public WaitPointDialog(int mouseX, int mouseY, int currentWaitTimeS) ///Return the selected wait time in seconds public int GetWaitTime() { - + if (selectUntil.IsChecked == true) { // coding is 3HHMM @@ -150,14 +159,13 @@ public int GetWaitTime() int GetIntOrZero(string inputText) { - int returnValue; + int returnValue; try { returnValue = Convert.ToInt32(inputText, System.Globalization.CultureInfo.CurrentCulture); } - catch - { - returnValue = 0; + catch { + returnValue=0; } return returnValue; } @@ -262,6 +270,6 @@ private void TwoDigits_TextChanged(object sender, TextChangedEventArgs e) } UpdateWaitTime(); } - + } } diff --git a/Source/Contrib/TrackViewer/Program.cs b/Source/Contrib/TrackViewer/Program.cs index 27df072c07..07bf7b2d07 100644 --- a/Source/Contrib/TrackViewer/Program.cs +++ b/Source/Contrib/TrackViewer/Program.cs @@ -52,7 +52,7 @@ static void Main(string[] args) "This error may be due to bad data or a bug. ", Application.ProductName, errorSummary), Application.ProductName, MessageBoxButtons.OKCancel, MessageBoxIcon.Error); - + } trackViewer.Exit(); } diff --git a/Source/Contrib/TrackViewer/TrackViewer.cs b/Source/Contrib/TrackViewer/TrackViewer.cs index 76dc3028f6..3b4e5fbd6c 100644 --- a/Source/Contrib/TrackViewer/TrackViewer.cs +++ b/Source/Contrib/TrackViewer/TrackViewer.cs @@ -17,21 +17,24 @@ // using System; -using System.Collections.Generic; using System.Collections.ObjectModel; +using System.Collections.Generic; using System.Linq; -using System.Reflection; -using System.Windows.Forms; -using GNU.Gettext; +using System.Text; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using ORTS.Common; + +using System.Windows.Forms; +using System.Reflection; +using GNU.Gettext; using ORTS.Menu; +using ORTS.Common; +using Orts.Common; using ORTS.TrackViewer.Drawing; using ORTS.TrackViewer.Drawing.Labels; +using ORTS.TrackViewer.UserInterface; using ORTS.TrackViewer.Editing; using ORTS.TrackViewer.Editing.Charts; -using ORTS.TrackViewer.UserInterface; namespace ORTS.TrackViewer { @@ -209,7 +212,7 @@ protected override void Initialize() { Properties.Settings.Default.installDirectory = MSTS.MSTSPath.Base(); } - catch { } + catch {} } InstallFolder = new Folder("default", Properties.Settings.Default.installDirectory); @@ -240,7 +243,7 @@ void SetSubwindowSizes() //Some on-screen features depend on the actual font-height int halfHeight = (int)(fontManager.DefaultFont.Height / 2); - drawScaleRuler.SetLocationAndSize(halfHeight, ScreenH - statusbarHeight - halfHeight, 2 * halfHeight); + drawScaleRuler.SetLocationAndSize(halfHeight, ScreenH - statusbarHeight - halfHeight, 2*halfHeight); drawLongitudeLatitude = new DrawLongitudeLatitude(halfHeight, menuHeight); drawEditorAction = new DrawEditorAction(halfHeight, menuHeight + 2 * halfHeight); } @@ -363,18 +366,18 @@ protected override void Update(GameTime gameTime) if (DrawPATfile != null && Properties.Settings.Default.showPATfile) { - if (TVUserInput.IsPressed(TVUserCommands.ExtendPath)) DrawPATfile.ExtendPath(); + if (TVUserInput.IsPressed(TVUserCommands.ExtendPath)) DrawPATfile.ExtendPath(); if (TVUserInput.IsPressed(TVUserCommands.ExtendPathFull)) DrawPATfile.ExtendPathFull(); - if (TVUserInput.IsPressed(TVUserCommands.ReducePath)) DrawPATfile.ReducePath(); + if (TVUserInput.IsPressed(TVUserCommands.ReducePath)) DrawPATfile.ReducePath(); if (TVUserInput.IsPressed(TVUserCommands.ReducePathFull)) DrawPATfile.ReducePathFull(); if (TVUserInput.IsDown(TVUserCommands.ShiftToPathLocation)) DrawArea.ShiftToLocation(DrawPATfile.CurrentLocation); } if (PathEditor != null && Properties.Settings.Default.showTrainpath) { - if (TVUserInput.IsPressed(TVUserCommands.ExtendPath)) PathEditor.ExtendPath(); + if (TVUserInput.IsPressed(TVUserCommands.ExtendPath)) PathEditor.ExtendPath(); if (TVUserInput.IsPressed(TVUserCommands.ExtendPathFull)) PathEditor.ExtendPathFull(); - if (TVUserInput.IsPressed(TVUserCommands.ReducePath)) PathEditor.ReducePath(); + if (TVUserInput.IsPressed(TVUserCommands.ReducePath)) PathEditor.ReducePath(); if (TVUserInput.IsPressed(TVUserCommands.ReducePathFull)) PathEditor.ReducePathFull(); if (TVUserInput.IsDown(TVUserCommands.ShiftToPathLocation)) DrawArea.ShiftToLocation(PathEditor.CurrentLocation); @@ -385,7 +388,7 @@ protected override void Update(GameTime gameTime) } var mouseLocationAbsoluteX = Window.ClientBounds.Left + TVUserInput.MouseLocationX; - var mouseLocationAbsoluteY = Window.ClientBounds.Top + TVUserInput.MouseLocationY; + var mouseLocationAbsoluteY = Window.ClientBounds.Top + TVUserInput.MouseLocationY; if (PathEditor != null && PathEditor.EditingIsActive) { if (TVUserInput.IsMouseRightButtonPressed()) @@ -566,7 +569,7 @@ protected override void Draw(GameTime gameTime) drawAreaInset.DrawBorder(Color.Black); } - if (DrawMultiplePaths != null) DrawMultiplePaths.Draw(DrawArea); + if (DrawMultiplePaths != null ) DrawMultiplePaths.Draw(DrawArea); if (DrawPATfile != null && Properties.Settings.Default.showPATfile) DrawPATfile.Draw(DrawArea); if (PathEditor != null && Properties.Settings.Default.showTrainpath) PathEditor.Draw(DrawArea); drawEditorAction.Draw(PathEditor); @@ -618,8 +621,7 @@ public void ShowPathChart() public void Quit() { string message = String.Empty; - if (PathEditor != null && PathEditor.HasModifiedPath) - { + if (PathEditor!=null && PathEditor.HasModifiedPath) { message = catalog.GetString("The path you are working on has un-saved changes.\n"); } message += catalog.GetString("Do you really want to Quit?"); @@ -737,8 +739,7 @@ void HandleCommandLineArgs() } string installFolder = System.IO.Directory.GetParent(System.IO.Directory.GetParent(routeFolder).ToString()).ToString(); - if (!SetSelectedInstallFolder(installFolder)) - { + if (!SetSelectedInstallFolder(installFolder)) { MessageBox.Show(string.Format(catalog.GetString("Route cannot be loaded.\nWhile trying to open {0} the folder {1} was inferred as (MSTS or similar) install folder but does not contain expected files"), givenPathOrFile, installFolder)); return; } diff --git a/Source/Contrib/TrackViewer/UserInterface/Languages.cs b/Source/Contrib/TrackViewer/UserInterface/Languages.cs index 38ff1999ae..1df77cbf95 100644 --- a/Source/Contrib/TrackViewer/UserInterface/Languages.cs +++ b/Source/Contrib/TrackViewer/UserInterface/Languages.cs @@ -16,10 +16,11 @@ // along with Open Rails. If not, see . using System; using System.Collections.Generic; -using System.Globalization; -using System.IO; using System.Linq; +using System.Text; +using System.IO; using System.Windows.Forms; +using System.Globalization; namespace ORTS.TrackViewer.UserInterface { diff --git a/Source/Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs b/Source/Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs index 8d4ad04389..96c4ad500b 100644 --- a/Source/Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs +++ b/Source/Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs @@ -169,8 +169,7 @@ public void InitUserSettings() void UpdateMenuSettings() { menuShowPATfile.IsEnabled = !menuEnableEditing.IsChecked; - if (!menuShowPATfile.IsEnabled) - { + if (!menuShowPATfile.IsEnabled) { menuShowPATfile.IsChecked = false; } if (!menuShowSignals.IsChecked) @@ -413,7 +412,7 @@ public void PopulatePaths() /// public void PopulateStations() { - + if (trackViewer.DrawTrackDB == null) return; if (trackViewer.DrawTrackDB.StationLocations == null) return; List stations = trackViewer.DrawTrackDB.StationLocations.Keys.OrderBy(a => a.ToString()).ToList(); @@ -421,7 +420,7 @@ public void PopulateStations() menuStationCombobox.ItemsSource = stations; menuStationCombobox.SelectedItem = menuStationCombobox.Items.GetItemAt(0).ToString(); } - + /// /// Update the menu to make sure all the platforms are listed /// @@ -485,7 +484,7 @@ private void MenuItemCenterClosed(object sender, RoutedEventArgs e) if (menuStationCombobox.Items.Count > 0) { menuStationCombobox.SelectedItem = menuStationCombobox.Items.GetItemAt(0).ToString(); - } + } if (menuPlatformCombobox.Items.Count > 0) { menuPlatformCombobox.SelectedItem = menuPlatformCombobox.Items.GetItemAt(0).ToString(); @@ -758,7 +757,7 @@ public void MenuToggleShowSignals() } UpdateMenuSettings(); } - + /// /// Toggle whether the speedlimits are shown /// @@ -1085,7 +1084,7 @@ class PreferenceData public void PopulateLanguages() { comboBoxLanguage.ItemsSource = trackViewer.LanguageManager.Languages; - comboBoxLanguage.SelectedValue = LanguageManager.CurrentLanguageCode; + comboBoxLanguage.SelectedValue = LanguageManager.CurrentLanguageCode; } private void ComboBoxLanguage_SelectionChanged(object sender, SelectionChangedEventArgs e) @@ -1196,7 +1195,7 @@ public interface IPreferenceChanger /// /// Dictionary that supports saving to stored user settings. /// - class SaveableSettingsDictionary : Dictionary + class SaveableSettingsDictionary : Dictionary { /// /// Constructor. Also loads the values from stored settings. @@ -1245,7 +1244,7 @@ public void Save() private static StringCollection ToStringCollection(Dictionary dictionary) { StringCollection result = new StringCollection(); - foreach (KeyValuePair kvp in dictionary) + foreach (KeyValuePair kvp in dictionary) { result.Add(kvp.Key); result.Add(kvp.Value); diff --git a/Source/Contrib/TrackViewer/UserInterface/OtherPathsWindow.xaml.cs b/Source/Contrib/TrackViewer/UserInterface/OtherPathsWindow.xaml.cs index e3d5127049..ea58f3ef89 100644 --- a/Source/Contrib/TrackViewer/UserInterface/OtherPathsWindow.xaml.cs +++ b/Source/Contrib/TrackViewer/UserInterface/OtherPathsWindow.xaml.cs @@ -1,6 +1,16 @@ -using System.Windows; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Windows; using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; using ORTS.TrackViewer.Drawing; namespace ORTS.TrackViewer.UserInterface @@ -75,7 +85,7 @@ private void RecolorAll() if (backgroundColor == null) { checkBox.IsChecked = false; - checkBox.Foreground = new SolidColorBrush(Color.FromArgb(255, 0, 0, 0)); + checkBox.Foreground = new SolidColorBrush(Color.FromArgb(255,0,0,0)); } else { diff --git a/Source/Contrib/TrackViewer/UserInterface/SearchControl.xaml.cs b/Source/Contrib/TrackViewer/UserInterface/SearchControl.xaml.cs index a45bf599bb..7801d7ba5a 100644 --- a/Source/Contrib/TrackViewer/UserInterface/SearchControl.xaml.cs +++ b/Source/Contrib/TrackViewer/UserInterface/SearchControl.xaml.cs @@ -16,17 +16,28 @@ // along with Open Rails. If not, see . // using System; -using System.Text.RegularExpressions; +using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +using System.Windows.Forms.Integration; +using System.Text.RegularExpressions; namespace ORTS.TrackViewer.UserInterface { /// /// The kind of items that can be searched from the search control /// - public enum SearchableItem - { + public enum SearchableItem { /// Search for (rail) track node TrackNode, /// Search for (rail) track item diff --git a/Source/Contrib/TrackViewer/UserInterface/StatusBarControl.xaml.cs b/Source/Contrib/TrackViewer/UserInterface/StatusBarControl.xaml.cs index fc6c3f5fb9..dba46509f6 100644 --- a/Source/Contrib/TrackViewer/UserInterface/StatusBarControl.xaml.cs +++ b/Source/Contrib/TrackViewer/UserInterface/StatusBarControl.xaml.cs @@ -17,11 +17,21 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Text; +using System.Windows; using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; using System.Windows.Forms.Integration; using Orts.Formats.Msts; using ORTS.Common; +using ORTS.TrackViewer.Properties; using ORTS.TrackViewer.Editing; @@ -48,7 +58,7 @@ public StatusBarControl(TrackViewer trackViewer) { InitializeComponent(); - StatusbarHeight = (int)tvStatusbar.Height; + StatusbarHeight = (int) tvStatusbar.Height; //ElementHost object helps us to connect a WPF User Control. elementHost = new ElementHost @@ -69,7 +79,7 @@ public StatusBarControl(TrackViewer trackViewer) /// Y-value in screen pixels at the bottom of the statusbar public void SetScreenSize(int width, int height, int yBottom) { - elementHost.Location = new System.Drawing.Point(0, yBottom - height); + elementHost.Location = new System.Drawing.Point(0, yBottom-height); elementHost.Size = new System.Drawing.Size(width, height); } @@ -231,16 +241,16 @@ private void AddTrainpathStatus(TrackViewer trackViewer) { //gather some info on path status List statusItems = new List(); - + if (trackViewer.PathEditor.HasEndingPath) statusItems.Add("good end"); if (trackViewer.PathEditor.HasBrokenPath) statusItems.Add("broken"); if (trackViewer.PathEditor.HasModifiedPath) statusItems.Add("modified"); if (trackViewer.PathEditor.HasStoredTail) statusItems.Add("stored tail"); - + string pathStatus = String.Join(", ", statusItems.ToArray()); - + ORTS.TrackViewer.Editing.TrainpathNode curNode = trackViewer.PathEditor.CurrentNode; - + statusAdditional.Text += string.Format(System.Globalization.CultureInfo.CurrentCulture, " {0} ({4}): TVNs=[{1} {2}] (type={3})", trackViewer.PathEditor.FileName, curNode.NextMainTvnIndex, curNode.NextSidingTvnIndex, @@ -258,7 +268,7 @@ private void AddTrainpathStatus(TrackViewer trackViewer) " (wait-time={0}s)", curVectorNode.WaitTimeS); } - + } else { diff --git a/Source/Contrib/TrackViewer/UserInterface/TVInputSettings.cs b/Source/Contrib/TrackViewer/UserInterface/TVInputSettings.cs index 3d36a1a722..76bb515b1f 100644 --- a/Source/Contrib/TrackViewer/UserInterface/TVInputSettings.cs +++ b/Source/Contrib/TrackViewer/UserInterface/TVInputSettings.cs @@ -21,6 +21,17 @@ // Here all possible key commands are defined (enumerated) as well as linked to a specific key or key combination. using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices; +using System.Text; +using Microsoft.Win32; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework.Input; using ORTS.Settings; @@ -155,7 +166,7 @@ public static class TVInputSettings /// Array of commands that have been defined and for which a key-combination can and should be defined below /// public static UserCommandInput[] Commands = new UserCommandInput[Enum.GetNames(typeof(TVUserCommands)).Length]; - + //static readonly string[] KeyboardLayout = new[] { // "[01 ] [3B ][3C ][3D ][3E ] [3F ][40 ][41 ][42 ] [43 ][44 ][57 ][58 ] [37 ][46 ][11D]", // " ", @@ -172,20 +183,20 @@ public static class TVInputSettings public static void SetDefaults() { Commands[(int)TVUserCommands.ReloadRoute] = new ORTS.Settings.UserCommandKeyInput(0x13, ORTS.Settings.KeyModifiers.Control); - Commands[(int)TVUserCommands.ZoomIn] = new ORTS.Settings.UserCommandKeyInput(0x0D); - Commands[(int)TVUserCommands.ZoomOut] = new ORTS.Settings.UserCommandKeyInput(0x0C); + Commands[(int)TVUserCommands.ZoomIn] = new ORTS.Settings.UserCommandKeyInput(0x0D); + Commands[(int)TVUserCommands.ZoomOut] = new ORTS.Settings.UserCommandKeyInput(0x0C); Commands[(int)TVUserCommands.ZoomInSlow] = new ORTS.Settings.UserCommandKeyInput(0x0D, ORTS.Settings.KeyModifiers.Shift); - Commands[(int)TVUserCommands.ZoomOutSlow] = new ORTS.Settings.UserCommandKeyInput(0x0C, ORTS.Settings.KeyModifiers.Shift); - Commands[(int)TVUserCommands.ZoomReset] = new ORTS.Settings.UserCommandKeyInput(0x13); + Commands[(int)TVUserCommands.ZoomOutSlow]= new ORTS.Settings.UserCommandKeyInput(0x0C, ORTS.Settings.KeyModifiers.Shift); + Commands[(int)TVUserCommands.ZoomReset] = new ORTS.Settings.UserCommandKeyInput(0x13); Commands[(int)TVUserCommands.ZoomToTile] = new ORTS.Settings.UserCommandKeyInput(0x2C); - Commands[(int)TVUserCommands.ShiftLeft] = new ORTS.Settings.UserCommandKeyInput(0x4B); + Commands[(int)TVUserCommands.ShiftLeft] = new ORTS.Settings.UserCommandKeyInput(0x4B); Commands[(int)TVUserCommands.ShiftRight] = new ORTS.Settings.UserCommandKeyInput(0x4D); - Commands[(int)TVUserCommands.ShiftUp] = new ORTS.Settings.UserCommandKeyInput(0x48); - Commands[(int)TVUserCommands.ShiftDown] = new ORTS.Settings.UserCommandKeyInput(0x50); + Commands[(int)TVUserCommands.ShiftUp] = new ORTS.Settings.UserCommandKeyInput(0x48); + Commands[(int)TVUserCommands.ShiftDown] = new ORTS.Settings.UserCommandKeyInput(0x50); Commands[(int)TVUserCommands.ShiftToPathLocation] = new ORTS.Settings.UserCommandKeyInput(0x2E); Commands[(int)TVUserCommands.ShiftToMouseLocation] = new ORTS.Settings.UserCommandKeyInput(0x2E, ORTS.Settings.KeyModifiers.Shift); Commands[(int)TVUserCommands.ToggleZoomAroundMouse] = new ORTS.Settings.UserCommandKeyInput(0x32); - + Commands[(int)TVUserCommands.ToggleShowSpeedLimits] = new ORTS.Settings.UserCommandKeyInput(0x3F); Commands[(int)TVUserCommands.ToggleShowMilePosts] = new ORTS.Settings.UserCommandKeyInput(0x3F, ORTS.Settings.KeyModifiers.Shift); Commands[(int)TVUserCommands.ToggleShowTerrain] = new ORTS.Settings.UserCommandKeyInput(0x40); @@ -208,9 +219,9 @@ public static void SetDefaults() Commands[(int)TVUserCommands.PlaceEndPoint] = new ORTS.Settings.UserCommandKeyInput(0x12); Commands[(int)TVUserCommands.PlaceWaitPoint] = new ORTS.Settings.UserCommandKeyInput(0x11); - Commands[(int)TVUserCommands.AddLabel] = new ORTS.Settings.UserCommandKeyInput(0x26); - Commands[(int)TVUserCommands.Quit] = new ORTS.Settings.UserCommandKeyInput(0x10); - Commands[(int)TVUserCommands.Debug] = new ORTS.Settings.UserCommandKeyInput(0x34); + Commands[(int)TVUserCommands.AddLabel] = new ORTS.Settings.UserCommandKeyInput(0x26); + Commands[(int)TVUserCommands.Quit] = new ORTS.Settings.UserCommandKeyInput(0x10); + Commands[(int)TVUserCommands.Debug] = new ORTS.Settings.UserCommandKeyInput(0x34); Commands[(int)TVUserCommands.DebugDumpKeymap] = new ORTS.Settings.UserCommandKeyInput(0x3B, ORTS.Settings.KeyModifiers.Alt); Commands[(int)TVUserCommands.MouseZoomSlow] = new UserCommandModifierInput(Settings.KeyModifiers.Shift); diff --git a/Source/Contrib/TrackViewer/UserInterface/TVUserInput.cs b/Source/Contrib/TrackViewer/UserInterface/TVUserInput.cs index 55cfdf4430..7932f146d2 100644 --- a/Source/Contrib/TrackViewer/UserInterface/TVUserInput.cs +++ b/Source/Contrib/TrackViewer/UserInterface/TVUserInput.cs @@ -86,7 +86,7 @@ public static void Update() || LastMouseState.ScrollWheelValue != MouseState.ScrollWheelValue) { Changed = true; - + } #if DEBUG_RAW_INPUT for (Keys key = 0; key <= Keys.OemClear; key++) diff --git a/Source/Launcher/Program.cs b/Source/Launcher/Program.cs index 247020a621..8861154b15 100644 --- a/Source/Launcher/Program.cs +++ b/Source/Launcher/Program.cs @@ -25,13 +25,13 @@ * - Microsoft .NET Framework 4.7.2 */ +using Microsoft.Win32; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Text; using System.Windows.Forms; -using Microsoft.Win32; namespace ORTS { diff --git a/Source/Menu/ImportExportSaveForm.cs b/Source/Menu/ImportExportSaveForm.cs index 4f54ecd147..cf3db721af 100644 --- a/Source/Menu/ImportExportSaveForm.cs +++ b/Source/Menu/ImportExportSaveForm.cs @@ -46,7 +46,7 @@ public ImportExportSaveForm(ResumeForm.Save save) Font = SystemFonts.MessageBoxFont; Save = save; - if (!Directory.Exists(UserSettings.SavePackFolder)) Directory.CreateDirectory(UserSettings.SavePackFolder); + if (!Directory.Exists(UserSettings.SavePackFolder)) Directory.CreateDirectory(UserSettings.SavePackFolder); UpdateFileList(null); bExport.Enabled = !(Save == null); ofdImportSave.Filter = Application.ProductName + catalog.GetString("Save Packs") + " (*." + SavePackFileExtension + ")|*." + SavePackFileExtension + "|" + catalog.GetString("All files") + " (*.*)|*"; @@ -56,10 +56,10 @@ public ImportExportSaveForm(ResumeForm.Save save) private void bImportSave_Click_1(object sender, EventArgs e) { // Show the dialog and get result. - ofdImportSave.InitialDirectory = UserSettings.SavePackFolder; + ofdImportSave.InitialDirectory = UserSettings.SavePackFolder; if (ofdImportSave.ShowDialog() == DialogResult.OK) { - ExtractFilesFromZip(ofdImportSave.FileName, UserSettings.UserDataFolder); + ExtractFilesFromZip(ofdImportSave.FileName, UserSettings.UserDataFolder); UpdateFileList(catalog.GetStringFmt("Save Pack '{0}' imported successfully.", Path.GetFileNameWithoutExtension(ofdImportSave.FileName))); } } @@ -72,9 +72,9 @@ private void bExport_Click(object sender, EventArgs e) // For Zip, see http://weblogs.asp.net/jgalloway/archive/2007/10/25/creating-zip-archives-in-net-without-an-external-library-like-sharpziplib.aspx // Copy files to new package in folder save_packs - var fullFilePath = Path.Combine(UserSettings.UserDataFolder, Save.File); + var fullFilePath = Path.Combine(UserSettings.UserDataFolder, Save.File); var toFile = Path.GetFileNameWithoutExtension(Save.File) + "." + SavePackFileExtension; - var fullZipFilePath = Path.Combine(UserSettings.SavePackFolder, toFile); + var fullZipFilePath = Path.Combine(UserSettings.SavePackFolder, toFile); foreach (var fileName in new[] { fullFilePath, Path.ChangeExtension(fullFilePath, "png"), @@ -92,11 +92,11 @@ private void bViewSavePacksFolder_Click(object sender, EventArgs e) var objPSI = new System.Diagnostics.ProcessStartInfo(); var winDir = Environment.GetEnvironmentVariable("windir"); objPSI.FileName = winDir + @"\explorer.exe"; - objPSI.Arguments = "\"" + UserSettings.SavePackFolder + "\""; // Opens the Save Packs folder + objPSI.Arguments = "\"" + UserSettings.SavePackFolder + "\""; // Opens the Save Packs folder if (Save != null) { var toFile = Path.GetFileNameWithoutExtension(Save.File) + "." + SavePackFileExtension; - var fullZipFilePath = Path.Combine(UserSettings.SavePackFolder, toFile); + var fullZipFilePath = Path.Combine(UserSettings.SavePackFolder, toFile); if (File.Exists(fullZipFilePath)) { objPSI.Arguments = "/select,\"" + fullZipFilePath + "\""; // Opens the Save Packs folder and selects the exported SavePack @@ -108,7 +108,7 @@ private void bViewSavePacksFolder_Click(object sender, EventArgs e) void UpdateFileList(string message) { - var files = Directory.GetFiles(UserSettings.SavePackFolder, "*." + SavePackFileExtension); + var files = Directory.GetFiles(UserSettings.SavePackFolder, "*." + SavePackFileExtension); textBoxSavePacks.Text = String.IsNullOrEmpty(message) ? "" : message + "\r\n"; textBoxSavePacks.Text += catalog.GetPluralStringFmt("Save Pack folder contains {0} save pack:", "Save Pack folder contains {0} save packs:", files.Length); foreach (var s in files) diff --git a/Source/Menu/MainForm.cs b/Source/Menu/MainForm.cs index fe4262868a..580676fc47 100644 --- a/Source/Menu/MainForm.cs +++ b/Source/Menu/MainForm.cs @@ -15,6 +15,13 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using GNU.Gettext; +using GNU.Gettext.WinForms; +using Orts.Formats.OR; +using ORTS.Common; +using ORTS.Menu; +using ORTS.Settings; +using ORTS.Updater; using System; using System.Collections.Generic; using System.Diagnostics; @@ -24,14 +31,8 @@ using System.Linq; using System.Resources; using System.Runtime.InteropServices; +using System.Threading; using System.Windows.Forms; -using GNU.Gettext; -using GNU.Gettext.WinForms; -using Orts.Formats.OR; -using ORTS.Common; -using ORTS.Menu; -using ORTS.Settings; -using ORTS.Updater; using Path = ORTS.Menu.Path; namespace ORTS @@ -1137,7 +1138,7 @@ void ShowDetails() { if (SelectedTimetableSet != null) ShowDetail(catalog.GetStringFmt("Timetable set: {0}", SelectedTimetableSet), new string[0]); - // Description not shown as no description is available for a timetable set. + // Description not shown as no description is available for a timetable set. if (SelectedTimetable != null) ShowDetail(catalog.GetStringFmt("Timetable: {0}", SelectedTimetable), SelectedTimetable.Briefing.Split('\n')); @@ -1170,7 +1171,7 @@ void ShowDetails() /// /// /// - private string[] HideStartParameters(string[] info) + private string[] HideStartParameters(string [] info) { var fullStartTime = info[0].TrimStart(); var startTimeArray = fullStartTime.Split('$'); @@ -1351,7 +1352,7 @@ void SelectComboBoxItem(ComboBox comboBox, Func predicate) var index = (int)UserSettings.Menu_SelectionIndex.Activity; for (var i = 0; i < comboBox.Items.Count; i++) { - if (comboBox.Items[i] is T && predicate((T)comboBox.Items[i]) || (Settings.Menu_Selection.Length > i && comboBox.Items[i].ToString() == Settings.Menu_Selection[index])) + if (comboBox.Items[i] is T && predicate((T)comboBox.Items[i]) || (Settings.Menu_Selection.Length > i && comboBox.Items[i].ToString() == Settings.Menu_Selection[index] )) { comboBox.SelectedIndex = i; return; diff --git a/Source/Menu/Options.cs b/Source/Menu/Options.cs index 57f81bf131..f3eb209726 100644 --- a/Source/Menu/Options.cs +++ b/Source/Menu/Options.cs @@ -179,7 +179,7 @@ public OptionsForm(UserSettings settings, UpdateManager updateManager, bool init checkSimpleControlsPhysics.Checked = Settings.SimpleControlPhysics; checkUseAdvancedAdhesion.Checked = Settings.UseAdvancedAdhesion; labelAdhesionMovingAverageFilterSize.Enabled = checkUseAdvancedAdhesion.Checked; - numericAdhesionMovingAverageFilterSize.Enabled = checkUseAdvancedAdhesion.Checked; + numericAdhesionMovingAverageFilterSize.Enabled = checkUseAdvancedAdhesion.Checked; numericAdhesionMovingAverageFilterSize.Value = Settings.AdhesionMovingAverageFilterSize; checkBreakCouplers.Checked = Settings.BreakCouplers; checkCurveSpeedDependent.Checked = Settings.CurveSpeedDependent; @@ -221,7 +221,7 @@ public OptionsForm(UserSettings settings, UpdateManager updateManager, bool init checkDataLogTrainSpeed.Checked = Settings.DataLogTrainSpeed; labelDataLogTSInterval.Enabled = checkDataLogTrainSpeed.Checked; numericDataLogTSInterval.Enabled = checkDataLogTrainSpeed.Checked; - checkListDataLogTSContents.Enabled = checkDataLogTrainSpeed.Checked; + checkListDataLogTSContents.Enabled = checkDataLogTrainSpeed.Checked; numericDataLogTSInterval.Value = Settings.DataLogTSInterval; checkListDataLogTSContents.Items.AddRange(new object[] { catalog.GetString("Time"), @@ -760,21 +760,21 @@ private void textBoxContentName_TextChanged(object sender, EventArgs e) private void checkAlerter_CheckedChanged(object sender, EventArgs e) { //Disable checkAlerterExternal when checkAlerter is not checked - if (checkAlerter.Checked) + if (checkAlerter.Checked ) { - checkAlerterExternal.Enabled = true; + checkAlerterExternal.Enabled = true; } else { checkAlerterExternal.Enabled = false; - checkAlerterExternal.Checked = false; + checkAlerterExternal.Checked = false; } } private void checkDistantMountains_Click(object sender, EventArgs e) { - labelDistantMountainsViewingDistance.Enabled = checkDistantMountains.Checked; - numericDistantMountainsViewingDistance.Enabled = checkDistantMountains.Checked; + labelDistantMountainsViewingDistance.Enabled = checkDistantMountains.Checked; + numericDistantMountainsViewingDistance.Enabled = checkDistantMountains.Checked; } private void checkUseAdvancedAdhesion_Click(object sender, EventArgs e) diff --git a/Source/Menu/Program.cs b/Source/Menu/Program.cs index efa9a76ba6..a78d792f67 100644 --- a/Source/Menu/Program.cs +++ b/Source/Menu/Program.cs @@ -15,11 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using ORTS.Common; using System; using System.Collections.Generic; using System.Diagnostics; using System.Windows.Forms; -using ORTS.Common; namespace ORTS { @@ -151,7 +151,7 @@ static void MainForm() parameters.Add("\"" + MainForm.SelectedSaveFile + "\""); break; } - + var joinedParameters = string.Join(" ", parameters); if ((Control.ModifierKeys & Keys.Alt) == Keys.Alt) { diff --git a/Source/Menu/ResumeForm.cs b/Source/Menu/ResumeForm.cs index 27162d4597..0df21d39e6 100644 --- a/Source/Menu/ResumeForm.cs +++ b/Source/Menu/ResumeForm.cs @@ -50,6 +50,7 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.Drawing; using System.IO; using System.Linq; @@ -75,7 +76,7 @@ public partial class ResumeForm : Form List Saves = new List(); Task> SaveLoader; - public class Save + public class Save { public string File { get; private set; } public string PathName { get; private set; } @@ -177,7 +178,7 @@ public Save(string fileName, string youngestVersionFailedToRestore) if (SelectedAction == MainForm.UserAction.SinglePlayerTimetableGame) { - Text = String.Format("{0} - {1} - {2}", Text, route.Name, Path.GetFileNameWithoutExtension(Timetable.fileName)); + Text =String.Format("{0} - {1} - {2}", Text, route.Name, Path.GetFileNameWithoutExtension(Timetable.fileName)); pathNameDataGridViewTextBoxColumn.Visible = true; } else @@ -242,7 +243,7 @@ void LoadSaves() if (save.RouteName == Route.Name) { if (!save.IsMultiplayer ^ Multiplayer) - saves.Add(save); + saves.Add(save); } else // In case you receive a SavePack where the activity is recognised but the route has been renamed. // Checks the route is not in your list of routes. @@ -290,7 +291,7 @@ void ResumeSave() if (save.Valid != false) // I.e. true or null. Check is for safety as buttons should be disabled if Save is invalid. { - if (Found(save)) + if( Found(save) ) { if (save.Valid == null) if (!AcceptUseOfNonvalidSave(save)) @@ -386,7 +387,7 @@ void buttonDelete_Click(object sender, EventArgs e) for (var i = 0; i < selectedRows.Count; i++) { var save = selectedRows[i].DataBoundItem as Save; - foreach (var fileName in new[] + foreach (var fileName in new[] { Path.GetFileName(save.File) , Path.ChangeExtension(Path.GetFileName(save.File), "png") , Path.ChangeExtension(Path.GetFileName(save.File), "replay") @@ -439,7 +440,7 @@ void buttonDeleteInvalid_Click(object sender, EventArgs e) var save = new Save(saveFile, Settings.YoungestVersionFailedToRestore); if (save.Valid == false) { - foreach (var fileName in new[] + foreach (var fileName in new[] { save.File , Path.ChangeExtension(Path.GetFileName(save.File), "png") , Path.ChangeExtension(Path.GetFileName(save.File), "replay") @@ -467,17 +468,17 @@ private void buttonReplayFromStart_Click(object sender, EventArgs e) SelectedAction = MainForm.UserAction.SingleplayerReplaySave; InitiateReplay(true); } - + private void buttonReplayFromPreviousSave_Click(object sender, EventArgs e) { SelectedAction = MainForm.UserAction.SingleplayerReplaySaveFromSave; InitiateReplay(false); } - + private void InitiateReplay(bool fromStart) { var save = saveBindingSource.Current as Save; - if (Found(save)) + if (Found(save) ) { if (fromStart && (save.Valid == null)) if (!AcceptUseOfNonvalidSave(save)) @@ -539,36 +540,36 @@ public bool Found(Save save) var rewriteNeeded = false; // savedArgs[0] contains Activity or Path filepath var filePath = savedArgs[0]; - if (!System.IO.File.Exists(filePath)) + if( !System.IO.File.Exists(filePath) ) { // Show the dialog and get result. openFileDialog1.InitialDirectory = MSTSPath.Base(); openFileDialog1.FileName = Path.GetFileName(filePath); openFileDialog1.Title = @"Find location for file " + filePath; - if (openFileDialog1.ShowDialog() != DialogResult.OK) + if( openFileDialog1.ShowDialog() != DialogResult.OK ) return false; rewriteNeeded = true; savedArgs[0] = openFileDialog1.FileName; } - if (savedArgs.Length > 1) // Explore, not Activity + if( savedArgs.Length > 1 ) // Explore, not Activity { // savedArgs[1] contains Consist filepath filePath = savedArgs[1]; - if (!System.IO.File.Exists(filePath)) + if( !System.IO.File.Exists(filePath) ) { // Show the dialog and get result. openFileDialog1.InitialDirectory = MSTSPath.Base(); openFileDialog1.FileName = Path.GetFileName(filePath); openFileDialog1.Title = @"Find location for file " + filePath; - if (openFileDialog1.ShowDialog() != DialogResult.OK) + if( openFileDialog1.ShowDialog() != DialogResult.OK ) return false; rewriteNeeded = true; savedArgs[1] = openFileDialog1.FileName; } } - if (rewriteNeeded) + if( rewriteNeeded ) { - using (BinaryWriter outf = new BinaryWriter(new FileStream(save.File + ".tmp", FileMode.Create, FileAccess.Write))) + using( BinaryWriter outf = new BinaryWriter(new FileStream(save.File + ".tmp", FileMode.Create, FileAccess.Write)) ) { // copy the start of the file outf.Write(version); @@ -583,17 +584,17 @@ public bool Found(Save save) outf.Write(initialTileZ); outf.Write(savedArgs.Length); // copy the pars which may have changed - for (var i = 0; i < savedArgs.Length; i++) + for( var i = 0; i < savedArgs.Length; i++ ) outf.Write(savedArgs[i]); // copy the rest of the file - while (inf.BaseStream.Position < inf.BaseStream.Length) + while( inf.BaseStream.Position < inf.BaseStream.Length ) { outf.Write(inf.ReadByte()); } } inf.Close(); File.Replace(save.File + ".tmp", save.File, null); - } + } else { inf.Close(); diff --git a/Source/Menu/SortableBindingList.cs b/Source/Menu/SortableBindingList.cs index 9fb8b5ded8..24c4280952 100644 --- a/Source/Menu/SortableBindingList.cs +++ b/Source/Menu/SortableBindingList.cs @@ -15,9 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; +using System.Linq; +using System.Text; namespace ORTS { diff --git a/Source/Menu/Task.cs b/Source/Menu/Task.cs index 234fb2dc2e..5ea91590cb 100644 --- a/Source/Menu/Task.cs +++ b/Source/Menu/Task.cs @@ -22,6 +22,7 @@ //#define DEBUG_BACKGROUND_TASKS using System; +using System.Diagnostics; using System.Threading; using System.Windows.Forms; diff --git a/Source/Menu/TestingForm.cs b/Source/Menu/TestingForm.cs index e3d0491869..7f3a3c2d83 100644 --- a/Source/Menu/TestingForm.cs +++ b/Source/Menu/TestingForm.cs @@ -18,10 +18,12 @@ using System; using System.Collections.Generic; using System.ComponentModel; +using System.Data; using System.Diagnostics; using System.Drawing; using System.IO; using System.Linq; +using System.Text; using System.Windows.Forms; using GNU.Gettext; using GNU.Gettext.WinForms; @@ -62,8 +64,8 @@ public TestActivity(Folder folder, Route route, Activity activity) readonly MainForm MainForm; readonly UserSettings Settings; - readonly string SummaryFilePath = Path.Combine(UserSettings.UserDataFolder, "TestingSummary.csv"); - readonly string LogFilePath = Path.Combine(UserSettings.UserDataFolder, "TestingLog.txt"); + readonly string SummaryFilePath = Path.Combine(UserSettings.UserDataFolder, "TestingSummary.csv"); + readonly string LogFilePath = Path.Combine(UserSettings.UserDataFolder, "TestingLog.txt"); public TestingForm(MainForm mainForm, UserSettings settings) { diff --git a/Source/ORTS.Common/Conversions.cs b/Source/ORTS.Common/Conversions.cs index aa8a00f93d..35f8326fd4 100644 --- a/Source/ORTS.Common/Conversions.cs +++ b/Source/ORTS.Common/Conversions.cs @@ -17,6 +17,9 @@ using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Globalization; using GNU.Gettext; @@ -60,28 +63,27 @@ public enum PressureUnit /// /// Distance conversions from and to metres /// - public static class Me - { // Not M to avoid conflict with MSTSMath.M, but note that MSTSMath.M will be gone in future. + public static class Me { // Not M to avoid conflict with MSTSMath.M, but note that MSTSMath.M will be gone in future. /// Convert (statute or land) miles to metres - public static float FromMi(float miles) { return miles * 1609.344f; } + public static float FromMi(float miles) { return miles * 1609.344f; } /// Convert metres to (statute or land) miles - public static float ToMi(float metres) { return metres * (1.0f / 1609.344f); } + public static float ToMi(float metres) { return metres * (1.0f / 1609.344f); } /// Convert kilometres to metres public static float FromKiloM(float miles) { return miles * 1000f; } /// Convert metres to kilometres public static float ToKiloM(float metres) { return metres * (1.0f / 1000f); } /// Convert yards to metres - public static float FromYd(float yards) { return yards * 0.9144f; } + public static float FromYd(float yards) { return yards * 0.9144f; } /// Convert metres to yards - public static float ToYd(float metres) { return metres * (1.0f / 0.9144f); } + public static float ToYd(float metres) { return metres * (1.0f / 0.9144f); } /// Convert feet to metres - public static float FromFt(float feet) { return feet * 0.3048f; } + public static float FromFt(float feet) { return feet * 0.3048f; } /// Convert metres to feet - public static float ToFt(float metres) { return metres * (1.0f / 0.3048f); } + public static float ToFt(float metres) { return metres *(1.0f/ 0.3048f); } /// Convert inches to metres public static float FromIn(float inches) { return inches * 0.0254f; } /// Convert metres to inches - public static float ToIn(float metres) { return metres * (1.0f / 0.0254f); } + public static float ToIn(float metres) { return metres * (1.0f / 0.0254f); } /// /// Convert from metres into kilometres or miles, depending on the flag isMetric @@ -110,11 +112,11 @@ public static float ToM(float distance, bool isMetric) public static class Me2 { /// Convert from feet squared to metres squared - public static float FromFt2(float feet2) { return feet2 * 0.092903f; } + public static float FromFt2(float feet2) { return feet2 * 0.092903f; } /// Convert from metres squared to feet squared public static float ToFt2(float metres2) { return metres2 * (1.0f / 0.092903f); } /// Convert from inches squared to metres squared - public static float FromIn2(float feet2) { return feet2 * (1.0f / 1550.0031f); } + public static float FromIn2(float feet2) { return feet2 * (1.0f / 1550.0031f); } /// Convert from metres squared to inches squared public static float ToIn2(float metres2) { return metres2 * 1550.0031f; } } @@ -125,13 +127,13 @@ public static class Me2 public static class Me3 { /// Convert from cubic feet to cubic metres - public static float FromFt3(float feet3) { return feet3 * (1.0f / 35.3146665722f); } + public static float FromFt3(float feet3) { return feet3 * (1.0f / 35.3146665722f); } /// Convert from cubic metres to cubic feet public static float ToFt3(float metres3) { return metres3 * 35.3146665722f; } /// Convert from cubic inches to cubic metres public static float FromIn3(float inches3) { return inches3 * (1.0f / 61023.7441f); } /// Convert from cubic metres to cubic inches - public static float ToIn3(float metres3) { return metres3 * 61023.7441f; } + public static float ToIn3(float metres3) { return metres3 * 61023.7441f; } } /// @@ -140,13 +142,13 @@ public static class Me3 public static class MpS { /// Convert miles/hour to metres/second - public static float FromMpH(float milesPerHour) { return milesPerHour * (1.0f / 2.23693629f); } + public static float FromMpH(float milesPerHour) { return milesPerHour * (1.0f / 2.23693629f); } /// Convert metres/second to miles/hour - public static float ToMpH(float metrePerSecond) { return metrePerSecond * 2.23693629f; } + public static float ToMpH(float metrePerSecond) { return metrePerSecond * 2.23693629f; } /// Convert kilometre/hour to metres/second public static float FromKpH(float kilometrePerHour) { return kilometrePerHour * (1.0f / 3.600f); } /// Convert metres/second to kilometres/hour - public static float ToKpH(float metrePerSecond) { return metrePerSecond * 3.600f; } + public static float ToKpH(float metrePerSecond) { return metrePerSecond * 3.600f; } /// /// Convert from metres/second to kilometres/hour or miles/hour, depending on value of isMetric @@ -175,19 +177,19 @@ public static float ToMpS(float speed, bool isMetric) public static class Kg { /// Convert from pounds (lb) to kilograms - public static float FromLb(float lb) { return lb * (1.0f / 2.20462f); } + public static float FromLb(float lb) { return lb * (1.0f / 2.20462f); } /// Convert from kilograms to pounds (lb) - public static float ToLb(float kg) { return kg * 2.20462f; } + public static float ToLb(float kg) { return kg * 2.20462f; } /// Convert from US Tons to kilograms public static float FromTUS(float tonsUS) { return tonsUS * 907.1847f; } /// Convert from kilograms to US Tons - public static float ToTUS(float kg) { return kg * (1.0f / 907.1847f); } + public static float ToTUS(float kg) { return kg * (1.0f / 907.1847f); } /// Convert from UK Tons to kilograms public static float FromTUK(float tonsUK) { return tonsUK * 1016.047f; } /// Convert from kilograms to UK Tons - public static float ToTUK(float kg) { return kg * (1.0f / 1016.047f); } + public static float ToTUK(float kg) { return kg * (1.0f / 1016.047f); } /// Convert from kilogram to metric tonnes - public static float ToTonne(float kg) { return kg * (1.0f / 1000.0f); } + public static float ToTonne(float kg) { return kg * (1.0f / 1000.0f); } /// Convert from metrix tonnes to kilogram public static float FromTonne(float tonne) { return tonne * 1000.0f; } } @@ -198,7 +200,7 @@ public static class Kg public static class N { /// Convert from pound-force to Newtons - public static float FromLbf(float lbf) { return lbf * (1.0f / 0.224808943871f); } + public static float FromLbf(float lbf) { return lbf * (1.0f / 0.224808943871f); } /// Convert from Newtons to Pound-force public static float ToLbf(float newton) { return newton * 0.224808943871f; } } @@ -209,7 +211,7 @@ public static class N public static class KgpS { /// Convert from pound/hour to kilograms/second - public static float FromLbpH(float poundsPerHour) { return poundsPerHour * (1.0f / 7936.64144f); } + public static float FromLbpH(float poundsPerHour) { return poundsPerHour * (1.0f / 7936.64144f); } /// Convert from kilograms/second to pounds/hour public static float ToLbpH(float kilogramsPerSecond) { return kilogramsPerSecond * 7936.64144f; } } @@ -233,11 +235,11 @@ public static class W /// Convert from kiloWatts to Watts public static float FromKW(float kiloWatts) { return kiloWatts * 1000f; } /// Convert from Watts to kileWatts - public static float ToKW(float watts) { return watts * (1.0f / 1000f); } + public static float ToKW(float watts) { return watts * (1.0f / 1000f); } /// Convert from HorsePower to Watts public static float FromHp(float horsePowers) { return horsePowers * 745.699872f; } /// Convert from Watts to HorsePower - public static float ToHp(float watts) { return watts * (1.0f / 745.699872f); } + public static float ToHp(float watts) { return watts * (1.0f / 745.699872f); } /// Convert from BoilerHorsePower to Watts public static float FromBhp(float horsePowers) { return horsePowers * 9809.5f; } /// Convert from Watts to BoilerHorsePower @@ -245,7 +247,7 @@ public static class W /// Convert from British Thermal Unit (BTU) per second to watts public static float FromBTUpS(float btuPerSecond) { return btuPerSecond * 1055.05585f; } /// Convert from Watts to British Thermal Unit (BTU) per second - public static float ToBTUpS(float watts) { return watts * (1.0f / 1055.05585f); } + public static float ToBTUpS(float watts) { return watts * (1.0f / 1055.05585f); } } /// @@ -690,7 +692,7 @@ public static string FormatMass(float massKg, bool isMetric) } else { - return String.Format(CultureInfo.CurrentCulture, "{0:F0} {1}", Kg.ToLb(massKg), lb); + return String.Format(CultureInfo.CurrentCulture,"{0:F0} {1}", Kg.ToLb(massKg), lb); } } diff --git a/Source/ORTS.Common/Coordinates.cs b/Source/ORTS.Common/Coordinates.cs index ca26dde53d..76c8d2d257 100644 --- a/Source/ORTS.Common/Coordinates.cs +++ b/Source/ORTS.Common/Coordinates.cs @@ -90,7 +90,7 @@ public WorldPosition(WorldLocation copy) /// MSTS WFiles represent some location with a position, quaternion and tile coordinates /// This converts it to the ORTS WorldPosition representation /// - public WorldPosition(int tileX, int tileZ, Vector3 xnaPosition, Quaternion xnaQuaternion) + public WorldPosition (int tileX, int tileZ, Vector3 xnaPosition, Quaternion xnaQuaternion) { XNAMatrix = Matrix.CreateFromQuaternion(xnaQuaternion); XNAMatrix *= Matrix.CreateTranslation(xnaPosition); @@ -397,5 +397,5 @@ public override int GetHashCode() { return TileX.GetHashCode() ^ TileZ.GetHashCode() ^ Location.GetHashCode(); } - } + } } diff --git a/Source/ORTS.Common/DataLogger.cs b/Source/ORTS.Common/DataLogger.cs index 7dcd7f675f..6bee8dedca 100644 --- a/Source/ORTS.Common/DataLogger.cs +++ b/Source/ORTS.Common/DataLogger.cs @@ -15,8 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System.IO; +using System; +using System.Collections.Generic; +using System.Linq; using System.Text; +using System.IO; namespace ORTS.Common { @@ -53,8 +56,8 @@ public void Data(string data) public void End() { Cache.AppendLine(); - if (Cache.Length >= CacheSize) - Flush(); + if (Cache.Length >= CacheSize) + Flush(); FirstItem = true; } diff --git a/Source/ORTS.Common/Filter.cs b/Source/ORTS.Common/Filter.cs index 2ca680581a..b908537a4c 100644 --- a/Source/ORTS.Common/Filter.cs +++ b/Source/ORTS.Common/Filter.cs @@ -19,6 +19,7 @@ using System.Collections; using System.Collections.Generic; using System.Linq; +using System.Text; namespace ORTS.Common { @@ -135,9 +136,9 @@ public IIRFilter(FilterTypes type, int order, float cutoffFrequency, float sampl { case FilterTypes.Butterworth: ComputeButterworth( - Order = order, - CutoffFrequencyRadpS = cutoffFrequency, - SamplingPeriod_s = samplingPeriod); + Order = order, + CutoffFrequencyRadpS = cutoffFrequency, + SamplingPeriod_s = samplingPeriod); break; default: throw new NotImplementedException("Other filter types are not implemented yet."); @@ -166,7 +167,7 @@ public ArrayList A { set { - if (NCoef <= 0) + if(NCoef <= 0) NCoef = value.Count - 1; x = new ArrayList(); y = new ArrayList(); @@ -196,7 +197,7 @@ public ArrayList B { set { - if (NCoef <= 0) + if(NCoef <= 0) NCoef = value.Count - 1; x = new ArrayList(); y = new ArrayList(); @@ -264,10 +265,10 @@ public float SamplingPeriod_s public enum FilterTypes { - Exponential = 0, - Chebychev = 1, - Butterworth = 2, - Bessel = 3 + Exponential = 0, + Chebychev = 1, + Butterworth = 2, + Bessel = 3 } public FilterTypes FilterType { set; get; } @@ -307,7 +308,7 @@ public float Filter(float NewSample, float samplingPeriod) if (samplingPeriod <= 0.0f) return 0.0f; - switch (FilterType) + switch(FilterType) { case FilterTypes.Butterworth: if ((1 / (samplingPeriod) < RadToHz(cuttoffFreqRadpS))) @@ -354,7 +355,7 @@ public void Reset() /// Initial value public void Reset(float initValue) { - for (float t = 0; t < (10.0f * cuttoffFreqRadpS); t += 0.1f) + for (float t = 0; t < (10.0f*cuttoffFreqRadpS); t += 0.1f) { Filter(initValue, 0.1f); } @@ -436,7 +437,7 @@ public void ComputeButterworth(int order, float cutoffFrequency, float samplingP break; default: throw new NotImplementedException("Filter order higher than 1 is not supported yet"); - + } } @@ -479,11 +480,9 @@ public MovingAverage(int size) Queue Buffer; int size; - public int Size - { - get { if (Buffer != null) return Buffer.Count; else return 0; } - set { if (value > 0) size = value; else size = 1; Initialize(); } - } + public int Size { get { if (Buffer != null) return Buffer.Count; else return 0; } + set { if(value > 0) size = value; else size = 1; Initialize(); } + } public void Initialize(float value) { diff --git a/Source/ORTS.Common/FxCopAttributes.cs b/Source/ORTS.Common/FxCopAttributes.cs index 07b4145881..1b5230225f 100644 --- a/Source/ORTS.Common/FxCopAttributes.cs +++ b/Source/ORTS.Common/FxCopAttributes.cs @@ -16,46 +16,49 @@ // along with Open Rails. If not, see . using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; namespace ORTS.Common { - /// - /// Explicitly sets the name of the thread on which the target will run. - /// - [AttributeUsage(AttributeTargets.Method, Inherited = false, AllowMultiple = false)] - public sealed class ThreadNameAttribute : Attribute - { - readonly string threadName; + /// + /// Explicitly sets the name of the thread on which the target will run. + /// + [AttributeUsage(AttributeTargets.Method, Inherited = false, AllowMultiple = false)] + public sealed class ThreadNameAttribute : Attribute + { + readonly string threadName; - // This is a positional argument - public ThreadNameAttribute(string threadName) - { - this.threadName = threadName; - } + // This is a positional argument + public ThreadNameAttribute(string threadName) + { + this.threadName = threadName; + } - public string ThreadName - { - get { return threadName; } - } - } + public string ThreadName + { + get { return threadName; } + } + } - /// - /// Defines a thread on which the target is allowed to run; multiple threads may be allowed for a single target. - /// - [AttributeUsage(AttributeTargets.Class | AttributeTargets.Constructor | AttributeTargets.Method, Inherited = false, AllowMultiple = true)] + /// + /// Defines a thread on which the target is allowed to run; multiple threads may be allowed for a single target. + /// + [AttributeUsage(AttributeTargets.Class | AttributeTargets.Constructor | AttributeTargets.Method, Inherited = false, AllowMultiple = true)] public sealed class CallOnThreadAttribute : Attribute - { - readonly string threadName; + { + readonly string threadName; - // This is a positional argument - public CallOnThreadAttribute(string threadName) - { - this.threadName = threadName; - } + // This is a positional argument + public CallOnThreadAttribute(string threadName) + { + this.threadName = threadName; + } - public string ThreadName - { - get { return threadName; } - } - } + public string ThreadName + { + get { return threadName; } + } + } } diff --git a/Source/ORTS.Common/InfoApiMap.cs b/Source/ORTS.Common/InfoApiMap.cs index 20f98620e0..df27146124 100644 --- a/Source/ORTS.Common/InfoApiMap.cs +++ b/Source/ORTS.Common/InfoApiMap.cs @@ -21,8 +21,7 @@ namespace Orts.Common { - public enum TypeOfPointOnApiMap - { + public enum TypeOfPointOnApiMap { Track, Named, Rest @@ -54,7 +53,7 @@ public class InfoApiMap public float LonMin; public float LonMax; - public InfoApiMap(string powerSupplyName) + public InfoApiMap(string powerSupplyName) { InitTypeOfLocomotive(powerSupplyName); diff --git a/Source/ORTS.Common/Integrator.cs b/Source/ORTS.Common/Integrator.cs index 019ccbc5e1..31475ae40b 100644 --- a/Source/ORTS.Common/Integrator.cs +++ b/Source/ORTS.Common/Integrator.cs @@ -16,7 +16,10 @@ // along with Open Rails. If not, see . using System; +using System.Collections.Generic; using System.IO; +using System.Linq; +using System.Text; namespace ORTS.Common { diff --git a/Source/ORTS.Common/SettingsBase.cs b/Source/ORTS.Common/SettingsBase.cs index 21d4cee465..679bd68f96 100644 --- a/Source/ORTS.Common/SettingsBase.cs +++ b/Source/ORTS.Common/SettingsBase.cs @@ -26,19 +26,19 @@ namespace ORTS.Common /// Base class for supporting settings (either from user, commandline, default, ...) /// public abstract class SettingsBase - { + { /// /// Enumeration of the various sources for settings /// protected enum Source - { + { /// Setting is a default setting Default, /// Setting comes from the command line CommandLine, /// Setting comes from user (so stored between runs) User, - } + } /// The store of the settings protected SettingsStore SettingStore { get; private set; } @@ -55,9 +55,9 @@ protected enum Source /// /// The store for the settings protected SettingsBase(SettingsStore settings) - { - SettingStore = settings; - } + { + SettingStore = settings; + } /// /// Get the default value of a setting @@ -105,21 +105,21 @@ protected SettingsBase(SettingsStore settings) /// /// ??? protected void Load(IEnumerable options) - { - // This special command-line option prevents the registry values from being used. - AllowUserSettings = !options.Contains("skip-user-settings", StringComparer.OrdinalIgnoreCase); - - // Pull apart the command-line options so we can find them by setting name. - var optionsDictionary = new Dictionary(); - foreach (var option in options) - { - var k = option.Split(new[] { '=', ':' }, 2)[0].ToLowerInvariant(); - var v = option.Contains('=') || option.Contains(':') ? option.Split(new[] { '=', ':' }, 2)[1].ToLowerInvariant() : "yes"; - optionsDictionary[k] = v; - } - - Load(optionsDictionary); - } + { + // This special command-line option prevents the registry values from being used. + AllowUserSettings = !options.Contains("skip-user-settings", StringComparer.OrdinalIgnoreCase); + + // Pull apart the command-line options so we can find them by setting name. + var optionsDictionary = new Dictionary(); + foreach (var option in options) + { + var k = option.Split(new[] { '=', ':' }, 2)[0].ToLowerInvariant(); + var v = option.Contains('=') || option.Contains(':') ? option.Split(new[] { '=', ':' }, 2)[1].ToLowerInvariant() : "yes"; + optionsDictionary[k] = v; + } + + Load(optionsDictionary); + } /// /// Load a single value from the store, once type of the setting is known @@ -128,54 +128,54 @@ protected void Load(IEnumerable options) /// name of the setting /// type of the setting protected void Load(Dictionary optionsDictionary, string name, Type type) - { - // Get the default value. - var defValue = GetDefaultValue(name); + { + // Get the default value. + var defValue = GetDefaultValue(name); - // Read in the user setting, if it exists. - var userValue = AllowUserSettings ? SettingStore.GetUserValue(name, type) : null; + // Read in the user setting, if it exists. + var userValue = AllowUserSettings ? SettingStore.GetUserValue(name, type) : null; - // Read in the command-line option, if it exists into optValue. - var propertyNameLower = name.ToLowerInvariant(); - var optValue = optionsDictionary.ContainsKey(propertyNameLower) ? (object)optionsDictionary[propertyNameLower] : null; + // Read in the command-line option, if it exists into optValue. + var propertyNameLower = name.ToLowerInvariant(); + var optValue = optionsDictionary.ContainsKey(propertyNameLower) ? (object)optionsDictionary[propertyNameLower] : null; // Parse command-line options... - if ((optValue != null) && (type == typeof(bool))) + if ((optValue != null) && (type == typeof(bool))) // Option for boolean types so true/yes/on/1 are all true; everything else is false. optValue = new[] { "true", "yes", "on", "1" }.Contains(optValue); - else if ((optValue != null) && (type == typeof(int))) + else if ((optValue != null) && (type == typeof(int))) // Option for int types. optValue = int.Parse((string)optValue); - else if ((optValue != null) && (type == typeof(string[]))) + else if ((optValue != null) && (type == typeof(string[]))) // Option for string[] types. optValue = ((string)optValue).Split(',').Select(s => s.Trim()).ToArray(); - else if ((optValue != null) && (type == typeof(int[]))) + else if ((optValue != null) && (type == typeof(int[]))) // Option for int[] types. optValue = ((string)optValue).Split(',').Select(s => int.Parse(s.Trim())).ToArray(); - // We now have defValue, regValue, optValue containing the default, persisted and override values - // for the setting. regValue and optValue are null if they are not found/specified. - var value = optValue != null ? optValue : userValue != null ? userValue : defValue; - try - { - // int[] values must have the same number of items as default value. - if ((type == typeof(int[])) && (value != null) && ((int[])value).Length != ((int[])defValue).Length) - throw new ArgumentException(); - - SetValue(name, value); - Sources.Add(name, value.Equals(defValue) ? Source.Default : optValue != null ? Source.CommandLine : userValue != null ? Source.User : Source.Default); - } - catch (ArgumentException) - { - Trace.TraceWarning("Unable to load {0} value from type {1}", name, value.GetType().FullName); - value = defValue; - Sources.Add(name, Source.Default); - } - } + // We now have defValue, regValue, optValue containing the default, persisted and override values + // for the setting. regValue and optValue are null if they are not found/specified. + var value = optValue != null ? optValue : userValue != null ? userValue : defValue; + try + { + // int[] values must have the same number of items as default value. + if ((type == typeof(int[])) && (value != null) && ((int[])value).Length != ((int[])defValue).Length) + throw new ArgumentException(); + + SetValue(name, value); + Sources.Add(name, value.Equals(defValue) ? Source.Default : optValue != null ? Source.CommandLine : userValue != null ? Source.User : Source.Default); + } + catch (ArgumentException) + { + Trace.TraceWarning("Unable to load {0} value from type {1}", name, value.GetType().FullName); + value = defValue; + Sources.Add(name, Source.Default); + } + } /// /// Save a setting to the store, if name and especially type are known @@ -183,24 +183,24 @@ protected void Load(Dictionary optionsDictionary, string name, T /// name of the setting /// type of the setting protected void Save(string name, Type type) - { - var defValue = GetDefaultValue(name); - var value = GetValue(name); - - if (defValue.Equals(value) - || (type == typeof(string[]) && String.Join(",", (string[])defValue) == String.Join(",", (string[])value)) - || (type == typeof(int[]) && String.Join(",", ((int[])defValue).Select(v => v.ToString()).ToArray()) == String.Join(",", ((int[])value).Select(v => v.ToString()).ToArray()))) - { - SettingStore.DeleteUserValue(name); - } - else if (type == typeof(string)) - { - SettingStore.SetUserValue(name, (string)value); - } - else if (type == typeof(int)) - { - SettingStore.SetUserValue(name, (int)value); - } + { + var defValue = GetDefaultValue(name); + var value = GetValue(name); + + if (defValue.Equals(value) + || (type == typeof(string[]) && String.Join(",", (string[])defValue) == String.Join(",", (string[])value)) + || (type == typeof(int[]) && String.Join(",", ((int[])defValue).Select(v => v.ToString()).ToArray()) == String.Join(",", ((int[])value).Select(v => v.ToString()).ToArray()))) + { + SettingStore.DeleteUserValue(name); + } + else if (type == typeof(string)) + { + SettingStore.SetUserValue(name, (string)value); + } + else if (type == typeof(int)) + { + SettingStore.SetUserValue(name, (int)value); + } else if (type == typeof(bool)) { SettingStore.SetUserValue(name, (bool)value); @@ -214,14 +214,14 @@ protected void Save(string name, Type type) SettingStore.SetUserValue(name, (TimeSpan)value); } else if (type == typeof(string[])) - { - SettingStore.SetUserValue(name, (string[])value); - } - else if (type == typeof(int[])) - { - SettingStore.SetUserValue(name, (int[])value); - } - } + { + SettingStore.SetUserValue(name, (string[])value); + } + else if (type == typeof(int[])) + { + SettingStore.SetUserValue(name, (int[])value); + } + } /// /// Reset a single setting to its default @@ -232,5 +232,5 @@ protected void Reset(string name) SetValue(name, GetDefaultValue(name)); SettingStore.DeleteUserValue(name); } - } + } } diff --git a/Source/ORTS.Common/SettingsStore.cs b/Source/ORTS.Common/SettingsStore.cs index d22cabdad7..e86ab9a0a6 100644 --- a/Source/ORTS.Common/SettingsStore.cs +++ b/Source/ORTS.Common/SettingsStore.cs @@ -16,6 +16,7 @@ // along with Open Rails. If not, see . using System; +using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; @@ -26,11 +27,11 @@ namespace ORTS.Common { - /// - /// Base class for all means of persisting settings from the user/game. - /// - public abstract class SettingsStore - { + /// + /// Base class for all means of persisting settings from the user/game. + /// + public abstract class SettingsStore + { /// Name of a 'section', to distinguish various part within a underlying store protected string Section { get; private set; } @@ -39,9 +40,9 @@ public abstract class SettingsStore /// /// Name of the 'section', to distinguish various part within a underlying store protected SettingsStore(string section) - { - Section = section; - } + { + Section = section; + } /// /// Assert that the type expected from the settings store is an allowed type. @@ -144,29 +145,29 @@ protected static void AssertGetUserValueType(Type expectedType) /// Name to distinguish between various 'section's used in underlying store. /// The created SettingsStore public static SettingsStore GetSettingStore(string filePath, string registryKey, string section) - { - if (!String.IsNullOrEmpty(filePath) && File.Exists(filePath)) - return new SettingsStoreLocalIni(filePath, section); - if (!String.IsNullOrEmpty(registryKey)) - return new SettingsStoreRegistry(registryKey, section); - throw new ArgumentException("Neither 'filePath' nor 'registryKey' arguments are valid."); - } - } - - /// + { + if (!String.IsNullOrEmpty(filePath) && File.Exists(filePath)) + return new SettingsStoreLocalIni(filePath, section); + if (!String.IsNullOrEmpty(registryKey)) + return new SettingsStoreRegistry(registryKey, section); + throw new ArgumentException("Neither 'filePath' nor 'registryKey' arguments are valid."); + } + } + + /// /// Registry implementation of . - /// - public sealed class SettingsStoreRegistry : SettingsStore - { - readonly string RegistryKey; - readonly RegistryKey Key; + /// + public sealed class SettingsStoreRegistry : SettingsStore + { + readonly string RegistryKey; + readonly RegistryKey Key; - internal SettingsStoreRegistry(string registryKey, string section) - : base(section) - { - RegistryKey = String.IsNullOrEmpty(section) ? registryKey : registryKey + @"\" + section; - Key = Registry.CurrentUser.CreateSubKey(RegistryKey); - } + internal SettingsStoreRegistry(string registryKey, string section) + : base(section) + { + RegistryKey = String.IsNullOrEmpty(section) ? registryKey : registryKey + @"\" + section; + Key = Registry.CurrentUser.CreateSubKey(RegistryKey); + } /// /// Return an array of all setting-names that are in the store @@ -284,9 +285,9 @@ public override void SetUserValue(string name, string value) /// name of the setting /// value of the setting public override void SetUserValue(string name, int[] value) - { - Key.SetValue(name, String.Join(",", ((int[])value).Select(v => v.ToString()).ToArray()), RegistryValueKind.String); - } + { + Key.SetValue(name, String.Join(",", ((int[])value).Select(v => v.ToString()).ToArray()), RegistryValueKind.String); + } /// /// Set a value of a user setting @@ -303,25 +304,25 @@ public override void SetUserValue(string name, string[] value) /// /// name of the setting public override void DeleteUserValue(string name) - { - Key.DeleteValue(name, false); - } - } + { + Key.DeleteValue(name, false); + } + } - /// + /// /// INI file implementation of . - /// - public sealed class SettingsStoreLocalIni : SettingsStore - { - const string DefaultSection = "ORTS"; + /// + public sealed class SettingsStoreLocalIni : SettingsStore + { + const string DefaultSection = "ORTS"; - readonly string FilePath; + readonly string FilePath; - internal SettingsStoreLocalIni(string filePath, string section) - : base(String.IsNullOrEmpty(section) ? DefaultSection : section) - { - FilePath = filePath; - } + internal SettingsStoreLocalIni(string filePath, string section) + : base(String.IsNullOrEmpty(section) ? DefaultSection : section) + { + FilePath = filePath; + } /// /// Returns an array of all sections within the store, including the one used by this instance. @@ -446,9 +447,9 @@ public override object GetUserValue(string name, Type expectedType) /// name of the setting /// value of the setting public override void SetUserValue(string name, bool value) - { - NativeMethods.WritePrivateProfileString(Section, name, "bool:" + (value ? "true" : "false"), FilePath); - } + { + NativeMethods.WritePrivateProfileString(Section, name, "bool:" + (value ? "true" : "false"), FilePath); + } /// /// Set a value of a user setting @@ -496,9 +497,9 @@ public override void SetUserValue(string name, TimeSpan value) /// name of the setting /// value of the setting public override void SetUserValue(string name, string value) - { - NativeMethods.WritePrivateProfileString(Section, name, "string:" + Uri.EscapeDataString(value), FilePath); - } + { + NativeMethods.WritePrivateProfileString(Section, name, "string:" + Uri.EscapeDataString(value), FilePath); + } /// /// Set a value of a user setting @@ -506,9 +507,9 @@ public override void SetUserValue(string name, string value) /// name of the setting /// value of the setting public override void SetUserValue(string name, int[] value) - { - NativeMethods.WritePrivateProfileString(Section, name, "int[]:" + String.Join(",", ((int[])value).Select(v => Uri.EscapeDataString(v.ToString(CultureInfo.InvariantCulture))).ToArray()), FilePath); - } + { + NativeMethods.WritePrivateProfileString(Section, name, "int[]:" + String.Join(",", ((int[])value).Select(v => Uri.EscapeDataString(v.ToString(CultureInfo.InvariantCulture))).ToArray()), FilePath); + } /// /// Set a value of a user setting @@ -516,26 +517,26 @@ public override void SetUserValue(string name, int[] value) /// name of the setting /// value of the setting public override void SetUserValue(string name, string[] value) - { - NativeMethods.WritePrivateProfileString(Section, name, "string[]:" + String.Join(",", value.Select(v => Uri.EscapeDataString(v)).ToArray()), FilePath); - } + { + NativeMethods.WritePrivateProfileString(Section, name, "string[]:" + String.Join(",", value.Select(v => Uri.EscapeDataString(v)).ToArray()), FilePath); + } /// /// Remove a user setting from the store /// /// name of the setting public override void DeleteUserValue(string name) - { - NativeMethods.WritePrivateProfileString(Section, name, null, FilePath); - } - } + { + NativeMethods.WritePrivateProfileString(Section, name, null, FilePath); + } + } // TODO: This class and its methods should be internal visibility. /// /// Native methods for interacting with INI files. /// public static class NativeMethods - { + { /// /// Retrieves all the keys and values for the specified section of an initialization file. /// diff --git a/Source/ORTS.Common/SmoothedData.cs b/Source/ORTS.Common/SmoothedData.cs index f704c8a52e..df1062477f 100644 --- a/Source/ORTS.Common/SmoothedData.cs +++ b/Source/ORTS.Common/SmoothedData.cs @@ -17,6 +17,8 @@ using System; using System.Collections.Generic; +using System.Linq; +using System.Text; namespace ORTS.Common { diff --git a/Source/ORTS.Common/SystemInfo.cs b/Source/ORTS.Common/SystemInfo.cs index 6b17bc72ff..6789e3e206 100644 --- a/Source/ORTS.Common/SystemInfo.cs +++ b/Source/ORTS.Common/SystemInfo.cs @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using Microsoft.Win32; using System; using System.Diagnostics; using System.IO; @@ -22,7 +23,6 @@ using System.Runtime.InteropServices; using System.Text; using System.Windows.Forms; -using Microsoft.Win32; using Microsoft.Xna.Framework.Graphics; namespace ORTS.Common @@ -201,8 +201,7 @@ static string WriteInstalledRuntimes(TextWriter output, string versionKeyName, R static void WriteGraphicsAdapter(TextWriter output) { - try - { + try { foreach (var adapter in GraphicsAdapter.Adapters) { try diff --git a/Source/ORTS.Common/TrackMonitorSignalAspect.cs b/Source/ORTS.Common/TrackMonitorSignalAspect.cs index 96a1f54369..ddc54366d6 100644 --- a/Source/ORTS.Common/TrackMonitorSignalAspect.cs +++ b/Source/ORTS.Common/TrackMonitorSignalAspect.cs @@ -17,6 +17,11 @@ // This file is the responsibility of the 3D & Environment Team. +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + namespace ORTS.Common { public enum TrackMonitorSignalAspect diff --git a/Source/ORTS.Common/VersionInfo.cs b/Source/ORTS.Common/VersionInfo.cs index 8eaf4ead6b..54bf2a681a 100644 --- a/Source/ORTS.Common/VersionInfo.cs +++ b/Source/ORTS.Common/VersionInfo.cs @@ -19,6 +19,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; +using System.Linq; namespace ORTS.Common { diff --git a/Source/ORTS.Common/WorldLatLon.cs b/Source/ORTS.Common/WorldLatLon.cs index de7916bd8f..40a9ba41c8 100644 --- a/Source/ORTS.Common/WorldLatLon.cs +++ b/Source/ORTS.Common/WorldLatLon.cs @@ -29,8 +29,8 @@ // Rick Grout // -using System; using Microsoft.Xna.Framework; +using System; namespace Orts.Common { diff --git a/Source/ORTS.Common/enums.cs b/Source/ORTS.Common/enums.cs index 5446a62adc..07b8ee864f 100644 --- a/Source/ORTS.Common/enums.cs +++ b/Source/ORTS.Common/enums.cs @@ -15,6 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + namespace ORTS.Common { public enum Direction diff --git a/Source/ORTS.Content/MSTSPath.cs b/Source/ORTS.Content/MSTSPath.cs index 425cf0ad16..3c511c551c 100644 --- a/Source/ORTS.Content/MSTSPath.cs +++ b/Source/ORTS.Content/MSTSPath.cs @@ -15,8 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System.IO; +using System; +using System.Collections.Generic; +using System.Text; +using System.Diagnostics; using Microsoft.Win32; +using System.IO; namespace MSTS { @@ -40,20 +44,20 @@ public static string Base() */ { - if (DefaultLocation == null) - { - DefaultLocation = "c:\\program files\\microsoft games\\train simulator"; + if (DefaultLocation == null) + { + DefaultLocation = "c:\\program files\\microsoft games\\train simulator"; - RegistryKey RK = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Microsoft Games\Train Simulator\1.0"); - if (RK == null) - RK = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Wow6432Node\Microsoft\Microsoft Games\Train Simulator\1.0"); - if (RK != null) - DefaultLocation = (string)RK.GetValue("Path", DefaultLocation); + RegistryKey RK = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Microsoft Games\Train Simulator\1.0"); + if (RK == null) + RK = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Wow6432Node\Microsoft\Microsoft Games\Train Simulator\1.0"); + if (RK != null) + DefaultLocation = (string)RK.GetValue("Path", DefaultLocation); - // Verify installation at this location - if (!Directory.Exists(DefaultLocation)) - throw new FileNotFoundException("MSTS directory '" + DefaultLocation + "' does not exist.", DefaultLocation); - } + // Verify installation at this location + if (!Directory.Exists(DefaultLocation)) + throw new FileNotFoundException("MSTS directory '" + DefaultLocation + "' does not exist.", DefaultLocation); + } return DefaultLocation; } // diff --git a/Source/ORTS.IO/BufferedInMemoryStream.cs b/Source/ORTS.IO/BufferedInMemoryStream.cs index 33e3b66686..abceafc46e 100644 --- a/Source/ORTS.IO/BufferedInMemoryStream.cs +++ b/Source/ORTS.IO/BufferedInMemoryStream.cs @@ -20,127 +20,109 @@ namespace ORTS.IO { - /// - /// A which buffers both reads and writes in memory (as a ). - /// - /// - /// Treat this stream like any other; , , all work normally (or close enough) in most - /// cases. There are some specific exceptions, which shouldn't be a problem normally, outlined below. - /// When reading, if the underlying stream does not report a length itself, the value reported by represents the amount - /// buffered. The attempts to keep the beyond the current seek location at all times. - /// when reading, will operate normally but only within the data already buffered; attempts to seek beyond this will raise - /// an exception. There is no way to force a certain amount of data to be buffered. - /// When writing, is a no-op and is not implemented. None of the methods and - /// properties will cause data to be written to the underlying stream. - /// When writing, to cause all buffered data to be written to the underlying stream, call . This non-standard behavior - /// is due to unfortunate existing code which calls after writing to a , which would otherwise cause us a - /// problem with write-once underlying streams (which we're specifically trying to support here). - /// - public class BufferedInMemoryStream : Stream - { - MemoryStream Memory; - Stream Base; - long WritePosition; - const int ChunkSize = 1024; - - public BufferedInMemoryStream(Stream stream) - { - Memory = new MemoryStream(); - Base = stream; - } - - public override void Close() - { - base.Close(); - Base.Close(); - } - - void ReadChunk(int chunk) - { - var buffer = new byte[chunk]; - var bytes = Base.Read(buffer, 0, chunk); - var oldPosition = Memory.Position; - Memory.Seek(0, SeekOrigin.End); - Memory.Write(buffer, 0, bytes); - Memory.Seek(oldPosition, SeekOrigin.Begin); - } - - public override bool CanRead - { - get { return true; } - } - - public override bool CanSeek - { - get { return true; } - } - - public override bool CanWrite - { - get { return Base.CanWrite; } - } - - public override void Flush() - { - } - - public void RealFlush() - { - if (Memory.Position > WritePosition) - { - var currentPosition = Memory.Position; - Memory.Seek(WritePosition, SeekOrigin.Begin); - var buffer = new byte[currentPosition - WritePosition]; - Memory.Read(buffer, 0, buffer.Length); - Base.Write(buffer, 0, buffer.Length); - WritePosition = currentPosition; - Memory.Position = currentPosition; - } - - Base.Flush(); - } - - public override long Length - { - get - { - if (Base.CanSeek) return Base.Length; - if (Base.CanRead && (Memory.Position + ChunkSize >= Memory.Length)) ReadChunk(ChunkSize); - return Memory.Length; - } - } - - public override long Position - { - get - { - return Memory.Position; - } - set - { - Memory.Position = value; - } - } - - public override int Read(byte[] buffer, int offset, int count) - { - if (Memory.Position + count > Memory.Length) ReadChunk(count); - return Memory.Read(buffer, offset, count); - } - - public override long Seek(long offset, SeekOrigin origin) - { - return Memory.Seek(offset, origin); - } - - public override void SetLength(long value) - { - throw new NotImplementedException(); - } - - public override void Write(byte[] buffer, int offset, int count) - { - Memory.Write(buffer, offset, count); - } - } + /// + /// A which buffers both reads and writes in memory (as a ). + /// + /// + /// Treat this stream like any other; , , all work normally (or close enough) in most + /// cases. There are some specific exceptions, which shouldn't be a problem normally, outlined below. + /// When reading, if the underlying stream does not report a length itself, the value reported by represents the amount + /// buffered. The attempts to keep the beyond the current seek location at all times. + /// when reading, will operate normally but only within the data already buffered; attempts to seek beyond this will raise + /// an exception. There is no way to force a certain amount of data to be buffered. + /// When writing, is a no-op and is not implemented. None of the methods and + /// properties will cause data to be written to the underlying stream. + /// When writing, to cause all buffered data to be written to the underlying stream, call . This non-standard behavior + /// is due to unfortunate existing code which calls after writing to a , which would otherwise cause us a + /// problem with write-once underlying streams (which we're specifically trying to support here). + /// + public class BufferedInMemoryStream : Stream + { + MemoryStream Memory; + Stream Base; + long WritePosition; + const int ChunkSize = 1024; + + public BufferedInMemoryStream(Stream stream) { + Memory = new MemoryStream(); + Base = stream; + } + + public override void Close() { + base.Close(); + Base.Close(); + } + + void ReadChunk(int chunk) { + var buffer = new byte[chunk]; + var bytes = Base.Read(buffer, 0, chunk); + var oldPosition = Memory.Position; + Memory.Seek(0, SeekOrigin.End); + Memory.Write(buffer, 0, bytes); + Memory.Seek(oldPosition, SeekOrigin.Begin); + } + + public override bool CanRead { + get { return true; } + } + + public override bool CanSeek { + get { return true; } + } + + public override bool CanWrite { + get { return Base.CanWrite; } + } + + public override void Flush() { + } + + public void RealFlush() { + if (Memory.Position > WritePosition) { + var currentPosition = Memory.Position; + Memory.Seek(WritePosition, SeekOrigin.Begin); + var buffer = new byte[currentPosition - WritePosition]; + Memory.Read(buffer, 0, buffer.Length); + Base.Write(buffer, 0, buffer.Length); + WritePosition = currentPosition; + Memory.Position = currentPosition; + } + + Base.Flush(); + } + + public override long Length { + get { + if (Base.CanSeek) return Base.Length; + if (Base.CanRead && (Memory.Position + ChunkSize >= Memory.Length)) ReadChunk(ChunkSize); + return Memory.Length; + } + } + + public override long Position { + get { + return Memory.Position; + } + set { + Memory.Position = value; + } + } + + public override int Read(byte[] buffer, int offset, int count) { + if (Memory.Position + count > Memory.Length) ReadChunk(count); + return Memory.Read(buffer, offset, count); + } + + public override long Seek(long offset, SeekOrigin origin) { + return Memory.Seek(offset, origin); + } + + public override void SetLength(long value) { + throw new NotImplementedException(); + } + + public override void Write(byte[] buffer, int offset, int count) { + Memory.Write(buffer, offset, count); + } + } } diff --git a/Source/ORTS.IO/ByteEncoding.cs b/Source/ORTS.IO/ByteEncoding.cs index 368ed3a13a..3fece49995 100644 --- a/Source/ORTS.IO/ByteEncoding.cs +++ b/Source/ORTS.IO/ByteEncoding.cs @@ -19,95 +19,86 @@ namespace ORTS.IO { - /// - /// A basic encoding which maps bytes 0-255 to Unicode characters 0-255. - /// - public class ByteEncoding : Encoding - { - public static Encoding Encoding = new ByteEncoding(); + /// + /// A basic encoding which maps bytes 0-255 to Unicode characters 0-255. + /// + public class ByteEncoding : Encoding + { + public static Encoding Encoding = new ByteEncoding(); - public ByteEncoding() - { - } + public ByteEncoding() { + } - /// - /// Calculates the number of bytes produced by encoding a set of characters from the specified character array. - /// - /// The character array containing the set of characters to encode. - /// The index of the first character to encode. - /// The number of characters to encode. - /// The number of bytes produced by encoding the specified characters. - public override int GetByteCount(char[] chars, int index, int count) - { - return count; - } + /// + /// Calculates the number of bytes produced by encoding a set of characters from the specified character array. + /// + /// The character array containing the set of characters to encode. + /// The index of the first character to encode. + /// The number of characters to encode. + /// The number of bytes produced by encoding the specified characters. + public override int GetByteCount(char[] chars, int index, int count) { + return count; + } - /// - /// Encodes a set of characters from the specified character array into the specified byte array. - /// - /// The character array containing the set of characters to encode. - /// The index of the first character to encode. - /// The number of characters to encode. - /// The byte array to contain the resulting sequence of bytes. - /// The index at which to start writing the resulting sequence of bytes. - /// The actual number of bytes written into . - public override int GetBytes(char[] chars, int charIndex, int charCount, byte[] bytes, int byteIndex) - { - for (var i = 0; i < charCount; i++) - { - bytes[i + byteIndex] = (byte)chars[i + charIndex]; - } - return charCount; - } + /// + /// Encodes a set of characters from the specified character array into the specified byte array. + /// + /// The character array containing the set of characters to encode. + /// The index of the first character to encode. + /// The number of characters to encode. + /// The byte array to contain the resulting sequence of bytes. + /// The index at which to start writing the resulting sequence of bytes. + /// The actual number of bytes written into . + public override int GetBytes(char[] chars, int charIndex, int charCount, byte[] bytes, int byteIndex) { + for (var i = 0; i < charCount; i++) { + bytes[i + byteIndex] = (byte)chars[i + charIndex]; + } + return charCount; + } - /// - /// Calculates the number of characters produced by decoding a sequence of bytes from the specified byte array. - /// - /// The byte array containing the sequence of bytes to decode. - /// The index of the first byte to decode. - /// The number of bytes to decode. - /// The number of characters produced by decoding the specified sequence of bytes. - public override int GetCharCount(byte[] bytes, int index, int count) - { - return count; - } + /// + /// Calculates the number of characters produced by decoding a sequence of bytes from the specified byte array. + /// + /// The byte array containing the sequence of bytes to decode. + /// The index of the first byte to decode. + /// The number of bytes to decode. + /// The number of characters produced by decoding the specified sequence of bytes. + public override int GetCharCount(byte[] bytes, int index, int count) { + return count; + } - /// - /// Decodes a sequence of bytes from the specified byte array into the specified character array. - /// - /// The byte array containing the sequence of bytes to decode. - /// The index of the first byte to decode. - /// The number of bytes to decode. - /// The character array to contain the resulting set of characters. - /// The index at which to start writing the resulting set of characters. - /// The actual number of characters written into . - public override int GetChars(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex) - { - for (var i = 0; i < byteCount; i++) - { - chars[i + charIndex] = (char)bytes[i + byteIndex]; - } - return byteCount; - } + /// + /// Decodes a sequence of bytes from the specified byte array into the specified character array. + /// + /// The byte array containing the sequence of bytes to decode. + /// The index of the first byte to decode. + /// The number of bytes to decode. + /// The character array to contain the resulting set of characters. + /// The index at which to start writing the resulting set of characters. + /// The actual number of characters written into . + public override int GetChars(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex) { + for (var i = 0; i < byteCount; i++) { + chars[i + charIndex] = (char)bytes[i + byteIndex]; + } + return byteCount; + } - /// - /// Calculates the maximum number of bytes produced by encoding the specified number of characters. - /// - /// The number of characters to encode. - /// The maximum number of bytes produced by encoding the specified number of characters. - public override int GetMaxByteCount(int charCount) - { - return charCount; - } + /// + /// Calculates the maximum number of bytes produced by encoding the specified number of characters. + /// + /// The number of characters to encode. + /// The maximum number of bytes produced by encoding the specified number of characters. + public override int GetMaxByteCount(int charCount) { + return charCount; + } - /// - /// Calculates the maximum number of characters produced by decoding the specified number of bytes. - /// - /// The number of bytes to decode. - /// The maximum number of characters produced by decoding the specified number of bytes. - public override int GetMaxCharCount(int byteCount) - { - return byteCount; - } - } + /// + /// Calculates the maximum number of characters produced by decoding the specified number of bytes. + /// + /// The number of bytes to decode. + /// The maximum number of characters produced by decoding the specified number of bytes. + public override int GetMaxCharCount(int byteCount) { + return byteCount; + } + } } diff --git a/Source/ORTS.Menu/Activities.cs b/Source/ORTS.Menu/Activities.cs index 5c59cfcc69..e813715d2a 100644 --- a/Source/ORTS.Menu/Activities.cs +++ b/Source/ORTS.Menu/Activities.cs @@ -19,6 +19,7 @@ using System.IO; using GNU.Gettext; using Orts.Formats.Msts; +using ORTS.Settings; namespace ORTS.Menu { diff --git a/Source/ORTS.Menu/Consists.cs b/Source/ORTS.Menu/Consists.cs index 34d42adcdc..c3ee1d5ce7 100644 --- a/Source/ORTS.Menu/Consists.cs +++ b/Source/ORTS.Menu/Consists.cs @@ -20,6 +20,7 @@ using System.Linq; using GNU.Gettext; using Orts.Formats.Msts; +using ORTS.Settings; namespace ORTS.Menu { diff --git a/Source/ORTS.Menu/Folders.cs b/Source/ORTS.Menu/Folders.cs index 6413a47eaa..fd735ff799 100644 --- a/Source/ORTS.Menu/Folders.cs +++ b/Source/ORTS.Menu/Folders.cs @@ -15,9 +15,9 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using ORTS.Settings; using System.Collections.Generic; using System.IO; -using ORTS.Settings; namespace ORTS.Menu { diff --git a/Source/ORTS.Menu/ORTimetables.cs b/Source/ORTS.Menu/ORTimetables.cs index c44683b33f..391548336e 100644 --- a/Source/ORTS.Menu/ORTimetables.cs +++ b/Source/ORTS.Menu/ORTimetables.cs @@ -15,11 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using GNU.Gettext; +using Orts.Formats.Msts; +using Orts.Formats.OR; using System; using System.Collections.Generic; using System.IO; -using GNU.Gettext; -using Orts.Formats.OR; namespace ORTS.Menu { diff --git a/Source/ORTS.Menu/Paths.cs b/Source/ORTS.Menu/Paths.cs index bc9eb54278..8720d81ac1 100644 --- a/Source/ORTS.Menu/Paths.cs +++ b/Source/ORTS.Menu/Paths.cs @@ -15,11 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; using System.Collections.Generic; using System.IO; using GNU.Gettext; using Orts.Formats.Msts; +using System; namespace ORTS.Menu { @@ -145,8 +145,7 @@ public static Path GetPath(Route route, string name, bool allowNonPlayerPath) { path = new Path(file); } - catch - { + catch { path = null; } diff --git a/Source/ORTS.Menu/Routes.cs b/Source/ORTS.Menu/Routes.cs index 70626bd45f..edcaca021b 100644 --- a/Source/ORTS.Menu/Routes.cs +++ b/Source/ORTS.Menu/Routes.cs @@ -36,10 +36,10 @@ public class Route { if (Directory.Exists(path)) { - var trkFilePath = MSTSPath.GetTRKFileName(path); + var trkFilePath = MSTSPath.GetTRKFileName(path); try { - var trkFile = new RouteFile(trkFilePath); + var trkFile = new RouteFile(trkFilePath); Name = trkFile.Tr_RouteFile.Name.Trim(); RouteID = trkFile.Tr_RouteFile.RouteID; Description = trkFile.Tr_RouteFile.Description.Trim(); diff --git a/Source/ORTS.Settings/FolderSettings.cs b/Source/ORTS.Settings/FolderSettings.cs index 8c398cc267..9fe429bc1f 100644 --- a/Source/ORTS.Settings/FolderSettings.cs +++ b/Source/ORTS.Settings/FolderSettings.cs @@ -15,7 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; using ORTS.Common; namespace ORTS.Settings diff --git a/Source/ORTS.Settings/InputSettings.cs b/Source/ORTS.Settings/InputSettings.cs index 9cfe3206f4..5202db55c9 100644 --- a/Source/ORTS.Settings/InputSettings.cs +++ b/Source/ORTS.Settings/InputSettings.cs @@ -15,6 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using GNU.Gettext; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Input; +using ORTS.Common; +using ORTS.Common.Input; using System; using System.Collections.Generic; using System.Diagnostics; @@ -23,11 +28,6 @@ using System.Linq; using System.Runtime.InteropServices; using System.Text; -using GNU.Gettext; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Input; -using ORTS.Common; -using ORTS.Common.Input; namespace ORTS.Settings { diff --git a/Source/ORTS.Settings/UpdateState.cs b/Source/ORTS.Settings/UpdateState.cs index 0efef1d5f2..c135fc309b 100644 --- a/Source/ORTS.Settings/UpdateState.cs +++ b/Source/ORTS.Settings/UpdateState.cs @@ -15,12 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using ORTS.Common; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Reflection; -using ORTS.Common; namespace ORTS.Settings { diff --git a/Source/ORTS.Updater/NativeMethods.cs b/Source/ORTS.Updater/NativeMethods.cs index fdec42afac..d4a1a44908 100644 --- a/Source/ORTS.Updater/NativeMethods.cs +++ b/Source/ORTS.Updater/NativeMethods.cs @@ -16,7 +16,10 @@ // along with Open Rails. If not, see . using System; +using System.Collections.Generic; +using System.Linq; using System.Runtime.InteropServices; +using System.Text; namespace ORTS.Updater { diff --git a/Source/ORTS.Updater/UpdateManager.cs b/Source/ORTS.Updater/UpdateManager.cs index 3206409c0c..768ff8d743 100644 --- a/Source/ORTS.Updater/UpdateManager.cs +++ b/Source/ORTS.Updater/UpdateManager.cs @@ -15,6 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using Ionic.Zip; +using Newtonsoft.Json; +using ORTS.Common; +using ORTS.Settings; using System; using System.Collections.Generic; using System.ComponentModel; @@ -30,10 +34,6 @@ using System.Text; using System.Threading; using System.Windows.Forms; -using Ionic.Zip; -using Newtonsoft.Json; -using ORTS.Common; -using ORTS.Settings; namespace ORTS.Updater { diff --git a/Source/Orts.Formats.Msts/ActivityFile.cs b/Source/Orts.Formats.Msts/ActivityFile.cs index ac3a8541b1..c1fd16024f 100644 --- a/Source/Orts.Formats.Msts/ActivityFile.cs +++ b/Source/Orts.Formats.Msts/ActivityFile.cs @@ -54,17 +54,17 @@ // *) // RouteID = "RouteID", "(", Text, ")" ; (* file name *) - + // Name = "Name", "(", Text, ")" ; - + // Description = "Description", "(", Text, ")" ; // Briefing = "Briefing", "(", ParagraphText, ")" ; - + // ParagraphText = Text, *( "+", Text ) ; - + // CompleteActivity = "CompleteActivity", "(", Integer, ")" ; (* 1 for true (to be checked) *) - + // Type = "Type", "(", Integer, ")" ; (* 0 (default) for ??? (to be checked) *) // Mode = "Mode", "(", Integer, ")" ; (* 2 (default) for ??? (to be checked) *) @@ -84,25 +84,25 @@ // Difficulty = "Difficulty", "(", Integer, ")" ; (* Easy=0 (default), Medium, Hard *) // Animals = "Animals", "(", Integer, ")" ; (* 0-100 for % (default is 100) *) - + // Workers = "Workers", "(", Integer, ")" ; (* 0-100 for % (default is 0) *) - + // FuelWater = "FuelWater", "(", Integer, ")"; (* 0-100 for % (default is 100) *) - + // FuelCoal = "FuelCoal", "(", Integer, ")"; (* 0-100 for % (default is 100) *) - + // FuelDiesel = "FuelDiesel", "(", Integer, ")"; (* 0-100 for % (default is 100) *) // Tr_Activity_File = "Tr_Activity_File", // "(", *[ Player_Service_Definition | NextServiceUID | NextActivityObjectUID // | Traffic_Definition | Events | ActivityObjects | ActivityFailedSignals | PlatformNumPassengersWaiting | ActivityRestrictedSpeedZones ] ")" ; - + // Player_Service_Definition = "Player_Service_Definition", (* Text is linked to PathID somehow. *) // "(", Text, [ Player_Traffic_Definition | UiD | *Player_Service_Item ], ")" ; (* Code suggests just one Player_Traffic_Definition *) - + // Player_Traffic_Definition = "Player_Traffic_Definition", // "(", Integer, *( Player_Traffic_Item ), ")" ; - + // Player_Traffic_Item = (* Note lack of separator between Player_Traffic_Items. // For simplicity, parser creates a new object whenever PlatformStartID is parsed. *) // *[ "ArrivalTime", "(", Integer, ")" @@ -110,7 +110,7 @@ // | "SkipCount", "(", Integer, ")" // | "DistanceDownPath", "(", Float, ")" ], // "PlatformStartID", "(", Integer, ")" ; - + // UiD = "UiD", "(", Integer, ")" ; // Player_Service_Item = (* Note lack of separator between Player_Service_Items *) @@ -119,13 +119,13 @@ // | "SkipCount", "(", Integer, ")" // | "DistanceDownPath", "(", Float, ")" ], // "PlatformStartID", "(", Integer, ")" ; - + // NextServiceUID = "NextServiceUID", "(", Integer, ")" ; // NextActivityObjectUID = "NextActivityObjectUID", "(", Integer, ")" ; - + // Traffic_Definition = "Traffic_Definition", "(", Text, *Service_Definition, ")" ; - + // Service_Definition = "Service_Definition", // "(", Text, Integer, UiD, *Player_Service_Item, ")" ; (* Integer is time in seconds *) @@ -135,34 +135,34 @@ // EventCategoryLocation = "EventCategoryLocation", // "(", *[ EventTypeLocation | ID | Activation_Level | Outcomes // | Name | Location | TriggerOnStop ], ")" ; (* ID and Name defined above *) - + // EventTypeLocation = "EventTypeLocation", "(", ")" ; - + // ID = "ID", "(", Integer, ")" ; - + // Activation_Level = "Activation_Level", "(", Integer, ")" ; - + // Outcomes = "Outcomes", // "(", *[ ActivitySuccess | ActivityFail | ActivateEvent | RestoreActLevel | DecActLevel | IncActLevel | DisplayMessage ], ")" ; - + // ActivitySuccess = "ActivitySuccess", "(", ")" ; (* No text parameter *) - + // ActivityFail = "ActivityFail", "(", Text, ")" ; - + // ActivateEvent = "ActivateEvent", "(", Integer, ")" ; // RestoreActLevel = "RestoreActLevel", "(", Integer, ")" ; // DecActLevel = "DecActLevel", "(", Integer, ")" ; - + // IncActLevel = "IncActLevel", "(", Integer, ")" ; (* Some MSTS samples have more than a single IncActLevel *) - + // DisplayMessage = "DisplayMessage", "(", Text, ")" ; - + // Location = "Location", "(", 5*Integer, ")" ; - + // TriggerOnStop = "TriggerOnStop", "(", Integer, ")" ; (* 0 for ?? *) - + // TextToDisplayOnCompletionIfTriggered = "TextToDisplayOnCompletionIfTriggered", "(", ParagraphText, ")" ; // TextToDisplayOnCompletionIfNotTriggered = "TextToDisplayOnCompletionIfNotTriggered", "(", ParagraphText, ")" ; @@ -180,41 +180,41 @@ // EventTypeAllStops = "EventTypeAllStops", "(", ")" ; // EventTypeAssembleTrain = "EventTypeAssembleTrain", "(", ")" ; - + // EventTypeAssembleTrainAtLocation = "EventTypeAssembleTrainAtLocation", "(", ")" ; - + // EventTypeDropOffWagonsAtLocation = "EventTypeDropOffWagonsAtLocation", "(", ")" ; - + // EventTypePickUpPassengers = "EventTypePickUpPassengers", "(", ")" ; // EventTypePickUpWagons = "EventTypePickUpWagons", "(", ")" ; - + // EventTypeReachSpeed = "EventTypeReachSpeed", "(", ")" ; // Reversable_Event = [ "Reversable_Event" | "Reversible_Event" ], (* Reversable is not listed at www.learnersdictionary.com *) // "(", ")" ; - + // SidingItem = "(", Integer, ")" ; // Wagon_List = "Wagon_List", "(", *WagonListItem, ")" ; - + // WagonListItem = (* Description omitted from PickUpWagons and sometimes from DropOffWagonsAtLocation *) // UiD, SidingItem, [ "Description", "(", Text, ")" ] ; (" MSTS uses SidingItem inside the Wagon_List and also at the same level *) - + // StationStop = - + // Speed = "(", Integer, ")" ; - + // EventCategoryTime = "EventCategoryTime", "(", (* single instance of each alternative *) // [ EventTypeTime | ID | Activation_Level | Outcomes | TextToDisplayOnCompletionIfTriggered // | TextToDisplayOnCompletionIfNotTriggered | Name | Time ], ")" ; (* Outcomes may have empty parameters *) - + // EventTypeTime = "EventTypeTime", "(", ")" ; // Time = "Time", "(", Integer, ")" ; - + // ActivityObjects = "ActivityObjects", "(", *ActivityObject, ")" ; - + // ActivityObject = "ActivityObject", // "(", *[ ObjectType | Train_Config | Direction | ID | Tile ], ")" ; (* ID defined above *) @@ -225,13 +225,13 @@ // TrainCfg = "TrainCfg", // "(", [ Name | Serial | MaxVelocity | NextWagonUID | Durability | Wagon | Engine ], ")" ; - + // Serial = "Serial", "(", Integer, ")" ; - + // MaxVelocity = "MaxVelocity", "(", 2*Float, ")" ; - + // NextWagonUID = "NextWagonUID", "(", Integer, ")" ; - + // Durability = "Durability", "(", Float, ")" ; // Wagon = "Wagon", @@ -240,35 +240,37 @@ // WagonData = "WagonData", "(", 2*Text, ")" ; // Engine = "Engine", "(", *[ UiD | EngineData ], ")" ; (* UiD defined above *) - + // EngineData = "EngineData", // "(", 2*Text, ")" ; - + // Direction = "Direction", "(", Integer, ")" ; (* 0 for ??, 1 for ?? *) // Tile = "Tile", "(", 2*Integer, 2*Float, ")" ; - + // ActivityFailedSignals = "ActivityFailedSignals", "(", *ActivityFailedSignal, ")" ; - + // ActivityFailedSignal = "ActivityFailedSignal", "(", Integer, ")" ; - + // PlatformNumPassengersWaiting = "PlatformNumPassengersWaiting", "(", *PlatformData, ")" ; - + // PlatformData = "PlatformData", "(", 2*Integer, ")" ; - + // ActivityRestrictedSpeedZones = "ActivityRestrictedSpeedZones", "(", *ActivityRestrictedSpeedZone, ")" ; - + // ActivityRestrictedSpeedZone = "ActivityRestrictedSpeedZone", // "(", StartPosition, EndPosition, ")" ; // StartPosition = "StartPosition, "(", 4*Integer, ")" ; - + // EndPosition = "EndPosition", "(", 4*Integer, ")" ; using System; +using System.Collections; using System.Collections.Generic; using System.Diagnostics; +using System.Text; using System.IO; using Orts.Parsers.Msts; // For class S (seconds) using ORTS.Common; @@ -278,8 +280,7 @@ namespace Orts.Formats.Msts public enum SeasonType { Spring = 0, Summer, Autumn, Winter } public enum WeatherType { Clear = 0, Snow, Rain } public enum Difficulty { Easy = 0, Medium, Hard } - public enum EventType - { + public enum EventType { AllStops = 0, AssembleTrain, AssembleTrainAtLocation, DropOffWagonsAtLocation, PickUpPassengers, PickUpWagons, ReachSpeed } @@ -302,24 +303,19 @@ public struct LoadData /// Parse and *.act file. /// Naming for classes matches the terms in the *.act file. /// - public class ActivityFile - { + public class ActivityFile { public Tr_Activity Tr_Activity; - public ActivityFile(string filenamewithpath) - { + public ActivityFile(string filenamewithpath) { Read(filenamewithpath, false); } - public ActivityFile(string filenamewithpath, bool headerOnly) - { + public ActivityFile(string filenamewithpath, bool headerOnly) { Read(filenamewithpath, headerOnly); } - public void Read(string filenamewithpath, bool headerOnly) - { - using (STFReader stf = new STFReader(filenamewithpath, false)) - { + public void Read(string filenamewithpath, bool headerOnly) { + using (STFReader stf = new STFReader(filenamewithpath, false)) { stf.ParseFile(() => headerOnly && (Tr_Activity != null) && (Tr_Activity.Tr_Activity_Header != null), new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("tr_activity", ()=>{ Tr_Activity = new Tr_Activity(stf, headerOnly); }), }); @@ -348,14 +344,12 @@ public ActivityFile() } } - public class Tr_Activity - { + public class Tr_Activity { public int Serial = 1; public Tr_Activity_Header Tr_Activity_Header; public Tr_Activity_File Tr_Activity_File; - public Tr_Activity(STFReader stf, bool headerOnly) - { + public Tr_Activity(STFReader stf, bool headerOnly) { stf.MustMatch("("); stf.ParseBlock(() => headerOnly && (Tr_Activity_Header != null), new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("tr_activity_file", ()=>{ Tr_Activity_File = new Tr_Activity_File(stf); }), @@ -386,8 +380,7 @@ public Tr_Activity() } } - public class Tr_Activity_Header - { + public class Tr_Activity_Header { public string RouteID; public string Name; // AE Display Name public string Description = " "; @@ -409,8 +402,7 @@ public class Tr_Activity_Header public int FuelDiesel = 100; // percent public string LoadStationsPopulationFile; - public Tr_Activity_Header(STFReader stf) - { + public Tr_Activity_Header(STFReader stf) { stf.MustMatch("("); stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("routeid", ()=>{ RouteID = stf.ReadStringBlock(null); }), @@ -424,7 +416,7 @@ public Tr_Activity_Header(STFReader stf) new STFReader.TokenProcessor("season", ()=>{ Season = (SeasonType)stf.ReadIntBlock(null); }), new STFReader.TokenProcessor("weather", ()=>{ Weather = (WeatherType)stf.ReadIntBlock(null); }), new STFReader.TokenProcessor("pathid", ()=>{ PathID = stf.ReadStringBlock(null); }), - new STFReader.TokenProcessor("startingspeed", ()=>{ StartingSpeed = (int)stf.ReadFloatBlock(STFReader.UNITS.Speed, (float)StartingSpeed); }), + new STFReader.TokenProcessor("startingspeed", ()=>{ StartingSpeed = (int)stf.ReadFloatBlock(STFReader.UNITS.Speed, (float)StartingSpeed); }), new STFReader.TokenProcessor("duration", ()=>{ Duration = new Duration(stf); }), new STFReader.TokenProcessor("difficulty", ()=>{ Difficulty = (Difficulty)stf.ReadIntBlock(null); }), new STFReader.TokenProcessor("animals", ()=>{ Animals = stf.ReadIntBlock(Animals); }), @@ -442,21 +434,18 @@ public Tr_Activity_Header() } } - public class StartTime - { + public class StartTime { public int Hour; public int Minute; public int Second; - public StartTime(int h, int m, int s) - { + public StartTime(int h, int m, int s) { Hour = h; Minute = m; Second = s; } - public StartTime(STFReader stf) - { + public StartTime(STFReader stf) { stf.MustMatch("("); Hour = stf.ReadInt(null); Minute = stf.ReadInt(null); @@ -464,27 +453,23 @@ public StartTime(STFReader stf) stf.MustMatch(")"); } - public String FormattedStartTime() - { + public String FormattedStartTime() { return Hour.ToString("00") + ":" + Minute.ToString("00") + ":" + Second.ToString("00"); } } - public class Duration - { + public class Duration { int Hour; int Minute; int Second; - public Duration(int h, int m) - { + public Duration(int h, int m) { Hour = h; Minute = m; Second = 0; } - public Duration(STFReader stf) - { + public Duration(STFReader stf) { stf.MustMatch("("); Hour = stf.ReadInt(null); Minute = stf.ReadInt(null); @@ -493,10 +478,10 @@ public Duration(STFReader stf) public int ActivityDuration() { - return Hour * 3600 + Minute * 60 + Second; // Convert time to seconds + return Hour* 3600 + Minute* 60 + Second; // Convert time to seconds } - public String FormattedDurationTime() + public String FormattedDurationTime() { return Hour.ToString("00") + ":" + Minute.ToString("00"); } @@ -508,8 +493,7 @@ public String FormattedDurationTimeHMS() } - public class Tr_Activity_File - { + public class Tr_Activity_File { public Player_Service_Definition Player_Service_Definition; public int NextServiceUID = 1; public int NextActivityObjectUID = 32786; @@ -523,8 +507,7 @@ public class Tr_Activity_File public LevelCrossingHornPattern AILevelCrossingHornPattern { get; private set; } = LevelCrossingHornPattern.Single; - public Tr_Activity_File(STFReader stf) - { + public Tr_Activity_File(STFReader stf) { stf.MustMatch("("); var parser = new List { new STFReader.TokenProcessor("player_service_definition",()=>{ Player_Service_Definition = new Player_Service_Definition(stf); }), @@ -581,13 +564,11 @@ private IEnumerable ORSpecificDataTokenProcessors(STFR } } - public class Player_Service_Definition - { + public class Player_Service_Definition { public string Name; public Player_Traffic_Definition Player_Traffic_Definition; - public Player_Service_Definition(STFReader stf) - { + public Player_Service_Definition(STFReader stf) { stf.MustMatch("("); Name = stf.ReadString(); stf.ParseBlock(new STFReader.TokenProcessor[] { @@ -602,13 +583,11 @@ public Player_Service_Definition() } } - public class Player_Traffic_Definition - { + public class Player_Traffic_Definition { public int Time; public List Player_Traffic_List = new List(); - public Player_Traffic_Definition(STFReader stf) - { + public Player_Traffic_Definition(STFReader stf) { DateTime baseDT = new DateTime(); DateTime arrivalTime = new DateTime(); DateTime departTime = new DateTime(); @@ -624,7 +603,7 @@ public Player_Traffic_Definition(STFReader stf) new STFReader.TokenProcessor("departtime", ()=>{ departTime = baseDT.AddSeconds(stf.ReadFloatBlock(STFReader.UNITS.Time, null)); }), new STFReader.TokenProcessor("skipcount", ()=>{ skipCount = stf.ReadIntBlock(null); }), new STFReader.TokenProcessor("distancedownpath", ()=>{ distanceDownPath = stf.ReadFloatBlock(STFReader.UNITS.Distance, null); }), - new STFReader.TokenProcessor("platformstartid", ()=>{ platformStartID = stf.ReadIntBlock(null); + new STFReader.TokenProcessor("platformstartid", ()=>{ platformStartID = stf.ReadIntBlock(null); Player_Traffic_List.Add(new Player_Traffic_Item(arrivalTime, departTime, skipCount, distanceDownPath, platformStartID)); }), }); } @@ -635,15 +614,13 @@ public Player_Traffic_Definition() } } - public class Player_Traffic_Item - { + public class Player_Traffic_Item { public DateTime ArrivalTime; public DateTime DepartTime; public float DistanceDownPath; public int PlatformStartID; - public Player_Traffic_Item(DateTime arrivalTime, DateTime departTime, int skipCount, float distanceDownPath, int platformStartID) - { + public Player_Traffic_Item(DateTime arrivalTime, DateTime departTime, int skipCount, float distanceDownPath, int platformStartID) { ArrivalTime = arrivalTime; DepartTime = departTime; DistanceDownPath = distanceDownPath; @@ -651,8 +628,7 @@ public Player_Traffic_Item(DateTime arrivalTime, DateTime departTime, int skipCo } } - public class Service_Definition - { + public class Service_Definition { public string Name; public int Time; public int UiD; @@ -662,8 +638,7 @@ public class Service_Definition float distanceDownPath = new float(); int platformStartID; - public Service_Definition(STFReader stf) - { + public Service_Definition(STFReader stf) { stf.MustMatch("("); Name = stf.ReadString(); Time = (int)stf.ReadFloat(STFReader.UNITS.Time, null); @@ -675,7 +650,7 @@ public Service_Definition(STFReader stf) new STFReader.TokenProcessor("efficiency", ()=>{ efficiency = stf.ReadFloatBlock(STFReader.UNITS.Any, null); }), new STFReader.TokenProcessor("skipcount", ()=>{ skipCount = stf.ReadIntBlock(null); }), new STFReader.TokenProcessor("distancedownpath", ()=>{ distanceDownPath = stf.ReadFloatBlock(STFReader.UNITS.Distance, null); }), - new STFReader.TokenProcessor("platformstartid", ()=>{ platformStartID = stf.ReadIntBlock(null); + new STFReader.TokenProcessor("platformstartid", ()=>{ platformStartID = stf.ReadIntBlock(null); ServiceList.Add(new Service_Item(efficiency, skipCount, distanceDownPath, platformStartID)); }), }); } @@ -702,7 +677,7 @@ public Service_Definition(string service_Definition, Player_Traffic_Definition p /// <\summary> /// - public Service_Definition() + public Service_Definition () { } //================================================================================================// @@ -717,9 +692,9 @@ public void Save(BinaryWriter outf) { outf.Write(-1); } - else + else { - outf.Write(ServiceList.Count); + outf.Write (ServiceList.Count); foreach (Service_Item thisServiceItem in ServiceList) { outf.Write(thisServiceItem.Efficiency); @@ -727,7 +702,7 @@ public void Save(BinaryWriter outf) } } } - } + } public class Service_Item { @@ -736,8 +711,7 @@ public class Service_Item public float DistanceDownPath = new float(); public int PlatformStartID; - public Service_Item(float efficiency, int skipCount, float distanceDownPath, int platformStartID) - { + public Service_Item(float efficiency, int skipCount, float distanceDownPath, int platformStartID) { Efficiency = efficiency; SkipCount = skipCount; DistanceDownPath = distanceDownPath; @@ -748,14 +722,12 @@ public Service_Item(float efficiency, int skipCount, float distanceDownPath, int /// /// Parses Service_Definition objects and saves them in ServiceDefinitionList. /// - public class Traffic_Definition - { + public class Traffic_Definition { public string Name; public TrafficFile TrafficFile; public List ServiceDefinitionList = new List(); - public Traffic_Definition(STFReader stf) - { + public Traffic_Definition(STFReader stf) { stf.MustMatch("("); Name = stf.ReadString(); stf.ParseBlock(new STFReader.TokenProcessor[] { @@ -770,12 +742,10 @@ public Traffic_Definition(STFReader stf) /// /// Parses Event objects and saves them in EventList. /// - public class Events - { + public class Events { public List EventList = new List(); - public Events(STFReader stf) - { + public Events(STFReader stf) { stf.MustMatch("("); stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("eventcategorylocation", ()=>{ EventList.Add(new EventCategoryLocation(stf)); }), @@ -784,7 +754,7 @@ public Events(STFReader stf) }); } - public void InsertORSpecificData(STFReader stf) + public void InsertORSpecificData (STFReader stf) { stf.MustMatch("("); stf.ParseBlock(new STFReader.TokenProcessor[] { @@ -818,7 +788,7 @@ public void TryModify(int Category, STFReader stf) wrongEventID = !TestMatch(Category, origEvent); if (!wrongEventID) { - origEvent.AddOrModifyEvent(stf, Path.GetDirectoryName(stf.FileName)); + origEvent.AddOrModifyEvent(stf, Path.GetDirectoryName(stf.FileName)); } else { @@ -855,8 +825,7 @@ public enum ORTSActSoundFileTypes /// /// The 3 types of event are inherited from the abstract Event class. /// - public abstract class Event - { + public abstract class Event { public int ID; public string Name; public int Activation_Level; @@ -871,12 +840,11 @@ public abstract class Event public string TrainService = ""; public int TrainStartingTime = -1; - public virtual void AddOrModifyEvent(STFReader stf, string fileName) + public virtual void AddOrModifyEvent (STFReader stf, string fileName) { } } - public class EventCategoryLocation : Event - { + public class EventCategoryLocation : Event { public bool TriggerOnStop; // Value assumed if property not found. public int TileX; public int TileZ; @@ -884,18 +852,17 @@ public class EventCategoryLocation : Event public float Z; public float RadiusM; - public EventCategoryLocation(STFReader stf) - { + public EventCategoryLocation(STFReader stf) { stf.MustMatch("("); AddOrModifyEvent(stf, stf.FileName); - } + } - public override void AddOrModifyEvent(STFReader stf, string fileName) + public override void AddOrModifyEvent (STFReader stf, string fileName) { stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("eventtypelocation", ()=>{ stf.MustMatch("("); stf.MustMatch(")"); }), new STFReader.TokenProcessor("id", ()=>{ ID = stf.ReadIntBlock(null); }), - new STFReader.TokenProcessor("ortstriggeringtrain", ()=>{ ParseTrain(stf); }), + new STFReader.TokenProcessor("ortstriggeringtrain", ()=>{ ParseTrain(stf); }), new STFReader.TokenProcessor("activation_level", ()=>{ Activation_Level = stf.ReadIntBlock(null); }), new STFReader.TokenProcessor("outcomes", ()=> { @@ -951,16 +918,14 @@ protected void ParseTrain(STFReader stf) /// Parses all types of action events. /// Save type of action event in Type. MSTS syntax isn't fully hierarchical, so using inheritance here instead of Type would be awkward. /// - public class EventCategoryAction : Event - { + public class EventCategoryAction : Event { public EventType Type; public WagonList WagonList; public Nullable SidingId; // May be specified inside the Wagon_List instead. Nullable as can't use -1 to indicate not set. public float SpeedMpS; //private const float MilespHourToMeterpSecond = 0.44704f; - public EventCategoryAction(STFReader stf) - { + public EventCategoryAction(STFReader stf) { stf.MustMatch("("); AddOrModifyEvent(stf, stf.FileName); } @@ -1015,21 +980,19 @@ public override void AddOrModifyEvent(STFReader stf, string fileName) } - public class WagonList - { + public class WagonList { public List WorkOrderWagonList = new List(); Nullable uID; // Nullable as can't use -1 to indicate not set. Nullable sidingId; // May be specified outside the Wagon_List instead. string description = ""; // Value assumed if property not found. - public WagonList(STFReader stf, EventType eventType) - { + public WagonList(STFReader stf, EventType eventType) { stf.MustMatch("("); // "Drop Off" Wagon_List sometimes lacks a Description attribute, so we create the wagon _before_ description // is parsed. Bad practice, but not very dangerous as each Description usually repeats the same data. stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("uid", ()=>{ uID = stf.ReadUIntBlock(null); }), - new STFReader.TokenProcessor("sidingitem", ()=>{ sidingId = stf.ReadUIntBlock(null); + new STFReader.TokenProcessor("sidingitem", ()=>{ sidingId = stf.ReadUIntBlock(null); WorkOrderWagonList.Add(new WorkOrderWagon(uID.Value, sidingId.Value, description));}), new STFReader.TokenProcessor("description", ()=>{ description = stf.ReadStringBlock(""); }), }); @@ -1040,26 +1003,22 @@ public WagonList(STFReader stf, EventType eventType) /// Parses a wagon from the WagonList. /// Do not confuse with older class Wagon below, which parses TrainCfg from the *.con file. /// - public class WorkOrderWagon - { + public class WorkOrderWagon { public Nullable UID; // Nullable as can't use -1 to indicate not set. public Nullable SidingId; // May be specified outside the Wagon_List. public string Description = ""; // Value assumed if property not found. - public WorkOrderWagon(uint uId, uint sidingId, string description) - { + public WorkOrderWagon(uint uId, uint sidingId, string description) { UID = uId; SidingId = sidingId; Description = description; } } - public class EventCategoryTime : Event - { // E.g. Hisatsu route and Short Passenger Run shrtpass.act + public class EventCategoryTime : Event { // E.g. Hisatsu route and Short Passenger Run shrtpass.act public int Time; - public EventCategoryTime(STFReader stf) - { + public EventCategoryTime(STFReader stf) { stf.MustMatch("("); AddOrModifyEvent(stf, stf.FileName); } @@ -1102,8 +1061,7 @@ public override void AddOrModifyEvent(STFReader stf, string fileName) } } - public class Outcomes - { + public class Outcomes { public bool ActivitySuccess; public string ActivityFail; // MSTS Activity Editor limits model to 4 outcomes of any type. We use lists so there is no restriction. @@ -1112,18 +1070,17 @@ public class Outcomes public List DecActLevelList = new List(); public List IncActLevelList = new List(); public string DisplayMessage; - // public string WaitingTrainToRestart; + // public string WaitingTrainToRestart; public RestartWaitingTrain RestartWaitingTrain; public ORTSWeatherChange ORTSWeatherChange; public ActivitySound ActivitySound; - public Outcomes(STFReader stf, string fileName) - { + public Outcomes(STFReader stf, string fileName) { CreateOrModifyOutcomes(stf, fileName); } public void CreateOrModifyOutcomes(STFReader stf, string fileName) - { + { stf.MustMatch("("); stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("activitysuccess", ()=>{ stf.MustMatch("("); stf.MustMatch(")"); ActivitySuccess = true; }), @@ -1149,7 +1106,7 @@ public class RestartWaitingTrain public int DelayToRestart; public int MatchingWPDelay; - public RestartWaitingTrain(STFReader stf) + public RestartWaitingTrain (STFReader stf) { stf.MustMatch("("); stf.ParseBlock(new STFReader.TokenProcessor[] { @@ -1186,10 +1143,10 @@ public ORTSWeatherChange(STFReader stf) stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("ortsovercast", ()=> { - stf.MustMatch("("); + stf.MustMatch("("); ORTSOvercast = stf.ReadFloat(0, -1); ORTSOvercastTransitionTimeS = stf.ReadInt(-1); - stf.MustMatch(")"); + stf.MustMatch(")"); }), new STFReader.TokenProcessor("ortsfog", ()=> { @@ -1263,8 +1220,7 @@ public ActivitySound(STFReader stf, string fileName) /// /// Parses ActivityObject objects and saves them in ActivityObjectList. /// - public class ActivityObjects - { + public class ActivityObjects { public List ActivityObjectList = new List(); //public new ActivityObject this[int i] @@ -1273,8 +1229,7 @@ public class ActivityObjects // set { base[i] = value; } //} - public ActivityObjects(STFReader stf) - { + public ActivityObjects(STFReader stf) { stf.MustMatch("("); stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("activityobject", ()=>{ ActivityObjectList.Add(new ActivityObject(stf)); }), @@ -1282,8 +1237,7 @@ public ActivityObjects(STFReader stf) } } - public class ActivityObject - { + public class ActivityObject { public Train_Config Train_Config; public int Direction; public int ID; @@ -1292,8 +1246,7 @@ public class ActivityObject public float X; public float Z; - public ActivityObject(STFReader stf) - { + public ActivityObject(STFReader stf) { stf.MustMatch("("); stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("objecttype", ()=>{ stf.MustMatch("("); stf.MustMatch("WagonsList"); stf.MustMatch(")"); }), @@ -1312,12 +1265,10 @@ public ActivityObject(STFReader stf) } } - public class Train_Config - { + public class Train_Config { public TrainCfg TrainCfg; - public Train_Config(STFReader stf) - { + public Train_Config(STFReader stf) { stf.MustMatch("("); stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("traincfg", ()=>{ TrainCfg = new TrainCfg(stf); }), @@ -1326,13 +1277,11 @@ public Train_Config(STFReader stf) } - public class MaxVelocity - { + public class MaxVelocity { public float A; public float B = 0.001f; - public MaxVelocity(STFReader stf) - { + public MaxVelocity(STFReader stf) { stf.MustMatch("("); A = stf.ReadFloat(STFReader.UNITS.Speed, null); B = stf.ReadFloat(STFReader.UNITS.Speed, null); @@ -1340,8 +1289,7 @@ public MaxVelocity(STFReader stf) } } - public class TrainCfg - { + public class TrainCfg { public string Name = "Loose consist."; int Serial = 1; public MaxVelocity MaxVelocity; @@ -1351,8 +1299,7 @@ public class TrainCfg public List WagonList = new List(); - public TrainCfg(STFReader stf) - { + public TrainCfg(STFReader stf) { stf.MustMatch("("); Name = stf.ReadString(); stf.ParseBlock(new STFReader.TokenProcessor[] { @@ -1369,8 +1316,7 @@ public TrainCfg(STFReader stf) } } - public class Wagon - { + public class Wagon { public string Folder; public string Name; public int UiD; @@ -1379,8 +1325,7 @@ public class Wagon public bool Flip; public List LoadDataList; - public Wagon(STFReader stf) - { + public Wagon(STFReader stf) { stf.MustMatch("("); stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("uid", ()=>{ UiD = stf.ReadIntBlock(null); }), @@ -1410,13 +1355,10 @@ public Wagon(STFReader stf) }); } - public string GetName(uint uId, List wagonList) - { - foreach (var item in wagonList) - { + public string GetName(uint uId, List wagonList) { + foreach (var item in wagonList) { var wagon = item as Wagon; - if (wagon.UiD == uId) - { + if (wagon.UiD == uId) { return wagon.Name; } } @@ -1424,12 +1366,10 @@ public string GetName(uint uId, List wagonList) } } - public class PlatformNumPassengersWaiting - { // For use, see file EUROPE1\ACTIVITIES\aftstorm.act + public class PlatformNumPassengersWaiting { // For use, see file EUROPE1\ACTIVITIES\aftstorm.act public List PlatformDataList = new List(); - public PlatformNumPassengersWaiting(STFReader stf) - { + public PlatformNumPassengersWaiting(STFReader stf) { stf.MustMatch("("); stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("platformdata", ()=>{ PlatformDataList.Add(new PlatformData(stf)); }), @@ -1437,19 +1377,16 @@ public PlatformNumPassengersWaiting(STFReader stf) } } - public class PlatformData - { // e.g. "PlatformData ( 41 20 )" + public class PlatformData { // e.g. "PlatformData ( 41 20 )" public int Id; public int PassengerCount; - public PlatformData(int id, int passengerCount) - { + public PlatformData(int id, int passengerCount) { Id = id; PassengerCount = passengerCount; } - public PlatformData(STFReader stf) - { + public PlatformData(STFReader stf) { stf.MustMatch("("); Id = stf.ReadInt(null); PassengerCount = stf.ReadInt(null); @@ -1457,11 +1394,9 @@ public PlatformData(STFReader stf) } } - public class ActivityFailedSignals - { // e.g. ActivityFailedSignals ( ActivityFailedSignal ( 50 ) ) + public class ActivityFailedSignals { // e.g. ActivityFailedSignals ( ActivityFailedSignal ( 50 ) ) public List FailedSignalList = new List(); - public ActivityFailedSignals(STFReader stf) - { + public ActivityFailedSignals(STFReader stf) { stf.MustMatch("("); stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("activityfailedsignal", ()=>{ FailedSignalList.Add(stf.ReadIntBlock(null)); }), @@ -1469,12 +1404,10 @@ public ActivityFailedSignals(STFReader stf) } } - public class ActivityRestrictedSpeedZones - { // For use, see file EUROPE1\ACTIVITIES\aftstorm.act + public class ActivityRestrictedSpeedZones { // For use, see file EUROPE1\ACTIVITIES\aftstorm.act public List ActivityRestrictedSpeedZoneList = new List(); - public ActivityRestrictedSpeedZones(STFReader stf) - { + public ActivityRestrictedSpeedZones(STFReader stf) { stf.MustMatch("("); stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("activityrestrictedspeedzone", ()=>{ ActivityRestrictedSpeedZoneList.Add(new ActivityRestrictedSpeedZone(stf)); }), @@ -1482,13 +1415,11 @@ public ActivityRestrictedSpeedZones(STFReader stf) } } - public class ActivityRestrictedSpeedZone - { + public class ActivityRestrictedSpeedZone { public Position StartPosition; public Position EndPosition; - public ActivityRestrictedSpeedZone(STFReader stf) - { + public ActivityRestrictedSpeedZone(STFReader stf) { stf.MustMatch("("); stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("startposition", ()=>{ StartPosition = new Position(stf); }), @@ -1497,24 +1428,21 @@ public ActivityRestrictedSpeedZone(STFReader stf) } } - public class Position - { + public class Position { public int TileX; public int TileZ; public float X; public float Z; public float Y; - public Position(int tileX, int tileZ, int x, int z) - { + public Position(int tileX, int tileZ, int x, int z) { TileX = tileX; TileZ = tileZ; X = x; Z = z; } - public Position(STFReader stf) - { + public Position(STFReader stf) { stf.MustMatch("("); TileX = stf.ReadInt(null); TileZ = stf.ReadInt(null); diff --git a/Source/Orts.Formats.Msts/CabViewFile.cs b/Source/Orts.Formats.Msts/CabViewFile.cs index 4ede5a8c6b..3972a47a6f 100644 --- a/Source/Orts.Formats.Msts/CabViewFile.cs +++ b/Source/Orts.Formats.Msts/CabViewFile.cs @@ -15,13 +15,13 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using Microsoft.Xna.Framework; +using Orts.Parsers.Msts; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; -using Microsoft.Xna.Framework; -using Orts.Parsers.Msts; namespace Orts.Formats.Msts { @@ -63,9 +63,9 @@ public CabViewFile(string filePath, string basePath) new STFReader.TokenProcessor("cabviewcontrols", ()=>{ CabViewControls = new CabViewControls(stf, basePath); }), });}), }); - } + } - } // class CVFFile + } // class CVFFile public enum CABViewControlTypes { @@ -246,8 +246,8 @@ public enum CABViewControlTypes ORTS_MULTI_POSITION_CONTROLLER, ORTS_CC_SPEED_0, - ORTS_CC_SPEED_DELTA, - + ORTS_CC_SPEED_DELTA, + ORTS_ODOMETER, ORTS_ODOMETER_RESET, ORTS_ODOMETER_DIRECTION, @@ -282,8 +282,8 @@ public enum CABViewControlStyles NOT_SPRUNG, WHILE_PRESSED, PRESSED, - ONOFF, - _24HOUR, + ONOFF, + _24HOUR, _12HOUR } @@ -299,7 +299,7 @@ public enum CABViewControlUnits KILOVOLTS, KM_PER_HOUR, - MILES_PER_HOUR, + MILES_PER_HOUR, METRESµSECµSEC, METRES_SEC_SEC, KMµHOURµHOUR, @@ -311,7 +311,7 @@ public enum CABViewControlUnits MILES_HOUR_MIN, MILES_HOUR_HOUR, - NEWTONS, + NEWTONS, KILO_NEWTONS, KILO_LBS, METRES_PER_SEC, @@ -384,15 +384,15 @@ public CabViewControls(STFReader stf, string basepath) new STFReader.TokenProcessor("tristate", ()=>{ Add(new CVCDiscrete(stf, basepath, DiscreteStates.TRI_STATE)); }), new STFReader.TokenProcessor("multistate", ()=>{ Add(new CVCDiscrete(stf, basepath, DiscreteStates.MULTI_STATE)); }), new STFReader.TokenProcessor("multistatedisplay", ()=>{ Add(new CVCMultiStateDisplay(stf, basepath)); }), - new STFReader.TokenProcessor("cabsignaldisplay", ()=>{ Add(new CVCSignal(stf, basepath, DiscreteStates.CAB_SIGNAL_DISPLAY)); }), - new STFReader.TokenProcessor("digital", ()=>{ Add(new CVCDigital(stf, basepath)); }), + new STFReader.TokenProcessor("cabsignaldisplay", ()=>{ Add(new CVCSignal(stf, basepath, DiscreteStates.CAB_SIGNAL_DISPLAY)); }), + new STFReader.TokenProcessor("digital", ()=>{ Add(new CVCDigital(stf, basepath)); }), new STFReader.TokenProcessor("combinedcontrol", ()=>{ Add(new CVCDiscrete(stf, basepath, DiscreteStates.COMBINED_CONTROL)); }), new STFReader.TokenProcessor("firebox", ()=>{ Add(new CVCFirebox(stf, basepath)); }), new STFReader.TokenProcessor("dialclock", ()=>{ ProcessDialClock(stf, basepath); }), new STFReader.TokenProcessor("digitalclock", ()=>{ Add(new CVCDigitalClock(stf, basepath)); }), new STFReader.TokenProcessor("screendisplay", ()=>{ Add(new CVCScreen(stf, basepath)); }) }); - + //TODO Uncomment when parsed all type /* if (count != this.Count) STFException.ReportWarning(inf, "CabViewControl count mismatch"); @@ -422,7 +422,7 @@ public class CabViewControl // Defaults which may be overridden when parsing CVF file public double MinValue = 0.0; public double MaxValue = 1.0; - + public double OldValue; public string ACEFile = ""; public string Label = ""; @@ -488,7 +488,7 @@ protected void ParseStyle(STFReader stf) { string sStyle = stf.ReadString(); int checkNumeric = 0; - if (int.TryParse(sStyle.Substring(0, 1), out checkNumeric) == true) + if(int.TryParse(sStyle.Substring(0, 1), out checkNumeric) == true) { sStyle = sStyle.Insert(0, "_"); } @@ -542,7 +542,7 @@ protected void ParseValueIfDisabled(STFReader stf) } // Used by subclasses CVCGauge and CVCDigital - protected virtual color ParseControlColor(STFReader stf) + protected virtual color ParseControlColor( STFReader stf ) { stf.MustMatch("("); color colour = new color { A = 1, R = stf.ReadInt(0) / 255f, G = stf.ReadInt(0) / 255f, B = stf.ReadInt(0) / 255f }; @@ -697,7 +697,7 @@ public CVCGauge(STFReader stf, string basepath) new STFReader.TokenProcessor("zeropos", ()=>{ ZeroPos = stf.ReadIntBlock(null); }), new STFReader.TokenProcessor("orientation", ()=>{ Orientation = stf.ReadIntBlock(null); }), new STFReader.TokenProcessor("dirincrease", ()=>{ Direction = stf.ReadIntBlock(null); }), - new STFReader.TokenProcessor("area", ()=>{ + new STFReader.TokenProcessor("area", ()=>{ stf.MustMatch("("); int x = stf.ReadInt(null); int y = stf.ReadInt(null); @@ -706,27 +706,27 @@ public CVCGauge(STFReader stf, string basepath) Area = new Rectangle(x, y, width, height); stf.SkipRestOfBlock(); }), - new STFReader.TokenProcessor("positivecolour", ()=>{ + new STFReader.TokenProcessor("positivecolour", ()=>{ stf.MustMatch("("); NumPositiveColors = stf.ReadInt(0); if((stf.EndOfBlock() == false)) { List Colorset = new List(); stf.ParseBlock(new STFReader.TokenProcessor[] { - new STFReader.TokenProcessor("controlcolour", ()=>{ Colorset.Add(ParseControlColor(stf));}), + new STFReader.TokenProcessor("controlcolour", ()=>{ Colorset.Add(ParseControlColor(stf));}), new STFReader.TokenProcessor("switchval", () => { PositiveSwitchVal = ParseSwitchVal(stf); }) }); PositiveColor = Colorset [0]; if ((NumPositiveColors >= 2) && (Colorset.Count >= 2 ))SecondPositiveColor = Colorset [1]; } }), - new STFReader.TokenProcessor("negativecolour", ()=>{ + new STFReader.TokenProcessor("negativecolour", ()=>{ stf.MustMatch("("); NumNegativeColors = stf.ReadInt(0); if ((stf.EndOfBlock() == false)) { List Colorset = new List(); stf.ParseBlock(new STFReader.TokenProcessor[] { - new STFReader.TokenProcessor("controlcolour", ()=>{ Colorset.Add(ParseControlColor(stf));}), + new STFReader.TokenProcessor("controlcolour", ()=>{ Colorset.Add(ParseControlColor(stf));}), new STFReader.TokenProcessor("switchval", () => { NegativeSwitchVal = ParseSwitchVal(stf); }) }); NegativeColor = Colorset[0]; if ((NumNegativeColors >= 2) && (Colorset.Count >= 2)) SecondNegativeColor = Colorset[1]; @@ -758,7 +758,7 @@ public class CVCFirebox : CVCGauge { public string FireACEFile; - public CVCFirebox(STFReader stf, string basepath) + public CVCFirebox(STFReader stf, string basepath) { stf.MustMatch("("); stf.ParseBlock(new STFReader.TokenProcessor[] { @@ -821,7 +821,7 @@ public CVCDigital(STFReader stf, string basepath) FontSize = 8; FontStyle = 0; FontFamily = "Lucida Sans"; - + stf.MustMatch("("); stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("type", ()=>{ ParseType(stf); }), @@ -835,30 +835,30 @@ public CVCDigital(STFReader stf, string basepath) new STFReader.TokenProcessor("hideifdisabled", ()=>{ ParseHideIfDisabled(stf); }), new STFReader.TokenProcessor("valueifdisabled", ()=>{ ParseValueIfDisabled(stf); }), new STFReader.TokenProcessor("leadingzeros", ()=>{ ParseLeadingZeros(stf); }), - new STFReader.TokenProcessor("accuracy", ()=>{ ParseAccuracy(stf); }), - new STFReader.TokenProcessor("accuracyswitch", ()=>{ ParseAccuracySwitch(stf); }), + new STFReader.TokenProcessor("accuracy", ()=>{ ParseAccuracy(stf); }), + new STFReader.TokenProcessor("accuracyswitch", ()=>{ ParseAccuracySwitch(stf); }), new STFReader.TokenProcessor("justification", ()=>{ ParseJustification(stf); }), - new STFReader.TokenProcessor("positivecolour", ()=>{ + new STFReader.TokenProcessor("positivecolour", ()=>{ stf.MustMatch("("); NumPositiveColors = stf.ReadInt(0); if((stf.EndOfBlock() == false)) { List Colorset = new List(); stf.ParseBlock(new STFReader.TokenProcessor[] { - new STFReader.TokenProcessor("controlcolour", ()=>{ Colorset.Add(ParseControlColor(stf));}), + new STFReader.TokenProcessor("controlcolour", ()=>{ Colorset.Add(ParseControlColor(stf));}), new STFReader.TokenProcessor("switchval", () => { PositiveSwitchVal = ParseSwitchVal(stf); }) }); PositiveColor = Colorset [0]; if ((NumPositiveColors >= 2) && (Colorset.Count >= 2 ))SecondPositiveColor = Colorset [1]; } }), - new STFReader.TokenProcessor("negativecolour", ()=>{ + new STFReader.TokenProcessor("negativecolour", ()=>{ stf.MustMatch("("); NumNegativeColors = stf.ReadInt(0); if ((stf.EndOfBlock() == false)) { List Colorset = new List(); stf.ParseBlock(new STFReader.TokenProcessor[] { - new STFReader.TokenProcessor("controlcolour", ()=>{ Colorset.Add(ParseControlColor(stf));}), + new STFReader.TokenProcessor("controlcolour", ()=>{ Colorset.Add(ParseControlColor(stf));}), new STFReader.TokenProcessor("switchval", () => { NegativeSwitchVal = ParseSwitchVal(stf); }) }); NegativeColor = Colorset[0]; if ((NumNegativeColors >= 2) && (Colorset.Count >= 2)) SecondNegativeColor = Colorset[1]; @@ -922,7 +922,7 @@ protected void ParseFont(STFReader stf) var fontFamily = stf.ReadString(); if (fontFamily != null) FontFamily = fontFamily; stf.SkipRestOfBlock(); - } + } } public class CVCDigitalClock : CVCDigital @@ -942,7 +942,7 @@ public CVCDigitalClock(STFReader stf, string basepath) new STFReader.TokenProcessor("disabledifcabpowersupplyoff", ()=>{ ParseDisabledIfCabPowerSupplyOff(stf); }), new STFReader.TokenProcessor("hideifdisabled", ()=>{ ParseHideIfDisabled(stf); }), new STFReader.TokenProcessor("valueifdisabled", ()=>{ ParseValueIfDisabled(stf); }), - new STFReader.TokenProcessor("accuracy", ()=>{ ParseAccuracy(stf); }), + new STFReader.TokenProcessor("accuracy", ()=>{ ParseAccuracy(stf); }), new STFReader.TokenProcessor("controlcolour", ()=>{ PositiveColor = ParseControlColor(stf); }), new STFReader.TokenProcessor("ortsfont", ()=>{ParseFont(stf); }), new STFReader.TokenProcessor("ortsangle", () => { Rotation = ParseRotation(stf); }), @@ -952,7 +952,7 @@ public CVCDigitalClock(STFReader stf, string basepath) }); } - + } #endregion @@ -968,7 +968,7 @@ public abstract class CVCWithFrames : CabViewControl public int Orientation; public int Direction; - public List Values + public List Values { get { @@ -995,7 +995,7 @@ public struct NewScreenData public CVCDiscrete(STFReader stf, string basepath, DiscreteStates discreteState) { - // try +// try { stf.MustMatch("("); stf.ParseBlock(new STFReader.TokenProcessor[] { @@ -1060,7 +1060,7 @@ public CVCDiscrete(STFReader stf, string basepath, DiscreteStates discreteState) positionsRead++; if (minPosition < 0) - { + { for (int iPos = 0; iPos <= Positions.Count - 1; iPos++) { Positions[iPos] -= minPosition; @@ -1078,8 +1078,8 @@ public CVCDiscrete(STFReader stf, string basepath, DiscreteStates discreteState) // Check if eligible for filling if (Positions.Count > 1 && Positions[0] != 0) canFill = false; - else - { + else + { for (var iPos = 1; iPos <= Positions.Count - 1; iPos++) { if (Positions[iPos] > Positions[iPos-1]) continue; @@ -1116,7 +1116,7 @@ public CVCDiscrete(STFReader stf, string basepath, DiscreteStates discreteState) // Avoid later repositioning, put every value to its Position // But before resize Values if needed if (numValues != numPositions) - { + { while (Values.Count <= Positions[_ValuesRead]) { Values.Add(0); @@ -1151,7 +1151,7 @@ public CVCDiscrete(STFReader stf, string basepath, DiscreteStates discreteState) // The twostate, tristate, signal displays are not in these // Need check the Values collection for validity if (_ValuesRead > 0 || ControlStyle == CABViewControlStyles.SPRUNG || ControlStyle == CABViewControlStyles.NOT_SPRUNG || - FramesCount > 0 || (FramesX > 0 && FramesY > 0)) + FramesCount > 0 || (FramesX > 0 && FramesY > 0 )) { // Check max number of Frames if (FramesCount == 0) @@ -1174,7 +1174,7 @@ public CVCDiscrete(STFReader stf, string basepath, DiscreteStates discreteState) // Only shuffle data in following cases - if (Values.Count != Positions.Count || (Values.Count < FramesCount & canFill) || (Values.Count > 0 && Values[0] == Values[Values.Count - 1] && Values[0] == 0)) + if (Values.Count != Positions.Count || (Values.Count < FramesCount & canFill)|| ( Values.Count > 0 && Values[0] == Values[Values.Count - 1] && Values[0] == 0)) { // Fixup Positions and Values collections first @@ -1190,19 +1190,19 @@ public CVCDiscrete(STFReader stf, string basepath, DiscreteStates discreteState) //This if clause covers among others following cases: // Case 1 (e.g. engine brake lever of Dash 9): //NumFrames ( 22 11 2 ) - //NumPositions ( 1 0 ) - //NumValues ( 1 0 ) - //Orientation ( 1 ) - //DirIncrease ( 1 ) - //ScaleRange ( 0 1 ) + //NumPositions ( 1 0 ) + //NumValues ( 1 0 ) + //Orientation ( 1 ) + //DirIncrease ( 1 ) + //ScaleRange ( 0 1 ) // // Case 2 (e.g. throttle lever of Acela): - //NumFrames ( 25 5 5 ) - //NumPositions ( 0 ) - //NumValues ( 0 ) - //Orientation ( 1 ) - //DirIncrease ( 1 ) - //ScaleRange ( 0 1 ) + //NumFrames ( 25 5 5 ) + //NumPositions ( 0 ) + //NumValues ( 0 ) + //Orientation ( 1 ) + //DirIncrease ( 1 ) + //ScaleRange ( 0 1 ) // // Clear existing Positions.Clear(); @@ -1225,29 +1225,29 @@ public CVCDiscrete(STFReader stf, string basepath, DiscreteStates discreteState) { //This if clause covers among others following cases: // Case 1 (e.g. engine brake lever of gp38): - //NumFrames ( 18 2 9 ) - //NumPositions ( 2 0 1 ) - //NumValues ( 2 0 0.3 ) - //Orientation ( 0 ) - //DirIncrease ( 0 ) - //ScaleRange ( 0 1 ) + //NumFrames ( 18 2 9 ) + //NumPositions ( 2 0 1 ) + //NumValues ( 2 0 0.3 ) + //Orientation ( 0 ) + //DirIncrease ( 0 ) + //ScaleRange ( 0 1 ) Positions.Add(FramesCount); // Fill empty Values for (int i = Values.Count; i < FramesCount; i++) Values.Add(Values[1]); - Values.Add(MaxValue); + Values.Add(MaxValue); } else { //This if clause covers among others following cases: // Case 1 (e.g. train brake lever of Acela): - //NumFrames ( 12 4 3 ) - //NumPositions ( 5 0 1 9 10 11 ) - //NumValues ( 5 0 0.2 0.85 0.9 0.95 ) - //Orientation ( 1 ) - //DirIncrease ( 1 ) - //ScaleRange ( 0 1 ) + //NumFrames ( 12 4 3 ) + //NumPositions ( 5 0 1 9 10 11 ) + //NumValues ( 5 0 0.2 0.85 0.9 0.95 ) + //Orientation ( 1 ) + //DirIncrease ( 1 ) + //ScaleRange ( 0 1 ) // // Fill empty Values int iValues = 1; @@ -1305,7 +1305,7 @@ public CVCDiscrete(STFReader stf, string basepath, DiscreteStates discreteState) if (ControlType.Type == CABViewControlTypes.PANTOGRAPH || ControlType.Type == CABViewControlTypes.PANTOGRAPH2 || ControlType.Type == CABViewControlTypes.ORTS_PANTOGRAPH3 || ControlType.Type == CABViewControlTypes.ORTS_PANTOGRAPH4) ControlStyle = CABViewControlStyles.ONOFF; - if (ControlType.Type == CABViewControlTypes.HORN || ControlType.Type == CABViewControlTypes.SANDERS || ControlType.Type == CABViewControlTypes.BELL + if (ControlType.Type == CABViewControlTypes.HORN || ControlType.Type == CABViewControlTypes.SANDERS || ControlType.Type == CABViewControlTypes.BELL || ControlType.Type == CABViewControlTypes.RESET || ControlType.Type == CABViewControlTypes.VACUUM_EXHAUSTER) ControlStyle = CABViewControlStyles.WHILE_PRESSED; if (ControlType.Type == CABViewControlTypes.DIRECTION && Orientation == 0) @@ -1320,13 +1320,13 @@ public CVCDiscrete(STFReader stf, string basepath, DiscreteStates discreteState) break; } } - // catch (Exception error) - // { - // if (error is STFException) // Parsing error, so pass it on - // throw; - // else // Unexpected error, so provide a hint - // throw new STFException(stf, "Problem with NumPositions/NumValues/NumFrames/ScaleRange"); - // } // End of Need check the Values collection for validity +// catch (Exception error) +// { +// if (error is STFException) // Parsing error, so pass it on +// throw; +// else // Unexpected error, so provide a hint +// throw new STFException(stf, "Problem with NumPositions/NumValues/NumFrames/ScaleRange"); +// } // End of Need check the Values collection for validity } // End of Constructor protected void ParseNewScreen(STFReader stf) @@ -1346,9 +1346,9 @@ protected void ParseNewScreen(STFReader stf) #region Multistate Display Controls public class CVCMultiStateDisplay : CVCWithFrames { - public List MSStyles = new List(); + public List MSStyles = new List(); - public CVCMultiStateDisplay(STFReader stf, string basepath) + public CVCMultiStateDisplay(STFReader stf, string basepath) { stf.MustMatch("("); @@ -1369,7 +1369,7 @@ public CVCMultiStateDisplay(STFReader stf, string basepath) FramesX = stf.ReadInt(null); FramesY = stf.ReadInt(null); stf.ParseBlock(new STFReader.TokenProcessor[] { - new STFReader.TokenProcessor("state", ()=>{ + new STFReader.TokenProcessor("state", ()=>{ stf.MustMatch("("); stf.ParseBlock( new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("style", ()=>{ MSStyles.Add(ParseNumStyle(stf)); diff --git a/Source/Orts.Formats.Msts/CameraConfigurationFile.cs b/Source/Orts.Formats.Msts/CameraConfigurationFile.cs index fd7543427e..d11d307845 100644 --- a/Source/Orts.Formats.Msts/CameraConfigurationFile.cs +++ b/Source/Orts.Formats.Msts/CameraConfigurationFile.cs @@ -19,7 +19,10 @@ // This class reads the config file into a list of camera objects +using System; +using System.Collections; using System.Collections.Generic; +using System.Text; using Microsoft.Xna.Framework; using Orts.Parsers.Msts; @@ -66,12 +69,12 @@ public Camera(STFReader stf) public string CamControl; public Vector3 CameraOffset = new Vector3(); public Vector3 Direction = new Vector3(); - public float Fov = 55f; - public float ZClip = 0.1f; - public int WagonNum = -1; + public float Fov = 55f; + public float ZClip =0.1f; + public int WagonNum =-1; public Vector3 ObjectOffset = new Vector3(); public Vector3 RotationLimit = new Vector3(); - public string Description = ""; + public string Description =""; } diff --git a/Source/Orts.Formats.Msts/CarSpawnerFile.cs b/Source/Orts.Formats.Msts/CarSpawnerFile.cs index 98220b113e..ba122e9544 100644 --- a/Source/Orts.Formats.Msts/CarSpawnerFile.cs +++ b/Source/Orts.Formats.Msts/CarSpawnerFile.cs @@ -16,8 +16,10 @@ // along with Open Rails. If not, see . using System; +using System.Collections; using System.Collections.Generic; using System.IO; +using Microsoft.Xna.Framework; using Orts.Parsers.Msts; @@ -91,17 +93,17 @@ public CarSpawnerItemData(STFReader stf, string shapePath) dist = stf.ReadFloat(STFReader.UNITS.Distance, null); stf.SkipRestOfBlock(); } - } + } - public class CarSpawnerFile - { - public CarSpawnerFile(string filePath, string shapePath, List carSpawnerLists) - { - using (STFReader stf = new STFReader(filePath, false)) - { + public class CarSpawnerFile + { + public CarSpawnerFile(string filePath, string shapePath, List carSpawnerLists) + { + using (STFReader stf = new STFReader(filePath, false)) + { var carSpawnerBlock = new CarSpawnerBlock(stf, shapePath, carSpawnerLists, "Default"); - } - } - } + } + } + } } diff --git a/Source/Orts.Formats.Msts/ConsistFile.cs b/Source/Orts.Formats.Msts/ConsistFile.cs index 17090b4f83..a58f531c21 100644 --- a/Source/Orts.Formats.Msts/ConsistFile.cs +++ b/Source/Orts.Formats.Msts/ConsistFile.cs @@ -15,6 +15,9 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections; +using System.IO; using Orts.Parsers.Msts; namespace Orts.Formats.Msts diff --git a/Source/Orts.Formats.Msts/EngineFile.cs b/Source/Orts.Formats.Msts/EngineFile.cs index b2be8a020a..2dc78b4f78 100644 --- a/Source/Orts.Formats.Msts/EngineFile.cs +++ b/Source/Orts.Formats.Msts/EngineFile.cs @@ -15,6 +15,8 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections; using System.IO; using Orts.Parsers.Msts; diff --git a/Source/Orts.Formats.Msts/HazardFile.cs b/Source/Orts.Formats.Msts/HazardFile.cs index 13ecf1a282..e701b58f2c 100644 --- a/Source/Orts.Formats.Msts/HazardFile.cs +++ b/Source/Orts.Formats.Msts/HazardFile.cs @@ -15,41 +15,45 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; using Microsoft.Xna.Framework; using Orts.Parsers.Msts; namespace Orts.Formats.Msts { - public class HazardFile - { - public HazardFile(string filename) - { - try - { - using (STFReader stf = new STFReader(filename, false)) - { - stf.ParseFile(new STFReader.TokenProcessor[] { + public class HazardFile + { + public HazardFile(string filename) + { + try + { + using (STFReader stf = new STFReader(filename, false)) + { + stf.ParseFile(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("tr_worldfile", ()=>{ Tr_HazardFile = new Tr_HazardFile(stf); }), }); - //TODO This should be changed to STFException.TraceError() with defaults values created - if (Tr_HazardFile == null) throw new STFException(stf, "Missing Tr_WorldFile"); - } - } - finally - { - } - } - public Tr_HazardFile Tr_HazardFile; - } + //TODO This should be changed to STFException.TraceError() with defaults values created + if (Tr_HazardFile == null) throw new STFException(stf, "Missing Tr_WorldFile"); + } + } + finally + { + } + } + public Tr_HazardFile Tr_HazardFile; + } - public class Tr_HazardFile - { - public Tr_HazardFile(STFReader stf) - { - stf.MustMatch("("); - stf.ParseBlock(new STFReader.TokenProcessor[] { + public class Tr_HazardFile + { + public Tr_HazardFile(STFReader stf) + { + stf.MustMatch("("); + stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("filename", ()=>{ FileName = stf.ReadStringBlock(null); }), new STFReader.TokenProcessor("workers", ()=>{ Workers = stf.ReadStringBlock(null); }), new STFReader.TokenProcessor("distance", ()=>{ Distance = stf.ReadFloatBlock(STFReader.UNITS.None, 10); }), @@ -60,19 +64,19 @@ public Tr_HazardFile(STFReader stf) new STFReader.TokenProcessor("surprise_key_right", ()=>{ Surprise_Key_Right = stf.ReadVector2Block(STFReader.UNITS.None, Surprise_Key_Right); }), new STFReader.TokenProcessor("success_scarper_key", ()=>{ Success_Scarper_Key = stf.ReadVector2Block(STFReader.UNITS.None, Success_Scarper_Key); }), }); - //TODO This should be changed to STFException.TraceError() with defaults values created - if (FileName == null) throw new STFException(stf, "Missing FileName"); - } + //TODO This should be changed to STFException.TraceError() with defaults values created + if (FileName == null) throw new STFException(stf, "Missing FileName"); + } - public string FileName; // ie OdakyuSE - used for MKR,RDB,REF,RIT,TDB,TIT - public string Workers; - public float Distance; - public float Speed; - public Vector2 Idle_Key = new Vector2(); - public Vector2 Idle_Key2 = new Vector2(); - public Vector2 Surprise_Key_Left = new Vector2(); - public Vector2 Surprise_Key_Right = new Vector2(); - public Vector2 Success_Scarper_Key = new Vector2(); + public string FileName; // ie OdakyuSE - used for MKR,RDB,REF,RIT,TDB,TIT + public string Workers; + public float Distance; + public float Speed; + public Vector2 Idle_Key = new Vector2(); + public Vector2 Idle_Key2 = new Vector2(); + public Vector2 Surprise_Key_Left = new Vector2(); + public Vector2 Surprise_Key_Right = new Vector2(); + public Vector2 Success_Scarper_Key = new Vector2(); - } + } } diff --git a/Source/Orts.Formats.Msts/LightCollection.cs b/Source/Orts.Formats.Msts/LightCollection.cs index e9575256f8..eff63f7a7b 100644 --- a/Source/Orts.Formats.Msts/LightCollection.cs +++ b/Source/Orts.Formats.Msts/LightCollection.cs @@ -15,10 +15,13 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System.Collections.Generic; -using System.IO; using Microsoft.Xna.Framework; using Orts.Parsers.Msts; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; namespace Orts.Formats.Msts { diff --git a/Source/Orts.Formats.Msts/PathFile.cs b/Source/Orts.Formats.Msts/PathFile.cs index 7c842eb6b3..a6c81c670d 100644 --- a/Source/Orts.Formats.Msts/PathFile.cs +++ b/Source/Orts.Formats.Msts/PathFile.cs @@ -25,8 +25,10 @@ // The last TrPathNode is marked with a 4294967295 ( -1L or 0xFFFFFFFF) in its next field. using System; +using System.Collections; using System.Collections.Generic; using System.Diagnostics; +using System.IO; using Orts.Parsers.Msts; @@ -37,47 +39,47 @@ namespace Orts.Formats.Msts [Flags] public enum PathFlags { - NotPlayerPath = 0x20, + NotPlayerPath = 0x20, } - /// - /// Paths for both player train as well as AI trains. + /// + /// Paths for both player train as well as AI trains. /// This class reads and stores the MSTS .pat file. Because of the format of the .pat file /// it is easier to have an intermediate format that just contains the data of the .pat file /// and create the wanted data scructure from that. /// It is the intention that it is only used for /// * ORTS main menu /// * postprocessing by TrainPath. - /// - // Typical simple .PATfile (the example helps to understand the code below) - /* - SIMISA@@@@@@@@@@JINX0P0t______ + /// +// Typical simple .PATfile (the example helps to understand the code below) +/* + SIMISA@@@@@@@@@@JINX0P0t______ - Serial ( 1 ) - TrackPDPs ( - TrackPDP ( -12557 14761 -6.1249 1173.74 72.5884 2 0 ) - TrackPDP ( -12557 14761 -204.363 1173.74 976.083 2 0 ) - TrackPDP ( -12557 14762 -287.228 1173.74 -971.75 2 0 ) - TrackPDP ( -12558 14763 278.107 1155.51 -941.416 2 0 ) - TrackPDP ( -12557 14761 -49.6355 1173.74 -164.577 1 1 ) - TrackPDP ( -12558 14763 245.63 1139.65 -387.96 1 1 ) - ) - TrackPath ( - TrPathName ( EsxPincal ) - Name ( "Essex - Pinnacle" ) - TrPathStart ( Essex ) - TrPathEnd ( Pinnacle ) - TrPathNodes ( 6 - TrPathNode ( 00000000 1 4294967295 4 ) - TrPathNode ( 00000000 2 4294967295 0 ) - TrPathNode ( 00000000 3 4294967295 1 ) - TrPathNode ( 00000000 4 4294967295 2 ) - TrPathNode ( 00000000 5 4294967295 3 ) - TrPathNode ( 00000000 4294967295 4294967295 5 ) - ) +Serial ( 1 ) +TrackPDPs ( + TrackPDP ( -12557 14761 -6.1249 1173.74 72.5884 2 0 ) + TrackPDP ( -12557 14761 -204.363 1173.74 976.083 2 0 ) + TrackPDP ( -12557 14762 -287.228 1173.74 -971.75 2 0 ) + TrackPDP ( -12558 14763 278.107 1155.51 -941.416 2 0 ) + TrackPDP ( -12557 14761 -49.6355 1173.74 -164.577 1 1 ) + TrackPDP ( -12558 14763 245.63 1139.65 -387.96 1 1 ) +) +TrackPath ( + TrPathName ( EsxPincal ) + Name ( "Essex - Pinnacle" ) + TrPathStart ( Essex ) + TrPathEnd ( Pinnacle ) + TrPathNodes ( 6 + TrPathNode ( 00000000 1 4294967295 4 ) + TrPathNode ( 00000000 2 4294967295 0 ) + TrPathNode ( 00000000 3 4294967295 1 ) + TrPathNode ( 00000000 4 4294967295 2 ) + TrPathNode ( 00000000 5 4294967295 3 ) + TrPathNode ( 00000000 4294967295 4294967295 5 ) + ) - ) - */ +) +*/ // TrackPDP format is : TrackPDP ( tileX tileZ x y z flag1 flag2) // Precise meaning of flag1 and flag2 is unknown. // 2 0 seems to be junction @@ -110,8 +112,8 @@ public enum PathFlags // 2 0 8 (e.g. Shiatsu, not clear why). It does not seem to be 'other exit' // - - public class PathFile + + public class PathFile { #region Fields @@ -160,11 +162,11 @@ public PathFile(string filePath) new STFReader.TokenProcessor("trackpdp", ()=>{ trackPDPs.Add(new TrackPDP(stf)); }), });}), new STFReader.TokenProcessor("trackpath", ()=>{ stf.MustMatch("("); stf.ParseBlock(new STFReader.TokenProcessor[] { - new STFReader.TokenProcessor("trpathname", ()=>{ PathID = stf.ReadStringBlock(null); }), + new STFReader.TokenProcessor("trpathname", ()=>{ PathID = stf.ReadStringBlock(null); }), new STFReader.TokenProcessor("name", ()=>{ Name = stf.ReadStringBlock(null); }), - new STFReader.TokenProcessor("trpathflags", ()=>{ Flags = (PathFlags)stf.ReadHexBlock(null); }), - new STFReader.TokenProcessor("trpathstart", ()=>{ Start = stf.ReadStringBlock(null); }), - new STFReader.TokenProcessor("trpathend", ()=>{ End = stf.ReadStringBlock(null); }), + new STFReader.TokenProcessor("trpathflags", ()=>{ Flags = (PathFlags)stf.ReadHexBlock(null); }), + new STFReader.TokenProcessor("trpathstart", ()=>{ Start = stf.ReadStringBlock(null); }), + new STFReader.TokenProcessor("trpathend", ()=>{ End = stf.ReadStringBlock(null); }), new STFReader.TokenProcessor("trpathnodes", ()=>{ stf.MustMatch("("); var count = stf.ReadInt(null); @@ -192,15 +194,15 @@ public override string ToString() { return this.Name; } - } + } // for explanation of TrackPDP, see class PATfile - public class TrackPDP - { + public class TrackPDP + { //We are not using WorldLocation to keep MSTS file parsing independent of other parts of the code public int TileX; public int TileZ; - public float X, Y, Z; + public float X,Y,Z; public int junctionFlag, invalidFlag; #region Properties @@ -210,7 +212,7 @@ public class TrackPDP #endregion public TrackPDP(STFReader stf) - { + { stf.MustMatch("("); TileX = stf.ReadInt(null); TileZ = stf.ReadInt(null); @@ -232,16 +234,16 @@ public TrackPDP(TrItem item) junctionFlag = 0; invalidFlag = 0; } - } + } // for an explanation, see class PATfile public class TrPathNode { - public uint pathFlags, nextMainNode, nextSidingNode, fromPDP; - + public uint pathFlags,nextMainNode,nextSidingNode,fromPDP; + // Note, pathFlags is a complicated beast, which is not fully understood, see AIPath.cs - public bool HasNextMainNode { get { return (nextMainNode != 0xffffffff); } } + public bool HasNextMainNode { get { return (nextMainNode != 0xffffffff); } } public bool HasNextSidingNode { get { return (nextSidingNode != 0xffffffff); } } public TrPathNode(STFReader stf) @@ -254,7 +256,7 @@ public TrPathNode(STFReader stf) stf.SkipRestOfBlock(); } - public TrPathNode(uint flags, uint nextNode, uint nextSiding, uint pdp) + public TrPathNode (uint flags, uint nextNode, uint nextSiding, uint pdp) { pathFlags = flags; nextMainNode = nextNode; diff --git a/Source/Orts.Formats.Msts/RoadDatabaseFile.cs b/Source/Orts.Formats.Msts/RoadDatabaseFile.cs index cdab1aed96..078c3338d5 100644 --- a/Source/Orts.Formats.Msts/RoadDatabaseFile.cs +++ b/Source/Orts.Formats.Msts/RoadDatabaseFile.cs @@ -15,19 +15,22 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Diagnostics; +using System.IO; using System.Diagnostics.CodeAnalysis; using Orts.Parsers.Msts; namespace Orts.Formats.Msts { - /// - /// RDBFile is a representation of the .rdb file, that contains the road data base. + /// + /// RDBFile is a representation of the .rdb file, that contains the road data base. /// The database contains the same kind of objects as TDBFile, apart from a few road-specific items. - /// + /// [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", Justification = "Keeping identifier consistent to use in MSTS")] [SuppressMessage("Microsoft.Design", "CA1001:TypesThatOwnDisposableFieldsShouldBeDisposable", Justification = "Disposable only used in using statement, known FcCop bug")] public class RoadDatabaseFile - { + { /// /// Contains the Database with all the road tracks. /// Warning, the first RoadTrackDB entry is always null. @@ -39,19 +42,19 @@ public class RoadDatabaseFile /// /// Full file name of the .rdb file public RoadDatabaseFile(string filenamewithpath) - { - using (STFReader stf = new STFReader(filenamewithpath, false)) - stf.ParseFile(new STFReader.TokenProcessor[] { + { + using (STFReader stf = new STFReader(filenamewithpath, false)) + stf.ParseFile(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("trackdb", ()=>{ RoadTrackDB = new RoadTrackDB(stf); }), }); - } - } + } + } /// /// This class represents the Road Track Database. This is pretty similar to the (rail) Track Database. So for more details see there /// public class RoadTrackDB - { + { /// /// Array of all TrackNodes in the road database /// Warning, the first TrackNode is always null. @@ -93,14 +96,14 @@ public RoadTrackDB(STFReader stf) }), }); } - } + } /// /// Represents a Level crossing Item on the road (i.e. where cars must stop when a train is passing). /// [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", Justification = "Keeping identifier consistent to use in MSTS")] public class RoadLevelCrItem : TrItem - { + { /// Direction along track: 0 or 1 depending on which way signal is facing public uint Direction { get; set; } /// index to Sigal Object Table @@ -113,38 +116,38 @@ public class RoadLevelCrItem : TrItem /// The index of this TrItem in the list of TrItems [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", Justification = "Keeping identifier consistent to use in MSTS")] public RoadLevelCrItem(STFReader stf, int idx) - { + { SigObj = -1; - ItemType = trItemType.trXING; - stf.MustMatch("("); - stf.ParseBlock(new STFReader.TokenProcessor[] { + ItemType = trItemType.trXING; + stf.MustMatch("("); + stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("tritemid", ()=>{ ParseTrItemID(stf, idx); }), new STFReader.TokenProcessor("tritemrdata", ()=>{ TrItemRData(stf); }), new STFReader.TokenProcessor("tritemsdata", ()=>{ TrItemSData(stf); }), new STFReader.TokenProcessor("tritempdata", ()=>{ TrItemPData(stf); }) }); - } - } + } + } /// /// Represent a Car Spawner: the place where cars start to appear or disappear again /// public class CarSpawnerItem : TrItem - { + { /// /// Default constructor used during file parsing. /// /// The STFreader containing the file stream /// The index of this TrItem in the list of TrItems public CarSpawnerItem(STFReader stf, int idx) - { - ItemType = trItemType.trCARSPAWNER; - stf.MustMatch("("); - stf.ParseBlock(new STFReader.TokenProcessor[] { + { + ItemType = trItemType.trCARSPAWNER; + stf.MustMatch("("); + stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("tritemid", ()=>{ ParseTrItemID(stf, idx); }), new STFReader.TokenProcessor("tritemrdata", ()=>{ TrItemRData(stf); }), new STFReader.TokenProcessor("tritemsdata", ()=>{ TrItemSData(stf); }) }); - } - } + } + } } diff --git a/Source/Orts.Formats.Msts/RouteFile.cs b/Source/Orts.Formats.Msts/RouteFile.cs index d47b5342bb..6175d814c8 100644 --- a/Source/Orts.Formats.Msts/RouteFile.cs +++ b/Source/Orts.Formats.Msts/RouteFile.cs @@ -15,10 +15,13 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; using System.Collections.Generic; using System.Diagnostics; -using System.IO; +using System.Linq; +using System.Text; using Orts.Parsers.Msts; +using System.IO; namespace Orts.Formats.Msts { @@ -84,9 +87,9 @@ public Tr_RouteFile(STFReader stf) new STFReader.TokenProcessor("routestart", ()=>{ if (RouteStart == null) RouteStart = new RouteStart(stf); }), new STFReader.TokenProcessor("environment", ()=>{ Environment = new TRKEnvironment(stf); }), new STFReader.TokenProcessor("milepostunitskilometers", ()=>{ MilepostUnitsMetric = true; }), - new STFReader.TokenProcessor("electrified", ()=>{ Electrified = stf.ReadBoolBlock(false); }), + new STFReader.TokenProcessor("electrified", ()=>{ Electrified = stf.ReadBoolBlock(false); }), new STFReader.TokenProcessor("overheadwireheight", ()=>{ OverheadWireHeight = stf.ReadFloatBlock(STFReader.UNITS.Distance, 6.0f);}), - new STFReader.TokenProcessor("speedlimit", ()=>{ SpeedLimit = stf.ReadFloatBlock(STFReader.UNITS.Speed, 500.0f); }), + new STFReader.TokenProcessor("speedlimit", ()=>{ SpeedLimit = stf.ReadFloatBlock(STFReader.UNITS.Speed, 500.0f); }), new STFReader.TokenProcessor("defaultcrossingsms", ()=>{ DefaultCrossingSMS = stf.ReadStringBlock(null); }), new STFReader.TokenProcessor("defaultcoaltowersms", ()=>{ DefaultCoalTowerSMS = stf.ReadStringBlock(null); }), new STFReader.TokenProcessor("defaultdieseltowersms", ()=>{ DefaultDieselTowerSMS = stf.ReadStringBlock(null); }), @@ -138,22 +141,22 @@ public Tr_RouteFile(STFReader stf) public TRKEnvironment Environment; public bool MilepostUnitsMetric; public double MaxLineVoltage; - public bool Electrified = true; - public double OverheadWireHeight = 6.0; - public double SpeedLimit = 500.0f; //global speed limit m/s. + public bool Electrified = true; + public double OverheadWireHeight = 6.0; + public double SpeedLimit = 500.0f; //global speed limit m/s. public string DefaultCrossingSMS; public string DefaultCoalTowerSMS; public string DefaultDieselTowerSMS; public string DefaultWaterTowerSMS; public string DefaultSignalSMS; - public float TempRestrictedSpeed = -1f; + public float TempRestrictedSpeed = -1f; public Interpolator SuperElevationHgtpRadiusM; // Superelevation of tracks // Values for calculating Tunnel Resistance - will override default values. - public float SingleTunnelAreaM2; + public float SingleTunnelAreaM2; public float SingleTunnelPerimeterM; public float DoubleTunnelAreaM2; - public float DoubleTunnelPerimeterM; + public float DoubleTunnelPerimeterM; public float ForestClearDistance = 0; public bool RemoveForestTreesFromRoads = false; @@ -170,7 +173,7 @@ public Tr_RouteFile(STFReader stf) public float TriphaseWidth; public string DefaultTurntableSMS; - public bool? OpenDoorsInAITrains; // true if option active + public bool ? OpenDoorsInAITrains; // true if option active public int SwitchSMSNumber = -1; // defines the number of the switch SMS files in file ttypedat public int CurveSMSNumber = -1; // defines the number of the curve SMS files in file ttype.dat @@ -200,12 +203,12 @@ public class TRKEnvironment public TRKEnvironment(STFReader stf) { stf.MustMatch("("); - for (int i = 0; i < 12; ++i) + for( int i = 0; i < 12; ++i ) { var envfilekey = stf.ReadString(); var envfile = stf.ReadStringBlock(null); ENVFileNames.Add(envfilekey, envfile); - // Trace.TraceInformation("Environments array key {0} equals file name {1}", envfilekey, envfile); +// Trace.TraceInformation("Environments array key {0} equals file name {1}", envfilekey, envfile); } stf.SkipRestOfBlock(); } @@ -216,7 +219,7 @@ public string ENVFileName(SeasonType seasonType, WeatherType weatherType) //return ENVFileNames[index]; var envfilekey = seasonType.ToString() + weatherType.ToString(); var envfile = ENVFileNames[envfilekey]; - // Trace.TraceInformation("Selected Environment file is {1}", envfilekey, envfile); +// Trace.TraceInformation("Selected Environment file is {1}", envfilekey, envfile); return envfile; } } diff --git a/Source/Orts.Formats.Msts/ServiceFile.cs b/Source/Orts.Formats.Msts/ServiceFile.cs index b71728b4b7..a0a7bce665 100644 --- a/Source/Orts.Formats.Msts/ServiceFile.cs +++ b/Source/Orts.Formats.Msts/ServiceFile.cs @@ -15,31 +15,34 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections; +using System.IO; using Orts.Parsers.Msts; namespace Orts.Formats.Msts { - /// - /// Work with Service Files - /// - public class ServiceFile - { - public int Serial; - public string Name; - public string Train_Config; // name of the consist file, no extension - public string PathID; // name of the path file, no extension - public float MaxWheelAcceleration; - public float Efficiency; - public string TimeTableItem; + /// + /// Work with Service Files + /// + public class ServiceFile + { + public int Serial; + public string Name; + public string Train_Config; // name of the consist file, no extension + public string PathID; // name of the path file, no extension + public float MaxWheelAcceleration; + public float Efficiency; + public string TimeTableItem; public TimeTable TimeTable; - /// - /// Open a service file, - /// filePath includes full path and extension - /// - /// - public ServiceFile(string filePath) - { + /// + /// Open a service file, + /// filePath includes full path and extension + /// + /// + public ServiceFile( string filePath ) + { using (STFReader stf = new STFReader(filePath, false)) stf.ParseFile(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("service_definition", ()=> { stf.MustMatch("("); stf.ParseBlock(new STFReader.TokenProcessor[] { @@ -60,13 +63,13 @@ public ServiceFile() Efficiency = 0.9f; TimeTable = new TimeTable(); } - } // SRVFile + } // SRVFile public class TimeTable { public float InitialSpeed; - - public TimeTable(STFReader stf) + + public TimeTable (STFReader stf) { stf.MustMatch("("); stf.ParseBlock(new STFReader.TokenProcessor[] { diff --git a/Source/Orts.Formats.Msts/ShapeDescriptorFile.cs b/Source/Orts.Formats.Msts/ShapeDescriptorFile.cs index a599a8b48e..71228f8c62 100644 --- a/Source/Orts.Formats.Msts/ShapeDescriptorFile.cs +++ b/Source/Orts.Formats.Msts/ShapeDescriptorFile.cs @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; using Orts.Parsers.Msts; namespace Orts.Formats.Msts diff --git a/Source/Orts.Formats.Msts/ShapeFile.cs b/Source/Orts.Formats.Msts/ShapeFile.cs index 274cf2391c..bc66996e9d 100644 --- a/Source/Orts.Formats.Msts/ShapeFile.cs +++ b/Source/Orts.Formats.Msts/ShapeFile.cs @@ -15,11 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using Orts.Parsers.Msts; using System; using System.Collections.Generic; using System.Diagnostics; +using System.IO; using System.Linq; -using Orts.Parsers.Msts; // TODO - UV_OPS diff --git a/Source/Orts.Formats.Msts/SignalConfigurationFile.cs b/Source/Orts.Formats.Msts/SignalConfigurationFile.cs index 8c4d0d915f..8eb5fd88f5 100644 --- a/Source/Orts.Formats.Msts/SignalConfigurationFile.cs +++ b/Source/Orts.Formats.Msts/SignalConfigurationFile.cs @@ -623,7 +623,7 @@ public SignalType(STFReader stf, bool ortsMode, IDictionary{ numClearAhead = numClearAhead >= -1 ? numClearAhead : stf.ReadIntBlock(null); numdefs++;}), new STFReader.TokenProcessor("semaphoreinfo", ()=>{ SemaphoreInfo = stf.ReadFloatBlock(STFReader.UNITS.None, null); }), new STFReader.TokenProcessor("ortsdayglow", ()=>{ DayGlow = stf.ReadFloatBlock(STFReader.UNITS.None, null); }), - new STFReader.TokenProcessor("ortsnightglow", ()=>{ NightGlow = stf.ReadFloatBlock(STFReader.UNITS.None, null); }), + new STFReader.TokenProcessor("ortsnightglow", ()=>{ NightGlow = stf.ReadFloatBlock(STFReader.UNITS.None, null); }), new STFReader.TokenProcessor("ortsdaylight", ()=>{ DayLight = stf.ReadBoolBlock(true); }), new STFReader.TokenProcessor("ortsnormalsubtype", ()=>{ ORTSNormalSubtype = ReadORTSNormalSubtype(stf, ORTSNormalSubtypes); }), new STFReader.TokenProcessor("ortsonofftimes", ()=>{ OnOffTimeS = stf.ReadFloatBlock(STFReader.UNITS.None, null); }), @@ -1033,7 +1033,7 @@ public class SignalAspect /// Set to true if SignalFlags ASAP option specified, meaning train needs to go to speed As Soon As Possible public bool Asap { get; private set; } /// Set to true if SignalFlags RESET option specified (ORTS only) - public bool Reset; + public bool Reset; /// Set to true if no speed reduction is required for RESTRICTED or STOP_AND_PROCEED aspects (ORTS only) public bool NoSpeedReduction; @@ -1092,7 +1092,7 @@ public SignalAspect(STFReader stf) /// /// Describes a signal object shape and the set of signal heads and other sub-objects that are present on this. /// - + public class ApproachControlLimits { public float? ApproachControlPositionM = null; @@ -1175,7 +1175,7 @@ public class SignalSubObj /// public static IList SignalSubTypes = new[] {"DECOR","SIGNAL_HEAD","DUMMY1","DUMMY2", - "NUMBER_PLATE","GRADIENT_PLATE","USER1","USER2","USER3","USER4"}; + "NUMBER_PLATE","GRADIENT_PLATE","USER1","USER2","USER3","USER4"}; // made public for access from SIGSCR processing // Altered to match definition in MSTS diff --git a/Source/Orts.Formats.Msts/SignalEnums.cs b/Source/Orts.Formats.Msts/SignalEnums.cs index fd6a04b5d5..e46d201431 100644 --- a/Source/Orts.Formats.Msts/SignalEnums.cs +++ b/Source/Orts.Formats.Msts/SignalEnums.cs @@ -15,6 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + namespace Orts.Formats.Msts { /// diff --git a/Source/Orts.Formats.Msts/SignalScripts.cs b/Source/Orts.Formats.Msts/SignalScripts.cs index 36e341830c..afaf3d36ce 100644 --- a/Source/Orts.Formats.Msts/SignalScripts.cs +++ b/Source/Orts.Formats.Msts/SignalScripts.cs @@ -29,6 +29,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; +using System.Linq; using System.Text.RegularExpressions; namespace Orts.Formats.Msts @@ -1743,7 +1744,7 @@ private static void Debugprocess_FunctionCall(SCRParameterType TermParts) Trace.WriteLine($"SignalScript: {TermParts.PartParameter}, {TermParts.PartType}"); } - private static void TraceError(int lineNumber, string tokenType, string termString) + private static void TraceError(int lineNumber, string tokenType, string termString ) { #if DEBUG_PRINT_IN File.AppendAllText(din_fileLoc + @"sigscr.txt", $"Unknown {tokenType} : {termString}\n"); diff --git a/Source/Orts.Formats.Msts/SoundManagmentFile.cs b/Source/Orts.Formats.Msts/SoundManagmentFile.cs index ca16d1858b..3e3efec859 100644 --- a/Source/Orts.Formats.Msts/SoundManagmentFile.cs +++ b/Source/Orts.Formats.Msts/SoundManagmentFile.cs @@ -15,7 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections; using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; using Orts.Parsers.Msts; namespace Orts.Formats.Msts @@ -48,16 +53,16 @@ public static SoundManagmentFile Get(string path) } } - /// - /// Represents the hiearchical structure of the SMS File - /// - public class SoundManagmentFile - { - public Tr_SMS Tr_SMS; + /// + /// Represents the hiearchical structure of the SMS File + /// + public class SoundManagmentFile + { + public Tr_SMS Tr_SMS; - public SoundManagmentFile(string filePath) - { - ReadFile(filePath); + public SoundManagmentFile( string filePath ) + { + ReadFile(filePath); } private void ReadFile(string filePath) @@ -68,12 +73,12 @@ private void ReadFile(string filePath) }); } - } // class SMSFile + } // class SMSFile public class Tr_SMS { public List ScalabiltyGroups = new List(); - + public Tr_SMS(STFReader stf) { stf.MustMatch("("); @@ -134,14 +139,14 @@ public Activation() } - public class Deactivation : Activation + public class Deactivation: Activation { - public Deactivation(STFReader stf) : base(stf) + public Deactivation(STFReader stf): base(stf) { } // for precompiled sound sources for activity sound - public Deactivation() : base() + public Deactivation(): base() { } } @@ -225,10 +230,10 @@ public VolumeCurve(STFReader stf) { CurvePoints[i].X = stf.ReadFloat(STFReader.UNITS.None, null); if (Control == Controls.DistanceControlled) - { - if (CurvePoints[i].X >= 0) CurvePoints[i].X *= CurvePoints[i].X; - else CurvePoints[i].X *= -CurvePoints[i].X; - } + { + if (CurvePoints[i].X >= 0) CurvePoints[i].X *= CurvePoints[i].X; + else CurvePoints[i].X *= -CurvePoints[i].X; + } CurvePoints[i].Y = stf.ReadFloat(STFReader.UNITS.None, null); } stf.SkipRestOfBlock(); @@ -237,7 +242,7 @@ public VolumeCurve(STFReader stf) } } - public class FrequencyCurve : VolumeCurve + public class FrequencyCurve: VolumeCurve { public FrequencyCurve(STFReader stf) : base(stf) @@ -275,13 +280,13 @@ protected void ParsePlayCommand(STFReader f, string lowertoken) { switch (lowertoken) { - case "playoneshot": + case "playoneshot": case "startloop": - case "releaselooprelease": + case "releaselooprelease": case "startlooprelease": - case "releaseloopreleasewithjump": - case "disabletrigger": - case "enabletrigger": + case "releaseloopreleasewithjump": + case "disabletrigger": + case "enabletrigger": case "setstreamvolume": ++playcommandcount; if (playcommandcount > 1) @@ -295,11 +300,11 @@ protected void ParsePlayCommand(STFReader f, string lowertoken) { case "playoneshot": SoundCommand = new PlayOneShot(f); break; case "startloop": SoundCommand = new StartLoop(f); break; - case "releaselooprelease": SoundCommand = new ReleaseLoopRelease(f); break; - case "startlooprelease": SoundCommand = new StartLoopRelease(f); break; - case "releaseloopreleasewithjump": SoundCommand = new ReleaseLoopReleaseWithJump(f); break; - case "disabletrigger": SoundCommand = new DisableTrigger(f); break; - case "enabletrigger": SoundCommand = new EnableTrigger(f); break; + case "releaselooprelease": SoundCommand = new ReleaseLoopRelease(f); break; + case "startlooprelease": SoundCommand = new StartLoopRelease( f ); break; + case "releaseloopreleasewithjump": SoundCommand = new ReleaseLoopReleaseWithJump( f ); break; + case "disabletrigger": SoundCommand = new DisableTrigger( f); break; + case "enabletrigger": SoundCommand = new EnableTrigger( f); break; case "setstreamvolume": SoundCommand = new SetStreamVolume(f); break; case "(": f.SkipRestOfBlock(); break; } @@ -333,10 +338,8 @@ public Discrete_Trigger(STFReader f) public class Variable_Trigger : Trigger { - public enum Events - { - Speed_Inc_Past, Speed_Dec_Past, Distance_Inc_Past, Distance_Dec_Past, - Variable1_Inc_Past, Variable1_Dec_Past, Variable2_Inc_Past, Variable2_Dec_Past, Variable3_Inc_Past, Variable3_Dec_Past, BrakeCyl_Inc_Past, BrakeCyl_Dec_Past, CurveForce_Inc_Past, CurveForce_Dec_Past + public enum Events { Speed_Inc_Past, Speed_Dec_Past, Distance_Inc_Past, Distance_Dec_Past, + Variable1_Inc_Past, Variable1_Dec_Past, Variable2_Inc_Past, Variable2_Dec_Past, Variable3_Inc_Past, Variable3_Dec_Past, BrakeCyl_Inc_Past, BrakeCyl_Dec_Past, CurveForce_Inc_Past, CurveForce_Dec_Past }; public Events Event; @@ -378,7 +381,7 @@ public Variable_Trigger(STFReader f) case "curveforce_dec_past": Event = Events.CurveForce_Dec_Past; break; } - + while (!f.EndOfBlock()) ParsePlayCommand(f, f.ReadString().ToLower()); @@ -485,7 +488,7 @@ public ReleaseLoopReleaseWithJump(STFReader f) } } - public class SoundPlayCommand : SoundCommand + public class SoundPlayCommand: SoundCommand { public string[] Files; public SelectionMethods SelectionMethod = SelectionMethods.SequentialSelection; @@ -493,7 +496,7 @@ public class SoundPlayCommand : SoundCommand public class PlayOneShot : SoundPlayCommand { - + public PlayOneShot(STFReader f) { f.MustMatch("("); @@ -535,7 +538,7 @@ public PlayOneShot(STFReader f) public class StartLoop : PlayOneShot { - public StartLoop(STFReader f) : base(f) + public StartLoop( STFReader f ): base(f) { } } diff --git a/Source/Orts.Formats.Msts/SpeedpostDatFile.cs b/Source/Orts.Formats.Msts/SpeedpostDatFile.cs index d7e1e4962d..b80c808cee 100644 --- a/Source/Orts.Formats.Msts/SpeedpostDatFile.cs +++ b/Source/Orts.Formats.Msts/SpeedpostDatFile.cs @@ -16,7 +16,10 @@ // along with Open Rails. If not, see . using System; +using System.Collections; +using System.Collections.Generic; using System.IO; +using Microsoft.Xna.Framework; using Orts.Parsers.Msts; // This file parses only the shape names for temporary speed restrictions; the other shape names are not needed @@ -24,15 +27,15 @@ namespace Orts.Formats.Msts { - public class SpeedpostDatFile - { - public string[] TempSpeedShapeNames = new string[3]; + public class SpeedpostDatFile + { + public string [] TempSpeedShapeNames = new string[3]; - public SpeedpostDatFile(string filePath, string shapePath) - { - using (STFReader stf = new STFReader(filePath, false)) - { - stf.ParseBlock(new STFReader.TokenProcessor[] { + public SpeedpostDatFile(string filePath, string shapePath) + { + using (STFReader stf = new STFReader(filePath, false)) + { + stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("speed_warning_sign_shape", ()=> { var dataItem = stf.ReadStringBlock(null); @@ -73,8 +76,8 @@ public SpeedpostDatFile(string filePath, string shapePath) } ), }); - } - } + } + } } // class SpeedpostDatFile } diff --git a/Source/Orts.Formats.Msts/TrackDatabaseFile.cs b/Source/Orts.Formats.Msts/TrackDatabaseFile.cs index 6ab80c0ca7..e1bf02567f 100644 --- a/Source/Orts.Formats.Msts/TrackDatabaseFile.cs +++ b/Source/Orts.Formats.Msts/TrackDatabaseFile.cs @@ -16,14 +16,14 @@ // along with Open Rails. If not, see . using System; -using System.Collections.Generic; using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; using System.IO; -using Microsoft.Xna.Framework; -using Orts.Common; +using System.Diagnostics.CodeAnalysis; +using System.Collections.Generic; using Orts.Parsers.Msts; using ORTS.Common; +using Microsoft.Xna.Framework; +using Orts.Common; namespace Orts.Formats.Msts { @@ -50,7 +50,7 @@ public class TrackDatabaseFile /// /// Full file name of the .rdb file public TrackDatabaseFile(string filenamewithpath) - { + { using (STFReader stf = new STFReader(filenamewithpath, false)) stf.ParseFile(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("trackdb", ()=>{ TrackDB = new TrackDB(stf); }), @@ -96,7 +96,7 @@ public class TrackDB /// Array of all TrackNodes in the track database /// Warning, the first TrackNode is always null. /// - public TrackNode[] TrackNodes; + public TrackNode[] TrackNodes; /// /// Array of all Track Items (TrItem) in the road database @@ -140,7 +140,7 @@ public TrackDB(STFReader stf) }), }); } - + /// /// Find the index of the TrackNode /// @@ -187,7 +187,7 @@ public void AddTrItems(TrItem[] newTrItems) for (int i = 0; i < newTrItems.Length; i++) { int newId = i + TrItemTable.Length; - newTrItems[i].TrItemId = (uint)newId; + newTrItems[i].TrItemId = (uint) newId; newTrItemTable[newId] = newTrItems[i]; } @@ -200,7 +200,7 @@ public void AddTrNodesToPointsOnApiMap(InfoApiMap infoApiMap) { if (trackNode != null) { - try + try { if (trackNode.UiD != null) { @@ -327,7 +327,7 @@ public class TrackNode /// [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", Justification = "Keeping identifier consistent to use in MSTS")] public TrVectorNode TrVectorNode { get; set; } - + /// /// True when this TrackNode has nothing else connected to it (that is, it is /// a buffer end or an unfinished track) and trains cannot proceed beyond here. @@ -453,7 +453,7 @@ public TrPin(STFReader stf) /// /// Default (empty) constructor /// - public TrPin() { } + public TrPin() {} /// /// Create a shallow copy of the current TrPin @@ -522,7 +522,7 @@ public UiD(STFReader stf) AZ = stf.ReadFloat(STFReader.UNITS.None, null); stf.SkipRestOfBlock(); } - + /// /// Constructor from a vector section /// @@ -554,7 +554,7 @@ public class TrJunctionNode /// The route of a switch that is currently in use. /// public int SelectedRoute { get; set; } - + /// /// Reference to the parent trackNode /// @@ -620,7 +620,7 @@ public double GetAngle(TrackSectionsFile tsectionDat) TrackShape trackShape = tsectionDat.TrackShapes.Get(ShapeIndex); SectionIdx[] SectionIdxs = trackShape.SectionIdxs; - for (int index = 0; index <= SectionIdxs.Length - 1; index++) + for (int index = 0; index <= SectionIdxs.Length-1 ; index++) { if (index == trackShape.MainRoute) continue; uint[] sections = SectionIdxs[index].TrackSections; @@ -851,7 +851,7 @@ public abstract class TrItem /// Describes the various types of Track Items /// public enum trItemType - { + { /// empty item trEMPTY, // the first, so translates to '0', so this is the default. /// A place where two tracks cross over each other @@ -928,7 +928,7 @@ protected void ParseTrItemID(STFReader stf, int idx) Debug.Assert(idx == TrItemId, "Index Mismatch"); stf.SkipRestOfBlock(); } - + /// /// Reads the Rdata from filestream /// @@ -1159,7 +1159,7 @@ public SpeedPostItem(STFReader stf, int idx) SigObj = -1; ItemType = trItemType.trSPEEDPOST; stf.MustMatch("("); - stf.ParseBlock(new STFReader.TokenProcessor[] { + stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("tritemid", ()=>{ ParseTrItemID(stf, idx); }), new STFReader.TokenProcessor("tritemrdata", ()=>{ TrItemRData(stf); }), new STFReader.TokenProcessor("tritemsdata", ()=>{ TrItemSData(stf); }), @@ -1168,44 +1168,44 @@ public SpeedPostItem(STFReader stf, int idx) new STFReader.TokenProcessor("speedposttritemdata", ()=>{ stf.MustMatch("("); Flags = stf.ReadUInt(null); - if ((Flags & 1) != 0) IsWarning = true; - if ((Flags & (1 << 1)) != 0) IsLimit = true; - if (!IsWarning && !IsLimit) { - IsMilePost = true; - } - else { - if (IsWarning && IsLimit) - { - IsWarning = false; - IsResume = true; - } - - if ((Flags & (1 << 5)) != 0) IsPassenger = true; - if ((Flags & (1 << 6)) != 0) IsFreight = true; - if ((Flags & (1 << 7)) != 0) IsFreight = IsPassenger = true; - if ((Flags & (1 << 8)) != 0) IsMPH = true; - if ((Flags & (1 << 4)) != 0) { - ShowNumber = true; - if ((Flags & (1 << 9)) != 0) ShowDot = true; - } - } + if ((Flags & 1) != 0) IsWarning = true; + if ((Flags & (1 << 1)) != 0) IsLimit = true; + if (!IsWarning && !IsLimit) { + IsMilePost = true; + } + else { + if (IsWarning && IsLimit) + { + IsWarning = false; + IsResume = true; + } + + if ((Flags & (1 << 5)) != 0) IsPassenger = true; + if ((Flags & (1 << 6)) != 0) IsFreight = true; + if ((Flags & (1 << 7)) != 0) IsFreight = IsPassenger = true; + if ((Flags & (1 << 8)) != 0) IsMPH = true; + if ((Flags & (1 << 4)) != 0) { + ShowNumber = true; + if ((Flags & (1 << 9)) != 0) ShowDot = true; + } + } // The number of parameters depends on the flags seeting // To do: Check flags seetings and parse accordingly. if (!IsResume) - { + { //SpeedInd = stf.ReadFloat(STFReader.UNITS.None, null); if (IsMilePost && ((Flags & (1 << 9)) == 0)) SpeedInd = (float)Math.Truncate(stf.ReadDouble(null)); else SpeedInd = stf.ReadFloat(STFReader.UNITS.None, null); - } - - if (ShowNumber) - { - DisplayNumber = stf.ReadInt(null); - } + } - Angle = MathHelper.WrapAngle(stf.ReadFloat(STFReader.UNITS.None, null)); + if (ShowNumber) + { + DisplayNumber = stf.ReadInt(null); + } + + Angle = MathHelper.WrapAngle(stf.ReadFloat(STFReader.UNITS.None, null)); stf.SkipRestOfBlock(); }), @@ -1218,7 +1218,7 @@ public SpeedPostItem() } public class TempSpeedPostItem : SpeedPostItem - { + { /// /// Constructor for creating a speedpost from activity speed restriction zone /// @@ -1228,7 +1228,7 @@ public class TempSpeedPostItem : SpeedPostItem /// public WorldPosition WorldPosition; - public TempSpeedPostItem(Tr_RouteFile routeFile, Position position, bool isStart, WorldPosition worldPosition, bool isWarning) + public TempSpeedPostItem(Tr_RouteFile routeFile, Position position, bool isStart, WorldPosition worldPosition, bool isWarning) { // TrItemId needs to be set later ItemType = trItemType.trSPEEDPOST; @@ -1246,7 +1246,7 @@ public TempSpeedPostItem(Tr_RouteFile routeFile, Position position, bool isStart if (routeFile.MilepostUnitsMetric == true) { this.IsMPH = false; - SpeedInd = (int)(ORTS.Common.MpS.ToKpH(routeFile.TempRestrictedSpeed) + 0.1f); + SpeedInd = (int)(ORTS.Common.MpS.ToKpH(routeFile.TempRestrictedSpeed) + 0.1f); } else { @@ -1333,7 +1333,7 @@ public EmptyItem(STFReader stf, int idx) /// /// Representa a level Crossing item (so track crossing road) /// - [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", Justification = "Keeping identifier consistent to use in MSTS")] + [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", Justification="Keeping identifier consistent to use in MSTS")] public class LevelCrItem : TrItem { /// @@ -1390,7 +1390,7 @@ public SidingItem(STFReader stf, int idx) }); } } - + /// /// Represents either start or end of a platform (a place where trains can stop). /// diff --git a/Source/Orts.Formats.Msts/TrackSectionsFile.cs b/Source/Orts.Formats.Msts/TrackSectionsFile.cs index 7ef8bb01ab..fefb78a103 100644 --- a/Source/Orts.Formats.Msts/TrackSectionsFile.cs +++ b/Source/Orts.Formats.Msts/TrackSectionsFile.cs @@ -16,6 +16,7 @@ // along with Open Rails. If not, see . using System; +using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; @@ -24,100 +25,100 @@ namespace Orts.Formats.Msts { - // GLOBAL TSECTION DAT - - public class SectionCurve - { - public SectionCurve() - { - Radius = 0; - Angle = 0; - } - public SectionCurve(STFReader stf) - { - stf.MustMatch("("); + // GLOBAL TSECTION DAT + + public class SectionCurve + { + public SectionCurve() + { + Radius = 0; + Angle = 0; + } + public SectionCurve(STFReader stf) + { + stf.MustMatch("("); Radius = stf.ReadFloat(STFReader.UNITS.Distance, null); Angle = stf.ReadFloat(STFReader.UNITS.None, null); stf.SkipRestOfBlock(); - } - public float Radius; // meters - public float Angle; // degrees - } - - public class SectionSize - { - public SectionSize() - { - Width = 1.5F; - Length = 0; - } - public SectionSize(STFReader stf) - { - stf.MustMatch("("); + } + public float Radius; // meters + public float Angle; // degrees + } + + public class SectionSize + { + public SectionSize() + { + Width = 1.5F; + Length = 0; + } + public SectionSize(STFReader stf) + { + stf.MustMatch("("); Width = stf.ReadFloat(STFReader.UNITS.Distance, null); Length = stf.ReadFloat(STFReader.UNITS.Distance, null); stf.SkipRestOfBlock(); - } - public float Width; - public float Length; - } - - public class TrackSection - { - public TrackSection() - { - } - - public TrackSection(STFReader stf) - { - stf.MustMatch("("); + } + public float Width; + public float Length; + } + + public class TrackSection + { + public TrackSection() + { + } + + public TrackSection(STFReader stf) + { + stf.MustMatch("("); SectionIndex = stf.ReadUInt(null); stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("sectionsize", ()=>{ SectionSize = new SectionSize(stf); }), new STFReader.TokenProcessor("sectioncurve", ()=>{ SectionCurve = new SectionCurve(stf); }), }); - //if( SectionSize == null ) - // throw( new STFError( stf, "Missing SectionSize" ) ); - // note- default TSECTION.DAT does have some missing sections - } - public uint SectionIndex; - public SectionSize SectionSize; - public SectionCurve SectionCurve; - } - - public class RouteTrackSection : TrackSection - { - public RouteTrackSection(STFReader stf) - { - stf.MustMatch("("); - stf.MustMatch("SectionCurve"); - stf.SkipBlock(); + //if( SectionSize == null ) + // throw( new STFError( stf, "Missing SectionSize" ) ); + // note- default TSECTION.DAT does have some missing sections + } + public uint SectionIndex; + public SectionSize SectionSize; + public SectionCurve SectionCurve; + } + + public class RouteTrackSection: TrackSection + { + public RouteTrackSection(STFReader stf) + { + stf.MustMatch("("); + stf.MustMatch( "SectionCurve" ); + stf.SkipBlock(); SectionIndex = stf.ReadUInt(null); - SectionSize = new SectionSize(); + SectionSize = new SectionSize(); float a = stf.ReadFloat(STFReader.UNITS.Distance, null); float b = stf.ReadFloat(STFReader.UNITS.None, null); - if (b == 0) - // Its straight - { - SectionSize.Length = a; - } - else - // its curved - { - SectionCurve = new SectionCurve(); - SectionCurve.Radius = b; + if( b == 0 ) + // Its straight + { + SectionSize.Length = a; + } + else + // its curved + { + SectionCurve = new SectionCurve(); + SectionCurve.Radius = b; SectionCurve.Angle = (float)MathHelper.ToDegrees(a); - } - stf.SkipRestOfBlock(); - } - } - - public class TrackSections : Dictionary - { - public TrackSections(STFReader stf) - { + } + stf.SkipRestOfBlock(); + } + } + + public class TrackSections: Dictionary + { + public TrackSections(STFReader stf) + { AddRouteStandardTrackSections(stf); - } + } public void AddRouteStandardTrackSections(STFReader stf) { @@ -128,14 +129,14 @@ public void AddRouteStandardTrackSections(STFReader stf) }); } - public void AddRouteTrackSections(STFReader stf) - { - stf.MustMatch("("); + public void AddRouteTrackSections(STFReader stf) + { + stf.MustMatch("("); MaxSectionIndex = stf.ReadUInt(null); stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("tracksection", ()=>{ AddSection(stf, new RouteTrackSection(stf)); }), }); - } + } void AddSection(STFReader stf, TrackSection section) { @@ -146,57 +147,57 @@ void AddSection(STFReader stf, TrackSection section) public static int MissingTrackSectionWarnings; - public TrackSection Get(uint targetSectionIndex) - { + public TrackSection Get( uint targetSectionIndex ) + { TrackSection ts; if (TryGetValue(targetSectionIndex, out ts)) return ts; - if (MissingTrackSectionWarnings++ < 5) - Trace.TraceWarning("Skipped track section {0} not in global or dynamic TSECTION.DAT", targetSectionIndex); + if (MissingTrackSectionWarnings++ < 5) + Trace.TraceWarning("Skipped track section {0} not in global or dynamic TSECTION.DAT", targetSectionIndex); return null; - } - public uint MaxSectionIndex; - } - - public class SectionIdx - { - public SectionIdx(STFReader stf) - { - stf.MustMatch("("); + } + public uint MaxSectionIndex; + } + + public class SectionIdx + { + public SectionIdx(STFReader stf) + { + stf.MustMatch("("); NoSections = stf.ReadUInt(null); X = stf.ReadDouble(null); Y = stf.ReadDouble(null); Z = stf.ReadDouble(null); A = stf.ReadDouble(null); - TrackSections = new uint[NoSections]; - for (int i = 0; i < NoSections; ++i) - { - string token = stf.ReadString(); - if (token == ")") + TrackSections = new uint[NoSections]; + for( int i = 0; i < NoSections; ++i ) + { + string token = stf.ReadString(); + if( token == ")" ) { STFException.TraceWarning(stf, "Missing track section"); return; // there are many TSECTION.DAT's with missing sections so we will accept this error } if (!uint.TryParse(token, out TrackSections[i])) STFException.TraceWarning(stf, "Invalid track section " + token); - } - stf.SkipRestOfBlock(); - } - public uint NoSections; - public double X, Y, Z; // Offset - public double A; // Angular offset - public uint[] TrackSections; - } - - - [DebuggerDisplay("TrackShape {ShapeIndex}")] - public class TrackShape - { - public TrackShape(STFReader stf) - { - stf.MustMatch("("); + } + stf.SkipRestOfBlock(); + } + public uint NoSections; + public double X,Y,Z; // Offset + public double A; // Angular offset + public uint[] TrackSections; + } + + + [DebuggerDisplay("TrackShape {ShapeIndex}")] + public class TrackShape + { + public TrackShape(STFReader stf) + { + stf.MustMatch("("); ShapeIndex = stf.ReadUInt(null); - int nextPath = 0; + int nextPath = 0; stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("filename", ()=>{ FileName = stf.ReadStringBlock(null); }), new STFReader.TokenProcessor("numpaths", ()=>{ SectionIdxs = new SectionIdx[NumPaths = stf.ReadUIntBlock(null)]; }), @@ -206,79 +207,79 @@ public TrackShape(STFReader stf) new STFReader.TokenProcessor("tunnelshape", ()=>{ TunnelShape = stf.ReadBoolBlock(true); }), new STFReader.TokenProcessor("roadshape", ()=>{ RoadShape = stf.ReadBoolBlock(true); }), }); - // TODO - this was removed since TrackShape( 183 ) is blank - //if( FileName == null ) throw( new STFError( stf, "Missing FileName" ) ); - //if( SectionIdxs == null ) throw( new STFError( stf, "Missing SectionIdxs" ) ); - //if( NumPaths == 0 ) throw( new STFError( stf, "No Paths in TrackShape" ) ); - } - public uint ShapeIndex; - public string FileName; + // TODO - this was removed since TrackShape( 183 ) is blank + //if( FileName == null ) throw( new STFError( stf, "Missing FileName" ) ); + //if( SectionIdxs == null ) throw( new STFError( stf, "Missing SectionIdxs" ) ); + //if( NumPaths == 0 ) throw( new STFError( stf, "No Paths in TrackShape" ) ); + } + public uint ShapeIndex; + public string FileName; public uint NumPaths; public uint MainRoute; - public double ClearanceDistance = 0.0; - public SectionIdx[] SectionIdxs; + public double ClearanceDistance = 0.0; + public SectionIdx[] SectionIdxs; public bool TunnelShape; public bool RoadShape; - } - - public class TrackShapes : Dictionary - { + } + + public class TrackShapes: Dictionary + { - public uint MaxShapeIndex; + public uint MaxShapeIndex; - - public TrackShapes(STFReader stf) - { + + public TrackShapes(STFReader stf) + { AddRouteTrackShapes(stf); - } + } public void AddRouteTrackShapes(STFReader stf) { stf.MustMatch("("); MaxShapeIndex = stf.ReadUInt(null); - stf.ParseBlock(new STFReader.TokenProcessor[] + stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("trackshape", ()=>{ Add(stf, new TrackShape(stf)); }), }); } - private void Add(STFReader stf, TrackShape trackShape) - { - if (ContainsKey(trackShape.ShapeIndex)) - STFException.TraceWarning(stf, "Replaced duplicate TrackShape " + trackShape.ShapeIndex); - this[trackShape.ShapeIndex] = trackShape; - } - - - /// - /// Returns the TrackShape corresponding to the given index value. - /// - /// The index value of the desired TrackShape. - /// The requested TrackShape. - public TrackShape Get(uint targetShapeIndex) - { + private void Add(STFReader stf, TrackShape trackShape) + { + if (ContainsKey(trackShape.ShapeIndex)) + STFException.TraceWarning(stf, "Replaced duplicate TrackShape " + trackShape.ShapeIndex); + this[trackShape.ShapeIndex] = trackShape; + } + + + /// + /// Returns the TrackShape corresponding to the given index value. + /// + /// The index value of the desired TrackShape. + /// The requested TrackShape. + public TrackShape Get(uint targetShapeIndex ) + { TrackShape returnValue; - if (ContainsKey(targetShapeIndex)) - { - returnValue = this[targetShapeIndex]; - } - else - { - throw new InvalidDataException("ShapeIndex not found"); - } - - return returnValue; - } - - - } - - public class TrackSectionsFile - { - public void AddRouteTSectionDatFile(string pathNameExt) - { + if (ContainsKey(targetShapeIndex)) + { + returnValue = this[targetShapeIndex]; + } + else + { + throw new InvalidDataException("ShapeIndex not found"); + } + + return returnValue; + } + + + } + + public class TrackSectionsFile + { + public void AddRouteTSectionDatFile( string pathNameExt ) + { using (STFReader stf = new STFReader(pathNameExt, false)) { if (stf.SimisSignature != "SIMISA@@@@@@@@@@JINX0T0t______") @@ -292,20 +293,20 @@ public void AddRouteTSectionDatFile(string pathNameExt) // todo read in SectionIdx part of RouteTSectionDat }); } - } + } public TrackSectionsFile(string filePath) { using (STFReader stf = new STFReader(filePath, false)) { stf.ParseFile(new STFReader.TokenProcessor[] { - new STFReader.TokenProcessor("tracksections", ()=>{ + new STFReader.TokenProcessor("tracksections", ()=>{ if (TrackSections == null) TrackSections = new TrackSections(stf); else TrackSections.AddRouteStandardTrackSections(stf);}), - new STFReader.TokenProcessor("trackshapes", ()=>{ - if (TrackShapes == null) + new STFReader.TokenProcessor("trackshapes", ()=>{ + if (TrackShapes == null) TrackShapes = new TrackShapes(stf); else TrackShapes.AddRouteTrackShapes(stf);}), @@ -315,66 +316,66 @@ public TrackSectionsFile(string filePath) if (TrackShapes == null) throw new STFException(stf, "Missing TrackShapes"); } } - public TrackSections TrackSections; - public TrackShapes TrackShapes; - public TSectionIdx TSectionIdx; //route's tsection.dat + public TrackSections TrackSections; + public TrackShapes TrackShapes; + public TSectionIdx TSectionIdx; //route's tsection.dat - } + } - public class TSectionIdx //SectionIdx in the route's tsection.dat - { + public class TSectionIdx //SectionIdx in the route's tsection.dat + { - public TSectionIdx(STFReader stf) - { - stf.MustMatch("("); - NoSections = stf.ReadUInt(null); - TrackPaths = new Dictionary((int)NoSections); - stf.ParseBlock(new STFReader.TokenProcessor[] { + public TSectionIdx(STFReader stf) + { + stf.MustMatch("("); + NoSections = stf.ReadUInt(null); + TrackPaths = new Dictionary((int)NoSections); + stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("trackpath", ()=>{ AddPath(stf, new TrackPath(stf)); }), }); - stf.SkipRestOfBlock(); - } - - private void AddPath(STFReader stf, TrackPath path) - { - try - { - TrackPaths.Add(path.DynamicSectionIndex, path); - } - catch (Exception e) - { - System.Console.WriteLine("Warning: in route tsection.dat " + e.Message); - } - } - public uint NoSections; - public Dictionary TrackPaths; - } - - public class TrackPath //SectionIdx in the route's tsection.dat - { - - public TrackPath(STFReader stf) - { - stf.MustMatch("("); - DynamicSectionIndex = stf.ReadUInt(null); - NoSections = stf.ReadUInt(null); - TrackSections = new uint[NoSections]; - for (int i = 0; i < NoSections; ++i) - { - string token = stf.ReadString(); - if (token == ")") - { - STFException.TraceWarning(stf, "Missing track section"); - return; // there are many TSECTION.DAT's with missing sections so we will accept this error - } - if (!uint.TryParse(token, out TrackSections[i])) - STFException.TraceWarning(stf, "Invalid track section " + token); - } - stf.SkipRestOfBlock(); - - } - public uint DynamicSectionIndex; - public uint NoSections; - public uint[] TrackSections; - } + stf.SkipRestOfBlock(); + } + + private void AddPath(STFReader stf, TrackPath path) + { + try + { + TrackPaths.Add(path.DynamicSectionIndex, path); + } + catch (Exception e) + { + System.Console.WriteLine("Warning: in route tsection.dat " + e.Message); + } + } + public uint NoSections; + public Dictionary TrackPaths; + } + + public class TrackPath //SectionIdx in the route's tsection.dat + { + + public TrackPath(STFReader stf) + { + stf.MustMatch("("); + DynamicSectionIndex = stf.ReadUInt(null); + NoSections = stf.ReadUInt(null); + TrackSections = new uint[NoSections]; + for (int i = 0; i < NoSections; ++i) + { + string token = stf.ReadString(); + if (token == ")") + { + STFException.TraceWarning(stf, "Missing track section"); + return; // there are many TSECTION.DAT's with missing sections so we will accept this error + } + if (!uint.TryParse(token, out TrackSections[i])) + STFException.TraceWarning(stf, "Invalid track section " + token); + } + stf.SkipRestOfBlock(); + + } + public uint DynamicSectionIndex; + public uint NoSections; + public uint[] TrackSections; + } } diff --git a/Source/Orts.Formats.Msts/TrackTypesFile.cs b/Source/Orts.Formats.Msts/TrackTypesFile.cs index e9f6876759..7a0a0578b5 100644 --- a/Source/Orts.Formats.Msts/TrackTypesFile.cs +++ b/Source/Orts.Formats.Msts/TrackTypesFile.cs @@ -15,19 +15,23 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections; using System.Collections.Generic; +using System.IO; +using Microsoft.Xna.Framework; using Orts.Parsers.Msts; namespace Orts.Formats.Msts { - // TODO - this is an incomplete parse of the cvf file. - public class TrackTypesFile : List - { - + // TODO - this is an incomplete parse of the cvf file. + public class TrackTypesFile: List + { + public TrackTypesFile(string filePath) - { + { using (STFReader stf = new STFReader(filePath, false)) { var count = stf.ReadInt(null); @@ -42,7 +46,7 @@ public TrackTypesFile(string filePath) if (count > 0) STFException.TraceWarning(stf, count + " missing TrackType(s)"); } - } + } public class TrackType { @@ -60,6 +64,6 @@ public TrackType(STFReader stf) } } // TrackType - } // class CVFFile + } // class CVFFile } diff --git a/Source/Orts.Formats.Msts/TrafficFile.cs b/Source/Orts.Formats.Msts/TrafficFile.cs index 1cb3e31de9..58a1a421c5 100644 --- a/Source/Orts.Formats.Msts/TrafficFile.cs +++ b/Source/Orts.Formats.Msts/TrafficFile.cs @@ -15,7 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections; using System.Collections.Generic; +using System.IO; using Orts.Parsers.Msts; namespace Orts.Formats.Msts @@ -52,7 +55,7 @@ public Traffic_Traffic_Definition(STFReader stf) stf.MustMatch("serial"); Serial = stf.ReadIntBlock(null); stf.ParseBlock(new STFReader.TokenProcessor[] { - new STFReader.TokenProcessor("service_definition", ()=>{ TrafficItems.Add(new Traffic_Service_Definition(stf)); }), + new STFReader.TokenProcessor("service_definition", ()=>{ TrafficItems.Add(new Traffic_Service_Definition(stf)); }), }); } } @@ -86,7 +89,7 @@ public Traffic_Service_Definition(STFReader stf) new STFReader.TokenProcessor("departtime", ()=>{ departTime = (int)stf.ReadFloatBlock(STFReader.UNITS.Time, null); }), new STFReader.TokenProcessor("skipcount", ()=>{ skipCount = stf.ReadIntBlock(null); }), new STFReader.TokenProcessor("distancedownpath", ()=>{ distanceDownPath = stf.ReadFloatBlock(STFReader.UNITS.Distance, null); }), - new STFReader.TokenProcessor("platformstartid", ()=>{ platformStartID = stf.ReadIntBlock(null); + new STFReader.TokenProcessor("platformstartid", ()=>{ platformStartID = stf.ReadIntBlock(null); TrafficDetails.Add(new Traffic_Traffic_Item(arrivalTime, departTime, skipCount, distanceDownPath, platformStartID)); }), }); diff --git a/Source/Orts.Formats.Msts/WagonFile.cs b/Source/Orts.Formats.Msts/WagonFile.cs index 5949fb75be..13fd97f997 100644 --- a/Source/Orts.Formats.Msts/WagonFile.cs +++ b/Source/Orts.Formats.Msts/WagonFile.cs @@ -15,6 +15,8 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections; using System.IO; using Orts.Parsers.Msts; diff --git a/Source/Orts.Formats.Msts/WorldFile.cs b/Source/Orts.Formats.Msts/WorldFile.cs index a8cc45abd1..d7fc9517bb 100644 --- a/Source/Orts.Formats.Msts/WorldFile.cs +++ b/Source/Orts.Formats.Msts/WorldFile.cs @@ -15,13 +15,13 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using Microsoft.Xna.Framework; +using Orts.Parsers.Msts; +using ORTS.Common; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; -using Microsoft.Xna.Framework; -using Orts.Parsers.Msts; -using ORTS.Common; namespace Orts.Formats.Msts { @@ -61,7 +61,7 @@ public WorldFile(string filename, List allowedTokens) } } - public void InsertORSpecificData(string filename, List allowedTokens) + public void InsertORSpecificData (string filename, List allowedTokens) { using (var sbr = SBR.Open(filename)) { @@ -176,7 +176,7 @@ void LoadObject(SBR subBlock, ref int currentWatermark, string filename) } } - public void InsertORSpecificData(SBR block, string filename, List allowedTokens) + public void InsertORSpecificData (SBR block, string filename, List allowedTokens) { block.VerifyID(TokenID.Tr_Worldfile); while (!block.EndOfBlock()) @@ -227,7 +227,7 @@ public void InsertORSpecificData(SBR block, string filename, List allow } } } - + } subBlock.EndOfBlock(); } @@ -333,14 +333,13 @@ public PickupObj(SBR block, int detailLevel) ReadBlock(block); } - + public override void AddOrModifyObj(SBR subBlock) { switch (subBlock.ID) { case TokenID.SpeedRange: SpeedRange = new SpeedRangeItem(subBlock); break; - case TokenID.PickupType: - PickupType = subBlock.ReadUInt(); + case TokenID.PickupType: PickupType = subBlock.ReadUInt(); subBlock.Skip(); // Discard the 2nd value (0 or 1 but significance is not known) break; case TokenID.ORTSMaxStackedContainers: MaxStackedContainers = subBlock.ReadInt(); break; @@ -464,7 +463,7 @@ public StackLocation(SBR block) case TokenID.Position: Position = subBlock.ReadVector3(); break; case TokenID.MaxStackedContainers: MaxStackedContainers = subBlock.ReadInt(); break; case TokenID.Length: Length = subBlock.ReadFloat(); break; - case TokenID.Flipped: subBlock.ReadInt(); Flipped = true; break; + case TokenID.Flipped: subBlock.ReadInt(); Flipped = true; break; default: subBlock.Skip(); break; } } @@ -667,7 +666,7 @@ public ForestObj(SBR block, int detailLevel) { StaticDetailLevel = detailLevel; - ReadBlock(block); + ReadBlock (block); IsYard = TreeTexture == null; } @@ -776,8 +775,8 @@ public SpeedPostObj(SBR block, int detailLevel) ReadBlock(block); } - // TODO verify that we got all needed parameters otherwise null pointer failures will occur - // TODO, do this for all objects that iterate using a while loop + // TODO verify that we got all needed parameters otherwise null pointer failures will occur + // TODO, do this for all objects that iterate using a while loop public override void AddOrModifyObj(SBR subBlock) { @@ -792,7 +791,7 @@ public override void AddOrModifyObj(SBR subBlock) case TokenID.QDirection: QDirection = new STFQDirectionItem(subBlock); break; case TokenID.VDbId: VDbId = subBlock.ReadUInt(); break; case TokenID.TrItemId: trItemIDList.Add(new TrItemId(subBlock)); break; - default: subBlock.Skip(); break; + default: subBlock.Skip(); break; } } @@ -879,28 +878,27 @@ public LevelCrossingObj(SBR block, int detailLevel) ReadBlock(block); } - public override void AddOrModifyObj(SBR subBlock) - { - switch (subBlock.ID) - { - case TokenID.StaticFlags: StaticFlags = subBlock.ReadFlags(); break; - case TokenID.LevelCrParameters: levelCrParameters = new LevelCrParameters(subBlock); break; - case TokenID.CrashProbability: crashProbability = subBlock.ReadInt(); break; - case TokenID.LevelCrData: - levelCrData = new LevelCrData(subBlock); - visible = (levelCrData.crData1 & 0x1) == 0; - silent = !visible || (levelCrData.crData1 & 0x6) == 0x6; - break; - case TokenID.LevelCrTiming: levelCrTiming = new LevelCrTiming(subBlock); break; - case TokenID.TrItemId: trItemIDList.Add(new TrItemId(subBlock)); break; - case TokenID.FileName: FileName = subBlock.ReadString(); break; - case TokenID.Position: Position = new STFPositionItem(subBlock); break; - case TokenID.QDirection: QDirection = new STFQDirectionItem(subBlock); break; - case TokenID.VDbId: VDbId = subBlock.ReadUInt(); break; - case TokenID.ORTSSoundFileName: SoundFileName = subBlock.ReadString(); break; - default: subBlock.Skip(); break; - } + public override void AddOrModifyObj(SBR subBlock) + { + switch (subBlock.ID) + { + case TokenID.StaticFlags: StaticFlags = subBlock.ReadFlags(); break; + case TokenID.LevelCrParameters: levelCrParameters = new LevelCrParameters(subBlock); break; + case TokenID.CrashProbability: crashProbability = subBlock.ReadInt(); break; + case TokenID.LevelCrData: levelCrData = new LevelCrData(subBlock); + visible = (levelCrData.crData1 & 0x1) == 0; + silent = !visible || (levelCrData.crData1 & 0x6) == 0x6; + break; + case TokenID.LevelCrTiming: levelCrTiming = new LevelCrTiming(subBlock); break; + case TokenID.TrItemId: trItemIDList.Add(new TrItemId(subBlock)); break; + case TokenID.FileName: FileName = subBlock.ReadString(); break; + case TokenID.Position: Position = new STFPositionItem(subBlock); break; + case TokenID.QDirection: QDirection = new STFQDirectionItem(subBlock); break; + case TokenID.VDbId: VDbId = subBlock.ReadUInt(); break; + case TokenID.ORTSSoundFileName: SoundFileName = subBlock.ReadString(); break; + default: subBlock.Skip(); break; } + } public class LevelCrParameters { @@ -1004,10 +1002,10 @@ public CarSpawnerObj(SBR block, int detailLevel) CarFrequency = 5.0f; CarAvSpeed = 20.0f; - ReadBlock(block); + ReadBlock (block); } - public override void AddOrModifyObj(SBR subBlock) + public override void AddOrModifyObj (SBR subBlock) { switch (subBlock.ID) { @@ -1051,7 +1049,7 @@ public TrItemId(SBR block) block.VerifyEndOfBlock(); } } - } + } /// /// Super-class for similar track items SidingObj and PlatformObj. @@ -1190,7 +1188,7 @@ public abstract class WorldObject public virtual void AddOrModifyObj(SBR subBlock) { - + } public void ReadBlock(SBR block) diff --git a/Source/Orts.Formats.OR/AEItems.cs b/Source/Orts.Formats.OR/AEItems.cs index b385eaf878..72040d605d 100644 --- a/Source/Orts.Formats.OR/AEItems.cs +++ b/Source/Orts.Formats.OR/AEItems.cs @@ -15,14 +15,14 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.Drawing; -using System.Linq; using Microsoft.Xna.Framework; using Newtonsoft.Json; using Orts.Formats.Msts; using ORTS.Common; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; namespace Orts.Formats.OR { @@ -232,12 +232,12 @@ public TrackSegment GetTrackSegment(int nodeIdx, int sectionIdx) public GlobalItem findSegmentFromMouse(PointF pt, double snapSize) { double positiveInfinity = double.PositiveInfinity; - + if (snapSize < 1.0) { snapSize = 1.0; } - + PointF closest = new PointF(0f, 0f); TrackSegment segment = null; foreach (TrackSegment segment2 in segments) @@ -337,7 +337,7 @@ public TagItem(TypeEditor interfaceType) } public override void alignEdition(TypeEditor interfaceType, GlobalItem ownParent) - { + { setMovable(); asMetadata = true; } @@ -347,7 +347,7 @@ public void setNameTag(int info) nameTag = "tag" + info; } - public override void configCoord(MSTSCoord coord) + public override void configCoord (MSTSCoord coord) { base.configCoord(coord); typeItem = (int)TypeItem.TAG_ITEM; @@ -754,7 +754,7 @@ public void searchForPaths(ORRouteConfig orRouteConfig, MSTSItems aeItems, MSTSB { List paths = null; //StationPathsHelper.Clear(); - + for (int i = 0; i < this.stationArea.Count; i++) { double positiveInfinity = double.PositiveInfinity; @@ -821,13 +821,13 @@ public void checkForNewConnector(ORRouteConfig orRouteConfig, MSTSItems mstsItem { int num = 0; List pointsIntersect = new List(); - + List polySegments = getPolySegment(); if (segment.associateNodeIdx == 344) num = 0; for (int cntPointSegment = 0; cntPointSegment < polySegments.Count; cntPointSegment++) { - PointF pointIntersect = DrawUtility.FindIntersection(polySegments[cntPointSegment], new AESegment(segment)); + PointF pointIntersect = DrawUtility.FindIntersection(polySegments[cntPointSegment], new AESegment (segment)); if (!pointIntersect.IsEmpty) { StationAreaItem newPoint = new StationAreaItem(TypeEditor.ROUTECONFIG, this); @@ -964,15 +964,15 @@ public void setAngle(List polyPoint) stationConnector.setIcoAngle(Coord.ConvertToPointF(), polyPoint); } - public bool toggleSelected() + public bool toggleSelected () { selected = !selected; return selected; } public override void Update(MSTSCoord coord) - { - base.configCoord(coord); + { + base.configCoord(coord); } public bool IsInterface() @@ -1153,7 +1153,7 @@ public List searchPaths(AETraveller myTravel, List li return paths; } - + } #endregion @@ -1244,7 +1244,7 @@ public void CheckCurve(TrackSectionsFile tdf, int flag2) lenFleche = (float)ts.SectionCurve.Radius - lenFleche; if (double.IsNaN(lenFleche)) return; - curve = new AESectionCurve(ts.SectionCurve); + curve = new AESectionCurve (ts.SectionCurve); Vector3 v = new Vector3((float)(vectorB.X - vectorA.X), 0, (float)(vectorB.Y - vectorA.Y)); Vector3 v2 = Vector3.Cross(Vector3.Up, v); v2.Normalize(); diff --git a/Source/Orts.Formats.OR/AESegment.cs b/Source/Orts.Formats.OR/AESegment.cs index e4365e55ae..ae7b6c1730 100644 --- a/Source/Orts.Formats.OR/AESegment.cs +++ b/Source/Orts.Formats.OR/AESegment.cs @@ -15,10 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Drawing; using Microsoft.Xna.Framework; using Orts.Formats.Msts; +using System; +using System.Drawing; namespace Orts.Formats.OR { diff --git a/Source/Orts.Formats.OR/AESignals.cs b/Source/Orts.Formats.OR/AESignals.cs index 43460e6daf..82e74d858c 100644 --- a/Source/Orts.Formats.OR/AESignals.cs +++ b/Source/Orts.Formats.OR/AESignals.cs @@ -706,7 +706,7 @@ private void SplitBackfacing(TrItem[] TrItems, TrackNode[] TrackNodes) } } - // Track Item is speedpost - check if really limit + // Track Item is speedpost - check if really limit else if (TrItems[TDBRef].ItemType == TrItem.trItemType.trSPEEDPOST) { SpeedPostItem speedItem = (SpeedPostItem)TrItems[TDBRef]; @@ -962,7 +962,7 @@ private void CreateTrackCircuits(TrItem[] TrItems, TrackNode[] trackNodes, TSect } #endif - }// class AESignals + }// class AESignals //================================================================================================// // diff --git a/Source/Orts.Formats.OR/AEStationPath.cs b/Source/Orts.Formats.OR/AEStationPath.cs index 2bf09f50da..4c95a83e63 100644 --- a/Source/Orts.Formats.OR/AEStationPath.cs +++ b/Source/Orts.Formats.OR/AEStationPath.cs @@ -15,12 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.Diagnostics; using Newtonsoft.Json; using Orts.Formats.Msts; using ORTS.Common; +using System; +using System.Collections.Generic; +using System.Diagnostics; namespace Orts.Formats.OR { @@ -41,9 +41,9 @@ public Possibility Add(StationPath path) } } - public class DestinationPoint : Dictionary + public class DestinationPoint : Dictionary { - public Possibility Add(string desti) + public Possibility Add(string desti) { if (ContainsKey(desti)) { @@ -51,8 +51,8 @@ public Possibility Add(string desti) } var destination = new Possibility(); - base.Add(desti, destination); - return destination; + base.Add(desti,destination); + return destination; } } @@ -60,9 +60,9 @@ public class OriginPoint : Dictionary { public DestinationPoint Add(string origin) { - if (ContainsKey(origin)) - { - return this[origin]; + if (ContainsKey(origin)) + { + return this[origin]; } var desti = new DestinationPoint(); base.Add(origin, desti); @@ -189,7 +189,7 @@ public List explore(AETraveller myTravel, List listCo if (node2.TrJunctionNode != null) { - AEJunctionItem junction = (AEJunctionItem)paths[pathChecked].ComponentItem[paths[pathChecked].ComponentItem.Count - 1]; + AEJunctionItem junction = (AEJunctionItem)paths[pathChecked].ComponentItem[paths[pathChecked].ComponentItem.Count-1]; if (!insideJunction.Contains(junction)) { insideJunction.Add(junction); @@ -207,7 +207,7 @@ public List explore(AETraveller myTravel, List listCo } else if (node2.TrEndNode) { - AEBufferItem buffer = (AEBufferItem)paths[pathChecked].ComponentItem[paths[pathChecked].ComponentItem.Count - 1]; + AEBufferItem buffer = (AEBufferItem)paths[pathChecked].ComponentItem[paths[pathChecked].ComponentItem.Count-1]; if (!buffer.Configured || buffer.DirBuffer == AllowedDir.OUT) { //AEJunctionItem junction = (AEJunctionItem)paths[pathChecked].ComponentItem[paths[pathChecked].jctnIdx]; @@ -228,16 +228,16 @@ public List explore(AETraveller myTravel, List listCo } } - else + else { int lastIndex = (int)node2.Index; //lastCommonTrack = (int)node2.Index; if (paths[pathChecked].complete) { TrackSegment segment = (TrackSegment)paths[pathChecked].ComponentItem[paths[pathChecked].ComponentItem.Count - 1]; - + if (segment.HasConnector == null || - (segment.HasConnector != null && + (segment.HasConnector != null && (segment.HasConnector.dirConnector == AllowedDir.IN || !segment.HasConnector.isConfigured()))) { paths.RemoveAt(pathChecked); @@ -281,7 +281,7 @@ public List explore(AETraveller myTravel, List listCo MaxPassingYard = path.PassingYard; if (path.PassingYard < ShortPassingYard) ShortPassingYard = path.PassingYard; - } + } return paths; } @@ -498,7 +498,7 @@ public TrackNode explore(MSTSItems aeItems, List listConnector, in elapse.Add(elapsedTime); #endif - } while (traveller.NextVectorSection() && !complete); + } while (traveller.NextVectorSection() && !complete) ; if (currentNode.Index != entryNode && !complete && traveller.TrackNodeLength > PassingYard) PassingYard = traveller.TrackNodeLength; traveller.NextTrackNode(); @@ -530,7 +530,7 @@ public void highlightTrackFromArea(MSTSItems aeItems) public void setComplete(GlobalItem segment) { complete = true; - + if (segment.GetType() == typeof(TrackSegment) && ((TrackSegment)segment).HasConnector != null) { outLabel = ((TrackSegment)segment).HasConnector.label; diff --git a/Source/Orts.Formats.OR/AETraveller.cs b/Source/Orts.Formats.OR/AETraveller.cs index 863ff16337..5e55472c0a 100644 --- a/Source/Orts.Formats.OR/AETraveller.cs +++ b/Source/Orts.Formats.OR/AETraveller.cs @@ -15,15 +15,15 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using Microsoft.Xna.Framework; +using Orts.Formats.Msts; +using ORTS.Common; using System; using System.Collections.Generic; using System.Diagnostics; using System.Drawing; using System.IO; using System.Linq; -using Microsoft.Xna.Framework; -using Orts.Formats.Msts; -using ORTS.Common; namespace Orts.Formats.OR { @@ -161,7 +161,7 @@ public AETraveller(TrackSectionsFile tSectionDat, TrackDatabaseFile tdb) /// Starting world location public void place(WorldLocation loc) { - place(loc.TileX, loc.TileZ, loc.Location.X, loc.Location.Z); + place (loc.TileX, loc.TileZ, loc.Location.X, loc.Location.Z); } /// @@ -889,7 +889,7 @@ public TrackNode GetCurrentNode() return TrackNodes[TrackNodeIndex]; } - /// + /// /// Moves the traveller on to the next section of track, whether that is another section within the current track node or a new track node. /// /// true if the next section exists, false if it does not. @@ -1065,7 +1065,7 @@ public float GetCurrentCurveRadius() public float SuperElevationValue(float speed, float timeInterval, bool computed) //will test 1 second ahead, computed will return desired elev. only { -#if !ACTIVITY_EDITOR + #if !ACTIVITY_EDITOR var tn = trackNode; if (tn.TrVectorNode == null) return 0f; var tvs = trackVectorSection; diff --git a/Source/Orts.Formats.OR/AuxActionRef.cs b/Source/Orts.Formats.OR/AuxActionRef.cs index ba9b2316be..e97127d0ae 100644 --- a/Source/Orts.Formats.OR/AuxActionRef.cs +++ b/Source/Orts.Formats.OR/AuxActionRef.cs @@ -15,12 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.Linq; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using ORTS.Common; +using System; +using System.Collections.Generic; +using System.Linq; namespace Orts.Formats.OR { @@ -110,7 +110,7 @@ public class ActionContainer [JsonIgnore] public List SpecAuxActions; // Actions To Do during activity, like WP with specific location [JsonProperty("GenActions")] - public List> GenAuxActions; // Action To Do during activity, without specific location + public List> GenAuxActions; // Action To Do during activity, without specific location [JsonIgnore] protected List> GenFunctions; [JsonIgnore] @@ -274,7 +274,7 @@ public class AuxActionRef //public float RequiredDistance; //[JsonProperty("Param")] //public List Parameter; - + public enum AUX_ACTION { @@ -428,10 +428,10 @@ public static void Register(string key) } } - + public class AuxControlStopped : AuxActionRef { - public AuxControlStopped(bool isGeneric) : //WorldLocation? location, float requiredSpeedMpS, bool isGeneric, int endSignalIndex = -1, AUX_ACTION actionType = AUX_ACTION.CONTROL_START, int delay = 2, float requiredDistance = 0, int duration = 10) : + public AuxControlStopped(bool isGeneric): //WorldLocation? location, float requiredSpeedMpS, bool isGeneric, int endSignalIndex = -1, AUX_ACTION actionType = AUX_ACTION.CONTROL_START, int delay = 2, float requiredDistance = 0, int duration = 10) : base(AUX_ACTION.CONTROL_STOPPED, isGeneric) //location, requiredSpeedMpS, isGeneric, endSignalIndex, actionType, delay, requiredDistance) { } diff --git a/Source/Orts.Formats.OR/ClocksFile.cs b/Source/Orts.Formats.OR/ClocksFile.cs index 718bd55934..9912c8f761 100644 --- a/Source/Orts.Formats.OR/ClocksFile.cs +++ b/Source/Orts.Formats.OR/ClocksFile.cs @@ -15,14 +15,14 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Orts.Parsers.Msts; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Orts.Parsers.Msts; using JsonReader = Orts.Parsers.OR.JsonReader; namespace Orts.Formats.OR @@ -78,7 +78,7 @@ protected virtual bool TryParse(JsonReader item) ClockShape = new ClockShape(stringValue, null); ClockShapeList.Add(ClockShape); break; - + case "[].Name": // Parse the property with default value as invalid, so errors can be detected and the object rejected later. stringValue = item.AsString(stringValue); @@ -104,7 +104,7 @@ protected virtual bool TryParse(JsonReader item) break; default: - Trace.TraceWarning($"Unexpected entry \"{item.Path}\" found"); + Trace.TraceWarning($"Unexpected entry \"{item.Path}\" found"); return false; } return true; diff --git a/Source/Orts.Formats.OR/ContainerFile.cs b/Source/Orts.Formats.OR/ContainerFile.cs index fc7a124b2d..3097fb11c9 100644 --- a/Source/Orts.Formats.OR/ContainerFile.cs +++ b/Source/Orts.Formats.OR/ContainerFile.cs @@ -15,6 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics; +using System.Text; using System.IO; using Microsoft.Xna.Framework; using Orts.Parsers.OR; @@ -57,8 +62,8 @@ bool TryParse(JsonReader item) public class ContainerParameters { public string Name; - public string ShapeFileName; - public string ContainerType; + public string ShapeFileName; + public string ContainerType; public Vector3 IntrinsicShapeOffset = new Vector3(0f, 1.17f, 0f); public float EmptyMassKG = -1; public float MaxMassWhenLoadedKG = -1; @@ -86,13 +91,13 @@ bool TryParse(JsonReader item) // restore public ContainerParameters(BinaryReader inf) { - // Overcast = inf.ReadSingle(); + // Overcast = inf.ReadSingle(); } // save public void Save(BinaryWriter outf) { - // outf.Write(Overcast); +// outf.Write(Overcast); } } } diff --git a/Source/Orts.Formats.OR/DrawUtility.cs b/Source/Orts.Formats.OR/DrawUtility.cs index 6a9136ef60..930c792cd5 100644 --- a/Source/Orts.Formats.OR/DrawUtility.cs +++ b/Source/Orts.Formats.OR/DrawUtility.cs @@ -15,10 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using Orts.Formats.Msts; using System; using System.Collections.Generic; using System.Drawing; -using Orts.Formats.Msts; namespace Orts.Formats.OR { @@ -40,12 +40,12 @@ public static double FindDistanceToSegment(PointF pt, TrackSegment segment, out if (!segment.isCurved) { return FindDistanceToSegment(pt, - new AESegment(segment.associateSegment), + new AESegment (segment.associateSegment), out closest); } else { - return FindDistanceToCurve(pt, new AESegment(segment.associateSegment), out closest); + return FindDistanceToCurve (pt, new AESegment (segment.associateSegment), out closest); } } @@ -70,13 +70,13 @@ public static double FindDistanceToSegment(PointF pt, AESegment seg, out PointF if (t < 0) { - closest = new PointF(seg.startPoint.X, seg.startPoint.Y); + closest = new PointF (seg.startPoint.X, seg.startPoint.Y); dx = pt.X - seg.startPoint.X; dy = pt.Y - seg.startPoint.Y; } else if (t > 1) { - closest = new PointF(seg.endPoint.X, seg.endPoint.Y); + closest = new PointF (seg.endPoint.X, seg.endPoint.Y); dx = pt.X - seg.endPoint.X; dy = pt.Y - seg.endPoint.Y; } @@ -86,7 +86,7 @@ public static double FindDistanceToSegment(PointF pt, AESegment seg, out PointF dx = pt.X - closest.X; dy = pt.Y - closest.Y; } - double info = Math.Sqrt(dx * dx + dy * dy); + double info = Math.Sqrt (dx * dx + dy * dy); return info; } @@ -125,7 +125,7 @@ public static double FindDistanceToSegment(PointF pt, AESegment seg, out PointF float t2 = ((track.startPoint.X - segArea.startPoint.X) * dy12 + (segArea.startPoint.Y - track.startPoint.Y) * dx12) / -denominator; // Find the point of intersection. - intersection = new PointF(segArea.startPoint.X + dx12 * t1, segArea.startPoint.Y + dy12 * t1); + intersection = new PointF (segArea.startPoint.X + dx12 * t1, segArea.startPoint.Y + dy12 * t1); // The segments intersect if t1 and t2 are between 0 and 1. segments_intersect = ((t1 >= 0) && (t1 <= 1) && (t2 >= 0) && (t2 <= 1)); @@ -149,8 +149,8 @@ public static double FindDistanceToSegment(PointF pt, AESegment seg, out PointF t2 = 1; } - close_p1 = new PointF(segArea.startPoint.X + dx12 * t1, segArea.startPoint.Y + dy12 * t1); - close_p2 = new PointF(track.startPoint.X + dx34 * t2, track.startPoint.Y + dy34 * t2); + close_p1 = new PointF (segArea.startPoint.X + dx12 * t1, segArea.startPoint.Y + dy12 * t1); + close_p2 = new PointF (track.startPoint.X + dx34 * t2, track.startPoint.Y + dy34 * t2); } @@ -180,13 +180,13 @@ public static PointF FindIntersection(AESegment segArea, AESegment track) public static PointF FindStraightIntersection(AESegment segArea, AESegment track) { - //double Ax, double Ay, - //double Bx, double By, - //double Cx, double Cy, - //double Dx, double Dy, - //double *X, double *Y +//double Ax, double Ay, +//double Bx, double By, +//double Cx, double Cy, +//double Dx, double Dy, +//double *X, double *Y PointF pt = PointF.Empty; - double distAB, theCos, theSin, newX, ABpos; + double distAB, theCos, theSin, newX, ABpos ; double distCD, theCos2, theSin2; double ABX, ABY, ACX, ACY, ADX, ADY; double AX = segArea.startPoint.X; @@ -194,7 +194,7 @@ public static PointF FindStraightIntersection(AESegment segArea, AESegment track double CDX, CDY, angle1, angle2; // Fail if either line segment is zero-length. - if ((segArea.startPoint.X == segArea.endPoint.X && segArea.startPoint.Y == segArea.endPoint.Y) + if ((segArea.startPoint.X == segArea.endPoint.X && segArea.startPoint.Y == segArea.endPoint.Y) || (track.startPoint.X == track.endPoint.X && track.startPoint.Y == track.endPoint.Y)) return pt; @@ -204,7 +204,7 @@ public static PointF FindStraightIntersection(AESegment segArea, AESegment track (segArea.startPoint.X == track.endPoint.X && segArea.startPoint.Y == track.endPoint.Y) || (segArea.endPoint.X == track.endPoint.X && segArea.endPoint.Y == track.endPoint.Y)) { - return pt; + return pt; } // (1) Translate the system so that point A is on the origin. @@ -230,23 +230,23 @@ public static PointF FindStraightIntersection(AESegment segArea, AESegment track angle1 = Math.Acos(theCos) * 180 / Math.PI; // sup angle2 = Math.Acos(theCos2) * 180 / Math.PI; // sup newX = ACX * theCos + ACY * theSin; - ACY = ACY * theCos - ACX * theSin; + ACY = ACY * theCos - ACX * theSin; ACX = newX; newX = ADX * theCos + ADY * theSin; - ADY = ADY * theCos - ADX * theSin; + ADY = ADY * theCos - ADX * theSin; ADX = newX; if (Math.Abs(angle1 - angle2) < 5) // sup return pt; // sup // Fail if segment C-D doesn't cross line A-B. - if (ACY < 0 && ADY < 0 || ACY >= 0 && ADY >= 0) + if (ACY < 0 && ADY < 0 || ACY >= 0 && ADY >= 0) return pt; // (3) Discover the position of the intersection point along line A-B. ABpos = ADX + (ACX - ADX) * ADY / (ADY - ACY); // Fail if segment C-D crosses line A-B outside of segment A-B. - if (ABpos < 0 || ABpos > distAB) + if (ABpos < 0 || ABpos > distAB) return pt; // (4) Apply the discovered position to line A-B in the original coordinate system. @@ -379,7 +379,7 @@ <<<<<<< .mine >>>>>>> .r37 } -#endif + #endif public static PointF FindCurveIntersection(AESegment segArea, AESegment track) { PointF pointA = track.startPoint; @@ -415,19 +415,19 @@ public static PointF FindCurveIntersection(AESegment segArea, AESegment track) return PointF.Empty; } - public static double FindDistanceToCurve(PointF pt, AESegment segment, out PointF closest) + public static double FindDistanceToCurve (PointF pt, AESegment segment, out PointF closest) { double dist = 0; double savedDist = double.PositiveInfinity; PointF current = new PointF(0f, 0f); if (!segment.isCurved || segment.radius == 0) - return FindDistanceToSegment(pt, segment, out closest); + return FindDistanceToSegment (pt, segment, out closest); PointF pointA = segment.startPoint; PointF pointB = segment.endPoint; PointF pointCenter = segment.center; closest = current; - for (int i = 0; i <= segment.step; i++) + for (int i = 0; i <= segment.step; i++) { double sub_angle = ((float)i / segment.step) * segment.angleTot; double infox = (1 - Math.Cos(sub_angle)) * (-pointB.X); @@ -445,7 +445,7 @@ public static double FindDistanceToCurve(PointF pt, AESegment segment, out Point closest = current; } } - savedDist = Math.Round(savedDist, 1); + savedDist = Math.Round (savedDist, 1); return savedDist; } @@ -471,7 +471,7 @@ public static bool PointInPolygon(PointF point, List poly return oddNodes; } - public static int getDirection(TrackNode fromNode, TrackNode toNode) + public static int getDirection (TrackNode fromNode, TrackNode toNode) { foreach (var pin in fromNode.TrPins) { diff --git a/Source/Orts.Formats.OR/ExtCarSpawnerFile.cs b/Source/Orts.Formats.OR/ExtCarSpawnerFile.cs index b9d41700ca..d2ae1260d8 100644 --- a/Source/Orts.Formats.OR/ExtCarSpawnerFile.cs +++ b/Source/Orts.Formats.OR/ExtCarSpawnerFile.cs @@ -15,7 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections; using System.Collections.Generic; +using System.IO; +using Microsoft.Xna.Framework; using Orts.Formats.Msts; using Orts.Parsers.Msts; @@ -37,7 +41,7 @@ public ExtCarSpawnerFile(string filePath, string shapePath, List else { stf.MustMatch("("); - stf.MustMatch("ListName"); + stf.MustMatch("ListName"); listName = stf.ReadStringBlock(null); var carSpawnerBlock = new CarSpawnerBlock(stf, shapePath, carSpawnerLists, listName); } diff --git a/Source/Orts.Formats.OR/GlobalItem.cs b/Source/Orts.Formats.OR/GlobalItem.cs index 40160049a1..6f9ec3a66c 100644 --- a/Source/Orts.Formats.OR/GlobalItem.cs +++ b/Source/Orts.Formats.OR/GlobalItem.cs @@ -15,11 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Drawing; using Newtonsoft.Json; using Orts.Formats.Msts; using ORTS.Common; +using System; +using System.Drawing; namespace Orts.Formats.OR { diff --git a/Source/Orts.Formats.OR/LoadStationsPopulationFile.cs b/Source/Orts.Formats.OR/LoadStationsPopulationFile.cs index 2354010377..f9d06617fa 100644 --- a/Source/Orts.Formats.OR/LoadStationsPopulationFile.cs +++ b/Source/Orts.Formats.OR/LoadStationsPopulationFile.cs @@ -16,7 +16,13 @@ // along with Open Rails. If not, see . using System; +using System.Collections; using System.Collections.Generic; +using System.Diagnostics; +using System.Text; +using System.IO; +using Microsoft.Xna.Framework; +using Orts.Formats.Msts; using Orts.Parsers.OR; using ORTS.Common; diff --git a/Source/Orts.Formats.OR/MSTSCoord.cs b/Source/Orts.Formats.OR/MSTSCoord.cs index 07d8e77315..f3027dbca7 100644 --- a/Source/Orts.Formats.OR/MSTSCoord.cs +++ b/Source/Orts.Formats.OR/MSTSCoord.cs @@ -15,11 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Drawing; using Microsoft.Xna.Framework; using Orts.Formats.Msts; using ORTS.Common; +using System; +using System.Drawing; namespace Orts.Formats.OR { @@ -163,7 +163,7 @@ public MSTSCoord(PointF point) int tileY = ((int)(point.Y / 2048f)); X = (float)((point.X) % 2048f); Y = (float)((point.Y) % 2048f); - if (signX < 0) + if (signX < 0) { tileX -= 1; X += 2048f; @@ -209,13 +209,13 @@ public override bool Equals(object obj) if (GetType() != obj.GetType()) return false; - MSTSCoord other = (MSTSCoord)obj; + MSTSCoord other = (MSTSCoord) obj; return (this.X == other.X && this.Y == other.Y && this.TileX == other.TileX && this.TileY == other.TileY); } public static bool operator ==(MSTSCoord x, MSTSCoord y) { - return Object.Equals(x, y); + return Object.Equals(x, y); } public static bool operator !=(MSTSCoord x, MSTSCoord y) diff --git a/Source/Orts.Formats.OR/MSTSData.cs b/Source/Orts.Formats.OR/MSTSData.cs index 912bc6dd91..5a2d12a8f4 100644 --- a/Source/Orts.Formats.OR/MSTSData.cs +++ b/Source/Orts.Formats.OR/MSTSData.cs @@ -15,8 +15,8 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System.IO; using Orts.Formats.Msts; +using System.IO; namespace Orts.Formats.OR { @@ -30,7 +30,7 @@ public class MSTSData public string MstsPath { get; set; } public AESignals Signals { get; protected set; } - public MSTSData(string mstsPath, string Route) + public MSTSData (string mstsPath, string Route) { MstsPath = mstsPath; RoutePath = Route; @@ -57,7 +57,7 @@ public MSTSData(string mstsPath, string Route) TSectionDat = new TrackSectionsFile(MstsPath + @"\GLOBAL\TSECTION.DAT"); if (File.Exists(RoutePath + @"\TSECTION.DAT")) TSectionDat.AddRouteTSectionDatFile(RoutePath + @"\TSECTION.DAT"); - Signals = new AESignals(this, SIGCFG); + Signals = new AESignals (this, SIGCFG); } } } \ No newline at end of file diff --git a/Source/Orts.Formats.OR/RouteConfigurationFile.cs b/Source/Orts.Formats.OR/RouteConfigurationFile.cs index c0a7f273de..9bbcbe53e3 100644 --- a/Source/Orts.Formats.OR/RouteConfigurationFile.cs +++ b/Source/Orts.Formats.OR/RouteConfigurationFile.cs @@ -15,12 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System.Collections.Generic; -using System.Drawing; -using System.IO; using Newtonsoft.Json; using Orts.Formats.Msts; using ORTS.Common; +using System.Collections.Generic; +using System.Drawing; +using System.IO; namespace Orts.Formats.OR { @@ -220,47 +220,47 @@ static public ORRouteConfig DeserializeJSON(string fileName, TypeEditor interfac fileName += ".cfg.json"; //try //{ - // TODO: This code is BROKEN. It loads and saves file formats with internal type information included, which causes breakages if the types are moved. This is not acceptable for public, shared data. - //JsonSerializer serializer = new JsonSerializer(); - //using (StreamReader sr = new StreamReader(fileName)) - //{ - // ORRouteConfig orRouteConfig = JsonConvert.DeserializeObject((string)sr.ReadToEnd(), new JsonSerializerSettings - // { - // PreserveReferencesHandling = PreserveReferencesHandling.Objects, - // TypeNameHandling = TypeNameHandling.Auto - // }); - // p = orRouteConfig; - - // foreach (var item in p.routeItems) - // { - // p.AllItems.Add(item); - // item.alignEdition(interfaceType, null); - // if (item.GetType() == typeof(StationItem)) - // { - // if (((StationItem)item).stationArea.Count > 0) - // { - // foreach (var item2 in ((StationItem)item).stationArea) - // { - // ((StationAreaItem)item2).alignEdition(interfaceType, item); - // } - // ((StationItem)item).areaCompleted = true; - // } - // } - // else if (item.GetType() == typeof(AEBufferItem)) - // { - // } - // } - // //orRouteConfig.ReduceItems(); - //} - // + // TODO: This code is BROKEN. It loads and saves file formats with internal type information included, which causes breakages if the types are moved. This is not acceptable for public, shared data. + //JsonSerializer serializer = new JsonSerializer(); + //using (StreamReader sr = new StreamReader(fileName)) + //{ + // ORRouteConfig orRouteConfig = JsonConvert.DeserializeObject((string)sr.ReadToEnd(), new JsonSerializerSettings + // { + // PreserveReferencesHandling = PreserveReferencesHandling.Objects, + // TypeNameHandling = TypeNameHandling.Auto + // }); + // p = orRouteConfig; + + // foreach (var item in p.routeItems) + // { + // p.AllItems.Add(item); + // item.alignEdition(interfaceType, null); + // if (item.GetType() == typeof(StationItem)) + // { + // if (((StationItem)item).stationArea.Count > 0) + // { + // foreach (var item2 in ((StationItem)item).stationArea) + // { + // ((StationAreaItem)item2).alignEdition(interfaceType, item); + // } + // ((StationItem)item).areaCompleted = true; + // } + // } + // else if (item.GetType() == typeof(AEBufferItem)) + // { + // } + // } + // //orRouteConfig.ReduceItems(); + //} + // //} //catch (IOException) //{ - p = new ORRouteConfig(); - p.FileName = Path.GetFileName(fileName); - p.RoutePath = Path.GetDirectoryName(fileName); - p.RouteName = ""; - p.toSave = true; + p = new ORRouteConfig(); + p.FileName = Path.GetFileName(fileName); + p.RoutePath = Path.GetDirectoryName(fileName); + p.RouteName = ""; + p.toSave = true; //} return p; @@ -435,7 +435,7 @@ static public ORConfig LoadConfig(string dataFolder, ORConfig mainConfig = null) currentProgFolder = Path.GetDirectoryName(currentProgFolder); string completeFileName = Path.Combine(currentProgFolder, "Open Rails"); if (!Directory.Exists(completeFileName)) Directory.CreateDirectory(completeFileName); - completeFileName = Path.Combine(completeFileName, "ORConfig.json"); + completeFileName = Path.Combine (completeFileName, "ORConfig.json"); ORConfig loaded = DeserializeJSON(completeFileName); return loaded; } diff --git a/Source/Orts.Formats.OR/RouteItems.cs b/Source/Orts.Formats.OR/RouteItems.cs index 9fe926246f..70492542e3 100644 --- a/Source/Orts.Formats.OR/RouteItems.cs +++ b/Source/Orts.Formats.OR/RouteItems.cs @@ -15,13 +15,13 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.Drawing; using Microsoft.Xna.Framework; using Newtonsoft.Json; using Orts.Formats.Msts; using ORTS.Common; +using System; +using System.Collections.Generic; +using System.Drawing; namespace Orts.Formats.OR { @@ -340,7 +340,7 @@ public class SideItem : GlobalItem { public string Name; public float sizeSiding; - public TrItem trItem { get; protected set; } + public TrItem trItem{ get; protected set; } public TrItem.trItemType type { get { return trItem.ItemType; } protected set { } } public float icoAngle; public int typeSiding; @@ -349,7 +349,7 @@ public class SideItem : GlobalItem public class SideStartItem : SideItem { public SideEndItem endSiding { get; set; } - + /// /// The underlying track sideItem. /// @@ -363,7 +363,7 @@ public SideStartItem(TrackSegment trSegment, TrItem item) else if (item.ItemType == TrItem.trItemType.trSIDING) typeSiding = (int)TypeSiding.SIDING_START; typeItem = (int)TypeItem.SIDING_START; - + trItem = item; Name = trItem.ItemName; Location = new PointF(trItem.TileX * 2048f + trItem.X, trItem.TileZ * 2048f + trItem.Z); diff --git a/Source/Orts.Formats.OR/TimetableFile.cs b/Source/Orts.Formats.OR/TimetableFile.cs index 23d01e02c1..54c798a5c2 100644 --- a/Source/Orts.Formats.OR/TimetableFile.cs +++ b/Source/Orts.Formats.OR/TimetableFile.cs @@ -29,11 +29,11 @@ // #direction : Up or Down // +using GNU.Gettext; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; -using GNU.Gettext; namespace Orts.Formats.OR { diff --git a/Source/Orts.Formats.OR/TimetableGroupFile.cs b/Source/Orts.Formats.OR/TimetableGroupFile.cs index 2d3af4417d..19bf6022d8 100644 --- a/Source/Orts.Formats.OR/TimetableGroupFile.cs +++ b/Source/Orts.Formats.OR/TimetableGroupFile.cs @@ -82,7 +82,7 @@ void MultiTTFilePreliminaryRead(String filePath, String directory, StreamReader /// class TimetableGroupFile /// extracts filenames from multiTTfile, extents names to full path /// - + public class TimetableGroupFile { public List TTFiles = new List(); diff --git a/Source/Orts.Formats.OR/TrackCircuitElement.cs b/Source/Orts.Formats.OR/TrackCircuitElement.cs index cfb57acd94..09a8da264b 100644 --- a/Source/Orts.Formats.OR/TrackCircuitElement.cs +++ b/Source/Orts.Formats.OR/TrackCircuitElement.cs @@ -34,7 +34,7 @@ public TrackCircuitElement(GlobalItem item, float position) public class TrackCircuitElementConnector : TrackCircuitElement { public TrackCircuitElementConnector(GlobalItem item, float position) - : base(item, position) + : base (item, position) { info = TypeItem.STATION_CONNECTOR; } diff --git a/Source/Orts.Formats.OR/TrackNodeAE.cs b/Source/Orts.Formats.OR/TrackNodeAE.cs index 8ee007d2ba..1582adf48f 100644 --- a/Source/Orts.Formats.OR/TrackNodeAE.cs +++ b/Source/Orts.Formats.OR/TrackNodeAE.cs @@ -15,8 +15,8 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System.Linq; using Orts.Formats.Msts; +using System.Linq; namespace Orts.Formats.OR { diff --git a/Source/Orts.Formats.OR/WeatherFile.cs b/Source/Orts.Formats.OR/WeatherFile.cs index b23e3f190f..3e95d41578 100644 --- a/Source/Orts.Formats.OR/WeatherFile.cs +++ b/Source/Orts.Formats.OR/WeatherFile.cs @@ -15,8 +15,13 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; +using System.Collections; using System.Collections.Generic; +using System.Diagnostics; +using System.Text; using System.IO; +using Microsoft.Xna.Framework; using Orts.Parsers.OR; namespace Orts.Formats.OR @@ -270,7 +275,7 @@ public WeatherSettingFog(JsonReader json) protected override bool TryParse(JsonReader item) { - if (base.TryParse(item)) return true; + if (base.TryParse(item)) return true; switch (item.Path) { case "FogVisibility": FogVisibilityM = item.AsFloat(FogVisibilityM); break; diff --git a/Source/Orts.Parsers.Msts/Interpolator.cs b/Source/Orts.Parsers.Msts/Interpolator.cs index b4a48df943..9dd8a23d19 100644 --- a/Source/Orts.Parsers.Msts/Interpolator.cs +++ b/Source/Orts.Parsers.Msts/Interpolator.cs @@ -47,7 +47,7 @@ public Interpolator(Interpolator other) { X = other.X; Y = other.Y; - Y2 = other.Y2; + Y2= other.Y2; Size = other.Size; } public Interpolator(STFReader stf) @@ -58,7 +58,7 @@ public Interpolator(STFReader stf) list.Add(stf.ReadFloat(STFReader.UNITS.Any, null)); if (list.Count % 2 == 1) STFException.TraceWarning(stf, "Ignoring extra odd value in Interpolator list."); - int n = list.Count / 2; + int n = list.Count/2; if (n < 2) STFException.TraceWarning(stf, "Interpolator must have at least two value pairs."); X = new float[n]; @@ -66,8 +66,8 @@ public Interpolator(STFReader stf) Size = n; for (int i = 0; i < n; i++) { - X[i] = list[2 * i]; - Y[i] = list[2 * i + 1]; + X[i] = list[2*i]; + Y[i] = list[2*i+1]; if (i > 0 && X[i - 1] >= X[i]) STFException.TraceWarning(stf, "Interpolator x values must be increasing."); } @@ -79,30 +79,30 @@ public Interpolator(STFReader stf) if (x < X[PrevIndex] || x > X[PrevIndex + 1]) { if (x < X[1]) - PrevIndex = 0; - else if (x > X[Size - 2]) - PrevIndex = Size - 2; + PrevIndex= 0; + else if (x > X[Size-2]) + PrevIndex= Size-2; else { - int i = 0; - int j = Size - 1; - while (j - i > 1) + int i= 0; + int j= Size-1; + while (j-i > 1) { - int k = (i + j) / 2; + int k= (i+j)/2; if (X[k] > x) - j = k; + j= k; else - i = k; + i= k; } - PrevIndex = i; + PrevIndex= i; } } - float d = X[PrevIndex + 1] - X[PrevIndex]; - float a = (X[PrevIndex + 1] - x) / d; - float b = (x - X[PrevIndex]) / d; - float y = a * Y[PrevIndex] + b * Y[PrevIndex + 1]; - if (Y2 != null && a >= 0 && b >= 0) - y += ((a * a * a - a) * Y2[PrevIndex] + (b * b * b - b) * Y2[PrevIndex + 1]) * d * d / 6; + float d= X[PrevIndex+1] - X[PrevIndex]; + float a= (X[PrevIndex+1]-x)/d; + float b= (x-X[PrevIndex])/d; + float y= a*Y[PrevIndex] + b*Y[PrevIndex+1]; + if (Y2 != null && a>=0 && b>=0) + y+= ((a*a*a-a)*Y2[PrevIndex] + (b*b*b-b)*Y2[PrevIndex+1])*d*d/6; return y; } set @@ -113,7 +113,7 @@ public Interpolator(STFReader stf) } } public float MinX() { return X[0]; } - public float MaxX() { return X[Size - 1]; } + public float MaxX() { return X[Size-1]; } public float MaxY() { float x; @@ -121,10 +121,10 @@ public float MaxY() } public float MaxY(out float x) { - int maxi = 0; - for (int i = 1; i < Size; i++) + int maxi= 0; + for (int i=1; i= 0; i--) - Y2[i] = Y2[i] * Y2[i + 1] + u[i]; + for (int i=Size-2; i>=0; i--) + Y2[i]= Y2[i]*Y2[i+1] + u[i]; } - + // restore game state public Interpolator(BinaryReader inf) { @@ -229,7 +229,7 @@ public void Save(BinaryWriter outf) public void test(string label, int n) { - float dx = (MaxX() - MinX()) / (n - 1); + float dx = (MaxX() - MinX()) / (n-1); for (int i = 0; i < n; i++) { float x = MinX() + i * dx; @@ -480,9 +480,9 @@ public void ScaleX(float factor) public bool AcceptsNegativeValues() { return HasNegativeValues; } } - /// - /// two dimensional Interpolated table lookup - Generic - /// + /// + /// two dimensional Interpolated table lookup - Generic + /// public class Interpolator2D { float[] X; // must be in increasing order diff --git a/Source/Orts.Parsers.Msts/SBR.cs b/Source/Orts.Parsers.Msts/SBR.cs index 23b0df0b3c..7fab3aa00f 100644 --- a/Source/Orts.Parsers.Msts/SBR.cs +++ b/Source/Orts.Parsers.Msts/SBR.cs @@ -15,13 +15,13 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using ICSharpCode.SharpZipLib.Zip.Compression.Streams; +using Microsoft.Xna.Framework; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Text; -using ICSharpCode.SharpZipLib.Zip.Compression.Streams; -using Microsoft.Xna.Framework; namespace Orts.Parsers.Msts { @@ -132,8 +132,8 @@ public Vector3 ReadVector3() public void VerifyID(TokenID desiredID) { - if (ID != desiredID) - TraceInformation("Expected block " + desiredID + "; got " + ID); + if (ID != desiredID) + TraceInformation("Expected block " + desiredID + "; got " + ID); } /// diff --git a/Source/Orts.Parsers.Msts/STFReader.cs b/Source/Orts.Parsers.Msts/STFReader.cs index a226058534..838e403255 100644 --- a/Source/Orts.Parsers.Msts/STFReader.cs +++ b/Source/Orts.Parsers.Msts/STFReader.cs @@ -21,6 +21,7 @@ // Note: the SBR classes are more general in that they are capable of reading // both unicode and binary compressed data files. +using Microsoft.Xna.Framework; using System; using System.Collections.Generic; using System.Diagnostics; @@ -28,7 +29,6 @@ using System.IO; using System.Linq; using System.Text; -using Microsoft.Xna.Framework; #region Original STFreader #if !NEW_READER @@ -1192,8 +1192,7 @@ public Color ReadColorBlock(Color? defaultValue) return new Color() { PackedValue = STFReader.SwapColorBytes(hex) }; } - static uint SwapColorBytes(uint color) - { + static uint SwapColorBytes(uint color) { return (color & 0xFF00FF00) + (byte)(color >> 16) + (uint)((byte)color << 16); } @@ -1726,7 +1725,7 @@ private string ReadItem(bool skip_mode, bool string_mode) int c; #region Skip past any leading whitespace characters - for (; ; ) + for (;;) { c = ReadChar(); if (IsEof(c)) return UpdateTreeAndStepBack(""); @@ -1749,7 +1748,7 @@ private string ReadItem(bool skip_mode, bool string_mode) else if ((!skip_mode && !string_mode) && ((c == '#') || (c == '_'))) { #region Move on to a whitespace so we can pick up any token starting with a # - for (; ; ) + for (;;) { c = PeekChar(); if ((c == '(') || (c == ')')) break; @@ -1780,7 +1779,7 @@ private string ReadItem(bool skip_mode, bool string_mode) #region Build Quoted Items - including append operations else if (c == '"') { - for (; ; ) + for (;;) { c = ReadChar(); if (IsEof(c)) @@ -1829,7 +1828,7 @@ private string ReadItem(bool skip_mode, bool string_mode) else if (c != -1) { itemBuilder.Append((char)c); - for (; ; ) + for (;;) { c = PeekChar(); if ((c == '(') || (c == ')')) break; diff --git a/Source/Orts.Parsers.Msts/TokenID.cs b/Source/Orts.Parsers.Msts/TokenID.cs index ebad399e99..0f1ac212f8 100644 --- a/Source/Orts.Parsers.Msts/TokenID.cs +++ b/Source/Orts.Parsers.Msts/TokenID.cs @@ -299,7 +299,7 @@ public enum TokenID : uint Platform = 360, LevelCr = 362, Speedpost = 364, - Hazard = 365, + Hazard=365, @@ -1691,12 +1691,12 @@ public enum TokenID : uint // these assigned ID's are arbitrary - I haven't seen them in a compressed MSTS W file yet // TODO determine proper ID from a compressed world file - CarSpawner, - Siding, + CarSpawner, + Siding, Dyntrack, Transfer, Gantry, - Pickup, + Pickup, Wagon, Engine, @@ -1707,7 +1707,7 @@ public enum TokenID : uint ORTSPantographToggle3, ORTSPantographToggle4, // ORTS Specific for container stations - ORTSCraneSound, + ORTSCraneSound, ORTSMaxStackedContainers, ORTSStackLocations, ORTSStackLocationsLength, diff --git a/Source/Orts.Parsers.OR/JsonReader.cs b/Source/Orts.Parsers.OR/JsonReader.cs index df2d64cfc6..660b6d6882 100644 --- a/Source/Orts.Parsers.OR/JsonReader.cs +++ b/Source/Orts.Parsers.OR/JsonReader.cs @@ -18,13 +18,14 @@ // Use this define to diagnose issues in the JSON reader below. //#define DEBUG_JSON_READER +using Microsoft.Xna.Framework; +using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; +using System.Linq; using System.Text; -using Microsoft.Xna.Framework; -using Newtonsoft.Json; namespace Orts.Parsers.OR { diff --git a/Source/Orts.Parsers.OR/TimetableReader.cs b/Source/Orts.Parsers.OR/TimetableReader.cs index 8d219d4871..395dbe69af 100644 --- a/Source/Orts.Parsers.OR/TimetableReader.cs +++ b/Source/Orts.Parsers.OR/TimetableReader.cs @@ -16,6 +16,7 @@ // along with Open Rails. If not, see . using System.Collections.Generic; +using System.Diagnostics; using System.IO; using System.Linq; diff --git a/Source/Orts.Simulation/Common/CommandLog.cs b/Source/Orts.Simulation/Common/CommandLog.cs index a44554fcb1..6f34a337d0 100644 --- a/Source/Orts.Simulation/Common/CommandLog.cs +++ b/Source/Orts.Simulation/Common/CommandLog.cs @@ -17,28 +17,26 @@ // This file is the responsibility of the 3D & Environment Team. +using Orts.Simulation; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Runtime.Serialization.Formatters.Binary; -using Orts.Simulation; namespace Orts.Common { /// /// User may specify an automatic pause in the replay at a time measured from the end of the replay. /// - public enum ReplayPauseState - { + public enum ReplayPauseState { Before, Due, // Set by CommandLog.Replay(), tested by Viewer.Update() During, Done }; - public class CommandLog - { + public class CommandLog { public List CommandList = new List(); public Simulator Simulator { get; set; } @@ -54,8 +52,7 @@ public class CommandLog /// /// Preferred constructor. /// - public CommandLog(Simulator simulator) - { + public CommandLog(Simulator simulator) { Simulator = simulator; } @@ -63,12 +60,11 @@ public CommandLog(Simulator simulator) /// When a command is created, it adds itself to the log. /// /// - public void CommandAdd(ICommand command) - { + public void CommandAdd( ICommand command ) { command.Time = Simulator.ClockTime; // Note time that command was issued - CommandList.Add(command); + CommandList.Add( command ); } - + /// /// Replays any commands that have become due. /// Issues commands from the replayCommandList at the same time that they were originally issued. @@ -76,97 +72,74 @@ public void CommandAdd(ICommand command) /// Assumes replayCommandList is already sorted by time. /// /// - public void Update(List replayCommandList) - { + public void Update( List replayCommandList ) { double elapsedTime = Simulator.ClockTime; - if (PauseState == ReplayPauseState.Before) - { - if (elapsedTime > ReplayEndsAt - Simulator.Settings.ReplayPauseBeforeEndS) - { + if( PauseState == ReplayPauseState.Before ) { + if( elapsedTime > ReplayEndsAt - Simulator.Settings.ReplayPauseBeforeEndS ) { PauseState = ReplayPauseState.Due; // For Viewer.Update() to detect and pause. } } - if (replayCommandList.Count > 0) - { + if( replayCommandList.Count > 0 ) { var c = replayCommandList[0]; // Without a small margin, an activity event can pause simulator just before the ResumeActicityCommand is due, // so resume never happens. double margin = (Simulator.Paused) ? 0.5 : 0; // margin of 0.5 seconds - if (elapsedTime >= c.Time - margin) - { - if (c is PausedCommand) - { + if( elapsedTime >= c.Time - margin ) { + if( c is PausedCommand ) { // Wait for the right duration and then action the command. // ActivityCommands need dedicated code as the clock is no longer advancing. - if (resumeTime == null) - { + if( resumeTime == null ) { var resumeCommand = (PausedCommand)c; - resumeTime = DateTime.Now.AddSeconds(resumeCommand.PauseDurationS); - } - else - { - if (DateTime.Now >= resumeTime) - { + resumeTime = DateTime.Now.AddSeconds(resumeCommand.PauseDurationS ); + } else { + if( DateTime.Now >= resumeTime ) { resumeTime = null; // cancel trigger - ReplayCommand(elapsedTime, replayCommandList, c); + ReplayCommand( elapsedTime, replayCommandList, c ); } } - } - else - { + } else { // When the player uses a camera command during replay, replay continues but any camera commands in the // replayCommandList are skipped until the player pauses and exit from the Quit Menu. // This allows some editing of the camera during a replay. - if (!(c is CameraCommand && CameraReplaySuspended)) - { + if (!(c is CameraCommand && CameraReplaySuspended)) { ReplayCommand(elapsedTime, replayCommandList, c); } completeTime = elapsedTime + completeDelayS; // Postpone the time for "Replay complete" message } } - } - else - { - if (completeTime != 0 && elapsedTime > completeTime) - { + } else { + if( completeTime != 0 && elapsedTime > completeTime ) { completeTime = 0; // Reset trigger so this only happens once ReplayComplete = true; // Flag seen by Viewer3D which announces "Replay complete". } } } - private void ReplayCommand(double elapsedTime, List replayCommandList, ICommand c) - { + private void ReplayCommand( double elapsedTime, List replayCommandList, ICommand c ) { c.Redo(); // Action the command - CommandList.Add(c); // Add to the log of commands - replayCommandList.RemoveAt(0); // Remove it from the head of the replay list + CommandList.Add( c ); // Add to the log of commands + replayCommandList.RemoveAt( 0 ); // Remove it from the head of the replay list } /// /// Copies the command objects from the log into the file specified, first creating the file. /// /// - public void SaveLog(string filePath) - { + public void SaveLog( string filePath ) { Stream stream = null; - try - { - stream = new FileStream(filePath, FileMode.Create); + try { + stream = new FileStream( filePath, FileMode.Create ); BinaryFormatter formatter = new BinaryFormatter(); // Re-sort based on time as tests show that some commands are deferred. - CommandList.Sort((x, y) => x.Time.CompareTo(y.Time)); - formatter.Serialize(stream, CommandList); - } - catch (IOException) - { + CommandList.Sort( ( x, y ) => x.Time.CompareTo( y.Time ) ); + formatter.Serialize( stream, CommandList ); + } catch( IOException ) { // Do nothing but warn, ignoring errors. - Trace.TraceWarning("SaveLog error writing command log " + filePath); - } - finally - { - if (stream != null) + Trace.TraceWarning( "SaveLog error writing command log " + filePath ); + } finally { + if( stream != null ) { stream.Close(); Trace.WriteLine("\nList of commands to replay saved"); @@ -178,30 +151,23 @@ public void SaveLog(string filePath) /// Copies the command objects from the file specified into the log, replacing the log's contents. /// /// - public void LoadLog(string filePath) - { + public void LoadLog( string filePath ) { Stream stream = null; - try - { - stream = new FileStream(filePath, FileMode.Open); + try { + stream = new FileStream( filePath, FileMode.Open ); BinaryFormatter formatter = new BinaryFormatter(); - CommandList = (List)formatter.Deserialize(stream); - } - catch (IOException) - { + CommandList = (List)formatter.Deserialize( stream ); + } catch( IOException ) { // Do nothing but warn, ignoring errors. - Trace.TraceWarning("LoadLog error reading command log " + filePath); - } - finally - { - if (stream != null) { stream.Close(); } + Trace.TraceWarning( "LoadLog error reading command log " + filePath ); + } finally { + if( stream != null ) { stream.Close(); } } } - public static void ReportReplayCommands(List list) - { - Trace.WriteLine("\nList of commands to replay:"); - foreach (var c in list) { c.Report(); } + public static void ReportReplayCommands( List list ) { + Trace.WriteLine( "\nList of commands to replay:" ); + foreach( var c in list ) { c.Report(); } } } } diff --git a/Source/Orts.Simulation/Common/Commands.cs b/Source/Orts.Simulation/Common/Commands.cs index 674fad1341..5e47dc944a 100644 --- a/Source/Orts.Simulation/Common/Commands.cs +++ b/Source/Orts.Simulation/Common/Commands.cs @@ -17,9 +17,6 @@ // This file is the responsibility of the 3D & Environment Team. -using System; -using System.Diagnostics; // Used by Trace.Warnings -using System.IO; using Orts.Simulation; using Orts.Simulation.Physics; using Orts.Simulation.RollingStocks; @@ -27,6 +24,9 @@ using Orts.Simulation.RollingStocks.SubSystems.PowerSupplies; using ORTS.Common; using ORTS.Scripting.Api; +using System; +using System.Diagnostics; // Used by Trace.Warnings +using System.IO; namespace Orts.Common { @@ -178,103 +178,85 @@ public CameraCommand(CommandLog log) } [Serializable()] - public sealed class SaveCommand : Command - { + public sealed class SaveCommand : Command { public string FileStem; - public SaveCommand(CommandLog log, string fileStem) - : base(log) - { + public SaveCommand( CommandLog log, string fileStem ) + : base( log ){ this.FileStem = fileStem; Redo(); } - public override void Redo() - { + public override void Redo() { // Redo does nothing as SaveCommand is just a marker and saves the fileStem but is not used during replay to redo the save. // Report(); } - public override string ToString() - { + public override string ToString() { return base.ToString() + " to file \"" + FileStem + ".replay\""; } } // Direction [Serializable()] - public sealed class ReverserCommand : BooleanCommand - { + public sealed class ReverserCommand : BooleanCommand { public static MSTSLocomotive Receiver { get; set; } - public ReverserCommand(CommandLog log, bool toState) - : base(log, toState) - { + public ReverserCommand( CommandLog log, bool toState ) + : base( log, toState ) { Redo(); } - public override void Redo() - { - if (ToState) - { - Receiver.StartReverseIncrease(null); - } - else - { - Receiver.StartReverseDecrease(null); + public override void Redo() { + if( ToState ) { + Receiver.StartReverseIncrease( null ); + } else { + Receiver.StartReverseDecrease( null ); } // Report(); } - public override string ToString() - { + public override string ToString() { return base.ToString() + " - " + (ToState ? "step forward" : "step back"); } } [Serializable()] - public sealed class ContinuousReverserCommand : ContinuousCommand - { + public sealed class ContinuousReverserCommand : ContinuousCommand { public static MSTSSteamLocomotive Receiver { get; set; } - public ContinuousReverserCommand(CommandLog log, bool toState, float? target, double startTime) - : base(log, toState, target, startTime) - { + public ContinuousReverserCommand( CommandLog log, bool toState, float? target, double startTime ) + : base( log, toState, target, startTime ) { Redo(); } - public override void Redo() - { + public override void Redo() { if (Receiver == null) return; - Receiver.ReverserChangeTo(ToState, Target); + Receiver.ReverserChangeTo( ToState, Target ); // Report(); } } // Power : Raise/lower pantograph [Serializable()] - public sealed class PantographCommand : BooleanCommand - { + public sealed class PantographCommand : BooleanCommand { public static MSTSLocomotive Receiver { get; set; } private int item; - public PantographCommand(CommandLog log, int item, bool toState) - : base(log, toState) - { + public PantographCommand( CommandLog log, int item, bool toState ) + : base( log, toState ) { this.item = item; Redo(); } - public override void Redo() - { + public override void Redo() { if (Receiver != null && Receiver.Train != null) { Receiver.Train.SignalEvent((ToState ? PowerSupplyEvent.RaisePantograph : PowerSupplyEvent.LowerPantograph), item); } } - public override string ToString() - { + public override string ToString() { return base.ToString() + " - " + (ToState ? "raise" : "lower") + ", item = " + item.ToString(); } } @@ -1162,7 +1144,7 @@ public override void Redo() Receiver.SignalEvent(Event.LightSwitchToggle); break; } - + } else { diff --git a/Source/Orts.Simulation/Common/ErrorLogger.cs b/Source/Orts.Simulation/Common/ErrorLogger.cs index e53032d6df..ef4c344a3b 100644 --- a/Source/Orts.Simulation/Common/ErrorLogger.cs +++ b/Source/Orts.Simulation/Common/ErrorLogger.cs @@ -128,7 +128,7 @@ void TraceEventInternal(TraceEventCache eventCache, string source, TraceEventTyp var errorLevel = (int)Math.Round(Math.Log((int)eventType) / Math.Log(2)); if (errorLevel < Counts.Length) Counts[errorLevel]++; - + // Event is less important than error (and critical) and we're logging only errors... bail. if (eventType > TraceEventType.Error && OnlyErrors) return; diff --git a/Source/Orts.Simulation/Common/Events.cs b/Source/Orts.Simulation/Common/Events.cs index 73594b1520..0396ddc9f1 100644 --- a/Source/Orts.Simulation/Common/Events.cs +++ b/Source/Orts.Simulation/Common/Events.cs @@ -81,8 +81,8 @@ public enum Event EngineBrakeChange, EngineBrakePressureDecrease, EngineBrakePressureIncrease, - EnginePowerOff, - EnginePowerOn, + EnginePowerOff, + EnginePowerOn, FireboxDoorChange, FireboxDoorOpen, FireboxDoorClose, @@ -109,8 +109,8 @@ public enum Event LightSwitchToggle, MasterKeyOff, MasterKeyOn, - MirrorClose, - MirrorOpen, + MirrorClose, + MirrorOpen, Pantograph1Down, PantographToggle, Pantograph1Up, @@ -142,7 +142,7 @@ public enum Event WaterInjector2Off, WaterInjector2On, BlowdownValveToggle, - SteamHeatChange, + SteamHeatChange, SteamPulse1, SteamPulse2, SteamPulse3, @@ -372,7 +372,7 @@ public static Event From(Source source, int eventID) case 104: return Event.ReverserToNeutral; // reversed moved to neutral case 105: return Event.DoorOpen; // door opened; propagated to all locos and wagons of the consist case 106: return Event.DoorClose; // door closed; propagated to all locos and wagons of the consist - case 107: return Event.MirrorOpen; + case 107: return Event.MirrorOpen; case 108: return Event.MirrorClose; case 109: return Event.TrainControlSystemInfo1; case 110: return Event.TrainControlSystemInfo2; diff --git a/Source/Orts.Simulation/Common/Math.cs b/Source/Orts.Simulation/Common/Math.cs index 1c40a8e27e..835b831ecd 100644 --- a/Source/Orts.Simulation/Common/Math.cs +++ b/Source/Orts.Simulation/Common/Math.cs @@ -15,96 +15,96 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using Microsoft.Xna.Framework; using System; using System.IO; -using Microsoft.Xna.Framework; namespace Orts.Common { public static class ORTSMath - { - // - // from http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToEuler/index.htm - // - public static void MatrixToAngles(Matrix m, out float heading, out float attitude, out float bank) - { // Assuming the angles are in radians. - if (m.M21 > 0.998) - { // singularity at north pole - heading = (float)Math.Atan2(m.M13, m.M33); - attitude = (float)Math.PI / 2; - bank = 0; - return; - } - if (m.M21 < -0.998) - { // singularity at south pole - heading = (float)Math.Atan2(m.M13, m.M33); - attitude = -(float)Math.PI / 2; - bank = 0; - return; - } - heading = (float)Math.Atan2(-m.M31, m.M11); - bank = (float)Math.Atan2(-m.M23, m.M22); - attitude = (float)Math.Asin(m.M21); - } + { + // + // from http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToEuler/index.htm + // + public static void MatrixToAngles(Matrix m, out float heading, out float attitude, out float bank) + { // Assuming the angles are in radians. + if (m.M21 > 0.998) + { // singularity at north pole + heading = (float)Math.Atan2(m.M13, m.M33); + attitude = (float)Math.PI / 2; + bank = 0; + return; + } + if (m.M21 < -0.998) + { // singularity at south pole + heading = (float)Math.Atan2(m.M13, m.M33); + attitude = -(float)Math.PI / 2; + bank = 0; + return; + } + heading = (float)Math.Atan2(-m.M31, m.M11); + bank = (float)Math.Atan2(-m.M23, m.M22); + attitude = (float)Math.Asin(m.M21); + } - public static float MatrixToYAngle(Matrix m) - { // Assuming the angles are in radians. - if (m.M21 > 0.998 || m.M21 < -0.998) - // singularity at poles - return (float)Math.Atan2(m.M13, m.M33); + public static float MatrixToYAngle(Matrix m) + { // Assuming the angles are in radians. + if (m.M21 > 0.998 || m.M21 < -0.998) + // singularity at poles + return (float)Math.Atan2(m.M13, m.M33); - else return (float)Math.Atan2(-m.M31, m.M11); - } + else return (float)Math.Atan2(-m.M31, m.M11); + } - public struct Matrix2x2 - { - public float M00, M01, M10, M11; + public struct Matrix2x2 + { + public float M00, M01, M10, M11; - public Matrix2x2(float m00, float m01, float m10, float m11) - { - M00 = m00; M01 = m01; M10 = m10; M11 = m11; - } - } + public Matrix2x2(float m00, float m01, float m10, float m11) + { + M00 = m00; M01 = m01; M10 = m10; M11 = m11; + } + } - public static float Interpolate2D(float x, float z, Matrix2x2 y) - { - float result = 0; + public static float Interpolate2D(float x, float z, Matrix2x2 y) + { + float result = 0; - result += (1 - x) * (1 - z) * y.M00; - result += (x) * (1 - z) * y.M01; - result += (1 - x) * (z) * y.M10; - result += (x) * (z) * y.M11; + result += (1 - x) * (1 - z) * y.M00; + result += (x) * (1 - z) * y.M01; + result += (1 - x) * (z) * y.M10; + result += (x) * (z) * y.M11; - return result; - } + return result; + } - public static float LineSegmentDistanceSq(Vector3 pt, Vector3 end1, Vector3 end2) - { - float dx = end2.X - end1.X; - float dy = end2.Y - end1.Y; - float dz = end2.Z - end1.Z; - float d = dx * dx + dy * dy + dz * dz; - float n = dx * (pt.X - end1.X) + dy * (pt.Y - end1.Y) + dz * (pt.Z - end1.Z); - if (d == 0 || n < 0) - { - dx = end1.X - pt.X; - dy = end1.Y - pt.Y; - dz = end1.Z - pt.Z; - } - else if (n > d) - { - dx = end2.X - pt.X; - dy = end2.Y - pt.Y; - dz = end2.Z - pt.Z; - } - else - { - dx = end1.X + dx * n / d - pt.X; - dy = end1.Y + dy * n / d - pt.Y; - dz = end1.Z + dz * n / d - pt.Z; - } - return dx * dx + dy * dy + dz * dz; - } + public static float LineSegmentDistanceSq(Vector3 pt, Vector3 end1, Vector3 end2) + { + float dx = end2.X - end1.X; + float dy = end2.Y - end1.Y; + float dz = end2.Z - end1.Z; + float d = dx * dx + dy * dy + dz * dz; + float n = dx * (pt.X - end1.X) + dy * (pt.Y - end1.Y) + dz * (pt.Z - end1.Z); + if (d == 0 || n < 0) + { + dx = end1.X - pt.X; + dy = end1.Y - pt.Y; + dz = end1.Z - pt.Z; + } + else if (n > d) + { + dx = end2.X - pt.X; + dy = end2.Y - pt.Y; + dz = end2.Z - pt.Z; + } + else + { + dx = end1.X + dx * n / d - pt.X; + dy = end1.Y + dy * n / d - pt.Y; + dz = end1.Z + dz * n / d - pt.Z; + } + return dx * dx + dy * dy + dz * dz; + } public static void SaveMatrix(BinaryWriter outf, Matrix matrix) { diff --git a/Source/Orts.Simulation/Common/ORTSPaths.cs b/Source/Orts.Simulation/Common/ORTSPaths.cs index ea078d6cc9..f5968394a2 100644 --- a/Source/Orts.Simulation/Common/ORTSPaths.cs +++ b/Source/Orts.Simulation/Common/ORTSPaths.cs @@ -24,13 +24,13 @@ namespace Orts.Common public static class ORTSPaths { // Cleaner to use GetFileFromFolders() instead, but not sure how to test this. - public static string FindTrainCarPlugin(string initialFolder, string filename) + public static string FindTrainCarPlugin( string initialFolder, string filename ) { string dllPath = initialFolder + "\\" + filename; // search in trainset folder if (File.Exists(dllPath)) return dllPath; - string rootFolder = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(initialFolder))) + "\\OpenRails"; - if (Directory.Exists(rootFolder)) + string rootFolder = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(initialFolder)))+ "\\OpenRails"; + if( Directory.Exists( rootFolder ) ) { dllPath = rootFolder + "\\" + filename; if (File.Exists(dllPath)) diff --git a/Source/Orts.Simulation/Common/Scripting/BrakeController.cs b/Source/Orts.Simulation/Common/Scripting/BrakeController.cs index c61f2eeb67..d3320d517d 100644 --- a/Source/Orts.Simulation/Common/Scripting/BrakeController.cs +++ b/Source/Orts.Simulation/Common/Scripting/BrakeController.cs @@ -188,7 +188,7 @@ public float IntermediateValue /// /// Fraction of train brake demanded by cruise control /// - public float CruiseControlBrakeDemand() => Locomotive.CruiseControl != null ? Locomotive.CruiseControl.TrainBrakePercent / 100 : 0; + public float CruiseControlBrakeDemand() => Locomotive.CruiseControl != null ? Locomotive.CruiseControl.TrainBrakePercent/100 : 0; /// /// Current notch of the brake controller diff --git a/Source/Orts.Simulation/Common/Scripting/Commands.cs b/Source/Orts.Simulation/Common/Scripting/Commands.cs index 97638134e1..9adef602f6 100644 --- a/Source/Orts.Simulation/Common/Scripting/Commands.cs +++ b/Source/Orts.Simulation/Common/Scripting/Commands.cs @@ -17,9 +17,9 @@ // This file is the responsibility of the 3D & Environment Team. -using System; using Orts.Common; using Orts.Simulation.RollingStocks.SubSystems; +using System; namespace ORTS.Scripting.Api { diff --git a/Source/Orts.Simulation/Common/Scripting/Common.cs b/Source/Orts.Simulation/Common/Scripting/Common.cs index eb287e408c..b633a0a8e5 100644 --- a/Source/Orts.Simulation/Common/Scripting/Common.cs +++ b/Source/Orts.Simulation/Common/Scripting/Common.cs @@ -15,11 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; using Orts.Common; using Orts.Simulation; using Orts.Simulation.RollingStocks; using Orts.Simulation.RollingStocks.SubSystems; +using System; namespace ORTS.Scripting.Api { diff --git a/Source/Orts.Simulation/Common/Scripting/PowerSupply/ControlCarPowerSupply.cs b/Source/Orts.Simulation/Common/Scripting/PowerSupply/ControlCarPowerSupply.cs index 55d4be46ff..f70a678b22 100644 --- a/Source/Orts.Simulation/Common/Scripting/PowerSupply/ControlCarPowerSupply.cs +++ b/Source/Orts.Simulation/Common/Scripting/PowerSupply/ControlCarPowerSupply.cs @@ -15,6 +15,8 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; + namespace ORTS.Scripting.Api { /// diff --git a/Source/Orts.Simulation/Common/Scripting/PowerSupply/LocomotivePowerSupply.cs b/Source/Orts.Simulation/Common/Scripting/PowerSupply/LocomotivePowerSupply.cs index 8c1e2d6db1..ea9680d1c4 100644 --- a/Source/Orts.Simulation/Common/Scripting/PowerSupply/LocomotivePowerSupply.cs +++ b/Source/Orts.Simulation/Common/Scripting/PowerSupply/LocomotivePowerSupply.cs @@ -15,8 +15,8 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; using Orts.Simulation; +using System; namespace ORTS.Scripting.Api { diff --git a/Source/Orts.Simulation/Common/Scripting/PowerSupply/PowerSupply.cs b/Source/Orts.Simulation/Common/Scripting/PowerSupply/PowerSupply.cs index 4e2a19301e..0788e09a78 100644 --- a/Source/Orts.Simulation/Common/Scripting/PowerSupply/PowerSupply.cs +++ b/Source/Orts.Simulation/Common/Scripting/PowerSupply/PowerSupply.cs @@ -15,8 +15,8 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; using ORTS.Common; +using System; namespace ORTS.Scripting.Api { diff --git a/Source/Orts.Simulation/Common/Scripting/ScriptManager.cs b/Source/Orts.Simulation/Common/Scripting/ScriptManager.cs index 24e85f10d4..ef0883dca9 100644 --- a/Source/Orts.Simulation/Common/Scripting/ScriptManager.cs +++ b/Source/Orts.Simulation/Common/Scripting/ScriptManager.cs @@ -15,6 +15,8 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using Orts.Simulation; +using ORTS.Common; using System; using System.Collections.Generic; using System.Diagnostics; @@ -26,7 +28,6 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Emit; -using ORTS.Common; namespace Orts.Common.Scripting { @@ -67,7 +68,7 @@ public object Load(string[] pathArray, string name, string nameSpace = "ORTS.Scr if (path == null || path == "") return null; - + path = path.ToLowerInvariant(); var type = String.Format("{0}.{1}", nameSpace, Path.GetFileNameWithoutExtension(path).Replace('-', '_')); @@ -156,7 +157,7 @@ private static Assembly CompileScript(string[] path) public Assembly LoadFolder(string path) { - + if (Thread.CurrentThread.Name != "Loader Process") Trace.TraceError("ScriptManager.Load incorrectly called by {0}; must be Loader Process or crashes will occur.", Thread.CurrentThread.Name); diff --git a/Source/Orts.Simulation/Common/Scripting/TrainControlSystem.cs b/Source/Orts.Simulation/Common/Scripting/TrainControlSystem.cs index 09ca14b9bc..1ec46c8246 100644 --- a/Source/Orts.Simulation/Common/Scripting/TrainControlSystem.cs +++ b/Source/Orts.Simulation/Common/Scripting/TrainControlSystem.cs @@ -17,9 +17,9 @@ using System; using System.IO; +using ORTS.Common; using Orts.Common; using Orts.Simulation.RollingStocks.SubSystems; -using ORTS.Common; using ORTS.Scripting.Api.ETCS; namespace ORTS.Scripting.Api @@ -207,7 +207,7 @@ public abstract class TrainControlSystem : AbstractTrainScriptClass /// True if circuit breaker or power contactor opening order is true. /// public Func CircuitBreakerOpeningOrder; - /// + /// /// Returns the number of pantographs on the locomotive. /// public Func PantographCount; @@ -585,16 +585,16 @@ public enum Aspect // Represents the same enum as TRAIN_CONTROL public enum TRAIN_CONTROL - { - AUTO_SIGNAL, - AUTO_NODE, - MANUAL, - EXPLORER, - OUT_OF_CONTROL, - INACTIVE, - TURNTABLE, - UNDEFINED - } + { + AUTO_SIGNAL, + AUTO_NODE, + MANUAL, + EXPLORER, + OUT_OF_CONTROL, + INACTIVE, + TURNTABLE, + UNDEFINED + } public enum TCSEvent { @@ -642,7 +642,7 @@ public enum TCSEvent /// Internal reset request by the engine brake controller. /// EngineBrakeChanged, - /// + /// /// Internal reset request by the brakeman brake controller. /// BrakemanBrakeChanged, diff --git a/Source/Orts.Simulation/Common/SteamTable.cs b/Source/Orts.Simulation/Common/SteamTable.cs index d6ae9ad7a1..2b81354c7e 100644 --- a/Source/Orts.Simulation/Common/SteamTable.cs +++ b/Source/Orts.Simulation/Common/SteamTable.cs @@ -92,44 +92,44 @@ static class SteamTable 75.83f, 81.88f, 83.75f, 85.63f, 87.50f, 89.37f, 91.25f, 93.12f, 93.75f, 94.37f, 94.99f, 95.62f, 96.24f, 96.87f, 97.49f, 98.12f, 98.74f, 99.37f, 99.99f, 100.61f }; - - // injector 14mm flowrates (gallons (uk) per minute) - data extrapolated below from info in 1928 Sellers Injector Manual + + // injector 14mm flowrates (gallons (uk) per minute) - data extrapolated below from info in 1928 Sellers Injector Manual static float[] Injector14FlowTableUKGpM = new float[] { 9.30f, 16.79f, 24.28f, 31.77f, 39.26f, 46.75f, 54.24f, 61.73f, 69.21f, 76.70f, 84.19f, 91.68f, 99.17f, 100.81f, 102.45f, 104.09f, 105.72f, 107.36f, 109.00f, 111.65f, 114.30f, 115.94f, 117.58f, 119.21f, 120.85f, 122.49f, 124.13f, 125.77f, 127.40f, 129.04f, 130.68f }; - - // injector 15mm flowrates (gallons (uk) per minute) - data extrapolated below from info in 1928 Sellers Injector Manual + + // injector 15mm flowrates (gallons (uk) per minute) - data extrapolated below from info in 1928 Sellers Injector Manual static float[] Injector15FlowTableUKGpM = new float[] { 9.30f, 17.82f, 26.33f, 34.85f, 43.36f, 51.88f, 60.40f, 68.91f, 77.43f, 85.94f, 94.46f, 102.98f, 111.49f, 113.33f, 115.16f, 117.0f, 118.83f, 120.67f, 122.50f, 125.50f, 128.50f, 130.14f, 131.78f, 133.41f, 135.05f, 136.69f, 138.33f, 139.97f, 141.60f, 143.24f, 144.88f - }; + }; // Specific heat table for water - volume heat capacity?? - static float[] SpecificHeatTableKJpKGpK = new float[] { 4.2170f, 4.2049f, 4.2165f, 4.2223f, 4.2287f, 4.2355f, 4.2427f, 4.2505f, 4.2587f, 4.2675f, 4.2769f, - 4.2926f, 4.3035f, 4.3151f, 4.3274f, 4.3405f, 4.3543f, 4.3690f, 4.3846f, 4.4012f, 4.4187f, - 4.4374f, 4.4573f, 4.4784f, 4.5009f, 4.5248f, 4.5503f, 4.5774f, 4.6064f, 4.6373f, 4.6703f + 4.2926f, 4.3035f, 4.3151f, 4.3274f, 4.3405f, 4.3543f, 4.3690f, 4.3846f, 4.4012f, 4.4187f, + 4.4374f, 4.4573f, 4.4784f, 4.5009f, 4.5248f, 4.5503f, 4.5774f, 4.6064f, 4.6373f, 4.6703f }; // Water temp in deg Kelvin static float[] WaterTemperatureTableK = new float[] { 274.00f, 281.40f, 288.80f, 296.20f, 303.60f, 311.00f, 318.40f, 325.80f, 333.20f, 340.60f, 348.00f, - 355.40f, 362.80f, 370.20f, 377.60f, 385.00f, 392.40f, 399.80f, 407.20f, 414.60f, 422.00f, - 429.40f, 436.80f, 444.20f, 451.60f, 459.00f, 466.40f, 473.80f, 481.20f, 488.60f, 496.00f + 355.40f, 362.80f, 370.20f, 377.60f, 385.00f, 392.40f, 399.80f, 407.20f, 414.60f, 422.00f, + 429.40f, 436.80f, 444.20f, 451.60f, 459.00f, 466.40f, 473.80f, 481.20f, 488.60f, 496.00f }; - + static float[] SaturationPressureTablePSI = new float[] { 0.00f, 10.00f, 20.00f, 30.00f, 40.00f, 50.00f, 60.00f, 70.00f, 80.00f, 90.00f, 100.00f, - 110.00f, 120.00f, 130.00f, 140.00f, 150.00f, 160.00f, 170.00f, 180.00f, 190.00f, 200.00f, - 210.00f, 220.00f, 230.00f, 240.00f, 250.00f, 260.00f, 270.00f, 280.00f, 290.00f, 300.00f + 110.00f, 120.00f, 130.00f, 140.00f, 150.00f, 160.00f, 170.00f, 180.00f, 190.00f, 200.00f, + 210.00f, 220.00f, 230.00f, 240.00f, 250.00f, 260.00f, 270.00f, 280.00f, 290.00f, 300.00f }; // Temperature of water in deg Kelvin @@ -145,7 +145,7 @@ static class SteamTable { 0.0f, 20.0f, 40.0f, 60.0f, 80.0f, 100.0f, 120.0f, 140.0f, 160.0f, 180.0f, 200.0f, 220.0f }; - + // Boiler Efficiency - based upon average results from test papers static float[] SatBoilerEfficiencyTableX = new float[] { @@ -157,7 +157,7 @@ static class SteamTable { 0.903f, 0.8484f, 0.7936f, 0.7390f, 0.6843f, 0.6296f, 0.5749f, 0.5202f, 0.4655f, 0.4108f, 0.3561f, 0.3014f }; - + // pressure tables for Injectors temperature and steam usage static float[] InjectorUsePressureTablePSI = new float[] { @@ -187,8 +187,8 @@ static class SteamTable { 0.366f, 0.395f, 0.419f, 0.454f, 0.509f }; - - // Cylinder Indicator Card Events + +// Cylinder Indicator Card Events // cutoff fraction static float[] CutOffFractionEventTableX = new float[] @@ -216,7 +216,7 @@ static class SteamTable }; - // Cylinder condensation and superheat +// Cylinder condensation and superheat // cutoff fraction static float[] CutOffFractionTableX = new float[] @@ -242,7 +242,7 @@ static class SteamTable 0.0f, 2000.0f, 4000.0f, 6000.0f, 8000.0f, 10000.0f, 12000.0f, 14000.0f, 16000.0f, 18000.0f, 20000.0f, 22000.0f, 24000.0f, 26000.0f, 28000.0f, 30000.0f, 32000.0f, 34000.0f, 36000.0f }; - + // Superheat Temp - deg F - from BTC Test Results for Std 8 static float[] SuperheatTempTableDegF = new float[] { @@ -259,64 +259,64 @@ static class SteamTable // Allowance for drop in initial pressure (steam chest) as speed increases - Various sources - Saturated static float[] SatInitialPressureDropRatio = new float[] { - 0.98f, 0.965f, 0.95f, 0.935f, 0.92f, 0.905f, 0.89f, 0.875f, 0.87f, 0.8650f, 0.8625f, 0.86f, 0.8575f, 0.855f, 0.8525f, 0.85f - + 0.98f, 0.965f, 0.95f, 0.935f, 0.92f, 0.905f, 0.89f, 0.875f, 0.87f, 0.8650f, 0.8625f, 0.86f, 0.8575f, 0.855f, 0.8525f, 0.85f + }; - - // Allowance for pressure drop in Steam chest pressure compared to Boiler Pressure - (To be confirmed) - Superheated + + // Allowance for pressure drop in Steam chest pressure compared to Boiler Pressure - (To be confirmed) - Superheated static float[] SuperInitialPressureDropRatio = new float[] { 0.99f, 0.98f, 0.97f, 0.96f, 0.95f, 0.94f, 0.93f, 0.92f, 0.915f, 0.910f, 0.905f, 0.90f, 0.8975f, 0.8950f, 0.8925f, 0.8900f }; - - // piston speed (feet per minute) - American Locomotive Company + +// piston speed (feet per minute) - American Locomotive Company static float[] PistonSpeedFtpMin = new float[] { 0, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000, 2100 }; - - // Speed factor - Saturated (0 and 2000, 2100 value extrapolated for Open Rails to limit TE) - Based upon dat from American Locomotive Company + +// Speed factor - Saturated (0 and 2000, 2100 value extrapolated for Open Rails to limit TE) - Based upon dat from American Locomotive Company static float[] SpeedFactorSat = new float[] { 1.0f, 1.0f, 1.0f, 0.954f, 0.863f, 0.772f, 0.680f, 0.590f, 0.517f, 0.460f, 0.412f, 0.372f, 0.337f, 0.307f, 0.283f, 0.261f, 0.241f, 0.225f, 0.213f, 0.202f, 0.190f, 0.185f }; - - // Speed factor - Superheated (0 and 2000, 2100 value extrapolated for Open Rails to limit TE) - American Locomotive Company + +// Speed factor - Superheated (0 and 2000, 2100 value extrapolated for Open Rails to limit TE) - American Locomotive Company static float[] SpeedFactorSuper = new float[] { 1.0f, 1.0f, 1.0f, 0.988f, 0.965f, 0.912f, 0.859f, 0.800f, 0.753f, 0.706f, 0.659f, 0.612f, 0.571f, 0.535f, 0.500f, 0.471f, 0.447f, 0.433f, 0.424f, 0.420f, 0.410f, 0.410f }; - // Indicated HorsePower - +// Indicated HorsePower - static float[] IndicatedHorsepowerIHP = new float[] { 0.0f, 200.0f, 400.0f, 600.0f, 800.0f, 1000.0f, 1200.0f, 1400.0f, 1600.0f, 1800.0f, 2000.0f, 2200.0f, 2400.0f, 2600.0f, 2800.0f, 3000.0f }; - // BackPressure - Saturated locomotive - Ref Principles of Locomotive Operation - Assume atmospheric - extrapolated beyond 1800IHP +// BackPressure - Saturated locomotive - Ref Principles of Locomotive Operation - Assume atmospheric - extrapolated beyond 1800IHP static float[] BackPressureSatPSI = new float[] { 0.0f, 1.0f, 2.0f, 2.33f, 3.0f, 5.3f, 5.6f, 8.0f, 11.2f, 14.25f, 16.0f, 20.0f, 24.0f, 26.0f, 28.0f, 30.0f }; - // BackPressure - Superheated locomotive - Ref Principles of Locomotive Operation - Assume atmospheric - extrapolated beyond 1800IHP +// BackPressure - Superheated locomotive - Ref Principles of Locomotive Operation - Assume atmospheric - extrapolated beyond 1800IHP static float[] BackPressureSuperPSI = new float[] { 0.0f, 0.25f, 0.5f, 0.75f, 1.25f, 1.75f, 2.5f, 3.5f, 4.8f, 7.2f, 11.25f, 16.0f, 20.0f, 22.0f, 24.0f, 26.0f }; - // Allowance for drop in initial pressure (steam chest) as speed increases - Various sources + // Allowance for drop in initial pressure (steam chest) as speed increases - Various sources static float[] CondensationWheelRotationRpM = new float[] { 0.0f, 50.0f, 100.0f, 150.0f, 200.0f, 250.0f, 300.0f, 350.0f }; - // Steam Tables +// Steam Tables - // Indicator Diagram - Cylinder Events +// Indicator Diagram - Cylinder Events // Indicator Diagram Event - Exhaust Open - Perwall program - http://5at.co.uk/index.php/references-and-links/software.html public static Interpolator CylinderEventExhausttoCutoff() @@ -334,88 +334,88 @@ public static Interpolator CylinderEventCompressiontoCutoff() public static Interpolator CylinderEventAdmissiontoCutoff() { return new Interpolator(CutOffFractionEventTableX, CylinderAdmissionTableX); - } - - // cylinder condensation fraction per cutoff fraction - saturated steam - Ref Elseco Superheater manual + } + +// cylinder condensation fraction per cutoff fraction - saturated steam - Ref Elseco Superheater manual public static Interpolator CylinderCondensationFractionInterpolatorX() { return new Interpolator(CutOffFractionTableX, CylinderCondensationFractionTableX); } - // Superheat temp required to prevent cylinder condensation - Ref Elseco Superheater manual +// Superheat temp required to prevent cylinder condensation - Ref Elseco Superheater manual public static Interpolator SuperheatTempLimitInterpolatorXtoDegF() { return new Interpolator(CutOffFractionTableX, SuperheatCondenstationLimitTableDegF); - } + } - // Saturated Backpressure - Ref Principles of Locomotive Operation +// Saturated Backpressure - Ref Principles of Locomotive Operation public static Interpolator BackpressureSatIHPtoPSI() { return new Interpolator(IndicatedHorsepowerIHP, BackPressureSatPSI); } - // Superheated Backpressure - Ref Principles of Locomotive Operation +// Superheated Backpressure - Ref Principles of Locomotive Operation public static Interpolator BackpressureSuperIHPtoPSI() { return new Interpolator(IndicatedHorsepowerIHP, BackPressureSuperPSI); - } + } - // Saturated Speed factor - ie drop in TE as speed increases due to piston impacts - Ref American locomotive Company +// Saturated Speed factor - ie drop in TE as speed increases due to piston impacts - Ref American locomotive Company public static Interpolator SaturatedSpeedFactorSpeedDropFtpMintoX() { return new Interpolator(PistonSpeedFtpMin, SpeedFactorSat); - } - - - // Superheated Speed factor - ie drop in TE as speed increases due to piston impacts - Ref American locomotive Company + } + + +// Superheated Speed factor - ie drop in TE as speed increases due to piston impacts - Ref American locomotive Company public static Interpolator SuperheatedSpeedFactorSpeedDropFtpMintoX() { return new Interpolator(PistonSpeedFtpMin, SpeedFactorSuper); - } + } + - - // Allowance for pressure drop in Steam chest pressure compared to Boiler Pressure - Ref LOCOMOTIVE OPERATION - A TECHNICAL AND PRACTICAL ANALYSIS - BY G. R. HENDERSON + // Allowance for pressure drop in Steam chest pressure compared to Boiler Pressure - Ref LOCOMOTIVE OPERATION - A TECHNICAL AND PRACTICAL ANALYSIS - BY G. R. HENDERSON public static Interpolator SuperInitialPressureDropRatioInterpolatorRpMtoX() { return new Interpolator(WheelRotationRpM, SuperInitialPressureDropRatio); - } + } // Allowance for wire-drawing - ie drop in initial pressure (cutoff) as speed increases - Ref Principles of Locomotive Operation public static Interpolator SatInitialPressureDropRatioInterpolatorRpMtoX() { return new Interpolator(WheelRotationRpM, SatInitialPressureDropRatio); - } + } // Superheat temp per lbs of steam to cylinder - from BTC Test Results for Std 8 public static Interpolator SuperheatTempInterpolatorLbpHtoDegF() { return new Interpolator(CylinderSteamTableLbpH, SuperheatTempTableDegF); - } + } // Injector factor to determine the min capacity of the injector public static Interpolator InjCapMinFactorInterpolatorX() { return new Interpolator(InjectorUsePressureTablePSI, InjMinCapFactorTableX); - } + } // Injector max delivery water temp (Fahr) per pressure of steam (psi) public static Interpolator InjDelWaterTempMaxPressureInterpolatorFtoPSI() { return new Interpolator(InjectorUsePressureTablePSI, WaterTemPDeliveryMaxTableF); - } - + } + // Injector min delivery water temp (Fahr) per pressure of steam (psi) public static Interpolator InjDelWaterTempMinPressureInterpolatorFtoPSI() { return new Interpolator(InjectorUsePressureTablePSI, WaterTemPDeliveryMinTableF); - } - + } + // Injector water fed per lb of steam at pressure of steam (psi) public static Interpolator InjWaterFedSteamPressureInterpolatorFtoPSI() { return new Interpolator(InjectorUsePressureTablePSI, WaterDelFedSteamTableLbs); - } + } // Boiler Efficiency based on lbs of coal per sq. ft of Grate Area - Saturated public static Interpolator SatBoilerEfficiencyGrateAreaInterpolatorLbstoX() @@ -428,7 +428,7 @@ public static Interpolator SuperBoilerEfficiencyGrateAreaInterpolatorLbstoX() { return new Interpolator(CoalGrateAreaTableLbspFt2, SuperBoilerEfficiencyTableX); } - + // Saturated pressure of steam (psi) @ water temperature (K) public static Interpolator SaturationPressureInterpolatorKtoPSI() { @@ -457,25 +457,25 @@ public static Interpolator Injector10FlowrateInterpolatorPSItoUKGpM() public static Interpolator Injector11FlowrateInterpolatorPSItoUKGpM() { return new Interpolator(PressureTableGaugePSI, Injector11FlowTableUKGpM); - } - + } + // Flowrate table vs Boiler Pressure for 13mm Injector public static Interpolator Injector13FlowrateInterpolatorPSItoUKGpM() { return new Interpolator(PressureTableGaugePSI, Injector13FlowTableUKGpM); - } - + } + // Flowrate table vs Boiler Pressure for 14mm Injector public static Interpolator Injector14FlowrateInterpolatorPSItoUKGpM() { return new Interpolator(PressureTableGaugePSI, Injector14FlowTableUKGpM); - } - + } + // Flowrate table vs Boiler Pressure for 15mm Injector public static Interpolator Injector15FlowrateInterpolatorPSItoUKGpM() { return new Interpolator(PressureTableGaugePSI, Injector15FlowTableUKGpM); - } + } public static Interpolator WaterHeatInterpolatorPSItoBTUpLB() { @@ -524,18 +524,18 @@ public static Interpolator SteamHeatPressureToTemperatureInterpolatorPSItoF() // revolutions - z value static float[] WheelRevolutionsRpM = new float[] { - 0.0f, 50.0f, 100.0f, 150.0f, 200.0f, 250.0f, 300.0f, 350.0f + 0.0f, 50.0f, 100.0f, 150.0f, 200.0f, 250.0f, 300.0f, 350.0f }; // Cutoff - x Value static float[] CutOff = new float[] { - 0.0f, 0.1f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f, 1.0f + 0.0f, 0.1f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f, 1.0f }; - + // ++++++++++++++++++++++ Upper Limit ++++++++++++ - // % Initial Pressure @ 0rpm - y Value + // % Initial Pressure @ 0rpm - y Value static float[] InitialPressureUpper0RpM = new float[] { 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f @@ -652,7 +652,7 @@ public static Interpolator2D CutoffInitialPressureUpper() return new Interpolator2D(WheelRevolutionsRpM, Initial_pressure_upper); } - // ++++++++++++++++++++++ Lower Limit ++++++++++++ + // ++++++++++++++++++++++ Lower Limit ++++++++++++ // % Initial Pressure @ 0rpm - y Value static float[] InitialPressureLower0RpM = new float[] diff --git a/Source/Orts.Simulation/MultiPlayer/ClientComm.cs b/Source/Orts.Simulation/MultiPlayer/ClientComm.cs index e668491344..da94d96a6e 100644 --- a/Source/Orts.Simulation/MultiPlayer/ClientComm.cs +++ b/Source/Orts.Simulation/MultiPlayer/ClientComm.cs @@ -18,6 +18,7 @@ // #define DEBUG_MULTIPLAYER // DEBUG flag for debug prints +using Orts.Simulation.Physics; using System; using System.Diagnostics; using System.Linq; @@ -25,31 +26,30 @@ using System.Net.Sockets; using System.Text; using System.Threading; -using Orts.Simulation.Physics; namespace Orts.MultiPlayer { public class ClientComm - { - private Thread listenThread; - private TcpClient client; - public string UserName; - public string Code; - public Decoder decoder; - public bool Connected = false; - - public void Stop() - { - try - { - client.Close(); - listenThread.Abort(); - } - catch (Exception) { } - } - public ClientComm(string serverIP, int serverPort, string s) - { - client = new TcpClient(); + { + private Thread listenThread; + private TcpClient client; + public string UserName; + public string Code; + public Decoder decoder; + public bool Connected = false; + + public void Stop() + { + try + { + client.Close(); + listenThread.Abort(); + } + catch (Exception) { } + } + public ClientComm(string serverIP, int serverPort, string s) + { + client = new TcpClient(); IPAddress address; @@ -59,130 +59,130 @@ public ClientComm(string serverIP, int serverPort, string s) .AddressList .First(ip => ip.AddressFamily == AddressFamily.InterNetwork); } - IPEndPoint serverEndPoint = new IPEndPoint(address, serverPort); + IPEndPoint serverEndPoint = new IPEndPoint(address, serverPort); #if DEBUG_MULTIPLAYER Trace.TraceInformation("ClientComm data: {0} , ServerIP: {1}", s, serverIP); #endif client.Connect(serverEndPoint); - string[] tmp = s.Split(' '); - UserName = tmp[0]; - Code = tmp[1]; - decoder = new Decoder(); - - listenThread = new Thread(new ParameterizedThreadStart(this.Receive)); - listenThread.Name = "Multiplayer Client-Server"; - listenThread.Start(client); - - } - - public void Receive(object client) - { - - TcpClient tcpClient = (TcpClient)client; - NetworkStream clientStream = tcpClient.GetStream(); - - byte[] message = new byte[8192]; - int bytesRead; - - while (true) - { - bytesRead = 0; - try - { - //blocks until a client sends a message - bytesRead = clientStream.Read(message, 0, 8192); - } - catch - { - //a socket error has occured - break; - } - - if (bytesRead == 0) - { - //the client has disconnected from the server - break; - } - - //message has successfully been received - string info = ""; - try - { - decoder.PushMsg(Encoding.Unicode.GetString(message, 0, bytesRead));//encoder.GetString(message, 0, bytesRead)); - info = decoder.GetMsg(); - while (info != null) - { - //System.Console.WriteLine(info); - Message msg = Message.Decode(info); - if (Connected || msg is MSGRequired) msg.HandleMsg(); - info = decoder.GetMsg(); - } - } - catch (MultiPlayerError) - { - break; - } - catch (SameNameError) //I have conflict with some one in the game, will close, and abort. - { - if (MPManager.Simulator.Confirmer != null) + string[] tmp = s.Split(' '); + UserName = tmp[0]; + Code = tmp[1]; + decoder = new Decoder(); + + listenThread = new Thread(new ParameterizedThreadStart(this.Receive)); + listenThread.Name = "Multiplayer Client-Server"; + listenThread.Start(client); + + } + + public void Receive(object client) + { + + TcpClient tcpClient = (TcpClient)client; + NetworkStream clientStream = tcpClient.GetStream(); + + byte[] message = new byte[8192]; + int bytesRead; + + while (true) + { + bytesRead = 0; + try + { + //blocks until a client sends a message + bytesRead = clientStream.Read(message, 0, 8192); + } + catch + { + //a socket error has occured + break; + } + + if (bytesRead == 0) + { + //the client has disconnected from the server + break; + } + + //message has successfully been received + string info = ""; + try + { + decoder.PushMsg(Encoding.Unicode.GetString(message, 0, bytesRead));//encoder.GetString(message, 0, bytesRead)); + info = decoder.GetMsg(); + while (info != null) + { + //System.Console.WriteLine(info); + Message msg = Message.Decode(info); + if (Connected || msg is MSGRequired) msg.HandleMsg(); + info = decoder.GetMsg(); + } + } + catch (MultiPlayerError) + { + break; + } + catch (SameNameError) //I have conflict with some one in the game, will close, and abort. + { + if (MPManager.Simulator.Confirmer != null) MPManager.Simulator.Confirmer.Error(MPManager.Catalog.GetString("Connection to the server is lost, will play as single mode")); MPManager.Client = null; - tcpClient.Close(); - listenThread.Abort(); - } - catch (Exception e) - { - System.Console.WriteLine(e.Message + e.StackTrace); - Trace.TraceWarning(e.Message + e.StackTrace); - } - } - if (MPManager.Simulator.Confirmer != null) + tcpClient.Close(); + listenThread.Abort(); + } + catch (Exception e) + { + System.Console.WriteLine(e.Message + e.StackTrace); + Trace.TraceWarning(e.Message + e.StackTrace); + } + } + if (MPManager.Simulator.Confirmer != null) MPManager.Simulator.Confirmer.Error(MPManager.Catalog.GetString("Connection to the server is lost, will play as single mode")); - try - { - foreach (var p in MPManager.OnlineTrains.Players) - { - MPManager.Instance().AddRemovedPlayer(p.Value); - } - } - catch (Exception) { } - - //no matter what, let player gain back the control of the player train - if (MPManager.Simulator.PlayerLocomotive != null && MPManager.Simulator.PlayerLocomotive.Train != null) - { - MPManager.Simulator.PlayerLocomotive.Train.TrainType = Train.TRAINTYPE.PLAYER; - MPManager.Simulator.PlayerLocomotive.Train.LeadLocomotive = MPManager.Simulator.PlayerLocomotive; - } - if (MPManager.Simulator.Confirmer != null) + try + { + foreach (var p in MPManager.OnlineTrains.Players) + { + MPManager.Instance().AddRemovedPlayer(p.Value); + } + } + catch (Exception) { } + + //no matter what, let player gain back the control of the player train + if (MPManager.Simulator.PlayerLocomotive != null && MPManager.Simulator.PlayerLocomotive.Train != null) + { + MPManager.Simulator.PlayerLocomotive.Train.TrainType = Train.TRAINTYPE.PLAYER; + MPManager.Simulator.PlayerLocomotive.Train.LeadLocomotive = MPManager.Simulator.PlayerLocomotive; + } + if (MPManager.Simulator.Confirmer != null) MPManager.Simulator.Confirmer.Information(MPManager.Catalog.GetString("Alt-E to gain control of your train")); MPManager.Client = null; - tcpClient.Close(); - listenThread.Abort(); - } - - private object lockObj = new object(); - public void Send(string msg) - { - - try - { - NetworkStream clientStream = client.GetStream(); - lock (lockObj)//in case two threads want to write at the same buffer - { + tcpClient.Close(); + listenThread.Abort(); + } + + private object lockObj = new object(); + public void Send(string msg) + { + + try + { + NetworkStream clientStream = client.GetStream(); + lock (lockObj)//in case two threads want to write at the same buffer + { #if DEBUG_MULTIPLAYER Trace.TraceInformation("MPClientSend: {0}", msg); #endif byte[] buffer = Encoding.Unicode.GetBytes(msg);//encoder.GetBytes(msg); - clientStream.Write(buffer, 0, buffer.Length); - clientStream.Flush(); - } - } - catch - { - } - } - - } + clientStream.Write(buffer, 0, buffer.Length); + clientStream.Flush(); + } + } + catch + { + } + } + + } } diff --git a/Source/Orts.Simulation/MultiPlayer/Decoder.cs b/Source/Orts.Simulation/MultiPlayer/Decoder.cs index 10fd60de69..e32c557694 100644 --- a/Source/Orts.Simulation/MultiPlayer/Decoder.cs +++ b/Source/Orts.Simulation/MultiPlayer/Decoder.cs @@ -20,9 +20,9 @@ namespace Orts.MultiPlayer { public class Decoder - { - string msg = ""; - /* + { + string msg = ""; + /* static Decoder decoder= null; private Decoder() { @@ -34,43 +34,43 @@ public static Decoder Instance() return decoder; } */ - public void PushMsg(string s) - { + public void PushMsg(string s) + { //if (msg.Length > 10 && !msg.Contains(":") && s.Contains(":")) msg = ""; - msg += s; //add to existing string of msgs - } - public string GetMsg() - { - // System.Console.WriteLine(msg); - if (msg.Length < 1) return null; - int index = msg.IndexOf(':'); - if (index < 0) - { - if (msg.Length > 10) msg = msg.Remove(0); //no ':', clear the messages, no way to recover anyway, except the first few digits - throw new Exception("Parsing error, no : found"); - } - try - { - int last = index - 1; - while (last >= 0) - { - if (!char.IsDigit(msg[last])) break; - last--; - } //shift back to get all digits - last += 1; - if (last < 0) last = 0; - string tmp = msg.Substring(last, index - last); - int len; - if (!int.TryParse(tmp, out len)) { msg = msg.Remove(0); return null; } - if (len < 0) return null; + msg += s; //add to existing string of msgs + } + public string GetMsg() + { +// System.Console.WriteLine(msg); + if (msg.Length < 1) return null; + int index = msg.IndexOf(':'); + if (index < 0) + { + if (msg.Length > 10) msg = msg.Remove(0); //no ':', clear the messages, no way to recover anyway, except the first few digits + throw new Exception("Parsing error, no : found"); + } + try + { + int last = index - 1; + while (last >= 0) + { + if (!char.IsDigit(msg[last])) break; + last--; + } //shift back to get all digits + last += 1; + if (last < 0) last = 0; + string tmp = msg.Substring(last, index - last); + int len; + if (!int.TryParse(tmp, out len)) { msg = msg.Remove(0); return null; } + if (len < 0) return null; if (index + 2 + len > msg.Length) { //if (msg.LastIndexOf(":") > 64) { msg = msg.Remove(0, index + 1); }//if there is a : further down, means the length is wrong, needs to remove until next : return null; } - tmp = msg.Substring(index + 2, len); //not taking ": " - msg = msg.Remove(0, index + 2 + len); //remove : - if (len > 1000000) return null;//a long message, will ignore it + tmp = msg.Substring(index + 2, len); //not taking ": " + msg = msg.Remove(0, index + 2 + len); //remove : + if (len > 1000000) return null;//a long message, will ignore it #if false int last = index-1; while (last >= 0 && char.IsDigit(msg[last--])) ; //shift back to get all digits @@ -82,17 +82,17 @@ public string GetMsg() tmp = msg.Substring(index+2, len); //not taking ": " msg = msg.Remove(last, index+2+len); //remove : #endif - return tmp; - } - catch (Exception) - { - //System.Console.WriteLine(msg); - //msg = ""; //clear the messages - return null; - } - - } - } + return tmp; + } + catch (Exception) + { + //System.Console.WriteLine(msg); + //msg = ""; //clear the messages + return null; + } + + } + } public class MultiPlayerError : Exception { diff --git a/Source/Orts.Simulation/MultiPlayer/MPManager.cs b/Source/Orts.Simulation/MultiPlayer/MPManager.cs index 753c02b3ce..b3fa6d7017 100644 --- a/Source/Orts.Simulation/MultiPlayer/MPManager.cs +++ b/Source/Orts.Simulation/MultiPlayer/MPManager.cs @@ -24,6 +24,13 @@ * */ +using GNU.Gettext; +using Orts.Parsers.Msts; +using Orts.Simulation; +using Orts.Simulation.Physics; +using Orts.Simulation.RollingStocks; +using Orts.Common; +using ORTS.Common; using System; using System.Collections.Generic; using System.Diagnostics; @@ -31,13 +38,6 @@ using System.Security.Cryptography; using System.Text; using System.Threading; -using GNU.Gettext; -using Orts.Common; -using Orts.Parsers.Msts; -using Orts.Simulation; -using Orts.Simulation.Physics; -using Orts.Simulation.RollingStocks; -using ORTS.Common; namespace Orts.MultiPlayer { @@ -84,7 +84,7 @@ public class MPManager public string lastSender = ""; //who last sends me a message public bool AmAider = false; //am I aiding the dispatcher? public List aiderList; - public Dictionary lostPlayer = new Dictionary(); + public Dictionary lostPlayer = new Dictionary(); public bool NotServer = true; public bool CheckSpad = true; public static bool PreferGreen = true; @@ -164,7 +164,7 @@ private MPManager() removedLocomotives = new List(); aiderList = new List(); if (Server != null) NotServer = false; - users = new SortedList(); + users = new SortedList(); GetMD5HashFromTDBFile(); } public static MPManager Instance() @@ -183,7 +183,7 @@ public static void RequestControl() try { Train train = Simulator.PlayerLocomotive.Train; - + MSGControl msgctl; //I am the server, I have control if (IsServer()) @@ -262,7 +262,7 @@ public void Update(double newtime) } #endif } - + //server updates switch if (Server != null && newtime - lastSwitchTime >= MPUpdateInterval) { @@ -274,7 +274,7 @@ public void Update(double newtime) if (signalStatus.OKtoSend) BroadCast(signalStatus.ToString()); } - + //client updates itself if (Client != null && Server == null && newtime - lastMoveTime >= 1f) { @@ -367,7 +367,7 @@ void CheckPlayerTrainSpad() var Locomotive = (MSTSLocomotive)Simulator.PlayerLocomotive; if (Locomotive == null) return; var train = Locomotive.Train; - if (train == null || train.TrainType == Train.TRAINTYPE.REMOTE) return;//no train or is remotely controlled + if (train == null ||train.TrainType == Train.TRAINTYPE.REMOTE) return;//no train or is remotely controlled //var spad = false; var maxSpeed = Math.Abs(train.AllowedMaxSpeedMpS) + 3;//allow some margin of error (about 10km/h) @@ -387,7 +387,7 @@ public static bool IsServer() public static bool IsClient() { if (!MPManager.IsMultiPlayer() || MPManager.IsServer()) return false; - return true; + return true; } //check if it is in the server mode && they are players && not allow autoswitch public static bool NoAutoSwitch() @@ -427,7 +427,7 @@ static public void Notify(string m) static public void SendToServer(string m) { - if (m != null && Client != null) Client.Send(m); + if (m!= null && Client != null) Client.Send(m); } //nicely shutdown listening threads, and notify the server/other player @@ -441,7 +441,7 @@ static public void Stop() } if (Server != null) { - Server.BroadCast((new MSGQuit("ServerHasToQuit\t" + GetUserName())).ToString()); //server notify everybody else + Server.BroadCast((new MSGQuit("ServerHasToQuit\t"+GetUserName())).ToString()); //server notify everybody else Thread.Sleep(1000); if (Server.ServerComm != null) Server.Stop(); if (Client != null) Client.Stop(); @@ -486,7 +486,7 @@ public void AddPlayer() MPManager.Instance().lastPlayerAddedTime = Simulator.GameTime; MPManager.Instance().lastSwitchTime = Simulator.GameTime; - MSGPlayer host = new MSGPlayer(MPManager.GetUserName(), "1234", Simulator.conFileName, Simulator.patFileName, Simulator.PlayerLocomotive.Train, + MSGPlayer host = new MSGPlayer(MPManager.GetUserName(), "1234", Simulator.conFileName, Simulator.patFileName, Simulator.PlayerLocomotive.Train, Simulator.PlayerLocomotive.Train.Number, Simulator.Settings.AvatarURL); MPManager.BroadCast(host.ToString() + MPManager.OnlineTrains.AddAllPlayerTrain()); foreach (Train t in Simulator.Trains) @@ -529,7 +529,7 @@ public static bool TrainOK2Couple(Simulator simulator, Train t1, Train t2) { foreach (var p in OnlineTrains.Players) { - if (p.Value.Train == t1 && simulator.GameTime - p.Value.CreatedTime < 120) { result = false; break; } + if (p.Value.Train == t1 && simulator.GameTime - p.Value.CreatedTime < 120) { result = false; break; } if (p.Value.Train == t2 && simulator.GameTime - p.Value.CreatedTime < 120) { result = false; break; } } } @@ -541,7 +541,7 @@ public static bool TrainOK2Couple(Simulator simulator, Train t1, Train t2) /// /// Return a string of information of how many players online and those users who are close /// - + SortedList users; public string GetOnlineUsersInfo() @@ -549,7 +549,7 @@ public string GetOnlineUsersInfo() string info = ""; if (Simulator.PlayerLocomotive.Train.TrainType == Train.TRAINTYPE.REMOTE) info = "Your locomotive is a helper\t"; - info += ("" + (OnlineTrains.Players.Count + 1) + (OnlineTrains.Players.Count <= 0 ? " player " : " players ")); + info += ("" + (OnlineTrains.Players.Count + 1)+ (OnlineTrains.Players.Count <= 0 ? " player " : " players ")); info += ("" + Simulator.Trains.Count + (Simulator.Trains.Count <= 1 ? " train" : " trains")); TrainCar mine = Simulator.PlayerLocomotive; users.Clear(); @@ -563,7 +563,7 @@ public string GetOnlineUsersInfo() if (p.Train == null) continue; if (p.Train.Cars.Count <= 0) continue; var d = WorldLocation.GetDistanceSquared(p.Train.RearTDBTraveller.WorldLocation, mine.Train.RearTDBTraveller.WorldLocation); - users.Add(Math.Sqrt(d) + MPManager.Random.NextDouble(), p.Username); + users.Add(Math.Sqrt(d)+MPManager.Random.NextDouble(), p.Username); } } catch (Exception) @@ -642,7 +642,7 @@ private void RemovePlayer() if (p == p1.Value) continue; if (p1.Value.Train == p.Train) { hasOtherPlayer = true; break; }//other player has the same train } - if (hasOtherPlayer == false) + if (hasOtherPlayer == false) { AddOrRemoveLocomotives(p.Username, p.Train, false); if (p.Train.Cars.Count > 0) @@ -726,7 +726,7 @@ public bool AddOrRemoveLocomotive(string userName, int tNumber, int trainCarPosi } } - public bool AddOrRemoveLocomotives(string userName, Train t, bool add) + public bool AddOrRemoveLocomotives (string userName, Train t, bool add) { for (int iCar = 0; iCar < t.Cars.Count; iCar++) { diff --git a/Source/Orts.Simulation/MultiPlayer/Message.cs b/Source/Orts.Simulation/MultiPlayer/Message.cs index e0c2af1d4c..36217015ec 100644 --- a/Source/Orts.Simulation/MultiPlayer/Message.cs +++ b/Source/Orts.Simulation/MultiPlayer/Message.cs @@ -18,14 +18,6 @@ // #define DEBUG_MULTIPLAYER // DEBUG flag for debug prints -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Globalization; -using System.IO; -using System.IO.Compression; -using System.Linq; -using Microsoft.Xna.Framework; using Orts.Common; using Orts.Formats.Msts; using Orts.Simulation; @@ -35,6 +27,14 @@ using Orts.Simulation.Signalling; using ORTS.Common; using ORTS.Scripting.Api; +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.IO; +using System.IO.Compression; +using System.Linq; using Event = Orts.Common.Event; namespace Orts.MultiPlayer @@ -85,7 +85,7 @@ public static Message Decode(string m) public virtual void HandleMsg() { System.Console.WriteLine("test"); return; } } - #region MSGMove +#region MSGMove public class MSGMove : Message { class MSGMoveItem @@ -172,7 +172,7 @@ public override string ToString() { string tmp = "MOVE "; if (items != null && items.Count > 0) - for (var i = 0; i < items.Count; i++) tmp += items[i].ToString() + " "; + for (var i = 0; i < items.Count; i++) tmp += items[i].ToString() + " "; return " " + tmp.Length + ": " + tmp; } @@ -217,11 +217,11 @@ public override void HandleMsg() if (t.TrainType == Train.TRAINTYPE.REMOTE) { var reverseTrav = false; - // Alternate way to check for train flip - // if (m.user.Contains("0xAI") && m.trackNodeIndex == t.RearTDBTraveller.TrackNodeIndex && m.tdbDir != (int)t.RearTDBTraveller.Direction) - // { - // reverseTrav = true; - // } +// Alternate way to check for train flip +// if (m.user.Contains("0xAI") && m.trackNodeIndex == t.RearTDBTraveller.TrackNodeIndex && m.tdbDir != (int)t.RearTDBTraveller.Direction) +// { +// reverseTrav = true; +// } t.ToDoUpdate(m.trackNodeIndex, m.TileX, m.TileZ, m.X, m.Z, m.travelled, m.speed, m.direction, m.tdbDir, m.Length, reverseTrav); break; } @@ -241,7 +241,7 @@ public override void HandleMsg() t.ToDoUpdate(m.trackNodeIndex, m.TileX, m.TileZ, m.X, m.Z, m.travelled, m.speed, m.direction, m.tdbDir, m.Length); // This is necessary as sometimes a train isn't in the Trains list MPManager.Instance().AddOrRemoveTrain(t, true); - // if (MPManager.IsServer()) MPManager.Instance().AddOrRemoveLocomotives(m.user, t, true); + // if (MPManager.IsServer()) MPManager.Instance().AddOrRemoveLocomotives(m.user, t, true); } } if (found == false) //I do not have the train, tell server to send it to me @@ -251,16 +251,16 @@ public override void HandleMsg() } } } - #endregion MSGMove +#endregion MSGMove - #region MSGRequired +#region MSGRequired public class MSGRequired : Message { } - #endregion +#endregion - #region MSGPlayer +#region MSGPlayer public class MSGPlayer : MSGRequired { public string user = ""; @@ -448,7 +448,7 @@ public override string ToString() for (var i = 0; i < cars.Length; i++) { var c = cars[i]; - var index = c.LastIndexOf("\\trains\\trainset\\", StringComparison.OrdinalIgnoreCase); + var index = c.LastIndexOf("\\trains\\trainset\\", StringComparison.OrdinalIgnoreCase); { c = c.Remove(0, index + 17); }//c: wagon path without folder name @@ -579,7 +579,7 @@ public override void HandleMsg() } } if (!identical) - { + { var carsCount = t.Cars.Count; t.Cars.RemoveRange(0, carsCount); for (int i = 0; i < cars.Length; i++) @@ -755,9 +755,9 @@ public void SendToPlayer(OnlinePlayer p, string msg) } - #endregion MSGPlayer +#endregion MSGPlayer - #region MSGPlayerTrainSw +#region MSGPlayerTrainSw public class MSGPlayerTrainSw : MSGRequired { public string user = ""; @@ -852,9 +852,9 @@ public override void HandleMsg() }*/ } - #endregion MSGPlayerTrainSw +#endregion MSGPlayerTrainSw - #region MGSwitch +#region MGSwitch public class MSGSwitch : Message { @@ -949,9 +949,9 @@ public static void SetSwitch(TrackNode switchNode, int desiredState) } } - #endregion MGSwitch +#endregion MGSwitch - #region MSGResetSignal +#region MSGResetSignal public class MSGResetSignal : Message { public string user; @@ -983,9 +983,9 @@ public override void HandleMsg() } } } - #endregion MSGResetSignal +#endregion MSGResetSignal - #region MSGOrgSwitch +#region MSGOrgSwitch public class MSGOrgSwitch : MSGRequired { SortedList SwitchState; @@ -1073,9 +1073,9 @@ public override string ToString() return " " + tmp.Length + ": " + tmp; } } - #endregion MSGOrgSwitch +#endregion MSGOrgSwitch - #region MSGSwitchStatus +#region MSGSwitchStatus public class MSGSwitchStatus : Message { static byte[] preState; @@ -1238,8 +1238,8 @@ public override string ToString() return " " + tmp.Length + ": " + tmp; } } - #endregion MSGSwitchStatus - #region MSGTrain +#endregion MSGSwitchStatus +#region MSGTrain //message to add new train from either a string (received message), or a Train (building a message) public class MSGTrain : Message { @@ -1447,14 +1447,14 @@ public override string ToString() tmp += "\"" + c + "\"" + " " + ids[i] + "\n" + flipped[i] + "\n" + lengths[i] + "\n" + fadiscretes[i] + "\t"; } - tmp += "\n" + name + "\t"; + tmp += "\n" + name + "\t"; return " " + tmp.Length + ": " + tmp; } } - #endregion MSGTrain +#endregion MSGTrain - #region MSGUpdateTrain +#region MSGUpdateTrain //message to add new train from either a string (received message), or a Train (building a message) public class MSGUpdateTrain : Message @@ -1722,9 +1722,9 @@ public override string ToString() } } - #endregion MSGUpdateTrain +#endregion MSGUpdateTrain - #region MSGRemoveTrain +#region MSGRemoveTrain //remove AI trains public class MSGRemoveTrain : Message { @@ -1777,9 +1777,9 @@ public override void HandleMsg() } - #endregion MSGRemoveTrain +#endregion MSGRemoveTrain - #region MSGServer +#region MSGServer public class MSGServer : MSGRequired { string user; //true: I am a server now, false, not @@ -1832,9 +1832,9 @@ public override void HandleMsg() } } } - #endregion MSGServer +#endregion MSGServer - #region MSGAlive +#region MSGAlive public class MSGAlive : Message { string user; @@ -1856,9 +1856,9 @@ public override void HandleMsg() //System.Console.WriteLine(this.ToString()); } } - #endregion MSGAlive +#endregion MSGAlive - #region MSGTrainMerge +#region MSGTrainMerge //message to add new train from either a string (received message), or a Train (building a message) public class MSGTrainMerge : Message { @@ -1904,9 +1904,9 @@ public override string ToString() return " " + tmp.Length + ": " + tmp; } } - #endregion MSGTrainMerge +#endregion MSGTrainMerge - #region MSGMessage +#region MSGMessage //warning, error or information from the server, a client receives Error will disconnect itself public class MSGMessage : MSGRequired { @@ -1993,9 +1993,9 @@ public override string ToString() } } - #endregion MSGMessage +#endregion MSGMessage - #region MSGControl +#region MSGControl //message to ask for the control of a train or confirm it public class MSGControl : Message { @@ -2078,9 +2078,9 @@ public override string ToString() } } - #endregion MSGControl +#endregion MSGControl - #region MSGLocoChange +#region MSGLocoChange //message to add new train from either a string (received message), or a Train (building a message) public class MSGLocoChange : Message { @@ -2138,9 +2138,9 @@ public override string ToString() } } - #endregion MSGLocoChange +#endregion MSGLocoChange - #region MSGEvent +#region MSGEvent public class MSGEvent : Message { public string user; @@ -2249,9 +2249,9 @@ public override void HandleMsg() } - #endregion MSGEvent +#endregion MSGEvent - #region MSGQuit +#region MSGQuit public class MSGQuit : Message { public string user; @@ -2324,10 +2324,10 @@ public override void HandleMsg() } - #endregion MSGQuit +#endregion MSGQuit - #region MSGLost +#region MSGLost public class MSGLost : Message { public string user; @@ -2380,9 +2380,9 @@ public override void HandleMsg() } - #endregion MSGLost +#endregion MSGLost - #region MSGGetTrain +#region MSGGetTrain public class MSGGetTrain : Message { public int num; @@ -2422,9 +2422,9 @@ public override void HandleMsg() } } - #endregion MSGGetTrain +#endregion MSGGetTrain - #region MSGUncouple +#region MSGUncouple public class MSGUncouple : Message { @@ -2856,10 +2856,10 @@ public override void HandleMsg() } } } - #endregion MSGUncouple - +#endregion MSGUncouple - #region MSGCouple + +#region MSGCouple public class MSGCouple : Message { string[] cars; @@ -3107,9 +3107,9 @@ public override void HandleMsg() } } } - #endregion MSGCouple +#endregion MSGCouple - #region MSGSignalStatus +#region MSGSignalStatus public class MSGSignalStatus : Message { static byte[] preState; @@ -3291,9 +3291,9 @@ public override string ToString() return " " + tmp.Length + ": " + tmp; } } - #endregion MSGSignalStatus +#endregion MSGSignalStatus - #region MSGLocoInfo +#region MSGLocoInfo public class MSGLocoInfo : Message { @@ -3411,9 +3411,9 @@ public override string ToString() return " " + tmp.Length + ": " + tmp; } } - #endregion MSGLocoInfo +#endregion MSGLocoInfo - #region MSGAvatar +#region MSGAvatar public class MSGAvatar : Message { public string user; @@ -3456,10 +3456,10 @@ public override void HandleMsg() } - #endregion MSGAvatar +#endregion MSGAvatar - #region MSGText +#region MSGText //message to add new train from either a string (received message), or a Train (building a message) public class MSGText : MSGRequired { @@ -3515,9 +3515,9 @@ public override string ToString() } } - #endregion MSGText +#endregion MSGText - #region MSGWeather +#region MSGWeather public class MSGWeather : Message { public int weather; @@ -3573,9 +3573,9 @@ public override void HandleMsg() } } - #endregion MSGWeather +#endregion MSGWeather - #region MSGAider +#region MSGAider public class MSGAider : Message { public string user; @@ -3619,9 +3619,9 @@ public override void HandleMsg() } - #endregion MSGAider +#endregion MSGAider - #region MSGSignalChange +#region MSGSignalChange public class MSGSignalChange : Message { int index; @@ -3683,9 +3683,9 @@ public override string ToString() return " " + tmp.Length + ": " + tmp; } } - #endregion MSGSignalChange +#endregion MSGSignalChange - #region MSGExhaust +#region MSGExhaust public class MSGExhaust : Message { class MSGExhaustItem @@ -3775,9 +3775,9 @@ public override void HandleMsg() } } } - #endregion MSGExhaust +#endregion MSGExhaust - #region MSGFlip +#region MSGFlip //message to indicate that a train has been flipped (reverse formation) // message contains data before flip public class MSGFlip : Message @@ -3941,7 +3941,7 @@ public MSGFlip(Train t, bool setMUParameters, int n) public override string ToString() { - string tmp = "FLIP " + TrainNum + " " + direction + " " + TileX + " " + TileZ + " " + X.ToString(CultureInfo.InvariantCulture) + " " + Z.ToString(CultureInfo.InvariantCulture) + " " + Travelled.ToString(CultureInfo.InvariantCulture) + " " + mDirection + " " + + string tmp = "FLIP " + TrainNum + " " + direction + " " + TileX + " " + TileZ + " " + X.ToString(CultureInfo.InvariantCulture) + " " + Z.ToString(CultureInfo.InvariantCulture) + " " + Travelled.ToString(CultureInfo.InvariantCulture) + " " + mDirection + " " + speed.ToString(CultureInfo.InvariantCulture) + " " + tni + " " + count + " " + tdir + " " + len.ToString(CultureInfo.InvariantCulture) + " " + reverseMU + " "; for (var i = 0; i < cars.Length; i++) { @@ -3958,9 +3958,9 @@ public override string ToString() } } - #endregion MSGFlip +#endregion MSGFlip - #region MSGMovingTbl +#region MSGMovingTbl public class MSGMovingTbl : Message { @@ -4059,5 +4059,5 @@ public override void HandleMsg() } } - #endregion MSGMovingTbl +#endregion MSGMovingTbl } diff --git a/Source/Orts.Simulation/MultiPlayer/OnlinePlayer.cs b/Source/Orts.Simulation/MultiPlayer/OnlinePlayer.cs index 2fede93928..14f94a8780 100644 --- a/Source/Orts.Simulation/MultiPlayer/OnlinePlayer.cs +++ b/Source/Orts.Simulation/MultiPlayer/OnlinePlayer.cs @@ -15,34 +15,34 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using Orts.Simulation.Physics; +using Orts.Simulation.RollingStocks; using System; using System.IO; using System.Net.Sockets; using System.Text; using System.Threading; -using Orts.Simulation.Physics; -using Orts.Simulation.RollingStocks; namespace Orts.MultiPlayer { public class OnlinePlayer - { - public Decoder decoder; - public OnlinePlayer(TcpClient t, Server s) { Client = t; Server = s; decoder = new Decoder(); CreatedTime = MPManager.Simulator.GameTime; url = "NA"; }// "http://trainsimchina.com/discuz/uc_server/avatar.php?uid=72965&size=middle"; } - public TcpClient Client; - public Server Server; - public string Username = ""; - public string LeadingLocomotiveID = ""; - public Train Train; - public string con; - public string path; //pat and consist files - public Thread thread; - public double CreatedTime; - private object lockObj = new object(); - public string url = ""; //avatar location - public double quitTime = -100f; - public enum Status { Valid, Quit, Removed }; - public Status status = Status.Valid;//is this player removed by the dispatcher + { + public Decoder decoder; + public OnlinePlayer(TcpClient t, Server s) { Client = t; Server = s; decoder = new Decoder(); CreatedTime = MPManager.Simulator.GameTime; url = "NA";}// "http://trainsimchina.com/discuz/uc_server/avatar.php?uid=72965&size=middle"; } + public TcpClient Client; + public Server Server; + public string Username = ""; + public string LeadingLocomotiveID = ""; + public Train Train; + public string con; + public string path; //pat and consist files + public Thread thread; + public double CreatedTime; + private object lockObj = new object(); + public string url = ""; //avatar location + public double quitTime = -100f; + public enum Status {Valid, Quit, Removed}; + public Status status = Status.Valid;//is this player removed by the dispatcher public bool protect = false; //when in true, will not force this player out, to protect the one that others uses the same name // Used to restore @@ -75,116 +75,116 @@ public OnlinePlayer(BinaryReader inf) } } - public void Send(string msg) - { - if (msg == null) return; - try - { - NetworkStream clientStream = Client.GetStream(); - - lock (lockObj)//lock the buffer in case two threads want to write at once - { - byte[] buffer = Encoding.Unicode.GetBytes(msg);//encoder.GetBytes(msg); - clientStream.Write(buffer, 0, buffer.Length); - clientStream.Flush(); - } - } - catch - { - } - } - - public void Receive(object client) - { - NetworkStream clientStream = Client.GetStream(); - - byte[] message = new byte[8192]; - int bytesRead; - int errorCount = 0; - double firstErrorTick = 0; - double nowTicks = 0; - - while (true) - { - - bytesRead = 0; - - try - { - //blocks until a client sends a message - bytesRead = clientStream.Read(message, 0, 8192); - } - catch - { - //a socket error has occured - break; - } - - if (bytesRead == 0) - { - //the client has disconnected from the server - break; - } - - //message has successfully been received - string info = ""; - try - { - decoder.PushMsg(Encoding.Unicode.GetString(message, 0, bytesRead));//encoder.GetString(message, 0, bytesRead)); - info = decoder.GetMsg(); - while (info != null) - { - //System.Console.WriteLine(info); - Message msg = Message.Decode(info); - if (msg is MSGPlayer) ((MSGPlayer)msg).HandleMsg(this); - else msg.HandleMsg(); - - info = decoder.GetMsg(); - } - } - catch (MultiPlayerError) - { - break; - } - catch (SameNameError) - { - Client.Close(); - thread.Abort(); - } - catch (Exception) - { - nowTicks = MPManager.Simulator.GameTime; - if (firstErrorTick == 0) - { - firstErrorTick = nowTicks; - errorCount = 1; - } - if (errorCount >= 5 && nowTicks - firstErrorTick < 10) //5 errors last 10 seconds - { - MSGMessage emsg = new MSGMessage(this.Username, "Error", "Too many errors received from you in a short period of time."); - MPManager.BroadCast(emsg.ToString()); - break; - } - else if (errorCount < 5) { errorCount++; } - else { firstErrorTick = nowTicks; errorCount = 0; } - //System.Console.WriteLine(e.Message + info); - } - } - - System.Console.WriteLine("{0} quit", this.Username); - if (MPManager.Simulator.Confirmer != null) MPManager.Simulator.Confirmer.Information(MPManager.Catalog.GetStringFmt("{0} quit.", this.Username)); - Client.Close(); - if (this.Train != null && this.status != Status.Removed) //remember the location of the train in case the player comes back later, if he is not removed by the dispatcher - { - if (!MPManager.Instance().lostPlayer.ContainsKey(this.Username)) MPManager.Instance().lostPlayer.Add(this.Username, this); - this.quitTime = MPManager.Simulator.GameTime; - this.Train.SpeedMpS = 0.0f; - this.status = Status.Quit; - } - MPManager.Instance().AddRemovedPlayer(this);//add this player to be removed - MPManager.BroadCast((new MSGQuit(this.Username)).ToString()); - thread.Abort(); - } + public void Send(string msg) + { + if (msg == null) return; + try + { + NetworkStream clientStream = Client.GetStream(); + + lock (lockObj)//lock the buffer in case two threads want to write at once + { + byte[] buffer = Encoding.Unicode.GetBytes(msg);//encoder.GetBytes(msg); + clientStream.Write(buffer, 0, buffer.Length); + clientStream.Flush(); + } + } + catch + { + } + } + + public void Receive(object client) + { + NetworkStream clientStream = Client.GetStream(); + + byte[] message = new byte[8192]; + int bytesRead; + int errorCount = 0; + double firstErrorTick = 0; + double nowTicks = 0; + + while (true) + { + + bytesRead = 0; + + try + { + //blocks until a client sends a message + bytesRead = clientStream.Read(message, 0, 8192); + } + catch + { + //a socket error has occured + break; + } + + if (bytesRead == 0) + { + //the client has disconnected from the server + break; + } + + //message has successfully been received + string info = ""; + try + { + decoder.PushMsg(Encoding.Unicode.GetString(message, 0, bytesRead));//encoder.GetString(message, 0, bytesRead)); + info = decoder.GetMsg(); + while (info != null) + { + //System.Console.WriteLine(info); + Message msg = Message.Decode(info); + if (msg is MSGPlayer) ((MSGPlayer)msg).HandleMsg(this); + else msg.HandleMsg(); + + info = decoder.GetMsg(); + } + } + catch (MultiPlayerError) + { + break; + } + catch (SameNameError) + { + Client.Close(); + thread.Abort(); + } + catch (Exception) + { + nowTicks = MPManager.Simulator.GameTime; + if (firstErrorTick == 0) + { + firstErrorTick = nowTicks; + errorCount = 1; + } + if (errorCount >= 5 && nowTicks - firstErrorTick < 10) //5 errors last 10 seconds + { + MSGMessage emsg = new MSGMessage(this.Username, "Error", "Too many errors received from you in a short period of time."); + MPManager.BroadCast(emsg.ToString()); + break; + } + else if (errorCount < 5) { errorCount++; } + else { firstErrorTick = nowTicks; errorCount = 0; } + //System.Console.WriteLine(e.Message + info); + } + } + + System.Console.WriteLine("{0} quit", this.Username); + if (MPManager.Simulator.Confirmer != null) MPManager.Simulator.Confirmer.Information(MPManager.Catalog.GetStringFmt("{0} quit.", this.Username)); + Client.Close(); + if (this.Train != null && this.status != Status.Removed) //remember the location of the train in case the player comes back later, if he is not removed by the dispatcher + { + if (!MPManager.Instance().lostPlayer.ContainsKey(this.Username)) MPManager.Instance().lostPlayer.Add(this.Username, this); + this.quitTime = MPManager.Simulator.GameTime; + this.Train.SpeedMpS = 0.0f; + this.status = Status.Quit; + } + MPManager.Instance().AddRemovedPlayer(this);//add this player to be removed + MPManager.BroadCast((new MSGQuit(this.Username)).ToString()); + thread.Abort(); + } public void Save(BinaryWriter outf) { @@ -201,13 +201,13 @@ public void Save(BinaryWriter outf) - /* - public TcpClient Client; - public Server Server; +/* + public TcpClient Client; + public Server Server; - public Thread thread; - private object lockObj = new object(); - public bool protect = false; //when in true, will not force this player out, to protect the one that others uses the same name*/ + public Thread thread; + private object lockObj = new object(); + public bool protect = false; //when in true, will not force this player out, to protect the one that others uses the same name*/ } - } + } } diff --git a/Source/Orts.Simulation/MultiPlayer/OnlineTrains.cs b/Source/Orts.Simulation/MultiPlayer/OnlineTrains.cs index fe15fe0bf6..7cb7d3bd86 100644 --- a/Source/Orts.Simulation/MultiPlayer/OnlineTrains.cs +++ b/Source/Orts.Simulation/MultiPlayer/OnlineTrains.cs @@ -15,16 +15,16 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; using Orts.Formats.Msts; using Orts.Simulation; using Orts.Simulation.AIs; using Orts.Simulation.Physics; using Orts.Simulation.RollingStocks; using ORTS.Scripting.Api; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; namespace Orts.MultiPlayer { @@ -338,10 +338,10 @@ public string ExhaustingLocos(MSGExhaust exhaust) Train t = MPManager.FindPlayerTrain(l.userName); if (t != null && l.trainCarPosition < t.Cars.Count && (Math.Abs(t.SpeedMpS) > 0.001 || Math.Abs(t.LastReportedSpeed) > 0)) { - if (t.Cars[l.trainCarPosition] is MSTSDieselLocomotive) - { - exhaust.AddNewItem(l.userName, t, l.trainCarPosition); - } + if (t.Cars[l.trainCarPosition] is MSTSDieselLocomotive) + { + exhaust.AddNewItem(l.userName, t, l.trainCarPosition); + } } } } @@ -350,7 +350,7 @@ public string ExhaustingLocos(MSGExhaust exhaust) } // Save - public void Save(BinaryWriter outf) + public void Save (BinaryWriter outf) { outf.Write(Players.Count); foreach (var onlinePlayer in Players.Values) @@ -360,7 +360,7 @@ public void Save(BinaryWriter outf) } // Restore - public void Restore(BinaryReader inf) + public void Restore (BinaryReader inf) { var onlinePlayersCount = inf.ReadInt32(); if (onlinePlayersCount > 0) diff --git a/Source/Orts.Simulation/MultiPlayer/Server.cs b/Source/Orts.Simulation/MultiPlayer/Server.cs index f14b325395..6fff56d00f 100644 --- a/Source/Orts.Simulation/MultiPlayer/Server.cs +++ b/Source/Orts.Simulation/MultiPlayer/Server.cs @@ -20,68 +20,69 @@ using System; using System.Collections.Generic; +using System.Diagnostics; namespace Orts.MultiPlayer { public class Server - { - public List Players; - public string UserName; - public string Code; - ClientComm Connection; - public ServerComm ServerComm; - public int ConnectionMode; + { + public List Players; + public string UserName; + public string Code; + ClientComm Connection; + public ServerComm ServerComm; + public int ConnectionMode; - public void Stop() - { - if (ServerComm != null) ServerComm.Stop(); - if (Connection != null) Connection.Stop(); - } - public Server(string s, ClientComm c) - { - Players = new List(); - string[] tmp = s.Split(' '); - UserName = tmp[0]; - Code = tmp[1]; - Connection = c; - ServerComm = null; - ConnectionMode = 0; - } + public void Stop() + { + if (ServerComm != null) ServerComm.Stop(); + if (Connection != null) Connection.Stop(); + } + public Server(string s, ClientComm c) + { + Players = new List(); + string[] tmp = s.Split(' '); + UserName = tmp[0]; + Code = tmp[1]; + Connection = c; + ServerComm = null; + ConnectionMode = 0; + } - public bool IsRemoteServer() - { - if (ConnectionMode == 0) return true; - else return false; - } - public Server(string s, int port) - { - Players = new List(); - string[] tmp = s.Split(' '); - UserName = tmp[0]; - Code = tmp[1]; + public bool IsRemoteServer() + { + if (ConnectionMode == 0) return true; + else return false; + } + public Server(string s, int port) + { + Players = new List(); + string[] tmp = s.Split(' '); + UserName = tmp[0]; + Code = tmp[1]; - ServerComm = new ServerComm(this, port); - Connection = null; - ConnectionMode = 1; - } - - public void BroadCast(string msg) - { + ServerComm = new ServerComm(this, port); + Connection = null; + ConnectionMode = 1; + } + + public void BroadCast(string msg) + { #if DEBUG_MULTIPLAYER Trace.TraceInformation("MPServerBroadcast: {0}", msg); #endif if (ServerComm == null) Connection.Send(msg); - else - { - try - { - foreach (OnlinePlayer p in Players) - { - p.Send(msg); - } - } - catch (Exception) { } - } - } - } + else + { + try + { + foreach (OnlinePlayer p in Players) + { + p.Send(msg); + } + } + catch (Exception) { } + } + } + } } diff --git a/Source/Orts.Simulation/MultiPlayer/ServerComm.cs b/Source/Orts.Simulation/MultiPlayer/ServerComm.cs index 6ab3294ecd..49f05d08a3 100644 --- a/Source/Orts.Simulation/MultiPlayer/ServerComm.cs +++ b/Source/Orts.Simulation/MultiPlayer/ServerComm.cs @@ -23,55 +23,55 @@ namespace Orts.MultiPlayer { public class ServerComm - { - private TcpListener tcpListener; - private Thread listenThread; - private Server Server; - private int count = 0; - public void Stop() - { - tcpListener.Stop(); - listenThread.Abort(); - foreach (OnlinePlayer p in Server.Players) - { - p.thread.Abort(); - } - } + { + private TcpListener tcpListener; + private Thread listenThread; + private Server Server; + private int count = 0; + public void Stop() + { + tcpListener.Stop(); + listenThread.Abort(); + foreach (OnlinePlayer p in Server.Players) + { + p.thread.Abort(); + } + } - public ServerComm(Server s, int port) - { - Server = s; - this.tcpListener = new TcpListener(IPAddress.Any, port); - this.listenThread = new Thread(new ThreadStart(ListenForClients)); + public ServerComm(Server s, int port) + { + Server = s; + this.tcpListener = new TcpListener(IPAddress.Any, port); + this.listenThread = new Thread(new ThreadStart(ListenForClients)); this.listenThread.Name = "Multiplayer Server"; - this.listenThread.Start(); - } + this.listenThread.Start(); + } - private void ListenForClients() - { - this.tcpListener.Start(); + private void ListenForClients() + { + this.tcpListener.Start(); - while (true) - { - TcpClient client = null; - try - { - //blocks until a client has connected to the server - client = this.tcpListener.AcceptTcpClient(); - } - catch (Exception) { break; } - count++; - OnlinePlayer player = new OnlinePlayer(client, Server); - Server.Players.Add(player); - System.Console.WriteLine("New Player Joined"); + while (true) + { + TcpClient client = null; + try + { + //blocks until a client has connected to the server + client = this.tcpListener.AcceptTcpClient(); + } + catch (Exception) { break; } + count++; + OnlinePlayer player = new OnlinePlayer(client, Server); + Server.Players.Add(player); + System.Console.WriteLine("New Player Joined"); - //create a thread to handle communication - //with connected client - Thread clientThread = new Thread(new ParameterizedThreadStart(player.Receive)); - clientThread.Name = "Multiplayer Server-Client";// +count; - player.thread = clientThread; - clientThread.Start(client); - } - } - } + //create a thread to handle communication + //with connected client + Thread clientThread = new Thread(new ParameterizedThreadStart(player.Receive)); + clientThread.Name = "Multiplayer Server-Client";// +count; + player.thread = clientThread; + clientThread.Start(client); + } + } + } } diff --git a/Source/Orts.Simulation/Simulation/AIs/AI.cs b/Source/Orts.Simulation/Simulation/AIs/AI.cs index 174ef6115b..6331fea0f4 100644 --- a/Source/Orts.Simulation/Simulation/AIs/AI.cs +++ b/Source/Orts.Simulation/Simulation/AIs/AI.cs @@ -30,18 +30,19 @@ // #define DEBUG_TRACEINFO // -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; using Orts.Formats.Msts; using Orts.MultiPlayer; using Orts.Simulation.Physics; using Orts.Simulation.RollingStocks; -using Orts.Simulation.RollingStocks.SubSystems; using Orts.Simulation.Timetables; +using Orts.Simulation.RollingStocks.SubSystems; +using Orts.Simulation.Signalling; using ORTS.Common; using ORTS.Scripting.Api; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; namespace Orts.Simulation.AIs { @@ -173,8 +174,7 @@ public AI(Simulator simulator, BinaryReader inf) } // timetable mode trains - else - { + else { TTTrain aiTrain = new TTTrain(Simulator, inf, this); if (aiTrain.TrainType != Train.TRAINTYPE.PLAYER) // add to AITrains except when it is player train { @@ -623,7 +623,7 @@ private void PrerunAI(int playerTrainOriginalTrain, TTTrain.FormCommand playerTr Trace.TraceInformation("Player train started on time"); TTTrain playerTTTrain = playerTrain as TTTrain; playerTTTrain.InitalizePlayerTrain(); - + clockTime = Simulator.ClockTime = playerTTTrain.StartTime.Value; } @@ -1372,7 +1372,7 @@ public void InsertTrain(AITrain thisTrain) Trace.TraceInformation("Train : " + thisTrain.Name + " : missing start time, train not included"); return; } - + if (this.Count == 0) { this.AddFirst(thisTrain); diff --git a/Source/Orts.Simulation/Simulation/AIs/AIAuxAction.cs b/Source/Orts.Simulation/Simulation/AIs/AIAuxAction.cs index 9f0faaee55..7ea6467178 100644 --- a/Source/Orts.Simulation/Simulation/AIs/AIAuxAction.cs +++ b/Source/Orts.Simulation/Simulation/AIs/AIAuxAction.cs @@ -21,10 +21,6 @@ * */ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; using Newtonsoft.Json; using Orts.Formats.Msts; using Orts.Formats.OR; @@ -33,6 +29,11 @@ using Orts.Simulation.RollingStocks.SubSystems.Controllers; using Orts.Simulation.Signalling; using ORTS.Common; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using Event = Orts.Common.Event; namespace Orts.Simulation.AIs { @@ -49,7 +50,7 @@ public class AuxActionsContainer : ActionContainer public Train.DistanceTravelledActions genRequiredActions = new Train.DistanceTravelledActions(); // distance travelled Generic action list for AITrain public Train.DistanceTravelledActions specRequiredActions = new Train.DistanceTravelledActions(); - Train ThisTrain; + Train ThisTrain; public AuxActionsContainer(Train thisTrain, ORRouteConfig orRouteConfig) { @@ -144,13 +145,13 @@ public void Save(BinaryWriter outf, int currentClock) if (ThisTrain is AITrain && ((aiTrain.MovementState == AITrain.AI_MOVEMENT_STATE.HANDLE_ACTION && aiTrain.nextActionInfo != null && aiTrain.nextActionInfo.NextAction == AIActionItem.AI_ACTION_TYPE.AUX_ACTION && aiTrain.nextActionInfo is AuxActionWPItem) - || (aiTrain.AuxActionsContain.SpecAuxActions.Count > 0 && + || ( aiTrain.AuxActionsContain.SpecAuxActions.Count > 0 && aiTrain.AuxActionsContain.SpecAuxActions[0] is AIActionWPRef && (aiTrain.AuxActionsContain.SpecAuxActions[0] as AIActionWPRef).keepIt != null && (aiTrain.AuxActionsContain.SpecAuxActions[0] as AIActionWPRef).keepIt.currentMvmtState == AITrain.AI_MOVEMENT_STATE.HANDLE_ACTION))) // WP is running { // Do nothing if it is an absolute WP - if (!(aiTrain.AuxActionsContain.SpecAuxActions.Count > 0 && aiTrain.AuxActionsContain.SpecAuxActions[0] is AIActionWPRef && + if (!(aiTrain.AuxActionsContain.SpecAuxActions.Count > 0 && aiTrain.AuxActionsContain.SpecAuxActions[0] is AIActionWPRef && (aiTrain.AuxActionsContain.SpecAuxActions[0] as AIActionWPRef).Delay >= 30000 && (aiTrain.AuxActionsContain.SpecAuxActions[0] as AIActionWPRef).Delay < 40000)) { int remainingDelay; @@ -186,7 +187,7 @@ public void Save(BinaryWriter outf, int currentClock) List> converted = new List>(); foreach (var action in actionContainer.GenAuxActions) { - if (action.Value.GetType() == typeof(AuxActionHorn)) + if (action.Value.GetType() == typeof(AuxActionHorn)) { AIActionHornRef horn = new AIActionHornRef(thisTrain, (AuxActionHorn)action.Value, 0); List> listInfo = horn.GetCallFunction(); @@ -216,7 +217,7 @@ public void Save(BinaryWriter outf, int currentClock) } protected List> SetGenAuxActions(AITrain thisTrain, ORRouteConfig orRouteConfig) // Add here the new Generic Action - { + { List> loaded = null; #if WITH_GEN_ACTION //AIActionSignalRef actionSignal = new AIActionSignalRef(thisTrain, 0f, 0f, 0, 0, 0, 0); @@ -330,7 +331,7 @@ public void ProcessGenAction(AITrain thisTrain, int presentTime, float elapsedCl List itemList = new List(); foreach (var action in genRequiredActions) { - AIActionItem actionItem = action as AIActionItem; + AIActionItem actionItem = action as AIActionItem; if (actionItem.RequiredDistance <= ThisTrain.DistanceTravelledM) { itemList.Add(actionItem); @@ -354,7 +355,7 @@ public AITrain.AI_MOVEMENT_STATE ProcessSpecAction(AITrain thisTrain, int presen { AIActionItem actionItem = action as AIActionItem; if (actionItem.RequiredDistance >= ThisTrain.DistanceTravelledM) - continue; + continue; if (actionItem is AuxActSigDelegate) { var actionRef = (actionItem as AuxActSigDelegate).ActionRef; @@ -414,7 +415,7 @@ public void RemoveAt(int posit) } set { - + } } @@ -440,7 +441,7 @@ public void SetAuxAction(Train thisTrain) AIAuxActionsRef thisAction; int specAuxActionsIndex = 0; bool requiredActionsInserted = false; - while (specAuxActionsIndex <= SpecAuxActions.Count - 1) + while (specAuxActionsIndex <= SpecAuxActions.Count-1) { while (SpecAuxActions.Count > 0) { @@ -544,7 +545,7 @@ public void ResetAuxAction(Train thisTrain) if (thisAction.SubrouteIndex != thisTrain.TCRoute.activeSubpath) return; thisAction.LinkedAuxAction = false; return; - } + } //================================================================================================// // @@ -570,7 +571,7 @@ public void MoveAuxAction(Train thisTrain) thisWPItem.ActivateDistanceM = thisTrain.PresentPosition[0].DistanceTravelledM - 5; thisAction.LinkedAuxAction = true; } - } + } thisAction.RequiredDistance = thisTrain.PresentPosition[0].TCOffset - 5; } } @@ -586,8 +587,8 @@ public void MoveAuxActionAfterReversal(Train thisTrain) return; AIAuxActionsRef thisAction; thisAction = (AIAuxActionsRef)SpecAuxActions[0]; - if (thisAction is AIActionWPRef && thisAction.SubrouteIndex == thisTrain.TCRoute.activeSubpath + 1 && thisAction.TCSectionIndex == thisTrain.PresentPosition[1].TCSectionIndex) - // Waiting point is just in the same section where the train is; move it under the train + if (thisAction is AIActionWPRef && thisAction.SubrouteIndex == thisTrain.TCRoute.activeSubpath+1 && thisAction.TCSectionIndex == thisTrain.PresentPosition[1].TCSectionIndex) + // Waiting point is just in the same section where the train is; move it under the train { int thisSectionIndex = thisTrain.PresentPosition[1].TCSectionIndex; TrackCircuitSection thisSection = thisTrain.signalRef.TrackCircuitList[thisSectionIndex]; @@ -885,7 +886,7 @@ public AIActionWPRef(Train thisTrain, float distance, float requiredSpeedMpS, in } public AIActionWPRef(Train thisTrain, BinaryReader inf) - : base(thisTrain, inf) + : base (thisTrain, inf) { Delay = inf.ReadInt32(); OriginalDelay = inf.ReadInt32(); @@ -1042,7 +1043,7 @@ public override float[] CalculateDistancesToNextAction(Train thisTrain, float pr else { activateDistanceTravelledM = thisTrain.PresentPosition[0].DistanceTravelledM + thisTrain.ValidRoute[0].GetDistanceAlongRoute(actionIndex0, leftInSectionM, actionRouteIndex, this.RequiredDistance, true, thisTrain.signalRef); - triggerDistanceM = activateDistanceTravelledM - Math.Min(this.RequiredDistance, 300); + triggerDistanceM = activateDistanceTravelledM - Math.Min(this.RequiredDistance, 300); if (activateDistanceTravelledM < thisTrain.PresentPosition[0].DistanceTravelledM && thisTrain.PresentPosition[0].DistanceTravelledM - activateDistanceTravelledM < thisTrain.Length) @@ -1062,7 +1063,7 @@ public override float[] CalculateDistancesToNextAction(Train thisTrain, float pr { List> listInfo = new List>(); - System.Type managed = typeof(SignalObject); + System.Type managed = typeof(SignalObject); KeyValuePair info = new KeyValuePair(managed, this); listInfo.Add(info); return listInfo; @@ -1157,7 +1158,7 @@ public override AIActionItem CheckGenActions(WorldLocation location, AITrain thi float minDist = Math.Min(Math.Abs(rearDist), frontDist); float[] distances = GetActivationDistances(thisTrain, location); - + #if WITH_PATH_DEBUG File.AppendAllText(@"C:\temp\checkpath.txt", "GenFunctions not yet defined for train:" + thisTrain.Number + " Activation Distance: " + distances[0] + " & train distance: " + (-minDist) + "\n"); @@ -1294,7 +1295,7 @@ public override AIActionItem CheckGenActions(WorldLocation location, AITrain thi if (Math.Abs(SpeedMps) <= Simulator.MaxStoppedMpS && (int)list[0] >= Delay) // We call the handler to generate an actionRef { newAction = Handler(thisTrain.SpeedMpS, (int)list[0]); - + Register(thisTrain.Number, location); #if WITH_PATH_DEBUG File.AppendAllText(@"C:\temp\checkpath.txt", "Caller registered for\n"); @@ -1434,8 +1435,8 @@ public AIActSigDelegateRef(Train thisTrain, float distance, float requiredSpeedM AssociatedWPAction = associatedWPAction; NextAction = AUX_ACTION.SIGNAL_DELEGATE; IsGeneric = true; - - brakeSection = distance; // Set to 1 later when applicable + + brakeSection = distance; // Set to 1 later when applicable } public AIActSigDelegateRef(Train thisTrain, BinaryReader inf) @@ -1491,7 +1492,7 @@ public override AIActionItem Handler(params object[] list) return null; AuxActSigDelegate info = new AuxActSigDelegate(this, AIActionItem.AI_ACTION_TYPE.AUX_ACTION); info.SetParam((float)list[0], (float)list[1], (float)list[2], (float)list[3]); - AssociatedItem = info; + AssociatedItem = info; return (AIActionItem)info; } @@ -1564,7 +1565,7 @@ public class AuxActionItem : AIActionItem public bool Triggered = false; public bool Processing = false; public AITrain.AI_MOVEMENT_STATE currentMvmtState = AITrain.AI_MOVEMENT_STATE.INIT_ACTION; - public SignalObject SignalReferenced { get { return ((AIAuxActionsRef)ActionRef).SignalReferenced; } set { } } + public SignalObject SignalReferenced { get { return ((AIAuxActionsRef)ActionRef).SignalReferenced; } set {} } //================================================================================================// /// @@ -1573,7 +1574,7 @@ public class AuxActionItem : AIActionItem /// public AuxActionItem(AuxActionRef thisItem, AI_ACTION_TYPE thisAction) : - base(null, thisAction) + base ( null, thisAction) { NextAction = AI_ACTION_TYPE.AUX_ACTION; ActionRef = thisItem; @@ -1757,7 +1758,7 @@ public override AITrain.AI_MOVEMENT_STATE InitAction(Train thisTrain, int presen } int correctedTime = presentTime; // If delay between 40000 and 60000 an uncoupling is performed and delay is returned with the two lowest digits of the original one - aiTrain.TestUncouple(ref Delay); + aiTrain.TestUncouple( ref Delay); // If delay between 30000 and 40000 it is considered an absolute delay in the form 3HHMM, where HH and MM are hour and minute where the delay ends thisTrain.TestAbsDelay(ref Delay, correctedTime); // If delay equal to 60001 it is considered as a command to unconditionally attach to the nearby train; @@ -1781,7 +1782,7 @@ public override AITrain.AI_MOVEMENT_STATE HandleAction(Train thisTrain, int pres { if (thisTrain.TrainType != Train.TRAINTYPE.AI_PLAYERDRIVEN) { - thisTrain.SpeedMpS = 0; + thisTrain.SpeedMpS = 0; } AITrain aiTrain = thisTrain as AITrain; @@ -1869,7 +1870,7 @@ public override AITrain.AI_MOVEMENT_STATE ProcessAction(Train thisTrain, int pre thisTrain.AuxActionsContain.Remove(this); -#if WITH_PATH_DEBUG + #if WITH_PATH_DEBUG else { File.AppendAllText(@"C:\temp\checkpath.txt", "AITRain " + thisTrain.Number + "! No more AuxActions...\n"); @@ -1880,7 +1881,7 @@ public override AITrain.AI_MOVEMENT_STATE ProcessAction(Train thisTrain, int pre AITrain aiTrain = thisTrain as AITrain; //movementState = thisTrain.UpdateStoppedState(); // Don't call UpdateStoppedState(), WP can't touch Signal - movementState = AITrain.AI_MOVEMENT_STATE.BRAKING; + movementState = AITrain.AI_MOVEMENT_STATE.BRAKING; aiTrain.ResetActions(true); #if WITH_PATH_DEBUG File.AppendAllText(@"C:\temp\checkpath.txt", "AITRain " + aiTrain.Number + " is " + movementState.ToString() + " at " + presentTime + "\n"); @@ -1888,7 +1889,7 @@ public override AITrain.AI_MOVEMENT_STATE ProcessAction(Train thisTrain, int pre } break; default: - break; + break; } if (ActionRef.IsGeneric) currentMvmtState = movementState; @@ -2626,7 +2627,7 @@ public override bool CanActivate(Train thisTrain, float SpeedMpS, bool reschedul if (!reschedule && ((AIActSigDelegateRef)ActionRef).IsAbsolute) { TrackCircuitSection thisSection = thisTrain.signalRef.TrackCircuitList[((AIActSigDelegateRef)ActionRef).TCSectionIndex]; - if (((thisSection.CircuitState.TrainReserved != null && thisSection.CircuitState.TrainReserved.Train == thisTrain) || thisSection.CircuitState.ThisTrainOccupying(thisTrain)) && + if (((thisSection.CircuitState.TrainReserved != null && thisSection.CircuitState.TrainReserved.Train == thisTrain) || thisSection.CircuitState.ThisTrainOccupying(thisTrain) ) && ((AIActSigDelegateRef)ActionRef).EndSignalIndex != -1) return true; } @@ -2688,7 +2689,7 @@ public override AITrain.AI_MOVEMENT_STATE HandleAction(Train thisTrain, int pres SignalReferenced.UnlockForTrain(thisTrain.Number, thisTrain.TCRoute.activeSubpath); else { - // locked = true; +// locked = true; Trace.TraceWarning("SignalObject trItem={0}, trackNode={1}, wasn't locked for train {2}.", SignalReferenced.trItem, SignalReferenced.trackNode, thisTrain.Number); } @@ -2729,10 +2730,10 @@ public override AITrain.AI_MOVEMENT_STATE HandleAction(Train thisTrain, int pres public override AITrain.AI_MOVEMENT_STATE ProcessAction(Train thisTrain, int presentTime, float elapsedClockSeconds, AITrain.AI_MOVEMENT_STATE movementState) { - movementState = base.ProcessAction(thisTrain, presentTime, elapsedClockSeconds, movementState); + movementState = base.ProcessAction(thisTrain, presentTime, elapsedClockSeconds, movementState); return movementState; } } - #endregion +#endregion } diff --git a/Source/Orts.Simulation/Simulation/AIs/AIPath.cs b/Source/Orts.Simulation/Simulation/AIs/AIPath.cs index 46bb44b084..96fdb86982 100644 --- a/Source/Orts.Simulation/Simulation/AIs/AIPath.cs +++ b/Source/Orts.Simulation/Simulation/AIs/AIPath.cs @@ -22,14 +22,14 @@ * Could this be used for player trains also? * */ +using Orts.Formats.Msts; +using Orts.Formats.OR; +using ORTS.Common; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; -using Orts.Formats.Msts; -using Orts.Formats.OR; -using ORTS.Common; namespace Orts.Simulation.AIs { @@ -88,7 +88,7 @@ public AIPath(TDBFile TDB, TSectionDatFile tsectiondat, string filePath) if (tpn.HasNextMainNode) { node.NextMainNode = Nodes[(int)tpn.nextMainNode]; - node.NextMainTVNIndex = node.FindTVNIndex(node.NextMainNode, TDB, tsectiondat, i == 0 ? -1 : Nodes[i - 1].NextMainTVNIndex); + node.NextMainTVNIndex = node.FindTVNIndex(node.NextMainNode, TDB, tsectiondat, i == 0 ? -1 : Nodes[i-1].NextMainTVNIndex ); if (node.JunctionIndex >= 0) node.IsFacingPoint = TestFacingPoint(node.JunctionIndex, node.NextMainTVNIndex); if (node.NextMainTVNIndex < 0) @@ -292,7 +292,7 @@ public AIPathNode(TrPathNode tpn, TrackPDP pdp, TrackDB trackDB, bool isTimetabl /// Constructor from other AIPathNode /// /// - + public AIPathNode(AIPathNode otherNode) { ID = otherNode.ID; @@ -348,34 +348,34 @@ private void InterpretPathNodeFlags(TrPathNode tpn, TrackPDP pdp, bool isTimetab } WaitTimeS = (int)((tpn.pathFlags >> 16) & 0xffff); // get the AAAA part. - // computations for absolute wait times are made within AITrain.cs - /* if (WaitTimeS >= 30000 && WaitTimeS < 40000) - { - // real wait time. - // waitTimeS (in decimal notation) = 3HHMM (hours and minuts) - int hour = (WaitTimeS / 100) % 100; - int minute = WaitTimeS % 100; - WaitUntil = 60 * (minute + 60 * hour); - WaitTimeS = 0; - }*/ + // computations for absolute wait times are made within AITrain.cs +/* if (WaitTimeS >= 30000 && WaitTimeS < 40000) + { + // real wait time. + // waitTimeS (in decimal notation) = 3HHMM (hours and minuts) + int hour = (WaitTimeS / 100) % 100; + int minute = WaitTimeS % 100; + WaitUntil = 60 * (minute + 60 * hour); + WaitTimeS = 0; + }*/ // computations are made within AITrain.cs - /* else if (WaitTimeS >= 40000 && WaitTimeS < 60000) - { - // Uncouple if a wait=stop point - // waitTimeS (in decimal notation) = 4NNSS (uncouple NN cars, wait SS seconds) - // or 5NNSS (uncouple NN cars, keep rear, wait SS seconds) - NCars = (WaitTimeS / 100) % 100; - if (WaitTimeS >= 50000) - NCars = -NCars; - WaitTimeS %= 100; - if (Type == AIPathNodeType.Stop) - Type = AIPathNodeType.Uncouple; - } - else if (WaitTimeS >= 60000) // this is old and should be removed/reused - { - // waitTimes = 6xSSS with waitTime SSS seconds. - WaitTimeS %= 1000; - } */ +/* else if (WaitTimeS >= 40000 && WaitTimeS < 60000) + { + // Uncouple if a wait=stop point + // waitTimeS (in decimal notation) = 4NNSS (uncouple NN cars, wait SS seconds) + // or 5NNSS (uncouple NN cars, keep rear, wait SS seconds) + NCars = (WaitTimeS / 100) % 100; + if (WaitTimeS >= 50000) + NCars = -NCars; + WaitTimeS %= 100; + if (Type == AIPathNodeType.Stop) + Type = AIPathNodeType.Uncouple; + } + else if (WaitTimeS >= 60000) // this is old and should be removed/reused + { + // waitTimes = 6xSSS with waitTime SSS seconds. + WaitTimeS %= 1000; + } */ } diff --git a/Source/Orts.Simulation/Simulation/AIs/AITrain.cs b/Source/Orts.Simulation/Simulation/AIs/AITrain.cs index 9d2ed63f04..145f9e7a07 100644 --- a/Source/Orts.Simulation/Simulation/AIs/AITrain.cs +++ b/Source/Orts.Simulation/Simulation/AIs/AITrain.cs @@ -251,7 +251,7 @@ public AITrain(Simulator simulator, BinaryReader inf, AI airef) UncondAttach = inf.ReadBoolean(); doorCloseAdvance = inf.ReadSingle(); doorOpenDelay = inf.ReadSingle(); - if (!Simulator.TimetableMode && doorOpenDelay <= 0 && doorCloseAdvance > 0 && Simulator.OpenDoorsInAITrains && + if ( !Simulator.TimetableMode && doorOpenDelay <= 0 && doorCloseAdvance > 0 && Simulator.OpenDoorsInAITrains && MovementState == AI_MOVEMENT_STATE.STATION_STOP && StationStops.Count > 0) { StationStop thisStation = StationStops[0]; @@ -472,7 +472,7 @@ public override bool PostInit() BuildStationList(activityClearingDistanceM); // This creates problems in push-pull paths - // StationStops.Sort(); +// StationStops.Sort(); if (!atStation && StationStops.Count > 0 && this != Simulator.Trains[0]) { if (MaxVelocityA > 0 && @@ -602,13 +602,13 @@ public override AI_MOVEMENT_STATE GetAIMovementState() return (ControlMode == TRAIN_CONTROL.INACTIVE ? AI_MOVEMENT_STATE.AI_STATIC : MovementState); } - + //================================================================================================// /// /// Get AI Movement State /// /// - private void RandomizeEfficiency(ref float efficiency) + private void RandomizeEfficiency (ref float efficiency) { efficiency *= 100; var incOrDecEfficiency = DateTime.Now.Millisecond % 2 == 0 ? true : false; @@ -991,8 +991,8 @@ public void AIUpdate(float elapsedClockSeconds, double clockTime, bool preUpdate countRequiredAction = requiredActions.Count; } #endif - // Trace.TraceWarning ("Time {0} Train no. {1} Speed {2} AllowedMaxSpeed {3} Throttle percent {4} Distance travelled {5} Movement State {6} BrakePerCent {7}", - // clockTime, Number, SpeedMpS, AllowedMaxSpeedMpS, AITrainThrottlePercent, DistanceTravelledM, MovementState, AITrainBrakePercent); + // Trace.TraceWarning ("Time {0} Train no. {1} Speed {2} AllowedMaxSpeed {3} Throttle percent {4} Distance travelled {5} Movement State {6} BrakePerCent {7}", + // clockTime, Number, SpeedMpS, AllowedMaxSpeedMpS, AITrainThrottlePercent, DistanceTravelledM, MovementState, AITrainBrakePercent); } //================================================================================================// @@ -1325,7 +1325,7 @@ public virtual void SetNextStationAction(bool fromAutopilotSwitch = false) while (!validStop) { float[] distancesM = CalculateDistancesToNextStation(thisStation, TrainMaxSpeedMpS, false); - if (distancesM[0] < 0f && !(MovementState == AI_MOVEMENT_STATE.STATION_STOP && distancesM[0] != -1)) // stop is not valid + if (distancesM[0] < 0f && !(MovementState == AI_MOVEMENT_STATE.STATION_STOP && distancesM[0] != -1)) // stop is not valid { StationStops.RemoveAt(0); @@ -2107,9 +2107,9 @@ public virtual void UpdateStationState(float elapsedClockSeconds, int presentTim else if (thisStation.ExitSignal >= 0 && NextSignalObject[0] != null && NextSignalObject[0].thisRef == thisStation.ExitSignal) { MstsSignalAspect nextAspect = GetNextSignalAspect(0); - if (nextAspect == MstsSignalAspect.STOP && !NextSignalObject[0].HasLockForTrain(Number, TCRoute.activeSubpath) && + if (nextAspect == MstsSignalAspect.STOP && !NextSignalObject[0].HasLockForTrain(Number, TCRoute.activeSubpath) && !(TCRoute.TCRouteSubpaths[TCRoute.activeSubpath].Count - 1 == PresentPosition[0].RouteListIndex && - TCRoute.TCRouteSubpaths.Count - 1 == TCRoute.activeSubpath)) + TCRoute.TCRouteSubpaths.Count -1 == TCRoute.activeSubpath)) { return; // do not depart if exit signal at danger } @@ -3030,14 +3030,14 @@ public virtual void UpdateAccelState(float elapsedClockSeconds) public virtual void UpdateFollowingState(float elapsedClockSeconds, int presentTime) { if (nextActionInfo != null && nextActionInfo.NextAction == AIActionItem.AI_ACTION_TYPE.TRAIN_AHEAD && nextActionInfo.ActivateDistanceM - PresentPosition[0].DistanceTravelledM < -5) - if (CheckTrain) - { - File.AppendAllText(@"C:\temp\checktrain.txt", - "Update Train Ahead - now at : " + - PresentPosition[0].TCSectionIndex.ToString() + " " + - PresentPosition[0].TCOffset.ToString() + - " ; speed : " + FormatStrings.FormatSpeed(SpeedMpS, true) + "\n"); - } + if (CheckTrain) + { + File.AppendAllText(@"C:\temp\checktrain.txt", + "Update Train Ahead - now at : " + + PresentPosition[0].TCSectionIndex.ToString() + " " + + PresentPosition[0].TCOffset.ToString() + + " ; speed : " + FormatStrings.FormatSpeed(SpeedMpS, true) + "\n"); + } if (ControlMode != TRAIN_CONTROL.AUTO_NODE || EndAuthorityType[0] != END_AUTHORITY.TRAIN_AHEAD) // train is gone { @@ -3131,8 +3131,8 @@ public virtual void UpdateFollowingState(float elapsedClockSeconds, int presentT if (OtherTrain.TrainType == TRAINTYPE.STATIC || (OtherTrain.PresentPosition[0].TCSectionIndex == TCRoute.TCRouteSubpaths[TCRoute.activeSubpath][TCRoute.TCRouteSubpaths[TCRoute.activeSubpath].Count - 1].TCSectionIndex || OtherTrain.PresentPosition[1].TCSectionIndex == - TCRoute.TCRouteSubpaths[TCRoute.activeSubpath][TCRoute.TCRouteSubpaths[TCRoute.activeSubpath].Count - 1].TCSectionIndex) && - (TCRoute.ReversalInfo[TCRoute.activeSubpath].Valid || TCRoute.activeSubpath == TCRoute.TCRouteSubpaths.Count - 1) + TCRoute.TCRouteSubpaths[TCRoute.activeSubpath][TCRoute.TCRouteSubpaths[TCRoute.activeSubpath].Count - 1].TCSectionIndex) && + (TCRoute.ReversalInfo[TCRoute.activeSubpath].Valid || TCRoute.activeSubpath == TCRoute.TCRouteSubpaths.Count - 1) || UncondAttach) { attachToTrain = true; @@ -3378,7 +3378,7 @@ public virtual void UpdateFollowingState(float elapsedClockSeconds, int presentT bool runningAgainst = false; if (PresentPosition[0].TCSectionIndex == OtherTrain.PresentPosition[0].TCSectionIndex && PresentPosition[0].TCDirection != OtherTrain.PresentPosition[0].TCDirection) runningAgainst = true; - if ((SpeedMpS > (OtherTrain.SpeedMpS + hysterisMpS) && !runningAgainst) || + if ((SpeedMpS > (OtherTrain.SpeedMpS + hysterisMpS) && !runningAgainst)|| SpeedMpS > (maxFollowSpeedMpS + hysterisMpS) || distanceToTrain < (keepDistanceTrainM - clearingDistanceM)) { @@ -3910,7 +3910,7 @@ public void BuildWaitingPointList(float clearingDistanceM) { endSectionFound = true; if (routeIndex < thisRoute.Count - 1) - endSignalIndex = thisSection.EndSignals[direction].thisRef; + endSignalIndex = thisSection.EndSignals[direction].thisRef; } // check if next section is junction @@ -3933,7 +3933,7 @@ public void BuildWaitingPointList(float clearingDistanceM) endSectionFound = true; lastIndex = nextIndex; if (lastIndex < thisRoute.Count - 1) - endSignalIndex = nextSection.EndSignals[direction].thisRef; + endSignalIndex = nextSection.EndSignals[direction].thisRef; } else if (nextSection.CircuitType != TrackCircuitSection.TrackCircuitType.Normal) { @@ -4055,7 +4055,7 @@ public void BuildWaitingPointList(float clearingDistanceM) { RandomizedWPDelay(ref randomizedDelay); } - action.SetDelay((randomizedDelay >= 30000 && randomizedDelay < 40000) ? randomizedDelay : 0); + action.SetDelay( (randomizedDelay >= 30000 && randomizedDelay < 40000)? randomizedDelay : 0); AuxActionsContain.Add(action); AIActSigDelegateRef delegateAction = new AIActSigDelegateRef(this, waitingPoint[5], 0f, waitingPoint[0], lastIndex, thisRoute[lastIndex].TCSectionIndex, direction, action); signalRef.SignalObjects[signalIndex[iWait]].LockForTrain(this.Number, waitingPoint[0]); @@ -4246,7 +4246,7 @@ public virtual void ProcessEndOfPathReached(ref bool[] returnValue, int PresentT MovementState = AI_MOVEMENT_STATE.FROZEN; } } - else + else { TrackCircuitSection thisSection = signalRef.TrackCircuitList[PresentPosition[1].TCSectionIndex]; if (TCRoute.ReversalInfo[TCRoute.activeSubpath - 1].Valid && PresentPosition[1].DistanceTravelledM < distanceThreshold && PresentPosition[1].TCOffset < 25) @@ -4260,7 +4260,7 @@ public virtual void ProcessEndOfPathReached(ref bool[] returnValue, int PresentT } } } - + if (removeIt) { if (IncorporatedTrainNo >= 0 && Simulator.TrainDictionary.Count > IncorporatedTrainNo && @@ -5839,7 +5839,7 @@ public void EndProcessAction(bool actionValid, AIActionItem thisItem, bool actio } StationStops[0].DistanceToTrainM = thisItem.ActiveItem.distance_to_train - 1; nextActionInfo.ActivateDistanceM = thisItem.ActivateDistanceM - 1; - } + } } // check if present action is signal and new action is station - if so, check actual position of signal in relation to stop @@ -5870,8 +5870,8 @@ public void EndProcessAction(bool actionValid, AIActionItem thisItem, bool actio if (!earlier && thisItem.NextAction == AIActionItem.AI_ACTION_TYPE.STATION_STOP && (nextActionInfo.NextAction == AIActionItem.AI_ACTION_TYPE.END_OF_ROUTE || nextActionInfo.NextAction == AIActionItem.AI_ACTION_TYPE.END_OF_AUTHORITY)) { - earlier = true; - nextActionInfo.ActivateDistanceM = thisItem.ActivateDistanceM + 1.0f; + earlier = true; + nextActionInfo.ActivateDistanceM = thisItem.ActivateDistanceM + 1.0f; } // if not earlier and is a waiting point and present action is signal stop : check if signal is locking signal, if so set waiting @@ -5992,8 +5992,8 @@ public void EndProcessAction(bool actionValid, AIActionItem thisItem, bool actio #endif - if (MovementState != AI_MOVEMENT_STATE.STATION_STOP && - MovementState != AI_MOVEMENT_STATE.STOPPED && + if (MovementState != AI_MOVEMENT_STATE.STATION_STOP && + MovementState != AI_MOVEMENT_STATE.STOPPED && MovementState != AI_MOVEMENT_STATE.HANDLE_ACTION && MovementState != AI_MOVEMENT_STATE.FOLLOWING && MovementState != AI_MOVEMENT_STATE.TURNTABLE && @@ -6626,7 +6626,7 @@ public override void CheckStationTask() { float distanceToNextSignal = -1; if (NextSignalObject[0] != null) distanceToNextSignal = NextSignalObject[0].DistanceTo(FrontTDBTraveller); - // check if signal ahead is cleared - if not, do not allow depart + // check if signal ahead is cleared - if not, do not allow depart if (NextSignalObject[0] != null && distanceToNextSignal >= 0 && distanceToNextSignal < 300 && NextSignalObject[0].this_sig_lr(MstsSignalFunction.NORMAL) == MstsSignalAspect.STOP && NextSignalObject[0].hasPermission != SignalObject.Permission.Granted) @@ -6658,7 +6658,7 @@ public override void CheckStationTask() if (Math.Abs(SpeedMpS) == 0.0f) { AtStation = IsAtPlatform(); - if (AtStation) + if (AtStation) { int presentTime = Convert.ToInt32(Math.Floor(Simulator.ClockTime)); StationStops[0].ActualArrival = presentTime; diff --git a/Source/Orts.Simulation/Simulation/Activity.cs b/Source/Orts.Simulation/Simulation/Activity.cs index 109dc71dbd..939b38216c 100644 --- a/Source/Orts.Simulation/Simulation/Activity.cs +++ b/Source/Orts.Simulation/Simulation/Activity.cs @@ -15,6 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using Microsoft.Xna.Framework; +using Orts.Formats.Msts; +using Orts.Simulation.AIs; +using Orts.Simulation.Physics; +using Orts.Simulation.Signalling; +using ORTS.Common; using System; using System.Collections.Generic; using System.Diagnostics; @@ -22,12 +28,6 @@ using System.IO; using System.Linq; using System.Text; -using Microsoft.Xna.Framework; -using Orts.Formats.Msts; -using Orts.Simulation.AIs; -using Orts.Simulation.Physics; -using Orts.Simulation.Signalling; -using ORTS.Common; using Event = Orts.Common.Event; namespace Orts.Simulation @@ -101,7 +101,7 @@ public Activity(ActivityFile actFile, Simulator simulator) foreach (var i in sd.Player_Traffic_Definition.Player_Traffic_List) { - if (i.PlatformStartID < Simulator.TDB.TrackDB.TrItemTable.Length && i.PlatformStartID >= 0 && + if (i.PlatformStartID < Simulator.TDB.TrackDB.TrItemTable.Length && i.PlatformStartID >= 0 && Simulator.TDB.TrackDB.TrItemTable[i.PlatformStartID] is PlatformItem) Platform = Simulator.TDB.TrackDB.TrItemTable[i.PlatformStartID] as PlatformItem; else @@ -519,18 +519,18 @@ public void AddRestrictZones(Tr_RouteFile routeFile, TrackSectionsFile tsectionD const float MaxDistanceOfWarningPost = 2000; for (int idxZone = 0; idxZone < zones.ActivityRestrictedSpeedZoneList.Count; idxZone++) - { - var worldPosition1 = new WorldPosition(); - newSpeedPostItems[0] = new TempSpeedPostItem(routeFile, + { + var worldPosition1 = new WorldPosition(); + newSpeedPostItems[0] = new TempSpeedPostItem(routeFile, zones.ActivityRestrictedSpeedZoneList[idxZone].StartPosition, true, worldPosition1, false); var worldPosition2 = new WorldPosition(); newSpeedPostItems[1] = new TempSpeedPostItem(routeFile, zones.ActivityRestrictedSpeedZoneList[idxZone].EndPosition, false, worldPosition2, false); - + // Add the speedposts to the track database. This will set the TrItemId's of all speedposts - trackDB.AddTrItems(newSpeedPostItems); + trackDB.AddTrItems(newSpeedPostItems); - // And now update the various (vector) tracknodes (this needs the TrItemIds. + // And now update the various (vector) tracknodes (this needs the TrItemIds. var endOffset = AddItemIdToTrackNode(ref zones.ActivityRestrictedSpeedZoneList[idxZone].EndPosition, tsectionDat, trackDB, newSpeedPostItems[1], out traveller); var startOffset = AddItemIdToTrackNode(ref zones.ActivityRestrictedSpeedZoneList[idxZone].StartPosition, @@ -554,15 +554,15 @@ public void AddRestrictZones(Tr_RouteFile routeFile, TrackSectionsFile tsectionD { FlipRestrSpeedPost((TempSpeedPostItem)speedWarningPostItem); } - ComputeTablePosition((TempSpeedPostItem)newSpeedPostItems[0]); + ComputeTablePosition((TempSpeedPostItem)newSpeedPostItems[0]); TempSpeedPostItems.Add((TempSpeedPostItem)newSpeedPostItems[0]); - ComputeTablePosition((TempSpeedPostItem)newSpeedPostItems[1]); + ComputeTablePosition((TempSpeedPostItem)newSpeedPostItems[1]); TempSpeedPostItems.Add((TempSpeedPostItem)newSpeedPostItems[1]); - ComputeTablePosition((TempSpeedPostItem)speedWarningPostItem); + ComputeTablePosition((TempSpeedPostItem)speedWarningPostItem); TempSpeedPostItems.Add((TempSpeedPostItem)speedWarningPostItem); } } - + /// /// Add a reference to a new TrItemId to the correct trackNode (which needs to be determined from the position) /// @@ -848,7 +848,7 @@ public override void NotifyEvent(ActivityEventType EventType) // The train is stopped. if (EventType == ActivityEventType.TrainStop) { - if (MyPlayerTrain.TrainType != Train.TRAINTYPE.AI_PLAYERHOSTING && IsAtStation(MyPlayerTrain) || + if (MyPlayerTrain.TrainType != Train.TRAINTYPE.AI_PLAYERHOSTING && IsAtStation(MyPlayerTrain) || MyPlayerTrain.TrainType == Train.TRAINTYPE.AI_PLAYERHOSTING && (MyPlayerTrain as AITrain).MovementState == AITrain.AI_MOVEMENT_STATE.STATION_STOP) { if (Simulator.TimetableMode || MyPlayerTrain.StationStops.Count == 0) @@ -889,7 +889,7 @@ public override void NotifyEvent(ActivityEventType EventType) } else { - // MSTS mode - player + // MSTS mode - player if (Simulator.GameTime < 2) { // If the simulation starts with a scheduled arrive in the past, assume the train arrived on time. @@ -900,30 +900,30 @@ public override void NotifyEvent(ActivityEventType EventType) } BoardingS = (double)MyPlayerTrain.StationStops[0].ComputeStationBoardingTime(Simulator.PlayerLocomotive.Train); if (BoardingS > 0 || ((double)(SchDepart - SchArrive).TotalSeconds > 0 && - MyPlayerTrain.PassengerCarsNumber == 1 && MyPlayerTrain.Cars.Count > 10)) + MyPlayerTrain.PassengerCarsNumber == 1 && MyPlayerTrain.Cars.Count > 10 )) { - // accepted station stop because either freight train or passenger train or fake passenger train with passenger car on platform or fake passenger train + // accepted station stop because either freight train or passenger train or fake passenger train with passenger car on platform or fake passenger train // with Scheduled Depart > Scheduled Arrive - // ActArrive is usually same as ClockTime - BoardingEndS = Simulator.ClockTime + BoardingS; + // ActArrive is usually same as ClockTime + BoardingEndS = Simulator.ClockTime + BoardingS; - if (ActArrive == null) - { - ActArrive = new DateTime().Add(TimeSpan.FromSeconds(Simulator.ClockTime)); - } + if (ActArrive == null) + { + ActArrive = new DateTime().Add(TimeSpan.FromSeconds(Simulator.ClockTime)); + } - arrived = true; - // But not if game starts after scheduled arrival. In which case actual arrival is assumed to be same as schedule arrival. - double sinceActArriveS = (new DateTime().Add(TimeSpan.FromSeconds(Simulator.ClockTime)) - - ActArrive).Value.TotalSeconds; - BoardingEndS -= sinceActArriveS; - double SchDepartS = SchDepart.Subtract(new DateTime()).TotalSeconds; - BoardingEndS = CompareTimes.LatestTime((int)SchDepartS, (int)BoardingEndS); + arrived = true; + // But not if game starts after scheduled arrival. In which case actual arrival is assumed to be same as schedule arrival. + double sinceActArriveS = (new DateTime().Add(TimeSpan.FromSeconds(Simulator.ClockTime)) + - ActArrive).Value.TotalSeconds; + BoardingEndS -= sinceActArriveS; + double SchDepartS = SchDepart.Subtract(new DateTime()).TotalSeconds; + BoardingEndS = CompareTimes.LatestTime((int)SchDepartS, (int)BoardingEndS); + } } - } - if (MyPlayerTrain.NextSignalObject[0] != null) - distanceToNextSignal = MyPlayerTrain.NextSignalObject[0].DistanceTo(MyPlayerTrain.FrontTDBTraveller); + if (MyPlayerTrain.NextSignalObject[0] != null) + distanceToNextSignal = MyPlayerTrain.NextSignalObject[0].DistanceTo(MyPlayerTrain.FrontTDBTraveller); } } @@ -937,7 +937,7 @@ public override void NotifyEvent(ActivityEventType EventType) // Completeness depends on the elapsed waiting time IsCompleted = maydepart; if (MyPlayerTrain.TrainType != Train.TRAINTYPE.AI_PLAYERHOSTING) - MyPlayerTrain.ClearStation(PlatformEnd1.LinkedPlatformItemId, PlatformEnd2.LinkedPlatformItemId, true); + MyPlayerTrain.ClearStation(PlatformEnd1.LinkedPlatformItemId, PlatformEnd2.LinkedPlatformItemId, true); if (LogStationStops) { @@ -997,7 +997,7 @@ public override void NotifyEvent(ActivityEventType EventType) else if (!maydepart) { // check if signal ahead is cleared - if not, do not allow depart - if (distanceToNextSignal >= 0 && distanceToNextSignal < 300 && MyPlayerTrain.NextSignalObject[0] != null && + if (distanceToNextSignal >= 0 && distanceToNextSignal< 300 && MyPlayerTrain.NextSignalObject[0] != null && MyPlayerTrain.NextSignalObject[0].this_sig_lr(MstsSignalFunction.NORMAL) == MstsSignalAspect.STOP && MyPlayerTrain.NextSignalObject[0].hasPermission != SignalObject.Permission.Granted) { @@ -1256,7 +1256,7 @@ public Boolean IsActivityEnded(Activity activity) } return false; } - + } public class EventCategoryActionWrapper : EventWrapper @@ -1399,11 +1399,11 @@ private Train matchesConsistNoOrder(List wagonIdList) if (trainItem.Cars.Count - nCars == (wagonIdList.Count == nWagonListCars ? wagonIdList.Count : nWagonListCars)) { if (excludesWagons(trainItem, wagonIdList)) listsMatch = false;//all wagons dropped - + if (listsMatch) return trainItem; - + } - + } return null; } diff --git a/Source/Orts.Simulation/Simulation/Confirmer.cs b/Source/Orts.Simulation/Simulation/Confirmer.cs index d5d316e203..406eaafdd0 100644 --- a/Source/Orts.Simulation/Simulation/Confirmer.cs +++ b/Source/Orts.Simulation/Simulation/Confirmer.cs @@ -15,9 +15,9 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using ORTS.Common; using System; using System.Diagnostics; -using ORTS.Common; namespace Orts.Simulation { @@ -27,12 +27,11 @@ public enum ConfirmLevel [GetString("Information")] Information, [GetString("Warning")] Warning, [GetString("Error")] Error, - [GetString("MSG")] MSG, + [GetString("MSG")] MSG, }; // Some of these are not cab controls or even controls. However they all make good use of structured text. - public enum CabControl - { + public enum CabControl { None // Power , Reverser @@ -123,8 +122,7 @@ public enum CabControl , CabRadio } - public enum CabSetting - { + public enum CabSetting { Name // name of control , Off // 2 or 3 state control/reset/initialise , Neutral // 2 or 3 state control @@ -164,7 +162,7 @@ public class Confirmer // be replaced with French and other languages. // // control, off/reset/initialize, neutral, on/apply/switch, decrease, increase, warn - readonly string[][] ConfirmText; + readonly string[][] ConfirmText; readonly Simulator Simulator; readonly double DefaultDurationS; @@ -184,12 +182,12 @@ public Confirmer(Simulator simulator, double defaultDurationS) ConfirmText = new string[][] { new string [] { GetString("") } // Power - , new string [] { GetParticularString("NonSteam", "Reverser"), GetString("reverse"), GetString("neutral"), GetString("forward"), null, null, GetString("locked. Close throttle, stop train then re-try.") } - , new string [] { GetString("Throttle"), null, null, null, GetString("close"), GetString("open"), GetString("locked. Release dynamic brake then re-try.") } + , new string [] { GetParticularString("NonSteam", "Reverser"), GetString("reverse"), GetString("neutral"), GetString("forward"), null, null, GetString("locked. Close throttle, stop train then re-try.") } + , new string [] { GetString("Throttle"), null, null, null, GetString("close"), GetString("open"), GetString("locked. Release dynamic brake then re-try.") } , new string [] { GetString("Wheel-slip"), GetString("over"), null, GetString("occurring. Tractive power greatly reduced."), null, null, GetString("warning") } // Electric power , new string [] { GetString("Power"), GetString("off"), null, GetString("on") } - , new string [] { GetString("Pantograph 1"), GetString("lower"), null, GetString("raise") } + , new string [] { GetString("Pantograph 1"), GetString("lower"), null, GetString("raise") } , new string [] { GetString("Pantograph 2"), GetString("lower"), null, GetString("raise") } , new string [] { GetString("Pantograph 3"), GetString("lower"), null, GetString("raise") } , new string [] { GetString("Pantograph 4"), GetString("lower"), null, GetString("raise") } @@ -203,50 +201,50 @@ public Confirmer(Simulator simulator, double defaultDurationS) , new string [] { GetString("Boiler Water Tank"), null, null, GetString("re-fueled"), null, GetString("level") } , new string [] { GetString("Traction cut-off relay"), GetString("open"), null, GetString("close") } // Steam power - , new string [] { GetParticularString("Steam", "Reverser"), GetString("reverse"), GetString("neutral"), GetString("forward"), null, null, GetString("locked. Close throttle, stop train then re-try.") } + , new string [] { GetParticularString("Steam", "Reverser"), GetString("reverse"), GetString("neutral"), GetString("forward"), null, null, GetString("locked. Close throttle, stop train then re-try.") } , new string [] { GetString("Regulator"), null, null, null, GetString("close"), GetString("open") } // Throttle for steam locomotives - , new string [] { GetString("Injector 1"), GetString("off"), null, GetString("on"), GetString("close"), GetString("open") } + , new string [] { GetString("Injector 1"), GetString("off"), null, GetString("on"), GetString("close"), GetString("open") } , new string [] { GetString("Injector 2"), GetString("off"), null, GetString("on"), GetString("close"), GetString("open") } , new string [] { GetString("Blowdown Valve"), GetString("close"), null, GetString("open") } - , new string [] { GetString("Blower"), null, null, null, GetString("decrease"), GetString("increase") } - , new string [] { GetString("SteamHeat"), null, null, null, GetString("decrease"), GetString("increase") } - , new string [] { GetString("Damper"), null, null, null, GetString("close"), GetString("open") } + , new string [] { GetString("Blower"), null, null, null, GetString("decrease"), GetString("increase") } + , new string [] { GetString("SteamHeat"), null, null, null, GetString("decrease"), GetString("increase") } + , new string [] { GetString("Damper"), null, null, null, GetString("close"), GetString("open") } , new string [] { GetString("Firebox Door"), null, null, null, GetString("close"), GetString("open") } - , new string [] { GetString("Firing Rate"), null, null, null, GetString("decrease"), GetString("increase") } - , new string [] { GetString("Manual Firing"), GetString("off"), null, GetString("on") } - , new string [] { GetString("Fire"), null, null, GetString("add shovel-full") } - , new string [] { GetString("Cylinder Cocks"), GetString("close"), null, GetString("open") } + , new string [] { GetString("Firing Rate"), null, null, null, GetString("decrease"), GetString("increase") } + , new string [] { GetString("Manual Firing"), GetString("off"), null, GetString("on") } + , new string [] { GetString("Fire"), null, null, GetString("add shovel-full") } + , new string [] { GetString("Cylinder Cocks"), GetString("close"), null, GetString("open") } , new string [] { GetString("Cylinder Compound"), GetString("close"), null, GetString("open") } , new string [] { GetString("LargeEjector"), null, null, null, GetString("decrease"), GetString("increase") } , new string [] { GetString("SmallEjector"), null, null, null, GetString("decrease"), GetString("increase") } , new string [] { GetString("VacuumExhauster"), GetString("normal"), null, GetString("fast") } - , new string [] { GetString("Tender"), null, null, GetString("Coal re-filled"), null, GetString("Coal level") } + , new string [] { GetString("Tender"), null, null, GetString("Coal re-filled"), null, GetString("Coal level") } , new string [] { GetString("Tender"), null, null, GetString("Water re-filled"), null, GetString("Water level") } // General , new string [] { GetString("Water Scoop"), GetString("up"), null, GetString("down") } // Braking - , new string [] { GetString("Train Brake"), null, null, null, GetString("release"), GetString("apply") } + , new string [] { GetString("Train Brake"), null, null, null, GetString("release"), GetString("apply") } , new string [] { GetString("Engine Brake"), null, null, null, GetString("release"), GetString("apply") } , new string [] { GetString("Brakeman Brake"), null, null, null, GetString("release"), GetString("apply") } , new string [] { GetString("Dynamic Brake"), GetString("off"), null, GetString("setup"), GetString("decrease"), GetString("increase") } - , new string [] { GetString("Emergency Brake"), GetString("release"), null, GetString("apply") } - , new string [] { GetString("Bail Off"), GetString("disengage"), null, GetString("engage") } - , new string [] { GetString("Brakes"), GetString("initialize"), null, null, null, null, GetString("cannot initialize. Stop train then re-try.") } - , new string [] { GetString("Handbrake"), GetString("none"), null, GetString("full") } - , new string [] { GetString("Retainers"), GetString("off"), null, GetString("on"), null, null, null, null, GetString("Exhaust"), GetString("High Pressure"), GetString("Low Pressure"), GetString("Slow Direct") } + , new string [] { GetString("Emergency Brake"), GetString("release"), null, GetString("apply") } + , new string [] { GetString("Bail Off"), GetString("disengage"), null, GetString("engage") } + , new string [] { GetString("Brakes"), GetString("initialize"), null, null, null, null, GetString("cannot initialize. Stop train then re-try.") } + , new string [] { GetString("Handbrake"), GetString("none"), null, GetString("full") } + , new string [] { GetString("Retainers"), GetString("off"), null, GetString("on"), null, null, null, null, GetString("Exhaust"), GetString("High Pressure"), GetString("Low Pressure"), GetString("Slow Direct") } , new string [] { GetString("Brake Hose"), GetString("disconnect"), null, GetString("connect") } , new string [] { GetString("Quick Release"), GetString("off"), null, GetString("on") } , new string [] { GetString("Overcharge"), GetString("off"), null, GetString("on") } // Cab Devices - , new string [] { GetString("Sander"), GetString("off"), null, GetString("on") } - , new string [] { GetString("Alerter"), GetString("acknowledge"), null, GetParticularString("Alerter", "sound") } - , new string [] { GetString("Horn"), GetString("off"), null, GetParticularString("Horn", "sound") } + , new string [] { GetString("Sander"), GetString("off"), null, GetString("on") } + , new string [] { GetString("Alerter"), GetString("acknowledge"), null, GetParticularString("Alerter", "sound") } + , new string [] { GetString("Horn"), GetString("off"), null, GetParticularString("Horn", "sound") } , new string [] { GetString("Whistle"), GetString("off"), null, GetString("blow") } // Horn for steam locomotives - , new string [] { GetString("Bell"), GetString("off"), null, GetString("ring") } - , new string [] { GetString("Headlight"), GetString("off"), GetString("dim"), GetString("bright") } - , new string [] { GetString("Cab Light"), GetString("off"), null, GetString("on") } - , new string [] { GetString("Wipers"), GetString("off"), null, GetString("on") } - , new string [] { GetString("Cab"), null, null, GetParticularString("Cab", "change"), null, null, GetString("changing is not available"), GetString("changing disabled. Close throttle, set reverser to neutral, stop train then re-try.") } + , new string [] { GetString("Bell"), GetString("off"), null, GetString("ring") } + , new string [] { GetString("Headlight"), GetString("off"), GetString("dim"), GetString("bright") } + , new string [] { GetString("Cab Light"), GetString("off"), null, GetString("on") } + , new string [] { GetString("Wipers"), GetString("off"), null, GetString("on") } + , new string [] { GetString("Cab"), null, null, GetParticularString("Cab", "change"), null, null, GetString("changing is not available"), GetString("changing disabled. Close throttle, set reverser to neutral, stop train then re-try.") } , new string [] { GetString("Odometer"), null, null, GetParticularString("Odometer", "reset"), GetParticularString("Odometer", "counting down"), GetParticularString("Odometer", "counting up") } , new string [] { GetString("Battery"), GetString("off"), null, GetString("on") } , new string [] { GetString("Master key"), GetString("off"), null, GetString("on") } @@ -254,18 +252,18 @@ public Confirmer(Simulator simulator, double defaultDurationS) , new string [] { GetString("Max acceleration"), null, null, null } , new string [] { GetString("Restricted speed zone"), GetString("off"), null, GetString("on") } // Train Devices - , new string [] { GetString("Doors Left"), GetString("close"), null, GetString("open") } - , new string [] { GetString("Doors Right"), GetString("close"), null, GetString("open") } + , new string [] { GetString("Doors Left"), GetString("close"), null, GetString("open") } + , new string [] { GetString("Doors Right"), GetString("close"), null, GetString("open") } , new string [] { GetString("Mirror"), GetString("retract"), null, GetString("extend") } // Track Devices - , new string [] { GetString("Switch Ahead"), null, null, GetParticularString("Switch", "change"), null, null, GetString("locked. Use Control+M to change signals to manual mode then re-try.") } + , new string [] { GetString("Switch Ahead"), null, null, GetParticularString("Switch", "change"), null, null, GetString("locked. Use Control+M to change signals to manual mode then re-try.") } , new string [] { GetString("Switch Behind"), null, null, GetParticularString("Switch", "change"), null, null, GetString("locked. Use Control+M to change signals to manual mode then re-try.") } // Simulation - , new string [] { GetString("Simulation Speed"), GetString("reset"), null, null, GetString("decrease"), GetString("increase") } - , new string [] { GetString("Uncouple After") } - , new string [] { GetString("Activity"), GetString("quit"), null, GetString("resume") } - , new string [] { GetString("Replay"), null, null, null, null, null, GetString("Overriding camera replay. Press Escape to resume camera replay.") } - , new string [] { GetString("Gearbox"), null, null, null, GetString("down"), GetString("up"), GetString("locked. Use shaft before changing gear.") } + , new string [] { GetString("Simulation Speed"), GetString("reset"), null, null, GetString("decrease"), GetString("increase") } + , new string [] { GetString("Uncouple After") } + , new string [] { GetString("Activity"), GetString("quit"), null, GetString("resume") } + , new string [] { GetString("Replay"), null, null, null, null, null, GetString("Overriding camera replay. Press Escape to resume camera replay.") } + , new string [] { GetString("Gearbox"), null, null, null, GetString("down"), GetString("up"), GetString("locked. Use shaft before changing gear.") } , new string [] { GetString("Signal mode"), GetString("manual"), null, GetString("auto"), null, null, GetString("locked. Stop train, then re-try.") } // Freight Load , new string [] { GetString("Wagon"), GetString("Wagon fully unloaded"), null, GetString("Wagon fully loaded"), null, GetString("Freight load") } @@ -283,8 +281,7 @@ public void Confirm(CabControl control, string text) Message(control, Simulator.Catalog.GetString("{0} {1}"), ConfirmText[(int)control][0], text); } - public void Confirm(CabControl control, CabSetting setting) - { + public void Confirm( CabControl control, CabSetting setting ) { Message(control, Simulator.Catalog.GetString("{0}"), ConfirmText[(int)control][(int)setting]); } @@ -353,11 +350,11 @@ public void Information(string message) Message(CabControl.None, ConfirmLevel.Information, message); } - public void MSG(string message) - { - Message(CabControl.None, ConfirmLevel.MSG, message); - } - + public void MSG(string message) + { + Message(CabControl.None, ConfirmLevel.MSG, message); + } + public void Warning(string message) { Message(CabControl.None, ConfirmLevel.Warning, message); @@ -412,19 +409,19 @@ void Message(CabControl control, ConfirmLevel level, string message) format = "{1} - " + format; // message displays longer if more severe - var duration = DefaultDurationS; - if (level >= ConfirmLevel.Warning) duration *= 2; - if (level >= ConfirmLevel.MSG) duration *= 5; + var duration = DefaultDurationS; + if (level >= ConfirmLevel.Warning) duration *= 2; + if (level >= ConfirmLevel.MSG) duration *= 5; if (DisplayMessage != null) DisplayMessage( - this, + this, new DisplayMessageEventArgs( - key: String.Format("{0}/{1}", control, level), + key: String.Format("{0}/{1}", control, level), text: String.Format( - format, - ConfirmText[(int)control][0], - Simulator.Catalog.GetString(GetStringAttribute.GetPrettyName(level)), message), + format, + ConfirmText[(int)control][0], + Simulator.Catalog.GetString(GetStringAttribute.GetPrettyName(level)), message), duration)); } } diff --git a/Source/Orts.Simulation/Simulation/Container.cs b/Source/Orts.Simulation/Simulation/Container.cs index cd2ccef000..fa12293604 100644 --- a/Source/Orts.Simulation/Simulation/Container.cs +++ b/Source/Orts.Simulation/Simulation/Container.cs @@ -17,19 +17,20 @@ // This file is the responsibility of the 3D & Environment Team. -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; using Microsoft.Xna.Framework; -using Orts.Common; using Orts.Formats.Msts; using Orts.Formats.OR; +using Orts.Parsers.Msts; using Orts.Simulation.RollingStocks; using Orts.Simulation.RollingStocks.SubSystems; +using Orts.Common; using ORTS.Common; using ORTS.Scripting.Api; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; namespace Orts.Simulation { @@ -68,7 +69,7 @@ public enum Status public float EmptyMassKG; public float MaxMassWhenLoadedKG; public float WidthM = 2.44f; - public float LengthM = 12.19f; + public float LengthM = 12.19f; public float HeightM = 2.59f; public ContainerType ContainerType = ContainerType.C40ft; public bool Flipped = false; @@ -102,7 +103,7 @@ public Container(FreightAnimationDiscrete freightAnimDiscreteCopy, FreightAnimat RelativeContainerMatrix = Matrix.Multiply(WorldPosition.XNAMatrix, invWagonMatrix); } - public Container(MSTSWagon wagon, string loadFilePath, ContainerHandlingItem containerStation = null) + public Container (MSTSWagon wagon, string loadFilePath, ContainerHandlingItem containerStation = null) { Wagon = wagon; ContainerStation = containerStation; @@ -149,8 +150,8 @@ public Container(BinaryReader inf, FreightAnimationDiscrete freightAnimDiscrete, var totalOffset = containerStation.StackLocations[stackLocationIndex].Position - mstsOffset; totalOffset.Z += LengthM * (containerStation.StackLocations[stackLocationIndex].Flipped ? -1 : 1) / 2; if (containersCount != 0) - for (var iPos = containersCount - 1; iPos >= 0; iPos--) - totalOffset.Y += containerStation.StackLocations[stackLocationIndex].Containers[iPos].HeightM; + for (var iPos = containersCount - 1; iPos >= 0; iPos--) + totalOffset.Y += containerStation.StackLocations[stackLocationIndex].Containers[iPos].HeightM; totalOffset.Z *= -1; Vector3.Transform(ref totalOffset, ref containerStation.ShapePosition.XNAMatrix, out totalOffset); WorldPosition.XNAMatrix = containerStation.ShapePosition.XNAMatrix; @@ -201,7 +202,7 @@ private void ComputeDimensions() } } - public void ComputeContainerStationContainerPosition(int stackLocationIndex, int loadPositionVertical) + public void ComputeContainerStationContainerPosition (int stackLocationIndex, int loadPositionVertical) { // compute WorldPosition starting from offsets and position of container station var mstsOffset = IntrinsicShapeOffset; @@ -213,7 +214,7 @@ public void ComputeContainerStationContainerPosition(int stackLocationIndex, int for (var iPos = (stackLocation.Containers.Count - 1); iPos >= 0; iPos--) totalOffset.Y += stackLocation.Containers[iPos].HeightM; totalOffset.Z *= -1; - Vector3.Transform(ref totalOffset, ref ContainerStation.ShapePosition.XNAMatrix, out totalOffset); + Vector3.Transform(ref totalOffset, ref ContainerStation.ShapePosition.XNAMatrix, out totalOffset); WorldPosition.XNAMatrix = ContainerStation.ShapePosition.XNAMatrix; WorldPosition.XNAMatrix.Translation = totalOffset; WorldPosition.TileX = ContainerStation.ShapePosition.TileX; @@ -252,27 +253,27 @@ public void LoadFromContainerFile(string loadFilePath, string baseFolder) var containerFile = new ContainerFile(loadFilePath); var containerParameters = containerFile.ContainerParameters; Name = containerParameters.Name; - + ShapeFileName = @"..\" + containerParameters.ShapeFileName; - var workingString = containerParameters.ShapeFileName.Replace(@"\", @"/"); - var root = workingString.Substring(0, workingString.IndexOf(@"/")); + var workingString = containerParameters.ShapeFileName.Replace(@"\" , @"/"); + var root = workingString.Substring(0, workingString.IndexOf(@"/")); BaseShapeFileFolderSlash = baseFolder + root + @"\"; Enum.TryParse(containerParameters.ContainerType, out ContainerType containerType); ContainerType = containerType; ComputeDimensions(); IntrinsicShapeOffset = containerParameters.IntrinsicShapeOffset; IntrinsicShapeOffset.Z *= -1; - EmptyMassKG = containerParameters.EmptyMassKG != -1 ? containerParameters.EmptyMassKG : DefaultEmptyMassKG[(int)ContainerType]; + EmptyMassKG = containerParameters.EmptyMassKG != -1 ? containerParameters.EmptyMassKG : DefaultEmptyMassKG[(int)ContainerType] ; MaxMassWhenLoadedKG = containerParameters.MaxMassWhenLoadedKG != -1 ? containerParameters.MaxMassWhenLoadedKG : DefaultMaxMassWhenLoadedKG[(int)ContainerType]; } - public void ComputeWorldPosition(FreightAnimationDiscrete freightAnimDiscrete) - { + public void ComputeWorldPosition (FreightAnimationDiscrete freightAnimDiscrete) + { WorldPosition.XNAMatrix = freightAnimDiscrete.Wagon.WorldPosition.XNAMatrix; WorldPosition.TileX = freightAnimDiscrete.Wagon.WorldPosition.TileX; WorldPosition.TileZ = freightAnimDiscrete.Wagon.WorldPosition.TileZ; var offset = freightAnimDiscrete.Offset; - // if (freightAnimDiscrete.Container != null) offset.Y += freightAnimDiscrete.Container.HeightM; +// if (freightAnimDiscrete.Container != null) offset.Y += freightAnimDiscrete.Container.HeightM; var translation = Matrix.CreateTranslation(offset - IntrinsicShapeOffset); WorldPosition.XNAMatrix = translation * WorldPosition.XNAMatrix; var invWagonMatrix = Matrix.Invert(freightAnimDiscrete.Wagon.WorldPosition.XNAMatrix); @@ -338,7 +339,7 @@ public void Update() } - } + } public class ContainerHandlingItem : FuelPickupItem { @@ -486,7 +487,7 @@ public void Restore(BinaryReader inf) case ContainerStationStatus.Idle: Status = status; break; - default: + default: Status = ContainerStationStatus.Idle; break; } @@ -528,7 +529,7 @@ public void PreloadContainerStation(PickupObj thisWorldObj) { var tileX = int.Parse(loadStationPopulation.LoadStatID.wfile.Substring(1, 7)); var tileZ = int.Parse(loadStationPopulation.LoadStatID.wfile.Substring(8, 7)); - if (tileX == Location.TileX && tileZ == Location.TileZ && loadStationPopulation.LoadStatID.UiD == thisWorldObj.UID) + if (tileX == Location.TileX && tileZ == Location.TileZ && loadStationPopulation.LoadStatID.UiD == thisWorldObj.UID) { foreach (var loadDataEntry in (loadStationPopulation as ContainerStationPopulation).LoadData) { @@ -544,7 +545,7 @@ public void PreloadContainerStation(PickupObj thisWorldObj) break; } } - } + } public void Preload(string loadFilePath, int stackLocationIndex, LoadState loadState) { @@ -606,7 +607,7 @@ public void Update() MoveGrabber = false; Status = ContainerStationStatus.LoadLowerToPick; TargetY = ComputeTargetYBase(StackLocations[SelectedStackLocationIndex].Containers.Count - 1, SelectedStackLocationIndex) - PickingSurfaceYOffset; - RelativeContainerPosition.M42 = -TargetY + StackLocations[SelectedStackLocationIndex].Containers[StackLocations[SelectedStackLocationIndex].Containers.Count - 1].WorldPosition.XNAMatrix.M42 + InitialInvAnimationXNAMatrix.M42; + RelativeContainerPosition.M42 = - TargetY + StackLocations[SelectedStackLocationIndex].Containers[StackLocations[SelectedStackLocationIndex].Containers.Count -1].WorldPosition.XNAMatrix.M42 + InitialInvAnimationXNAMatrix.M42; MoveY = true; } break; @@ -713,7 +714,7 @@ public void Update() } } - TargetZ = PickingSurfaceRelativeTopStartPosition.Z - relativeAnimationPosition.Translation.Z - LinkedFreightAnimation.Offset.Z * + TargetZ = PickingSurfaceRelativeTopStartPosition.Z - relativeAnimationPosition.Translation.Z - LinkedFreightAnimation.Offset.Z * (WagonFlipped ? -1 : 1); if (Math.Abs(TargetZ) > MinZSpan) { @@ -743,7 +744,7 @@ public void Update() var addHeight = 0.0f; foreach (var freightAnim in LinkedFreightAnimation.FreightAnimations.Animations) { - if (freightAnim is FreightAnimationDiscrete discreteFreightAnim && discreteFreightAnim.LoadPosition != LoadPosition.Above) + if (freightAnim is FreightAnimationDiscrete discreteFreightAnim && discreteFreightAnim.LoadPosition != LoadPosition.Above) { addHeight = discreteFreightAnim.Container.HeightM; break; @@ -804,8 +805,8 @@ public void Update() MoveY = false; HandledContainer = LinkedFreightAnimation.Container; TargetX = PickingSurfaceRelativeTopStartPosition.X; - TargetZ = PickingSurfaceRelativeTopStartPosition.Z - RelativeContainerPosition.Translation.Z - HandledContainer.IntrinsicShapeOffset.Z * - (ContainerFlipped ? -1 : 1); + TargetZ = PickingSurfaceRelativeTopStartPosition.Z - RelativeContainerPosition.Translation.Z - HandledContainer.IntrinsicShapeOffset.Z * + (ContainerFlipped ? -1 : 1); Status = ContainerStationStatus.UnloadHorizontallyMoveToPick; RelativeContainerPosition.M43 = HandledContainer.IntrinsicShapeOffset.Z * (ContainerFlipped ? 1 : -1); MoveX = true; @@ -822,7 +823,7 @@ public void Update() MoveZ = false; MoveGrabber = false; Status = ContainerStationStatus.UnloadLowerToPick; - TargetY = -PickingSurfaceYOffset + HandledContainer.HeightM + HandledContainer.IntrinsicShapeOffset.Y + GeneralVerticalOffset - PickingSurfaceYOffset; + TargetY = - PickingSurfaceYOffset + HandledContainer.HeightM + HandledContainer.IntrinsicShapeOffset.Y + GeneralVerticalOffset - PickingSurfaceYOffset; RelativeContainerPosition.M42 = PickingSurfaceYOffset - (HandledContainer.HeightM + HandledContainer.IntrinsicShapeOffset.Y); MoveY = true; } @@ -961,7 +962,7 @@ public void PrepareForUnload(FreightAnimationDiscrete linkedFreightAnimation) RelativeContainerPosition.M42 += PickingSurfaceYOffset; RelativeContainerPosition.M41 -= PickingSurfaceRelativeTopStartPosition.X; GeneralVerticalOffset = RelativeContainerPosition.M42; - // RelativeContainerPosition.Translation += LinkedFreightAnimation.Offset; +// RelativeContainerPosition.Translation += LinkedFreightAnimation.Offset; ContainerFlipped = (Math.Abs(InitialInvAnimationXNAMatrix.M11 - container.WorldPosition.XNAMatrix.M11) < 0.1f ? false : true); Status = ContainerStationStatus.UnloadRaiseToPick; TargetY = PickingSurfaceRelativeTopStartPosition.Y; @@ -984,7 +985,7 @@ public void PrepareForLoad(FreightAnimationDiscrete linkedFreightAnimation) RelativeContainerPosition.M43 = HandledContainer.IntrinsicShapeOffset.Z * (ContainerFlipped ? 1 : -1); Status = ContainerStationStatus.LoadRaiseToPick; TargetY = PickingSurfaceRelativeTopStartPosition.Y; - MoveY = true; + MoveY = true; SetGrabbers(HandledContainer); } @@ -1010,7 +1011,7 @@ public void TransferContainer(Matrix animationXNAMatrix) } } - public void ReInitPositionOffset(Matrix animationXNAMatrix) + public void ReInitPositionOffset (Matrix animationXNAMatrix) { InitialInvAnimationXNAMatrix = Matrix.Invert(animationXNAMatrix); } diff --git a/Source/Orts.Simulation/Simulation/FuelPickup.cs b/Source/Orts.Simulation/Simulation/FuelPickup.cs index 938b2b69a4..64e7cf584a 100644 --- a/Source/Orts.Simulation/Simulation/FuelPickup.cs +++ b/Source/Orts.Simulation/Simulation/FuelPickup.cs @@ -17,11 +17,11 @@ // This file is the responsibility of the 3D & Environment Team. -using System.Collections.Generic; -using System.Linq; using Orts.Formats.Msts; using Orts.Simulation.RollingStocks; using ORTS.Common; +using System.Collections.Generic; +using System.Linq; namespace Orts.Simulation { diff --git a/Source/Orts.Simulation/Simulation/Hazzard.cs b/Source/Orts.Simulation/Simulation/Hazzard.cs index 9c39f1f249..1aa9dc9608 100644 --- a/Source/Orts.Simulation/Simulation/Hazzard.cs +++ b/Source/Orts.Simulation/Simulation/Hazzard.cs @@ -17,142 +17,142 @@ // This file is the responsibility of the 3D & Environment Team. -using System.Collections.Generic; -using System.Linq; using Orts.Formats.Msts; using ORTS.Common; +using System.Collections.Generic; +using System.Linq; namespace Orts.Simulation { public class HazzardManager - { - readonly int hornDist = 200; - readonly int approachDist = 160; + { + readonly int hornDist = 200; + readonly int approachDist = 160; readonly int scaredDist = 147; - readonly Simulator Simulator; - public readonly Dictionary Hazzards; - public readonly Dictionary CurrentHazzards; - public readonly Dictionary HazFiles; - List InterestedHazzards;//those hazards is closed to player, needs to listen to horn - public HazzardManager(Simulator simulator) - { - Simulator = simulator; - InterestedHazzards = new List(); - CurrentHazzards = new Dictionary(); - HazFiles = new Dictionary(); - Hazzards = simulator.TDB != null && simulator.TDB.TrackDB != null ? GetHazardsFromDB(simulator.TDB.TrackDB.TrackNodes, simulator.TDB.TrackDB.TrItemTable) : new Dictionary(); - } + readonly Simulator Simulator; + public readonly Dictionary Hazzards; + public readonly Dictionary CurrentHazzards; + public readonly Dictionary HazFiles; + List InterestedHazzards;//those hazards is closed to player, needs to listen to horn + public HazzardManager(Simulator simulator) + { + Simulator = simulator; + InterestedHazzards = new List(); + CurrentHazzards = new Dictionary(); + HazFiles = new Dictionary(); + Hazzards = simulator.TDB != null && simulator.TDB.TrackDB != null ? GetHazardsFromDB(simulator.TDB.TrackDB.TrackNodes, simulator.TDB.TrackDB.TrItemTable) : new Dictionary(); + } - static Dictionary GetHazardsFromDB(TrackNode[] trackNodes, TrItem[] trItemTable) - { - return (from trackNode in trackNodes - where trackNode != null && trackNode.TrVectorNode != null && trackNode.TrVectorNode.NoItemRefs > 0 - from itemRef in trackNode.TrVectorNode.TrItemRefs.Distinct() - where trItemTable[itemRef] != null && trItemTable[itemRef].ItemType == TrItem.trItemType.trHAZZARD - select new KeyValuePair(itemRef, new Hazzard(trackNode, trItemTable[itemRef]))) - .ToDictionary(_ => _.Key, _ => _.Value); - } + static Dictionary GetHazardsFromDB(TrackNode[] trackNodes, TrItem[] trItemTable) + { + return (from trackNode in trackNodes + where trackNode != null && trackNode.TrVectorNode != null && trackNode.TrVectorNode.NoItemRefs > 0 + from itemRef in trackNode.TrVectorNode.TrItemRefs.Distinct() + where trItemTable[itemRef] != null && trItemTable[itemRef].ItemType == TrItem.trItemType.trHAZZARD + select new KeyValuePair(itemRef, new Hazzard(trackNode, trItemTable[itemRef]))) + .ToDictionary(_ => _.Key, _ => _.Value); + } - [CallOnThread("Loader")] - public Hazzard AddHazzardIntoGame(int itemID, string hazFileName) - { - try - { - if (!CurrentHazzards.ContainsKey(itemID)) - { - if (HazFiles.ContainsKey(hazFileName)) Hazzards[itemID].HazFile = HazFiles[hazFileName]; - else - { - var hazF = new HazardFile(Simulator.RoutePath + "\\" + hazFileName); - HazFiles.Add(hazFileName, hazF); - Hazzards[itemID].HazFile = hazF; - } - //based on act setting for frequency + [CallOnThread("Loader")] + public Hazzard AddHazzardIntoGame(int itemID, string hazFileName) + { + try + { + if (!CurrentHazzards.ContainsKey(itemID)) + { + if (HazFiles.ContainsKey(hazFileName)) Hazzards[itemID].HazFile = HazFiles[hazFileName]; + else + { + var hazF = new HazardFile(Simulator.RoutePath + "\\" + hazFileName); + HazFiles.Add(hazFileName, hazF); + Hazzards[itemID].HazFile = hazF; + } + //based on act setting for frequency if (Hazzards[itemID].animal == true && Simulator.Activity != null) { if (Simulator.Random.Next(100) > Simulator.Activity.Tr_Activity.Tr_Activity_Header.Animals) return null; } - else if (Simulator.Activity != null) - { - if (Simulator.Random.Next(100) > Simulator.Activity.Tr_Activity.Tr_Activity_Header.Animals) return null; - } - else //in explore mode - { - if (Hazzards[itemID].animal == false) return null;//not show worker in explore mode - if (Simulator.Random.Next(100) > 20) return null;//show 10% animals - } - CurrentHazzards.Add(itemID, Hazzards[itemID]); - return Hazzards[itemID];//successfully added the hazard with associated haz file - } - } - catch { } - return null; - } + else if (Simulator.Activity != null) + { + if (Simulator.Random.Next(100) > Simulator.Activity.Tr_Activity.Tr_Activity_Header.Animals) return null; + } + else //in explore mode + { + if (Hazzards[itemID].animal == false) return null;//not show worker in explore mode + if (Simulator.Random.Next(100) > 20) return null;//show 10% animals + } + CurrentHazzards.Add(itemID, Hazzards[itemID]); + return Hazzards[itemID];//successfully added the hazard with associated haz file + } + } + catch { } + return null; + } - public void RemoveHazzardFromGame(int itemID) - { - try - { - if (CurrentHazzards.ContainsKey(itemID)) - { - CurrentHazzards.Remove(itemID); - } - } - catch { }; - } + public void RemoveHazzardFromGame(int itemID) + { + try + { + if (CurrentHazzards.ContainsKey(itemID)) + { + CurrentHazzards.Remove(itemID); + } + } + catch { }; + } - [CallOnThread("Updater")] - public void Update(float elapsedClockSeconds) - { - var playerLocation = Simulator.PlayerLocomotive.WorldPosition.WorldLocation; + [CallOnThread("Updater")] + public void Update(float elapsedClockSeconds) + { + var playerLocation = Simulator.PlayerLocomotive.WorldPosition.WorldLocation; - foreach (var haz in Hazzards) - { - haz.Value.Update(playerLocation, approachDist, scaredDist); - } - } + foreach (var haz in Hazzards) + { + haz.Value.Update(playerLocation, approachDist, scaredDist); + } + } - public void Horn() - { - var playerLocation = Simulator.PlayerLocomotive.WorldPosition.WorldLocation; - foreach (var haz in Hazzards) - { - if (WorldLocation.Within(haz.Value.Location, playerLocation, hornDist)) - { - haz.Value.state = Hazzard.State.LookLeft; - } - } - } - } + public void Horn() + { + var playerLocation = Simulator.PlayerLocomotive.WorldPosition.WorldLocation; + foreach (var haz in Hazzards) + { + if (WorldLocation.Within(haz.Value.Location, playerLocation, hornDist)) + { + haz.Value.state = Hazzard.State.LookLeft; + } + } + } + } - public class Hazzard - { + public class Hazzard + { readonly TrackNode TrackNode; internal WorldLocation Location; - public HazardFile HazFile { get { return hazF; } set { hazF = value; if (hazF.Tr_HazardFile.Workers != null) animal = false; else animal = true; } } - public HazardFile hazF; - public enum State { Idle1, Idle2, LookLeft, LookRight, Scared }; - public State state; - public bool animal = true; + public HazardFile HazFile { get { return hazF; } set { hazF = value; if (hazF.Tr_HazardFile.Workers != null) animal = false; else animal = true; } } + public HazardFile hazF; + public enum State { Idle1, Idle2, LookLeft, LookRight, Scared }; + public State state; + public bool animal = true; - public Hazzard(TrackNode trackNode, TrItem trItem) + public Hazzard(TrackNode trackNode, TrItem trItem) { TrackNode = trackNode; Location = new WorldLocation(trItem.TileX, trItem.TileZ, trItem.X, trItem.Y, trItem.Z); - state = State.Idle1; + state = State.Idle1; } - public void Update(WorldLocation playerLocation, int approachDist, int scaredDist) - { - if (state == State.Idle1) - { - if (Simulator.Random.Next(10) == 0) state = State.Idle2; - } - else if (state == State.Idle2) - { - if (Simulator.Random.Next(5) == 0) state = State.Idle1; - } + public void Update(WorldLocation playerLocation, int approachDist, int scaredDist) + { + if (state == State.Idle1) + { + if (Simulator.Random.Next(10) == 0) state = State.Idle2; + } + else if (state == State.Idle2) + { + if (Simulator.Random.Next(5) == 0) state = State.Idle1; + } if (!WorldLocation.Within(Location, playerLocation, scaredDist) && state < State.LookLeft) { @@ -165,6 +165,6 @@ public void Update(WorldLocation playerLocation, int approachDist, int scaredDis { state = State.Scared; } - } - } + } + } } diff --git a/Source/Orts.Simulation/Simulation/LevelCrossing.cs b/Source/Orts.Simulation/Simulation/LevelCrossing.cs index 795bc82cc6..38ce79d4ff 100644 --- a/Source/Orts.Simulation/Simulation/LevelCrossing.cs +++ b/Source/Orts.Simulation/Simulation/LevelCrossing.cs @@ -17,21 +17,21 @@ // This file is the responsibility of the 3D & Environment Team. -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; using Orts.Formats.Msts; using Orts.Simulation.AIs; using Orts.Simulation.Physics; using ORTS.Common; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; namespace Orts.Simulation { public class LevelCrossings { const float MaximumActivationDistance = 2000; - + readonly Simulator Simulator; public readonly Dictionary TrackCrossingItems; public readonly Dictionary RoadCrossingItems; @@ -42,7 +42,7 @@ public class LevelCrossings public LevelCrossings(Simulator simulator) { Simulator = simulator; - TrackCrossingItems = simulator.TDB != null && simulator.TDB.TrackDB != null && simulator.TDB.TrackDB.TrackNodes != null && simulator.TDB.TrackDB.TrItemTable != null + TrackCrossingItems = simulator.TDB != null && simulator.TDB.TrackDB != null && simulator.TDB.TrackDB.TrackNodes != null && simulator.TDB.TrackDB.TrItemTable != null ? GetLevelCrossingsFromDB(simulator.TDB.TrackDB.TrackNodes, simulator.TDB.TrackDB.TrItemTable) : new Dictionary(); RoadCrossingItems = simulator.RDB != null && simulator.RDB.RoadTrackDB != null && simulator.RDB.RoadTrackDB.TrackNodes != null && simulator.RDB.RoadTrackDB.TrItemTable != null ? GetLevelCrossingsFromDB(simulator.RDB.RoadTrackDB.TrackNodes, simulator.RDB.RoadTrackDB.TrItemTable) : new Dictionary(); @@ -94,7 +94,7 @@ void UpdateCrossings(Train train, float elapsedTime) var absSpeedMpS = Math.Abs(speedMpS); var maxSpeedMpS = train.AllowedMaxSpeedMpS; var minCrossingActivationSpeed = 5.0f; //5.0MpS is equalivalent to 11.1mph. This is the estimated min speed that MSTS uses to activate the gates when in range. - + bool validTrain = false; bool validStaticConsist = false; @@ -202,11 +202,11 @@ void UpdateCrossings(Train train, float elapsedTime) if ((train.TrainType == Train.TRAINTYPE.STATIC) && validStaticConsist) { // This process is to raise the crossing gates if a loose consist rolls through the crossing. - if (speedMpS > 0) + if(speedMpS > 0) { frontDist = crossing.DistanceTo(train.FrontTDBTraveller, minimumDist); rearDist = crossing.DistanceTo(train.RearTDBTraveller, minimumDist); - + if (frontDist < 0 && rearDist < 0) crossing.RemoveTrain(train); } @@ -222,7 +222,7 @@ void UpdateCrossings(Train train, float elapsedTime) if (frontDist < 0 && rearDist < 0) rearDist = crossing.DistanceTo(new Traveller(train.RearTDBTraveller, Traveller.TravellerDirection.Backward), adjustDist); - // Testing distance before crossing + // Testing distance before crossing if (frontDist > 0 && frontDist <= adjustDist) crossing.AddTrain(train); @@ -299,7 +299,7 @@ void UpdateCrossings(Train train, float elapsedTime) public LevelCrossingItem SearchNearLevelCrossing(Train train, float reqDist, bool trainForwards, out float frontDist) { LevelCrossingItem roadItem = LevelCrossingItem.None; - frontDist = -1; + frontDist = -1; Traveller traveller = trainForwards ? train.FrontTDBTraveller : new Traveller(train.RearTDBTraveller, Traveller.TravellerDirection.Backward); foreach (var crossing in TrackCrossingItems.Values.Where(ci => ci.CrossingGroup != null)) @@ -344,7 +344,7 @@ public LevelCrossingItem(TrackNode trackNode, TrItem trItem) Location = new WorldLocation(trItem.TileX, trItem.TileZ, trItem.X, trItem.Y, trItem.Z); } - public LevelCrossingItem() + public LevelCrossingItem () { } @@ -352,7 +352,7 @@ public LevelCrossingItem() [CallOnThread("Updater")] public void AddTrain(Train train) { - if (train.TrainType == Train.TRAINTYPE.STATIC) + if(train.TrainType == Train.TRAINTYPE.STATIC) { var staticConsists = StaticConsists; if (!staticConsists.Contains(train)) @@ -404,7 +404,7 @@ public void RemoveTrain(Train train) StaticConsists = newStaticConsists; } } - else if (trains.Count > 0) + else if(trains.Count > 0) { if (trains.Contains(train)) { @@ -431,7 +431,7 @@ public class LevelCrossing internal readonly List Items; internal readonly float WarningTime; internal readonly float MinimumDistance; - + public LevelCrossing(IEnumerable items, float warningTime, float minimumDistance) { Items = new List(items); diff --git a/Source/Orts.Simulation/Simulation/Physics/Train.cs b/Source/Orts.Simulation/Simulation/Physics/Train.cs index 85122bfe5e..2800a4a4f2 100644 --- a/Source/Orts.Simulation/Simulation/Physics/Train.cs +++ b/Source/Orts.Simulation/Simulation/Physics/Train.cs @@ -224,7 +224,7 @@ public enum TRAINTYPE // Local max speed independently from signal and speedpost speed; // depends from various parameters like route max speed, overall or section efficiency of service, // max speed of player locomotive, max speed of consist (MaxVelocityA) - public float TrainMaxSpeedMpS; + public float TrainMaxSpeedMpS; public float AllowedMaxSpeedMpS; // Max speed as allowed public float allowedMaxSpeedSignalMpS; // Max speed as set by signal public float allowedMaxSpeedLimitMpS; // Max speed as set by limit @@ -1200,13 +1200,13 @@ public virtual void Save(BinaryWriter outf) // Save initial speed outf.Write(InitialSpeed); outf.Write(IsPathless); - /* if (EOT != null) - { - outf.Write(1); - EOT.Save(outf); - } - else - outf.Write(-1);*/ + /* if (EOT != null) + { + outf.Write(1); + EOT.Save(outf); + } + else + outf.Write(-1);*/ } private void SaveCars(BinaryWriter outf) @@ -1216,7 +1216,7 @@ private void SaveCars(BinaryWriter outf) { outf.Write(wagon.WagFilePath); wagon.Save(outf); - } + } } static void SaveTrafficSDefinition(BinaryWriter outf, Traffic_Service_Definition thisTSD) @@ -1571,7 +1571,7 @@ public void DPMoveToBack() return; var dpDynamicBrakePercent = LeadLocomotive.DynamicBrakePercent; var dpThrottlePercent = LeadLocomotive.ThrottlePercent; - var dpDynamicBrakeCurrentNotch = MathHelper.Clamp((LeadLocomotive as MSTSLocomotive).DPDynamicBrakeController.GetNotch(dpDynamicBrakePercent / 100), 0, 8); + var dpDynamicBrakeCurrentNotch = MathHelper.Clamp((LeadLocomotive as MSTSLocomotive).DPDynamicBrakeController.GetNotch(dpDynamicBrakePercent/100), 0, 8); var dpThrottleCurrentNotch = (LeadLocomotive as MSTSLocomotive).ThrottleController.CurrentNotch; int idToMove = -1; int idLead = LeadLocomotive != null ? (Cars[LeadLocomotiveIndex] as MSTSLocomotive).DPUnitID : -1; @@ -1715,7 +1715,7 @@ protected void DPLess(RollingStocks.SubSystems.Controllers.MSTSNotchController c if (percent <= 0) { percent = 0; - // DPMore(controller, ref percent); +// DPMore(controller, ref percent); } } @@ -2114,39 +2114,39 @@ public void UpdateWindComponents() //These will be representative of the train whilst it is on a straight track, but each wagon will vary when going around a curve. // Note both train and wind direction will be positive between 0 (north) and 180 (south) through east, and negative between 0 (north) and 180 (south) through west // Wind and train direction to be converted to an angle between 0 and 360 deg. - // Calculate Wind speed and direction, and train direction - // Update the value of the Wind Speed and Direction for the train - PhysicsWindDirectionDeg = MathHelper.ToDegrees(Simulator.Weather.WindDirection); - PhysicsWindSpeedMpS = Simulator.Weather.WindSpeed; - float TrainSpeedMpS = Math.Abs(SpeedMpS); - - // If a westerly direction (ie -ve) convert to an angle between 0 and 360 - if (PhysicsWindDirectionDeg < 0) - PhysicsWindDirectionDeg += 360; - - if (PhysicsTrainLocoDirectionDeg < 0) - PhysicsTrainLocoDirectionDeg += 360; - - // calculate angle between train and eind direction - if (PhysicsWindDirectionDeg > PhysicsTrainLocoDirectionDeg) - ResultantWindComponentDeg = PhysicsWindDirectionDeg - PhysicsTrainLocoDirectionDeg; - else if (PhysicsTrainLocoDirectionDeg > PhysicsWindDirectionDeg) - ResultantWindComponentDeg = PhysicsTrainLocoDirectionDeg - PhysicsWindDirectionDeg; - else - ResultantWindComponentDeg = 0.0f; + // Calculate Wind speed and direction, and train direction + // Update the value of the Wind Speed and Direction for the train + PhysicsWindDirectionDeg = MathHelper.ToDegrees(Simulator.Weather.WindDirection); + PhysicsWindSpeedMpS = Simulator.Weather.WindSpeed; + float TrainSpeedMpS = Math.Abs(SpeedMpS); + + // If a westerly direction (ie -ve) convert to an angle between 0 and 360 + if (PhysicsWindDirectionDeg < 0) + PhysicsWindDirectionDeg += 360; + + if (PhysicsTrainLocoDirectionDeg < 0) + PhysicsTrainLocoDirectionDeg += 360; + + // calculate angle between train and eind direction + if (PhysicsWindDirectionDeg > PhysicsTrainLocoDirectionDeg) + ResultantWindComponentDeg = PhysicsWindDirectionDeg - PhysicsTrainLocoDirectionDeg; + else if (PhysicsTrainLocoDirectionDeg > PhysicsWindDirectionDeg) + ResultantWindComponentDeg = PhysicsTrainLocoDirectionDeg - PhysicsWindDirectionDeg; + else + ResultantWindComponentDeg = 0.0f; - // Correct wind direction if it is greater then 360 deg, then correct to a value less then 360 - if (Math.Abs(ResultantWindComponentDeg) > 360) - ResultantWindComponentDeg = ResultantWindComponentDeg - 360.0f; + // Correct wind direction if it is greater then 360 deg, then correct to a value less then 360 + if (Math.Abs(ResultantWindComponentDeg) > 360) + ResultantWindComponentDeg = ResultantWindComponentDeg - 360.0f; - // Wind angle should be kept between 0 and 180 the formulas do not cope with angles > 180. If angle > 180, denotes wind of "other" side of train - if (ResultantWindComponentDeg > 180) - ResultantWindComponentDeg = 360 - ResultantWindComponentDeg; + // Wind angle should be kept between 0 and 180 the formulas do not cope with angles > 180. If angle > 180, denotes wind of "other" side of train + if (ResultantWindComponentDeg > 180) + ResultantWindComponentDeg = 360 - ResultantWindComponentDeg; - float WindAngleRad = MathHelper.ToRadians(ResultantWindComponentDeg); + float WindAngleRad = MathHelper.ToRadians(ResultantWindComponentDeg); - WindResultantSpeedMpS = (float)Math.Sqrt(TrainSpeedMpS * TrainSpeedMpS + PhysicsWindSpeedMpS * PhysicsWindSpeedMpS + 2.0f * TrainSpeedMpS * PhysicsWindSpeedMpS * (float)Math.Cos(WindAngleRad)); - } + WindResultantSpeedMpS = (float)Math.Sqrt(TrainSpeedMpS * TrainSpeedMpS + PhysicsWindSpeedMpS * PhysicsWindSpeedMpS + 2.0f * TrainSpeedMpS * PhysicsWindSpeedMpS * (float)Math.Cos(WindAngleRad)); + } //================================================================================================// @@ -2288,7 +2288,7 @@ public void UpdateCarSteamHeat(float elapsedClockSeconds) if (car.WagonType == TrainCar.WagonTypes.Passenger || car.WagonSpecialType == MSTSWagon.WagonSpecialTypes.Heated) // Only calculate compartment heat in passenger or specially marked heated cars { car.UpdateHeatLoss(); - + //++++++++++++++++++++++++++++++++++++++++ // Calculate heat produced by steam pipe acting as heat exchanger inside carriage - this model is based upon the heat loss from a steam pipe. // The heat loss per metre from a bare pipe equals the heat loss by convection and radiation. Temperatures in degrees Kelvin @@ -2335,7 +2335,7 @@ public void UpdateCarSteamHeat(float elapsedClockSeconds) car.CarHeatSteamMainPipeHeatLossBTU = Me.ToFt(car.CarLengthM) * (MathHelper.Pi * Me.ToFt(car.MainSteamHeatPipeOuterDiaM)) * HeatTransCoeffMainPipeBTUpFt2pHrpF * (CarMainSteamPipeTempF - C.ToF(car.CarOutsideTempC)); // calculate steam connecting hoses heat loss - assume 1.5" hose - float ConnectSteamHoseOuterDiaFt = Me.ToFt(car.CarConnectSteamHoseOuterDiaM); + float ConnectSteamHoseOuterDiaFt = Me.ToFt(car.CarConnectSteamHoseOuterDiaM); car.CarHeatConnectSteamHoseHeatLossBTU = ConnectSteamHoseLengthFt * (MathHelper.Pi * ConnectSteamHoseOuterDiaFt) * HeatTransCoeffConnectHoseBTUpFt2pHrpF * (CarMainSteamPipeTempF - C.ToF(car.CarOutsideTempC)); // Use Napier formula to calculate steam discharge rate through steam trap valve, ie Discharge (lb/s) = (Valve area * Abs Pressure) / 70 @@ -2355,7 +2355,7 @@ public void UpdateCarSteamHeat(float elapsedClockSeconds) float ConnectingHoseLeakAreaIn2 = (float)Math.PI * (ConnectingHoseLeakDiaIn / 2.0f) * (ConnectingHoseLeakDiaIn / 2.0f); car.CarHeatConnectingSteamHoseLeakageLBpS = car.SteamHoseLeakRateRandom * (ConnectingHoseLeakAreaIn2 * (car.CarSteamHeatMainPipeSteamPressurePSI + OneAtmospherePSI)) / ConnectingHoseDischargeFactor; - + //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ float CurrentComparmentSteamPipeHeatW = 0; @@ -2424,7 +2424,7 @@ public void UpdateCarSteamHeat(float elapsedClockSeconds) } } - #region Calculate Steam Pressure drop along train +#region Calculate Steam Pressure drop along train // Initialise main steam pipe pressure to same as steam heat valve setting float ProgressivePressureAlongTrainPSI = mstsLocomotive.CurrentSteamHeatPressurePSI; @@ -2987,7 +2987,7 @@ public virtual bool PostInit() /// /// set train speed logging flag (valid per activity, so will be restored after save) /// - + protected void SetTrainSpeedLoggingFlag() { DatalogTrainSpeed = Simulator.Settings.DataLogTrainSpeed; @@ -4702,7 +4702,7 @@ bool FixCouplerForceEquations() TrainCar car = Cars[i]; // Coupler in tension on this car or coupler force is "zero" then jump to (process) next car - if (car.CouplerSlackM > 0 || car.CouplerForceB >= 1) + if (car.CouplerSlackM > 0 || car.CouplerForceB >= 1) continue; if (car.IsPlayerTrain && !Simulator.Settings.SimpleControlPhysics && car.IsAdvancedCoupler) // "Advanced coupler" - operates in three extension zones @@ -4769,7 +4769,7 @@ bool FixCouplerImpulseForceEquations() SetCouplerForce(car, 0); return true; } - + } else // Simple Coupler @@ -4869,8 +4869,8 @@ public void AddCouplerImpulseForces(float elapsedTime) // This section seems to be required to get car moving if (car.IsPlayerTrain && !Simulator.Settings.SimpleControlPhysics && car.IsAdvancedCoupler) // "Advanced coupler" { - Cars[i].SpeedMpS += Cars[i].CouplerForceU / Cars[i].MassKG; - Cars[i + 1].SpeedMpS -= Cars[i].CouplerForceU / Cars[i + 1].MassKG; + Cars[i].SpeedMpS += Cars[i].CouplerForceU / Cars[i].MassKG; + Cars[i + 1].SpeedMpS -= Cars[i].CouplerForceU / Cars[i + 1].MassKG; // This ensures that the last car speed never goes negative - as this might cause a sudden jerk in the train when viewed. if (i == Cars.Count - 2) @@ -4878,12 +4878,12 @@ public void AddCouplerImpulseForces(float elapsedTime) if (FirstCar.SpeedMpS > 0 && Cars[i + 1].SpeedMpS < 0) { Cars[i + 1].SpeedMpS = 0; - // Trace.TraceInformation("Last Car Zero Speed Set - CarID {0} - -ve set +ve", car.CarID); + // Trace.TraceInformation("Last Car Zero Speed Set - CarID {0} - -ve set +ve", car.CarID); } else if (FirstCar.SpeedMpS < 0 && Cars[i + 1].SpeedMpS > 0) { Cars[i + 1].SpeedMpS = 0; - // Trace.TraceInformation("Last Car Zero Speed Set - CarID {0} - +ve set -ve", car.CarID); + // Trace.TraceInformation("Last Car Zero Speed Set - CarID {0} - +ve set -ve", car.CarID); } } @@ -4992,7 +4992,7 @@ public void ComputeCouplerForces(float elapsedTime) SolveCouplerForceEquations(); while (FixCouplerForceEquations()); - + for (int i = 0; i < Cars.Count - 1; i++) { @@ -5000,7 +5000,7 @@ public void ComputeCouplerForces(float elapsedTime) TrainCar car = Cars[i]; // Check to make sure that last car does not have any coulpler force on its coupler (no cars connected). When cars reversed, there is sometimes a "residual" coupler force. - if (i == Cars.Count - 1 && Cars[i + 1].CouplerForceU != 0) + if (i == Cars.Count-1 && Cars[i+1].CouplerForceU != 0) { Cars[i].CouplerForceU = 0; } @@ -5009,8 +5009,8 @@ public void ComputeCouplerForces(float elapsedTime) car.SmoothedCouplerForceUN = car.CouplerForceUSmoothed.SmoothedValue; // Total force acting on each car is adjusted depending upon the calculated coupler forces - car.TotalForceN += car.CouplerForceU; - Cars[i + 1].TotalForceN -= car.CouplerForceU; + car.TotalForceN += car.CouplerForceU; + Cars[i + 1].TotalForceN -= car.CouplerForceU; // Find max coupler force on the car - currently doesn't appear to be used anywhere if (MaximumCouplerForceN < Math.Abs(car.CouplerForceU)) @@ -5153,7 +5153,7 @@ public void ComputeCouplerForces(float elapsedTime) float GradStiffness = (car.GetCouplerTensionStiffness2N() - car.GetCouplerTensionStiffness1N()) / (SlackDiff); float ComputedZone3SlackM = (Math.Abs(car.SmoothedCouplerForceUN) / GradStiffness) + MaxZ2TensionM; - if (LastCar.SpeedMpS >= LastCarZeroSpeedMpS && LastCar.SpeedMpS < LastCarTensionMoveSpeedMpS) + if (LastCar.SpeedMpS >= LastCarZeroSpeedMpS && LastCar.SpeedMpS < LastCarTensionMoveSpeedMpS ) { // Train is starting, don't allow coupler slack to decrease until complete train is moving if (ComputedZone3SlackM < (Math.Abs(car.PreviousCouplerSlackM) / AdvancedCouplerDuplicationFactor)) @@ -5164,11 +5164,11 @@ public void ComputeCouplerForces(float elapsedTime) else if (ComputedZone3SlackM > Math.Abs(car.PreviousCouplerSlackM) / AdvancedCouplerDuplicationFactor) { // Allow coupler slack to slowly increase - - // Increase slack value - car.CouplerSlackM = car.PreviousCouplerSlackM * (1.0f / CouplerChangeDampingFactor); - car.CouplerSlackM = MathHelper.Clamp(car.CouplerSlackM, 0, MaxZ3TensionM * AdvancedCouplerDuplicationFactor); - car.AdvancedCouplerDynamicTensionSlackLimitM = car.CouplerSlackM; + + // Increase slack value + car.CouplerSlackM = car.PreviousCouplerSlackM * (1.0f / CouplerChangeDampingFactor); + car.CouplerSlackM = MathHelper.Clamp(car.CouplerSlackM, 0, MaxZ3TensionM * AdvancedCouplerDuplicationFactor); + car.AdvancedCouplerDynamicTensionSlackLimitM = car.CouplerSlackM; } } else if (ComputedZone3SlackM < (Math.Abs(car.PreviousCouplerSlackM) / AdvancedCouplerDuplicationFactor)) @@ -5526,7 +5526,7 @@ public void UpdateCarSpeeds(float elapsedTime) { if (j == Cars.Count - 1 || car.CouplerSlackM < car.GetMaximumSimpleCouplerSlack2M()) break; - } + } j++; // Increment count to next car. car = Cars[j]; @@ -5536,8 +5536,8 @@ public void UpdateCarSpeeds(float elapsedTime) for (int k = i; k <= j; k++) { - - if ((Cars[k].CarBrakeSystemType == "air_piped" || Cars[k].CarBrakeSystemType == "vacuum_piped" || car.CarBrakeSystemType == "manual_braking") && FirstCar.SpeedMpS > 0 && Cars[k - 1].SpeedMpS == 0.0) + + if ((Cars[k].CarBrakeSystemType == "air_piped" || Cars[k].CarBrakeSystemType == "vacuum_piped" || car.CarBrakeSystemType == "manual_braking") && FirstCar.SpeedMpS > 0 && Cars[k-1].SpeedMpS == 0.0) { // If is manual braked, air_piped car or vacuum_piped, and preceeding car is at stop, then set speed to zero. These type of cars do not have any brake force to hold them still Cars[k].SpeedMpS = 0.0f; @@ -5592,7 +5592,7 @@ public void UpdateCarSpeeds(float elapsedTime) { for (int k = j; k <= i; k++) { - + if ((Cars[k].CarBrakeSystemType == "air_piped" || Cars[k].CarBrakeSystemType == "vacuum_piped" || car.CarBrakeSystemType == "manual_braking") && FirstCar.SpeedMpS > 0 && Cars[k - 1].SpeedMpS == 0.0) { // If is manual braked, air_piped car or vacuum_piped, and preceeding car is at stop, then set speed to zero. These type of cars do not have any brake force to hold them still @@ -5659,7 +5659,7 @@ public void UpdateCouplerSlack(float elapsedTime) car.RearCoupler.IsOpen = i == Cars.Count - 1; TotalCouplerSlackM += car.CouplerSlackM; // Total coupler slack displayed in HUD only - + #if DEBUG_COUPLER_FORCES if (car.IsAdvancedCoupler) { @@ -9112,8 +9112,7 @@ public void UpdateExplorerMode(int signalObjectIndex) foreach (var tcRouteElement in ValidRoute[1]) { var tcSection = signalRef.TrackCircuitList[tcRouteElement.TCSectionIndex]; - if (tcSection.CheckReserved(routedBackward) && !tcSection.CircuitState.TrainOccupy.ContainsTrain(this)) - { + if (tcSection.CheckReserved(routedBackward) && !tcSection.CircuitState.TrainOccupy.ContainsTrain(this)) { tcSection.Unreserve(); tcSection.UnreserveTrain(); } @@ -9183,7 +9182,7 @@ public void UpdateExplorerMode(int signalObjectIndex) { distanceToSignalForward += thisSection.Length - lengthOffset; lengthOffset = 0; - } + } } // backward @@ -9200,7 +9199,7 @@ public void UpdateExplorerMode(int signalObjectIndex) { lengthOffset = -PresentPosition[1].TCOffset + signalRef.TrackCircuitList[PresentPosition[1].TCSectionIndex].Length; presentIndex = iindex; - } + } if (presentIndex != -1 && presentIndex <= iindex) { distanceToSignalBackward += thisSection.Length - lengthOffset; @@ -9584,7 +9583,7 @@ public void UpdateExplorerMode(int signalObjectIndex) offsetM = 0; // Stop if first signal is far, there's no need to clear it. - if (!firstSignalPassed && totalLengthM > MinCheckDistanceExplorerM) + if (!firstSignalPassed && totalLengthM > MinCheckDistanceExplorerM) break; if (thisSection.EndSignals[actDirection] != null) @@ -11235,7 +11234,7 @@ public void RemoveFromTrack() thisSection.ClearOccupied(this, true); } } - + //================================================================================================// // // Update track actions after coupling @@ -14475,7 +14474,7 @@ public void UpdatePlayerTrainData(float maxDistanceM) { // variable used to search for NORMAL signals and speedposts when not in AUTO mode var maxDistanceNORMALM = ControlMode == TRAIN_CONTROL.EXPLORER ? - Math.Max(maxDistanceM, (float)Simulator.TRK.Tr_RouteFile.SpeedLimit * 250.0f) : maxDistanceM; + Math.Max(maxDistanceM, (float)Simulator.TRK.Tr_RouteFile.SpeedLimit * 250.0f) : maxDistanceM; InitializePlayerTrainData(); // fill in the lists TrainObjectItem thisItem; @@ -14618,7 +14617,7 @@ public void UpdatePlayerTrainData(float maxDistanceM) } } } - + if (ControlMode == TRAIN_CONTROL.MANUAL || ControlMode == TRAIN_CONTROL.EXPLORER) { foreach (TrackCircuitSignalItem thisSpeeditem in thisSection.CircuitItems.TrackCircuitSpeedPosts[thisElement.Direction].TrackCircuitItem) @@ -14908,7 +14907,7 @@ public void GetTrainInfoAuto(ref TrainInfo thisInfo) } } - + /// /// Add reversal info to TrackMonitorInfo /// @@ -16338,11 +16337,10 @@ public void LockDoors(DoorSide side, bool lck) /// public DoorState DoorState(DoorSide side) { - return Cars.Select(car => - { + return Cars.Select(car => { var wagon = (car as MSTSWagon); var carSide = car.Flipped ? Doors.FlippedDoorSide(side) : side; - switch (carSide) + switch(carSide) { case DoorSide.Left: return wagon.Doors.LeftDoor.State; @@ -19803,7 +19801,7 @@ public TCReversalInfo(TCSubpathRoute lastRoute, int prevReversalIndex, TCSubpath } // if next route ends within last one, last diverge index can be set to endLastIndex - if (firstIndex > firstRoute.Count - 1) + if (firstIndex > firstRoute.Count -1) { LastDivergeIndex = endLastIndex; DivergeSectorIndex = lastRoute[endLastIndex].TCSectionIndex; @@ -20572,7 +20570,7 @@ public enum STOPTYPE public StationStop(int platformReference, PlatformDetails platformItem, int subrouteIndex, int routeIndex, int tcSectionIndex, int direction, int exitSignal, bool holdSignal, bool noWaitSignal, bool noClaimAllowed, float stopOffset, - int arrivalTime, int departTime, bool terminal, int? actualMinStopTime, float? keepClearFront, float? keepClearRear, + int arrivalTime, int departTime, bool terminal, int? actualMinStopTime, float? keepClearFront, float? keepClearRear, bool forcePosition, bool closeupSignal, bool closeup, bool restrictPlatformToSignal, bool extendPlatformToSignal, bool endStop, STOPTYPE actualStopType) { @@ -21372,7 +21370,7 @@ private void UpdateCarSlack(float expectedLength) public void UpdateRemoteTrainPos(float elapsedClockSeconds) { float newDistanceTravelledM = DistanceTravelledM; - // float xx = 0; + // float xx = 0; if (updateMSGReceived) { @@ -21383,7 +21381,7 @@ public void UpdateRemoteTrainPos(float elapsedClockSeconds) if (doReverseTrav) { doReverseTrav = false; - ReverseFormation(doReverseMU == 1 ? true : false); + ReverseFormation(doReverseMU == 1? true : false); UpdateCarSlack(expectedLength);//update car slack first CalculatePositionOfCars(elapsedClockSeconds, SpeedMpS * elapsedClockSeconds); newDistanceTravelledM = DistanceTravelledM + (SpeedMpS * elapsedClockSeconds); @@ -21454,7 +21452,7 @@ public void UpdateRemoteTrainPos(float elapsedClockSeconds) { car.SpeedMpS = SpeedMpS; if (car.Flipped) car.SpeedMpS = -car.SpeedMpS; - car.AbsSpeedMpS = car.AbsSpeedMpS * (1 - elapsedClockSeconds) + targetSpeedMpS * elapsedClockSeconds; + car.AbsSpeedMpS = car.AbsSpeedMpS * (1 - elapsedClockSeconds ) + targetSpeedMpS * elapsedClockSeconds; if (car.IsDriveable && car is MSTSWagon) { (car as MSTSWagon).WheelSpeedMpS = SpeedMpS; @@ -21490,8 +21488,8 @@ public void UpdateRemoteTrainPos(float elapsedClockSeconds) #endif } } - // Trace.TraceWarning("SpeedMpS {0} LastSpeedMpS {1} AbsSpeedMpS {2} targetSpeedMpS {7} x {3} expectedTravelled {4} travelled {5} newDistanceTravelledM {6}", - // SpeedMpS, LastSpeedMpS, Cars[0].AbsSpeedMpS, xx, expectedTravelled, travelled, newDistanceTravelledM, targetSpeedMpS); +// Trace.TraceWarning("SpeedMpS {0} LastSpeedMpS {1} AbsSpeedMpS {2} targetSpeedMpS {7} x {3} expectedTravelled {4} travelled {5} newDistanceTravelledM {6}", +// SpeedMpS, LastSpeedMpS, Cars[0].AbsSpeedMpS, xx, expectedTravelled, travelled, newDistanceTravelledM, targetSpeedMpS); LastSpeedMpS = SpeedMpS; DistanceTravelledM = newDistanceTravelledM; diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/LocomotiveAttributes.cs b/Source/Orts.Simulation/Simulation/RollingStocks/LocomotiveAttributes.cs index 66b88a8f2b..ed97574ead 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/LocomotiveAttributes.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/LocomotiveAttributes.cs @@ -15,11 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Orts.Parsers.Msts; using System; using System.Collections.Generic; using System.Reflection; -using Microsoft.Xna.Framework; -using Orts.Parsers.Msts; namespace Orts.Simulation.RollingStocks { diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/MSTSControlTrailerCar.cs b/Source/Orts.Simulation/Simulation/RollingStocks/MSTSControlTrailerCar.cs index 60a69670bb..674119cca8 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/MSTSControlTrailerCar.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/MSTSControlTrailerCar.cs @@ -180,7 +180,7 @@ public override void Update(float elapsedClockSeconds) locog.GearBoxController.CurrentNotch = GearBoxController.CurrentNotch; locog.GearBoxController.SetValue((float)locog.GearBoxController.CurrentNotch); - locog.ChangeGearUp(); + locog.ChangeGearUp(); } if (ControlGearDown) @@ -188,7 +188,7 @@ public override void Update(float elapsedClockSeconds) locog.GearBoxController.CurrentNotch = GearBoxController.CurrentNotch; locog.GearBoxController.SetValue((float)locog.GearBoxController.CurrentNotch); - locog.ChangeGearDown(); + locog.ChangeGearDown(); } } @@ -203,7 +203,7 @@ public override void Update(float elapsedClockSeconds) } } } - + // Rest gear flags once all the cars have been processed ControlGearUp = false; ControlGearDown = false; diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs b/Source/Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs index 2069f2614d..baebad2691 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs @@ -31,22 +31,22 @@ //#define ALLOW_ORTS_SPECIFIC_ENG_PARAMETERS -using System; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Text; using Microsoft.Xna.Framework; using Orts.Formats.Msts; using Orts.Parsers.Msts; using Orts.Simulation.Physics; -using Orts.Simulation.RollingStocks.SubSystems.Brakes; using Orts.Simulation.RollingStocks.SubSystems.Controllers; using Orts.Simulation.RollingStocks.SubSystems.PowerSupplies; using Orts.Simulation.RollingStocks.SubSystems.PowerTransmissions; using ORTS.Common; -using ORTS.Scripting.Api; +using System.Diagnostics; +using System; +using System.IO; +using System.Text; using Event = Orts.Common.Event; +using ORTS.Scripting.Api; +using System.Linq; +using Orts.Simulation.RollingStocks.SubSystems.Brakes; namespace Orts.Simulation.RollingStocks { @@ -125,7 +125,7 @@ public enum DieselTransmissionTypes // diesel performance reporting public float DieselPerformanceTimeS = 0.0f; // Records the time since starting movement - public DieselEngines DieselEngines; + public DieselEngines DieselEngines; /// /// Used to accumulate a quantity that is not lost because of lack of precision when added to the Fuel level @@ -309,7 +309,7 @@ public override void LoadFromWagFile(string wagFilePath) } - + if (MaximumDieselEnginePowerW == 0) { MaximumDieselEnginePowerW = LocomotiveMaxRailOutputPowerW; // If no value set in ENG file, then set the Prime Mover power to same as RailOutputPower (typically the MaxPower value) @@ -541,7 +541,7 @@ public override void Restore(BinaryReader inf) CurrentLocomotiveSteamHeatBoilerWaterCapacityL = inf.ReadSingle(); DieselEngines.Restore(inf); ControllerFactory.Restore(GearBoxController, inf); - + } //================================================================================================// @@ -966,11 +966,11 @@ public override string GetDebugStatus() if (DieselEngines.HasGearBox && DieselTransmissionType == DieselTransmissionTypes.Mechanic) { - status.AppendFormat("\t{0} {1}-{2}", Simulator.Catalog.GetString("Gear"), DieselEngines[0].GearBox.CurrentGearIndex < 0 ? Simulator.Catalog.GetString("N") : (DieselEngines[0].GearBox.GearIndication).ToString(), DieselEngines[0].GearBox.GearBoxType); + status.AppendFormat("\t{0} {1}-{2}", Simulator.Catalog.GetString("Gear"), DieselEngines[0].GearBox.CurrentGearIndex < 0 ? Simulator.Catalog.GetString("N") : (DieselEngines[0].GearBox.GearIndication).ToString(), DieselEngines[0].GearBox.GearBoxType); } - status.AppendFormat("\t{0} {1}\t\t{2}\n", - Simulator.Catalog.GetString("Fuel"), - FormatStrings.FormatFuelVolume(DieselLevelL, IsMetric, IsUK), DieselEngines.GetStatus()); + status.AppendFormat("\t{0} {1}\t\t{2}\n", + Simulator.Catalog.GetString("Fuel"), + FormatStrings.FormatFuelVolume(DieselLevelL, IsMetric, IsUK), DieselEngines.GetStatus()); if (IsSteamHeatFitted && Train.PassengerCarsNumber > 0 && this.IsLeadLocomotive() && Train.CarSteamHeatOn) @@ -1059,14 +1059,14 @@ public string GetDPDebugStatus() { if (RemoteControlGroup == 1) { - throttle = Simulator.Catalog.GetParticularString("Notch", "B") + MathHelper.Clamp((Train.LeadLocomotive as MSTSLocomotive).DPDynamicBrakeController.CurrentNotch, 1, 8); + throttle = Simulator.Catalog.GetParticularString("Notch", "B") + MathHelper.Clamp((Train.LeadLocomotive as MSTSLocomotive).DPDynamicBrakeController.CurrentNotch, 1, 8); } else { // The clause here below leads to possible differences of one notch near the notch value, and therefore is commented - // if (DynamicBrakeController.NotchCount() > 3) - // throttle = Simulator.Catalog.GetParticularString("Notch", "B") + MathHelper.Clamp((DynamicBrakeController.GetNearestNotch(DynamicBrakePercent / 100f)), 1, 8); - // else + // if (DynamicBrakeController.NotchCount() > 3) + // throttle = Simulator.Catalog.GetParticularString("Notch", "B") + MathHelper.Clamp((DynamicBrakeController.GetNearestNotch(DynamicBrakePercent / 100f)), 1, 8); + // else throttle = Simulator.Catalog.GetParticularString("Notch", "B") + MathHelper.Clamp((Train.LeadLocomotive as MSTSLocomotive).DPDynamicBrakeController.GetNotch(DynamicBrakePercent / 100f), 1, 8); } } @@ -1263,13 +1263,13 @@ public static string GetDebugTableBase(int locomotivesInTrain) table += "\t\t"; table += "\n"; } - return table; + return table; } public static string GetDpuHeader(bool dpuVerticalFull, int locomotivesInTrain, int dpuMaxNumberOfEngines) { - if (MaxNumberOfEngines != dpuMaxNumberOfEngines || dpuVerticalFull ? DPULabels == null : DpuLabels == null) - SetDPULabels(dpuVerticalFull, dpuMaxNumberOfEngines); + if (MaxNumberOfEngines != dpuMaxNumberOfEngines || dpuVerticalFull? DPULabels == null : DpuLabels == null) + SetDPULabels(dpuVerticalFull , dpuMaxNumberOfEngines); string table = ""; for (var i = 0; i < (dpuVerticalFull ? DPULabels.Length : DpuLabels.Length); i++) { @@ -1382,7 +1382,7 @@ protected override void UpdateCarSteamHeat(float elapsedClockSeconds) // Calculate steam boiler usage values // Don't turn steam heat on until pressure valve has been opened, water and fuel capacity also needs to be present, and steam boiler is not locked out - if (CurrentSteamHeatPressurePSI > 0.1 && CurrentLocomotiveSteamHeatBoilerWaterCapacityL > 0 && DieselLevelL > 0 && !IsSteamHeatBoilerLockedOut) + if (CurrentSteamHeatPressurePSI > 0.1 && CurrentLocomotiveSteamHeatBoilerWaterCapacityL > 0 && DieselLevelL > 0 && !IsSteamHeatBoilerLockedOut) { // Set values for visible exhaust based upon setting of steam controller HeatingSteamBoilerVolumeM3pS = 1.5f * SteamHeatController.CurrentValue; @@ -1401,7 +1401,7 @@ protected override void UpdateCarSteamHeat(float elapsedClockSeconds) { Train.CarSteamHeatOn = false; // turn on steam effects on wagons } - + } } @@ -1429,7 +1429,7 @@ protected void NormalizeParams() if (DieselEngines.MSTSGearBoxParams.GearBoxMaxTractiveForceForGearsN.Count > 0) { if (ThrottleController != null && ThrottleController.MaximumValue > 1 && MaxForceN / DieselEngines.MSTSGearBoxParams.GearBoxMaxTractiveForceForGearsN[0] > 3) - // Tricky things have been made with this .eng file, see e.g Cravens 105; let's correct them + // Tricky things have been made with this .eng file, see e.g Cravens 105; let's correct them { for (int i = 0; i < DieselEngines.MSTSGearBoxParams.GearBoxMaxTractiveForceForGearsN.Count; i++) DieselEngines.MSTSGearBoxParams.GearBoxMaxTractiveForceForGearsN[i] *= ThrottleController.MaximumValue; @@ -1441,7 +1441,7 @@ protected void NormalizeParams() { if (cabView.CVFFile != null && cabView.CVFFile.CabViewControls != null && cabView.CVFFile.CabViewControls.Count > 0) { - foreach (var control in cabView.CVFFile.CabViewControls) + foreach ( var control in cabView.CVFFile.CabViewControls) { if (control is CVCDiscrete && control.ControlType.Type == CABViewControlTypes.THROTTLE && (control as CVCDiscrete).Values.Count > 0 && (control as CVCDiscrete).Values[(control as CVCDiscrete).Values.Count - 1] > 1) { diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs b/Source/Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs index 60c18c9cf8..57dcab2f53 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs @@ -27,15 +27,18 @@ * */ -using System; -using System.IO; -using System.Text; +using Microsoft.Xna.Framework; using Orts.Formats.Msts; using Orts.Parsers.Msts; using Orts.Simulation.RollingStocks.SubSystems.Controllers; using Orts.Simulation.RollingStocks.SubSystems.PowerSupplies; using ORTS.Common; using ORTS.Scripting.Api; +using System; +using System.Diagnostics; +using System.IO; +using System.Text; +using Event = Orts.Common.Event; namespace Orts.Simulation.RollingStocks { @@ -159,9 +162,9 @@ protected override void UpdateCarSteamHeat(float elapsedClockSeconds) { // Update water controller for steam boiler heating tank - WaterController.Update(elapsedClockSeconds); - if (WaterController.UpdateValue > 0.0) - Simulator.Confirmer.UpdateWithPerCent(CabControl.SteamHeatBoilerWater, CabSetting.Increase, WaterController.CurrentValue * 100); + WaterController.Update(elapsedClockSeconds); + if (WaterController.UpdateValue > 0.0) + Simulator.Confirmer.UpdateWithPerCent(CabControl.SteamHeatBoilerWater, CabSetting.Increase, WaterController.CurrentValue * 100); CurrentSteamHeatPressurePSI = SteamHeatController.CurrentValue * MaxSteamHeatPressurePSI; diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs b/Source/Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs index 08e1dc030b..780aba86cc 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs @@ -44,12 +44,8 @@ // Debug for Advanced Adhesion Model // #define DEBUG_ADHESION -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Orts.Common; using Orts.Formats.Msts; using Orts.MultiPlayer; @@ -63,6 +59,11 @@ using Orts.Simulation.RollingStocks.SubSystems.PowerTransmissions; using ORTS.Common; using ORTS.Scripting.Api; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; using Event = Orts.Common.Event; namespace Orts.Simulation.RollingStocks @@ -172,7 +173,7 @@ public enum SoundState public float MaxTotalCombinedWaterVolumeUKG; public MSTSNotchController WaterController = new MSTSNotchController(0, 1, 0.01f); public float CombinedTenderWaterVolumeUKG // Decreased by running injectors and increased by refilling - { + { get { return WaterController.CurrentValue * MaxTotalCombinedWaterVolumeUKG; } set { WaterController.CurrentValue = value / MaxTotalCombinedWaterVolumeUKG; } } @@ -274,7 +275,7 @@ public bool SmallEjectorSoundOn { if (value != _SmallEjectorSoundOn) { - SignalEvent(value ? Event.SmallEjectorOn : Event.SmallEjectorOff); + SignalEvent(value? Event.SmallEjectorOn : Event.SmallEjectorOff); _SmallEjectorSoundOn = value; } } @@ -288,11 +289,11 @@ public bool LargeEjectorSoundOn { if (value != _LargeEjectorSoundOn) { - SignalEvent(value ? Event.LargeEjectorOn : Event.LargeEjectorOff); + SignalEvent(value? Event.LargeEjectorOn : Event.LargeEjectorOff); _LargeEjectorSoundOn = value; } } - } + } public bool DriveWheelOnlyBrakes = false; public bool SteamEngineBrakeFitted = false; @@ -416,7 +417,7 @@ public float OdometerM protected const float DefaultMainResVolume = 0.78f; // Value to be inserted if .eng parameters are corrected protected const float DefaultMaxMainResPressure = 140; // Max value to be inserted if .eng parameters are corrected - public List CabViewList = new List(); +public List CabViewList = new List(); public CabView3D CabView3D; public MSTSNotchController SteamHeatController = new MSTSNotchController(0, 1, 0.1f); @@ -473,8 +474,8 @@ public enum TractionMotorTypes public MSTSLocomotive(Simulator simulator, string wagPath) : base(simulator, wagPath) { - // BrakePipeChargingRatePSIpS = Simulator.Settings.BrakePipeChargingRate; - + // BrakePipeChargingRatePSIpS = Simulator.Settings.BrakePipeChargingRate; + MilepostUnitsMetric = Simulator.TRK.Tr_RouteFile.MilepostUnitsMetric; BrakeCutsPowerAtBrakeCylinderPressurePSI = 4.0f; @@ -612,7 +613,7 @@ protected void CheckCoherence() DynamicBrakeForceCurves[1] = interp; } } - + protected MSTSNotchController BuildDPDynamicBrakeController() { var dpDynController = new MSTSNotchController(); @@ -631,10 +632,10 @@ protected MSTSNotchController BuildDPDynamicBrakeController() { try { - msDisplay = (CVCMultiStateDisplay)cabView.CVFFile.CabViewControls.Where( + msDisplay = (CVCMultiStateDisplay) cabView.CVFFile.CabViewControls.Where( control => control is CVCMultiStateDisplay && - (((CVCMultiStateDisplay)control).ControlType.Type == CABViewControlTypes.DYNAMIC_BRAKE_DISPLAY || - ((CVCMultiStateDisplay)control).ControlType.Type == CABViewControlTypes.CPH_DISPLAY)).First(); + (((CVCMultiStateDisplay) control).ControlType.Type == CABViewControlTypes.DYNAMIC_BRAKE_DISPLAY || + ((CVCMultiStateDisplay) control).ControlType.Type == CABViewControlTypes.CPH_DISPLAY)).First(); } catch { @@ -645,13 +646,13 @@ protected MSTSNotchController BuildDPDynamicBrakeController() if (msDisplay.ControlType.Type == CABViewControlTypes.DYNAMIC_BRAKE_DISPLAY) { foreach (var switchval in msDisplay.Values) - dpDynController.AddNotch((float)switchval); + dpDynController.AddNotch((float) switchval); } else { foreach (var switchval in msDisplay.Values) { - if (switchval < CombinedControlSplitPosition) + if (switchval 0 && MaxContinuousForceN > 0 && (MaxDynamicBrakeForceN / MaxContinuousForceN < 0.3f && MaxDynamicBrakeForceN == 20000)) - MaxDynamicBrakeForceN = Math.Min(MaxContinuousForceN * 0.5f, 150000); // 20000 is suggested as standard value in the MSTS documentation, but in general it is a too low value + MaxDynamicBrakeForceN = Math.Min (MaxContinuousForceN * 0.5f, 150000); // 20000 is suggested as standard value in the MSTS documentation, but in general it is a too low value } } @@ -1919,7 +1919,7 @@ public override void Update(float elapsedClockSeconds) { gearloco.DieselEngines[ii].GearBox.currentGearIndex = gearloco.DieselEngines[0].GearBox.CurrentGearIndex; } - + ii = ii + 1; } @@ -1929,7 +1929,7 @@ public override void Update(float elapsedClockSeconds) if (gearloco != null && gearloco.DieselTransmissionType == MSTSDieselLocomotive.DieselTransmissionTypes.Mechanic && GearBoxController.CurrentNotch != previousChangedGearBoxNotch && IsLeadLocomotive()) { - + foreach (TrainCar car in Train.Cars) { var locog = car as MSTSDieselLocomotive; @@ -1979,11 +1979,11 @@ public override void Update(float elapsedClockSeconds) } if (!AdvancedAdhesionModel) // Advanced adhesion model turned off. - AbsWheelSpeedMpS = AbsSpeedMpS; + AbsWheelSpeedMpS = AbsSpeedMpS; // Cruise Control CruiseControl?.Update(elapsedClockSeconds); - + // TODO this is a wild simplification for electric and diesel electric UpdateTractiveForce(elapsedClockSeconds, ThrottlePercent / 100f, AbsSpeedMpS, AbsWheelSpeedMpS); @@ -2005,7 +2005,7 @@ public override void Update(float elapsedClockSeconds) if (f > 0 && LocomotivePowerSupply.DynamicBrakeAvailable) { DynamicBrakeForceN = f * (1 - PowerReduction); - MotiveForceN -= (SpeedMpS > 0 ? 1 : SpeedMpS < 0 ? -1 : Direction == Direction.Reverse ? -1 : 1) * DynamicBrakeForceN; + MotiveForceN -= (SpeedMpS > 0 ? 1 : SpeedMpS < 0 ? -1 : Direction == Direction.Reverse ? -1 : 1) * DynamicBrakeForceN; } else { @@ -2014,7 +2014,7 @@ public override void Update(float elapsedClockSeconds) } else DynamicBrakeForceN = 0; // Set dynamic brake force to zero if in Notch 0 position - + UpdateFrictionCoefficient(elapsedClockSeconds); // Find the current coefficient of friction depending upon the weather @@ -2043,7 +2043,7 @@ public override void Update(float elapsedClockSeconds) { foreach (DieselEngine de in (this as MSTSDieselLocomotive).DieselEngines) { - if (de.GearBox != null) + if (de.GearBox != null) de.GearBox.GearBoxOperation = GearBoxOperation.Automatic; } } @@ -2077,7 +2077,7 @@ public override void Update(float elapsedClockSeconds) } // SimpleControlPhysics and if locomotive is a control car advanced adhesion will be "disabled". - if (Simulator.UseAdvancedAdhesion && !Simulator.Settings.SimpleControlPhysics && EngineType != EngineTypes.Control) + if (Simulator.UseAdvancedAdhesion && !Simulator.Settings.SimpleControlPhysics && EngineType != EngineTypes.Control) { AdvancedAdhesion(elapsedClockSeconds); // Use advanced adhesion model AdvancedAdhesionModel = true; // Set flag to advise advanced adhesion model is in use @@ -2117,10 +2117,10 @@ public override void Update(float elapsedClockSeconds) } // always set AntiSlip for AI trains - if (Train.TrainType == Train.TRAINTYPE.AI || Train.TrainType == Train.TRAINTYPE.AI_PLAYERHOSTING) - { - AntiSlip = true; - } + if (Train.TrainType == Train.TRAINTYPE.AI || Train.TrainType == Train.TRAINTYPE.AI_PLAYERHOSTING) + { + AntiSlip = true; + } // If the train is vacuumed braked then no need to update the compressor, but udate the ejector instead if (BrakeSystem is VacuumSinglePipe) @@ -2331,7 +2331,7 @@ protected virtual void UpdateControllers(float elapsedClockSeconds) //Currently the ThrottlePercent is global to the entire train //So only the lead locomotive updates it, the others only updates the controller (actually useless) if (this.IsLeadLocomotive()) - // if (this.IsLeadLocomotive() || RemoteControlGroup == -1) +// if (this.IsLeadLocomotive() || RemoteControlGroup == -1) { var throttleCurrentNotch = ThrottleController.CurrentNotch; ThrottleController.Update(elapsedClockSeconds); @@ -2539,12 +2539,12 @@ public void ConfirmWheelslip(float elapsedClockSeconds) /// protected virtual void UpdateSteamEjector(float elapsedClockSeconds) { - // Ejectors are controlled independently for the "straight_vacuum_single_pipe" brake type - // Ejectors are controlled by brake control valves in Simple Physics Control - if (Simulator.Settings.SimpleControlPhysics && CarBrakeSystemType != "straight_vacuum_single_pipe") - // Simple braking - control Ejector automatically based upon the brake control position - // Stop ejector operation if full vacuum pressure reached - { + // Ejectors are controlled independently for the "straight_vacuum_single_pipe" brake type + // Ejectors are controlled by brake control valves in Simple Physics Control + if (Simulator.Settings.SimpleControlPhysics && CarBrakeSystemType != "straight_vacuum_single_pipe") + // Simple braking - control Ejector automatically based upon the brake control position + // Stop ejector operation if full vacuum pressure reached + { if ((TrainBrakeController.TrainBrakeControllerState == ControllerState.Release || TrainBrakeController.TrainBrakeControllerState == ControllerState.FullQuickRelease || (TrainBrakeController.TrainBrakeControllerState == ControllerState.VacContServ)) && (this.BrakeSystem.BrakeLine1PressurePSI > Vac.ToPress(this.TrainBrakeController.MaxPressurePSI))) { LargeSteamEjectorIsOn = true; // If brake is set to a release controller, then turn ejector on @@ -2555,41 +2555,41 @@ protected virtual void UpdateSteamEjector(float elapsedClockSeconds) LargeSteamEjectorIsOn = false; // If brake is not set to a release controller, or full vacuum reached, then turn ejector off LargeEjectorSoundOn = false; } - } - else if (!LargeEjectorControllerFitted && CarBrakeSystemType != "straight_vacuum_single_pipe") // Use an "automatic" large ejector when using a dreadnought style brake controller - large ejector stays on until moved back to released position - { - if (TrainBrakeController.TrainBrakeControllerState == ControllerState.Release) - { - LargeSteamEjectorIsOn = true; // If brake is set to a release controller, then turn ejector on - LargeEjectorSoundOn = true; } - else + else if (!LargeEjectorControllerFitted && CarBrakeSystemType != "straight_vacuum_single_pipe") // Use an "automatic" large ejector when using a dreadnought style brake controller - large ejector stays on until moved back to released position { - LargeSteamEjectorIsOn = false; // If brake is not set to a release controller, then turn ejector off - if (LargeEjectorSoundOn) + if (TrainBrakeController.TrainBrakeControllerState == ControllerState.Release) { - SignalEvent(Event.LargeEjectorOff); - LargeEjectorSoundOn = false; + LargeSteamEjectorIsOn = true; // If brake is set to a release controller, then turn ejector on + LargeEjectorSoundOn = true; + } + else + { + LargeSteamEjectorIsOn = false; // If brake is not set to a release controller, then turn ejector off + if (LargeEjectorSoundOn) + { + SignalEvent(Event.LargeEjectorOff); + LargeEjectorSoundOn = false; + } } - } - } - else if (LargeEjectorControllerFitted)// Advanced braking - control ejector based upon using a "manual" large ejector control setting - { - if (LargeEjectorFeedFraction > 0.05) - { - LargeSteamEjectorIsOn = true; // turn ejector on - LargeEjectorSoundOn = true; } - else + else if (LargeEjectorControllerFitted)// Advanced braking - control ejector based upon using a "manual" large ejector control setting { - LargeSteamEjectorIsOn = false; // turn ejector off - LargeEjectorSoundOn = false; + if (LargeEjectorFeedFraction > 0.05) + { + LargeSteamEjectorIsOn = true; // turn ejector on + LargeEjectorSoundOn = true; + } + else + { + LargeSteamEjectorIsOn = false; // turn ejector off + LargeEjectorSoundOn = false; + } } - } - if (SmallEjectorControllerFitted && CarBrakeSystemType != "straight_vacuum_single_pipe") + if (SmallEjectorControllerFitted && CarBrakeSystemType != "straight_vacuum_single_pipe") // Turn small ejector on if controlled from drivers controller if (SmallEjectorFeedFraction > 0.05) { @@ -2602,7 +2602,7 @@ protected virtual void UpdateSteamEjector(float elapsedClockSeconds) SmallEjectorSoundOn = false; } - + // If diesel or electric locomotive, assume vacuum pump (exhauster) is continually running. if (!(this is MSTSSteamLocomotive)) { @@ -2826,7 +2826,7 @@ public virtual void AdvancedAdhesion(float elapsedClockSeconds) WheelSlip = LocomotiveAxle.IsWheelSlip; //Get the wheelslip indicator WheelSlipWarning = LocomotiveAxle.IsWheelSlipWarning && SlipControlSystem != SlipControlType.Full; } - + // This enables steam locomotives to have different speeds for driven and non-driven wheels. if (EngineType == EngineTypes.Steam && SteamEngineType != MSTSSteamLocomotive.SteamEngineTypes.Geared) { @@ -2841,7 +2841,7 @@ public virtual void AdvancedAdhesion(float elapsedClockSeconds) WheelSpeedMpS = SpeedMpS; } } - else WheelSpeedMpS = LocomotiveAxle.AxleSpeedMpS; + else WheelSpeedMpS = LocomotiveAxle.AxleSpeedMpS; } @@ -2854,14 +2854,14 @@ public void SimpleAdhesion() WheelSpeedMpS = AbsSpeedMpS; return; } - + if (LocoNumDrvAxles <= 0) return; //Curtius-Kniffler computation // Set to a high level of adhesion to ensure that locomotive rarely slips in dry mode float uMax = 1.3f * (7.5f / (AbsSpeedMpS + 44.0f) + 0.161f); // Curtius - Kniffler equation - + float max0 = DrvWheelWeightKg * 9.81f * uMax; //Ahesion limit in [N] float max1; @@ -2954,7 +2954,7 @@ public virtual void UpdateWaterTroughRefill(float elapsedClockSeconds, float abs else if (ScoopIsBroken) { Simulator.Confirmer.Message(ConfirmLevel.Error, Simulator.Catalog.GetString("Scoop is broken, can't refill")); - RefillingFromTrough = false; + RefillingFromTrough = false; } else if (IsOverJunction()) { @@ -2964,7 +2964,7 @@ public virtual void UpdateWaterTroughRefill(float elapsedClockSeconds, float abs } ScoopIsBroken = true; RefillingFromTrough = false; - SignalEvent(Event.WaterScoopBroken); + SignalEvent(Event.WaterScoopBroken); } else if (!IsOverTrough()) { @@ -3147,7 +3147,7 @@ public virtual void UpdateFrictionCoefficient(float elapsedClockSeconds) } else if (pric > 0) { - pricBaseFrictionCoefficientFactor = Math.Min((pric - 5f) * precGrad + 0.6f, 0.9f); + pricBaseFrictionCoefficientFactor = Math.Min((pric - 5f) * precGrad + 0.6f, 0.9f); // should give a value between 0.6 and 0.9 } @@ -3179,7 +3179,7 @@ public virtual void UpdateFrictionCoefficient(float elapsedClockSeconds) } } - BaseFrictionCoefficientFactor = MathHelper.Clamp(BaseFrictionCoefficientFactor, 0.5f, 1.0f); + BaseFrictionCoefficientFactor = MathHelper.Clamp(BaseFrictionCoefficientFactor, 0.5f, 1.0f); // Snow covered track if (Simulator.WeatherType == WeatherType.Snow) @@ -3271,7 +3271,7 @@ public virtual void UpdateFrictionCoefficient(float elapsedClockSeconds) float WagonCurtius_KnifflerA = 7.5f; float WagonCurtius_KnifflerB = 44.0f; float WagonCurtius_KnifflerC = 0.161f; - + float WagonBaseuMax = (WagonCurtius_KnifflerA / (MpS.ToKpH(AbsSpeedMpS) + WagonCurtius_KnifflerB) + WagonCurtius_KnifflerC); Train.WagonCoefficientFriction = WagonBaseuMax * BaseFrictionCoefficientFactor; // Find friction coefficient factor for wagons based upon environmental conditions WagonCoefficientFrictionHUD = Train.WagonCoefficientFriction; // Save value for HUD display @@ -3296,7 +3296,7 @@ public virtual void UpdateFrictionCoefficient(float elapsedClockSeconds) LocomotiveAxle.AdhesionLimit = AdhesionConditions * BaseuMax; } - // Set adhesion conditions for other steam locomotives + // Set adhesion conditions for other steam locomotives if (EngineType == EngineTypes.Steam && SteamEngineType != MSTSSteamLocomotive.SteamEngineTypes.Geared) // ToDo explore adhesion factors { LocomotiveCoefficientFrictionHUD = Train.LocomotiveCoefficientFriction; // Set display value for HUD - steam @@ -3312,9 +3312,9 @@ public virtual void UpdateFrictionCoefficient(float elapsedClockSeconds) public void UpdateTrackSander(float elapsedClockSeconds) { - // updates track sander in terms of sand usage and impact on air compressor - // The following assumptions have been made: - // + // updates track sander in terms of sand usage and impact on air compressor + // The following assumptions have been made: + // if (Sander) // If sander is on adjust parameters { @@ -3330,9 +3330,9 @@ public void UpdateTrackSander(float elapsedClockSeconds) } } - // Calculate air consumption and change in main air reservoir pressure + // Calculate air consumption and change in main air reservoir pressure float ActualAirConsumptionM3pS = pS.FrompM(TrackSanderAirComsumptionM3pS) * elapsedClockSeconds; - float SanderPressureDiffPSI = ActualAirConsumptionM3pS / Me3.ToFt3(MainResVolumeM3); + float SanderPressureDiffPSI = ActualAirConsumptionM3pS / Me3.ToFt3(MainResVolumeM3) ; MainResPressurePSI -= SanderPressureDiffPSI; MainResPressurePSI = MathHelper.Clamp(MainResPressurePSI, 0.001f, MaxMainResPressurePSI); } @@ -3343,7 +3343,7 @@ public override bool GetSanderOn() { return Sander; } - + #region Reverser public void SetDirection(Direction direction) { @@ -3601,13 +3601,13 @@ public void StartThrottleDecrease() if (!mpc.StateChanged) { mpc.StateChanged = true; - mpc.DoMovement(MultiPositionController.Movement.Aft); + mpc.DoMovement(MultiPositionController.Movement.Aft); } return; } if (CruiseControl != null && (CombinedControlType == CombinedControl.None || CruiseControl.UseThrottleInCombinedControl)) { - if (CruiseControl.UseThrottleAsForceSelector && CruiseControl.SpeedRegMode == CruiseControl.SpeedRegulatorMode.Auto && + if (CruiseControl.UseThrottleAsForceSelector && CruiseControl.SpeedRegMode == CruiseControl.SpeedRegulatorMode.Auto && !(CruiseControl.DynamicBrakeCommandHasPriorityOverCruiseControl && (CruiseControl.DynamicBrakePriority || CruiseControl.SelectedMaxAccelerationPercent == 0))) { @@ -3765,7 +3765,7 @@ public void ToggleWaterScoop() WaterScoopSlowSpeedFlag = false; WaterScoopDirectionFlag = false; } - Simulator.Confirmer.Confirm(CabControl.WaterScoop, WaterScoopDown ? CabSetting.On : CabSetting.Off); + Simulator.Confirmer.Confirm(CabControl.WaterScoop, WaterScoopDown? CabSetting.On : CabSetting.Off); } } @@ -3777,7 +3777,7 @@ public void ToggleWaterScoop() public void ThrottleChangeTo(bool increase, float? target) { if ((CruiseControl != null && target != 0 && CruiseControl.SelectedMaxAccelerationPercent <= 0 - && ThrottleController.CurrentValue == 0 && DynamicBrakeController.CurrentValue == 0) && + && ThrottleController.CurrentValue == 0 && DynamicBrakeController.CurrentValue == 0) && (CruiseControl.DisableCruiseControlOnThrottleAndZeroForce || CruiseControl.DisableCruiseControlOnThrottleAndZeroForceAndZeroSpeed && CruiseControl.SelectedSpeedMpS == 0)) { if (CruiseControl.ZeroSelectedSpeedWhenPassingToThrottleMode) CruiseControl.SetSpeed(0); @@ -3965,7 +3965,7 @@ public float GetThrottleHandleValue(float data) /// public void SetCombinedHandleValue(float value) { - bool ccUseCombinedControl = CruiseControl != null && (CruiseControl.UseThrottleAsForceSelector || CruiseControl.UseThrottleAsSpeedSelector) && CruiseControl.UseThrottleInCombinedControl; + bool ccUseCombinedControl = CruiseControl != null && (CruiseControl.UseThrottleAsForceSelector || CruiseControl.UseThrottleAsSpeedSelector ) && CruiseControl.UseThrottleInCombinedControl; if (CombinedControlType == CombinedControl.ThrottleDynamic && DynamicBrake && !TrainControlSystem.FullDynamicBrakingOrder && !(ccUseCombinedControl && !CruiseControl.DynamicBrakePriority && CruiseControl.SpeedRegMode == CruiseControl.SpeedRegulatorMode.Auto)) { @@ -4014,7 +4014,7 @@ public float GetCombinedHandleValue(bool intermediateValue) { if (!CruiseControl.DynamicBrakePriority && CombinedControlType == CombinedControl.ThrottleDynamic || !CruiseControl.TrainBrakePriority && CombinedControlType == CombinedControl.ThrottleAir) - return CombinedControlSplitPosition * (1 - (CruiseControl.SelectedSpeedMpS / MaxSpeedMpS)); + return CombinedControlSplitPosition * (1 - (CruiseControl.SelectedSpeedMpS / MaxSpeedMpS)); } } @@ -4086,7 +4086,7 @@ public virtual void StartGearBoxIncrease() if (ThrottlePercent == 0) { GearBoxController.StartIncrease(); - Simulator.Confirmer.ConfirmWithPerCent(CabControl.GearBox, CabSetting.Increase, dieselloco.DieselEngines[0].GearBox.GearIndication); + Simulator.Confirmer.ConfirmWithPerCent(CabControl.GearBox, CabSetting.Increase, dieselloco.DieselEngines[0].GearBox.GearIndication ); AlerterReset(TCSEvent.GearBoxChanged); SignalGearBoxChangeEvents(); dieselloco.DieselEngines[0].GearBox.clutchOn = false; @@ -4120,7 +4120,7 @@ public virtual void StopGearBoxIncrease() public virtual void ChangeGearDown() { - + } public virtual void StartGearBoxDecrease() @@ -4322,11 +4322,11 @@ public override string GetTrainBrakeStatus() { var train = Simulator.PlayerLocomotive.Train;//Debrief Eval string s = TrainBrakeController.GetStatus(); - + if (s == "Emergency" && train.LeadLocomotive != null && !ldbfevalfulltrainbrakeunder8kmh && train.LeadLocomotive.IsPlayerTrain && Math.Abs(train.SpeedMpS) < 2.22222) { - + DbfEvalFullTrainBrakeUnder8kmh++; ldbfevalfulltrainbrakeunder8kmh = true; train.DbfEvalValueChanged = true;//Debrief eval @@ -4508,7 +4508,7 @@ public void StartBrakemanBrakeIncrease(float? target) BrakemanBrakeController.StartIncrease(target); Simulator.Confirmer.Confirm(CabControl.BrakemanBrake, CabSetting.Increase, GetBrakemanBrakeStatus()); - // SignalEvent(Event.EngineBrakeChange); +// SignalEvent(Event.EngineBrakeChange); } /// @@ -4519,7 +4519,7 @@ public void StopBrakemanBrakeIncrease() if (BrakemanBrakeController == null) return; - // AlerterReset(TCSEvent.BrakemanBrakeChanged); + // AlerterReset(TCSEvent.BrakemanBrakeChanged); BrakemanBrakeController.StopIncrease(); new BrakemanBrakeCommand(Simulator.Log, true, BrakemanBrakeController.CurrentValue, BrakemanBrakeController.CommandStartTime); } @@ -4533,7 +4533,7 @@ public void StartBrakemanBrakeDecrease(float? target) BrakemanBrakeController.StartDecrease(target); BrakemanBrakeController.CommandStartTime = Simulator.ClockTime; // Remember when the command was issued Simulator.Confirmer.Confirm(CabControl.BrakemanBrake, CabSetting.Increase, GetBrakemanBrakeStatus()); - // SignalEvent(Event.BrakemanBrakeChange); + // SignalEvent(Event.BrakemanBrakeChange); } /// @@ -4560,7 +4560,7 @@ public void BrakemanBrakeChangeTo(bool increase, float? target) } else { - if (target < BrakemanBrakeController.CurrentValue) + if (target 0, controller.CurrentValue, Simulator.ClockTime); - // SignalEvent(Event.BrakemanBrakeChange); + // SignalEvent(Event.BrakemanBrakeChange); AlerterReset(TCSEvent.BrakemanBrakeChanged); } if (oldValue != controller.IntermediateValue) - Simulator.Confirmer.Update(CabControl.BrakemanBrake, oldValue < controller.IntermediateValue ? CabSetting.Increase : CabSetting.Decrease, GetBrakemanBrakeStatus()); + Simulator.Confirmer.Update(CabControl.BrakemanBrake, oldValue 0) { data = (data / MaxForceN) * MaxCurrentA; - } + } if (DynamicBrakePercent > 0) { data = (DynamicBrakeForceN / MaxDynamicBrakeForceN) * DynamicBrakeMaxCurrentA; } data = Math.Abs(data); break; - + case CABViewControlUnits.NEWTONS: break; - + case CABViewControlUnits.KILO_NEWTONS: data = data / 1000.0f; break; - + case CABViewControlUnits.KILO_LBS: data = N.ToLbf(data) * 0.001f; break; - } + } if (direction == 1 && !(cvc is CVCGauge)) data = -data; break; @@ -5270,11 +5270,11 @@ public virtual float GetDataOf(CabViewControl cvc) data = N.ToLbf(data) * 0.001f; break; } - // if (direction == 1 && !(cvc is CVCGauge)) - // data = -data; + // if (direction == 1 && !(cvc is CVCGauge)) + // data = -data; break; } - // this considers both the dynamic as well as the train braking + // this considers both the dynamic as well as the train braking case CABViewControlTypes.ORTS_SIGNED_TRACTION_TOTAL_BRAKING: { var direction = 0; // Forwards @@ -5420,12 +5420,12 @@ public virtual float GetDataOf(CabViewControl cvc) if (EngineType == EngineTypes.Control && activeloco.DieselEngines.NumOfActiveEngines > 1) { - + if (activeloco.DieselEngines[1] != null) data = activeloco.DieselEngines[1].RealRPM; } else if (EngineType == EngineTypes.Diesel && mstsDieselLocomotive.DieselEngines.NumOfActiveEngines > 1) - { + { if (mstsDieselLocomotive.DieselEngines[1] != null) data = mstsDieselLocomotive.DieselEngines[1].RealRPM; } @@ -5490,7 +5490,7 @@ public virtual float GetDataOf(CabViewControl cvc) case CABViewControlTypes.CPH_DISPLAY: { if (CruiseControl != null && CruiseControl.SkipThrottleDisplay) break; - data = Train.TrainType == Train.TRAINTYPE.AI_PLAYERHOSTING ? ThrottlePercent / 100f : LocalThrottlePercent / 100f; + data = Train.TrainType == Train.TRAINTYPE.AI_PLAYERHOSTING? ThrottlePercent / 100f : LocalThrottlePercent / 100f; break; } case CABViewControlTypes.ENGINE_BRAKE: @@ -5778,7 +5778,7 @@ public virtual float GetDataOf(CabViewControl cvc) dieselLoco.DieselEngines[0].State == DieselEngineState.Starting) ? 1 : 0; break; } - } + } } break; } diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs b/Source/Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs index 3d818d63a0..8deb30c186 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs @@ -63,20 +63,20 @@ * LocomotiveViewer - provides basic animation for running gear, wipers, etc * */ -using System; -using System.Diagnostics; -using System.IO; -using System.Text; using Microsoft.Xna.Framework; using Orts.Common; using Orts.Formats.Msts; using Orts.Parsers.Msts; using Orts.Simulation.Physics; -using Orts.Simulation.RollingStocks.SubSystems.Brakes.MSTS; using Orts.Simulation.RollingStocks.SubSystems.Controllers; -using Orts.Simulation.RollingStocks.SubSystems.PowerSupplies; +using Orts.Simulation.RollingStocks.SubSystems.Brakes.MSTS; using ORTS.Common; +using System; +using System.Diagnostics; +using System.IO; +using System.Text; using Event = Orts.Common.Event; +using Orts.Simulation.RollingStocks.SubSystems.PowerSupplies; namespace Orts.Simulation.RollingStocks { @@ -330,7 +330,7 @@ public class MSTSSteamLocomotive : MSTSLocomotive float BoilerSurfaceAreaFt2; float FractionBoilerAreaInsulated; float BoilerHeatRadiationLossBTU; // Heat loss of boiler (hourly value) - + #region Additional steam properties const float SpecificHeatCoalKJpKGpK = 1.26f; // specific heat of coal - kJ/kg/K const float SteamVaporSpecVolumeAt100DegC1BarM3pKG = 1.696f; @@ -784,7 +784,7 @@ public override void Parse(string lowercasetoken, STFReader stf) switch (lowercasetoken) { case "engine(numcylinders": NumCylinders = stf.ReadIntBlock(null); break; - case "engine(ortswheelcrankangledifference": + case "engine(ortswheelcrankangledifference": stf.MustMatch("("); Cylinder1CrankAngleRad = stf.ReadFloat(STFReader.UNITS.Angle, 0.0f); Cylinder2CrankAngleRad = stf.ReadFloat(STFReader.UNITS.Angle, 0.0f); @@ -802,8 +802,7 @@ public override void Parse(string lowercasetoken, STFReader stf) case "engine(boilervolume": BoilerVolumeFT3 = stf.ReadFloatBlock(STFReader.UNITS.VolumeDefaultFT3, null); break; case "engine(maxboilerpressure": MaxBoilerPressurePSI = stf.ReadFloatBlock(STFReader.UNITS.PressureDefaultPSI, null); break; case "engine(ortsmaxsuperheattemperature": MaxSuperheatRefTempF = stf.ReadFloatBlock(STFReader.UNITS.Temperature, null); break; - case "engine(ortsmaxindicatedhorsepower": - MaxIndicatedHorsePowerHP = stf.ReadFloatBlock(STFReader.UNITS.Power, null); + case "engine(ortsmaxindicatedhorsepower": MaxIndicatedHorsePowerHP = stf.ReadFloatBlock(STFReader.UNITS.Power, null); MaxIndicatedHorsePowerHP = W.ToHp(MaxIndicatedHorsePowerHP); // Convert input to HP for use internally in this module break; case "engine(vacuumbrakeslargeejectorusagerate": EjectorLargeSteamConsumptionLbpS = pS.FrompH(stf.ReadFloatBlock(STFReader.UNITS.MassRateDefaultLBpH, null)); break; @@ -1125,7 +1124,7 @@ public override void Initialize() ConnectingRodWeightLb = 600.0f * reductionfactor; // Weignt of connecting rod ConnectingRodBalanceWeightLb = 300.0f * reductionfactor; // Balance weight for connecting rods } - else if (MassKG < Kg.FromTUS(20)) + else if (MassKG < Kg.FromTUS(20)) { const float reductionfactor = 0.3f; ReciprocatingWeightLb = 580.0f * reductionfactor; // Weight of reciprocating parts of the rod driving gears @@ -1300,11 +1299,11 @@ public override void Initialize() WheelCrankAngleDiffRad[3] = Cylinder4CrankAngleRad; } - // ****************** Test Locomotive and Gearing type *********************** + // ****************** Test Locomotive and Gearing type *********************** - // If the maximum cutoff for the locomotive is less then the default tractive effort constant value, then flag to the user to check. See this reference - - // https://babel.hathitrust.org/cgi/pt?id=wu.89089676290&view=1up&seq=510&skin=2021&q1=booster - if (CutoffController.MaximumValue < TractiveEffortFactor && Simulator.Settings.VerboseConfigurationMessages && (CutoffController.MaximumValue < 0.7 || TractiveEffortFactor >= 0.85)) + // If the maximum cutoff for the locomotive is less then the default tractive effort constant value, then flag to the user to check. See this reference - + // https://babel.hathitrust.org/cgi/pt?id=wu.89089676290&view=1up&seq=510&skin=2021&q1=booster + if (CutoffController.MaximumValue < TractiveEffortFactor && Simulator.Settings.VerboseConfigurationMessages && ( CutoffController.MaximumValue < 0.7 || TractiveEffortFactor >= 0.85)) { Trace.TraceInformation("Maximum Cutoff setting {0} is less then the TractiveEffortFactor {1}, is this correct?", CutoffController.MaximumValue, TractiveEffortFactor); } @@ -1825,7 +1824,7 @@ public override void Initialize() MaxBoilerOutputHP = MaxBoilerOutputLBpH / SteamperIHPh; // Calculate boiler output power // if MaxIHP is set in ENG file, and is a geared (mainly selectable model) locomotive then retain a copy of the original value - if (MaxIndicatedHorsePowerHP != 0) + if (MaxIndicatedHorsePowerHP != 0) { RetainedGearedMaxMaxIndicatedHorsePowerHP = MaxIndicatedHorsePowerHP; } @@ -1846,7 +1845,7 @@ public override void Initialize() ISBoilerLimited = false; } } - + DisplayMaxIndicatedHorsePowerHP = MaxIndicatedHorsePowerHP; // If DrvWheelWeight is not in ENG file, then calculate from Factor of Adhesion(FoA) = DrvWheelWeight / Start (Max) Tractive Effort, assume FoA = 4.2 @@ -2102,8 +2101,8 @@ private void UpdateFX(float elapsedClockSeconds) for (int i = 0; i < NumCylinders; i++) { - // Trace.TraceInformation("NumCyl - {0} i {1}", NumCylinders, i); - +// Trace.TraceInformation("NumCyl - {0} i {1}", NumCylinders, i); + // float realCrankAngleRad = (float)(LocomotiveAxle.AxlePositionRad + i * WheelCrankAngleDiffRad[i]); float realCrankAngleRad = (float)(LocomotiveAxle.AxlePositionRad); float normalisedCrankAngleRad = 0; @@ -2137,7 +2136,7 @@ private void UpdateFX(float elapsedClockSeconds) exhaustCrankAngleRad = CylinderExhaustOpenFactor * (float)Math.PI + (float)Math.PI; } - // Trace.TraceInformation("Cylinder {0} ExhaustCrank {1} RealCrank {2} NormalCrank {3}", i + 1, MathHelper.ToDegrees(exhaustCrankAngleRad), MathHelper.ToDegrees(realCrankAngleRad), MathHelper.ToDegrees(normalisedCrankAngleRad)); +// Trace.TraceInformation("Cylinder {0} ExhaustCrank {1} RealCrank {2} NormalCrank {3}", i + 1, MathHelper.ToDegrees(exhaustCrankAngleRad), MathHelper.ToDegrees(realCrankAngleRad), MathHelper.ToDegrees(normalisedCrankAngleRad)); if (absSpeedMpS > 0.001) { @@ -2145,20 +2144,20 @@ private void UpdateFX(float elapsedClockSeconds) { CylinderSteamExhaust1On = true; - // Trace.TraceInformation("Exhaust - Factor {0} ExhaustCrank {1} RealCrank {2} NormalCrank {3} Exhaust1On {4} Cylinder {5} i {6}", CylinderExhaustOpenFactor, MathHelper.ToDegrees(exhaustCrankAngleRad), MathHelper.ToDegrees(realCrankAngleRad), MathHelper.ToDegrees(normalisedCrankAngleRad), CylinderSteamExhaust1On, i + 1, i); +// Trace.TraceInformation("Exhaust - Factor {0} ExhaustCrank {1} RealCrank {2} NormalCrank {3} Exhaust1On {4} Cylinder {5} i {6}", CylinderExhaustOpenFactor, MathHelper.ToDegrees(exhaustCrankAngleRad), MathHelper.ToDegrees(realCrankAngleRad), MathHelper.ToDegrees(normalisedCrankAngleRad), CylinderSteamExhaust1On, i + 1, i); } else if (i == 0) { CylinderSteamExhaust1On = false; - // Trace.TraceInformation("Test #1 {0}", CylinderSteamExhaust1On); +// Trace.TraceInformation("Test #1 {0}", CylinderSteamExhaust1On); } - + else if (i == 1 && ((normalisedCrankAngleRad <= MathHelper.Pi && normalisedCrankAngleRad >= exhaustCrankAngleRad) || (normalisedCrankAngleRad < 2 * MathHelper.Pi && normalisedCrankAngleRad >= exhaustCrankAngleRad))) { CylinderSteamExhaust2On = true; - // Trace.TraceInformation("Exhaust - Factor {0} ExhaustCrank {1} RealCrank {2} NormalCrank {3} Exhaust2On {4} Cylinder {5} i {6}", CylinderExhaustOpenFactor, MathHelper.ToDegrees(exhaustCrankAngleRad), MathHelper.ToDegrees(realCrankAngleRad), MathHelper.ToDegrees(normalisedCrankAngleRad), CylinderSteamExhaust2On, i + 1, i); +// Trace.TraceInformation("Exhaust - Factor {0} ExhaustCrank {1} RealCrank {2} NormalCrank {3} Exhaust2On {4} Cylinder {5} i {6}", CylinderExhaustOpenFactor, MathHelper.ToDegrees(exhaustCrankAngleRad), MathHelper.ToDegrees(realCrankAngleRad), MathHelper.ToDegrees(normalisedCrankAngleRad), CylinderSteamExhaust2On, i + 1, i); } - else if (i == 1) + else if (i ==1) { CylinderSteamExhaust2On = false; } @@ -2169,9 +2168,9 @@ private void UpdateFX(float elapsedClockSeconds) else if (i == 2 && ((normalisedCrankAngleRad <= MathHelper.Pi && normalisedCrankAngleRad >= exhaustCrankAngleRad) || (normalisedCrankAngleRad < 2 * MathHelper.Pi && normalisedCrankAngleRad >= exhaustCrankAngleRad))) { CylinderSteamExhaust3On = true; - // Trace.TraceInformation("Exhaust - Factor {0} ExhaustCrank {1} RealCrank {2} NormalCrank {3} Exhaust3On {4} Cylinder {5} i {6}", CylinderExhaustOpenFactor, MathHelper.ToDegrees(exhaustCrankAngleRad), MathHelper.ToDegrees(realCrankAngleRad), MathHelper.ToDegrees(normalisedCrankAngleRad), CylinderSteamExhaust3On, i + 1, i); +// Trace.TraceInformation("Exhaust - Factor {0} ExhaustCrank {1} RealCrank {2} NormalCrank {3} Exhaust3On {4} Cylinder {5} i {6}", CylinderExhaustOpenFactor, MathHelper.ToDegrees(exhaustCrankAngleRad), MathHelper.ToDegrees(realCrankAngleRad), MathHelper.ToDegrees(normalisedCrankAngleRad), CylinderSteamExhaust3On, i + 1, i); } - else if (i == 2) + else if (i ==2) { CylinderSteamExhaust3On = false; } @@ -2179,7 +2178,7 @@ private void UpdateFX(float elapsedClockSeconds) else if (i == 3 && ((normalisedCrankAngleRad <= MathHelper.Pi && normalisedCrankAngleRad >= exhaustCrankAngleRad) || (normalisedCrankAngleRad < 2 * MathHelper.Pi && normalisedCrankAngleRad >= exhaustCrankAngleRad))) { CylinderSteamExhaust4On = true; - // Trace.TraceInformation("Exhaust - Factor {0} ExhaustCrank {1} RealCrank {2} NormalCrank {3} Exhaust4On {4} Cylinder {5} i {6}", CylinderExhaustOpenFactor, MathHelper.ToDegrees(exhaustCrankAngleRad), MathHelper.ToDegrees(realCrankAngleRad), MathHelper.ToDegrees(normalisedCrankAngleRad), CylinderSteamExhaust4On, i + 1, i); +// Trace.TraceInformation("Exhaust - Factor {0} ExhaustCrank {1} RealCrank {2} NormalCrank {3} Exhaust4On {4} Cylinder {5} i {6}", CylinderExhaustOpenFactor, MathHelper.ToDegrees(exhaustCrankAngleRad), MathHelper.ToDegrees(realCrankAngleRad), MathHelper.ToDegrees(normalisedCrankAngleRad), CylinderSteamExhaust4On, i + 1, i); } else if (i == 3) { @@ -2500,7 +2499,7 @@ private void UpdateFX(float elapsedClockSeconds) StackSteamVolumeM3pS = Kg.FromLb(CylinderSteamUsageLBpS + BlowerSteamUsageLBpS + RadiationSteamLossLBpS + CompSteamUsageLBpS + GeneratorSteamUsageLBpS) * smokeVolumeVariationFactor * SteamVaporSpecVolumeAt100DegC1BarM3pKG; StackSteamVolumeM3pS = StackSteamVolumeM3pS / StackCount; StackParticleDurationS = Throttlepercent + FireRatio; - // Trace.TraceInformation("Puff - cutoff {0} Throttle {1} Velocity {2} Volume {3} Duration {4}", cutoff, throttle, StackSteamVelocityMpS.Value, StackSteamVolumeM3pS, StackParticleDurationS); + // Trace.TraceInformation("Puff - cutoff {0} Throttle {1} Velocity {2} Volume {3} Duration {4}", cutoff, throttle, StackSteamVelocityMpS.Value, StackSteamVolumeM3pS, StackParticleDurationS); } else // when not exhausting @@ -2510,14 +2509,14 @@ private void UpdateFX(float elapsedClockSeconds) float smokeRestVelocityVariationFactor = 2 * cutoff; // adjust smoke velocity based upon throttle and cutoff settings float smokeRestVolumeVariationFactor = 1 * cutoff; // adjust smoke volume based upon throttle and cutoff settings - float velocityRate = (absSpeedMpS < 1 ? 1.0f : 1.0f / AbsSpeedMpS); + float velocityRate = (absSpeedMpS < 1 ? 1.0f : 1.0f/ AbsSpeedMpS); StackSteamVelocityMpS.Update(elapsedClockSeconds, velocityRate); StackSteamVolumeM3pS = Kg.FromLb(BlowerSteamUsageLBpS + RadiationSteamLossLBpS + CompSteamUsageLBpS + GeneratorSteamUsageLBpS) * smokeRestVolumeVariationFactor * SteamVaporSpecVolumeAt100DegC1BarM3pKG; StackSteamVolumeM3pS = StackSteamVolumeM3pS / StackCount + FireRatio; StackParticleDurationS = Throttlepercent + FireRatio; - // Trace.TraceInformation("Rest - cutoff {0} Velocity {1} Volume {2} Duration {3} VelocityRate {4} Throttle% {5}", cutoff, StackSteamVelocityMpS.SmoothedValue, StackSteamVolumeM3pS, StackParticleDurationS, velocityRate, Throttlepercent); + // Trace.TraceInformation("Rest - cutoff {0} Velocity {1} Volume {2} Duration {3} VelocityRate {4} Throttle% {5}", cutoff, StackSteamVelocityMpS.SmoothedValue, StackSteamVolumeM3pS, StackParticleDurationS, velocityRate, Throttlepercent); } - } + } } else // Legacy smoke implementation @@ -2527,7 +2526,7 @@ private void UpdateFX(float elapsedClockSeconds) StackSteamVolumeM3pS = Kg.FromLb(CylinderSteamUsageLBpS + BlowerSteamUsageLBpS + RadiationSteamLossLBpS + CompSteamUsageLBpS + GeneratorSteamUsageLBpS) * SteamVaporSpecVolumeAt100DegC1BarM3pKG; StackSteamVolumeM3pS = StackSteamVolumeM3pS / StackCount + FireRatio; StackParticleDurationS = Throttlepercent + FireRatio; - // Trace.TraceInformation("Legacy - cutoff {0} Throttle {1} Velocity {2} Volume {3} Duration {4} VelocityRate {5}", cutoff, throttle, StackSteamVelocityMpS.SmoothedValue, StackSteamVolumeM3pS, StackParticleDurationS, velocityRate); + // Trace.TraceInformation("Legacy - cutoff {0} Throttle {1} Velocity {2} Volume {3} Duration {4} VelocityRate {5}", cutoff, throttle, StackSteamVelocityMpS.SmoothedValue, StackSteamVolumeM3pS, StackParticleDurationS, velocityRate); } @@ -3530,10 +3529,10 @@ private void UpdateBoiler(float elapsedClockSeconds) // This section calculates heat radiation loss from the boiler. This section is based upon the description provided in "The Thermal Insulation of the Steam Locomotive" (Paper 501) published in the // which was published in the March 1, 1951 Journal of the Institution of Locomotive Engineers. // In basic terms, Heat loss = Kc * A * dT, where Kc = heat transfer coefficient, A = heat transfer area, and dT = difference in temperature, ie (Boiler Temp - Ambient Temp) - + // Calculate the temp differential float TemperatureDifferentialF = 0; - + TemperatureDifferentialF = C.ToF(C.FromK(BoilerWaterTempK) - CarOutsideTempC); // As locomotive moves, the Kc value will increase as more heat loss occurs with greater speed. @@ -3560,15 +3559,15 @@ private void UpdateBoiler(float elapsedClockSeconds) { KcMovementFraction = KcMaxSpeed / KcMinSpeed; // Calculate constant fraction over 20m/s } - + // Calculate radiation loss - has two elements, insulated and uninsulated float UninsulatedBoilerHeatRadiationLossBTU = BoilerSurfaceAreaFt2 * (1.0f - FractionBoilerAreaInsulated) * KcMovementFraction * KcUninsulation * TemperatureDifferentialF; float InsulatedBoilerHeatRadiationLossBTU = BoilerSurfaceAreaFt2 * FractionBoilerAreaInsulated * KcMovementFraction * KcInsulation * TemperatureDifferentialF; BoilerHeatRadiationLossBTU = UninsulatedBoilerHeatRadiationLossBTU + InsulatedBoilerHeatRadiationLossBTU; - + // Temporary calculation to maintain smoke stack and minimum coal feed in AI firing - could be changed RadiationSteamLossLBpS = pS.FrompH(BoilerHeatRadiationLossBTU) / (BoilerSteamHeatBTUpLB - BoilerWaterHeatBTUpLB); - + BoilerHeatBTU -= elapsedClockSeconds * pS.FrompH(BoilerHeatRadiationLossBTU); BoilerHeatOutBTUpS += pS.FrompH(BoilerHeatRadiationLossBTU); @@ -4868,7 +4867,7 @@ private void UpdateMotion(float elapsedClockSeconds, float cutoff, float absSpee // Force tractive effort to zero if throttle is closed, or if a geared steam locomotive in neutral gear. MEP calculation is not allowing it to go to zero if (throttle < 0.001 || (SteamEngineType == SteamEngineTypes.Geared && SteamGearPosition == 0)) { - TractiveEffortLbsF = 0.0f; + TractiveEffortLbsF = 0.0f; } TractiveEffortLbsF = MathHelper.Clamp(TractiveEffortLbsF, 0, TractiveEffortLbsF); DisplayTractiveEffortLbsF = TractiveEffortLbsF; @@ -5099,7 +5098,7 @@ protected override void UpdateTractiveForce(float elapsedClockSeconds, float t, crankAngleRad = (float)(MathHelper.WrapAngle(crankAngleRad)); - // Trace.TraceInformation("Cyl {0} crankAng {1} Position {2} Diff {3}", NumCylinders, MathHelper.ToDegrees(crankAngleRad), MathHelper.ToDegrees(LocomotiveAxle.AxlePositionRad), MathHelper.ToDegrees(WheelCrankAngleDiffRad)); +// Trace.TraceInformation("Cyl {0} crankAng {1} Position {2} Diff {3}", NumCylinders, MathHelper.ToDegrees(crankAngleRad), MathHelper.ToDegrees(LocomotiveAxle.AxlePositionRad), MathHelper.ToDegrees(WheelCrankAngleDiffRad)); float crankCylinderPressure = (MeanEffectivePressurePSI * CylinderEfficiencyRate); // fallback default value @@ -5130,9 +5129,9 @@ protected override void UpdateTractiveForce(float elapsedClockSeconds, float t, backwardCylinderPosition = crankCylinderPosition; } - /* - Trace.TraceInformation("Cyl {0} Position {1} testcrankAng {2} crankAngle {3} CrankPosition {4} forwardCrankPosition {5} backwardCrankPosition {6}", i+1, LocomotiveAxle.AxlePositionRad, MathHelper.ToDegrees(testCrankAngle), MathHelper.ToDegrees(crankAngleRad), crankCylinderPosition, forwardCylinderPosition, backwardCylinderPosition); - */ +/* + Trace.TraceInformation("Cyl {0} Position {1} testcrankAng {2} crankAngle {3} CrankPosition {4} forwardCrankPosition {5} backwardCrankPosition {6}", i+1, LocomotiveAxle.AxlePositionRad, MathHelper.ToDegrees(testCrankAngle), MathHelper.ToDegrees(crankAngleRad), crankCylinderPosition, forwardCylinderPosition, backwardCylinderPosition); +*/ // Crank angles float sin = (float)Math.Sin(crankAngleRad); @@ -5151,7 +5150,7 @@ protected override void UpdateTractiveForce(float elapsedClockSeconds, float t, else if (CylinderExhaustOpenFactor > forwardCylinderPosition) // pressure will be in expansion section of cylinder { // In section of cylinder between cutoff and release, pressure follows a PV variation. - forwardCylinderPressure = (slipCutoffPressureAtmPSI) * (cutoff + CylinderClearancePC) / (forwardCylinderPosition + CylinderClearancePC); + forwardCylinderPressure = (slipCutoffPressureAtmPSI) * (cutoff + CylinderClearancePC) / (forwardCylinderPosition + CylinderClearancePC); // Check factor to calculate volume of cylinder for new volume at exhaust } else // Pressure will be in the exhaust section of the cylinder @@ -5213,7 +5212,7 @@ protected override void UpdateTractiveForce(float elapsedClockSeconds, float t, connectRodInertiaAngleFactor = (cos + ((CrankRadiusFt * RodCoGFt) / (ConnectRodLengthFt * ConnectRodLengthFt)) * (float)Math.Cos(2 * crankAngleRad)); } else - { + { // reverse stroke reciprocatingInertiaAngleFactor = (cos - ((CrankRadiusFt / ConnectRodLengthFt) * (float)Math.Cos(2 * crankAngleRad))); connectRodInertiaAngleFactor = (cos - ((CrankRadiusFt * RodCoGFt) / (ConnectRodLengthFt * ConnectRodLengthFt)) * (float)Math.Cos(2 * crankAngleRad)); @@ -5221,7 +5220,7 @@ protected override void UpdateTractiveForce(float elapsedClockSeconds, float t, // Calculate the speed factor to allow for variation in speed // Adjust the above factor to allow for the speed of rotation on the parts - based upon Eq 8 (pg 21) - float inertiaSpeedCorrectionFactor = 0.00034f * CrankRadiusFt * (float)Math.Pow(pS.TopM(DrvWheelRevRpS), 2); + float inertiaSpeedCorrectionFactor = 0.00034f * CrankRadiusFt * (float)Math.Pow(pS.TopM(DrvWheelRevRpS), 2); // Calculate the inertia force of the reciprocating weights @@ -5246,7 +5245,7 @@ protected override void UpdateTractiveForce(float elapsedClockSeconds, float t, // Total inertia force float totalInertiaForcelbf = reciprocatingInertiaForcelbf + connectRodInertiaForcelbf; - + float totalTangentialInertiaForcelbf = totalInertiaForcelbf * tangentialCrankForceFactor; // Calculate the force at the crank exerted on the drive wheel @@ -5280,7 +5279,7 @@ protected override void UpdateTractiveForce(float elapsedClockSeconds, float t, } // For more then two cylinder eingines inertia is not required as it only applies to the geraing on each side and not the number of cylinders - if ((NumCylinders == 3 && i > 1) || (NumCylinders == 4 && (i == 1 || i == 3))) + if ((NumCylinders == 3 && i > 1) || (NumCylinders == 4 && ( i == 1 || i==3 )) ) { excessBalanceForcelbf = 0; } @@ -5298,22 +5297,22 @@ protected override void UpdateTractiveForce(float elapsedClockSeconds, float t, totalDrvWeightN += N.FromLbf(excessBalanceForcelbf - verticalThrustForcelbf); } - /* if (DisplayTangentialWheelTreadForceLbf > SteamStaticWheelForce || WheelSlip) - { - // Trace.TraceInformation("MaxSpeed {0}", MaxLocoSpeedMpH); +/* if (DisplayTangentialWheelTreadForceLbf > SteamStaticWheelForce || WheelSlip) + { + // Trace.TraceInformation("MaxSpeed {0}", MaxLocoSpeedMpH); - Trace.TraceInformation("Cylinder Pressures - Cylinder {0} CylinderPressure {1} forwardPressure {2} backwardPressure {3} InitialPressure {4} CutoffPressure {5} forwardPosition {6} backwardPosition {7}", i+1, crankCylinderPressure, forwardCylinderPressure, backwardCylinderPressure, slipInitialPressureAtmPSI, slipCutoffPressureAtmPSI, forwardCylinderPosition, backwardCylinderPosition); + Trace.TraceInformation("Cylinder Pressures - Cylinder {0} CylinderPressure {1} forwardPressure {2} backwardPressure {3} InitialPressure {4} CutoffPressure {5} forwardPosition {6} backwardPosition {7}", i+1, crankCylinderPressure, forwardCylinderPressure, backwardCylinderPressure, slipInitialPressureAtmPSI, slipCutoffPressureAtmPSI, forwardCylinderPosition, backwardCylinderPosition); - Trace.TraceInformation("Crank Angle {0} Cylinder Position {1} AxlePosition {2} Cylinder {3} CylArea {4} CylPress {5}", MathHelper.ToDegrees(crankAngleRad), crankCylinderPosition, MathHelper.ToDegrees(LocomotiveAxle.AxlePositionRad), i, Me2.ToIn2(Me2.FromFt2(CylinderPistonAreaFt2)), crankCylinderPressure); + Trace.TraceInformation("Crank Angle {0} Cylinder Position {1} AxlePosition {2} Cylinder {3} CylArea {4} CylPress {5}", MathHelper.ToDegrees(crankAngleRad), crankCylinderPosition, MathHelper.ToDegrees(LocomotiveAxle.AxlePositionRad), i, Me2.ToIn2(Me2.FromFt2(CylinderPistonAreaFt2)), crankCylinderPressure); - Trace.TraceInformation("Tang.CrankFactor {0} RecInertiaFactor {1}, ConInertiaFactor {2} VerticalForceFactor {3} InertiaSpeedFactor {4}", tangentialCrankForceFactor, reciprocatingInertiaAngleFactor, connectRodInertiaAngleFactor, verticalThrustFactor, inertiaSpeedCorrectionFactor); + Trace.TraceInformation("Tang.CrankFactor {0} RecInertiaFactor {1}, ConInertiaFactor {2} VerticalForceFactor {3} InertiaSpeedFactor {4}", tangentialCrankForceFactor, reciprocatingInertiaAngleFactor, connectRodInertiaAngleFactor, verticalThrustFactor, inertiaSpeedCorrectionFactor); - Trace.TraceInformation("PistonForce {0}lbf RodForce {1}lbf RecForce {2}lbf", pistonForceLbf, connectRodInertiaForcelbf, reciprocatingInertiaForcelbf); + Trace.TraceInformation("PistonForce {0}lbf RodForce {1}lbf RecForce {2}lbf", pistonForceLbf, connectRodInertiaForcelbf, reciprocatingInertiaForcelbf); - Trace.TraceInformation("VerticalThrustForce {0}lbf ExcessBalanceForce {1}lbf", verticalThrustForcelbf, excessBalanceForcelbf); + Trace.TraceInformation("VerticalThrustForce {0}lbf ExcessBalanceForce {1}lbf", verticalThrustForcelbf, excessBalanceForcelbf); - } - */ + } +*/ #if DEBUG_STEAM_SLIP if (throttle > 0.01 && (absSpeedMpS < 0.2 || absSpeedMpS > 17.7 && absSpeedMpS < 18.2)) @@ -5334,20 +5333,20 @@ protected override void UpdateTractiveForce(float elapsedClockSeconds, float t, LocomotiveAxle.AxleWeightN = totalDrvWeightN + 9.81f * DrvWheelWeightKg; SteamStaticWheelForce = N.ToLbf(totalDrvWeightN + 9.81f * DrvWheelWeightKg) * LocomotiveCoefficientFrictionHUD; - /* - if (DisplayTangentialWheelTreadForceLbf > SteamStaticWheelForce) - { - Trace.TraceInformation("Static Wheel Slip (initiated by static comparison) - TangForce {0}lbf: AdhesiveForce {1}lbf: Speed {2}mph, WheelSpeed {3}mph, CrankAngle {4}deg, AdvSlip {5}, AdvSlipWarn {6}, AxleInput - DriveForceCorrect {7}lbf, TotalDriveW {8}lbf, AxleWeightForce {9}lbf, Friction {10}, throttle {11}, Reverser {12} SlipThresholdSpeed {13}mph, WheelSlipSpeed {14}mph, AxleDriveForce {15}lbf", DisplayTangentialWheelTreadForceLbf, SteamStaticWheelForce, MpS.ToMpH(absSpeedMpS), MpS.ToMpH(WheelSpeedMpS), MathHelper.ToDegrees(testCrankAngle), WheelSlip, WheelSlipWarning, N.ToLbf(totalDrvWeightN), N.ToLbf(9.81f * DrvWheelWeightKg), N.ToLbf(LocomotiveAxle.AxleWeightN), LocomotiveCoefficientFrictionHUD, throttle, cutoff, MpS.ToMpH(LocomotiveAxle.WheelSlipThresholdMpS), MpS.ToMpH(LocomotiveAxle.SlipSpeedMpS), N.ToLbf(LocomotiveAxle.DriveForceN)); +/* + if (DisplayTangentialWheelTreadForceLbf > SteamStaticWheelForce) + { + Trace.TraceInformation("Static Wheel Slip (initiated by static comparison) - TangForce {0}lbf: AdhesiveForce {1}lbf: Speed {2}mph, WheelSpeed {3}mph, CrankAngle {4}deg, AdvSlip {5}, AdvSlipWarn {6}, AxleInput - DriveForceCorrect {7}lbf, TotalDriveW {8}lbf, AxleWeightForce {9}lbf, Friction {10}, throttle {11}, Reverser {12} SlipThresholdSpeed {13}mph, WheelSlipSpeed {14}mph, AxleDriveForce {15}lbf", DisplayTangentialWheelTreadForceLbf, SteamStaticWheelForce, MpS.ToMpH(absSpeedMpS), MpS.ToMpH(WheelSpeedMpS), MathHelper.ToDegrees(testCrankAngle), WheelSlip, WheelSlipWarning, N.ToLbf(totalDrvWeightN), N.ToLbf(9.81f * DrvWheelWeightKg), N.ToLbf(LocomotiveAxle.AxleWeightN), LocomotiveCoefficientFrictionHUD, throttle, cutoff, MpS.ToMpH(LocomotiveAxle.WheelSlipThresholdMpS), MpS.ToMpH(LocomotiveAxle.SlipSpeedMpS), N.ToLbf(LocomotiveAxle.DriveForceN)); - } + } - if (WheelSlip && DisplayTangentialWheelTreadForceLbf < SteamStaticWheelForce) - { - Trace.TraceInformation("Static Wheel Slip (initiated by axle model) - TangForce {0}lbf: AdhesiveForce {1}lbf: Speed {2}mph, WheelSpeed {3}mph, CrankAngle {4}deg, AdvSlip {5}, AdvSlipWarn {6}, AxleInput - DriveForceCorrect {7}lbf, TotalDriveW {8}lbf, AxleWeightForce {9}lbf, Friction {10}, throttle {11}, Reverser {12} SlipThresholdSpeed {13}mph, WheelSlipSpeed {14}mph, AxleDriveForce {15}lbf", DisplayTangentialWheelTreadForceLbf, SteamStaticWheelForce, MpS.ToMpH(absSpeedMpS), MpS.ToMpH(WheelSpeedMpS), MathHelper.ToDegrees(testCrankAngle), WheelSlip, WheelSlipWarning, N.ToLbf(totalDrvWeightN), N.ToLbf(9.81f * DrvWheelWeightKg), N.ToLbf(LocomotiveAxle.AxleWeightN), LocomotiveCoefficientFrictionHUD, throttle, cutoff, MpS.ToMpH(LocomotiveAxle.WheelSlipThresholdMpS), MpS.ToMpH(LocomotiveAxle.SlipSpeedMpS), N.ToLbf(LocomotiveAxle.DriveForceN)); + if (WheelSlip && DisplayTangentialWheelTreadForceLbf < SteamStaticWheelForce) + { + Trace.TraceInformation("Static Wheel Slip (initiated by axle model) - TangForce {0}lbf: AdhesiveForce {1}lbf: Speed {2}mph, WheelSpeed {3}mph, CrankAngle {4}deg, AdvSlip {5}, AdvSlipWarn {6}, AxleInput - DriveForceCorrect {7}lbf, TotalDriveW {8}lbf, AxleWeightForce {9}lbf, Friction {10}, throttle {11}, Reverser {12} SlipThresholdSpeed {13}mph, WheelSlipSpeed {14}mph, AxleDriveForce {15}lbf", DisplayTangentialWheelTreadForceLbf, SteamStaticWheelForce, MpS.ToMpH(absSpeedMpS), MpS.ToMpH(WheelSpeedMpS), MathHelper.ToDegrees(testCrankAngle), WheelSlip, WheelSlipWarning, N.ToLbf(totalDrvWeightN), N.ToLbf(9.81f * DrvWheelWeightKg), N.ToLbf(LocomotiveAxle.AxleWeightN), LocomotiveCoefficientFrictionHUD, throttle, cutoff, MpS.ToMpH(LocomotiveAxle.WheelSlipThresholdMpS), MpS.ToMpH(LocomotiveAxle.SlipSpeedMpS), N.ToLbf(LocomotiveAxle.DriveForceN)); - } + } - */ +*/ #if DEBUG_STEAM_SLIP @@ -5368,7 +5367,7 @@ protected override void UpdateTractiveForce(float elapsedClockSeconds, float t, WheelSpeedMpS = SpeedMpS; WheelSpeedSlipMpS = SpeedMpS; } - + // Derate when priming is occurring. if (BoilerIsPriming) @@ -5379,7 +5378,7 @@ protected override void UpdateTractiveForce(float elapsedClockSeconds, float t, TractiveForceN = 0.5f; } - #endregion +#endregion // Find the maximum TE for debug i.e. @ start and full throttle if (absSpeedMpS < 1.0) @@ -5432,14 +5431,14 @@ public override void AdvancedAdhesion(float elapsedClockSeconds) LocomotiveAxle.FrictionN = N.FromLbf(3.8f * Me.ToIn(CylinderDiameterM) * Me.ToIn(CylinderDiameterM) * Me.ToIn(CylinderStrokeM) / Me.ToIn(DrvWheelDiaM)); if (WheelSlip && AdvancedAdhesionModel) - { - AbsTractionSpeedMpS = AbsWheelSpeedMpS; - } - else - { - AbsTractionSpeedMpS = AbsSpeedMpS; - } - + { + AbsTractionSpeedMpS = AbsWheelSpeedMpS; + } + else + { + AbsTractionSpeedMpS = AbsSpeedMpS; + } + } base.AdvancedAdhesion(elapsedClockSeconds); } @@ -5671,7 +5670,7 @@ private void UpdateWaterGauge() private void UpdateInjectors(float elapsedClockSeconds) { - #region Calculate Injector size +#region Calculate Injector size // Calculate size of injectors to suit cylinder size. InjCylEquivSizeIN = (NumCylinders / 2.0f) * Me.ToIn(CylinderDiameterM); @@ -5713,7 +5712,7 @@ private void UpdateInjectors(float elapsedClockSeconds) InjectorFlowRateLBpS = pS.FrompM(Injector15FlowratePSItoUKGpM[BoilerPressurePSI]) * WaterLBpUKG; // 15 mm Injector Flow rate InjectorSize = 15.0f; // store size for display in HUD } - #endregion +#endregion if (WaterIsExhausted) { @@ -5815,7 +5814,7 @@ private void UpdateFiring(float absSpeedMpS) if (FiringIsManual) - #region Manual Fireman +#region Manual Fireman { @@ -5853,11 +5852,11 @@ private void UpdateFiring(float absSpeedMpS) } DamperBurnEffect = MathHelper.Clamp(DamperBurnEffect, 0.0f, TheoreticalMaxSteamOutputLBpS * 1.5f); // set damper maximum to the max generation rate } - #endregion +#endregion else - #region AI Fireman +#region AI Fireman { // Injectors // Injectors normally not on when stationary? @@ -6088,7 +6087,7 @@ private void UpdateFiring(float absSpeedMpS) HeatRatio = MathHelper.Clamp(HeatRatio, 0.001f, (HeatRatioMaxRise + 1.0f)); // Boiler pressure ratio to adjust burn rate } } - #endregion +#endregion } /// @@ -6244,7 +6243,7 @@ public override float GetDataOf(CabViewControl cvc) data = SmallEjectorController.CurrentValue; break; } - case CABViewControlTypes.ORTS_LARGE_EJECTOR: + case CABViewControlTypes.ORTS_LARGE_EJECTOR: { data = LargeEjectorController.CurrentValue; break; @@ -6820,8 +6819,8 @@ public override string GetDebugStatus() ); } - if (Simulator.UseAdvancedAdhesion && !Simulator.Settings.SimpleControlPhysics && SteamEngineType != SteamEngineTypes.Geared) - // Only display slip monitor if advanced adhesion is set and simplecontrols/physics not set + if (Simulator.UseAdvancedAdhesion && !Simulator.Settings.SimpleControlPhysics && SteamEngineType != SteamEngineTypes.Geared) + // Only display slip monitor if advanced adhesion is set and simplecontrols/physics not set { status.AppendFormat("\n\t\t === {0} === \n", Simulator.Catalog.GetString("Slip Monitor")); status.AppendFormat("{0}\t{1}\t{2:N0}\t{3}\t{4}\t{5}\t{6}\t{7}\t{8:N2}\t{9}\t{10}\t{11:N2}\t{12}\t{13}\t{14:N1}\n", @@ -7049,11 +7048,11 @@ public override string GetDebugStatus() } return status.ToString(); - } + } - // Gear Box +// Gear Box - public void SteamStartGearBoxIncrease() +public void SteamStartGearBoxIncrease() { if (IsSelectGeared) { @@ -7247,7 +7246,7 @@ public void SteamStopGearBoxDecrease() //Small Ejector Controller - #region Small Ejector controller +#region Small Ejector controller public void StartSmallEjectorIncrease(float? target) { @@ -7310,17 +7309,17 @@ public void SetSmallEjectorValue(float value) Simulator.Confirmer.UpdateWithPerCent(CabControl.SmallEjector, oldValue < controller.IntermediateValue ? CabSetting.Increase : CabSetting.Decrease, controller.CurrentValue * 100); } - #endregion +#endregion //Define Large Ejector Controller - #region Large Ejector controller +#region Large Ejector controller public void StartLargeEjectorIncrease(float? target) { LargeEjectorController.CommandStartTime = Simulator.ClockTime; if (IsPlayerTrain) - Simulator.Confirmer.ConfirmWithPerCent(CabControl.LargeEjector, CabSetting.Increase, LargeEjectorController.CurrentValue * 100); + Simulator.Confirmer.ConfirmWithPerCent(CabControl.LargeEjector, CabSetting.Increase, LargeEjectorController.CurrentValue* 100); LargeEjectorController.StartIncrease(target); SignalEvent(Event.LargeEjectorChange); } @@ -7334,7 +7333,7 @@ public void StopLargeEjectorIncrease() public void StartLargeEjectorDecrease(float? target) { if (IsPlayerTrain) - Simulator.Confirmer.ConfirmWithPerCent(CabControl.LargeEjector, CabSetting.Decrease, LargeEjectorController.CurrentValue * 100); + Simulator.Confirmer.ConfirmWithPerCent(CabControl.LargeEjector, CabSetting.Decrease, LargeEjectorController.CurrentValue* 100); LargeEjectorController.StartDecrease(target); SignalEvent(Event.LargeEjectorChange); } @@ -7357,7 +7356,7 @@ public void LargeEjectorChangeTo(bool increase, float? target) } else { - if (target < LargeEjectorController.CurrentValue) + if (target 0, controller.CurrentValue, Simulator.GameTime); } if (oldValue != controller.IntermediateValue) - Simulator.Confirmer.UpdateWithPerCent(CabControl.LargeEjector, oldValue < controller.IntermediateValue ? CabSetting.Increase : CabSetting.Decrease, controller.CurrentValue * 100); + Simulator.Confirmer.UpdateWithPerCent(CabControl.LargeEjector, oldValue diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs b/Source/Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs index 7e6784e53e..feabfecd99 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs @@ -36,11 +36,6 @@ // Debug for Freight Animation Variable Mass //#define DEBUG_VARIABLE_MASS -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; using Microsoft.Xna.Framework; using Orts.Formats.Msts; using Orts.Parsers.Msts; @@ -50,6 +45,11 @@ using Orts.Simulation.RollingStocks.SubSystems.PowerSupplies; using ORTS.Common; using ORTS.Scripting.Api; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; using Event = Orts.Common.Event; namespace Orts.Simulation.RollingStocks @@ -68,7 +68,7 @@ public class MSTSWagon : TrainCar { public Pantographs Pantographs; public ScriptedPassengerCarPowerSupply PassengerCarPowerSupply => PowerSupply as ScriptedPassengerCarPowerSupply; - public Doors Doors; + public Doors Doors; public Door RightDoor => Doors.RightDoor; public Door LeftDoor => Doors.LeftDoor; public bool MirrorOpen; @@ -242,7 +242,7 @@ public enum BrakeValveType /// public int RetainerPositions; - /// + /// /// Indicates whether a brake is present or not when Manual Braking is selected. /// public bool ManualBrakePresent; @@ -293,7 +293,7 @@ protected void ParseEffects(string lowercasetoken, STFReader stf) { stf.MustMatch("("); string s; - + while ((s = stf.ReadItem()) != ")") { var data = new ParticleEmitterData(stf); @@ -496,7 +496,7 @@ public virtual void LoadFromWagFile(string wagFilePath) } // Disable derailment coefficent on "dummy" cars. NB: Ideally this should never be used as "dummy" cars interfer with the overall train physics. - if (MSTSWagonNumWheels == 0 && InitWagonNumAxles == 0) + if (MSTSWagonNumWheels == 0 && InitWagonNumAxles == 0 ) { DerailmentCoefficientEnabled = false; } @@ -506,7 +506,7 @@ public virtual void LoadFromWagFile(string wagFilePath) { if (MSTSWagonNumWheels != 0 && MSTSWagonNumWheels < 6) { - WagonNumAxles = (int)MSTSWagonNumWheels; + WagonNumAxles = (int) MSTSWagonNumWheels; } else { @@ -622,8 +622,8 @@ public virtual void LoadFromWagFile(string wagFilePath) else { LoadEmptyMassKg = MassKG; - } - + } + if (FreightAnimations.EmptyORTSDavis_A > 0) { LoadEmptyORTSDavis_A = FreightAnimations.EmptyORTSDavis_A; @@ -785,7 +785,7 @@ public virtual void LoadFromWagFile(string wagFilePath) else { LoadFullMassKg = MassKG; - } + } if (FreightAnimations.FullPhysicsContinuousOne.FullORTSDavis_A > 0) { @@ -911,15 +911,15 @@ public virtual void LoadFromWagFile(string wagFilePath) DavisBNSpM = ((LoadFullORTSDavis_B - LoadEmptyORTSDavis_B) * TempMassDiffRatio) + LoadEmptyORTSDavis_B; DavisCNSSpMM = ((LoadFullORTSDavis_C - LoadEmptyORTSDavis_C) * TempMassDiffRatio) + LoadEmptyORTSDavis_C; - if (LoadEmptyDavisDragConstant > LoadFullDavisDragConstant) // Due to wind turbulence empty drag might be higher then loaded drag, and therefore both scenarios need to be covered. + if (LoadEmptyDavisDragConstant > LoadFullDavisDragConstant ) // Due to wind turbulence empty drag might be higher then loaded drag, and therefore both scenarios need to be covered. { - DavisDragConstant = LoadEmptyDavisDragConstant - ((LoadEmptyDavisDragConstant - LoadFullDavisDragConstant) * TempMassDiffRatio); + DavisDragConstant = LoadEmptyDavisDragConstant - ((LoadEmptyDavisDragConstant - LoadFullDavisDragConstant) * TempMassDiffRatio); } else { DavisDragConstant = ((LoadFullDavisDragConstant - LoadEmptyDavisDragConstant) * TempMassDiffRatio) + LoadEmptyDavisDragConstant; } - + WagonFrontalAreaM2 = ((LoadFullWagonFrontalAreaM2 - LoadEmptyWagonFrontalAreaM2) * TempMassDiffRatio) + LoadEmptyWagonFrontalAreaM2; // Update CoG related parameters @@ -983,7 +983,7 @@ public override void Initialize() PassengerCarPowerSupply?.Initialize(); base.Initialize(); - + if (UnbalancedSuperElevationM == 0 || UnbalancedSuperElevationM > 0.5) // If UnbalancedSuperElevationM > 18", or equal to zero, then set a default value { switch (WagonType) @@ -1112,7 +1112,7 @@ public virtual void Parse(string lowercasetoken, STFReader stf) case "wagon(ortstenderwagoncoalmass": TenderWagonMaxCoalMassKG = stf.ReadFloatBlock(STFReader.UNITS.Mass, null); break; case "wagon(ortstenderwagonwatermass": TenderWagonMaxWaterMassKG = stf.ReadFloatBlock(STFReader.UNITS.Mass, null); break; case "wagon(ortsheatingwindowderatingfactor": WindowDeratingFactor = stf.ReadFloatBlock(STFReader.UNITS.None, null); break; - case "wagon(ortsheatingcompartmenttemperatureset": DesiredCompartmentTempSetpointC = stf.ReadFloatBlock(STFReader.UNITS.Temperature, null); break; + case "wagon(ortsheatingcompartmenttemperatureset": DesiredCompartmentTempSetpointC = stf.ReadFloatBlock(STFReader.UNITS.Temperature, null); break; case "wagon(ortsheatingcompartmentpipeareafactor": CompartmentHeatingPipeAreaFactor = stf.ReadFloatBlock(STFReader.UNITS.None, null); break; case "wagon(ortsheatingtrainpipeouterdiameter": MainSteamHeatPipeOuterDiaM = stf.ReadFloatBlock(STFReader.UNITS.Distance, null); break; case "wagon(ortsheatingtrainpipeinnerdiameter": MainSteamHeatPipeInnerDiaM = stf.ReadFloatBlock(STFReader.UNITS.Distance, null); break; @@ -1130,7 +1130,7 @@ public virtual void Parse(string lowercasetoken, STFReader stf) case "wagon(maxhandbrakeforce": InitialMaxHandbrakeForceN = stf.ReadFloatBlock(STFReader.UNITS.Force, null); break; case "wagon(maxbrakeforce": InitialMaxBrakeForceN = stf.ReadFloatBlock(STFReader.UNITS.Force, null); break; case "wagon(ortswheelbrakeslideprotection": - // stf.MustMatch("("); + // stf.MustMatch("("); var brakeslideprotection = stf.ReadFloatBlock(STFReader.UNITS.None, null); if (brakeslideprotection == 1) { @@ -1286,14 +1286,14 @@ public virtual void Parse(string lowercasetoken, STFReader stf) stf.SkipRestOfBlock(); break; - case "wagon(coupling(frontcoupleropenanim": + case "wagon(coupling(frontcoupleropenanim": stf.MustMatch("("); FrontCoupler.Open.ShapeFileName = stf.ReadString(); // NOTE: Skip reading the size as it is unused: stf.ReadVector3(STFReader.UNITS.Distance, Vector3.Zero); stf.SkipRestOfBlock(); break; - - case "wagon(coupling(rearcoupleropenanim": + + case "wagon(coupling(rearcoupleropenanim": stf.MustMatch("("); RearCoupler.Open.ShapeFileName = stf.ReadString(); // NOTE: Skip reading the size as it is unused: stf.ReadVector3(STFReader.UNITS.Distance, Vector3.Zero); @@ -1306,7 +1306,7 @@ public virtual void Parse(string lowercasetoken, STFReader stf) // NOTE: Skip reading the size as it is unused: stf.ReadVector3(STFReader.UNITS.Distance, Vector3.Zero); stf.SkipRestOfBlock(); break; - + case "wagon(coupling(rearairhosediconnectedanim": stf.MustMatch("("); RearAirHose.Disconnected.ShapeFileName = stf.ReadString(); @@ -1327,7 +1327,7 @@ public virtual void Parse(string lowercasetoken, STFReader stf) Couplers[CouplerCountLocation].SetTensionSlack(stf.ReadFloat(STFReader.UNITS.Distance, null), stf.ReadFloat(STFReader.UNITS.Distance, null)); stf.SkipRestOfBlock(); break; - case "wagon(coupling(spring(ortscompressionslack": + case "wagon(coupling(spring(ortscompressionslack": stf.MustMatch("("); IsAdvancedCoupler = true; // If this parameter is present in WAG file then treat coupler as advanced ones. Couplers[CouplerCountLocation].SetCompressionSlack(stf.ReadFloat(STFReader.UNITS.Distance, null), stf.ReadFloat(STFReader.UNITS.Distance, null)); @@ -1340,14 +1340,14 @@ public virtual void Parse(string lowercasetoken, STFReader stf) Couplers[CouplerCountLocation].SetAdvancedBreak(stf.ReadFloat(STFReader.UNITS.Force, null), stf.ReadFloat(STFReader.UNITS.Force, null)); stf.SkipRestOfBlock(); break; - - // This is for the advanced coupler and is designed to be used instead of the MSTS parameter R0 - case "wagon(coupling(spring(ortstensionr0": + + // This is for the advanced coupler and is designed to be used instead of the MSTS parameter R0 + case "wagon(coupling(spring(ortstensionr0": stf.MustMatch("("); Couplers[CouplerCountLocation].SetTensionR0(stf.ReadFloat(STFReader.UNITS.Distance, null), stf.ReadFloat(STFReader.UNITS.Distance, null)); stf.SkipRestOfBlock(); break; - case "wagon(coupling(spring(ortscompressionr0": + case "wagon(coupling(spring(ortscompressionr0": stf.MustMatch("("); Couplers[CouplerCountLocation].SetCompressionR0(stf.ReadFloat(STFReader.UNITS.Distance, null), stf.ReadFloat(STFReader.UNITS.Distance, null)); stf.SkipRestOfBlock(); @@ -1359,7 +1359,7 @@ public virtual void Parse(string lowercasetoken, STFReader stf) Couplers[CouplerCountLocation].Rigid = false; Couplers[CouplerCountLocation].Rigid = stf.ReadBoolBlock(true); break; - + case "wagon(adheasion": @@ -1399,7 +1399,7 @@ public virtual void Parse(string lowercasetoken, STFReader stf) break; case "wagon(inside": HasInsideView = true; ParseWagonInside(stf); break; case "wagon(orts3dcab": Parse3DCab(stf); break; - case "wagon(numwheels": MSTSWagonNumWheels = stf.ReadFloatBlock(STFReader.UNITS.None, null); break; + case "wagon(numwheels": MSTSWagonNumWheels= stf.ReadFloatBlock(STFReader.UNITS.None, null); break; case "wagon(ortsnumberaxles": InitWagonNumAxles = stf.ReadIntBlock(null); break; case "wagon(ortsnumberbogies": WagonNumBogies = stf.ReadIntBlock(null); break; case "wagon(ortspantographs": @@ -1607,7 +1607,7 @@ public virtual void Copy(MSTSWagon copy) // If freight animations not used or else wagon is a tender or locomotive, use the "MSTS" type IntakePoints if present in WAG / ENG file if (copyIntakePoint.LinkedFreightAnim == null) - // if (copyIntakePoint.LinkedFreightAnim == null || WagonType == WagonTypes.Engine || WagonType == WagonTypes.Tender || AuxWagonType == "AuxiliaryTender") + // if (copyIntakePoint.LinkedFreightAnim == null || WagonType == WagonTypes.Engine || WagonType == WagonTypes.Tender || AuxWagonType == "AuxiliaryTender") IntakePointList.Add(new IntakePoint(copyIntakePoint)); } } @@ -1984,7 +1984,7 @@ public override void Update(float elapsedClockSeconds) FreightAnimations.LoadedOne = null; FreightAnimations.FreightType = PickupType.None; } - if (WaitForAnimationReady && WeightLoadController.CommandStartTime + FreightAnimations.UnloadingStartDelay <= Simulator.ClockTime) + if (WaitForAnimationReady && WeightLoadController.CommandStartTime + FreightAnimations.UnloadingStartDelay <= Simulator.ClockTime) { WaitForAnimationReady = false; Simulator.Confirmer.Message(ConfirmLevel.Information, Simulator.Catalog.GetString("Starting unload")); @@ -2014,7 +2014,7 @@ public override void Update(float elapsedClockSeconds) } } - private void UpdateLocomotiveLoadPhysics() + private void UpdateLocomotiveLoadPhysics() { // This section updates the weight and physics of the locomotive if (FreightAnimations != null && FreightAnimations.ContinuousFreightAnimationsPresent) // make sure that a freight animation INCLUDE File has been defined, and it contains "continuous" animation data. @@ -2046,7 +2046,7 @@ private void UpdateLocomotiveLoadPhysics() { MassKG = LoadEmptyMassKg + Kg.FromLb(SteamLocomotiveIdentification.BoilerMassLB) + SteamLocomotiveIdentification.FireMassKG; MassKG = MathHelper.Clamp(MassKG, LoadEmptyMassKg, LoadFullMassKg); // Clamp Mass to between the empty and full wagon values - // Adjust drive wheel weight + // Adjust drive wheel weight SteamLocomotiveIdentification.DrvWheelWeightKg = (MassKG / InitialMassKG) * SteamLocomotiveIdentification.InitialDrvWheelWeightKg; } @@ -2080,7 +2080,7 @@ private void UpdateLocomotiveLoadPhysics() else if (this is MSTSDieselLocomotive) // If diesel locomotive { - // set a process to pass relevant locomotive parameters from locomotive file to this wagon file + // set a process to pass relevant locomotive parameters from locomotive file to this wagon file var LocoIndex = 0; for (var i = 0; i < Train.Cars.Count; i++) // test each car to find the where the Diesel locomotive is in the consist if (Train.Cars[i] == this) // If this car is a Diesel locomotive then set loco index @@ -2119,7 +2119,7 @@ private void UpdateLocomotiveLoadPhysics() // Update CoG related parameters CentreOfGravityM.Y = ((LoadFullCentreOfGravityM_Y - LoadEmptyCentreOfGravityM_Y) * TempMassDiffRatio) + LoadEmptyCentreOfGravityM_Y; - + } } } @@ -2372,8 +2372,8 @@ private void UpdateTrainBaseResistance_DavisLowSpeed() // Assume a linear relationship between the two sets of points above and plot a straight line relationship. float LowTemperature = -10.0f; float HighTemeprature = 25.0f; - float LowTemperatureResistanceN = N.FromLbf(12.0f) * wheelvariationfactor; - float HighTemperatureResistanceN = N.FromLbf(4.5f) * wheelvariationfactor; + float LowTemperatureResistanceN = N.FromLbf( 12.0f ) * wheelvariationfactor; + float HighTemperatureResistanceN = N.FromLbf( 4.5f) * wheelvariationfactor; float LowGrad = (LowTemperatureResistanceN - HighTemperatureResistanceN) / (LowTemperature - HighTemeprature); float LowIntersect = LowTemperatureResistanceN - (LowGrad * LowTemperature); @@ -2552,7 +2552,7 @@ private void UpdateTrainBaseResistance_DavisLowSpeed() } - Friction0N = (Kg.ToTonne(MassKG) * StartFrictionInternalFactorN) + StartFrictionTrackN; // Static friction is journal or roller bearing friction x weight + track resistance. Mass value must be in tons uk to match reference used for starting resistance + Friction0N = ( Kg.ToTonne(MassKG) * StartFrictionInternalFactorN) + StartFrictionTrackN; // Static friction is journal or roller bearing friction x weight + track resistance. Mass value must be in tons uk to match reference used for starting resistance float Friction0DavisN = DavisAN * WheelBearingTemperatureResistanceFactor; // Calculate the starting firction if Davis formula was extended to zero @@ -2686,7 +2686,7 @@ private void UpdateWheelBearingTemperature(float elapsedClockSeconds) // Keep track of Activity details if an activity, setup random wagon, and start time for hotbox if (Simulator.ActivityRun != null && IsPlayerTrain) { - if (ActivityElapsedDurationS < HotBoxStartTimeS) + if (ActivityElapsedDurationS 0 && WagonType != WagonTypes.Engine && WagonType != WagonTypes.Tender) - { + { var HotboxRandom = Simulator.Random.Next(100) / Simulator.Settings.ActRandomizationLevel; float PerCentRandom = 0.66f; // Set so that random time is always in first 66% of activity duration var RawHotBoxTimeRandomS = Simulator.Random.Next(Train.ActivityDurationS); if (!Train.HotBoxSetOnTrain) // only allow one hot box to be set per train { - if (HotboxRandom < 10) + if (HotboxRandom< 10) { HotBoxActivated = true; Train.HotBoxSetOnTrain = true; - HotBoxStartTimeS = PerCentRandom * RawHotBoxTimeRandomS; + HotBoxStartTimeS = PerCentRandom* RawHotBoxTimeRandomS; Trace.TraceInformation("Hotbox Bearing Activated on CarID {0}. Hotbox to start from {1:F1} minutes into activity", CarID, S.ToM(HotBoxStartTimeS)); } } - + } } HotBoxHasBeenInitialized = true; // Only allow to loop once at first pass } - + float BearingSpeedMaximumTemperatureDegC = 0; float MaximumNormalBearingTemperatureDegC = 90.0f; @@ -2753,11 +2753,11 @@ private void UpdateWheelBearingTemperature(float elapsedClockSeconds) if (elapsedClockSeconds > 0) // Prevents zero values resetting temperature { - + // Keep track of wheel bearing temperature until activtaion time reached - if (ActivityElapsedDurationS < HotBoxStartTimeS) + if (ActivityElapsedDurationS BearingSpeedMaximumTemperatureDegC) @@ -2810,7 +2810,7 @@ private void UpdateWheelBearingTemperature(float elapsedClockSeconds) if (WheelBearingTemperatureDegC > CarOutsideTempC) { WheelBearingTemperatureDeclineTimeS += elapsedClockSeconds; - WheelBearingTemperatureDegC = CarOutsideTempC + (InitialWheelBearingDeclineTemperatureDegC - CarOutsideTempC) * (float)(Math.Exp(CoolingKConst * WheelBearingTemperatureDeclineTimeS)); + WheelBearingTemperatureDegC = CarOutsideTempC + (InitialWheelBearingDeclineTemperatureDegC - CarOutsideTempC) * (float) (Math.Exp(CoolingKConst* WheelBearingTemperatureDeclineTimeS)); } WheelBearingTemperatureRiseTimeS = 0; @@ -2820,7 +2820,7 @@ private void UpdateWheelBearingTemperature(float elapsedClockSeconds) WheelBearingTemperatureRiseTimeS = 0; InitialWheelBearingRiseTemperatureDegC = WheelBearingTemperatureDegC; - + // Turn off Hotbox sounds SignalEvent(Event.HotBoxBearingOff); HotBoxSoundActivated = false; @@ -2893,14 +2893,14 @@ private void UpdateWindForce() { WagonDirectionDeg -= 360; } - } + } // If a westerly direction (ie -ve) convert to an angle between 0 and 360 if (WagonDirectionDeg < 0) WagonDirectionDeg += 360; float TrainSpeedMpS = Math.Abs(SpeedMpS); - + // Find angle between wind and direction of train if (Train.PhysicsWindDirectionDeg > WagonDirectionDeg) WagonResultantWindComponentDeg = Train.PhysicsWindDirectionDeg - WagonDirectionDeg; @@ -3022,7 +3022,7 @@ private void UpdateTenderLoad() Trace.TraceInformation("Tender @ position {0} does not have a locomotive associated with. Check that it is preceeded by a steam locomotive.", CarID); } - MassKG = FreightAnimations.WagonEmptyWeight + TendersSteamLocomotive.TenderCoalMassKG + Kg.FromLb((TendersSteamLocomotive.CurrentLocoTenderWaterVolumeUKG * WaterLBpUKG)); + MassKG = FreightAnimations.WagonEmptyWeight + TendersSteamLocomotive.TenderCoalMassKG + Kg.FromLb( (TendersSteamLocomotive.CurrentLocoTenderWaterVolumeUKG * WaterLBpUKG)); MassKG = MathHelper.Clamp(MassKG, LoadEmptyMassKg, LoadFullMassKg); // Clamp Mass to between the empty and full wagon values // Update wagon parameters sensitive to wagon mass change @@ -3446,7 +3446,7 @@ public void FindControlActiveLocomotive() // As soon as the control and active locomotive have been identified, then stop loop. if (activeLocomotive && controlCar) { - ControlActiveLocomotive = Train.Cars[activeIndex] as MSTSDieselLocomotive; + ControlActiveLocomotive = Train.Cars[activeIndex] as MSTSDieselLocomotive; return; } } @@ -3481,22 +3481,22 @@ public void FindTendersSteamLocomotive() TendersSteamLocomotive = null; } - /// + /// /// This function checks each steam locomotive to see if it has a tender attached. /// public void ConfirmSteamLocomotiveTender() { - + // Check each steam locomotive to see if it has a tender attached. - if (this is MSTSSteamLocomotive) + if (this is MSTSSteamLocomotive ) { if (Train == null || Train.Cars == null) { SteamLocomotiveTender = null; - return; + return; } - else if (Train.Cars.Count == 1) // If car count is equal to 1, then there must be no tender attached + else if(Train.Cars.Count == 1) // If car count is equal to 1, then there must be no tender attached { SteamLocomotiveTender = Train.Cars[0] as MSTSSteamLocomotive; SteamLocomotiveTender.HasTenderCoupled = false; @@ -3561,15 +3561,15 @@ public void FindAuxTendersSteamLocomotive() } // If a "normal" tender is connected then the steam locomotive will be two cars away. - + if (!AuxTenderFound) { - + if (tenderIndex > 0 && Train.Cars[tenderIndex - 2] is MSTSSteamLocomotive) { AuxTendersSteamLocomotive = Train.Cars[tenderIndex - 2] as MSTSSteamLocomotive; } - + if (tenderIndex < Train.Cars.Count - 2 && Train.Cars[tenderIndex + 2] is MSTSSteamLocomotive) { AuxTendersSteamLocomotive = Train.Cars[tenderIndex + 2] as MSTSSteamLocomotive; @@ -3601,25 +3601,25 @@ public override float GetCouplerZeroLengthM() float zerolength; if (Coupler != null) { - zerolength = Coupler.R0X; + zerolength = Coupler.R0X; } else { - zerolength = base.GetCouplerZeroLengthM(); + zerolength = base.GetCouplerZeroLengthM(); } // Ensure zerolength doesn't go higher then 0.5 if (zerolength > 0.5) { - zerolength = 0.5f; + zerolength = 0.5f; } return zerolength; } else { - return Coupler != null ? Coupler.R0X : base.GetCouplerZeroLengthM(); - } + return Coupler != null ? Coupler.R0X : base.GetCouplerZeroLengthM(); + } } public override float GetSimpleCouplerStiffnessNpM() @@ -3633,16 +3633,16 @@ public override float GetCouplerStiffness1NpM() { return base.GetCouplerStiffness1NpM(); } - return Coupler.Rigid ? 10 * Coupler.Stiffness1NpM : Coupler.Stiffness1NpM; + return Coupler.Rigid? 10 * Coupler.Stiffness1NpM : Coupler.Stiffness1NpM; } - + public override float GetCouplerStiffness2NpM() { if (Coupler == null) { return base.GetCouplerStiffness2NpM(); } - return Coupler.Rigid ? 10 * Coupler.Stiffness1NpM : Coupler.Stiffness2NpM; + return Coupler.Rigid? 10 * Coupler.Stiffness1NpM : Coupler.Stiffness2NpM; } public override float GetCouplerSlackAM() @@ -3667,7 +3667,7 @@ public override bool GetCouplerRigidIndication() { if (Coupler == null) { - return base.GetCouplerRigidIndication(); // If no coupler defined + return base.GetCouplerRigidIndication(); // If no coupler defined } return Coupler.Rigid ? true : false; // Return whether coupler Rigid or Flexible } @@ -3684,18 +3684,18 @@ public override bool GetAdvancedCouplerFlag() public override float GetMaximumSimpleCouplerSlack1M() // This limits the maximum amount of slack, and typically will be equal to y - x of R0 statement { - if (Coupler == null) - return base.GetMaximumSimpleCouplerSlack1M(); - return Coupler.Rigid ? 0.0001f : Coupler.R0Diff; + if (Coupler == null) + return base.GetMaximumSimpleCouplerSlack1M(); + return Coupler.Rigid ? 0.0001f : Coupler.R0Diff; } public override float GetMaximumSimpleCouplerSlack2M() // This limits the slack due to draft forces (?) and should be marginally greater then GetMaximumCouplerSlack1M { - if (Coupler == null) - return base.GetMaximumSimpleCouplerSlack2M(); - return Coupler.Rigid ? 0.0002f : base.GetMaximumSimpleCouplerSlack2M(); // GetMaximumCouplerSlack2M > GetMaximumCouplerSlack1M + if (Coupler == null) + return base.GetMaximumSimpleCouplerSlack2M(); + return Coupler.Rigid ? 0.0002f : base.GetMaximumSimpleCouplerSlack2M(); // GetMaximumCouplerSlack2M > GetMaximumCouplerSlack1M } @@ -3795,7 +3795,7 @@ public override float GetMaximumCouplerTensionSlack2M() if (Coupler == null) return base.GetMaximumCouplerTensionSlack2M(); - return Coupler.Rigid ? 0.0001f : Coupler.TensionR0Y + GetCouplerTensionSlackAM(); + return Coupler.Rigid? 0.0001f : Coupler.TensionR0Y + GetCouplerTensionSlackAM(); } public override float GetMaximumCouplerTensionSlack3M() // This limits the slack due to draft forces (?) and should be marginally greater then GetMaximumCouplerSlack2M @@ -3846,7 +3846,7 @@ public override float GetMaximumCouplerTensionSlack2M() return Coupler.Rigid ? 0.0002f : Coupler.CompressionR0Y + GetCouplerCompressionSlackAM() + Coupler2MTemporary; // GetMaximumCouplerSlack3M > GetMaximumCouplerSlack2M } - public override float GetCouplerBreak1N() + public override float GetCouplerBreak1N() { if (Coupler == null) { @@ -3855,7 +3855,7 @@ public override float GetCouplerBreak1N() return Coupler.Break1N; } - public override float GetCouplerBreak2N() + public override float GetCouplerBreak2N() { if (Coupler == null) { @@ -3864,7 +3864,7 @@ public override float GetCouplerBreak2N() return Coupler.Break2N; } - public override float GetCouplerTensionR0Y() + public override float GetCouplerTensionR0Y() { if (Coupler == null) { @@ -3958,7 +3958,7 @@ public override float GetFilledFraction(uint pickupType) public override float GetUserBrakeShoeFrictionFactor() { var frictionfraction = 0.0f; - if (BrakeShoeFrictionFactor == null) + if ( BrakeShoeFrictionFactor == null) { frictionfraction = 0.0f; } @@ -3966,7 +3966,7 @@ public override float GetUserBrakeShoeFrictionFactor() { frictionfraction = BrakeShoeFrictionFactor[MpS.ToKpH(AbsSpeedMpS)]; } - + return frictionfraction; } @@ -3987,10 +3987,10 @@ public override float GetZeroUserBrakeShoeFrictionFactor() } return frictionfraction; - } - - - + } + + + /// /// Starts a continuous increase in controlled value. /// @@ -4015,7 +4015,7 @@ public void StartRefillingOrUnloading(PickupObj matchPickup, IntakePoint intakeP } if (!unload) { - controller.SetStepSize(matchPickup.PickupCapacity.FeedRateKGpS / MSTSNotchController.StandardBoost / FreightAnimations.LoadedOne.FreightWeightWhenFull); + controller.SetStepSize(matchPickup.PickupCapacity.FeedRateKGpS/ MSTSNotchController.StandardBoost / FreightAnimations.LoadedOne.FreightWeightWhenFull); Simulator.Confirmer.Message(ConfirmLevel.Information, Simulator.Catalog.GetString("Starting refill")); controller.StartIncrease(controller.MaximumValue); } @@ -4038,13 +4038,13 @@ public void StartRefillingOrUnloading(PickupObj matchPickup, IntakePoint intakeP public void StartLoadingOrUnloading(PickupObj matchPickup, IntakePoint intakePoint, bool unload) { var type = matchPickup.PickupType; - /* var controller = WeightLoadController; - if (controller == null) - { - Simulator.Confirmer.Message(ConfirmLevel.Error, Simulator.Catalog.GetString("Incompatible data")); - return; - } - controller.CommandStartTime = Simulator.ClockTime; // for Replay to use */ + /* var controller = WeightLoadController; + if (controller == null) + { + Simulator.Confirmer.Message(ConfirmLevel.Error, Simulator.Catalog.GetString("Incompatible data")); + return; + } + controller.CommandStartTime = Simulator.ClockTime; // for Replay to use */ FreightAnimations.FreightType = (MSTSWagon.PickupType)type; @@ -4060,13 +4060,13 @@ public void StartLoadingOrUnloading(PickupObj matchPickup, IntakePoint intakePoi { Simulator.Confirmer.Message(ConfirmLevel.Information, Simulator.Catalog.GetString("No containers to load")); return; - } - // var container = containerStation.Containers.Last(); + } + // var container = containerStation.Containers.Last(); Simulator.Confirmer.Message(ConfirmLevel.Information, Simulator.Catalog.GetString("Starting load")); // immediate load at the moment - // FreightAnimations.DiscreteLoadedOne.Container = container; - containerStation.PrepareForLoad((FreightAnimationDiscrete)intakePoint.LinkedFreightAnim); - // FreightAnimations.DiscreteLoadedOne.Loaded = true; +// FreightAnimations.DiscreteLoadedOne.Container = container; + containerStation.PrepareForLoad((FreightAnimationDiscrete)intakePoint.LinkedFreightAnim); + // FreightAnimations.DiscreteLoadedOne.Loaded = true; } else { @@ -4235,8 +4235,8 @@ public MSTSCoupling(MSTSCoupling copy) } public void SetSimpleR0(float a, float b) { - R0X = a; - R0Y = b; + R0X = a; + R0Y = b; if (a == 0) R0Diff = b / 2 * Stiffness2NpM / (Stiffness1NpM + Stiffness2NpM); else @@ -4246,7 +4246,7 @@ public void SetSimpleR0(float a, float b) // Ensure R0Diff stays within "reasonable limits" if (R0Diff < 0.001) R0Diff = 0.001f; - else if (R0Diff > 0.1) + else if (R0Diff > 0.1) R0Diff = 0.1f; } @@ -4271,7 +4271,7 @@ public void SetCompressionR0(float a, float b) CompressionR0Y = b; } - public void SetTensionStiffness(float a, float b) +public void SetTensionStiffness(float a, float b) { if (a + b < 0) return; @@ -4344,7 +4344,7 @@ public void SetSimpleBreak(float a, float b) Break1N = a; // Check if b = 0, as some stock has a zero value, set a default - if (b == 0) + if ( b == 0) { Break2N = 2e7f; } @@ -4352,7 +4352,7 @@ public void SetSimpleBreak(float a, float b) { Break2N = b; } - + } /// diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/RollingStock.cs b/Source/Orts.Simulation/Simulation/RollingStocks/RollingStock.cs index ec088535b4..ca711c5def 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/RollingStock.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/RollingStock.cs @@ -15,15 +15,15 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using Orts.Common; +using Orts.Parsers.Msts; +using Orts.Simulation.Physics; +using Orts.Simulation.RollingStocks.SubSystems; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; -using Orts.Common; -using Orts.Parsers.Msts; -using Orts.Simulation.Physics; -using Orts.Simulation.RollingStocks.SubSystems; namespace Orts.Simulation.RollingStocks { diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/BrakeSystem.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/BrakeSystem.cs index d3221cc974..4297b7de03 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/BrakeSystem.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/BrakeSystem.cs @@ -15,9 +15,9 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using ORTS.Common; using System.Collections.Generic; using System.IO; -using ORTS.Common; namespace Orts.Simulation.RollingStocks.SubSystems.Brakes { diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs index bc617af80f..8df6254049 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs @@ -18,14 +18,15 @@ // Debug for Airbrake operation - Train Pipe Leak //#define DEBUG_TRAIN_PIPE_LEAK -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; +using Microsoft.Xna.Framework; using Orts.Common; using Orts.Parsers.Msts; using ORTS.Common; using ORTS.Scripting.Api; +using System; +using System.Collections.Generic; +using System.IO; +using System.Diagnostics; namespace Orts.Simulation.RollingStocks.SubSystems.Brakes.MSTS { @@ -85,7 +86,7 @@ public AirSinglePipe(TrainCar car) { Car = car; // taking into account very short (fake) cars to prevent NaNs in brake line pressures - BrakePipeVolumeM3 = (0.032f * 0.032f * (float)Math.PI / 4f) * Math.Max(5.0f, (1 + car.CarLengthM)); // Using DN32 (1-1/4") pipe + BrakePipeVolumeM3 = (0.032f * 0.032f * (float)Math.PI / 4f) * Math.Max ( 5.0f, (1 + car.CarLengthM)); // Using DN32 (1-1/4") pipe DebugType = "1P"; // Force graduated releasable brakes. Workaround for MSTS with bugs preventing to set eng/wag files correctly for this. @@ -226,7 +227,7 @@ public override void Parse(string lowercasetoken, STFReader stf) case "wagon(emergencyreschargingrate": EmergResChargingRatePSIpS = stf.ReadFloatBlock(STFReader.UNITS.PressureRateDefaultPSIpS, null); break; case "wagon(emergencyresvolumemultiplier": EmergAuxVolumeRatio = stf.ReadFloatBlock(STFReader.UNITS.None, null); break; case "wagon(emergencyrescapacity": EmergResVolumeM3 = Me3.FromFt3(stf.ReadFloatBlock(STFReader.UNITS.VolumeDefaultFT3, null)); break; - + // OpenRails specific parameters case "wagon(brakepipevolume": BrakePipeVolumeM3 = Me3.FromFt3(stf.ReadFloatBlock(STFReader.UNITS.VolumeDefaultFT3, null)); break; case "wagon(ortsbrakeinsensitivity": BrakeInsensitivityPSIpS = stf.ReadFloatBlock(STFReader.UNITS.PressureRateDefaultPSIpS, 0.07f); break; @@ -283,7 +284,7 @@ public override void Initialize(bool handbrakeOn, float maxPressurePSI, float fu { // reducing size of Emergency Reservoir for short (fake) cars if (Car.Simulator.Settings.CorrectQuestionableBrakingParams && Car.CarLengthM <= 1) - EmergResVolumeM3 = Math.Min(0.02f, EmergResVolumeM3); + EmergResVolumeM3 = Math.Min (0.02f, EmergResVolumeM3); // Install a plain triple valve if no brake valve defined // Do not install it for tenders if not defined, to allow tenders with straight brake only @@ -312,7 +313,7 @@ public override void Initialize(bool handbrakeOn, float maxPressurePSI, float fu HandbrakePercent = handbrakeOn & (Car as MSTSWagon).HandBrakePresent ? 100 : 0; SetRetainer(RetainerSetting.Exhaust); MSTSLocomotive loco = Car as MSTSLocomotive; - if (loco != null) + if (loco != null) { loco.MainResPressurePSI = loco.MaxMainResPressurePSI; } @@ -321,14 +322,14 @@ public override void Initialize(bool handbrakeOn, float maxPressurePSI, float fu AuxBrakeLineVolumeRatio = EmergResVolumeM3 / EmergAuxVolumeRatio / BrakePipeVolumeM3; else AuxBrakeLineVolumeRatio = 3.1f; - + CylVolumeM3 = EmergResVolumeM3 / EmergAuxVolumeRatio / AuxCylVolumeRatio; } /// /// Used when initial speed > 0 /// - public override void InitializeMoving() + public override void InitializeMoving () { Initialize(false, 0, FullServPressurePSI, true); } @@ -446,26 +447,26 @@ public override void Update(float elapsedClockSeconds) if (TripleValveState == ValveState.Release && (Car as MSTSWagon).BrakeValve != MSTSWagon.BrakeValveType.None) { if ((Car as MSTSWagon).EmergencyReservoirPresent) - { + { if (AuxResPressurePSI < EmergResPressurePSI && AuxResPressurePSI < BrakeLine1PressurePSI) - { - float dp = elapsedClockSeconds * EmergResChargingRatePSIpS; - if (EmergResPressurePSI - dp < AuxResPressurePSI + dp * EmergAuxVolumeRatio) - dp = (EmergResPressurePSI - AuxResPressurePSI) / (1 + EmergAuxVolumeRatio); - if (BrakeLine1PressurePSI < AuxResPressurePSI + dp * EmergAuxVolumeRatio) - dp = (BrakeLine1PressurePSI - AuxResPressurePSI) / EmergAuxVolumeRatio; - EmergResPressurePSI -= dp; - AuxResPressurePSI += dp * EmergAuxVolumeRatio; - } - if (AuxResPressurePSI > EmergResPressurePSI) - { - float dp = elapsedClockSeconds * EmergResChargingRatePSIpS; - if (EmergResPressurePSI + dp > AuxResPressurePSI - dp * EmergAuxVolumeRatio) - dp = (AuxResPressurePSI - EmergResPressurePSI) / (1 + EmergAuxVolumeRatio); - EmergResPressurePSI += dp; - AuxResPressurePSI -= dp * EmergAuxVolumeRatio; - } - } + { + float dp = elapsedClockSeconds * EmergResChargingRatePSIpS; + if (EmergResPressurePSI - dp < AuxResPressurePSI + dp * EmergAuxVolumeRatio) + dp = (EmergResPressurePSI - AuxResPressurePSI) / (1 + EmergAuxVolumeRatio); + if (BrakeLine1PressurePSI < AuxResPressurePSI + dp * EmergAuxVolumeRatio) + dp = (BrakeLine1PressurePSI - AuxResPressurePSI) / EmergAuxVolumeRatio; + EmergResPressurePSI -= dp; + AuxResPressurePSI += dp * EmergAuxVolumeRatio; + } + if (AuxResPressurePSI > EmergResPressurePSI) + { + float dp = elapsedClockSeconds * EmergResChargingRatePSIpS; + if (EmergResPressurePSI + dp > AuxResPressurePSI - dp * EmergAuxVolumeRatio) + dp = (AuxResPressurePSI - EmergResPressurePSI) / (1 + EmergAuxVolumeRatio); + EmergResPressurePSI += dp; + AuxResPressurePSI -= dp * EmergAuxVolumeRatio; + } + } if (AuxResPressurePSI < BrakeLine1PressurePSI && (!TwoPipes || !MRPAuxResCharging || ((Car as MSTSWagon).BrakeValve != MSTSWagon.BrakeValveType.Distributor) || BrakeLine2PressurePSI < BrakeLine1PressurePSI) && !BleedOffValveOpen) { float dp = elapsedClockSeconds * MaxAuxilaryChargingRatePSIpS; // Change in pressure for train brake pipe. @@ -502,7 +503,7 @@ public override void Update(float elapsedClockSeconds) { float dp = elapsedClockSeconds * ReleaseRatePSIpS; if (AutoCylPressurePSI - dp < minCylPressurePSI) - dp = AutoCylPressurePSI - minCylPressurePSI; + dp = AutoCylPressurePSI-minCylPressurePSI; if (dp < 0) dp = 0; AutoCylPressurePSI -= dp; @@ -525,7 +526,7 @@ public override void Update(float elapsedClockSeconds) if (AutoCylPressurePSI < 0) AutoCylPressurePSI = 0; - + if (Car is MSTSLocomotive && (Car as MSTSWagon).BrakeValve == MSTSWagon.BrakeValveType.DistributingValve) { // For distributing valves, we use AutoCylPressurePSI as "Application Chamber/Pipe" pressure @@ -533,7 +534,7 @@ public override void Update(float elapsedClockSeconds) var loco = Car as MSTSLocomotive; var engineBrakeStatus = loco.EngineBrakeController.Notches[loco.EngineBrakeController.CurrentNotch].Type; var trainBrakeStatus = loco.TrainBrakeController.Notches[loco.TrainBrakeController.CurrentNotch].Type; - // BailOff + // BailOff if (engineBrakeStatus == ControllerState.BailOff) { AutoCylPressurePSI -= MaxReleaseRatePSIpS * elapsedClockSeconds; @@ -549,7 +550,7 @@ public override void Update(float elapsedClockSeconds) } // Release pipe open HoldingValve = engineBrakeStatus == ControllerState.Release && trainBrakeStatus == ControllerState.Release ? ValveState.Release : ValveState.Lap; - + // Independent air brake equalization if (AutoCylPressurePSI < loco.Train.BrakeLine3PressurePSI) AutoCylPressurePSI = loco.Train.BrakeLine3PressurePSI; @@ -569,9 +570,9 @@ public override void Update(float elapsedClockSeconds) if (loco.LocomotivePowerSupply.MainPowerSupplyOn) { if (loco.Train.LeadLocomotiveIndex >= 0) - { + { var lead = loco.Train.Cars[loco.Train.LeadLocomotiveIndex] as MSTSLocomotive; - if (lead != null && (lead.BailOff || + if (lead != null && (lead.BailOff || (lead.EngineBrakeController != null && lead.EngineBrakeController.CurrentNotch >= 0 && lead.EngineBrakeController.Notches[lead.EngineBrakeController.CurrentNotch].Type == ControllerState.BailOff))) { if (loco.BrakeValve == MSTSWagon.BrakeValveType.Distributor) @@ -594,7 +595,7 @@ public override void Update(float elapsedClockSeconds) var localBrakeForceN = loco.DynamicBrakeForceN + Math.Min(CylPressurePSI / MaxCylPressurePSI, 1) * Car.MaxBrakeForceN; if (localBrakeForceN > requiredBrakeForceN - 0.15f * Car.MaxBrakeForceN) { - demandedPressurePSI = Math.Min(Math.Max((requiredBrakeForceN - loco.DynamicBrakeForceN) / Car.MaxBrakeForceN * MaxCylPressurePSI, 0), MaxCylPressurePSI); + demandedPressurePSI = Math.Min(Math.Max((requiredBrakeForceN - loco.DynamicBrakeForceN)/Car.MaxBrakeForceN*MaxCylPressurePSI, 0), MaxCylPressurePSI); if (demandedPressurePSI > CylPressurePSI && demandedPressurePSI < CylPressurePSI + 4) // Allow some margin for unnecessary air brake application { demandedPressurePSI = CylPressurePSI; @@ -665,7 +666,7 @@ public override void Update(float elapsedClockSeconds) if (Car.WheelBrakeSlideProtectionFitted && Car.Train.IsPlayerDriven) { // WSP dump valve active - if ((Car.BrakeSkidWarning || Car.BrakeSkid) && CylPressurePSI > 0 && !Car.WheelBrakeSlideProtectionDumpValveLockout && ((!Car.WheelBrakeSlideProtectionLimitDisabled && BrakeLine1PressurePSI > 36.25) || Car.WheelBrakeSlideProtectionLimitDisabled)) + if ((Car.BrakeSkidWarning || Car.BrakeSkid) && CylPressurePSI > 0 && !Car.WheelBrakeSlideProtectionDumpValveLockout && ( (!Car.WheelBrakeSlideProtectionLimitDisabled && BrakeLine1PressurePSI > 36.25) || Car.WheelBrakeSlideProtectionLimitDisabled) ) { Car.WheelBrakeSlideProtectionActive = true; AutoCylPressurePSI -= elapsedClockSeconds * MaxReleaseRatePSIpS; @@ -687,7 +688,7 @@ public override void Update(float elapsedClockSeconds) } } - + // Record HUD display values for brake cylinders depending upon whether they are wagons or locomotives/tenders (which are subject to their own engine brakes) if (Car.WagonType == MSTSWagon.WagonTypes.Engine || Car.WagonType == MSTSWagon.WagonTypes.Tender) { @@ -706,7 +707,7 @@ public override void Update(float elapsedClockSeconds) } // If wagons are not attached to the locomotive, then set wagon BC pressure to same as locomotive in the Train brake line - if (!Car.Train.WagonsAttached && (Car.WagonType == MSTSWagon.WagonTypes.Engine || Car.WagonType == MSTSWagon.WagonTypes.Tender)) + if (!Car.Train.WagonsAttached && (Car.WagonType == MSTSWagon.WagonTypes.Engine || Car.WagonType == MSTSWagon.WagonTypes.Tender) ) { Car.Train.HUDWagonBrakeCylinderPSI = CylPressurePSI; } @@ -718,7 +719,7 @@ public override void Update(float elapsedClockSeconds) if (f < Car.MaxHandbrakeForceN * HandbrakePercent / 100) f = Car.MaxHandbrakeForceN * HandbrakePercent / 100; } - else f = Math.Max(Car.MaxBrakeForceN, Car.MaxHandbrakeForceN / 2); + else f = Math.Max(Car.MaxBrakeForceN, Car.MaxHandbrakeForceN / 2); Car.BrakeRetardForceN = f * Car.BrakeShoeRetardCoefficientFrictionAdjFactor; // calculates value of force applied to wheel, independent of wheel skid if (Car.BrakeSkid) // Test to see if wheels are skiding to excessive brake force { @@ -733,7 +734,7 @@ public override void Update(float elapsedClockSeconds) if (SoundTriggerCounter >= 0.5f) { SoundTriggerCounter = 0f; - if (Math.Abs(AutoCylPressurePSI - prevCylPressurePSI) > 0.1f) //(AutoCylPressurePSI != prevCylPressurePSI) + if ( Math.Abs(AutoCylPressurePSI - prevCylPressurePSI) > 0.1f) //(AutoCylPressurePSI != prevCylPressurePSI) { if (!TrainBrakePressureChanging) { @@ -751,7 +752,7 @@ public override void Update(float elapsedClockSeconds) Car.SignalEvent(Event.TrainBrakePressureStoppedChanging); } - if (Math.Abs(BrakeLine1PressurePSI - prevBrakePipePressurePSI_sound) > 0.1f /*BrakeLine1PressurePSI > prevBrakePipePressurePSI*/) + if ( Math.Abs(BrakeLine1PressurePSI - prevBrakePipePressurePSI_sound) > 0.1f /*BrakeLine1PressurePSI > prevBrakePipePressurePSI*/) { if (!BrakePipePressureChanging) { @@ -888,7 +889,7 @@ protected static void PropagateBrakeLinePressures(float elapsedClockSeconds, Tra #endif train.TotalTrainBrakePipeVolumeM3 = 0.0f; // initialise train brake pipe volume - for (int carIndex = 0; carIndex < train.Cars.Count; carIndex++) + for (int carIndex=0; carIndex < train.Cars.Count; carIndex++) { TrainCar car = train.Cars[carIndex]; TrainCar nextCar = carIndex < train.Cars.Count - 1 ? train.Cars[carIndex + 1] : null; @@ -990,7 +991,7 @@ protected static void PropagateBrakeLinePressures(float elapsedClockSeconds, Tra if (p > 1000) p -= 1000; var prevState = lead.EngineBrakeState; - if (p < train.BrakeLine3PressurePSI && p < lead.MainResPressurePSI) // Apply the engine brake as the pressure decreases + if (p < train.BrakeLine3PressurePSI && p < lead.MainResPressurePSI ) // Apply the engine brake as the pressure decreases { float dp = elapsedClockSeconds * lead.EngineBrakeApplyRatePSIpS / (last - first + 1); if (p + dp > train.BrakeLine3PressurePSI) @@ -1115,7 +1116,7 @@ public void NormalizePressures(float maxPressurePSI) public override bool IsBraking() { if (AutoCylPressurePSI > MaxCylPressurePSI * 0.3) - return true; + return true; return false; } diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/EPBrakeSystem.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/EPBrakeSystem.cs index 3a12b2fd98..3024ab8062 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/EPBrakeSystem.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/EPBrakeSystem.cs @@ -17,8 +17,9 @@ using System; using System.Collections.Generic; -using Orts.Parsers.Msts; using ORTS.Common; +using Orts.Parsers.Msts; +using ORTS.Scripting.Api; namespace Orts.Simulation.RollingStocks.SubSystems.Brakes.MSTS { @@ -99,7 +100,7 @@ public override void Update(float elapsedClockSeconds) demandedAutoCylPressurePSI = Math.Min(Math.Max(Car.Train.BrakeLine4, 0), 1) * MaxCylPressurePSI; HoldingValve = AutoCylPressurePSI <= demandedAutoCylPressurePSI ? ValveState.Lap : ValveState.Release; } - + base.Update(elapsedClockSeconds); // Allow processing of other valid tokens if (AutoCylPressurePSI < demandedAutoCylPressurePSI && !Car.WheelBrakeSlideProtectionActive) @@ -113,12 +114,12 @@ public override void Update(float elapsedClockSeconds) AutoCylPressurePSI += dp; } } - + } public override void Parse(string lowercasetoken, STFReader stf) { - switch (lowercasetoken) + switch(lowercasetoken) { case "wagon(ortsepbrakecontrolsbrakepipe": EPBrakeControlsBrakePipe = stf.ReadBoolBlock(false); diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/ManualBraking.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/ManualBraking.cs index b151b0b803..f3be7f601a 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/ManualBraking.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/ManualBraking.cs @@ -15,11 +15,15 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using Orts.Common; +using Orts.Parsers.Msts; +using Orts.Simulation.Physics; +using ORTS.Common; +using ORTS.Scripting.Api; using System; using System.Collections.Generic; using System.IO; -using Orts.Parsers.Msts; -using ORTS.Common; +using System.Diagnostics; namespace Orts.Simulation.RollingStocks.SubSystems.Brakes.MSTS { @@ -98,7 +102,7 @@ public override void Initialize(bool handbrakeOn, float maxPressurePSI, float fu } // Changes brake type if tender fitted with steam brakes - if (Car.WagonType == MSTSWagon.WagonTypes.Tender) + if (Car.WagonType == MSTSWagon.WagonTypes.Tender) { var wagonid = Car as MSTSWagon; // Find the associated steam locomotive for this tender @@ -151,7 +155,7 @@ public override void Update(float elapsedClockSeconds) } BrakeForceFraction = ManualBrakingCurrentFraction / ManualMaxBrakeValue; - + // If car is a locomotive or tender, then process engine brake if (Car.WagonType == MSTSWagon.WagonTypes.Engine || Car.WagonType == MSTSWagon.WagonTypes.Tender) // Engine brake { @@ -167,7 +171,7 @@ public override void Update(float elapsedClockSeconds) { EngineBrakeDesiredFraction = EngineBrakeSettingValue * ManualMaxBrakeValue; } - + if (EngineBrakingCurrentFraction < EngineBrakeDesiredFraction) { @@ -202,7 +206,7 @@ public override void Update(float elapsedClockSeconds) } } - float f; + float f; if (!Car.BrakesStuck) { f = Car.MaxBrakeForceN * Math.Min(BrakeForceFraction, 1); diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SMEBrakeSystem.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SMEBrakeSystem.cs index 3d881a62d6..59838caa1e 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SMEBrakeSystem.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SMEBrakeSystem.cs @@ -15,9 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using ORTS.Common; using System; using System.Collections.Generic; -using ORTS.Common; +using ORTS.Scripting.Api; namespace Orts.Simulation.RollingStocks.SubSystems.Brakes.MSTS { @@ -25,7 +26,7 @@ namespace Orts.Simulation.RollingStocks.SubSystems.Brakes.MSTS // Detailed description of the operation of a SME brake system can be found in: "Air brakes, an up-to-date treatise on the Westinghouse air brake as designed for passenger and // freight service and for electric cars" by Ludy, Llewellyn V., 1875- [from old catalog]; American Technical Society // https://archive.org/details/airbrakesuptodat00ludy/page/174/mode/2up?q=%22SME+brake%22 - + public class SMEBrakeSystem : AirTwinPipe { public SMEBrakeSystem(TrainCar car) @@ -58,7 +59,7 @@ public override void Update(float elapsedClockSeconds) demandedAutoCylPressurePSI = Math.Min(Math.Max(Car.Train.BrakeLine4, 0), 1) * MaxCylPressurePSI; HoldingValve = AutoCylPressurePSI <= demandedAutoCylPressurePSI ? ValveState.Lap : ValveState.Release; } - + base.Update(elapsedClockSeconds); // Allow processing of other valid tokens @@ -72,7 +73,7 @@ public override void Update(float elapsedClockSeconds) BrakeLine2PressurePSI -= dp * AuxBrakeLineVolumeRatio / AuxCylVolumeRatio; AutoCylPressurePSI += dp; } - + } public override string[] GetDebugStatus(Dictionary units) diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SingleTransferPipe.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SingleTransferPipe.cs index 1215936efa..83bbab588d 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SingleTransferPipe.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SingleTransferPipe.cs @@ -16,9 +16,10 @@ // along with Open Rails. If not, see . using System; -using System.Collections.Generic; -using Orts.Parsers.Msts; using ORTS.Common; +using Orts.Parsers.Msts; +using System.Collections.Generic; +using System.Diagnostics; namespace Orts.Simulation.RollingStocks.SubSystems.Brakes.MSTS { @@ -100,15 +101,15 @@ public override string GetFullStatus(BrakeSystem lastCarBrakeSystem, Dictionary< s += $" {Simulator.Catalog.GetString("Handbrake")} {HandbrakePercent:F0}%"; return s; } - + } // This overides the information for each individual wagon in the extended HUD - public override string[] GetDebugStatus(Dictionary units) + public override string[] GetDebugStatus(Dictionary units) { // display differently depending upon whether vacuum or air braked system if (Car.CarBrakeSystemType == "vacuum_piped") - { + { return new string[] { DebugType, @@ -124,7 +125,7 @@ public override string[] GetDebugStatus(Dictionary. -using System; -using System.Collections.Generic; using Microsoft.Xna.Framework; -using Orts.Common; +using System; using ORTS.Common; +using Orts.Common; using ORTS.Scripting.Api; +using System.Collections.Generic; +using System.Diagnostics; namespace Orts.Simulation.RollingStocks.SubSystems.Brakes.MSTS { @@ -73,7 +74,7 @@ public override void Update(float elapsedClockSeconds) { // Adjust brake cylinder pressures as brake pipe varies // straight braked cars will have separate calculations done, if locomotive is not straight braked, then revert car to vacuum single pipe - if (lead.CarBrakeSystemType == "straight_vacuum_single_pipe") + if (lead.CarBrakeSystemType == "straight_vacuum_single_pipe") { (Car as MSTSWagon).NonAutoBrakePresent = true; // Set flag to indicate that non auto brake is set in train bool skiploop = false; @@ -89,7 +90,7 @@ public override void Update(float elapsedClockSeconds) } if (!skiploop) - { + { if (BrakeLine1PressurePSI < CylPressurePSIA && lead.BrakeFlagIncrease) // Increase BP pressure, hence vacuum brakes are being released { float dp = elapsedClockSeconds * MaxReleaseRatePSIpS; @@ -188,10 +189,10 @@ public override void Update(float elapsedClockSeconds) Car.SignalEvent(Event.TrainBrakePressureStoppedChanging); TrainBrakePressureChanging = false; } - prevCylPressurePSIA = CylPressurePSIA; - + prevCylPressurePSIA = CylPressurePSIA; + - if (Math.Abs(BrakeLine1PressurePSI - prevBrakePipePressurePSI) > 0.001) + if (Math.Abs(BrakeLine1PressurePSI - prevBrakePipePressurePSI) > 0.001) { if (!BrakePipePressureChanging) { @@ -252,7 +253,7 @@ public override void Update(float elapsedClockSeconds) { LargeEjectorChargingRateInHgpS = lead == null ? 10.0f : (lead.BrakePipeChargingRatePSIorInHgpS); // Single ejector model } - + float SmallEjectorChargingRateInHgpS = lead == null ? 10.0f : (lead.SmallEjectorBrakePipeChargingRatePSIorInHgpS); // Set value for small ejector to operate - fraction set in steam locomotive float TrainPipeLeakLossPSI = lead == null ? 0.0f : (lead.TrainBrakePipeLeakPSIorInHgpS); float AdjTrainPipeLeakLossPSI = 0.0f; @@ -298,7 +299,7 @@ public override void Update(float elapsedClockSeconds) lead.BrakeFlagIncrease = true; lead.BrakeFlagDecrease = false; - + // Apply brakes - brakepipe has to have vacuum increased to max vacuum value (ie decrease psi), vacuum is created by large ejector control lead.BrakeSystem.BrakeLine1PressurePSI -= elapsedClockSeconds * (AdjLargeEjectorChargingRateInHgpS + AdjSmallEjectorChargingRateInHgpS); if (lead.BrakeSystem.BrakeLine1PressurePSI < (OneAtmospherePSI - MaxVacuumPipeLevelPSI)) @@ -325,8 +326,8 @@ public override void Update(float elapsedClockSeconds) } - // Eames type brake with separate release and ejector operating handles - if (lead.LargeEjectorControllerFitted && lead.LargeSteamEjectorIsOn) + // Eames type brake with separate release and ejector operating handles + if (lead.LargeEjectorControllerFitted && lead.LargeSteamEjectorIsOn) { // Apply brakes - brakepipe has to have vacuum increased to max vacuum value (ie decrease psi), vacuum is created by large ejector control lead.BrakeSystem.BrakeLine1PressurePSI -= elapsedClockSeconds * AdjLargeEjectorChargingRateInHgpS; @@ -341,7 +342,7 @@ public override void Update(float elapsedClockSeconds) { lead.BrakeFlagIncrease = false; lead.BrakeFlagDecrease = true; - + lead.BrakeSystem.BrakeLine1PressurePSI += elapsedClockSeconds * AdjBrakeServiceTimeFactorPSIpS; if (lead.BrakeSystem.BrakeLine1PressurePSI > OneAtmospherePSI) { @@ -357,7 +358,7 @@ public override void Update(float elapsedClockSeconds) } } - + if (((lead.CarBrakeSystemType == "vacuum_single_pipe" || lead.CarBrakeSystemType == "vacuum_twin_pipe") && (Car as MSTSWagon).AuxiliaryReservoirPresent)) { // update non calculated values using vacuum single pipe class diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/VacuumSinglePipe.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/VacuumSinglePipe.cs index 6fcb424194..6e7ad2bf89 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/VacuumSinglePipe.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/VacuumSinglePipe.cs @@ -18,14 +18,16 @@ // Debug for Vacuum operation - Train Pipe Leak //#define DEBUG_TRAIN_PIPE_LEAK -using System; -using System.Collections.Generic; -using System.IO; using Microsoft.Xna.Framework; using Orts.Common; using Orts.Parsers.Msts; +using Orts.Simulation.Physics; using ORTS.Common; using ORTS.Scripting.Api; +using System; +using System.Collections.Generic; +using System.IO; +using System.Diagnostics; namespace Orts.Simulation.RollingStocks.SubSystems.Brakes.MSTS { @@ -94,7 +96,7 @@ protected float VacResPressureAdjPSIA() { if (VacResPressurePSIA >= CylPressurePSIA) { - return VacResPressurePSIA; + return VacResPressurePSIA; } // TODO - review for a better approach // Calculate the new vacuum based upon the volume reduction in the reservoir due to brake cylinder movement @@ -113,7 +115,7 @@ public override string GetFullStatus(BrakeSystem lastCarBrakeSystem, Dictionary< { string s; // display depending upon whether an EQ reservoir fitted - if (Car.Train.EQEquippedVacLoco) + if ( Car.Train.EQEquippedVacLoco) { // The equalising pressure operates between 0 (Apply) and full pipe vacuum (12.278psi = 25 inHg - Release), which is the reverse of above, // so it needs to be mapped to provide a desired vacuum of 2.278 psi = 25 inhg = Release and 14.503psi = 0 inhg = Apply @@ -193,7 +195,7 @@ public override float GetCylPressurePSI() { return KPa.ToPSI(KPa.FromInHg(Vac.FromPress(CylPressurePSIA))); } - + } public override float GetCylVolumeM3() @@ -210,7 +212,7 @@ public override float GetVacBrakeCylNumber() { return NumBrakeCylinders; } - + public override float GetVacResPressurePSI() { @@ -224,9 +226,8 @@ public override void Parse(string lowercasetoken, STFReader stf) case "wagon(brakecylinderpressureformaxbrakebrakeforce": MaxForcePressurePSI = stf.ReadFloatBlock(STFReader.UNITS.PressureDefaultInHg, null); break; case "wagon(maxreleaserate": MaxReleaseRatePSIpS = stf.ReadFloatBlock(STFReader.UNITS.PressureRateDefaultInHgpS, null); break; case "wagon(maxapplicationrate": MaxApplicationRatePSIpS = stf.ReadFloatBlock(STFReader.UNITS.PressureRateDefaultInHgpS, null); break; - case "wagon(ortsdirectadmissionvalve": - DirectAdmissionValve = stf.ReadFloatBlock(STFReader.UNITS.None, null); - if (DirectAdmissionValve == 1.0f) + case "wagon(ortsdirectadmissionvalve": DirectAdmissionValve = stf.ReadFloatBlock(STFReader.UNITS.None, null); + if(DirectAdmissionValve == 1.0f) { HasDirectAdmissionValue = true; } @@ -238,8 +239,7 @@ public override void Parse(string lowercasetoken, STFReader stf) // OpenRails specific parameters case "wagon(brakepipevolume": BrakePipeVolumeM3 = Me3.FromFt3(stf.ReadFloatBlock(STFReader.UNITS.VolumeDefaultFT3, null)); break; case "wagon(ortsauxilaryrescapacity": VacResVolM3 = Me3.FromFt3(stf.ReadFloatBlock(STFReader.UNITS.VolumeDefaultFT3, null)); break; - case "wagon(ortsbrakecylindersize": - float BrakeCylSizeM = stf.ReadFloatBlock(STFReader.UNITS.Distance, null); + case "wagon(ortsbrakecylindersize": float BrakeCylSizeM = stf.ReadFloatBlock(STFReader.UNITS.Distance, null); BrakeCylVolM3 = Me3.FromIn3((float)((Me.ToIn(BrakeCylSizeM) / 2) * (Me.ToIn(BrakeCylSizeM) / 2) * 4.5 * Math.PI)); // Calculate brake cylinder volume based upon size of BC, 4.5" of piston travel break; case "wagon(ortsnumberbrakecylinders": NumBrakeCylinders = stf.ReadIntBlock(null); break; @@ -288,13 +288,13 @@ public override void Initialize(bool handbrakeOn, float maxVacuumInHg, float ful BrakeLine1PressurePSI = Vac.ToPress(Car.Train.EqualReservoirPressurePSIorInHg); BrakeLine2PressurePSI = 0; - // BrakeLine3PressurePSI = V2P(Car.Train.EqualReservoirPressurePSIorInHg); - /* if (Car.Train.AITrainBrakePercent == 0) - { - CylPressurePSIA = 0; - Car.BrakeForceN = 0; - } - else */ +// BrakeLine3PressurePSI = V2P(Car.Train.EqualReservoirPressurePSIorInHg); +/* if (Car.Train.AITrainBrakePercent == 0) + { + CylPressurePSIA = 0; + Car.BrakeForceN = 0; + } + else */ CylPressurePSIA = Vac.ToPress(Car.Train.EqualReservoirPressurePSIorInHg); VacResPressurePSIA = Vac.ToPress(Car.Train.EqualReservoirPressurePSIorInHg); HandbrakePercent = 0; @@ -537,7 +537,7 @@ public override void Update(float elapsedClockSeconds) BrakeLine1PressurePSI -= dp * vr; } } - + // Record HUD display values for brake cylidners depending upon whether they are wagons or locomotives/tenders (which are subject to their own engine brakes) if (Car.WagonType == MSTSWagon.WagonTypes.Engine || Car.WagonType == MSTSWagon.WagonTypes.Tender) { @@ -561,8 +561,8 @@ public override void Update(float elapsedClockSeconds) Car.Train.HUDWagonBrakeCylinderPSI = CylPressurePSIA; } - float vrp = VacResPressureAdjPSIA(); - float f; + float vrp = VacResPressureAdjPSIA(); + float f; if (!Car.BrakesStuck) { // depending upon whether steam brake fitted or not, calculate brake force to be applied @@ -580,7 +580,7 @@ public override void Update(float elapsedClockSeconds) } else f = Math.Max(Car.MaxBrakeForceN, Car.MaxHandbrakeForceN / 2); - Car.BrakeRetardForceN = f * Car.BrakeShoeRetardCoefficientFrictionAdjFactor; // calculates value of force applied to wheel, independent of wheel skid + Car.BrakeRetardForceN = f * Car.BrakeShoeRetardCoefficientFrictionAdjFactor; // calculates value of force applied to wheel, independent of wheel skid if (Car.BrakeSkid) // Test to see if wheels are skiding due to excessive brake force { Car.BrakeForceN = f * Car.SkidFriction; // if excessive brakeforce, wheel skids, and loses adhesion @@ -589,7 +589,7 @@ public override void Update(float elapsedClockSeconds) { Car.BrakeForceN = f * Car.BrakeShoeCoefficientFrictionAdjFactor; // In advanced adhesion model brake shoe coefficient varies with speed, in simple model constant force applied as per value in WAG file, will vary with wheel skid. } - + // sound trigger checking runs every 4th update, to avoid the problems caused by the jumping BrakeLine1PressurePSI value, and also saves cpu time :) if (SoundTriggerCounter >= 4) @@ -603,7 +603,7 @@ public override void Update(float elapsedClockSeconds) Car.SignalEvent(Event.TrainBrakePressureIncrease); else Car.SignalEvent(Event.TrainBrakePressureDecrease); - TrainBrakePressureChanging = !TrainBrakePressureChanging; + TrainBrakePressureChanging = !TrainBrakePressureChanging; } } @@ -613,7 +613,7 @@ public override void Update(float elapsedClockSeconds) Car.SignalEvent(Event.TrainBrakePressureStoppedChanging); } - if (Math.Abs(BrakeLine1PressurePSI - prevBrakePipePressurePSI) > 0.05) /*BrakeLine1PressurePSI > prevBrakePipePressurePSI*/ + if ( Math.Abs(BrakeLine1PressurePSI-prevBrakePipePressurePSI)> 0.05) /*BrakeLine1PressurePSI > prevBrakePipePressurePSI*/ { if (!BrakePipePressureChanging) { @@ -775,7 +775,7 @@ protected static void PropagateBrakeLinePressures(float elapsedClockSeconds, Tra AdjbrakePipeTimeFactorS = TempbrakePipeTimeMultFactor * brakePipeTimeFactorS; AdjBrakePipeDischargeTimeFactor = TempbrakePipeTimeMultFactor * lead.BrakePipeDischargeTimeFactor; - + // This section determines whether small ejector or vacuum pump is going to counteract brake pipe leakage - only applies to steam locomotives if (lead.EngineType == TrainCar.EngineTypes.Steam) @@ -929,14 +929,14 @@ protected static void PropagateBrakeLinePressures(float elapsedClockSeconds, Tra // If Diff is going to take BP vacuum below the value in the Main Reservoir, then only do the difference between the two (remember this is in PSIA) - // if (lead.BrakeSystem.BrakeLine1PressurePSI - TrainPipePressureDiffPSI < lead.VacuumMainResVacuumPSIAorInHg) - // { - // TrainPipePressureDiffPSI = lead.VacuumMainResVacuumPSIAorInHg - lead.BrakeSystem.BrakeLine1PressurePSI; - // } +// if (lead.BrakeSystem.BrakeLine1PressurePSI - TrainPipePressureDiffPSI < lead.VacuumMainResVacuumPSIAorInHg) +// { +// TrainPipePressureDiffPSI = lead.VacuumMainResVacuumPSIAorInHg - lead.BrakeSystem.BrakeLine1PressurePSI; +// } - // if (TrainPipePressureDiffPSI < 0 || lead.VacuumMainResVacuumPSIAorInHg > lead.BrakeSystem.BrakeLine1PressurePSI) - // TrainPipePressureDiffPSI = 0; +// if (TrainPipePressureDiffPSI < 0 || lead.VacuumMainResVacuumPSIAorInHg > lead.BrakeSystem.BrakeLine1PressurePSI) +// TrainPipePressureDiffPSI = 0; // Adjust brake pipe pressure based upon pressure differential // If pipe leakage and brake control valve is in LAP position then pipe is connected to main reservoir and maintained at equalising pressure from reservoir @@ -946,10 +946,10 @@ protected static void PropagateBrakeLinePressures(float elapsedClockSeconds, Tra if (lead.TrainBrakeController.TrainBrakeControllerState != ControllerState.Lap) { lead.BrakeSystem.BrakeLine1PressurePSI -= TrainPipePressureDiffPSI; // Increase brake pipe pressure to cover loss in vacuum pipe - // float VolDiffM3 = (train.TotalTrainBrakeSystemVolumeM3 / lead.VacuumBrakesMainResVolumeM3); - // lead.VacuumMainResVacuumPSIAorInHg += TrainPipePressureDiffPSI * VolDiffM3; - // if (lead.VacuumMainResVacuumPSIAorInHg > OneAtmospherePSI) - // lead.VacuumMainResVacuumPSIAorInHg = OneAtmospherePSI; // Ensure Main Res does not go negative +// float VolDiffM3 = (train.TotalTrainBrakeSystemVolumeM3 / lead.VacuumBrakesMainResVolumeM3); +// lead.VacuumMainResVacuumPSIAorInHg += TrainPipePressureDiffPSI * VolDiffM3; +// if (lead.VacuumMainResVacuumPSIAorInHg > OneAtmospherePSI) +// lead.VacuumMainResVacuumPSIAorInHg = OneAtmospherePSI; // Ensure Main Res does not go negative } // else in LAP psoition brake pipe is isolated, and thus brake pipe pressure decreases, but reservoir remains at same pressure else @@ -998,7 +998,7 @@ protected static void PropagateBrakeLinePressures(float elapsedClockSeconds, Tra // Brake Controller is in Release position - decrease brake pipe value pressure - PSI goes from 14.5 to 4.189 - releasing brakes else if (lead.TrainBrakeController.TrainBrakeControllerState == ControllerState.Release) { - + float TrainPipePressureDiffPSI = 0; if (lead.EngineType == TrainCar.EngineTypes.Diesel || lead.EngineType == TrainCar.EngineTypes.Electric || lead.EngineType == TrainCar.EngineTypes.Control) { diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/BrakeController.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/BrakeController.cs index 0cc8932653..2738a55106 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/BrakeController.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/BrakeController.cs @@ -15,12 +15,13 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.IO; using Orts.Parsers.Msts; +using Orts.Simulation.AIs; using ORTS.Common; using ORTS.Scripting.Api; +using System; +using System.Collections.Generic; +using System.IO; namespace Orts.Simulation.RollingStocks.SubSystems.Controllers { @@ -253,7 +254,7 @@ public void Parse(string lowercasetoken, STFReader stf) break; case "engine(trainbrakescontrollermaxreleaserate": - case "engine(enginebrakescontrollermaxreleaserate": + case "engine(enginebrakescontrollermaxreleaserate": ReleaseRatePSIpS = stf.ReadFloatBlock(STFReader.UNITS.PressureRateDefaultPSIpS, null); break; @@ -440,7 +441,7 @@ public void StartIncrease(float? target) SignalEvent(BrakeControllerEvent.StartIncrease, target); } - public void StartDecrease(float? target, bool toZero = false) + public void StartDecrease(float? target , bool toZero = false) { if (toZero) SignalEvent(BrakeControllerEvent.StartDecreaseToZero, target); else SignalEvent(BrakeControllerEvent.StartDecrease, target); diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/ControllerFactory.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/ControllerFactory.cs index 738deaaf1d..37549545fa 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/ControllerFactory.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/ControllerFactory.cs @@ -20,8 +20,8 @@ namespace Orts.Simulation.RollingStocks.SubSystems.Controllers { public enum ControllerTypes - { - MSTSNotchController = 1, + { + MSTSNotchController = 1, BrakeController } @@ -35,13 +35,13 @@ public static void Save(IController controller, BinaryWriter outf) controller.Save(outf); } - public static void Restore(IController controller, BinaryReader inf) + public static void Restore(IController controller, BinaryReader inf) { if (!inf.ReadBoolean()) return; switch ((ControllerTypes)inf.ReadInt32()) - { + { case ControllerTypes.MSTSNotchController: if (controller == null) controller = new MSTSNotchController(); diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/IController.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/IController.cs index 5893e908de..1b768cb20f 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/IController.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/IController.cs @@ -15,8 +15,8 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System.IO; using Orts.Parsers.Msts; +using System.IO; namespace Orts.Simulation.RollingStocks.SubSystems.Controllers { diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/MSTSBrakeController.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/MSTSBrakeController.cs index a9b2f150e2..28b1228ab6 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/MSTSBrakeController.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/MSTSBrakeController.cs @@ -27,7 +27,7 @@ namespace Orts.Simulation.RollingStocks.SubSystems.Controllers * has specific methods to update brake status. * */ - public class MSTSBrakeController : BrakeController + public class MSTSBrakeController: BrakeController { public MSTSNotchController NotchController; @@ -164,7 +164,7 @@ public override void UpdatePressure(ref float pressureBar, float elapsedClockSec case ControllerState.FullServ: epState = x; EnforceMinimalReduction = true; - DecreasePressure(ref pressureBar, MaxPressureBar() - FullServReductionBar(), ApplyRateBarpS(), elapsedClockSeconds); + DecreasePressure(ref pressureBar, MaxPressureBar()-FullServReductionBar(), ApplyRateBarpS(), elapsedClockSeconds); break; case ControllerState.Lap: // Lap position applies min service reduction when first selected, and previous contoller position was Running, then no change in pressure occurs @@ -250,7 +250,7 @@ public override void UpdateEngineBrakePressure(ref float pressureBar, float elap pressureBar = (MaxPressureBar() - FullServReductionBar()) * CurrentValue(); } else - { + { float x = NotchController.GetNotchFraction(); switch (notch.Type) { @@ -267,11 +267,11 @@ public override void UpdateEngineBrakePressure(ref float pressureBar, float elap break; case ControllerState.Apply: case ControllerState.FullServ: - IncreasePressure(ref pressureBar, MaxPressureBar() - FullServReductionBar(), x * ApplyRateBarpS(), elapsedClockSeconds); + IncreasePressure(ref pressureBar, MaxPressureBar() - FullServReductionBar(), x*ApplyRateBarpS(), elapsedClockSeconds); break; case ControllerState.ManualBraking: case ControllerState.VacContServ: - // Continuous service positions for vacuum brakes - allows brake to be adjusted up and down continuously between the ON and OFF position + // Continuous service positions for vacuum brakes - allows brake to be adjusted up and down continuously between the ON and OFF position pressureBar = (1 - x) * MaxPressureBar(); break; case ControllerState.BrakeNotch: diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/MSTSNotchController.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/MSTSNotchController.cs index 3185210fa3..2186396fd0 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/MSTSNotchController.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/MSTSNotchController.cs @@ -15,16 +15,15 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System.Collections.Generic; -using System.IO; using Microsoft.Xna.Framework; using Orts.Parsers.Msts; using ORTS.Scripting.Api; +using System.Collections.Generic; +using System.IO; namespace Orts.Simulation.RollingStocks.SubSystems.Controllers { - public class MSTSNotch - { + public class MSTSNotch { public float Value; public bool Smooth; public ControllerState Type; @@ -133,7 +132,7 @@ public void Save(BinaryWriter outf) * The user need to press the key multiple times to update this controller. * */ - public class MSTSNotchController : IController + public class MSTSNotchController: IController { public float CurrentValue { get; set; } public float IntermediateValue; @@ -244,7 +243,7 @@ public int NotchCount() private float GetNotchBoost(float boost) { - return (ToZero && ((CurrentNotch >= 0 && Notches[CurrentNotch].Smooth) || Notches.Count == 0 || + return (ToZero && ((CurrentNotch >= 0 && Notches[CurrentNotch].Smooth) || Notches.Count == 0 || IntermediateValue - CurrentValue > StepSize) ? FastBoost : boost); } @@ -274,7 +273,7 @@ public int SetValue(float value) if (CurrentNotch >= 0 && !Notches[CurrentNotch].Smooth) CurrentValue = Notches[CurrentNotch].Value; - var change = CurrentNotch > oldNotch || CurrentValue > OldValue + 0.1f || CurrentValue == 1 && OldValue < 1 + var change = CurrentNotch > oldNotch || CurrentValue > OldValue + 0.1f || CurrentValue == 1 && OldValue < 1 ? 1 : CurrentNotch < oldNotch || CurrentValue < OldValue - 0.1f || CurrentValue == 0 && OldValue > 0 ? -1 : 0; if (change != 0) OldValue = CurrentValue; @@ -296,7 +295,7 @@ public float SetPercent(float percent) MSTSNotch notch = Notches[CurrentNotch]; if (CurrentNotch > 0 && v < notch.Value) { - MSTSNotch prev = Notches[CurrentNotch - 1]; + MSTSNotch prev = Notches[CurrentNotch-1]; if (!notch.Smooth && !prev.Smooth && v - prev.Value > .45 * (notch.Value - prev.Value)) break; CurrentNotch--; @@ -326,8 +325,7 @@ public float SetPercent(float percent) return 100 * CurrentValue; } - public void StartIncrease(float? target) - { + public void StartIncrease( float? target ) { controllerTarget = target; ToZero = false; StartIncrease(); @@ -343,20 +341,20 @@ public void StartIncrease() ++CurrentNotch; IntermediateValue = CurrentValue = Notches[CurrentNotch].Value; } - } + } public void StopIncrease() { UpdateValue = 0; } - public void StartDecrease(float? target, bool toZero = false) + public void StartDecrease( float? target, bool toZero = false) { controllerTarget = target; ToZero = toZero; StartDecrease(); } - + public void StartDecrease() { UpdateValue = -1; @@ -400,13 +398,12 @@ public float UpdateAndSetBoost(float elapsedSeconds, float boost) /// /// If a target has been set, then stop once it's reached and also cancel the target. /// - public void CheckControllerTargetAchieved() - { - if (controllerTarget != null) + public void CheckControllerTargetAchieved() { + if( controllerTarget != null ) { - if (UpdateValue > 0.0) + if( UpdateValue > 0.0 ) { - if (CurrentValue >= controllerTarget) + if( CurrentValue >= controllerTarget ) { StopIncrease(); controllerTarget = null; @@ -414,7 +411,7 @@ public void CheckControllerTargetAchieved() } else { - if (CurrentValue <= controllerTarget) + if( CurrentValue <= controllerTarget ) { StopDecrease(); controllerTarget = null; @@ -445,7 +442,7 @@ private float UpdateValues(float elapsedSeconds, float direction, float boost) CurrentNotch++; } //decreasing, again check if the current notch has changed - else if ((direction < 0) && (CurrentNotch > 0) && (IntermediateValue < Notches[CurrentNotch].Value)) + else if((direction < 0) && (CurrentNotch > 0) && (IntermediateValue < Notches[CurrentNotch].Value)) { CurrentNotch--; } @@ -539,25 +536,25 @@ public virtual void Save(BinaryWriter outf) } protected virtual void SaveData(BinaryWriter outf) - { - outf.Write(CurrentValue); + { + outf.Write(CurrentValue); outf.Write(MinimumValue); outf.Write(MaximumValue); outf.Write(StepSize); - outf.Write(CurrentNotch); + outf.Write(CurrentNotch); outf.Write(Notches.Count); - - foreach (MSTSNotch notch in Notches) + + foreach(MSTSNotch notch in Notches) { - notch.Save(outf); - } + notch.Save(outf); + } } public virtual void Restore(BinaryReader inf) { Notches.Clear(); - IntermediateValue = CurrentValue = inf.ReadSingle(); + IntermediateValue = CurrentValue = inf.ReadSingle(); MinimumValue = inf.ReadSingle(); MaximumValue = inf.ReadSingle(); StepSize = inf.ReadSingle(); @@ -570,7 +567,7 @@ public virtual void Restore(BinaryReader inf) for (int i = 0; i < count; ++i) { Notches.Add(new MSTSNotch(inf)); - } + } } public MSTSNotch GetCurrentNotch() @@ -592,12 +589,12 @@ protected void SetCurrentNotch(ControllerState type) } } - public void SetStepSize(float stepSize) + public void SetStepSize ( float stepSize) { StepSize = stepSize; } - public void Normalize(float ratio) + public void Normalize (float ratio) { for (int i = 0; i < Notches.Count; i++) Notches[i].Value /= ratio; @@ -633,7 +630,7 @@ public int GetNotch(float value) { if (Notches[notch].Value <= value) { - break; + break; } } return notch; diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/MultiPositionController.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/MultiPositionController.cs index 1c7d271a57..ca0a36f6f7 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/MultiPositionController.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/MultiPositionController.cs @@ -16,6 +16,7 @@ // along with Open Rails. If not, see . using System; +using System.Collections; using System.Collections.Generic; using System.IO; using Orts.Formats.Msts; @@ -72,7 +73,7 @@ public MultiPositionController(MultiPositionController other, MSTSLocomotive loc ControllerId = other.ControllerId; CanControlTrainBrake = other.CanControlTrainBrake; } - + public void Save(BinaryWriter outf) { @@ -102,7 +103,7 @@ public void Restore(BinaryReader inf) public void Parse(STFReader stf) { stf.MustMatch("("); - stf.ParseBlock(new[] { + stf.ParseBlock(new [] { new STFReader.TokenProcessor("positions", () => { stf.MustMatch("("); stf.ParseBlock(new [] { @@ -814,7 +815,7 @@ public Position(string positionType, string positionFlag, string name) Enum.TryParse(positionType, true, out Type); if (!Enum.TryParse(positionFlag, true, out Flag)) { - switch (positionFlag.ToLower()) + switch(positionFlag.ToLower()) { case "cruisecontrol.needincreaseafteranybrake": Flag = ControllerPositionFlag.CCNeedIncreaseAfterAnyBrake; diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/CruiseControl.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/CruiseControl.cs index 55b8d88ef7..b3007cab86 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/CruiseControl.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/CruiseControl.cs @@ -71,13 +71,13 @@ public float SetSpeedMpS return selected; } } - public float SetSpeedKpHOrMpH + public float SetSpeedKpHOrMpH { get { return SpeedIsMph ? MpS.ToMpH(SetSpeedMpS) : MpS.ToKpH(SetSpeedMpS); } - } + } public int SelectedNumberOfAxles = 0; public float SpeedRegulatorNominalSpeedStepMpS = 0; public float SpeedRegulatorNominalSpeedStepKpHOrMpH = 0; @@ -88,7 +88,7 @@ public float SetSpeedKpHOrMpH public float AntiWheelSpinSpeedDiffThreshold = 0.5f; public float DynamicBrakeMaxForceAtSelectorStep = 0; float trainBrakePercent; - public float TrainBrakePercent { get { return trainBrakePercent; } } + public float TrainBrakePercent { get { return trainBrakePercent; }} protected float trainLength = 0; public int TrainLengthMeters = 0; public float CurrentSelectedSpeedMpS = 0; @@ -188,7 +188,7 @@ public CruiseControl(CruiseControl other, MSTSLocomotive locomotive) { Simulator = locomotive.Simulator; Locomotive = locomotive; - + RestrictedRegionOdometer = new OdoMeter(locomotive); SpeedIsMph = other.SpeedIsMph; @@ -365,23 +365,23 @@ public void Parse(STFReader stf) } break; case "controllercruisecontrollogic": + { + String speedControlLogic = stf.ReadStringBlock("none").ToLower(); + switch (speedControlLogic) { - String speedControlLogic = stf.ReadStringBlock("none").ToLower(); - switch (speedControlLogic) - { - case "full": - { - CruiseControlLogic = ControllerCruiseControlLogic.Full; - break; - } - case "speedonly": - { - CruiseControlLogic = ControllerCruiseControlLogic.SpeedOnly; - break; - } - } - break; + case "full": + { + CruiseControlLogic = ControllerCruiseControlLogic.Full; + break; + } + case "speedonly": + { + CruiseControlLogic = ControllerCruiseControlLogic.SpeedOnly; + break; + } } + break; + } case "(": stf.SkipRestOfBlock(); break; default: break; } @@ -399,10 +399,10 @@ public void Initialize() DynamicBrakeFullRangeIncreaseTimeSeconds = 4; if (DynamicBrakeFullRangeDecreaseTimeSeconds == 0) DynamicBrakeFullRangeDecreaseTimeSeconds = 6; - + ComputeNumberOfAxles(); if (StartReducingSpeedDeltaDownwards == 0) StartReducingSpeedDeltaDownwards = StartReducingSpeedDelta; - if (StartInAutoMode) SpeedRegMode = SpeedRegulatorMode.Auto; + if (StartInAutoMode) SpeedRegMode = SpeedRegulatorMode.Auto; } private void ComputeNumberOfAxles() @@ -677,7 +677,7 @@ public void SpeedRegulatorModeDecrease() if (SelectedMaxAccelerationPercent > 0) Locomotive.DynamicBrakeController.SetPercent(-1); } if (!ModeSwitchAllowedWithThrottleNotAtZero) - Locomotive.ThrottleController.SetPercent(0); + Locomotive.ThrottleController.SetPercent(0); if (SpeedRegulatorOptions.Contains("regulatormanual")) test = true; if (ZeroSelectedSpeedWhenPassingToThrottleMode || UseThrottleAsSpeedSelector) SelectedSpeedMpS = 0; if (UseThrottleAsForceSelector) SelectedMaxAccelerationPercent = 0; @@ -793,7 +793,7 @@ protected void SpeedRegulatorMaxForceIncrease(float elapsedClockSeconds) return; speedRegulatorIntermediateValue += StepSize * elapsedClockSeconds; selectedMaxAccelerationPercent = Math.Min((float)Math.Truncate(speedRegulatorIntermediateValue + 1), 100); - if (UseThrottleAsForceSelector && ModeSwitchAllowedWithThrottleNotAtZero && + if (UseThrottleAsForceSelector && ModeSwitchAllowedWithThrottleNotAtZero && (Locomotive.CombinedControlType == MSTSLocomotive.CombinedControl.ThrottleDynamic && !Locomotive.DynamicBrake)) Locomotive.ThrottleController.SetPercent(selectedMaxAccelerationPercent); } @@ -919,7 +919,7 @@ public void SpeedRegulatorMaxForceChangeByMouse(float movExtension, float maxVal public bool selectedSpeedIncreasing = false; public void SpeedRegulatorSelectedSpeedStartIncrease() { - var mpc = Locomotive.MultiPositionControllers.Where(x => + var mpc = Locomotive.MultiPositionControllers.Where(x => x.controllerBinding == ControllerBinding.SelectedSpeed && !x.StateChanged).FirstOrDefault(); if (mpc != null) { @@ -947,7 +947,7 @@ public void SpeedRegulatorSelectedSpeedStartIncrease() { SpeedRegMode = SpeedRegulatorMode.Auto; } - if (UseThrottleAsSpeedSelector || HasProportionalSpeedSelector || (UseThrottleAsForceSelector && mpc == null)) + if (UseThrottleAsSpeedSelector || HasProportionalSpeedSelector || (UseThrottleAsForceSelector && mpc == null )) { selectedSpeedIncreasing = true; if (SelectedSpeedMpS == 0) @@ -1069,7 +1069,7 @@ public void SpeedRegulatorSelectedSpeedChangeByMouse(float movExtension, bool me else if (movExtension < 0) return; } - var deltaSpeed = SpeedSelectorIsDiscrete ? + var deltaSpeed = SpeedSelectorIsDiscrete ? MpS.ToMpS((float)Math.Round(movExtension * maxValue / SpeedRegulatorNominalSpeedStepKpHOrMpH) * SpeedRegulatorNominalSpeedStepKpHOrMpH, metric) : MpS.ToMpS((float)Math.Round(movExtension * maxValue), true); if (deltaSpeed > 0) @@ -1246,13 +1246,13 @@ public void CalculateRequiredForce(float elapsedClockSeconds, float AbsWheelSpee AccelerationDemandMpSS = -(float)Math.Sqrt(val); if (RelativeAccelerationMpSS > AccelerationDemandMpSS) { - float maxStep = (RelativeAccelerationMpSS - AccelerationDemandMpSS) * 2; - DecreaseForce(ref CCThrottleOrDynBrakePercent, elapsedClockSeconds, Math.Max(CCThrottleOrDynBrakePercent - maxStep, -100)); + float maxStep = (RelativeAccelerationMpSS - AccelerationDemandMpSS) * 2; + DecreaseForce(ref CCThrottleOrDynBrakePercent, elapsedClockSeconds, Math.Max(CCThrottleOrDynBrakePercent-maxStep, -100)); } else if (RelativeAccelerationMpSS + 0.01f < AccelerationDemandMpSS) { float maxStep = (AccelerationDemandMpSS - RelativeAccelerationMpSS) * 2; - IncreaseForce(ref CCThrottleOrDynBrakePercent, elapsedClockSeconds, Math.Min(CCThrottleOrDynBrakePercent + maxStep, 0)); + IncreaseForce(ref CCThrottleOrDynBrakePercent, elapsedClockSeconds, Math.Min(CCThrottleOrDynBrakePercent+maxStep, 0)); } if (DynamicBrakeIsSelectedForceDependant) { @@ -1392,7 +1392,7 @@ void SetTrainBrake(ref float brakePercent, float elapsedClockSeconds, float delt if (!dynamicBrakeAvailable || deltaSpeedMpS < -SpeedDeltaToEnableTrainBrake) { CCIsUsingTrainBrake = true; - brakePercent = TrainBrakeMinPercentValue - 3.0f + (-deltaSpeedMpS * 10) / SpeedDeltaToEnableTrainBrake; + brakePercent = TrainBrakeMinPercentValue - 3.0f + (-deltaSpeedMpS * 10)/SpeedDeltaToEnableTrainBrake; } else { @@ -1403,9 +1403,9 @@ void SetTrainBrake(ref float brakePercent, float elapsedClockSeconds, float delt { CCIsUsingTrainBrake = true; if (RelativeAccelerationMpSS > -MaxDecelerationMpSS + 0.01f) - brakePercent += 100 / TrainBrakeFullRangeIncreaseTimeSeconds * elapsedClockSeconds; + brakePercent += 100/TrainBrakeFullRangeIncreaseTimeSeconds*elapsedClockSeconds; else if (RelativeAccelerationMpSS < -MaxDecelerationMpSS - 0.01f) - brakePercent -= 100 / TrainBrakeFullRangeDecreaseTimeSeconds * elapsedClockSeconds; + brakePercent -= 100/TrainBrakeFullRangeDecreaseTimeSeconds*elapsedClockSeconds; brakePercent = MathHelper.Clamp(brakePercent, TrainBrakeMinPercentValue - 3.0f, TrainBrakeMaxPercentValue); } } @@ -1521,7 +1521,7 @@ public float GetDataOf(CabViewControl cvc) data = Speed0Pressed ? 1 : 0; break; } - case CABViewControlTypes.ORTS_CC_SPEED_DELTA: + case CABViewControlTypes.ORTS_CC_SPEED_DELTA: { data = SpeedDeltaPressed ? 1 : 0; break; diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Door.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Door.cs index 916b43dec1..97c0ea072c 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Door.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Door.cs @@ -50,20 +50,20 @@ public virtual void Parse(string lowercasetoken, STFReader stf) { switch (lowercasetoken) { - case "wagon(ortsdoors(closingdelay": - { - float delayS = stf.ReadFloatBlock(STFReader.UNITS.Time, 0f); - LeftDoor.ClosingDelayS = delayS; - RightDoor.ClosingDelayS = delayS; - break; - } - case "wagon(ortsdoors(openingdelay": - { - float delayS = stf.ReadFloatBlock(STFReader.UNITS.Time, 0f); - LeftDoor.OpeningDelayS = delayS; - RightDoor.OpeningDelayS = delayS; - break; - } + case "wagon(ortsdoors(closingdelay": + { + float delayS = stf.ReadFloatBlock(STFReader.UNITS.Time, 0f); + LeftDoor.ClosingDelayS = delayS; + RightDoor.ClosingDelayS = delayS; + break; + } + case "wagon(ortsdoors(openingdelay": + { + float delayS = stf.ReadFloatBlock(STFReader.UNITS.Time, 0f); + LeftDoor.OpeningDelayS = delayS; + RightDoor.OpeningDelayS = delayS; + break; + } } } @@ -106,7 +106,7 @@ public virtual void Update(float elapsedClockSeconds) public static DoorSide FlippedDoorSide(DoorSide trainSide) { - switch (trainSide) + switch(trainSide) { case DoorSide.Left: return DoorSide.Right; @@ -119,7 +119,7 @@ public static DoorSide FlippedDoorSide(DoorSide trainSide) } public class Door : ISubSystem { - + // Parameters public float OpeningDelayS { get; set; } = 0f; public float ClosingDelayS { get; set; } = 0f; @@ -130,9 +130,9 @@ public class Door : ISubSystem public readonly DoorSide Side; protected Timer OpeningTimer; protected Timer ClosingTimer; - + public DoorState State { get; protected set; } = DoorState.Closed; - public bool Locked { get; protected set; } + public bool Locked {get; protected set; } public Door(MSTSWagon wagon, DoorSide side) { @@ -180,7 +180,7 @@ public virtual void Restore(BinaryReader inf) public virtual void Update(float elapsedClockSeconds) { - switch (State) + switch(State) { case DoorState.Opening: if (!OpeningTimer.Started) OpeningTimer.Start(); diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/EOT.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/EOT.cs index d0e70997a4..74deb01d05 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/EOT.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/EOT.cs @@ -16,14 +16,25 @@ // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; +using Microsoft.Xna.Framework; using Orts.Formats.Msts; using Orts.Parsers.Msts; +using Orts.Simulation.AIs; using Orts.Simulation.Physics; +using Orts.Simulation.RollingStocks; +using Orts.Simulation.RollingStocks.SubSystems; +using Orts.Simulation.RollingStocks.SubSystems.PowerSupplies; +using Orts.Simulation.Signalling; +using Orts.Simulation.Timetables; +using ORTS.Common; using ORTS.Scripting.Api; +using ORTS.Settings; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using Event = Orts.Common.Event; namespace Orts.Simulation.RollingStocks.SubSystems { @@ -36,7 +47,7 @@ public enum EOTLevel public class FullEOTPaths : List { - public FullEOTPaths(string eotPath) + public FullEOTPaths (string eotPath) { var directories = Directory.GetDirectories(eotPath); foreach (var directory in directories) @@ -257,7 +268,7 @@ public void ArmTwoWay() EOTState = EOTstate.ArmedTwoWay; } - public void EmergencyBrake(bool toState) + public void EmergencyBrake (bool toState) { if (EOTState == EOTstate.ArmedTwoWay) { diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/FreightAnimations.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/FreightAnimations.cs index 5bd5522592..1da8bb1d97 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/FreightAnimations.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/FreightAnimations.cs @@ -15,16 +15,16 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using Orts.Formats.Msts; +using Orts.Parsers.Msts; +using Orts.Simulation.RollingStocks.SubSystems.Controllers; +using ORTS.Common; +using Microsoft.Xna.Framework; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; -using Microsoft.Xna.Framework; -using Orts.Formats.Msts; -using Orts.Parsers.Msts; -using Orts.Simulation.RollingStocks.SubSystems.Controllers; -using ORTS.Common; namespace Orts.Simulation.RollingStocks.SubSystems { @@ -87,7 +87,7 @@ public FreightAnimations(STFReader stf, MSTSWagon wagon) new STFReader.TokenProcessor("isgondola", ()=>{ IsGondola = stf.ReadBoolBlock(false);}), new STFReader.TokenProcessor("loadingarealength", ()=>{ LoadingAreaLength = stf.ReadFloatBlock(STFReader.UNITS.Distance, 12.19f); }), new STFReader.TokenProcessor("aboveloadingarealength", ()=>{ AboveLoadingAreaLength = stf.ReadFloatBlock(STFReader.UNITS.Distance, 12.19f); }), - new STFReader.TokenProcessor("intakepoint", ()=> + new STFReader.TokenProcessor("intakepoint", ()=> { GeneralIntakePoint = new IntakePoint(stf); }), @@ -291,7 +291,7 @@ public FreightAnimations(FreightAnimations copyFACollection, MSTSWagon wagon) StaticFreightAnimationsPresent = copyFACollection.StaticFreightAnimationsPresent; DiscreteFreightAnimationsPresent = copyFACollection.DiscreteFreightAnimationsPresent; - // Load(Wagon, LoadDataList); +// Load(Wagon, LoadDataList); } public void Load(string loadFilePath, LoadPosition loadPosition, LoadState loadState) @@ -306,7 +306,7 @@ public void Load(string loadFilePath, LoadPosition loadPosition, LoadState loadS } else { - container.LoadFromContainerFile(loadFilePath, Wagon.Simulator.BasePath + @"\trains\trainset\"); + container.LoadFromContainerFile(loadFilePath, Wagon.Simulator.BasePath +@"\trains\trainset\"); ContainerManager.LoadedContainers.Add(loadFilePath, container); } container.ComputeLoadWeight(loadState); @@ -454,7 +454,7 @@ public bool Validity(MSTSWagon wagon, Container container, LoadPosition loadPosi if (Animations.Count == 0 && loadPosition != LoadPosition.Above) return true; freightAnimDiscreteCount = 0; foreach (var animation in Animations) - if (animation is FreightAnimationDiscrete) + if (animation is FreightAnimationDiscrete) freightAnimDiscreteCount++; if (freightAnimDiscreteCount == 0 && loadPosition != LoadPosition.Above) return true; // there are already other containers present; check that there aren't superpositions @@ -597,7 +597,7 @@ public void UpdateEmptyFreightAnims(float containerLengthM) continue; } else - { + { var multiplier = 1; if (anim.LoadPosition == LoadPosition.Front) multiplier = -1; emptyAnim.Offset.Z = Offset.Z + multiplier * (LoadingAreaLength / 2 - anim.LoadingAreaLength) / 2; @@ -821,7 +821,7 @@ public bool CheckForMerge(int i) case LoadPosition.CenterFront: switch (EmptyAnimations[other].LoadPosition) { - case LoadPosition.CenterRear: + case LoadPosition.CenterRear: if (Math.Abs(EmptyAnimations[i].LoadingAreaLength - EmptyAnimations[other].LoadingAreaLength) < 0.02) { EmptyAnimations[i].LoadingAreaLength += EmptyAnimations[other].LoadingAreaLength; @@ -1037,7 +1037,7 @@ public FreightAnimationContinuous(FreightAnimationContinuous freightAnimContin, FullORTSDavisDragConstant = freightAnimContin.FullORTSDavisDragConstant; FullMaxBrakeForceN = freightAnimContin.FullMaxBrakeForceN; FullMaxHandbrakeForceN = freightAnimContin.FullMaxHandbrakeForceN; - FullCentreOfGravityM_Y = freightAnimContin.FullCentreOfGravityM_Y; + FullCentreOfGravityM_Y = freightAnimContin.FullCentreOfGravityM_Y; } } @@ -1081,11 +1081,11 @@ public FreightAnimationStatic(STFReader stf) { var typeString = stf.ReadStringBlock(null); switch (typeString) - { + { default: SubType = FreightAnimationStatic.Type.DEFAULT; break; - } + } }), new STFReader.TokenProcessor("shape", ()=>{ ShapeFileName = stf.ReadStringBlock(null); }), new STFReader.TokenProcessor("freightweight", ()=>{ FreightWeight = stf.ReadFloatBlock(STFReader.UNITS.Mass, 0); }), @@ -1174,7 +1174,7 @@ public enum Type public float AboveLoadingAreaLength = -1f; public LoadPosition LoadPosition = LoadPosition.Center; - // for copy + // for copy public FreightAnimationDiscrete(FreightAnimationDiscrete freightAnimDiscrete, FreightAnimations freightAnimations) { FreightAnimations = freightAnimations; diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/ISubSystem.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/ISubSystem.cs index f84c79b2d1..c187186ab0 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/ISubSystem.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/ISubSystem.cs @@ -15,8 +15,8 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System.IO; using Orts.Parsers.Msts; +using System.IO; namespace Orts.Simulation.RollingStocks.SubSystems { diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/BatterySwitch.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/BatterySwitch.cs index 6c99dde613..fc5c56f3c3 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/BatterySwitch.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/BatterySwitch.cs @@ -15,10 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System.IO; using Orts.Common; using Orts.Parsers.Msts; using ORTS.Scripting.Api; +using System; +using System.IO; namespace Orts.Simulation.RollingStocks.SubSystems.PowerSupplies { diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/CircuitBreaker.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/CircuitBreaker.cs index cc513f0504..ea9f674f71 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/CircuitBreaker.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/CircuitBreaker.cs @@ -109,7 +109,7 @@ public void Initialize() { if (ScriptName != null) { - switch (ScriptName) + switch(ScriptName) { case "Automatic": Script = new AutomaticCircuitBreaker() as CircuitBreaker; diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/ControlCarPowerSupply.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/ControlCarPowerSupply.cs index b24b9d3f67..da226ab81d 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/ControlCarPowerSupply.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/ControlCarPowerSupply.cs @@ -15,7 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using Orts.Common; +using Orts.Parsers.Msts; using ORTS.Scripting.Api; +using System.IO; namespace Orts.Simulation.RollingStocks.SubSystems.PowerSupplies { @@ -29,13 +32,13 @@ public class ScriptedControlCarPowerSupply : ScriptedLocomotivePowerSupply, ISub public bool Activated = false; private ControlCarPowerSupply Script => AbstractScript as ControlCarPowerSupply; - // public ScriptedTractionCutOffRelay TractionCutOffRelay { get; protected set; } +// public ScriptedTractionCutOffRelay TractionCutOffRelay { get; protected set; } public ScriptedControlCarPowerSupply(MSTSControlTrailerCar controlcar) : base(controlcar) { - // ControlTrailer = controlcar; - // TractionCutOffRelay = new ScriptedTractionCutOffRelay(this); + // ControlTrailer = controlcar; + // TractionCutOffRelay = new ScriptedTractionCutOffRelay(this); } diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs index fac70dfdaa..9606e7855d 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs @@ -15,17 +15,17 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using Microsoft.Xna.Framework; +using Orts.Parsers.Msts; +using Orts.Simulation.RollingStocks.SubSystems.PowerTransmissions; +using ORTS.Common; +using ORTS.Scripting.Api; using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Text; -using Microsoft.Xna.Framework; -using Orts.Parsers.Msts; -using Orts.Simulation.RollingStocks.SubSystems.PowerTransmissions; -using ORTS.Common; -using ORTS.Scripting.Api; namespace Orts.Simulation.RollingStocks.SubSystems.PowerSupplies { @@ -199,7 +199,7 @@ public void Restore(BinaryReader inf) DEList[i].InitFromMSTS(); DEList[i].Initialize(); } - + } foreach (DieselEngine de in DEList) de.Restore(inf); @@ -270,7 +270,7 @@ public float MaxOutputPowerW } } - /// + /// /// Maximum rail output power for all diesl prime movers /// public float MaximumRailOutputPowerW @@ -346,7 +346,7 @@ public float TractiveForceN if (Locomotive.DieselTransmissionType == MSTSDieselLocomotive.DieselTransmissionTypes.Mechanic) { temp += (de.GearBox.TractiveForceN); - + } else { @@ -486,7 +486,7 @@ public int NumOfActiveEngines get { int num = 0; - foreach (DieselEngine eng in DEList) + foreach(DieselEngine eng in DEList) { if (eng.State == DieselEngineState.Running) num++; @@ -578,31 +578,31 @@ public enum Cooling public enum SettingsFlags { - IdleRPM = 0x0001, - MaxRPM = 0x0002, - StartingRPM = 0x0004, - StartingConfirmRPM = 0x0008, - ChangeUpRPMpS = 0x0010, - ChangeDownRPMpS = 0x0020, + IdleRPM = 0x0001, + MaxRPM = 0x0002, + StartingRPM = 0x0004, + StartingConfirmRPM = 0x0008, + ChangeUpRPMpS = 0x0010, + ChangeDownRPMpS = 0x0020, RateOfChangeUpRPMpSS = 0x0040, RateOfChangeDownRPMpSS = 0x0080, - MaximalDieselPowerW = 0x0100, - IdleExhaust = 0x0200, - MaxExhaust = 0x0400, - ExhaustDynamics = 0x0800, - ExhaustColor = 0x1000, + MaximalDieselPowerW = 0x0100, + IdleExhaust = 0x0200, + MaxExhaust = 0x0400, + ExhaustDynamics = 0x0800, + ExhaustColor = 0x1000, ExhaustTransientColor = 0x2000, - DieselPowerTab = 0x4000, + DieselPowerTab = 0x4000, DieselConsumptionTab = 0x8000, - ThrottleRPMTab = 0x10000, - DieselTorqueTab = 0x20000, - MinOilPressure = 0x40000, - MaxOilPressure = 0x80000, - MaxTemperature = 0x100000, - Cooling = 0x200000, - TempTimeConstant = 0x400000, - OptTemperature = 0x800000, - IdleTemperature = 0x1000000 + ThrottleRPMTab = 0x10000, + DieselTorqueTab = 0x20000, + MinOilPressure = 0x40000, + MaxOilPressure = 0x80000, + MaxTemperature = 0x100000, + Cooling = 0x200000, + TempTimeConstant = 0x400000, + OptTemperature = 0x800000, + IdleTemperature = 0x1000000 } public int Id @@ -701,7 +701,7 @@ public bool IsInitialized /// /// The RPM controller tries to reach this value /// - public float DemandedRPM; + public float DemandedRPM; float demandedThrottlePercent; float throttleAcclerationFactor = 1.0f; @@ -718,7 +718,7 @@ public bool IsInitialized /// public float MaxRPM; - /// + /// /// Govenor RPM - maximum speed that engine is held to /// public float GovernorRPM; @@ -751,7 +751,7 @@ public bool IsInitialized /// Current power available to the traction motors /// public float CurrentDieselOutputPowerW; - /// + /// /// Maximum power available to the rail /// public float MaximumRailOutputPowerW; @@ -780,7 +780,7 @@ public bool IsInitialized /// public Interpolator DieselPowerTab; - /// + /// /// Rail power table - Max rail output power vs. RPM /// public Interpolator RailPowerTab; @@ -805,7 +805,7 @@ public bool IsInitialized /// Engine output torque table - Torque vs. RPM /// public Interpolator DieselTorqueTab; - /// + /// /// Current exhaust number of particles /// public float ExhaustParticles = 10.0f; @@ -828,10 +828,10 @@ public bool IsInitialized public Color ExhaustCompressorBlownColor = Color.Gray; - public float InitialMagnitude = 1.5f; + public float InitialMagnitude = 1.5f; public float MaxMagnitude = 1.5f; public float MagnitudeRange; - public float ExhaustMagnitude = 1.5f; + public float ExhaustMagnitude = 1.5f; public float InitialExhaust = 0.7f; public float MaxExhaust = 2.8f; @@ -849,7 +849,7 @@ public float DieselOilPressurePSI { get { - float k = (DieselMaxOilPressurePSI - DieselMinOilPressurePSI) / (MaxRPM - IdleRPM); + float k = (DieselMaxOilPressurePSI - DieselMinOilPressurePSI)/(MaxRPM - IdleRPM); float q = DieselMaxOilPressurePSI - k * MaxRPM; float res = k * RawRpM + q - dieseloilfailurePSI; if (res < 0f) @@ -963,23 +963,23 @@ public virtual void Parse(STFReader stf) switch (lowercasetoken) { case "idlerpm": IdleRPM = stf.ReadFloatBlock(STFReader.UNITS.None, 0); initLevel |= SettingsFlags.IdleRPM; break; - case "maxrpm": MaxRPM = stf.ReadFloatBlock(STFReader.UNITS.None, 0); initLevel |= SettingsFlags.MaxRPM; break; + case "maxrpm": MaxRPM = stf.ReadFloatBlock(STFReader.UNITS.None, 0);initLevel |= SettingsFlags.MaxRPM; break; case "governorrpm": GovernorRPM = stf.ReadFloatBlock(STFReader.UNITS.None, 0); break; case "startingrpm": StartingRPM = stf.ReadFloatBlock(STFReader.UNITS.None, 0); initLevel |= SettingsFlags.StartingRPM; break; case "startingconfirmrpm": StartingConfirmationRPM = stf.ReadFloatBlock(STFReader.UNITS.None, 0); initLevel |= SettingsFlags.StartingConfirmRPM; break; case "changeuprpmps": ChangeUpRPMpS = stf.ReadFloatBlock(STFReader.UNITS.None, 0); initLevel |= SettingsFlags.ChangeUpRPMpS; break; case "changedownrpmps": ChangeDownRPMpS = stf.ReadFloatBlock(STFReader.UNITS.None, 0); initLevel |= SettingsFlags.ChangeDownRPMpS; break; - case "rateofchangeuprpmpss": RateOfChangeUpRPMpSS = stf.ReadFloatBlock(STFReader.UNITS.None, 0); initLevel |= SettingsFlags.RateOfChangeUpRPMpSS; break; - case "rateofchangedownrpmpss": RateOfChangeDownRPMpSS = stf.ReadFloatBlock(STFReader.UNITS.None, 0); initLevel |= SettingsFlags.RateOfChangeDownRPMpSS; break; - case "maximalpower": MaximumDieselPowerW = stf.ReadFloatBlock(STFReader.UNITS.Power, 0); initLevel |= SettingsFlags.MaximalDieselPowerW; break; - case "idleexhaust": InitialExhaust = stf.ReadFloatBlock(STFReader.UNITS.None, 0); initLevel |= SettingsFlags.IdleExhaust; break; - case "maxexhaust": MaxExhaust = stf.ReadFloatBlock(STFReader.UNITS.None, 0); initLevel |= SettingsFlags.MaxExhaust; break; + case "rateofchangeuprpmpss": RateOfChangeUpRPMpSS = stf.ReadFloatBlock(STFReader.UNITS.None, 0);initLevel |= SettingsFlags.RateOfChangeUpRPMpSS; break; + case "rateofchangedownrpmpss": RateOfChangeDownRPMpSS = stf.ReadFloatBlock(STFReader.UNITS.None, 0);initLevel |= SettingsFlags.RateOfChangeDownRPMpSS; break; + case "maximalpower": MaximumDieselPowerW = stf.ReadFloatBlock(STFReader.UNITS.Power, 0);initLevel |= SettingsFlags.MaximalDieselPowerW; break; + case "idleexhaust": InitialExhaust = stf.ReadFloatBlock(STFReader.UNITS.None, 0); initLevel |= SettingsFlags.IdleExhaust; break; + case "maxexhaust": MaxExhaust = stf.ReadFloatBlock(STFReader.UNITS.None, 0);initLevel |= SettingsFlags.MaxExhaust; break; case "exhaustdynamics": ExhaustAccelIncrease = stf.ReadFloatBlock(STFReader.UNITS.None, 0); initLevel |= SettingsFlags.ExhaustDynamics; break; case "exhaustdynamicsdown": ExhaustDecelReduction = stf.ReadFloatBlock(STFReader.UNITS.None, null); initLevel |= SettingsFlags.ExhaustDynamics; break; - case "exhaustcolor": ExhaustSteadyColor = stf.ReadColorBlock(Color.Gray); initLevel |= SettingsFlags.ExhaustColor; break; - case "exhausttransientcolor": ExhaustTransientColor = stf.ReadColorBlock(Color.Black); initLevel |= SettingsFlags.ExhaustTransientColor; break; + case "exhaustcolor": ExhaustSteadyColor = stf.ReadColorBlock(Color.Gray); initLevel |= SettingsFlags.ExhaustColor; break; + case "exhausttransientcolor": ExhaustTransientColor = stf.ReadColorBlock(Color.Black);initLevel |= SettingsFlags.ExhaustTransientColor; break; case "dieselpowertab": DieselPowerTab = new Interpolator(stf); initLevel |= SettingsFlags.DieselPowerTab; break; - case "dieselconsumptiontab": DieselConsumptionTab = new Interpolator(stf); initLevel |= SettingsFlags.DieselConsumptionTab; break; + case "dieselconsumptiontab": DieselConsumptionTab = new Interpolator(stf);initLevel |= SettingsFlags.DieselConsumptionTab; break; case "throttlerpmtab": ThrottleRPMTab = new Interpolator(stf); initLevel |= SettingsFlags.ThrottleRPMTab; @@ -997,7 +997,7 @@ public virtual void Parse(STFReader stf) case "minoilpressure": DieselMinOilPressurePSI = stf.ReadFloatBlock(STFReader.UNITS.PressureDefaultPSI, 0); initLevel |= SettingsFlags.MinOilPressure; break; case "maxoilpressure": DieselMaxOilPressurePSI = stf.ReadFloatBlock(STFReader.UNITS.PressureDefaultPSI, 0); initLevel |= SettingsFlags.MaxOilPressure; break; case "maxtemperature": DieselMaxTemperatureDeg = stf.ReadFloatBlock(STFReader.UNITS.Temperature, 0); initLevel |= SettingsFlags.MaxTemperature; break; - case "cooling": EngineCooling = (Cooling)stf.ReadIntBlock((int)Cooling.Proportional); initLevel |= SettingsFlags.Cooling; break; //ReadInt changed to ReadIntBlock + case "cooling": EngineCooling = (Cooling)stf.ReadIntBlock((int)Cooling.Proportional); initLevel |= SettingsFlags.Cooling; break ; //ReadInt changed to ReadIntBlock case "temptimeconstant": DieselTempTimeConstantSec = stf.ReadFloatBlock(STFReader.UNITS.Time, 0); initLevel |= SettingsFlags.TempTimeConstant; break; case "opttemperature": DieselOptimalTemperatureDegC = stf.ReadFloatBlock(STFReader.UNITS.Temperature, 95f); initLevel |= SettingsFlags.OptTemperature; break; case "idletemperature": DieselIdleTemperatureDegC = stf.ReadFloatBlock(STFReader.UNITS.Temperature, 75f); initLevel |= SettingsFlags.IdleTemperature; break; @@ -1099,7 +1099,7 @@ public void Update(float elapsedClockSeconds) if ((State == DieselEngineState.Running) && (Locomotive.ThrottlePercent > 0)) { var abstempMotiveForce = Math.Abs(Locomotive.PrevMotiveForceN); - OutputPowerW = (abstempMotiveForce > 0 ? abstempMotiveForce * Locomotive.AbsSpeedMpS : 0) / Locomotive.DieselEngines.NumOfActiveEngines; + OutputPowerW = ( abstempMotiveForce > 0 ? abstempMotiveForce * Locomotive.AbsSpeedMpS : 0) / Locomotive.DieselEngines.NumOfActiveEngines; } else { @@ -1519,7 +1519,7 @@ public void Update(float elapsedClockSeconds) } DieselTemperatureDeg += elapsedClockSeconds * (DieselMaxTemperatureDeg - DieselTemperatureDeg) / DieselTempTimeConstantSec; - switch (EngineCooling) + switch(EngineCooling) { case Cooling.NoCooling: DieselTemperatureDeg += elapsedClockSeconds * (LoadPercent * 0.01f * (95f - 60f) + 60f - DieselTemperatureDeg) / DieselTempTimeConstantSec; @@ -1530,12 +1530,12 @@ public void Update(float elapsedClockSeconds) DieselTempCoolingRunning = true; break; case Cooling.Hysteresis: - if (DieselTemperatureDeg > DieselMaxTemperatureDeg) + if(DieselTemperatureDeg > DieselMaxTemperatureDeg) DieselTempCoolingRunning = true; - if (DieselTemperatureDeg < (DieselMaxTemperatureDeg - DieselTempCoolingHyst)) + if(DieselTemperatureDeg < (DieselMaxTemperatureDeg - DieselTempCoolingHyst)) DieselTempCoolingRunning = false; - if (DieselTempCoolingRunning) + if(DieselTempCoolingRunning) DieselTemperatureDeg += elapsedClockSeconds * (DieselMaxTemperatureDeg - DieselTemperatureDeg) / DieselTempTimeConstantSec; else DieselTemperatureDeg -= elapsedClockSeconds * (DieselMaxTemperatureDeg - 2f * DieselTempCoolingHyst - DieselTemperatureDeg) / DieselTempTimeConstantSec; @@ -1546,7 +1546,7 @@ public void Update(float elapsedClockSeconds) cooling = cooling < 0f ? 0 : cooling; if (DieselTemperatureDeg >= (80f)) DieselTempCoolingRunning = true; - if (DieselTemperatureDeg < (80f - DieselTempCoolingHyst)) + if(DieselTemperatureDeg < (80f - DieselTempCoolingHyst)) DieselTempCoolingRunning = false; if (!DieselTempCoolingRunning) @@ -1557,7 +1557,7 @@ public void Update(float elapsedClockSeconds) DieselTemperatureDeg = DieselMaxTemperatureDeg - DieselTempCoolingHyst; break; } - if (DieselTemperatureDeg < 40f) + if(DieselTemperatureDeg < 40f) DieselTemperatureDeg = 40f; if (GearBox != null) @@ -1729,7 +1729,7 @@ public void InitFromMSTS() if (Locomotive.Simulator.Settings.VerboseConfigurationMessages) Trace.TraceInformation("IdleRpM not found in Diesel Engine Configuration (BASIC Config): set at arbitary value = {0}", IdleRPM); - } + } } if ((initLevel & SettingsFlags.MaxRPM) == 0) @@ -2158,10 +2158,10 @@ public void InitDieselRailPowers(MSTSDieselLocomotive loco) ReverseThrottleRPMTab = new Interpolator(rpm, throttle); // create reverse table } - // TODO - this value needs to be divided by the number of diesel engines in the locomotive + // TODO - this value needs to be divided by the number of diesel engines in the locomotive - // Set MaximumRailOutputPower if not already set - if (MaximumRailOutputPowerW == 0) + // Set MaximumRailOutputPower if not already set + if (MaximumRailOutputPowerW == 0) { if (loco.TractiveForceCurves != null) { diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselPowerSupply.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselPowerSupply.cs index 09db4722bc..e78fdbac51 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselPowerSupply.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselPowerSupply.cs @@ -15,10 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System.IO; using Orts.Common; using Orts.Parsers.Msts; using ORTS.Scripting.Api; +using System.IO; namespace Orts.Simulation.RollingStocks.SubSystems.PowerSupplies { diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DualModePowerSupply.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DualModePowerSupply.cs index 9de7a5ea33..b1e22e27b5 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DualModePowerSupply.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DualModePowerSupply.cs @@ -15,10 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System.IO; using Orts.Parsers.Msts; using ORTS.Common; using ORTS.Scripting.Api; +using System.IO; namespace Orts.Simulation.RollingStocks.SubSystems.PowerSupplies { @@ -165,7 +165,7 @@ public override void Initialize() { PantographFilter = new IIRFilter(IIRFilter.FilterTypes.Butterworth, 1, IIRFilter.HzToRad(0.7f), 0.001f); VoltageFilter = new IIRFilter(IIRFilter.FilterTypes.Butterworth, 1, IIRFilter.HzToRad(0.7f), 0.001f); - + PowerOnTimer = new Timer(this); PowerOnTimer.Setup(PowerOnDelayS()); diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/ElectricPowerSupply.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/ElectricPowerSupply.cs index f70086c05f..b24cf5d3d7 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/ElectricPowerSupply.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/ElectricPowerSupply.cs @@ -15,11 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System.IO; using Orts.Common; using Orts.Parsers.Msts; using ORTS.Common; using ORTS.Scripting.Api; +using System.IO; namespace Orts.Simulation.RollingStocks.SubSystems.PowerSupplies { @@ -165,7 +165,7 @@ public override void Initialize() { PantographFilter = new IIRFilter(IIRFilter.FilterTypes.Butterworth, 1, IIRFilter.HzToRad(0.7f), 0.001f); VoltageFilter = new IIRFilter(IIRFilter.FilterTypes.Butterworth, 1, IIRFilter.HzToRad(0.7f), 0.001f); - + PowerOnTimer = new Timer(this); PowerOnTimer.Setup(PowerOnDelayS()); diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/ElectricTrainSupplySwitch.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/ElectricTrainSupplySwitch.cs index a0b6a69c0a..7703382e04 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/ElectricTrainSupplySwitch.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/ElectricTrainSupplySwitch.cs @@ -15,10 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System.IO; using Orts.Common; using Orts.Parsers.Msts; using ORTS.Scripting.Api; +using System.IO; namespace Orts.Simulation.RollingStocks.SubSystems.PowerSupplies { diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/MasterKey.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/MasterKey.cs index 5e85bfbac8..bca51013da 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/MasterKey.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/MasterKey.cs @@ -15,11 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System.IO; -using System.Linq; using Orts.Common; using Orts.Parsers.Msts; using ORTS.Scripting.Api; +using System; +using System.IO; +using System.Linq; namespace Orts.Simulation.RollingStocks.SubSystems.PowerSupplies { @@ -31,7 +32,7 @@ public enum ModeType AlwaysOn, Manual } - + // Parameters public ModeType Mode { get; protected set; } = ModeType.AlwaysOn; public float DelayS { get; protected set; } = 0f; @@ -42,8 +43,7 @@ public enum ModeType protected Timer Timer; public bool CommandSwitch { get; protected set; } = false; public bool On { get; protected set; } = false; - public bool OtherCabInUse - { + public bool OtherCabInUse { get { foreach (MSTSLocomotive locomotive in Locomotive.Train.Cars.OfType()) diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/Pantograph.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/Pantograph.cs index fd83648314..e7b64aa38e 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/Pantograph.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/Pantograph.cs @@ -15,13 +15,13 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using Orts.Parsers.Msts; +using ORTS.Scripting.Api; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; -using Orts.Parsers.Msts; -using ORTS.Scripting.Api; using Event = Orts.Common.Event; namespace Orts.Simulation.RollingStocks.SubSystems.PowerSupplies @@ -195,8 +195,7 @@ public class Pantograph : ISubSystem public PantographState State { get; private set; } public float DelayS { get; private set; } public float TimeS { get; private set; } - public bool CommandUp - { + public bool CommandUp { get { bool value; @@ -259,7 +258,7 @@ public void Copy(Pantograph pantograph) public void Restore(BinaryReader inf) { - State = (PantographState)Enum.Parse(typeof(PantographState), inf.ReadString()); + State = (PantographState) Enum.Parse(typeof(PantographState), inf.ReadString()); DelayS = inf.ReadSingle(); TimeS = inf.ReadSingle(); } diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/PassengerCarPowerSupply.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/PassengerCarPowerSupply.cs index e48b3f85de..2dd491fcb5 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/PassengerCarPowerSupply.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/PassengerCarPowerSupply.cs @@ -343,8 +343,7 @@ protected virtual void AssignScriptFunctions() Script.SetCurrentVentilationState = (value) => VentilationState = value; Script.SetCurrentHeatingState = (value) => HeatingState = value; Script.SetCurrentAirConditioningState = (value) => AirConditioningState = value; - Script.SetCurrentElectricTrainSupplyPowerW = (value) => - { + Script.SetCurrentElectricTrainSupplyPowerW = (value) => { if (value >= 0f) { ElectricTrainSupplyPowerW = value; @@ -444,7 +443,7 @@ public override void Update(float elapsedClockSeconds) } float airConditioningElectricPowerW = CurrentAirConditioningState() == PowerSupplyState.PowerOn ? AirConditioningPowerW() : 0f; - float airConditioningThermalPowerW = CurrentAirConditioningState() == PowerSupplyState.PowerOn ? -AirConditioningPowerW() * AirConditioningYield() : 0f; + float airConditioningThermalPowerW = CurrentAirConditioningState() == PowerSupplyState.PowerOn ? - AirConditioningPowerW() * AirConditioningYield() : 0f; SetCurrentElectricTrainSupplyPowerW(ContinuousPowerW() + heatingPowerW + airConditioningElectricPowerW); SetCurrentHeatFlowRateW(heatingPowerW + airConditioningThermalPowerW); diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/TractionCutOffRelay.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/TractionCutOffRelay.cs index b19c60a3dd..fb63e798f3 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/TractionCutOffRelay.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/TractionCutOffRelay.cs @@ -93,7 +93,7 @@ public void Initialize() { if (ScriptName != null) { - switch (ScriptName) + switch(ScriptName) { case "Automatic": Script = new AutomaticTractionCutOffRelay() as TractionCutOffRelay; diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/Axle.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/Axle.cs index b7f1959ea3..6c62bd2bfb 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/Axle.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/Axle.cs @@ -93,7 +93,7 @@ public ElectricMotor Motor { motor = value; DriveType = motor != null ? AxleDriveType.MotorDriven : AxleDriveType.ForceDriven; - switch (DriveType) + switch(DriveType) { case AxleDriveType.MotorDriven: totalInertiaKgm2 = inertiaKgm2 + transmissionRatio * transmissionRatio * motor.InertiaKgm2; @@ -155,7 +155,7 @@ public float InertiaKgm2 break; } } - get + get { return inertiaKgm2; } @@ -432,7 +432,7 @@ void Integrate(float elapsedClockSeconds) if (elapsedClockSeconds <= 0) return; float prevSpeedMpS = AxleSpeedMpS; - if (Math.Abs(integratorError) > Math.Max((Math.Abs(SlipSpeedMpS) - 1) * 0.01f, 0.001f)) + if (Math.Abs(integratorError) > Math.Max((Math.Abs(SlipSpeedMpS)-1)*0.01f, 0.001f)) { ++NumOfSubstepsPS; waitBeforeSpeedingUp = 100; @@ -446,13 +446,13 @@ void Integrate(float elapsedClockSeconds) } } - NumOfSubstepsPS = Math.Max(Math.Min(NumOfSubstepsPS, 50), 1); + NumOfSubstepsPS = Math.Max(Math.Min(NumOfSubstepsPS, 50), 1); float dt = elapsedClockSeconds / NumOfSubstepsPS; float hdt = dt / 2.0f; float axleInForceSumN = 0; float axleOutForceSumN = 0; - for (int i = 0; i < NumOfSubstepsPS; i++) + for (int i=0; i Math.Abs(driveForceN - k1.Item3)) { AxlePositionRad += AxleSpeedMpS * hdt; @@ -515,7 +515,7 @@ void StationaryCalculation(float elapsedClockSeconds) } float x = (float)((1 - Math.Sqrt(1 - forceRatio * forceRatio)) / forceRatio); AxleSpeedMpS = TrainSpeedMpS + MpS.FromKpH(AdhesionK * x / AdhesionLimit); - AxleForceN = (force + res.Item3) / 2; + AxleForceN = (force + res.Item3)/2; } /// diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/ElectricMotor.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/ElectricMotor.cs index 5afaaee465..f246c1d471 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/ElectricMotor.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/ElectricMotor.cs @@ -16,6 +16,7 @@ // along with Open Rails. If not, see . using ORTS.Common; +using System; namespace Orts.Simulation.RollingStocks.SubSystems.PowerTransmissions { @@ -59,7 +60,7 @@ public virtual float GetDevelopedTorqueNm(float motorSpeedRadpS) public virtual void Update(float timeSpan) { - temperatureK = tempIntegrator.Integrate(timeSpan, (temperatureK) => 1.0f / (SpecificHeatCapacityJ_kg_C * WeightKg) * ((powerLossesW - CoolingPowerW) / (ThermalCoeffJ_m2sC * SurfaceM) - temperatureK)); + temperatureK = tempIntegrator.Integrate(timeSpan, (temperatureK) => 1.0f/(SpecificHeatCapacityJ_kg_C * WeightKg)*((powerLossesW - CoolingPowerW) / (ThermalCoeffJ_m2sC * SurfaceM) - temperatureK)); } public virtual void Reset() diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/GearBox.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/GearBox.cs index ea9c33ba91..98cbc68fbd 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/GearBox.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/GearBox.cs @@ -15,17 +15,17 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; using Microsoft.Xna.Framework; using Orts.Common; using Orts.Parsers.Msts; using Orts.Simulation.RollingStocks.SubSystems.PowerSupplies; using ORTS.Common; using ORTS.Scripting.Api; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System; +using System.Linq; namespace Orts.Simulation.RollingStocks.SubSystems.PowerTransmissions { @@ -233,7 +233,7 @@ public class GearBox : ISubSystem public bool ManualGearUp = false; public bool ManualGearDown = false; public bool clutchLockOut = false; - + public int currentGearIndex = -1; public int nextGearIndex = -1; @@ -241,7 +241,7 @@ public Gear CurrentGear { get { - if ((currentGearIndex >= 0) && (currentGearIndex < NumOfGears)) + if ((currentGearIndex >= 0)&&(currentGearIndex < NumOfGears)) return Gears[currentGearIndex]; else return null; @@ -260,7 +260,7 @@ public int CurrentGearIndex } } - public Gear NextGear +public Gear NextGear { get { @@ -276,7 +276,7 @@ public Gear NextGear case GearBoxOperation.Manual: case GearBoxOperation.Semiautomatic: int temp = 0; - if (value == null) + if(value == null) nextGearIndex = -1; else { @@ -310,8 +310,8 @@ public bool AutoGearUp() { if (!gearedUp) { - if (++nextGearIndex >= Gears.Count) - nextGearIndex = (Gears.Count - 1); + if(++nextGearIndex >= Gears.Count) + nextGearIndex = (Gears.Count - 1); else gearedUp = true; } @@ -327,8 +327,8 @@ public bool AutoGearDown() { if (!gearedDown) { - if (--nextGearIndex <= 0) - nextGearIndex = 0; + if(--nextGearIndex <= 0) + nextGearIndex = 0; else gearedDown = true; } @@ -444,7 +444,7 @@ public int GearIndication { get { - if (ReverseGearBoxIndication) + if (ReverseGearBoxIndication ) { int tempgear = NumOfGears - CurrentGearIndex; tempgear = MathHelper.Clamp(tempgear, 0, NumOfGears); @@ -457,11 +457,11 @@ public int GearIndication } } - public float CurrentSpeedMpS + public float CurrentSpeedMpS { get { - if (DieselEngine.Locomotive.Direction == Direction.Reverse) + if(DieselEngine.Locomotive.Direction == Direction.Reverse) return -(DieselEngine.Locomotive.SpeedMpS); else return (DieselEngine.Locomotive.SpeedMpS); @@ -492,7 +492,7 @@ public float HuDShaftRPM /// /// ShaftRpM is the speed of the input shaft to the gearbox due to the speed of the wheel rotation /// - public float ShaftRPM + public float ShaftRPM { get { @@ -538,27 +538,24 @@ public bool IsOverspeedError if (CurrentGear == null) return false; else - return ((DieselEngine.RealRPM / DieselEngine.MaxRPM * 100f) > CurrentGear.OverspeedPercentage); - } + return ((DieselEngine.RealRPM / DieselEngine.MaxRPM * 100f) > CurrentGear.OverspeedPercentage); + } } - public bool IsOverspeedWarning + public bool IsOverspeedWarning { get { if (CurrentGear == null) return false; else - return ((DieselEngine.RealRPM / DieselEngine.MaxRPM * 100f) > 100f); + return ((DieselEngine.RealRPM / DieselEngine.MaxRPM * 100f) > 100f); } } float clutch; - public float ClutchPercent - { - set { clutch = (value > 100.0f ? 100f : (value < -100f ? -100f : value)) / 100f; } - get { return clutch * 100f; } - } + public float ClutchPercent { set { clutch = (value > 100.0f ? 100f : (value < -100f ? -100f : value)) / 100f; } + get { return clutch * 100f; } } public bool AutoClutch = true; @@ -567,7 +564,7 @@ public float ClutchPercent public TypesGearBox GearBoxType = TypesGearBox.Unknown; public GearBoxOperation GearBoxOperation = GearBoxOperation.Manual; public GearBoxOperation OriginalGearBoxOperation = GearBoxOperation.Manual; - + public float rpmRatio; public float torqueCurveMultiplier; public float throttleFraction; @@ -666,7 +663,7 @@ public float TractiveForceN { var tractiveEffortLimitN = (DieselEngine.DieselPowerTab[DieselEngine.RealRPM] * (DieselEngine.LoadPercent / 100f)) / CurrentSpeedMpS; - if (tractiveForceN > tractiveEffortLimitN) + if (tractiveForceN > tractiveEffortLimitN ) { tractiveForceN = tractiveEffortLimitN; } @@ -720,7 +717,7 @@ public float TractiveForceN return 0; } else - { + { if (ClutchPercent >= -20) { float tractiveForceN = DieselEngine.DieselTorqueTab[DieselEngine.RealRPM] * DieselEngine.DemandedThrottlePercent / DieselEngine.DieselTorqueTab.MaxY() * 0.01f * CurrentGear.MaxTractiveForceN; @@ -818,7 +815,7 @@ public void Initialize() // For purposes of calculating engine efficiency the tractive force at maximum gear speed needs to be used. Gears[i].TractiveForceatMaxSpeedN = GearBoxParams.GearBoxTractiveForceAtSpeedN[i] / Locomotive.DieselEngines.Count; - } + } Gears[i].OverspeedPercentage = GearBoxParams.GearBoxOverspeedPercentageForFailure; Gears[i].UpGearProportion = GearBoxParams.GearBoxUpGearProportion; @@ -861,7 +858,7 @@ public void InitializeMoving() if (Gears[iGear].MaxSpeedMpS < CurrentSpeedMpS) continue; else currentGearIndex = nextGearIndex = iGear; break; - } + } gearedUp = false; gearedDown = false; diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/SeriesMotor.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/SeriesMotor.cs index 72876e085d..ed8aebff4d 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/SeriesMotor.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/SeriesMotor.cs @@ -21,7 +21,7 @@ namespace Orts.Simulation.RollingStocks.SubSystems.PowerTransmissions public class SeriesMotor : ElectricMotor { float armatureResistanceOhms; - public float ArmatureResistanceOhms + public float ArmatureResistanceOhms { set { @@ -163,7 +163,7 @@ public override void Update(float timeSpan) else { fieldCurrentA = 0.0f; - } + } UpdateField(); diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/TrainControlSystem.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/TrainControlSystem.cs index a1acd06418..1d6253c23d 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/TrainControlSystem.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/TrainControlSystem.cs @@ -128,8 +128,7 @@ public MonitoringDevice(MonitoringDevice other) MonitoringDevice AWSMonitor; private bool simulatorEmergencyBraking = false; - public bool SimulatorEmergencyBraking - { + public bool SimulatorEmergencyBraking { get { return simulatorEmergencyBraking; @@ -297,7 +296,7 @@ public void Initialize() Script.TrainSpeedLimitMpS = () => Math.Min(Locomotive.Train.AllowedMaxSpeedMpS, Locomotive.Train.TrainMaxSpeedMpS); Script.TrainMaxSpeedMpS = () => Locomotive.Train.TrainMaxSpeedMpS; // max speed for train in a specific section, independently from speedpost and signal limits Script.CurrentSignalSpeedLimitMpS = () => Locomotive.Train.allowedMaxSpeedSignalMpS; - Script.NextSignalSpeedLimitMpS = (value) => NextGenericSignalItem(value, ref ItemSpeedLimit, float.MaxValue, Train.TrainObjectItem.TRAINOBJECTTYPE.SIGNAL, "NORMAL"); + Script.NextSignalSpeedLimitMpS = (value) => NextGenericSignalItem(value, ref ItemSpeedLimit, float.MaxValue,Train.TrainObjectItem.TRAINOBJECTTYPE.SIGNAL, "NORMAL"); Script.NextSignalAspect = (value) => NextGenericSignalItem(value, ref ItemAspect, float.MaxValue, Train.TrainObjectItem.TRAINOBJECTTYPE.SIGNAL, "NORMAL"); Script.NextSignalDistanceM = (value) => NextGenericSignalItem(value, ref ItemDistance, float.MaxValue, Train.TrainObjectItem.TRAINOBJECTTYPE.SIGNAL, "NORMAL"); Script.NextNormalSignalDistanceHeadsAspect = () => NextNormalSignalDistanceHeadsAspect(); @@ -426,9 +425,9 @@ public void Initialize() Script.SetThrottleController = (value) => Locomotive.ThrottleController.SetValue(value); Script.SetDynamicBrakeController = (value) => { - if (Locomotive.DynamicBrakeController == null) return; - Locomotive.DynamicBrakeChangeActiveState(value > 0); - Locomotive.DynamicBrakeController.SetValue(value); + if (Locomotive.DynamicBrakeController == null) return; + Locomotive.DynamicBrakeChangeActiveState(value > 0); + Locomotive.DynamicBrakeController.SetValue(value); }; Script.SetPantographsDown = () => { @@ -445,7 +444,7 @@ public void Initialize() return; } Locomotive.Train.SignalEvent(PowerSupplyEvent.RaisePantograph, pantoID); - }; + }; Script.SetPantographDown = (pantoID) => { if (pantoID < Pantographs.MinPantoID || pantoID > Pantographs.MaxPantoID) @@ -512,8 +511,7 @@ public void Initialize() this.CurrentSpeedLimitMpS = value; ETCSStatus.AllowedSpeedMpS = value; }; - Script.SetNextSpeedLimitMpS = (value) => - { + Script.SetNextSpeedLimitMpS = (value) => { this.NextSpeedLimitMpS = value; ETCSStatus.TargetSpeedMpS = value; }; @@ -538,7 +536,7 @@ public void Initialize() CustomizedCabviewControlNames[id] = value; } }; - Script.RequestToggleManualMode = () => + Script.RequestToggleManualMode = () => { if (Locomotive.Train.ControlMode == Train.TRAIN_CONTROL.OUT_OF_CONTROL && Locomotive.Train.ControlModeBeforeOutOfControl == Train.TRAIN_CONTROL.EXPLORER) { @@ -583,7 +581,7 @@ private Aspect NextNormalSignalDistanceHeadsAspect() } private bool DoesNextNormalSignalHaveTwoAspects() - // ...and the two aspects of each head are STOP and ( CLEAR_2 or CLEAR_1 or RESTRICTING) + // ...and the two aspects of each head are STOP and ( CLEAR_2 or CLEAR_1 or RESTRICTING) { var signal = Locomotive.Train.NextSignalObject[Locomotive.Train.MUDirection == Direction.Reverse ? 1 : 0]; if (signal != null) @@ -650,54 +648,54 @@ SignalFeatures NextGenericSignalFeatures(string signalFunctionTypeName, int item { case Train.TrainObjectItem.TRAINOBJECTTYPE.SIGNAL: case Train.TrainObjectItem.TRAINOBJECTTYPE.SPEED_SIGNAL: + { + var playerTrainSignalList = Locomotive.Train.PlayerTrainSignals[dir][function]; + if (itemSequenceIndex > playerTrainSignalList.Count - 1) + goto Exit; // no n-th signal available + var trainSignal = playerTrainSignalList[itemSequenceIndex]; + if (trainSignal.DistanceToTrainM > maxDistanceM) + goto Exit; // the requested signal is too distant + + // All OK, we can retrieve the data for the required signal; + distanceM = trainSignal.DistanceToTrainM; + mainHeadSignalTypeName = trainSignal.SignalObject.SignalHeads[0].SignalTypeName; + if (signalFunctionTypeName == "NORMAL") { - var playerTrainSignalList = Locomotive.Train.PlayerTrainSignals[dir][function]; - if (itemSequenceIndex > playerTrainSignalList.Count - 1) - goto Exit; // no n-th signal available - var trainSignal = playerTrainSignalList[itemSequenceIndex]; - if (trainSignal.DistanceToTrainM > maxDistanceM) - goto Exit; // the requested signal is too distant - - // All OK, we can retrieve the data for the required signal; - distanceM = trainSignal.DistanceToTrainM; - mainHeadSignalTypeName = trainSignal.SignalObject.SignalHeads[0].SignalTypeName; - if (signalFunctionTypeName == "NORMAL") - { - aspect = (Aspect)trainSignal.SignalState; - speedLimitMpS = trainSignal.AllowedSpeedMpS; - altitudeM = trainSignal.SignalObject.tdbtraveller.Y; - } - else - { - aspect = (Aspect)Locomotive.Train.signalRef.TranslateToTCSAspect(trainSignal.SignalObject.this_sig_lr(function)); - } - - var functionHead = trainSignal.SignalObject.SignalHeads.Find(head => head.Function == function); - signalTypeName = functionHead.SignalTypeName; - if (functionHead.signalType.DrawStates.Any(d => d.Value.Index == functionHead.draw_state)) - { - drawStateName = functionHead.signalType.DrawStates.First(d => d.Value.Index == functionHead.draw_state).Value.Name; - } - textAspect = functionHead?.TextSignalAspect ?? ""; - break; + aspect = (Aspect)trainSignal.SignalState; + speedLimitMpS = trainSignal.AllowedSpeedMpS; + altitudeM = trainSignal.SignalObject.tdbtraveller.Y; } - case Train.TrainObjectItem.TRAINOBJECTTYPE.SPEEDPOST: + else { - var playerTrainSpeedpostList = Locomotive.Train.PlayerTrainSpeedposts[dir].Where(x => !x.IsWarning).ToList(); - if (itemSequenceIndex > playerTrainSpeedpostList.Count - 1) - goto Exit; // no n-th speedpost available - var trainSpeedpost = playerTrainSpeedpostList[itemSequenceIndex]; - if (trainSpeedpost.DistanceToTrainM > maxDistanceM) - goto Exit; // the requested speedpost is too distant - - // All OK, we can retrieve the data for the required speedpost; - distanceM = trainSpeedpost.DistanceToTrainM; - speedLimitMpS = trainSpeedpost.AllowedSpeedMpS; - break; + aspect = (Aspect)Locomotive.Train.signalRef.TranslateToTCSAspect(trainSignal.SignalObject.this_sig_lr(function)); } + + var functionHead = trainSignal.SignalObject.SignalHeads.Find(head => head.Function == function); + signalTypeName = functionHead.SignalTypeName; + if (functionHead.signalType.DrawStates.Any(d => d.Value.Index == functionHead.draw_state)) + { + drawStateName = functionHead.signalType.DrawStates.First(d => d.Value.Index == functionHead.draw_state).Value.Name; + } + textAspect = functionHead?.TextSignalAspect ?? ""; + break; + } + case Train.TrainObjectItem.TRAINOBJECTTYPE.SPEEDPOST: + { + var playerTrainSpeedpostList = Locomotive.Train.PlayerTrainSpeedposts[dir].Where(x => !x.IsWarning).ToList(); + if (itemSequenceIndex > playerTrainSpeedpostList.Count - 1) + goto Exit; // no n-th speedpost available + var trainSpeedpost = playerTrainSpeedpostList[itemSequenceIndex]; + if (trainSpeedpost.DistanceToTrainM > maxDistanceM) + goto Exit; // the requested speedpost is too distant + + // All OK, we can retrieve the data for the required speedpost; + distanceM = trainSpeedpost.DistanceToTrainM; + speedLimitMpS = trainSpeedpost.AllowedSpeedMpS; + break; + } } -Exit: + Exit: return new SignalFeatures(mainHeadSignalTypeName: mainHeadSignalTypeName, signalTypeName: signalTypeName, aspect: aspect, drawStateName: drawStateName, distanceM: distanceM, speedLimitMpS: speedLimitMpS, altitudeM: altitudeM, textAspect: textAspect); } @@ -734,7 +732,7 @@ SpeedPostFeatures NextSpeedPostFeatures(int itemSequenceIndex, float maxDistance speedLimitMpS = trainSpeedpost.AllowedSpeedMpS; altitudeM = trainSpeedpost.SignalObject.tdbtraveller.Y; -Exit: + Exit: return new SpeedPostFeatures(speedPostTypeName: speedPostTypeName, isWarning: isWarning, distanceM: distanceM, speedLimitMpS: speedLimitMpS, altitudeM: altitudeM); } @@ -763,7 +761,7 @@ private bool DoesStartFromTerminalStation() public void SignalEvent(Event evt, TrainControlSystem script) { try - { + { foreach (var eventHandler in Locomotive.EventHandlers) eventHandler.HandleEvent(evt, script); } @@ -936,7 +934,7 @@ private T LoadParameter(string sectionName, string keyName, T defaultValue) public string GetDisplayString(int commandIndex) { if (CustomizedCabviewControlNames.TryGetValue(commandIndex - 1, out string name)) return name; - return "ORTS_TCS" + commandIndex; + return "ORTS_TCS"+commandIndex; } public void Save(BinaryWriter outf) @@ -1103,7 +1101,7 @@ public bool OverspeedReset float VigilanceAlarmTimeoutS; float CurrentSpeedLimitMpS; float NextSpeedLimitMpS; - + MonitoringStatus Status; public ScriptedTrainControlSystem.MonitoringDevice VigilanceMonitor; @@ -1218,7 +1216,7 @@ public void UpdateInputs() CurrentSpeedLimitMpS = TrainSpeedLimitMpS(); // TODO: NextSignalSpeedLimitMpS(0) should return 0 if the signal is at stop; cause seems to be updateSpeedInfo() within Train.cs - NextSpeedLimitMpS = NextSignalAspect(0) != Aspect.Stop ? (NextSignalSpeedLimitMpS(0) > 0 && NextSignalSpeedLimitMpS(0) < TrainSpeedLimitMpS() ? NextSignalSpeedLimitMpS(0) : TrainSpeedLimitMpS()) : 0; + NextSpeedLimitMpS = NextSignalAspect(0) != Aspect.Stop ? (NextSignalSpeedLimitMpS(0) > 0 && NextSignalSpeedLimitMpS(0) < TrainSpeedLimitMpS() ? NextSignalSpeedLimitMpS(0) : TrainSpeedLimitMpS() ) : 0; SetCurrentSpeedLimitMpS(CurrentSpeedLimitMpS); SetNextSpeedLimitMpS(NextSpeedLimitMpS); @@ -1255,7 +1253,7 @@ private void UpdateETCSPlanning() { maxDistanceAheadM = NextSignalDistanceM(i); if (NextSignalAspect(i) == Aspect.Stop || NextSignalAspect(i) == Aspect.None) break; - float speedLimMpS = NextSignalSpeedLimitMpS(i); + float speedLimMpS = NextSignalSpeedLimitMpS(i); if (speedLimMpS >= 0) ETCSStatus.SpeedTargets.Add(new PlanningTarget(maxDistanceAheadM, speedLimMpS)); } float prevDist = 0; @@ -1271,7 +1269,7 @@ private void UpdateETCSPlanning() prevSpeed = speed; } ETCSStatus.SpeedTargets.Sort((x, y) => x.DistanceToTrainM.CompareTo(y.DistanceToTrainM)); - ETCSStatus.SpeedTargets.Add(new PlanningTarget(maxDistanceAheadM, 0)); + ETCSStatus.SpeedTargets.Add(new PlanningTarget(maxDistanceAheadM, 0)); ETCSStatus.GradientProfile.Clear(); ETCSStatus.GradientProfile.Add(new GradientProfileElement(0, (int)(CurrentGradientPercent() * 10))); ETCSStatus.GradientProfile.Add(new GradientProfileElement(maxDistanceAheadM, 0)); // End of profile @@ -1279,7 +1277,7 @@ private void UpdateETCSPlanning() public override void HandleEvent(TCSEvent evt, string message) { - switch (evt) + switch(evt) { case TCSEvent.AlerterPressed: case TCSEvent.AlerterReleased: @@ -1299,7 +1297,7 @@ public override void HandleEvent(TCSEvent evt, string message) VigilanceMonitorState = MonitorState.StandBy; break; - // case VigilanceState.Emergency: do nothing + // case VigilanceState.Emergency: do nothing } } break; @@ -1414,12 +1412,12 @@ void UpdateVigilance() void UpdateSpeedControl() { var interventionSpeedMpS = CurrentSpeedLimitMpS + MpS.FromKpH(5.0f); // Default margin : 5 km/h - + if (OverspeedMonitor.TriggerOnTrackOverspeed) { interventionSpeedMpS = CurrentSpeedLimitMpS + OverspeedMonitor.TriggerOnTrackOverspeedMarginMpS; } - + SetInterventionSpeedLimitMpS(interventionSpeedMpS); switch (OverspeedMonitorState) diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/TrainCar.cs b/Source/Orts.Simulation/Simulation/RollingStocks/TrainCar.cs index 8d62cb15fe..ec545107ea 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/TrainCar.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/TrainCar.cs @@ -33,11 +33,6 @@ // Debug Brake Slide Calculations //#define DEBUG_BRAKE_SLIDE -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; using Microsoft.Xna.Framework; using Orts.Common; using Orts.Formats.Msts; @@ -52,6 +47,12 @@ using Orts.Simulation.Timetables; using ORTS.Common; using ORTS.Scripting.Api; +using ORTS.Settings; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; using Event = Orts.Common.Event; namespace Orts.Simulation.RollingStocks @@ -106,7 +107,7 @@ public abstract class TrainCar static float dbfmaxsafecurvespeedmps;//Debrief eval public static int DbfEvalTrainOverturned;//Debrief eval public bool ldbfevaltrainoverturned = false; - + // original consist of which car was part (used in timetable for couple/uncouple options) public string OrgConsist = string.Empty; @@ -676,7 +677,7 @@ public enum WagonSpecialTypes } public WagonSpecialTypes WagonSpecialType; - protected float CurveResistanceZeroSpeedFactor = 0.5f; // Based upon research (Russian experiments - 1960) the older formula might be about 2x actual value + protected float CurveResistanceZeroSpeedFactor = 0.5f; // Based upon research (Russian experiments - 1960) the older formula might be about 2x actual value protected float RigidWheelBaseM; // Vehicle rigid wheelbase, read from MSTS Wagon file protected float TrainCrossSectionAreaM2; // Cross sectional area of the train protected float DoubleTunnelCrossSectAreaM2; @@ -700,7 +701,7 @@ public struct CarTunnelInfoData public virtual void Initialize() { CurveSpeedDependent = Simulator.Settings.CurveSpeedDependent; - + //CurveForceFilter.Initialize(); // Initialize tunnel resistance values @@ -805,7 +806,7 @@ public virtual void Update(float elapsedClockSeconds) InitializeCarTemperatures(); AmbientTemperatureInitialised = true; } - + // Update temperature variation for height of car above sea level // Typically in clear conditions there is a 9.8 DegC variation for every 1000m (1km) rise, in snow/rain there is approx 5.5 DegC variation for every 1000m (1km) rise float TemperatureHeightVariationDegC = 0; @@ -820,9 +821,9 @@ public virtual void Update(float elapsedClockSeconds) { TemperatureHeightVariationDegC = Me.ToKiloM(CarHeightAboveSeaLevelM) * DryLapseTemperatureC; } - + TemperatureHeightVariationDegC = MathHelper.Clamp(TemperatureHeightVariationDegC, 0.00f, 30.0f); - + CarOutsideTempC = InitialCarOutsideTempC - TemperatureHeightVariationDegC; // gravity force, M32 is up component of forward vector @@ -898,9 +899,9 @@ public void InitializeCarTemperatures() double longitude = 0; new WorldLatLon().ConvertWTC(WorldPosition.TileX, WorldPosition.TileZ, WorldPosition.Location, ref latitude, ref longitude); - + float LatitudeDeg = MathHelper.ToDegrees((float)latitude); - + // Sets outside temperature dependent upon the season if (Simulator.Season == SeasonType.Winter) @@ -988,7 +989,7 @@ public virtual void UpdateBrakeSlideCalculation() if (this is MSTSDieselLocomotive || this is MSTSElectricLocomotive) { // If advanced adhesion model indicates wheel slip warning, then check other conditions (throttle and brake force) to determine whether it is a wheel slip or brake skid - if (WheelSlipWarning && ThrottlePercent < 0.1f && BrakeRetardForceN > 25.0) + if (WheelSlipWarning && ThrottlePercent < 0.1f && BrakeRetardForceN > 25.0) { BrakeSkidWarning = true; // set brake skid flag true } @@ -1024,7 +1025,7 @@ public virtual void UpdateBrakeSlideCalculation() BrakeSkidWarning = true; // wagon wheel is about to slip } } - else if (BrakeWheelTreadForceN < 0.75f * WagonBrakeAdhesiveForceN) + else if ( BrakeWheelTreadForceN < 0.75f * WagonBrakeAdhesiveForceN) { BrakeSkidWarning = false; // wagon wheel is back to normal } @@ -1036,7 +1037,7 @@ public virtual void UpdateBrakeSlideCalculation() WheelBrakeSlideProtectionDumpValveLockout = false; } - + // Calculate adhesive force based upon whether in skid or not @@ -1048,7 +1049,7 @@ public virtual void UpdateBrakeSlideCalculation() { WagonBrakeAdhesiveForceN = MassKG * GravitationalAccelerationMpS2 * Train.WagonCoefficientFriction; // Adhesive force wheel normal } - + // Test if wheel forces are high enough to induce a slip. Set slip flag if slip occuring if (!BrakeSkid && AbsSpeedMpS > 0.01) // Train must be moving forward to experience skid @@ -1066,7 +1067,7 @@ public virtual void UpdateBrakeSlideCalculation() { BrakeSkid = false; // wagon wheel is not slipping } - + } else { @@ -1202,11 +1203,11 @@ public void UpdateTrainDerailmentRisk(float elapsedClockSeconds) // To achieve an accurate coupler angle calculation the following length need to be calculated. These values can be included in the ENG/WAG file for greatest accuracy, or alternatively OR will // calculate some default values based upon the length of the car specified in the "Size" statement. This value may however be inaccurate, and sets the "visual" distance for placement of the // animated coupler. So often it is a good idea to add the values in the WAG file. - + var OverhangThisCarM = 0.5f * (CarBodyLengthM - CarBogieCentreLengthM); // Vehicle overhang - B var BogieDistanceThisCarM = 0.5f * CarBogieCentreLengthM; // 0.5 * distance between bogie centres - A var CouplerDistanceThisCarM = 0.5f * (CarCouplerFaceLengthM - CarBodyLengthM); - + var OverhangBehindCarM = 2.545f; // Vehicle overhang - B var BogieDistanceBehindCarM = 8.23f; // 0.5 * distance between bogie centres - A var CouplerDistanceBehindCarM = 0.5f * (CarCouplerFaceLengthM - CarBodyLengthM); @@ -1231,7 +1232,7 @@ public void UpdateTrainDerailmentRisk(float elapsedClockSeconds) { couplerDistanceM = 0.0001f; // Stop couplerDistance equalling zero as this causes NaN calculations in following calculations. } - + float BogieCentresAdjVehiclesM = OverhangThisCarM + OverhangBehindCarM + couplerDistanceM; // L value = Overhangs + Coupler spacing - D if (CarBehind != null) @@ -1393,7 +1394,7 @@ public void UpdateTrainDerailmentRisk(float elapsedClockSeconds) // Trace.TraceInformation("Buff - CarId {0} Thiscar {1} A {2} B {3} C {4} 180 {5}", CarID, WagonFrontCouplerBuffAngleRad, X, Y, Z, MathHelper.ToRadians(180.0f)); - // Trace.TraceInformation("Buff - CarId {0} StringThis {1} StringBehind {2} BuffThis {3} BuffAhead {4}", CarID, WagonRearCouplerAngleRad, CarBehind.WagonFrontCouplerAngleRad, WagonRearCouplerBuffAngleRad, CarBehind.WagonFrontCouplerBuffAngleRad); + // Trace.TraceInformation("Buff - CarId {0} StringThis {1} StringBehind {2} BuffThis {3} BuffAhead {4}", CarID, WagonRearCouplerAngleRad, CarBehind.WagonFrontCouplerAngleRad, WagonRearCouplerBuffAngleRad, CarBehind.WagonFrontCouplerBuffAngleRad); } @@ -1540,14 +1541,14 @@ public void UpdateTrainDerailmentRisk(float elapsedClockSeconds) float BB1 = 0; // Prevent NaN if WagonNumBogies = 0 - if (WagonNumBogies != 0) + if ( WagonNumBogies != 0) { // AA1 = CarAhead.CouplerForceU * (float)Math.Sin(WagonCouplerAngleDerailRad) / WagonNumBogies; AA1 = Math.Abs(CarAhead.CouplerForceUSmoothed.SmoothedValue) * (float)Math.Sin(WagonCouplerAngleDerailRad) / WagonNumBogies; } else { - // AA1 = CarAhead.CouplerForceU * (float)Math.Sin(WagonCouplerAngleDerailRad); + // AA1 = CarAhead.CouplerForceU * (float)Math.Sin(WagonCouplerAngleDerailRad); AA1 = Math.Abs(CarAhead.CouplerForceUSmoothed.SmoothedValue) * (float)Math.Sin(WagonCouplerAngleDerailRad); } @@ -1586,7 +1587,7 @@ public void UpdateTrainDerailmentRisk(float elapsedClockSeconds) var wagonAdhesion = Train.WagonCoefficientFriction; // Calculate Nadal derailment coefficient limit - NadalDerailmentCoefficient = ((float)Math.Tan(MaximumWheelFlangeAngleRad) - wagonAdhesion) / (1f + wagonAdhesion * (float)Math.Tan(MaximumWheelFlangeAngleRad)); + NadalDerailmentCoefficient = ((float) Math.Tan(MaximumWheelFlangeAngleRad) - wagonAdhesion) / (1f + wagonAdhesion * (float) Math.Tan(MaximumWheelFlangeAngleRad)); // Calculate Angle of Attack - AOA = sin-1(2 * bogie wheel base / curve radius) AngleOfAttackRad = (float)Math.Asin(2 * RigidWheelBaseM / CurrentCurveRadius); @@ -1605,7 +1606,7 @@ public void UpdateTrainDerailmentRisk(float elapsedClockSeconds) var parameterB = parameterB_1 + parameterB_2; - DerailClimbDistanceM = Me.FromFt((float)((parameterA * parameterB * Me.ToIn(WheelFlangeLengthM)) / ((angleofAttackmRad + (parameterB * Me.ToIn(WheelFlangeLengthM)))))); + DerailClimbDistanceM = Me.FromFt( (float)((parameterA * parameterB * Me.ToIn(WheelFlangeLengthM)) / ((angleofAttackmRad + (parameterB * Me.ToIn(WheelFlangeLengthM))))) ); // calculate the time taken to travel the derail climb distance var derailTimeS = DerailClimbDistanceM / AbsSpeedMpS; @@ -1625,13 +1626,13 @@ public void UpdateTrainDerailmentRisk(float elapsedClockSeconds) { DerailExpected = true; Simulator.Confirmer.Message(ConfirmLevel.Warning, Simulator.Catalog.GetStringFmt("Car {0} has derailed on the curve.", CarID)); - // Trace.TraceInformation("Car Derail - CarID: {0}, Coupler: {1}, CouplerSmoothed {2}, Lateral {3}, Vertical {4}, Angle {5} Nadal {6} Coeff {7}", CarID, CouplerForceU, CouplerForceUSmoothed.SmoothedValue, TotalWagonLateralDerailForceN, TotalWagonVerticalDerailForceN, WagonCouplerAngleDerailRad, NadalDerailmentCoefficient, DerailmentCoefficient); - // Trace.TraceInformation("Car Ahead Derail - CarID: {0}, Coupler: {1}, CouplerSmoothed {2}, Lateral {3}, Vertical {4}, Angle {5}", CarAhead.CarID, CarAhead.CouplerForceU, CarAhead.CouplerForceUSmoothed.SmoothedValue, CarAhead.TotalWagonLateralDerailForceN, CarAhead.TotalWagonVerticalDerailForceN, CarAhead.WagonCouplerAngleDerailRad); + // Trace.TraceInformation("Car Derail - CarID: {0}, Coupler: {1}, CouplerSmoothed {2}, Lateral {3}, Vertical {4}, Angle {5} Nadal {6} Coeff {7}", CarID, CouplerForceU, CouplerForceUSmoothed.SmoothedValue, TotalWagonLateralDerailForceN, TotalWagonVerticalDerailForceN, WagonCouplerAngleDerailRad, NadalDerailmentCoefficient, DerailmentCoefficient); + // Trace.TraceInformation("Car Ahead Derail - CarID: {0}, Coupler: {1}, CouplerSmoothed {2}, Lateral {3}, Vertical {4}, Angle {5}", CarAhead.CarID, CarAhead.CouplerForceU, CarAhead.CouplerForceUSmoothed.SmoothedValue, CarAhead.TotalWagonLateralDerailForceN, CarAhead.TotalWagonVerticalDerailForceN, CarAhead.WagonCouplerAngleDerailRad); } else if (DerailPossible) { DerailElapsedTimeS += elapsedClockSeconds; - // Trace.TraceInformation("Car Derail Time - CarID: {0}, Coupler: {1}, CouplerSmoothed {2}, Lateral {3}, Vertical {4}, Angle {5}, Elapsed {6}, DeratilTime {7}, Distance {8} Nadal {9} Coeff {10}", CarID, CouplerForceU, CouplerForceUSmoothed.SmoothedValue, TotalWagonLateralDerailForceN, TotalWagonVerticalDerailForceN, WagonCouplerAngleDerailRad, DerailElapsedTimeS, derailTimeS, DerailClimbDistanceM, NadalDerailmentCoefficient, DerailmentCoefficient); + // Trace.TraceInformation("Car Derail Time - CarID: {0}, Coupler: {1}, CouplerSmoothed {2}, Lateral {3}, Vertical {4}, Angle {5}, Elapsed {6}, DeratilTime {7}, Distance {8} Nadal {9} Coeff {10}", CarID, CouplerForceU, CouplerForceUSmoothed.SmoothedValue, TotalWagonLateralDerailForceN, TotalWagonVerticalDerailForceN, WagonCouplerAngleDerailRad, DerailElapsedTimeS, derailTimeS, DerailClimbDistanceM, NadalDerailmentCoefficient, DerailmentCoefficient); } else { @@ -1644,11 +1645,11 @@ public void UpdateTrainDerailmentRisk(float elapsedClockSeconds) DerailPossible = false; } - // if (CarID == "0 - 84" || CarID == "0 - 83" || CarID == "0 - 82" || CarID == "0 - 81" || CarID == "0 - 80" || CarID == "0 - 79") - // { - // Trace.TraceInformation("Nadal - {0}, Adhesion {1} Flange Angle {2}", NadalDerailmentCoefficient, wagonAdhesion, MaximumWheelFlangeAngleRad); - // Trace.TraceInformation("Derailment - CarID {0}, Nadal {1}, Derail {2} Possible {3} Expected {4} Derail Distance {5} ElapsedTime {6} DerailTime {7}", CarID, NadalDerailmentCoefficient, DerailmentCoefficient, DerailPossible, DerailExpected, DerailClimbDistanceM, DerailElapsedTimeS, derailTimeS); - // } +// if (CarID == "0 - 84" || CarID == "0 - 83" || CarID == "0 - 82" || CarID == "0 - 81" || CarID == "0 - 80" || CarID == "0 - 79") +// { +// Trace.TraceInformation("Nadal - {0}, Adhesion {1} Flange Angle {2}", NadalDerailmentCoefficient, wagonAdhesion, MaximumWheelFlangeAngleRad); +// Trace.TraceInformation("Derailment - CarID {0}, Nadal {1}, Derail {2} Possible {3} Expected {4} Derail Distance {5} ElapsedTime {6} DerailTime {7}", CarID, NadalDerailmentCoefficient, DerailmentCoefficient, DerailPossible, DerailExpected, DerailClimbDistanceM, DerailElapsedTimeS, derailTimeS); +// } } else { @@ -1703,11 +1704,11 @@ public string GetCurveDirection() } // If a westerly direction (ie -ve) convert to an angle between 0 and 360 - if (FrontWagonDirectionDeg < 0) + if (FrontWagonDirectionDeg< 0) FrontWagonDirectionDeg += 360; // Rear Wagon Direction - direction = (float)Math.Atan2(CarBehind.WorldPosition.XNAMatrix.M13, CarBehind.WorldPosition.XNAMatrix.M11); + direction = (float) Math.Atan2(CarBehind.WorldPosition.XNAMatrix.M13, CarBehind.WorldPosition.XNAMatrix.M11); float BehindWagonDirectionDeg = MathHelper.ToDegrees((float)direction); @@ -1723,15 +1724,15 @@ public string GetCurveDirection() } // If a westerly direction (ie -ve) convert to an angle between 0 and 360 - if (BehindWagonDirectionDeg < 0) + if (BehindWagonDirectionDeg< 0) BehindWagonDirectionDeg += 360; - if (FrontWagonDirectionDeg > 270 && BehindWagonDirectionDeg < 90) + if (FrontWagonDirectionDeg > 270 && BehindWagonDirectionDeg< 90) { FrontWagonDirectionDeg -= 360; } - if (FrontWagonDirectionDeg < 90 && BehindWagonDirectionDeg > 270) + if (FrontWagonDirectionDeg< 90 && BehindWagonDirectionDeg> 270) { BehindWagonDirectionDeg -= 360; } @@ -1743,7 +1744,7 @@ public string GetCurveDirection() { curveDirection = "Right"; } - else if (FrontWagonDirectionDeg < BehindWagonDirectionDeg && directionBandwidth > 0.005) + else if (FrontWagonDirectionDeg 0.005) { curveDirection = "Left"; } @@ -2015,7 +2016,7 @@ public virtual void UpdateCurveSpeedLimit() } #endregion - + #region Calculate friction force in curves /// @@ -2028,7 +2029,7 @@ public virtual void UpdateCurveForce(float elapsedClockSeconds) if (CurrentCurveRadius > 0) { if (RigidWheelBaseM == 0) // Calculate default values if no value in Wag File - { + { float Axles = WheelAxles.Count; float Bogies = Parts.Count - 1; float BogieSize = Axles / Bogies; @@ -2093,7 +2094,7 @@ public virtual void UpdateCurveForce(float elapsedClockSeconds) // Approximation for calculating rigid wheelbase for steam locomotives // Wheelbase = 1.25 x (Loco Drive Axles - 1.0) x Drive Wheel diameter - RigidWheelBaseM = 1.25f * (LocoNumDrvAxles - 1.0f) * (DriverWheelRadiusM * 2.0f); + RigidWheelBaseM = 1.25f * (LocoNumDrvAxles - 1.0f) * (DriverWheelRadiusM * 2.0f); } } } @@ -2359,7 +2360,7 @@ public virtual float GetMaximumSimpleCouplerSlack1M() { return 0.03f; } - + public virtual float GetMaximumSimpleCouplerSlack2M() { return 0.035f; @@ -2401,12 +2402,12 @@ public virtual float GetCouplerTensionSlackBM() { return 0.1f; } - + public virtual float GetCouplerCompressionSlackAM() { return 0; } - + public virtual float GetCouplerCompressionSlackBM() { return 0.1f; @@ -2416,12 +2417,12 @@ public virtual float GetMaximumCouplerTensionSlack1M() { return 0.05f; } - + public virtual float GetMaximumCouplerTensionSlack2M() { return 0.1f; } - + public virtual float GetMaximumCouplerTensionSlack3M() { return 0.13f; @@ -2436,7 +2437,7 @@ public virtual float GetMaximumCouplerCompressionSlack2M() { return 0.1f; } - + public virtual float GetMaximumCouplerCompressionSlack3M() { return 0.13f; @@ -2851,7 +2852,7 @@ public void ComputePosition(Traveller traveler, bool backToFront, float elapsedT WorldPosition.XNAMatrix = m; WorldPosition.TileX = tileX; WorldPosition.TileZ = tileZ; - + UpdatedTraveler(traveler, elapsedTimeS, distance, speed); // calculate truck angles @@ -2906,7 +2907,7 @@ internal void UpdatedTraveler(Traveller traveler, float elapsedTimeS, float dist #endregion #region Super-elevation - void UpdateSuperElevation(Traveller traveler, float elapsedTimeS) + void UpdateSuperElevation(Traveller traveler, float elapsedTimeS) { if (Simulator.Settings.UseSuperElevation == 0) return; diff --git a/Source/Orts.Simulation/Simulation/Signalling/CsSignalScript.cs b/Source/Orts.Simulation/Simulation/Signalling/CsSignalScript.cs index c0e5e49a85..19670b9550 100644 --- a/Source/Orts.Simulation/Simulation/Signalling/CsSignalScript.cs +++ b/Source/Orts.Simulation/Simulation/Signalling/CsSignalScript.cs @@ -1,9 +1,9 @@ -using System; +using Orts.Formats.Msts; +using ORTS.Scripting.Api; +using System; using System.Collections.Generic; using System.IO; using System.Linq; -using Orts.Formats.Msts; -using ORTS.Scripting.Api; namespace Orts.Simulation.Signalling { @@ -223,7 +223,7 @@ public bool IdSignalHasNormalSubtype(int id, string normalSubtype) /// Id of the signal to query /// Consider only heads with a specific signal function /// Get aspect of nth head of the specified type - public string IdTextSignalAspect(int id, string sigfn, int headindex = 0) + public string IdTextSignalAspect(int id, string sigfn, int headindex=0) { if (SignalObject.signalRef.SignalFunctions.TryGetValue(sigfn, out SignalFunction function)) { @@ -249,7 +249,7 @@ public string IdTextSignalAspect(int id, string sigfn, int headindex = 0) /// Check most restrictive head per signal public Aspect DistMultiSigMR(string sigfnA, string sigfnB, bool mostRestrictiveHead = true) { - if (mostRestrictiveHead) return (Aspect)SignalHead.dist_multi_sig_mr(SignalFunction(sigfnA), SignalFunction(sigfnB), DebugFileName); + if(mostRestrictiveHead) return (Aspect)SignalHead.dist_multi_sig_mr(SignalFunction(sigfnA), SignalFunction(sigfnB), DebugFileName); return (Aspect)SignalHead.dist_multi_sig_mr_of_lr(SignalFunction(sigfnA), SignalFunction(sigfnB), DebugFileName); } @@ -389,7 +389,7 @@ internal void AttachToHead(SignalHead signalHead) /// /// Signal ID of the calling signal /// Message sent to signal - public virtual void HandleSignalMessage(int signalId, string message) { } + public virtual void HandleSignalMessage(int signalId, string message) {} /// /// Called when the simulator diff --git a/Source/Orts.Simulation/Simulation/Signalling/DeadlockInfo.cs b/Source/Orts.Simulation/Simulation/Signalling/DeadlockInfo.cs index 25197f8cf3..d3d026741c 100644 --- a/Source/Orts.Simulation/Simulation/Signalling/DeadlockInfo.cs +++ b/Source/Orts.Simulation/Simulation/Signalling/DeadlockInfo.cs @@ -19,12 +19,12 @@ // #define DEBUG_DEADLOCK // print details of deadlock processing +using Orts.Simulation.Physics; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; -using Orts.Simulation.Physics; namespace Orts.Simulation.Signalling { diff --git a/Source/Orts.Simulation/Simulation/Signalling/DeadlockPathInfo.cs b/Source/Orts.Simulation/Simulation/Signalling/DeadlockPathInfo.cs index 980b05c981..06ac700b76 100644 --- a/Source/Orts.Simulation/Simulation/Signalling/DeadlockPathInfo.cs +++ b/Source/Orts.Simulation/Simulation/Signalling/DeadlockPathInfo.cs @@ -15,10 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using Orts.Simulation.Physics; using System; using System.Collections.Generic; using System.IO; -using Orts.Simulation.Physics; namespace Orts.Simulation.Signalling { diff --git a/Source/Orts.Simulation/Simulation/Signalling/SIGSCRfile.cs b/Source/Orts.Simulation/Simulation/Signalling/SIGSCRfile.cs index d2e41aa2f7..c6b8970535 100644 --- a/Source/Orts.Simulation/Simulation/Signalling/SIGSCRfile.cs +++ b/Source/Orts.Simulation/Simulation/Signalling/SIGSCRfile.cs @@ -1590,14 +1590,14 @@ public void SH_process_script(SignalHead thisHead, SignalScripts.SCRScripts sign } } - // AND or OR indication (to link previous and next part) + // AND or OR indication (to link previous and next part) else if (thisCond is SignalScripts.SCRAndOr) { condstring = (SignalScripts.SCRAndOr)thisCond; } - // subcondition + // subcondition else { @@ -1724,7 +1724,7 @@ public void SH_process_script(SignalHead thisHead, SignalScripts.SCRScripts sign #endif } - // process second term + // process second term else { diff --git a/Source/Orts.Simulation/Simulation/Signalling/SignalWorldObject.cs b/Source/Orts.Simulation/Simulation/Signalling/SignalWorldObject.cs index 2c34410f72..4e6ce3cc8d 100644 --- a/Source/Orts.Simulation/Simulation/Signalling/SignalWorldObject.cs +++ b/Source/Orts.Simulation/Simulation/Signalling/SignalWorldObject.cs @@ -15,11 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using Orts.Formats.Msts; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; -using Orts.Formats.Msts; namespace Orts.Simulation.Signalling { diff --git a/Source/Orts.Simulation/Simulation/Signalling/Signals.cs b/Source/Orts.Simulation/Simulation/Signalling/Signals.cs index 672fec734d..0f98248585 100644 --- a/Source/Orts.Simulation/Simulation/Signalling/Signals.cs +++ b/Source/Orts.Simulation/Simulation/Signalling/Signals.cs @@ -26,6 +26,7 @@ using System.Diagnostics; using System.IO; using System.Linq; +using System.Text; using Microsoft.Xna.Framework; using Orts.Formats.Msts; using Orts.Formats.OR; @@ -243,7 +244,7 @@ public Signals(Simulator simulator, SignalConfigurationFile sigcfg, Cancellation Trace.TraceInformation("Signal " + thisSignal.thisRef + " ; TC : " + thisSignal.TCReference + " ; NextTC : " + thisSignal.TCNextTC + - " ; TN : " + thisSignal.trackNode + + " ; TN : " + thisSignal.trackNode + " ; TDB (0) : " + thisSignal.SignalHeads[0].TDBIndex); } @@ -483,7 +484,7 @@ private void BuildSignalWorld(Simulator simulator, SignalConfigurationFile sigcf { SpeedPostWorldList.Add(new SpeedPostWorldObject(speedPostObj)); int thisSpeedPostId = SpeedPostWorldList.Count() - 1; - foreach (TrItemId trItemId in speedPostObj.trItemIDList) + foreach(TrItemId trItemId in speedPostObj.trItemIDList) { if (!SpeedPostRefList.ContainsKey(trItemId.dbID)) { @@ -870,7 +871,7 @@ private void SplitBackfacing(TrItem[] TrItems, TrackNode[] TrackNodes) /// ScanSection : This method checks a section in the TDB for signals or speedposts /// private void ScanSection(TrItem[] TrItems, TrackNode[] trackNodes, int index, - TrackSectionsFile tsectiondat, TrackDatabaseFile tdbfile, Dictionary platformList, List milepostList) + TrackSectionsFile tsectiondat, TrackDatabaseFile tdbfile, Dictionary platformList, List milepostList) { int lastSignal = -1; // Index to last signal found in path; -1 if none int lastMilepost = -1; // Index to last milepost found in path; -1 if none @@ -949,7 +950,7 @@ private void SplitBackfacing(TrItem[] TrItems, TrackNode[] TrackNodes) } } } - } + } /// /// Merge Heads @@ -1098,7 +1099,7 @@ private int AddMilepost(int trackNode, int nodeIndx, SpeedPostItem speedItem, in milepost.TrItemId = (uint)TDBRef; milepost.MilepostValue = speedItem.SpeedInd; MilepostList.Add(milepost); - + #if DEBUG_PRINT File.AppendAllText(@"C:\temp\speedpost.txt", string.Format("\nMilepost placed : at : {0} {1}:{2} {3}. String: {4}\n", @@ -1164,7 +1165,7 @@ private void AddWorldInfo() } } } - + private void InitializeSignals() { foreach (SignalObject signal in SignalObjects) @@ -2112,7 +2113,7 @@ public void ProcessNodes(int iNode, TrItem[] TrItems, TrackNode[] trackNodes, Tr if (speedItem.SigObj >= 0) { if (!speedItem.IsMilePost) - { + { SignalObject thisSpeedpost = SignalObjects[speedItem.SigObj]; float speedpostDistance = thisSpeedpost.DistanceTo(TDBTrav); if (thisSpeedpost.direction == 1) @@ -3433,7 +3434,7 @@ public void requestClearNode(Train.TrainRouted thisTrain, Train.TCSubpathRoute r } // if not cleared to max distance or looped, determine reason - if (!furthestRouteCleared && lastRouteIndex > 0 && routePart[lastRouteIndex].TCSectionIndex >= 0 && endAuthority != Train.END_AUTHORITY.LOOP) + if (!furthestRouteCleared && lastRouteIndex > 0 && routePart[lastRouteIndex].TCSectionIndex >= 0 && endAuthority != Train.END_AUTHORITY.LOOP) { thisElement = routePart[lastRouteIndex]; diff --git a/Source/Orts.Simulation/Simulation/Signalling/SpeedPostWorldObject.cs b/Source/Orts.Simulation/Simulation/Signalling/SpeedPostWorldObject.cs index bed7c0c7a1..8399e842dc 100644 --- a/Source/Orts.Simulation/Simulation/Signalling/SpeedPostWorldObject.cs +++ b/Source/Orts.Simulation/Simulation/Signalling/SpeedPostWorldObject.cs @@ -1,5 +1,5 @@ -using System.IO; -using Orts.Formats.Msts; +using Orts.Formats.Msts; +using System.IO; namespace Orts.Simulation.Signalling { diff --git a/Source/Orts.Simulation/Simulation/Signalling/TrackCircuitState.cs b/Source/Orts.Simulation/Simulation/Signalling/TrackCircuitState.cs index a793ec558c..accd95e65f 100644 --- a/Source/Orts.Simulation/Simulation/Signalling/TrackCircuitState.cs +++ b/Source/Orts.Simulation/Simulation/Signalling/TrackCircuitState.cs @@ -15,11 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using Orts.Simulation.Physics; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; -using Orts.Simulation.Physics; namespace Orts.Simulation.Signalling { diff --git a/Source/Orts.Simulation/Simulation/Signalling/TrainOccupyState.cs b/Source/Orts.Simulation/Simulation/Signalling/TrainOccupyState.cs index 3b15ea3c7b..ee825649f2 100644 --- a/Source/Orts.Simulation/Simulation/Signalling/TrainOccupyState.cs +++ b/Source/Orts.Simulation/Simulation/Signalling/TrainOccupyState.cs @@ -15,8 +15,8 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System.Collections.Generic; using Orts.Simulation.Physics; +using System.Collections.Generic; namespace Orts.Simulation.Signalling { diff --git a/Source/Orts.Simulation/Simulation/Signalling/TrainQueue.cs b/Source/Orts.Simulation/Simulation/Signalling/TrainQueue.cs index 42b15f4ccf..7d6ac0d391 100644 --- a/Source/Orts.Simulation/Simulation/Signalling/TrainQueue.cs +++ b/Source/Orts.Simulation/Simulation/Signalling/TrainQueue.cs @@ -15,8 +15,8 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System.Collections.Generic; using Orts.Simulation.Physics; +using System.Collections.Generic; namespace Orts.Simulation.Signalling { diff --git a/Source/Orts.Simulation/Simulation/Simulator.cs b/Source/Orts.Simulation/Simulation/Simulator.cs index 640b864f56..ba92d45fd2 100644 --- a/Source/Orts.Simulation/Simulation/Simulator.cs +++ b/Source/Orts.Simulation/Simulation/Simulator.cs @@ -15,10 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; using GNU.Gettext; using Microsoft.Xna.Framework; using Orts.Common; @@ -30,11 +26,16 @@ using Orts.Simulation.Physics; using Orts.Simulation.RollingStocks; using Orts.Simulation.RollingStocks.SubSystems; +using Orts.Simulation.RollingStocks.SubSystems.Brakes; using Orts.Simulation.Signalling; using Orts.Simulation.Timetables; using ORTS.Common; using ORTS.Scripting.Api; using ORTS.Settings; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; using Event = Orts.Common.Event; namespace Orts.Simulation @@ -1346,8 +1347,8 @@ private Train InitializePlayerTrain() train.AITrainBrakePercent = 100; // This seems a tricky way for the brake modules to test if it is an AI train or not train.EqualReservoirPressurePSIorInHg = prevEQres; // The previous command modifies EQ reservoir pressure, causing issues with EP brake systems, so restore to prev value - // if ((PlayerLocomotive as MSTSLocomotive).EOTEnabled != MSTSLocomotive.EOTenabled.no) - // train.EOT = new EOT((PlayerLocomotive as MSTSLocomotive).EOTEnabled, false, train); +// if ((PlayerLocomotive as MSTSLocomotive).EOTEnabled != MSTSLocomotive.EOTenabled.no) +// train.EOT = new EOT((PlayerLocomotive as MSTSLocomotive).EOTEnabled, false, train); return (train); } @@ -1423,8 +1424,8 @@ private AITrain InitializeAPPlayerTrain() if (conFileName.Contains("tilted")) train.IsTilting = true; - // if ((PlayerLocomotive as MSTSLocomotive).EOTEnabled != MSTSLocomotive.EOTenabled.no) - // train.EOT = new EOT((PlayerLocomotive as MSTSLocomotive).EOTEnabled, false, train); +// if ((PlayerLocomotive as MSTSLocomotive).EOTEnabled != MSTSLocomotive.EOTenabled.no) +// train.EOT = new EOT((PlayerLocomotive as MSTSLocomotive).EOTEnabled, false, train); return train; } @@ -1478,7 +1479,7 @@ private void InitializeStaticConsists() if (!File.Exists(wagonFilePath)) { - Trace.TraceWarning($"Ignored missing {(wagon.IsEngine ? "engine" : "wagon")} {wagonFilePath} in activity definition {activityObject.Train_Config.TrainCfg.Name}"); + Trace.TraceWarning($"Ignored missing {(wagon.IsEngine? "engine" : "wagon")} {wagonFilePath} in activity definition {activityObject.Train_Config.TrainCfg.Name}"); continue; } @@ -1888,7 +1889,7 @@ private void StartSwitchPlayerTrain() if (playerTrain != null) { if (playerTrain.ControlMode == Train.TRAIN_CONTROL.MANUAL) TrainSwitcher.SuspendOldPlayer = true; // force suspend state to avoid disappearing of train; - if (TrainSwitcher.SuspendOldPlayer && + if (TrainSwitcher.SuspendOldPlayer && (playerTrain.SpeedMpS < -0.025 || playerTrain.SpeedMpS > 0.025 || playerTrain.PresentPosition[0].TCOffset != playerTrain.PreviousPosition[0].TCOffset)) { Confirmer.Message(ConfirmLevel.Warning, Catalog.GetString("Train can't be suspended with speed not equal 0")); @@ -2107,10 +2108,10 @@ public void RestartWaitingTrain(RestartWaitingTrain restartWaitingTrain) } } if (trainToRestart == null) - Trace.TraceWarning("Train {0} to restart not found", restartWaitingTrain.WaitingTrainToRestart); + Trace.TraceWarning("Train {0} to restart not found", restartWaitingTrain.WaitingTrainToRestart); } - + /// /// Derive log-file name from route path and activity name diff --git a/Source/Orts.Simulation/Simulation/SuperElevation.cs b/Source/Orts.Simulation/Simulation/SuperElevation.cs index 51da49ecbb..6f3fbcc833 100644 --- a/Source/Orts.Simulation/Simulation/SuperElevation.cs +++ b/Source/Orts.Simulation/Simulation/SuperElevation.cs @@ -15,10 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; using Orts.Formats.Msts; using ORTS.Common; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; namespace Orts.Simulation { diff --git a/Source/Orts.Simulation/Simulation/Timetables/PoolInfo.cs b/Source/Orts.Simulation/Simulation/Timetables/PoolInfo.cs index 8813141350..af5bea4184 100644 --- a/Source/Orts.Simulation/Simulation/Timetables/PoolInfo.cs +++ b/Source/Orts.Simulation/Simulation/Timetables/PoolInfo.cs @@ -75,13 +75,13 @@ public PoolInfo(Simulator simulatorref) switch (poolInfo.Strings[lineindex][0].ToLower().Trim()) { // skip comment - case "#comment": + case "#comment" : lineindex++; break; - + // process name // do not increase lineindex as that is done in called method - case "#name": + case "#name" : TimetablePool newPool = new TimetablePool(poolInfo, ref lineindex, simulator); // store if valid pool if (!String.IsNullOrEmpty(newPool.PoolName)) @@ -97,7 +97,7 @@ public PoolInfo(Simulator simulatorref) } break; - default: + default : if (!String.IsNullOrEmpty(poolInfo.Strings[lineindex][0])) { Trace.TraceInformation("Invalid definition in file " + filePath + " at line " + lineindex + " : " + diff --git a/Source/Orts.Simulation/Simulation/Timetables/ProcessTimetable.cs b/Source/Orts.Simulation/Simulation/Timetables/ProcessTimetable.cs index cc619c5a86..3151d24f6f 100644 --- a/Source/Orts.Simulation/Simulation/Timetables/ProcessTimetable.cs +++ b/Source/Orts.Simulation/Simulation/Timetables/ProcessTimetable.cs @@ -25,11 +25,6 @@ // -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; using Orts.Formats.Msts; using Orts.Formats.OR; using Orts.Parsers.OR; @@ -39,6 +34,11 @@ using Orts.Simulation.RollingStocks.SubSystems; using Orts.Simulation.Signalling; using ORTS.Common; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; using Event = Orts.Common.Event; namespace Orts.Simulation.Timetables @@ -1508,7 +1508,7 @@ public TTTrainInfo(int icolumn, string trainName, Simulator simulator, int index { TTTrain.TransferTrainDetails.Add(-1, newList); // set key to -1 to work out reference later } - } + } break; case "activate": @@ -1823,7 +1823,7 @@ public void ExtractStartTime(string startString, string consistInfo, Simulator s break; // activated : set activated flag - case "activated": + case "activated" : activationRequired = true; break; @@ -1934,7 +1934,7 @@ public void ExtractStartTime(string startString, string consistInfo, Simulator s if (activationRequired && !String.IsNullOrEmpty(createFromPool)) { activationRequired = false; - Trace.TraceInformation("Trigger activation not allowed when starting from pool, trigger activation reset for train {0}", TTTrain.Name); + Trace.TraceInformation("Trigger activation not allowed when starting from pool, trigger activation reset for train {0}", TTTrain.Name); } } @@ -2448,7 +2448,7 @@ public void AddWagons(ConsistFile consistFile, consistInfo consistDetails, strin wagonFilePath = Path.ChangeExtension(wagonFilePath, ".eng"); else if (wagon.IsEOT) { - wagonFolder = simulator.BasePath + @"\trains\orts_eot\" + wagon.Folder; + wagonFolder = simulator.BasePath + @"\trains\orts_eot\" + wagon.Folder; wagonFilePath = wagonFolder + @"\" + wagon.Name + ".eot"; } @@ -2575,7 +2575,7 @@ public StopInfo ProcessStopInfo(string stationInfo, StationInfo stationDetails) newStop.Commands = new List(); } - newStop.Commands.Add(new TTTrainCommands(String.Concat("stoptime=", stationDetails.actMinStopTime.Value.ToString().Trim()))); + newStop.Commands.Add(new TTTrainCommands(String.Concat("stoptime=",stationDetails.actMinStopTime.Value.ToString().Trim()))); } // process restrict to signal @@ -3418,7 +3418,7 @@ public bool BuildStopInfo(TTTrain actTrain, int actPlatformID, Signals signalRef // create station stop info validStop = actTrain.CreateStationStop(actPlatformID, arrivalTime, departureTime, arrivalDT, departureDT, AITrain.clearingDistanceM, - AITrain.minStopDistanceM, terminal, actMinStopTime, keepClearFront, keepClearRear, forcePosition, closeupSignal, closeup, restrictPlatformToSignal, extendPlatformToSignal, endStop); + AITrain.minStopDistanceM, terminal, actMinStopTime,keepClearFront, keepClearRear, forcePosition, closeupSignal, closeup, restrictPlatformToSignal, extendPlatformToSignal, endStop); // override holdstate using stop info - but only if exit signal is defined diff --git a/Source/Orts.Simulation/Simulation/Timetables/TTPool.cs b/Source/Orts.Simulation/Simulation/Timetables/TTPool.cs index f83c8d0718..cffaf93d88 100644 --- a/Source/Orts.Simulation/Simulation/Timetables/TTPool.cs +++ b/Source/Orts.Simulation/Simulation/Timetables/TTPool.cs @@ -26,11 +26,11 @@ using System.IO; using System.Linq; using System.Text; -using Orts.Parsers.OR; using Orts.Simulation.AIs; using Orts.Simulation.Physics; using Orts.Simulation.RollingStocks; using Orts.Simulation.Signalling; +using Orts.Parsers.OR; using ORTS.Common; namespace Orts.Simulation.Timetables @@ -41,12 +41,12 @@ namespace Orts.Simulation.Timetables /// public class Poolholder { - public Dictionary Pools; + public Dictionary Pools; /// /// loader for timetable mode /// - public Poolholder(Simulator simulatorref, string[] arguments, CancellationToken cancellation) + public Poolholder (Simulator simulatorref, string[] arguments, CancellationToken cancellation) { // process pools PoolInfo TTPool = new PoolInfo(simulatorref); @@ -83,7 +83,7 @@ public Poolholder(BinaryReader inf, Simulator simulatorref) int nopools = inf.ReadInt32(); if (nopools > 0) - { + { Pools = new Dictionary(); for (int iPool = 0; iPool < nopools; iPool++) { @@ -115,7 +115,7 @@ public Poolholder(BinaryReader inf, Simulator simulatorref) /// Save /// /// - public void Save(BinaryWriter outf) + public void Save (BinaryWriter outf) { if (Pools == null) { @@ -330,7 +330,7 @@ public TimetablePool(BinaryReader inf, Simulator simulatorref) newPool.TableVectorIndex = inf.ReadInt32(); newPool.TableMiddleEntry = inf.ReadSingle(); newPool.TableMiddleExit = inf.ReadSingle(); - + newPool.RemLength = inf.ReadSingle(); maxStorage = inf.ReadInt32(); @@ -827,7 +827,7 @@ virtual public Train.TCSubpathRoute SetPoolExit(TTTrain train, out int poolStora { // new route Train.TCSubpathRoute newRoute = null; - poolStorageState = (int)TTTrain.PoolAccessState.PoolInvalid; + poolStorageState = (int) TTTrain.PoolAccessState.PoolInvalid; // set dispose states train.FormsStatic = true; @@ -1280,7 +1280,7 @@ virtual public TrainFromPool ExtractTrain(ref TTTrain train, int presentTime) if (ForceCreation) { - Trace.TraceInformation("Train request : " + train.Name + " from pool " + PoolName + + Trace.TraceInformation("Train request : " + train.Name + " from pool " + PoolName + " : no engines available in pool, engine is created, at " + moveTimeA.ToString("HH:mm:ss") + "\n"); #if DEBUG_POOLINFO sob = new StringBuilder(); @@ -1291,7 +1291,7 @@ virtual public TrainFromPool ExtractTrain(ref TTTrain train, int presentTime) } else { - Trace.TraceInformation("Train request : " + train.Name + " from pool " + PoolName + + Trace.TraceInformation("Train request : " + train.Name + " from pool " + PoolName + " : no engines available in pool, engine is not created , at " + moveTimeA.ToString("HH:mm:ss") + "\n"); #if DEBUG_POOLINFO sob = new StringBuilder(); @@ -1466,7 +1466,7 @@ virtual public TrainFromPool ExtractTrain(ref TTTrain train, int presentTime) train.OrgAINumber = train.Number; train.Number = 0; train.LeadLocomotiveIndex = selectedTrain.LeadLocomotiveIndex; - for (int carid = 0; carid < train.Cars.Count; carid++) + for (int carid = 0; carid < train.Cars.Count; carid++ ) { train.Cars[carid].CarID = selectedTrain.Cars[carid].CarID; } diff --git a/Source/Orts.Simulation/Simulation/Timetables/TTTrain.cs b/Source/Orts.Simulation/Simulation/Timetables/TTTrain.cs index 032a43fc66..3e249242dd 100644 --- a/Source/Orts.Simulation/Simulation/Timetables/TTTrain.cs +++ b/Source/Orts.Simulation/Simulation/Timetables/TTTrain.cs @@ -68,7 +68,7 @@ public class TTTrain : AITrain public string CreateInPool = String.Empty; // train is to be created in pool at start of timetable public string CreateFromPool = String.Empty; // train is to be created from pool public TimetablePool.PoolExitDirectionEnum CreatePoolDirection = TimetablePool.PoolExitDirectionEnum.Undefined; - // required direction on leaving pool (if applicable) + // required direction on leaving pool (if applicable) public string ForcedConsistName = String.Empty; // forced consist name for extraction from pool public string ttanalysisreport = String.Empty; // string holding last analysis report, to avoid continouos output of same string @@ -104,7 +104,7 @@ public enum PoolAccessState // used to ind public int PoolStorageIndex = -1; // index in selected pool path (>=0) public TimetablePool.PoolExitDirectionEnum PoolExitDirection = TimetablePool.PoolExitDirectionEnum.Undefined; - // required exit direction from pool (if applicable) + // required exit direction from pool (if applicable) public TimetableTurntableControl ActiveTurntable = null; //active turntable public int FormedOf = -1; //indicates out of which train this train is formed @@ -491,7 +491,7 @@ public TTTrain(Simulator simulator, BinaryReader inf, AI airef) } int totalNeedTrainTransfer = inf.ReadInt32(); - NeedTrainTransfer = new Dictionary(); + NeedTrainTransfer = new Dictionary(); for (int iNeedTransferList = 0; iNeedTransferList < totalNeedTrainTransfer; iNeedTransferList++) { @@ -837,7 +837,7 @@ public override void Save(BinaryWriter outf) } outf.Write(NeedTrainTransfer.Count); - foreach (KeyValuePair thisNeedTransfer in NeedTrainTransfer) + foreach (KeyValuePair thisNeedTransfer in NeedTrainTransfer) { outf.Write(thisNeedTransfer.Key); outf.Write(thisNeedTransfer.Value); @@ -1405,7 +1405,7 @@ public override bool PostInit() /// <\summary> public StationStop CalculateStationStop(int platformStartID, int arrivalTime, int departTime, DateTime arrivalDT, DateTime departureDT, float clearingDistanceM, - float minStopDistance, bool terminal, int? actMinStopTime, float? keepClearFront, float? keepClearRear, bool forcePosition, bool closeupSignal, + float minStopDistance, bool terminal, int? actMinStopTime, float? keepClearFront, float? keepClearRear, bool forcePosition, bool closeupSignal, bool closeup, bool restrictPlatformToSignal, bool extendPlatformToSignal, bool endStop) { int platformIndex; @@ -1462,7 +1462,7 @@ public override bool PostInit() // determine end stop position depending on direction StationStop dummyStop = CalculateStationStopPosition(thisRoute, routeIndex, thisPlatform, activeSubroute, - keepClearFront, keepClearRear, forcePosition, closeupSignal, closeup, restrictPlatformToSignal, extendPlatformToSignal, + keepClearFront, keepClearRear, forcePosition, closeupSignal, closeup, restrictPlatformToSignal, extendPlatformToSignal, terminal, platformIndex); // build and add station stop @@ -1514,7 +1514,7 @@ public override bool PostInit() /// /// public StationStop CalculateStationStopPosition(TCSubpathRoute thisRoute, int routeIndex, PlatformDetails thisPlatform, int activeSubroute, - float? keepClearFront, float? keepClearRear, bool forcePosition, bool closeupSignal, bool closeup, + float? keepClearFront, float? keepClearRear, bool forcePosition, bool closeupSignal, bool closeup, bool restrictPlatformToSignal, bool ExtendPlatformToSignal, bool terminal, int platformIndex) { StationStop dummyStop = new StationStop(); @@ -1854,7 +1854,7 @@ public override bool PostInit() TrackCircuitSection followingSection = signalRef.TrackCircuitList[endSectionIndex]; float remLength = followingSection.Length - endOffset; - for (int iSection = lastRouteIndex + 1; iSection < thisRoute.Count; iSection++) + for (int iSection = lastRouteIndex + 1; iSection < thisRoute.Count; iSection++ ) { followingSection = signalRef.TrackCircuitList[thisRoute[iSection].TCSectionIndex]; remLength += followingSection.Length; @@ -2104,7 +2104,7 @@ public override bool PostInit() /// /// public bool CreateStationStop(int platformStartID, int arrivalTime, int departTime, DateTime arrivalDT, DateTime departureDT, float clearingDistanceM, - float minStopDistanceM, bool terminal, int? actMinStopTime, float? keepClearFront, float? keepClearRear, bool forcePosition, bool closeupSignal, + float minStopDistanceM, bool terminal, int? actMinStopTime, float? keepClearFront, float? keepClearRear, bool forcePosition, bool closeupSignal, bool closeup, bool restrictPlatformToSignal, bool extendPlatformToSignal, bool endStop) { StationStop thisStation = CalculateStationStop(platformStartID, arrivalTime, departTime, arrivalDT, departureDT, clearingDistanceM, @@ -2303,7 +2303,7 @@ public override bool CheckStationPosition(PlatformDetails thisPlatform, int stat { atStation = true; } - + return (atStation); } @@ -2436,7 +2436,7 @@ public void RecalculateStationStops(bool atStation) PlatformDetails thisPlatform = actualStation.PlatformItem; StationStop newStop = CalculateStationStopPosition(TCRoute.TCRouteSubpaths[actualStation.SubrouteIndex], actualStation.RouteIndex, actualStation.PlatformItem, - actualStation.SubrouteIndex, actualStation.KeepClearFront, actualStation.KeepClearRear, actualStation.ForcePosition, + actualStation.SubrouteIndex, actualStation.KeepClearFront, actualStation.KeepClearRear, actualStation.ForcePosition, actualStation.CloseupSignal, actualStation.Closeup, actualStation.RestrictPlatformToSignal, actualStation.ExtendPlatformToSignal, actualStation.Terminal, actualStation.PlatformReference); @@ -3134,7 +3134,7 @@ public override void SetReversalAction() { return; // station stop required - reversal not valid } - + if (nextActionInfo != null && nextActionInfo.NextAction == AIActionItem.AI_ACTION_TYPE.REVERSAL) { return; // other reversal still active - reversal not valid @@ -3391,7 +3391,7 @@ public override AITrain.AI_MOVEMENT_STATE UpdateStoppedState(float elapsedClockS } - // Other node mode : check distance ahead (path may have cleared) + // Other node mode : check distance ahead (path may have cleared) else if (ControlMode == TRAIN_CONTROL.AUTO_NODE) { @@ -3411,7 +3411,7 @@ public override AITrain.AI_MOVEMENT_STATE UpdateStoppedState(float elapsedClockS } } - // signal node : check state of signal + // signal node : check state of signal else if (ControlMode == TRAIN_CONTROL.AUTO_SIGNAL) { @@ -3567,7 +3567,7 @@ public override AITrain.AI_MOVEMENT_STATE UpdateStoppedState(float elapsedClockS { File.AppendAllText(@"C:\temp\checktrain.txt", "Train " + Number.ToString() + " , forced to BRAKING from invalid stop (now at " + - // FormatStrings.FormatDistance(PresentPosition[0].DistanceTravelledM, true) + ")\n"); + // FormatStrings.FormatDistance(PresentPosition[0].DistanceTravelledM, true) + ")\n"); PresentPosition[0].DistanceTravelledM.ToString() + ")\n"); } } @@ -4246,7 +4246,7 @@ public override void UpdateBrakingState(float elapsedClockSeconds, int presentTi } } - // check if speedlimit on signal is cleared + // check if speedlimit on signal is cleared else if (nextActionInfo.NextAction == AIActionItem.AI_ACTION_TYPE.SPEED_SIGNAL) { @@ -4271,8 +4271,8 @@ public override void UpdateBrakingState(float elapsedClockSeconds, int presentTi nextActionInfo.ActiveItem.ObjectDetails.thisRef.ToString() + " : speed : " + FormatStrings.FormatSpeed(nextActionInfo.ActiveItem.actual_speed, true) + " >= limit : " + FormatStrings.FormatSpeed(AllowedMaxSpeedMpS, true) + " at " + - //FormatStrings.FormatDistance(nextActionInfo.ActivateDistanceM, true) + " (now at " + - //FormatStrings.FormatDistance(PresentPosition[0].DistanceTravelledM, true) + " - " + + //FormatStrings.FormatDistance(nextActionInfo.ActivateDistanceM, true) + " (now at " + + //FormatStrings.FormatDistance(PresentPosition[0].DistanceTravelledM, true) + " - " + nextActionInfo.ActivateDistanceM.ToString() + " (now at " + PresentPosition[0].DistanceTravelledM.ToString() + " - " + FormatStrings.FormatSpeed(SpeedMpS, true) + ")\n"); @@ -4304,7 +4304,7 @@ public override void UpdateBrakingState(float elapsedClockSeconds, int presentTi } } - // check if STOP signal cleared + // check if STOP signal cleared else if (nextActionInfo.NextAction == AIActionItem.AI_ACTION_TYPE.SIGNAL_ASPECT_STOP) { @@ -4326,8 +4326,8 @@ public override void UpdateBrakingState(float elapsedClockSeconds, int presentTi File.AppendAllText(@"C:\temp\checktrain.txt", "Train " + Number.ToString() + " : signal " + nextActionInfo.ActiveItem.ObjectDetails.thisRef.ToString() + " at " + - //FormatStrings.FormatDistance(nextActionInfo.ActivateDistanceM, true) + " cleared (now at " + - //FormatStrings.FormatDistance(PresentPosition[0].DistanceTravelledM, true) + " - " + + //FormatStrings.FormatDistance(nextActionInfo.ActivateDistanceM, true) + " cleared (now at " + + //FormatStrings.FormatDistance(PresentPosition[0].DistanceTravelledM, true) + " - " + nextActionInfo.ActivateDistanceM.ToString() + " cleared (now at " + PresentPosition[0].DistanceTravelledM.ToString() + " - " + FormatStrings.FormatSpeed(SpeedMpS, true) + ")\n"); @@ -4353,8 +4353,8 @@ public override void UpdateBrakingState(float elapsedClockSeconds, int presentTi File.AppendAllText(@"C:\temp\checktrain.txt", Number.ToString() + " : signal " + nextActionInfo.ActiveItem.ObjectDetails.thisRef.ToString() + " at " + - //FormatStrings.FormatDistance(nextActionInfo.ActivateDistanceM, true) + " cleared (now at " + - //FormatStrings.FormatDistance(PresentPosition[0].DistanceTravelledM, true) + " - " + + //FormatStrings.FormatDistance(nextActionInfo.ActivateDistanceM, true) + " cleared (now at " + + //FormatStrings.FormatDistance(PresentPosition[0].DistanceTravelledM, true) + " - " + nextActionInfo.ActivateDistanceM.ToString() + " cleared (now at " + PresentPosition[0].DistanceTravelledM.ToString() + " - " + FormatStrings.FormatSpeed(SpeedMpS, true) + ")\n"); @@ -4363,7 +4363,7 @@ public override void UpdateBrakingState(float elapsedClockSeconds, int presentTi } } - // check if RESTRICTED signal cleared + // check if RESTRICTED signal cleared else if (nextActionInfo.NextAction == AIActionItem.AI_ACTION_TYPE.SIGNAL_ASPECT_RESTRICTED) { @@ -4385,8 +4385,8 @@ public override void UpdateBrakingState(float elapsedClockSeconds, int presentTi File.AppendAllText(@"C:\temp\checktrain.txt", Number.ToString() + " : signal " + nextActionInfo.ActiveItem.ObjectDetails.thisRef.ToString() + " at " + - //FormatStrings.FormatDistance(nextActionInfo.ActivateDistanceM, true) + " cleared (now at " + - //FormatStrings.FormatDistance(PresentPosition[0].DistanceTravelledM, true) + " - " + + //FormatStrings.FormatDistance(nextActionInfo.ActivateDistanceM, true) + " cleared (now at " + + //FormatStrings.FormatDistance(PresentPosition[0].DistanceTravelledM, true) + " - " + nextActionInfo.ActivateDistanceM.ToString() + " cleared (now at " + PresentPosition[0].DistanceTravelledM.ToString() + " - " + FormatStrings.FormatSpeed(SpeedMpS, true) + ")\n"); @@ -4394,7 +4394,7 @@ public override void UpdateBrakingState(float elapsedClockSeconds, int presentTi } } - // check if END_AUTHORITY extended + // check if END_AUTHORITY extended else if (nextActionInfo.NextAction == AIActionItem.AI_ACTION_TYPE.END_OF_AUTHORITY) { @@ -4561,7 +4561,7 @@ public override void UpdateBrakingState(float elapsedClockSeconds, int presentTi } } - // perform slow approach to stop + // perform slow approach to stop else if (distanceToGoM > 0) { if (AITrainBrakePercent < 50) @@ -4603,7 +4603,7 @@ public override void UpdateBrakingState(float elapsedClockSeconds, int presentTi } } - // check if approaching reversal point + // check if approaching reversal point else if (nextActionInfo.NextAction == AIActionItem.AI_ACTION_TYPE.REVERSAL) { @@ -5144,7 +5144,7 @@ public override void UpdateFollowingState(float elapsedClockSeconds, int present File.AppendAllText(@"C:\temp\checktrain.txt", "Update Train Ahead - now at : " + PresentPosition[0].TCSectionIndex.ToString() + " " + - // FormatStrings.FormatDistance(PresentPosition[0].TCOffset, true) + + // FormatStrings.FormatDistance(PresentPosition[0].TCOffset, true) + PresentPosition[0].TCOffset.ToString() + " ; speed : " + FormatStrings.FormatSpeed(SpeedMpS, true) + "\n"); } @@ -5250,11 +5250,11 @@ public override void UpdateFollowingState(float elapsedClockSeconds, int present File.AppendAllText(@"C:\temp\checktrain.txt", "Other train : " + OtherTrain.Number.ToString() + " at : " + OtherTrain.PresentPosition[0].TCSectionIndex.ToString() + " " + - // FormatStrings.FormatDistance(OtherTrain.PresentPosition[0].TCOffset, true) + + // FormatStrings.FormatDistance(OtherTrain.PresentPosition[0].TCOffset, true) + OtherTrain.PresentPosition[0].TCOffset.ToString() + " ; speed : " + FormatStrings.FormatSpeed(OtherTrain.SpeedMpS, true) + "\n"); File.AppendAllText(@"C:\temp\checktrain.txt", - // "DistAhd: " + FormatStrings.FormatDistance(DistanceToEndNodeAuthorityM[0], true) + "\n"); + // "DistAhd: " + FormatStrings.FormatDistance(DistanceToEndNodeAuthorityM[0], true) + "\n"); "DistAhd: " + DistanceToEndNodeAuthorityM[0].ToString() + "\n"); } @@ -5676,7 +5676,7 @@ public override void UpdateRunningState(float elapsedClockSeconds) { if (CheckTrain) { - File.AppendAllText(@"C:\temp\checktrain.txt", "Section : > AllowedMaxSpeedMps \n"); + File.AppendAllText(@"C:\temp\checktrain.txt","Section : > AllowedMaxSpeedMps \n"); } if (AITrainThrottlePercent > 0) @@ -7300,7 +7300,7 @@ public bool CheckTransfer(TTTrain otherTrain, ref int? stationTransferIndex, ref transferTrain = true; trainTransferIndex = otherTrain.OrgAINumber; } - + // if found, no need to look any further if (transferTrain) { @@ -8430,7 +8430,7 @@ public void ProcessWaitRequest(WaitInfo reqWait, TTTrain otherTrain, bool allowS // if same direction and atStart not set also use next section as start for common section search // if same direction and atStart is set use first section as start for common section search as train is to wait in this section lastIndex++; - if (!sameDirection || !atStart) + if (!sameDirection || !atStart) { thisTrainStartRouteIndex = lastIndex; } @@ -11558,7 +11558,7 @@ public int GetUnitsToDetach(DetachInfo.DetachUnitsInfo detachUnits, int numberOf case DetachInfo.DetachUnitsInfo.consists: bool inConsist = false; - + // check if front must be detached if (detachConsist.Contains(Cars[0].OrgConsist)) { @@ -12687,7 +12687,7 @@ public int CreateStaticTrain(TTTrain train, ref List trainList, string formedTrain.AI = train.AI; trainList.Add(formedTrain); - return (formedTrain.Number); + return(formedTrain.Number); } //================================================================================================// @@ -13347,7 +13347,7 @@ public enum DetachUnitsInfo /// /// /// - public DetachInfo(bool atStart, bool atEnd, bool atStation, int sectionIndex, bool leadingPower, bool allLeadingPower, bool trailingPower, bool allTrailingPower, + public DetachInfo(bool atStart, bool atEnd, bool atStation, int sectionIndex, bool leadingPower, bool allLeadingPower, bool trailingPower, bool allTrailingPower, bool onlyPower, bool nonPower, int units, int? time, int formedTrain, bool reverseTrain) { if (atStart) @@ -13760,7 +13760,7 @@ public bool PerformDetach(TTTrain train, bool allowPlayerSelect) // create dummy train - train will be removed but timetable can continue newTrain = new TTTrain(train.AI.Simulator, train); newTrain.AI = train.AI; // set AT as Simulator.AI does not exist in prerun mode - newTrain.ValidRoute[0] = train.signalRef.BuildTempRoute(newTrain, train.PresentPosition[0].TCSectionIndex, + newTrain.ValidRoute[0] = train.signalRef.BuildTempRoute(newTrain, train.PresentPosition[0].TCSectionIndex, train.PresentPosition[0].TCOffset, train.PresentPosition[0].TCDirection, train.Length, true, true, false); train.PresentPosition[0].CopyTo(ref newTrain.PresentPosition[0]); train.PresentPosition[1].CopyTo(ref newTrain.PresentPosition[1]); @@ -13951,7 +13951,7 @@ public bool PerformDetach(TTTrain train, bool allowPlayerSelect) } } - return (true); + return(true); } //================================================================================================// @@ -14550,12 +14550,12 @@ public PickUpInfo(int stationPlatformReference, TTTrainCommands thisCommand, TTT { switch (thisCommand.CommandQualifiers[0].QualifierName) { - case "static": + case "static" : PickUpStatic = true; StationPlatformReference = stationPlatformReference; break; - default: + default : Trace.TraceInformation("Train : {0} : unknown pickup qualifier : {1}", thisTrain.Name, thisCommand.CommandQualifiers[0].QualifierName); break; } @@ -14753,12 +14753,12 @@ public TransferInfo(int stationPlatformReference, TTTrainCommands thisCommand, T switch (thisCommand.CommandQualifiers[0].QualifierName) { // static is allowed, will be inserted with key -99 - case "static": + case "static" : TransferTrain = -99; break; // other qualifiers processed below - default: + default : break; } } @@ -14891,7 +14891,7 @@ public TransferInfo(int stationPlatformReference, TTTrainCommands thisCommand, T /// public TransferInfo(BinaryReader inf) { - TypeOfTransfer = (TransferType)inf.ReadInt32(); + TypeOfTransfer = (TransferType) inf.ReadInt32(); TransferUnitsInfo = (DetachInfo.DetachUnitsInfo)inf.ReadInt32(); TransferUnitCount = inf.ReadInt32(); @@ -15275,7 +15275,7 @@ public void SetTransferXRef(TTTrain dettrain, List trainList, TTTrain p transferTrain = playerTrain; trainFound = true; } - } + } // issue warning if train not found if (!trainFound) diff --git a/Source/Orts.Simulation/Simulation/Timetables/TTTurntable.cs b/Source/Orts.Simulation/Simulation/Timetables/TTTurntable.cs index a7afc8ca8c..d2d8a7e6e5 100644 --- a/Source/Orts.Simulation/Simulation/Timetables/TTTurntable.cs +++ b/Source/Orts.Simulation/Simulation/Timetables/TTTurntable.cs @@ -22,17 +22,18 @@ // #define DEBUG_TURNTABLEINFO // +using Microsoft.Xna.Framework; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; -using Microsoft.Xna.Framework; -using Orts.Parsers.OR; +using System.Text; using Orts.Simulation.AIs; using Orts.Simulation.Physics; using Orts.Simulation.RollingStocks; using Orts.Simulation.Signalling; +using Orts.Parsers.OR; using ORTS.Common; namespace Orts.Simulation.Timetables @@ -921,7 +922,7 @@ public override bool TestPoolExit(TTTrain train) return (validPath); } public bool TestPoolAccess(TTTrain train, out int accessIndex) - { + { bool validPool = false; int reqPath = -1; int reqPathIndex = -1; @@ -2178,7 +2179,7 @@ public int GetAccessPathIndex() // search if section in access path // direction must be reverse as access path is defined outbound int reqPath = -1; - for (int iPath = 0; iPath <= parentPool.AdditionalTurntableDetails.AccessPaths.Count - 1 && reqPath < 0; iPath++) + for (int iPath=0; iPath <= parentPool.AdditionalTurntableDetails.AccessPaths.Count - 1 && reqPath < 0; iPath++) { int routeIndex = parentPool.AdditionalTurntableDetails.AccessPaths[iPath].AccessPath.GetRouteIndex(presentSection, 0); if (routeIndex >= 0 && parentPool.AdditionalTurntableDetails.AccessPaths[iPath].AccessPath[routeIndex].Direction != presentDirection) @@ -2233,7 +2234,7 @@ public int GetAccessPathIndex() if (parentTurntable.TrainsOnMovingTable.Count > 0) { PrepareMoveOffTable(); - } + } return (true); } @@ -2369,7 +2370,7 @@ public int GetAccessPathIndex() } // rotate clockwise or counterclockwise depending on angle - if (angleToMove < 0) + if ( angleToMove < 0) { parentTurntable.AutoCounterclockwise = true; #if DEBUG_TURNTABLEINFO @@ -2823,7 +2824,7 @@ public void RemoveTrainFromTurntable() //================================================================================================// - public bool TestTrainFormation(TTTrain parentTrain) + public bool TestTrainFormation (TTTrain parentTrain) { bool reqReverse = true; diff --git a/Source/Orts.Simulation/Simulation/Transfertables.cs b/Source/Orts.Simulation/Simulation/Transfertables.cs index 84e399fd6b..9bf0abb633 100644 --- a/Source/Orts.Simulation/Simulation/Transfertables.cs +++ b/Source/Orts.Simulation/Simulation/Transfertables.cs @@ -15,15 +15,19 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.IO; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Orts.Parsers.Msts; +using ORTS.Common; +using Orts.Formats.Msts; using Orts.Simulation.Physics; using Orts.Simulation.RollingStocks; using Orts.Simulation.Signalling; -using ORTS.Common; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; namespace Orts.Simulation { @@ -33,7 +37,7 @@ namespace Orts.Simulation /// - + public class Transfertable : MovingTable { public float Span; // horizontal or vertical @@ -58,17 +62,17 @@ public float OffsetDiff public Signals signalRef { get; protected set; } - public Transfertable(STFReader stf, Simulator simulator) : base(stf, simulator) + public Transfertable(STFReader stf, Simulator simulator): base(stf, simulator) { signalRef = Simulator.Signals; string animation; WorldPosition.XNAMatrix.M44 = 100000000; //WorlPosition not yet defined, will be loaded when loading related tile stf.MustMatch("("); - stf.ParseBlock(new[] { + stf.ParseBlock(new[] { new STFReader.TokenProcessor("wfile", ()=>{ WFile = stf.ReadStringBlock(null); WorldPosition.TileX = int.Parse(WFile.Substring(1, 7)); - WorldPosition.TileZ = int.Parse(WFile.Substring(8, 7)); + WorldPosition.TileZ = int.Parse(WFile.Substring(8, 7)); }), new STFReader.TokenProcessor("uid", ()=>{ UID = stf.ReadIntBlock(-1); }), new STFReader.TokenProcessor("animation", ()=>{ animation = stf.ReadStringBlock(null); @@ -320,13 +324,13 @@ public void GeneralStartContinuous(bool isForward) RelativeRearTravellerXNALocation = Vector3.Transform(XNALocation, invAnimationXNAMatrix); train.ControlMode = Train.TRAIN_CONTROL.TURNTABLE; } - Simulator.Confirmer.Information(Simulator.Catalog.GetStringFmt("Transfertable starting transferring train")); + Simulator.Confirmer.Information (Simulator.Catalog.GetStringFmt("Transfertable starting transferring train")); // Computing position of cars relative to center of transfertable - } - Forward = isForward; - Reverse = !isForward; - Continuous = true; + } + Forward = isForward; + Reverse = !isForward; + Continuous = true; } public void ComputeCenter(WorldPosition worldPosition) @@ -389,12 +393,12 @@ public override void Update() Connected = true; Forward = false; ConnectedTrackEnd = ConnectedTarget; - Simulator.Confirmer.Information(Simulator.Catalog.GetStringFmt("Transfertable connected")); + Simulator.Confirmer.Information (Simulator.Catalog.GetStringFmt("Transfertable connected")); GoToTarget = true; TargetOffset = Offsets[ConnectedTarget]; } } - } + } else if (Reverse) { Connected = false; @@ -421,7 +425,7 @@ public override void Update() public void TargetExactlyReached() { Traveller.TravellerDirection direction = Traveller.TravellerDirection.Forward; - direction = SaveConnected ^ !MyTrackNodesOrientation[ConnectedTrackEnd] ? direction : (direction == Traveller.TravellerDirection.Forward ? Traveller.TravellerDirection.Backward : Traveller.TravellerDirection.Forward); + direction = SaveConnected ^ !MyTrackNodesOrientation[ConnectedTrackEnd]? direction : (direction == Traveller.TravellerDirection.Forward ? Traveller.TravellerDirection.Backward : Traveller.TravellerDirection.Forward); GoToTarget = false; if (TrainsOnMovingTable.Count == 1) { @@ -441,7 +445,7 @@ public override bool CheckMovingTableAligned(Train train, bool forward) if ((Connected) && MyTrVectorSectionsIndex[ConnectedTrackEnd] != -1 && MyTrackNodesIndex[ConnectedTrackEnd] != -1 && (MyTrackNodesIndex[ConnectedTrackEnd] == train.FrontTDBTraveller.TN.Index || MyTrackNodesIndex[ConnectedTrackEnd] == train.RearTDBTraveller.TN.Index)) { - return true; + return true; } return false; } @@ -450,7 +454,7 @@ public override bool CheckMovingTableAligned(Train train, bool forward) /// PerformUpdateActions: actions to be performed at every animation step /// /// - public void PerformUpdateActions(Matrix absAnimationMatrix, WorldPosition worldPosition) + public void PerformUpdateActions ( Matrix absAnimationMatrix, WorldPosition worldPosition ) { TransferTrain(absAnimationMatrix); if (GoToTarget && TrainsOnMovingTable.Count == 1 && TrainsOnMovingTable[0].Train.ControlMode == Train.TRAIN_CONTROL.TURNTABLE) diff --git a/Source/Orts.Simulation/Simulation/Traveller.cs b/Source/Orts.Simulation/Simulation/Traveller.cs index 2fcd5bc9cb..bce40933eb 100644 --- a/Source/Orts.Simulation/Simulation/Traveller.cs +++ b/Source/Orts.Simulation/Simulation/Traveller.cs @@ -15,15 +15,15 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using Microsoft.Xna.Framework; +using Orts.Formats.Msts; +using Orts.Simulation.AIs; +using ORTS.Common; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; -using Microsoft.Xna.Framework; -using Orts.Formats.Msts; -using Orts.Simulation.AIs; -using ORTS.Common; namespace Orts.Simulation { @@ -292,7 +292,7 @@ public Traveller(TrackSectionsFile tSectionDat, TrackNode[] trackNodes, TrackNod { throw new MissingTrackNodeException(); } - + } // Figure out which end of the track node is closest and use that. diff --git a/Source/Orts.Simulation/Simulation/Turntables.cs b/Source/Orts.Simulation/Simulation/Turntables.cs index b6f537c1ee..358a8cce1c 100644 --- a/Source/Orts.Simulation/Simulation/Turntables.cs +++ b/Source/Orts.Simulation/Simulation/Turntables.cs @@ -15,16 +15,19 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Orts.Parsers.Msts; +using ORTS.Common; +using Orts.Formats.Msts; using Orts.Simulation.Physics; using Orts.Simulation.RollingStocks; using Orts.Simulation.Signalling; -using ORTS.Common; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; namespace Orts.Simulation { @@ -145,7 +148,7 @@ private void SaveVector(BinaryWriter outf, Vector3 vector) outf.Write(vector.Z); } - /// + /// /// Restores the general variable parameters /// Called from within the Simulator class. /// @@ -304,7 +307,7 @@ public bool CheckTrainOnMovingTable(Train train) } - public virtual void StartContinuous(bool isClockwise) + public virtual void StartContinuous (bool isClockwise) { } @@ -840,7 +843,7 @@ public override void Update() public void TargetExactlyReached() { Traveller.TravellerDirection direction = ForwardConnected ? Traveller.TravellerDirection.Forward : Traveller.TravellerDirection.Backward; - direction = SaveForwardConnected ^ !MyTrackNodesOrientation[ConnectedTrackEnd] ? direction : (direction == Traveller.TravellerDirection.Forward ? Traveller.TravellerDirection.Backward : Traveller.TravellerDirection.Forward); + direction = SaveForwardConnected ^ !MyTrackNodesOrientation[ConnectedTrackEnd]? direction : (direction == Traveller.TravellerDirection.Forward ? Traveller.TravellerDirection.Backward : Traveller.TravellerDirection.Forward); GoToTarget = false; if (TrainsOnMovingTable.Count == 1) { @@ -861,8 +864,8 @@ public override bool CheckMovingTableAligned(Train train, bool forward) if ((ForwardConnected || RearConnected) && MyTrVectorSectionsIndex[ConnectedTrackEnd] != -1 && MyTrackNodesIndex[ConnectedTrackEnd] != -1 && (MyTrackNodesIndex[ConnectedTrackEnd] == train.FrontTDBTraveller.TN.Index || MyTrackNodesIndex[ConnectedTrackEnd] == train.RearTDBTraveller.TN.Index)) { - direction = ForwardConnected ? Traveller.TravellerDirection.Forward : Traveller.TravellerDirection.Backward; - return true; + direction = ForwardConnected ? Traveller.TravellerDirection.Forward : Traveller.TravellerDirection.Backward; + return true; } direction = Traveller.TravellerDirection.Forward; return false; @@ -897,7 +900,7 @@ public bool CheckOnSection(Traveller trainPosition) /// PerformUpdateActions: actions to be performed at every animation step /// /// - public void PerformUpdateActions(Matrix absAnimationMatrix) + public void PerformUpdateActions ( Matrix absAnimationMatrix) { RotateTrain(absAnimationMatrix); if ((GoToTarget || GoToAutoTarget) && TrainsOnMovingTable.Count == 1 && TrainsOnMovingTable[0].Train.ControlMode == Train.TRAIN_CONTROL.TURNTABLE) @@ -915,7 +918,7 @@ public class TrainOnMovingTable public bool BackOnBoard; public Simulator Simulator; - public TrainOnMovingTable(Train train, Simulator simulator) + public TrainOnMovingTable (Train train, Simulator simulator) { Train = train; Simulator = simulator; @@ -926,7 +929,7 @@ public TrainOnMovingTable(Simulator simulator) Simulator = simulator; } - public void Save(BinaryWriter outf) + public void Save (BinaryWriter outf) { outf.Write(Train.Number); outf.Write(FrontOnBoard); @@ -940,7 +943,7 @@ public void Restore(BinaryReader inf) BackOnBoard = inf.ReadBoolean(); } - public void SetFrontState(bool frontOnBoard) + public void SetFrontState (bool frontOnBoard) { FrontOnBoard = frontOnBoard; } diff --git a/Source/Orts.Simulation/Simulation/Weather.cs b/Source/Orts.Simulation/Simulation/Weather.cs index 7d388dfc46..2d6fff3cbe 100644 --- a/Source/Orts.Simulation/Simulation/Weather.cs +++ b/Source/Orts.Simulation/Simulation/Weather.cs @@ -16,6 +16,8 @@ // along with Open Rails. If not, see . using Microsoft.Xna.Framework; +using System; +using System.Diagnostics; namespace Orts.Simulation { @@ -36,18 +38,18 @@ public class Weather // Overcast factor: 0.0 = almost no clouds; 0.1 = wispy clouds; 1.0 = total overcast. public float OvercastFactor; - + // Pricipitation intensity in particles per second per meter^2 (PPSPM2). public float PricipitationIntensityPPSPM2; - + // Fog/visibility distance. Ranges from 10m (can't see anything), 5km (medium), 20km (clear) to 100km (clear arctic). public float FogDistance; - + // Precipitation liquidity; =1 for rain, =0 for snow; intermediate values possible with dynamic weather; public float PrecipitationLiquidity; public float CalculatedWindDirection; public Vector2 WindSpeedMpS = new Vector2(); - public float WindSpeed { get { return WindSpeedMpS.Length(); } } + public float WindSpeed {get { return WindSpeedMpS.Length(); } } // public float WindDirection { get { return (float)Math.Atan2(WindSpeedMpS.X, WindSpeedMpS.Y); } } public float WindDirection { get { return CalculatedWindDirection; } } } diff --git a/Source/RunActivity/Processes/Profiler.cs b/Source/RunActivity/Processes/Profiler.cs index 4dc493b485..8d428efed8 100644 --- a/Source/RunActivity/Processes/Profiler.cs +++ b/Source/RunActivity/Processes/Profiler.cs @@ -17,11 +17,11 @@ // This file is the responsibility of the 3D & Environment Team. +using ORTS.Common; using System; using System.Diagnostics; using System.IO; using System.Threading; -using ORTS.Common; namespace Orts.Processes { diff --git a/Source/RunActivity/Viewer3D/ALSoundHelper.cs b/Source/RunActivity/Viewer3D/ALSoundHelper.cs index 6e3acc4eda..d486dc9a42 100644 --- a/Source/RunActivity/Viewer3D/ALSoundHelper.cs +++ b/Source/RunActivity/Viewer3D/ALSoundHelper.cs @@ -17,11 +17,11 @@ // This file is the responsibility of the 3D & Environment Team. +using Orts.Simulation.RollingStocks; using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; -using Orts.Simulation.RollingStocks; namespace Orts.Viewer3D { @@ -160,7 +160,7 @@ public bool isMine(int bufferID) { return (bufferID != 0 && BufferIDs.Any(value => bufferID == value)); } - + public bool isLast(int soundSourceID) { if (_isSingle) @@ -249,7 +249,7 @@ public bool IsCheckpoint(int soundSourceID, int bufferID, float pitch) } if (bid == -1) return false; - + int len = (int)(CheckFactor * pitch); if (BufferLens[bid] < len) return true; @@ -995,7 +995,7 @@ public void Queue(string Name, PlayMode Mode, bool isExternal, bool isReleasedWi for (int i = 1; i < 5; i++) { - prev = SoundQueue[(QueueHeader - i) % QUEUELENGHT]; + prev = SoundQueue[(QueueHeader - i) % QUEUELENGHT]; prevMode = prev.PlayMode; @@ -1107,7 +1107,7 @@ private void HardCleanQueue() if (h >= QueueTail) { int i; - for (i = h - 1; i >= QueueTail; i--) + for (i = h-1; i >= QueueTail; i--) { SoundQueue[i % QUEUELENGHT].PlayState = PlayState.NOP; } @@ -1151,7 +1151,7 @@ private void Start() public void Stop() { OpenAL.alSourceStop(SoundSourceID); - OpenAL.alSourcei(SoundSourceID, OpenAL.AL_BUFFER, OpenAL.AL_NONE); + OpenAL.alSourcei(SoundSourceID, OpenAL.AL_BUFFER, OpenAL.AL_NONE); SkipProcessed(); isPlaying = false; } @@ -1236,7 +1236,7 @@ public string[] GetPlayingData() if (SoundQueue[QueueTail % QUEUELENGHT].PlayState != PlayState.NOP) { - retval[3] = String.Format("{0} {1}{2}", + retval[3] = String.Format("{0} {1}{2}", SoundQueue[QueueTail % QUEUELENGHT].PlayState, SoundQueue[QueueTail % QUEUELENGHT].PlayMode, SoundQueue[QueueTail % QUEUELENGHT].SoftLoopPoints && SoundQueue[QueueTail % QUEUELENGHT].PlayMode == PlayMode.LoopRelease ? "Soft" : ""); diff --git a/Source/RunActivity/Viewer3D/AnimatedPart.cs b/Source/RunActivity/Viewer3D/AnimatedPart.cs index 02cccadbe2..f33240fdfc 100644 --- a/Source/RunActivity/Viewer3D/AnimatedPart.cs +++ b/Source/RunActivity/Viewer3D/AnimatedPart.cs @@ -15,11 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using Orts.Formats.Msts; +using ORTS.Common; using System; using System.Collections.Generic; using System.Linq; -using Orts.Formats.Msts; -using ORTS.Common; namespace Orts.Viewer3D { diff --git a/Source/RunActivity/Viewer3D/Cameras.cs b/Source/RunActivity/Viewer3D/Cameras.cs index 7d372c6c1e..92915e5131 100644 --- a/Source/RunActivity/Viewer3D/Cameras.cs +++ b/Source/RunActivity/Viewer3D/Cameras.cs @@ -805,7 +805,7 @@ protected internal override void Restore(BinaryReader inf) if (carIndex < Viewer.SelectedTrain.Cars.Count) attachedCar = Viewer.SelectedTrain.Cars[carIndex]; else if (Viewer.SelectedTrain.Cars.Count > 0) - attachedCar = Viewer.SelectedTrain.Cars[Viewer.SelectedTrain.Cars.Count - 1]; + attachedCar = Viewer.SelectedTrain.Cars[Viewer.SelectedTrain.Cars.Count -1]; } attachedLocation.X = inf.ReadSingle(); attachedLocation.Y = inf.ReadSingle(); @@ -1251,7 +1251,7 @@ protected void UpdateTrainBrowsing(ElapsedTime elapsedTime) { var ZIncrM = -BrowseSpeedMpS * elapsedTime.ClockSeconds; ZDistanceM += ZIncrM; - if (-ZDistanceM >= attachedCar.Train.Length - (trainCars.First().CarLengthM + trainCars.Last().CarLengthM) * 0.5f) + if (-ZDistanceM >= attachedCar.Train.Length - (trainCars.First().CarLengthM + trainCars.Last().CarLengthM) * 0.5f) { ZIncrM = -attachedCar.Train.Length + (trainCars.First().CarLengthM + trainCars.Last().CarLengthM) * 0.5f - (ZDistanceM - ZIncrM); ZDistanceM = -attachedCar.Train.Length + (trainCars.First().CarLengthM + trainCars.Last().CarLengthM) * 0.5f; @@ -1286,7 +1286,7 @@ protected void UpdateTrainBrowsing(ElapsedTime elapsedTime) else browsedTraveller.Move(elapsedTime.ClockSeconds * attachedCar.Train.SpeedMpS); } - protected void ComputeCarOffsets(TrackingCamera camera) + protected void ComputeCarOffsets( TrackingCamera camera) { var trainCars = camera.GetCameraCars(); camera.HighWagonOffsetLimit = trainCars.First().CarLengthM * 0.5f; @@ -1387,7 +1387,7 @@ public override void NextCar() HighWagonOffsetLimit += attachedCar.CarLengthM; ZDistanceM = LowWagonOffsetLimit + attachedCar.CarLengthM * 0.5f; } - // LookedAtPosition = new WorldPosition(attachedCar.WorldPosition); + // LookedAtPosition = new WorldPosition(attachedCar.WorldPosition); } public override void PreviousCar() @@ -1404,7 +1404,7 @@ public override void PreviousCar() LowWagonOffsetLimit -= attachedCar.CarLengthM; ZDistanceM = LowWagonOffsetLimit + attachedCar.CarLengthM * 0.5f; } - // LookedAtPosition = new WorldPosition(attachedCar.WorldPosition); + // LookedAtPosition = new WorldPosition(attachedCar.WorldPosition); } public override void FirstCar() @@ -1416,7 +1416,7 @@ public override void FirstCar() ZDistanceM = 0; HighWagonOffsetLimit = attachedCar.CarLengthM * 0.5f; LowWagonOffsetLimit = -attachedCar.CarLengthM * 0.5f; - // LookedAtPosition = new WorldPosition(attachedCar.WorldPosition); +// LookedAtPosition = new WorldPosition(attachedCar.WorldPosition); } public override void LastCar() @@ -1429,7 +1429,7 @@ public override void LastCar() ZDistanceM = -attachedCar.Train.Length + (trainCars.First().CarLengthM + trainCars.Last().CarLengthM) * 0.5f; LowWagonOffsetLimit = -attachedCar.Train.Length + trainCars.First().CarLengthM * 0.5f; HighWagonOffsetLimit = LowWagonOffsetLimit + attachedCar.CarLengthM; - // LookedAtPosition = new WorldPosition(attachedCar.WorldPosition); +// LookedAtPosition = new WorldPosition(attachedCar.WorldPosition); } public void ToggleBrowseBackwards() @@ -1439,7 +1439,7 @@ public void ToggleBrowseBackwards() { if (!BrowseMode) { - // LookedAtPosition = new WorldPosition(attachedCar.WorldPosition); +// LookedAtPosition = new WorldPosition(attachedCar.WorldPosition); browsedTraveller = new Traveller(attachedCar.Train.FrontTDBTraveller); browsedTraveller.Move(-attachedCar.CarLengthM * 0.5f + ZDistanceM); BrowseDistance = attachedCar.CarLengthM * 0.5f; @@ -1456,18 +1456,18 @@ public void ToggleBrowseForwards() { if (!BrowseMode) { - // LookedAtPosition = new WorldPosition(attachedCar.WorldPosition); +// LookedAtPosition = new WorldPosition(attachedCar.WorldPosition); browsedTraveller = new Traveller(attachedCar.Train.RearTDBTraveller); var trainCars = GetCameraCars(); browsedTraveller.Move((attachedCar.CarLengthM - trainCars.First().CarLengthM - trainCars.Last().CarLengthM) * 0.5f + attachedCar.Train.Length + ZDistanceM); BrowseDistance = attachedCar.CarLengthM * 0.5f; BrowseMode = true; } - } + } BrowseBackwards = false; } } - + public abstract class NonTrackingCamera : AttachedCamera { public NonTrackingCamera(Viewer viewer) @@ -1792,7 +1792,7 @@ protected override void SetCameraCar(TrainCar car) } } - protected void ResetViewPoint(TrainCar car) + protected void ResetViewPoint (TrainCar car) { prevcar = car.CarID; prevViewPoint = ActViewPoint; @@ -1813,7 +1813,7 @@ public override void HandleUserInput(ElapsedTime elapsedTime) if (UserInput.IsPressed(UserCommand.CameraChangePassengerViewPoint)) new CameraChangePassengerViewPointCommand(Viewer.Log); } - + public void SwitchSideCameraCar(TrainCar car) { attachedLocation.X = -attachedLocation.X; @@ -1977,7 +1977,7 @@ public class CabCamera : NonTrackingCamera { private readonly SavingProperty LetterboxProperty; protected int[] sideLocation = new int[2]; - public int SideLocation { get { return attachedCar == null ? sideLocation[0] : (attachedCar as MSTSLocomotive).UsingRearCab ? sideLocation[1] : sideLocation[0]; } } + public int SideLocation { get { return attachedCar == null? sideLocation[0] : (attachedCar as MSTSLocomotive).UsingRearCab ? sideLocation[1] : sideLocation[0]; } } public override Styles Style { get { return Styles.Cab; } } // Cab camera is only possible on the player train. @@ -2045,13 +2045,13 @@ public void Initialize() else if (Viewer.CabExceedsDisplayHorizontally <= 0) { // We must modify FOV to get correct lookout - FieldOfView = MathHelper.ToDegrees((float)(2 * Math.Atan((float)Viewer.DisplaySize.Y / Viewer.DisplaySize.X / Viewer.CabTextureInverseRatio * Math.Tan(MathHelper.ToRadians(Viewer.Settings.ViewingFOV / 2))))); - RotationRatio = (float)(0.962314f * 2 * Math.Tan(MathHelper.ToRadians(FieldOfView / 2)) / Viewer.DisplaySize.Y); + FieldOfView = MathHelper.ToDegrees((float)(2 * Math.Atan((float)Viewer.DisplaySize.Y / Viewer.DisplaySize.X / Viewer.CabTextureInverseRatio * Math.Tan(MathHelper.ToRadians(Viewer.Settings.ViewingFOV / 2))))); + RotationRatio = (float)(0.962314f * 2 * Math.Tan(MathHelper.ToRadians(FieldOfView / 2)) / Viewer.DisplaySize.Y); } else if (Viewer.CabExceedsDisplayHorizontally > 0) { - var halfFOVHorizontalRadians = (float)(Math.Atan((float)Viewer.DisplaySize.X / Viewer.DisplaySize.Y * Math.Tan(MathHelper.ToRadians(Viewer.Settings.ViewingFOV / 2)))); - RotationRatioHorizontal = (float)(0.962314f * 2 * Viewer.DisplaySize.X / Viewer.DisplaySize.Y * Math.Tan(MathHelper.ToRadians(Viewer.Settings.ViewingFOV / 2)) / Viewer.DisplaySize.X); + var halfFOVHorizontalRadians = (float)(Math.Atan((float)Viewer.DisplaySize.X / Viewer.DisplaySize.Y * Math.Tan(MathHelper.ToRadians(Viewer.Settings.ViewingFOV / 2)))); + RotationRatioHorizontal = (float)(0.962314f * 2 * Viewer.DisplaySize.X / Viewer.DisplaySize.Y * Math.Tan(MathHelper.ToRadians(Viewer.Settings.ViewingFOV / 2)) / Viewer.DisplaySize.X); } InitialiseRotation(attachedCar); ScreenChanged(); @@ -2151,7 +2151,7 @@ void PanUp(bool up, float speed) /// and pans the image left/right to reveal details at the sides of the cab. /// The external view also moves sidewards by a similar amount. /// - void ScrollRight(bool right, float speed) + void ScrollRight (bool right, float speed) { int min = 0; int max = Viewer.CabWidthPixels - Viewer.DisplaySize.X - 2 * Viewer.CabXLetterboxPixels; // -ve value @@ -2326,7 +2326,7 @@ public override void HandleUserInput(ElapsedTime elapsedTime) public override void Update(ElapsedTime elapsedTime) { bool trainForwards; - var train = PrepUpdate(out trainForwards); + var train = PrepUpdate( out trainForwards); // Train is close enough if the last car we used is part of the same train and still close enough. var trainClose = (LastCheckCar != null) && (LastCheckCar.Train == train) && (WorldLocation.GetDistance2D(LastCheckCar.WorldPosition.WorldLocation, cameraLocation).Length() < MaximumDistance); @@ -2361,7 +2361,7 @@ public override void Update(ElapsedTime elapsedTime) UpdateListener(); } - protected Train PrepUpdate(out bool trainForwards) + protected Train PrepUpdate (out bool trainForwards) { var train = attachedCar.Train; @@ -2381,7 +2381,7 @@ protected Train PrepUpdate(out bool trainForwards) } - protected WorldLocation GoToNewLocation(ref Traveller tdb, Train train, bool trainForwards) + protected WorldLocation GoToNewLocation ( ref Traveller tdb, Train train, bool trainForwards) { tdb.Move(MaximumDistance * 0.75f); var newLocation = tdb.WorldLocation; @@ -2691,7 +2691,7 @@ public override void Update(ElapsedTime elapsedTime) { tdb = trainForwards ? new Traveller(train.FrontTDBTraveller) : new Traveller(train.RearTDBTraveller, Traveller.TravellerDirection.Backward); // return to standard newLocation = GoToNewLocation(ref tdb, train, trainForwards); - } + } if (newLocation != WorldLocation.None && !trainClose) { diff --git a/Source/RunActivity/Viewer3D/Commands.cs b/Source/RunActivity/Viewer3D/Commands.cs index 9bc4d11ad1..503821194b 100644 --- a/Source/RunActivity/Viewer3D/Commands.cs +++ b/Source/RunActivity/Viewer3D/Commands.cs @@ -17,21 +17,21 @@ // This file is the responsibility of the 3D & Environment Team. -using System; using Orts.Common; using Orts.Viewer3D.Popups; using Orts.Viewer3D.RollingStock; using ORTS.Common; +using System; namespace Orts.Viewer3D { [Serializable()] public abstract class ActivityCommand : PausedCommand - { + { public static ActivityWindow Receiver { get; set; } string EventNameLabel; - public ActivityCommand(CommandLog log, string eventNameLabel, double pauseDurationS) + public ActivityCommand( CommandLog log, string eventNameLabel, double pauseDurationS ) : base(log, pauseDurationS) { EventNameLabel = eventNameLabel; @@ -61,7 +61,7 @@ public ImmediateRefillCommand(CommandLog log) public override void Redo() { if (Receiver == null) return; - Receiver.ImmediateRefill(); + Receiver.ImmediateRefill(); // Report(); } } @@ -105,7 +105,7 @@ public void Redo(string screen, int display) { if (ToState) { - var finalReceiver = Receiver.Camera is ThreeDimCabCamera ? + var finalReceiver = Receiver.Camera is ThreeDimCabCamera ? (Receiver.PlayerLocomotiveViewer as MSTSLocomotiveViewer).ThreeDimentionCabRenderer : (Receiver.PlayerLocomotiveViewer as MSTSLocomotiveViewer)._CabRenderer; finalReceiver.ActiveScreen[display] = screen; @@ -135,7 +135,7 @@ public override void Redo() Receiver.ChangeCab(); // Report(); } - } + } [Serializable()] public sealed class ToggleSwitchAheadCommand : Command @@ -153,7 +153,7 @@ public override void Redo() Receiver.ToggleSwitchAhead(); // Report(); } - } + } [Serializable()] public sealed class ToggleSwitchBehindCommand : Command @@ -171,14 +171,14 @@ public override void Redo() Receiver.ToggleSwitchBehind(); // Report(); } - } + } [Serializable()] public sealed class ToggleAnySwitchCommand : IndexCommand - { + { public static Viewer Receiver { get; set; } - public ToggleAnySwitchCommand(CommandLog log, int index) + public ToggleAnySwitchCommand( CommandLog log, int index ) : base(log, index) { Redo(); @@ -197,7 +197,7 @@ public sealed class UncoupleCommand : Command public static Viewer Receiver { get; set; } int CarPosition; // 0 for head of train - public UncoupleCommand(CommandLog log, int carPosition) + public UncoupleCommand( CommandLog log, int carPosition ) : base(log) { CarPosition = carPosition; @@ -206,7 +206,7 @@ public UncoupleCommand(CommandLog log, int carPosition) public override void Redo() { - Receiver.UncoupleBehind(CarPosition); + Receiver.UncoupleBehind( CarPosition ); // Report(); } @@ -237,7 +237,7 @@ public override void Redo() [Serializable()] public sealed class ResumeActivityCommand : ActivityCommand { - public ResumeActivityCommand(CommandLog log, string eventNameLabel, double pauseDurationS) + public ResumeActivityCommand( CommandLog log, string eventNameLabel, double pauseDurationS ) : base(log, eventNameLabel, pauseDurationS) { Redo(); @@ -253,12 +253,12 @@ public override void Redo() [Serializable()] public sealed class CloseAndResumeActivityCommand : ActivityCommand { - public CloseAndResumeActivityCommand(CommandLog log, string eventNameLabel, double pauseDurationS) + public CloseAndResumeActivityCommand( CommandLog log, string eventNameLabel, double pauseDurationS ) : base(log, eventNameLabel, pauseDurationS) { Redo(); } - + public override void Redo() { Receiver.CloseBox(); @@ -285,7 +285,7 @@ public override void Redo() [Serializable()] public sealed class QuitActivityCommand : ActivityCommand { - public QuitActivityCommand(CommandLog log, string eventNameLabel, double pauseDurationS) + public QuitActivityCommand( CommandLog log, string eventNameLabel, double pauseDurationS ) : base(log, eventNameLabel, pauseDurationS) { Redo(); @@ -297,13 +297,13 @@ public override void Redo() // Report(); } } - + [Serializable()] public abstract class UseCameraCommand : CameraCommand { public static Viewer Receiver { get; set; } - public UseCameraCommand(CommandLog log) + public UseCameraCommand( CommandLog log ) : base(log) { } @@ -313,7 +313,7 @@ public UseCameraCommand(CommandLog log) public sealed class UseCabCameraCommand : UseCameraCommand { - public UseCabCameraCommand(CommandLog log) + public UseCabCameraCommand( CommandLog log ) : base(log) { Redo(); @@ -322,24 +322,24 @@ public UseCabCameraCommand(CommandLog log) public override void Redo() => Receiver.ActivateCabCamera(); } - [Serializable()] - public sealed class ToggleThreeDimensionalCabCameraCommand : UseCameraCommand - { + [Serializable()] + public sealed class ToggleThreeDimensionalCabCameraCommand : UseCameraCommand + { - public ToggleThreeDimensionalCabCameraCommand(CommandLog log) - : base(log) - { - Redo(); - } + public ToggleThreeDimensionalCabCameraCommand(CommandLog log) + : base(log) + { + Redo(); + } public override void Redo() => Receiver.ToggleCabCameraView(); - } - - [Serializable()] + } + + [Serializable()] public sealed class UseFrontCameraCommand : UseCameraCommand { - public UseFrontCameraCommand(CommandLog log) + public UseFrontCameraCommand( CommandLog log ) : base(log) { Redo(); @@ -356,7 +356,7 @@ public override void Redo() public sealed class UseBackCameraCommand : UseCameraCommand { - public UseBackCameraCommand(CommandLog log) + public UseBackCameraCommand( CommandLog log ) : base(log) { Redo(); @@ -373,7 +373,7 @@ public override void Redo() public sealed class UseHeadOutForwardCameraCommand : UseCameraCommand { - public UseHeadOutForwardCameraCommand(CommandLog log) + public UseHeadOutForwardCameraCommand( CommandLog log ) : base(log) { Redo(); @@ -409,7 +409,7 @@ public override void Redo() Receiver.FreeRoamCamera.Activate(); } } - + [Serializable()] public sealed class UsePreviousFreeRoamCameraCommand : UseCameraCommand { @@ -425,12 +425,12 @@ public override void Redo() Receiver.ChangeToPreviousFreeRoamCamera(); } } - + [Serializable()] public sealed class UseHeadOutBackCameraCommand : UseCameraCommand { - public UseHeadOutBackCameraCommand(CommandLog log) + public UseHeadOutBackCameraCommand( CommandLog log ) : base(log) { Redo(); @@ -447,7 +447,7 @@ public override void Redo() public sealed class UseBrakemanCameraCommand : UseCameraCommand { - public UseBrakemanCameraCommand(CommandLog log) + public UseBrakemanCameraCommand( CommandLog log ) : base(log) { Redo(); @@ -464,7 +464,7 @@ public override void Redo() public sealed class UsePassengerCameraCommand : UseCameraCommand { - public UsePassengerCameraCommand(CommandLog log) + public UsePassengerCameraCommand( CommandLog log ) : base(log) { Redo(); @@ -481,7 +481,7 @@ public override void Redo() public sealed class UseTracksideCameraCommand : UseCameraCommand { - public UseTracksideCameraCommand(CommandLog log) + public UseTracksideCameraCommand( CommandLog log ) : base(log) { Redo(); @@ -517,7 +517,7 @@ public abstract class MoveCameraCommand : CameraCommand public static Viewer Receiver { get; set; } protected double EndTime; - public MoveCameraCommand(CommandLog log, double startTime, double endTime) + public MoveCameraCommand( CommandLog log, double startTime, double endTime ) : base(log) { Time = startTime; @@ -526,7 +526,7 @@ public MoveCameraCommand(CommandLog log, double startTime, double endTime) public override string ToString() { - return base.ToString() + " - " + String.Format("{0}", FormatStrings.FormatPreciseTime(EndTime)); + return base.ToString() + " - " + String.Format( "{0}", FormatStrings.FormatPreciseTime( EndTime ) ); } } @@ -535,7 +535,7 @@ public sealed class CameraRotateUpDownCommand : MoveCameraCommand { float RotationXRadians; - public CameraRotateUpDownCommand(CommandLog log, double startTime, double endTime, float rx) + public CameraRotateUpDownCommand( CommandLog log, double startTime, double endTime, float rx ) : base(log, startTime, endTime) { RotationXRadians = rx; @@ -555,7 +555,7 @@ public override void Redo() public override string ToString() { - return base.ToString() + String.Format(", {0}", RotationXRadians); + return base.ToString() + String.Format( ", {0}", RotationXRadians ); } } @@ -564,7 +564,7 @@ public sealed class CameraRotateLeftRightCommand : MoveCameraCommand { float RotationYRadians; - public CameraRotateLeftRightCommand(CommandLog log, double startTime, double endTime, float ry) + public CameraRotateLeftRightCommand( CommandLog log, double startTime, double endTime, float ry ) : base(log, startTime, endTime) { RotationYRadians = ry; @@ -584,7 +584,7 @@ public override void Redo() public override string ToString() { - return base.ToString() + String.Format(", {0}", RotationYRadians); + return base.ToString() + String.Format( ", {0}", RotationYRadians ); } } @@ -597,7 +597,7 @@ public sealed class CameraMouseRotateCommand : MoveCameraCommand float RotationXRadians; float RotationYRadians; - public CameraMouseRotateCommand(CommandLog log, double startTime, double endTime, float rx, float ry) + public CameraMouseRotateCommand( CommandLog log, double startTime, double endTime, float rx, float ry ) : base(log, startTime, endTime) { RotationXRadians = rx; @@ -619,7 +619,7 @@ public override void Redo() public override string ToString() { - return base.ToString() + String.Format(", {0} {1} {2}", EndTime, RotationXRadians, RotationYRadians); + return base.ToString() + String.Format( ", {0} {1} {2}", EndTime, RotationXRadians, RotationYRadians ); } } @@ -628,7 +628,7 @@ public sealed class CameraXCommand : MoveCameraCommand { float XRadians; - public CameraXCommand(CommandLog log, double startTime, double endTime, float xr) + public CameraXCommand( CommandLog log, double startTime, double endTime, float xr ) : base(log, startTime, endTime) { XRadians = xr; @@ -648,7 +648,7 @@ public override void Redo() public override string ToString() { - return base.ToString() + String.Format(", {0}", XRadians); + return base.ToString() + String.Format( ", {0}", XRadians ); } } @@ -657,7 +657,7 @@ public sealed class CameraYCommand : MoveCameraCommand { float YRadians; - public CameraYCommand(CommandLog log, double startTime, double endTime, float yr) + public CameraYCommand( CommandLog log, double startTime, double endTime, float yr ) : base(log, startTime, endTime) { YRadians = yr; @@ -677,7 +677,7 @@ public override void Redo() public override string ToString() { - return base.ToString() + String.Format(", {0}", YRadians); + return base.ToString() + String.Format( ", {0}", YRadians ); } } @@ -686,7 +686,7 @@ public sealed class CameraZCommand : MoveCameraCommand { float ZRadians; - public CameraZCommand(CommandLog log, double startTime, double endTime, float zr) + public CameraZCommand( CommandLog log, double startTime, double endTime, float zr ) : base(log, startTime, endTime) { ZRadians = zr; @@ -705,45 +705,45 @@ public override void Redo() public override string ToString() { - return base.ToString() + String.Format(", {0}", ZRadians); + return base.ToString() + String.Format( ", {0}", ZRadians ); } } - [Serializable()] - public sealed class CameraMoveXYZCommand : MoveCameraCommand - { - float X, Y, Z; + [Serializable()] + public sealed class CameraMoveXYZCommand : MoveCameraCommand + { + float X, Y, Z; public CameraMoveXYZCommand(CommandLog log, double startTime, double endTime, float xr, float yr, float zr) - : base(log, startTime, endTime) - { - X = xr; Y = yr; Z = zr; - Redo(); - } - - public override void Redo() - { - if (Receiver.Camera is ThreeDimCabCamera) - { - var c = Receiver.Camera as ThreeDimCabCamera; - c.MoveCameraXYZ(X, Y, Z); - c.EndTime = EndTime; - } - // Report(); - } - - public override string ToString() - { - return base.ToString() + String.Format(", {0}", X); - } - } - - [Serializable()] + : base(log, startTime, endTime) + { + X = xr; Y = yr; Z = zr; + Redo(); + } + + public override void Redo() + { + if (Receiver.Camera is ThreeDimCabCamera) + { + var c = Receiver.Camera as ThreeDimCabCamera; + c.MoveCameraXYZ(X, Y, Z); + c.EndTime = EndTime; + } + // Report(); + } + + public override string ToString() + { + return base.ToString() + String.Format(", {0}", X); + } + } + + [Serializable()] public sealed class TrackingCameraXCommand : MoveCameraCommand { float PositionXRadians; - public TrackingCameraXCommand(CommandLog log, double startTime, double endTime, float rx) + public TrackingCameraXCommand( CommandLog log, double startTime, double endTime, float rx ) : base(log, startTime, endTime) { PositionXRadians = rx; @@ -763,7 +763,7 @@ public override void Redo() public override string ToString() { - return base.ToString() + String.Format(", {0}", PositionXRadians); + return base.ToString() + String.Format( ", {0}", PositionXRadians ); } } @@ -772,7 +772,7 @@ public sealed class TrackingCameraYCommand : MoveCameraCommand { float PositionYRadians; - public TrackingCameraYCommand(CommandLog log, double startTime, double endTime, float ry) + public TrackingCameraYCommand( CommandLog log, double startTime, double endTime, float ry ) : base(log, startTime, endTime) { PositionYRadians = ry; @@ -792,7 +792,7 @@ public override void Redo() public override string ToString() { - return base.ToString() + String.Format(", {0}", PositionYRadians); + return base.ToString() + String.Format( ", {0}", PositionYRadians ); } } @@ -801,7 +801,7 @@ public sealed class TrackingCameraZCommand : MoveCameraCommand { float PositionDistanceMetres; - public TrackingCameraZCommand(CommandLog log, double startTime, double endTime, float d) + public TrackingCameraZCommand( CommandLog log, double startTime, double endTime, float d ) : base(log, startTime, endTime) { PositionDistanceMetres = d; @@ -821,7 +821,7 @@ public override void Redo() public override string ToString() { - return base.ToString() + String.Format(", {0}", PositionDistanceMetres); + return base.ToString() + String.Format( ", {0}", PositionDistanceMetres ); } } @@ -829,7 +829,7 @@ public override string ToString() public sealed class NextCarCommand : UseCameraCommand { - public NextCarCommand(CommandLog log) + public NextCarCommand( CommandLog log ) : base(log) { Redo(); @@ -850,7 +850,7 @@ public override void Redo() public sealed class PreviousCarCommand : UseCameraCommand { - public PreviousCarCommand(CommandLog log) + public PreviousCarCommand( CommandLog log ) : base(log) { Redo(); @@ -871,7 +871,7 @@ public override void Redo() public sealed class FirstCarCommand : UseCameraCommand { - public FirstCarCommand(CommandLog log) + public FirstCarCommand( CommandLog log ) : base(log) { Redo(); @@ -892,7 +892,7 @@ public override void Redo() public sealed class LastCarCommand : UseCameraCommand { - public LastCarCommand(CommandLog log) + public LastCarCommand( CommandLog log ) : base(log) { Redo(); @@ -968,7 +968,7 @@ public override void Redo() } } - [Serializable()] + [Serializable()] public sealed class ToggleBrowseForwardsCommand : UseCameraCommand { diff --git a/Source/RunActivity/Viewer3D/Common/Helpers.cs b/Source/RunActivity/Viewer3D/Common/Helpers.cs index efa903a2a8..6131238caa 100644 --- a/Source/RunActivity/Viewer3D/Common/Helpers.cs +++ b/Source/RunActivity/Viewer3D/Common/Helpers.cs @@ -15,12 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using Orts.Formats.Msts; +using Orts.Simulation; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; -using Orts.Formats.Msts; -using Orts.Simulation; namespace Orts.Viewer3D.Common { diff --git a/Source/RunActivity/Viewer3D/DDSLib.cs b/Source/RunActivity/Viewer3D/DDSLib.cs index b825791c84..f6e31c4dbf 100644 --- a/Source/RunActivity/Viewer3D/DDSLib.cs +++ b/Source/RunActivity/Viewer3D/DDSLib.cs @@ -56,9 +56,9 @@ //coment this if you want to save color textures as ABGR. #define COLOR_SAVE_TO_ARGB +using Microsoft.Xna.Framework.Graphics; using System; using System.IO; -using Microsoft.Xna.Framework.Graphics; namespace Orts.Viewer3D { diff --git a/Source/RunActivity/Viewer3D/Debugging/DebugViewerForm.cs b/Source/RunActivity/Viewer3D/Debugging/DebugViewerForm.cs index c21f053304..305b3ff39b 100644 --- a/Source/RunActivity/Viewer3D/Debugging/DebugViewerForm.cs +++ b/Source/RunActivity/Viewer3D/Debugging/DebugViewerForm.cs @@ -1075,9 +1075,9 @@ public void DrawTrainPath(Train train, float subX, float subY, Pen pathPen, Grap if (stepDistance + stepLength >= initialNodeOffset && stepDistance <= initialNodeOffset + DisplayDistance) { var currentLocation = currentPosition.WorldLocation; - scaledA.X = (float)((previousLocation.TileX * WorldLocation.TileSize + previousLocation.Location.X - subX) * xScale); + scaledA.X = (float)((previousLocation.TileX * WorldLocation.TileSize + previousLocation.Location.X - subX) * xScale); scaledA.Y = (float)(pbCanvas.Height - (previousLocation.TileZ * WorldLocation.TileSize + previousLocation.Location.Z - subY) * yScale); - scaledB.X = (float)((currentLocation.TileX * WorldLocation.TileSize + currentLocation.Location.X - subX) * xScale); + scaledB.X = (float)((currentLocation.TileX * WorldLocation.TileSize + currentLocation.Location.X - subX) * xScale); scaledB.Y = (float)(pbCanvas.Height - (currentPosition.TileZ * WorldLocation.TileSize + currentPosition.Location.Z - subY) * yScale); g.DrawLine(pathPen, scaledA, scaledB); } } diff --git a/Source/RunActivity/Viewer3D/Debugging/MessageViewer.cs b/Source/RunActivity/Viewer3D/Debugging/MessageViewer.cs index 04ba9577db..bdc71b9fee 100644 --- a/Source/RunActivity/Viewer3D/Debugging/MessageViewer.cs +++ b/Source/RunActivity/Viewer3D/Debugging/MessageViewer.cs @@ -32,13 +32,13 @@ private void ClearAllClick(object sender, EventArgs e) { messages.Items.Clear(); } - + private void ComposeClick(object sender, EventArgs e) { MSG.Enabled = true; MultiPlayer.MPManager.Instance().ComposingText = true; } - + private void ReplySelectedClick(object sender, EventArgs e) { string msg = MSG.Text @@ -71,7 +71,7 @@ private void ReplySelectedClick(object sender, EventArgs e) MultiPlayer.MPManager.Instance().ComposingText = false; } } - + public bool AddNewMessage(double _, string msg) { if (messages.Items.Count > 10) diff --git a/Source/RunActivity/Viewer3D/Debugging/SoundDebugForm.cs b/Source/RunActivity/Viewer3D/Debugging/SoundDebugForm.cs index ed15ba4e19..fb4d38fafb 100644 --- a/Source/RunActivity/Viewer3D/Debugging/SoundDebugForm.cs +++ b/Source/RunActivity/Viewer3D/Debugging/SoundDebugForm.cs @@ -17,12 +17,12 @@ // This file is the responsibility of the 3D & Environment Team. +using Orts.Simulation.RollingStocks; +using ORTS.Common; using System; using System.Collections.Generic; using System.Drawing; using System.Windows.Forms; -using Orts.Simulation.RollingStocks; -using ORTS.Common; namespace Orts.Viewer3D.Debugging { diff --git a/Source/RunActivity/Viewer3D/DynamicTrack.cs b/Source/RunActivity/Viewer3D/DynamicTrack.cs index 458cc25293..abe5f9a987 100644 --- a/Source/RunActivity/Viewer3D/DynamicTrack.cs +++ b/Source/RunActivity/Viewer3D/DynamicTrack.cs @@ -17,13 +17,6 @@ // This file is the responsibility of the 3D & Environment Team. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Xml; -using System.Xml.Schema; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Orts.Formats.Msts; @@ -31,6 +24,13 @@ using Orts.Simulation; using Orts.Viewer3D.Common; using ORTS.Common; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Xml; +using System.Xml.Schema; namespace Orts.Viewer3D { @@ -102,7 +102,7 @@ public static void Decompose(Viewer viewer, List trackList, { // Both heading and translation change // nextRoot is found by moving from Point-of-Curve (PC) to // center (O)to Point-of-Tangent (PT). - float radius = subsection.trackSections[0].param2 * Math.Sign(-subsection.trackSections[0].param1); // meters + float radius = subsection.trackSections[0].param2*Math.Sign(-subsection.trackSections[0].param1); // meters Vector3 left = radius * Vector3.Cross(Vector3.Up, heading); // Vector from PC to O Matrix rot = Matrix.CreateRotationY(-length); // Heading change (rotation about O) // Shared method returns displacement from present world position and, by reference, diff --git a/Source/RunActivity/Viewer3D/Forest.cs b/Source/RunActivity/Viewer3D/Forest.cs index 04b59da482..d2edd02d7b 100644 --- a/Source/RunActivity/Viewer3D/Forest.cs +++ b/Source/RunActivity/Viewer3D/Forest.cs @@ -17,13 +17,13 @@ // This file is the responsibility of the 3D & Environment Team. -using System; -using System.Collections.Generic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Orts.Formats.Msts; using Orts.Viewer3D.Common; using ORTS.Common; +using System; +using System.Collections.Generic; namespace Orts.Viewer3D { @@ -126,7 +126,7 @@ private List CalculateTrees(TileManager tiles, Fore forestVertex = new Vector3(forest.forestArea.X / 2, 0, forest.forestArea.Z / 2); Vector3.Transform(ref forestVertex, ref position.XNAMatrix, out forestVertex); forestVertices.Add(forestVertex); - bool[] considerTile = new bool[4] { false, false, false, false }; + bool[] considerTile = new bool [4] {false, false, false, false}; foreach (var fVertex in forestVertices) { if (fVertex.X > 1024) considerTile[0] = true; @@ -158,22 +158,22 @@ private List CalculateTrees(TileManager tiles, Fore } if (considerTile[0] && considerTile[2]) { - addList = FindTracksAndRoadsClose(position.TileX + 1, position.TileZ + 1); + addList = FindTracksAndRoadsClose(position.TileX + 1, position.TileZ +1); FindTracksAndRoadsMoreClose(ref sections, addList, forest, position, InvForestXNAMatrix); } if (considerTile[0] && considerTile[3]) { - addList = FindTracksAndRoadsClose(position.TileX + 1, position.TileZ - 1); + addList = FindTracksAndRoadsClose(position.TileX + 1, position.TileZ -1); FindTracksAndRoadsMoreClose(ref sections, addList, forest, position, InvForestXNAMatrix); } if (considerTile[1] && considerTile[2]) { - addList = FindTracksAndRoadsClose(position.TileX - 1, position.TileZ + 1); + addList = FindTracksAndRoadsClose(position.TileX-1, position.TileZ + 1); FindTracksAndRoadsMoreClose(ref sections, addList, forest, position, InvForestXNAMatrix); } if (considerTile[1] && considerTile[3]) { - addList = FindTracksAndRoadsClose(position.TileX - 1, position.TileZ - 1); + addList = FindTracksAndRoadsClose(position.TileX-1, position.TileZ - 1); FindTracksAndRoadsMoreClose(ref sections, addList, forest, position, InvForestXNAMatrix); } } @@ -332,7 +332,7 @@ bool InitTrackSectionCurved(int tileX, int tileZ, float x, float z, TrVectorSect // Do a preliminary cull based on a bounding square around the track section. // Bounding distance is (radius * angle + error) by (radius * angle + error) around starting coordinates but no more than 2 for angle. - var boundingDistance = trackSection.SectionCurve.Radius * Math.Min(Math.Abs(MathHelper.ToRadians(trackSection.SectionCurve.Angle)), 2) + MaximumCenterlineOffset + treeWidth; + var boundingDistance = trackSection.SectionCurve.Radius * Math.Min(Math.Abs(MathHelper.ToRadians(trackSection.SectionCurve.Angle)), 2) + MaximumCenterlineOffset+treeWidth; var dx = Math.Abs(x - sx); var dz = Math.Abs(z - sz); if (dx > boundingDistance || dz > boundingDistance) diff --git a/Source/RunActivity/Viewer3D/InfoDisplay.cs b/Source/RunActivity/Viewer3D/InfoDisplay.cs index a134efd7ae..aecbdd567c 100644 --- a/Source/RunActivity/Viewer3D/InfoDisplay.cs +++ b/Source/RunActivity/Viewer3D/InfoDisplay.cs @@ -126,63 +126,61 @@ public bool IsRecordingSteamPerformance void RecordSteamPerformance() { - MSTSSteamLocomotive steamloco = (MSTSSteamLocomotive)Viewer.PlayerLocomotive; - float SteamspeedMpH = MpS.ToMpH(steamloco.SpeedMpS); - if (SteamspeedMpH >= previousLoggedSteamSpeedMpH + 5) // Add a new record every time speed increases by 5 mph - { - previousLoggedSteamSpeedMpH = (float)(int)SteamspeedMpH; // Keep speed records close to whole numbers - - Logger.Data(MpS.FromMpS(Viewer.PlayerLocomotive.SpeedMpS, false).ToString("F0")); - Logger.Data(S.ToM(steamloco.SteamPerformanceTimeS).ToString("F1")); - Logger.Data(Viewer.PlayerLocomotive.ThrottlePercent.ToString("F0")); - Logger.Data(Viewer.PlayerTrain.MUReverserPercent.ToString("F0")); - Logger.Data(N.ToLbf(Viewer.PlayerLocomotive.MotiveForceN).ToString("F0")); - Logger.Data(steamloco.IndicatedHorsePowerHP.ToString("F0")); - Logger.Data(steamloco.DrawBarPullLbsF.ToString("F0")); - Logger.Data(steamloco.DrawbarHorsePowerHP.ToString("F0")); - Logger.Data(N.ToLbf(steamloco.LocomotiveCouplerForceN).ToString("F0")); - Logger.Data(N.ToLbf(steamloco.LocoTenderFrictionForceN).ToString("F0")); - Logger.Data(N.ToLbf(steamloco.TotalFrictionForceN).ToString("F0")); - Logger.Data(Kg.ToTUK(steamloco.TrainLoadKg).ToString("F0")); - Logger.Data(steamloco.BoilerPressurePSI.ToString("F0")); - Logger.Data(steamloco.LogSteamChestPressurePSI.ToString("F0")); - Logger.Data(steamloco.LogInitialPressurePSI.ToString("F0")); - Logger.Data(steamloco.LogCutoffPressurePSI.ToString("F0")); - Logger.Data(steamloco.LogReleasePressurePSI.ToString("F0")); - Logger.Data(steamloco.LogBackPressurePSI.ToString("F0")); - - Logger.Data(steamloco.MeanEffectivePressurePSI.ToString("F0")); - - - Logger.Data(steamloco.CurrentSuperheatTempF.ToString("F0")); - - Logger.Data(pS.TopH(steamloco.CylinderSteamUsageLBpS).ToString("F0")); - Logger.Data(pS.TopH(steamloco.WaterConsumptionLbpS).ToString("F0")); - Logger.Data(Kg.ToLb(pS.TopH(steamloco.FuelBurnRateSmoothedKGpS)).ToString("F0")); - - - Logger.Data(steamloco.SuperheaterSteamUsageFactor.ToString("F2")); - Logger.Data(steamloco.CumulativeCylinderSteamConsumptionLbs.ToString("F0")); - Logger.Data(steamloco.CumulativeWaterConsumptionLbs.ToString("F0")); - - Logger.Data(steamloco.CutoffPressureDropRatio.ToString("F2")); - - Logger.Data(steamloco.HPCylinderMEPPSI.ToString("F0")); - Logger.Data(steamloco.LogLPInitialPressurePSI.ToString("F0")); - Logger.Data(steamloco.LogLPCutoffPressurePSI.ToString("F0")); - Logger.Data(steamloco.LogLPReleasePressurePSI.ToString("F0")); - Logger.Data(steamloco.LogLPBackPressurePSI.ToString("F0")); - Logger.Data(steamloco.CutoffPressureDropRatio.ToString("F2")); - Logger.Data(steamloco.LPCylinderMEPPSI.ToString("F0")); - - Logger.End(); - } + MSTSSteamLocomotive steamloco = (MSTSSteamLocomotive)Viewer.PlayerLocomotive; + float SteamspeedMpH = MpS.ToMpH(steamloco.SpeedMpS); + if (SteamspeedMpH >= previousLoggedSteamSpeedMpH + 5) // Add a new record every time speed increases by 5 mph + { + previousLoggedSteamSpeedMpH = (float)(int)SteamspeedMpH; // Keep speed records close to whole numbers + + Logger.Data(MpS.FromMpS(Viewer.PlayerLocomotive.SpeedMpS, false).ToString("F0")); + Logger.Data(S.ToM(steamloco.SteamPerformanceTimeS).ToString("F1")); + Logger.Data(Viewer.PlayerLocomotive.ThrottlePercent.ToString("F0")); + Logger.Data(Viewer.PlayerTrain.MUReverserPercent.ToString("F0")); + Logger.Data(N.ToLbf(Viewer.PlayerLocomotive.MotiveForceN).ToString("F0")); + Logger.Data(steamloco.IndicatedHorsePowerHP.ToString("F0")); + Logger.Data(steamloco.DrawBarPullLbsF.ToString("F0")); + Logger.Data(steamloco.DrawbarHorsePowerHP.ToString("F0")); + Logger.Data(N.ToLbf(steamloco.LocomotiveCouplerForceN).ToString("F0")); + Logger.Data(N.ToLbf(steamloco.LocoTenderFrictionForceN).ToString("F0")); + Logger.Data(N.ToLbf(steamloco.TotalFrictionForceN).ToString("F0")); + Logger.Data(Kg.ToTUK(steamloco.TrainLoadKg).ToString("F0")); + Logger.Data(steamloco.BoilerPressurePSI.ToString("F0")); + Logger.Data(steamloco.LogSteamChestPressurePSI.ToString("F0")); + Logger.Data(steamloco.LogInitialPressurePSI.ToString("F0")); + Logger.Data(steamloco.LogCutoffPressurePSI.ToString("F0")); + Logger.Data(steamloco.LogReleasePressurePSI.ToString("F0")); + Logger.Data(steamloco.LogBackPressurePSI.ToString("F0")); + + Logger.Data(steamloco.MeanEffectivePressurePSI.ToString("F0")); + + + Logger.Data(steamloco.CurrentSuperheatTempF.ToString("F0")); + + Logger.Data(pS.TopH(steamloco.CylinderSteamUsageLBpS).ToString("F0")); + Logger.Data(pS.TopH(steamloco.WaterConsumptionLbpS).ToString("F0")); + Logger.Data(Kg.ToLb(pS.TopH(steamloco.FuelBurnRateSmoothedKGpS)).ToString("F0")); + + + Logger.Data(steamloco.SuperheaterSteamUsageFactor.ToString("F2")); + Logger.Data(steamloco.CumulativeCylinderSteamConsumptionLbs.ToString("F0")); + Logger.Data(steamloco.CumulativeWaterConsumptionLbs.ToString("F0")); + + Logger.Data(steamloco.CutoffPressureDropRatio.ToString("F2")); + + Logger.Data(steamloco.HPCylinderMEPPSI.ToString("F0")); + Logger.Data(steamloco.LogLPInitialPressurePSI.ToString("F0")); + Logger.Data(steamloco.LogLPCutoffPressurePSI.ToString("F0")); + Logger.Data(steamloco.LogLPReleasePressurePSI.ToString("F0")); + Logger.Data(steamloco.LogLPBackPressurePSI.ToString("F0")); + Logger.Data(steamloco.CutoffPressureDropRatio.ToString("F2")); + Logger.Data(steamloco.LPCylinderMEPPSI.ToString("F0")); + + Logger.End(); + } } #if DEBUG_DUMP_STEAM_POWER_CURVE - public bool IsRecordingSteamPowerCurve - { - get + public bool IsRecordingSteamPowerCurve { get { return Viewer.Settings.DataLogger && !Viewer.Settings.DataLogPerformance @@ -220,7 +218,7 @@ public void PrepareFrame(RenderFrame frame, ElapsedTime elapsedTime) LastUpdateRealTime = Viewer.RealTime; Profile(elapsedRealSeconds); } - + #if DEBUG_DUMP_STEAM_POWER_CURVE if (IsRecordingSteamPowerCurve) { @@ -236,7 +234,7 @@ public void PrepareFrame(RenderFrame frame, ElapsedTime elapsedTime) else - //Here's where the logger stores the data from each frame + //Here's where the logger stores the data from each frame if (Viewer.Settings.DataLogger) { Logger.Separator = (DataLogger.Separators)Enum.Parse(typeof(DataLogger.Separators), Viewer.Settings.DataLoggerSeparator); @@ -345,7 +343,7 @@ void logSpeed(float speedMpS) { Logger.Data((Viewer.PlayerLocomotive as MSTSElectricLocomotive).Pantographs[1].CommandUp.ToString()); Logger.Data((Viewer.PlayerLocomotive as MSTSElectricLocomotive).Pantographs[2].CommandUp.ToString()); - Logger.Data((Viewer.PlayerLocomotive as MSTSElectricLocomotive).Pantographs.List.Count > 2 ? + Logger.Data((Viewer.PlayerLocomotive as MSTSElectricLocomotive).Pantographs.List.Count > 2 ? (Viewer.PlayerLocomotive as MSTSElectricLocomotive).Pantographs[3].CommandUp.ToString() : null); Logger.Data((Viewer.PlayerLocomotive as MSTSElectricLocomotive).Pantographs.List.Count > 3 ? (Viewer.PlayerLocomotive as MSTSElectricLocomotive).Pantographs[4].CommandUp.ToString() : null); @@ -390,7 +388,7 @@ void logSpeed(float speedMpS) } #endif } - Logger.End(); + Logger.End(); #if DEBUG_DUMP_STEAM_POWER_CURVE } #endif @@ -414,8 +412,8 @@ static void DataLoggerStart(UserSettings settings) if (settings.DataLogPerformance) { headerLine = String.Join(Convert.ToString((char)separator), - new string[] - { + new string[] + { "SVN", "Frame", "Memory", @@ -441,7 +439,7 @@ static void DataLoggerStart(UserSettings settings) headerLine += Convert.ToString((char)separator); headerLine += String.Join(Convert.ToString((char)separator), - new string[] + new string[] { "Time", "Player Direction", @@ -487,8 +485,8 @@ static void DataLoggerStart(UserSettings settings) if (settings.DataLogSteamPerformance) { headerLine = String.Join(Convert.ToString((char)separator), - new string[] - { + new string[] + { "Speed (mph)", "Time (M)", "Throttle (%)", @@ -516,7 +514,7 @@ static void DataLoggerStart(UserSettings settings) "Cumulative Steam (lbs)", "Cumulative Water (lbs)", "Cutoff pressure Ratio", - + "HP MEP (psi)", "LPInitial Pressure (psi)", "LPCutoff Pressure (psi)", @@ -535,10 +533,10 @@ static void DataLoggerStart(UserSettings settings) && !settings.DataLogMisc && !settings.DataLogSteamPerformance) { - + headerLine = String.Join(Convert.ToString((char)separator), - new string[] - { + new string[] + { "speed (mph)", "power (hp)", "throttle (%)", diff --git a/Source/RunActivity/Viewer3D/Lights.cs b/Source/RunActivity/Viewer3D/Lights.cs index 00ca5d4eb6..0cc55dc704 100644 --- a/Source/RunActivity/Viewer3D/Lights.cs +++ b/Source/RunActivity/Viewer3D/Lights.cs @@ -23,10 +23,6 @@ //#define DEBUG_LIGHT_CONE //#define DEBUG_LIGHT_CONE_FULL -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Orts.Formats.Msts; @@ -35,6 +31,10 @@ using Orts.Viewer3D.Processes; using ORTS.Common; using ORTS.Scripting.Api; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; namespace Orts.Viewer3D { @@ -212,23 +212,23 @@ public static void CalculateLightCone(LightState lightState, out Vector3 positio bool UpdateState() { - Debug.Assert(Viewer.PlayerTrain.LeadLocomotive == Viewer.PlayerLocomotive || Viewer.PlayerTrain.TrainType == Train.TRAINTYPE.AI_PLAYERHOSTING || + Debug.Assert(Viewer.PlayerTrain.LeadLocomotive == Viewer.PlayerLocomotive ||Viewer.PlayerTrain.TrainType == Train.TRAINTYPE.AI_PLAYERHOSTING || Viewer.PlayerTrain.TrainType == Train.TRAINTYPE.REMOTE || Viewer.PlayerTrain.TrainType == Train.TRAINTYPE.STATIC, "PlayerTrain.LeadLocomotive must be PlayerLocomotive."); - var locomotive = Car.Train != null && Car.Train.IsActualPlayerTrain ? Viewer.PlayerLocomotive : null; + var locomotive = Car.Train != null && Car.Train.IsActualPlayerTrain ? Viewer.PlayerLocomotive : null; if (locomotive == null && Car.Train != null && Car.Train.TrainType == Train.TRAINTYPE.REMOTE && Car is MSTSLocomotive && (Car as MSTSLocomotive) == Car.Train.LeadLocomotive) locomotive = Car.Train.LeadLocomotive; - var mstsLocomotive = locomotive as MSTSLocomotive; + var mstsLocomotive = locomotive as MSTSLocomotive; // Headlight - var newTrainHeadlight = locomotive != null ? locomotive.Headlight : Car.Train != null && Car.Train.TrainType != Train.TRAINTYPE.STATIC ? 2 : 0; + var newTrainHeadlight = locomotive != null ? locomotive.Headlight : Car.Train != null && Car.Train.TrainType != Train.TRAINTYPE.STATIC ? 2 : 0; // Unit - var locomotiveFlipped = locomotive != null && locomotive.Flipped; - var locomotiveReverseCab = mstsLocomotive != null && mstsLocomotive.UsingRearCab; + var locomotiveFlipped = locomotive != null && locomotive.Flipped; + var locomotiveReverseCab = mstsLocomotive != null && mstsLocomotive.UsingRearCab; var newCarIsReversed = Car.Flipped ^ locomotiveFlipped ^ locomotiveReverseCab; - var newCarIsFirst = Car.Train == null || (locomotiveFlipped ^ locomotiveReverseCab ? Car.Train.LastCar : Car.Train.FirstCar) == Car; - var newCarIsLast = Car.Train == null || (locomotiveFlipped ^ locomotiveReverseCab ? Car.Train.FirstCar : Car.Train.LastCar) == Car; + var newCarIsFirst = Car.Train == null || (locomotiveFlipped ^ locomotiveReverseCab ? Car.Train.LastCar : Car.Train.FirstCar) == Car; + var newCarIsLast = Car.Train == null || (locomotiveFlipped ^ locomotiveReverseCab ? Car.Train.FirstCar : Car.Train.LastCar) == Car; // Penalty - var newPenalty = mstsLocomotive != null && mstsLocomotive.TrainBrakeController.EmergencyBraking; + var newPenalty = mstsLocomotive != null && mstsLocomotive.TrainBrakeController.EmergencyBraking; // Control var newCarIsPlayer = (Car.Train != null && Car.Train == Viewer.PlayerTrain) || (Car.Train != null && Car.Train.TrainType == Train.TRAINTYPE.REMOTE); // Service - if a player or AI train, then will considered to be in servie, loose consists will not be considered to be in service. @@ -678,7 +678,7 @@ public LightConePrimitive(LightViewer lightViewer, RenderProcess renderProcess, IndexBuffer.SetData(indexData); } if (BlendState_SourceZeroDestOne == null) - BlendState_SourceZeroDestOne = new BlendState + BlendState_SourceZeroDestOne = new BlendState { ColorSourceBlend = Blend.Zero, ColorDestinationBlend = Blend.One, diff --git a/Source/RunActivity/Viewer3D/MSTSSky.cs b/Source/RunActivity/Viewer3D/MSTSSky.cs index e31d0bf4be..77b2bfcbce 100644 --- a/Source/RunActivity/Viewer3D/MSTSSky.cs +++ b/Source/RunActivity/Viewer3D/MSTSSky.cs @@ -43,7 +43,7 @@ public class MSTSSkyConstants public static float mstsskyTilev; public static float mstscloudTileu; public static float mstscloudTilev; - + } #endregion @@ -115,7 +115,7 @@ public MSTSSkyDrawer(Viewer viewer) /// public void PrepareFrame(RenderFrame frame, ElapsedTime elapsedTime) { - // Adjust dome position so the bottom edge is not visible + // Adjust dome position so the bottom edge is not visible Vector3 ViewerXNAPosition = new Vector3(MSTSSkyViewer.Camera.Location.X, MSTSSkyViewer.Camera.Location.Y - 100, -MSTSSkyViewer.Camera.Location.Z); Matrix XNASkyWorldLocation = Matrix.CreateTranslation(ViewerXNAPosition); @@ -249,7 +249,7 @@ public class MSTSSkyMesh : RenderPrimitive private static int mstsskySides = MSTSSkyConstants.skySides; public int mstscloudDomeRadiusDiff = 600; // skyLevels: Used for iterating vertically through the "levels" of the hemisphere polygon - private static int mstsskyLevels = MSTSSkyConstants.skyLevels; + private static int mstsskyLevels = MSTSSkyConstants.skyLevels; private static float mstsskytextureu = MSTSSkyConstants.mstsskyTileu; private static float mstsskytexturev = MSTSSkyConstants.mstsskyTilev; private static float mstscloudtextureu = MSTSSkyConstants.mstscloudTileu; @@ -340,9 +340,9 @@ private void MSTSSkyDomeVertexList(int index, int radius, float tile_u, float ti // UV coordinates - top overlay float uvRadius; - uvRadius = (0.5f - (float)(0.5f * (i - 1)) / mstsskyLevels); + uvRadius = (0.5f - (float)(0.5f * (i - 1)) / mstsskyLevels ); float uv_u = tile_u * (0.5f - ((float)Math.Cos(MathHelper.ToRadians((360 / mstsskySides) * (mstsskySides - j))) * uvRadius)); - float uv_v = tile_v * (0.5f - ((float)Math.Sin(MathHelper.ToRadians((360 / mstsskySides) * (mstsskySides - j))) * uvRadius)); + float uv_v = tile_v * (0.5f - ((float)Math.Sin(MathHelper.ToRadians((360 / mstsskySides) * (mstsskySides - j))) * uvRadius )); // Store the position, texture coordinates and normal (normalized position vector) for the current vertex vertexList[vertexIndex].Position = new Vector3(x, y, z); @@ -354,7 +354,7 @@ private void MSTSSkyDomeVertexList(int index, int radius, float tile_u, float ti // Single vertex at zenith vertexList[vertexIndex].Position = new Vector3(0, radius, 0); vertexList[vertexIndex].Normal = new Vector3(0, 1, 0); - vertexList[vertexIndex].TextureCoordinate = new Vector2(0.5f * tile_u, 0.5f * tile_v); // (top overlay) + vertexList[vertexIndex].TextureCoordinate = new Vector2(0.5f * tile_u, 0.5f *tile_v); // (top overlay) } /// @@ -481,7 +481,7 @@ public class MSTSSkyMaterial : Material private Matrix XNAMoonMatrix; IEnumerator ShaderPassesSky; IEnumerator ShaderPassesMoon; - List> ShaderPassesClouds = new List>(); + List>ShaderPassesClouds = new List>(); private float mstsskytexturex; private float mstsskytexturey; private float mstscloudtexturex; @@ -491,13 +491,13 @@ public MSTSSkyMaterial(Viewer viewer) : base(viewer, null) { MSTSSkyShader = Viewer.MaterialManager.SkyShader; - + //// TODO: This should happen on the loader thread. if (viewer.ENVFile.SkyLayers != null) { var mstsskytexture = Viewer.ENVFile.SkyLayers.ToArray(); int count = Viewer.ENVFile.SkyLayers.Count; - + string[] mstsSkyTexture = new string[Viewer.ENVFile.SkyLayers.Count]; @@ -505,14 +505,14 @@ public MSTSSkyMaterial(Viewer viewer) { mstsSkyTexture[i] = Viewer.Simulator.RoutePath + @"\envfiles\textures\" + mstsskytexture[i].TextureName.ToString(); MSTSSkyTexture.Add(Orts.Formats.Msts.AceFile.Texture2DFromFile(Viewer.RenderProcess.GraphicsDevice, mstsSkyTexture[i])); - if (i == 0) + if( i == 0 ) { MSTSDayTexture = MSTSSkyTexture[i]; mstsskytexturex = mstsskytexture[i].TileX; mstsskytexturey = mstsskytexture[i].TileY; } - else if (mstsskytexture[i].FadeInBeginTime != null) + else if(mstsskytexture[i].FadeInBeginTime != null) { MSTSSkyStarTexture = MSTSSkyTexture[i]; mstsskytexturex = mstsskytexture[i].TileX; diff --git a/Source/RunActivity/Viewer3D/Materials.cs b/Source/RunActivity/Viewer3D/Materials.cs index acfb9712b9..c27666b4aa 100644 --- a/Source/RunActivity/Viewer3D/Materials.cs +++ b/Source/RunActivity/Viewer3D/Materials.cs @@ -87,7 +87,7 @@ public Texture2D Get(string path, Texture2D defaultTexture, bool required = fals else if (Path.GetExtension(path) == ".ace") { var alternativeTexture = Path.ChangeExtension(path, ".dds"); - + if (File.Exists(alternativeTexture)) { DDSLib.DDSFromFile(alternativeTexture, GraphicsDevice, true, out texture); @@ -195,7 +195,7 @@ public static Texture2D Get(GraphicsDevice graphicsDevice, string path) return SharedMaterialManager.MissingTexture; } } - + public void Mark() { TextureMarks.Clear(); @@ -370,7 +370,7 @@ public Material Load(string materialName, string textureName = null, int options return Materials[materialKey]; } - public bool LoadNightTextures() + public bool LoadNightTextures() { int count = 0; foreach (SceneryMaterial material in from material in Materials.Values @@ -391,11 +391,11 @@ public bool LoadNightTextures() } } return true; - } + } - public bool LoadDayTextures() - { - int count = 0; + public bool LoadDayTextures() + { + int count = 0; foreach (SceneryMaterial material in from material in Materials.Values where material is SceneryMaterial select material) @@ -412,9 +412,9 @@ public bool LoadDayTextures() return false; // too bad, no more space, other night textures won't be loaded } } - } - return true; - } + } + return true; + } public void Mark() { @@ -438,7 +438,7 @@ public void Sweep() { foreach (var path in MaterialMarks.Where(kvp => !kvp.Value).Select(kvp => kvp.Key)) Materials.Remove(path); - } + } public void LoadPrep() { @@ -471,13 +471,13 @@ public string GetStatus() float distance = 1000; internal void UpdateShaders() { - if (Viewer.Settings.UseMSTSEnv == false) + if(Viewer.Settings.UseMSTSEnv == false) sunDirection = Viewer.World.Sky.SolarDirection; else sunDirection = Viewer.World.MSTSSky.mstsskysolarDirection; SceneryShader.SetLightVector_ZFar(sunDirection, Viewer.Settings.ViewingDistance); - + // Headlight illumination if (Viewer.PlayerLocomotiveViewer != null && Viewer.PlayerLocomotiveViewer.lightDrawer != null @@ -516,13 +516,13 @@ internal void UpdateShaders() else if (sunDirection.Y >= 0.15) { clampValue = 0.5f; // at daytime min headlight - distance = lightDrawer.LightConeDistance * 0.1f; // and min distance + distance = lightDrawer.LightConeDistance*0.1f; // and min distance } else { clampValue = 1 - 2.5f * (sunDirection.Y + 0.05f); // in the meantime interpolate - distance = lightDrawer.LightConeDistance * (1 - 4.5f * (sunDirection.Y + 0.05f)); //ditto + distance = lightDrawer.LightConeDistance*(1-4.5f*(sunDirection.Y + 0.05f)); //ditto } SceneryShader.SetHeadlight(ref lightDrawer.LightConePosition, ref lightDrawer.LightConeDirection, distance, lightDrawer.LightConeMinDotProduct, (float)(Viewer.Simulator.GameTime - fadeStartTimer), fadeDuration, clampValue, ref lightDrawer.LightConeColor); } @@ -578,7 +578,7 @@ public override string ToString() { if (String.IsNullOrEmpty(Key)) return 0; - return Key.Length % 10; + return Key.Length%10; } [CallOnThread("Loader")] @@ -708,8 +708,7 @@ public class SceneryMaterial : Material IEnumerator ShaderPassesImage; IEnumerator ShaderPassesVegetation; IEnumerator ShaderPasses; - public static readonly DepthStencilState DepthReadCompareLess = new DepthStencilState - { + public static readonly DepthStencilState DepthReadCompareLess = new DepthStencilState { DepthBufferWriteEnable = false, DepthBufferFunction = CompareFunction.Less, }; @@ -724,13 +723,13 @@ public SceneryMaterial(Viewer viewer, string texturePath, SceneryMaterialOptions Texture = SharedMaterialManager.MissingTexture; NightTexture = SharedMaterialManager.MissingTexture; // if "trainset" is in the path (true for night textures for 3DCabs) deferred load of night textures is disabled - if (!String.IsNullOrEmpty(texturePath) && (Options & SceneryMaterialOptions.NightTexture) != 0 && ((!viewer.IsDaytime && !viewer.IsNighttime) + if (!String.IsNullOrEmpty(texturePath) && (Options & SceneryMaterialOptions.NightTexture) != 0 && ((!viewer.IsDaytime && !viewer.IsNighttime) || TexturePath.Contains(@"\trainset\"))) { var nightTexturePath = Helpers.GetNightTextureFile(Viewer.Simulator, texturePath); if (!String.IsNullOrEmpty(nightTexturePath)) NightTexture = Viewer.TextureManager.Get(nightTexturePath.ToLower()); - Texture = Viewer.TextureManager.Get(texturePath, true); + Texture = Viewer.TextureManager.Get(texturePath, true); } else if ((Options & SceneryMaterialOptions.NightTexture) != 0 && viewer.IsDaytime) { @@ -761,14 +760,14 @@ public SceneryMaterial(Viewer viewer, string texturePath, SceneryMaterialOptions } - public bool LoadNightTexture() - { + public bool LoadNightTexture () + { bool oneMore = false; - if (((Options & SceneryMaterialOptions.NightTexture) != 0) && (NightTexture == SharedMaterialManager.MissingTexture)) + if (((Options & SceneryMaterialOptions.NightTexture) != 0) && (NightTexture == SharedMaterialManager.MissingTexture)) { var nightTexturePath = Helpers.GetNightTextureFile(Viewer.Simulator, TexturePath); if (!String.IsNullOrEmpty(nightTexturePath)) - { + { NightTexture = Viewer.TextureManager.Get(nightTexturePath.ToLower()); oneMore = true; } @@ -776,16 +775,16 @@ public bool LoadNightTexture() return oneMore; } - public bool LoadDayTexture() - { - bool oneMore = false; - if (Texture == SharedMaterialManager.MissingTexture && !String.IsNullOrEmpty(TexturePath)) - { + public bool LoadDayTexture () + { + bool oneMore = false; + if (Texture == SharedMaterialManager.MissingTexture && !String.IsNullOrEmpty(TexturePath)) + { Texture = Viewer.TextureManager.Get(TexturePath.ToLower()); oneMore = true; - } - return oneMore; - } + } + return oneMore; + } public override void SetState(GraphicsDevice graphicsDevice, Material previousMaterial) { @@ -895,7 +894,7 @@ public override void SetState(GraphicsDevice graphicsDevice, Material previousMa shader.ImageTexture = NightTexture; shader.ImageTextureIsNight = true; } - else + else { shader.ImageTexture = Texture; shader.ImageTextureIsNight = false; @@ -986,8 +985,7 @@ public override SamplerState GetShadowTextureAddressMode() SamplerStates.Add(textureAddressMode, new Dictionary()); if (!SamplerStates[textureAddressMode].ContainsKey(mipMapBias)) - SamplerStates[textureAddressMode].Add(mipMapBias, new SamplerState - { + SamplerStates[textureAddressMode].Add(mipMapBias, new SamplerState { AddressU = textureAddressMode, AddressV = textureAddressMode, Filter = TextureFilter.Anisotropic, @@ -1029,11 +1027,11 @@ public ShadowMapMaterial(Viewer viewer) var shadowMapResolution = Viewer.Settings.ShadowMapResolution; BlurVertexBuffer = new VertexBuffer(Viewer.RenderProcess.GraphicsDevice, typeof(VertexPositionTexture), 4, BufferUsage.WriteOnly); BlurVertexBuffer.SetData(new[] { - new VertexPositionTexture(new Vector3(-1, +1, 0), new Vector2(0, 0)), - new VertexPositionTexture(new Vector3(-1, -1, 0), new Vector2(0, shadowMapResolution)), - new VertexPositionTexture(new Vector3(+1, +1, 0), new Vector2(shadowMapResolution, 0)), - new VertexPositionTexture(new Vector3(+1, -1, 0), new Vector2(shadowMapResolution, shadowMapResolution)), - }); + new VertexPositionTexture(new Vector3(-1, +1, 0), new Vector2(0, 0)), + new VertexPositionTexture(new Vector3(-1, -1, 0), new Vector2(0, shadowMapResolution)), + new VertexPositionTexture(new Vector3(+1, +1, 0), new Vector2(shadowMapResolution, 0)), + new VertexPositionTexture(new Vector3(+1, -1, 0), new Vector2(shadowMapResolution, shadowMapResolution)), + }); } public void SetState(GraphicsDevice graphicsDevice, Mode mode) @@ -1126,9 +1124,9 @@ public void SetState(GraphicsDevice graphicsDevice, Texture2D screen) shader.Screen = screen; shader.GlassColor = Color.Black; - graphicsDevice.BlendState = BlendState.NonPremultiplied; - graphicsDevice.RasterizerState = RasterizerState.CullNone; - graphicsDevice.DepthStencilState = DepthStencilState.None; + graphicsDevice.BlendState = BlendState.NonPremultiplied; + graphicsDevice.RasterizerState = RasterizerState.CullNone; + graphicsDevice.DepthStencilState = DepthStencilState.None; } public void Render(GraphicsDevice graphicsDevice, RenderPrimitive renderPrimitive, ref Matrix XNAWorldMatrix, ref Matrix XNAViewMatrix, ref Matrix XNAProjectionMatrix) @@ -1148,9 +1146,9 @@ public void Render(GraphicsDevice graphicsDevice, RenderPrimitive renderPrimitiv public override void ResetState(GraphicsDevice graphicsDevice) { - graphicsDevice.BlendState = BlendState.Opaque; - graphicsDevice.RasterizerState = RasterizerState.CullCounterClockwise; - graphicsDevice.DepthStencilState = DepthStencilState.Default; + graphicsDevice.BlendState = BlendState.Opaque; + graphicsDevice.RasterizerState = RasterizerState.CullCounterClockwise; + graphicsDevice.DepthStencilState = DepthStencilState.Default; } public override bool GetBlending() @@ -1222,7 +1220,7 @@ public SolidColorMaterial(Viewer viewer, float a, float r, float g, float b) { basicEffect = new BasicEffect(Viewer.RenderProcess.GraphicsDevice); basicEffect.Alpha = a; - basicEffect.DiffuseColor = new Vector3(r, g, b); + basicEffect.DiffuseColor = new Vector3(r , g , b ); basicEffect.SpecularColor = new Vector3(0.25f, 0.25f, 0.25f); basicEffect.SpecularPower = 5.0f; basicEffect.AmbientLightColor = new Vector3(0.2f, 0.2f, 0.2f); diff --git a/Source/RunActivity/Viewer3D/Noise.cs b/Source/RunActivity/Viewer3D/Noise.cs index 70e9252e65..4e849bd1c5 100644 --- a/Source/RunActivity/Viewer3D/Noise.cs +++ b/Source/RunActivity/Viewer3D/Noise.cs @@ -43,11 +43,11 @@ public static float Generate(float x) float n0, n1; - float t0 = 1.0f - x0 * x0; + float t0 = 1.0f - x0*x0; t0 *= t0; n0 = t0 * t0 * grad(perm[i0 & 0xff], x0); - float t1 = 1.0f - x1 * x1; + float t1 = 1.0f - x1*x1; t1 *= t1; n1 = t1 * t1 * grad(perm[i1 & 0xff], x1); // The maximum value of this noise is 8*(3/4)^4 = 2.53125 @@ -69,23 +69,23 @@ public static float Generate(float x, float y) float n0, n1, n2; // Noise contributions from the three corners // Skew the input space to determine which simplex cell we're in - float s = (x + y) * F2; // Hairy factor for 2D + float s = (x+y)*F2; // Hairy factor for 2D float xs = x + s; float ys = y + s; int i = FastFloor(xs); int j = FastFloor(ys); - float t = (float)(i + j) * G2; - float X0 = i - t; // Unskew the cell origin back to (x,y) space - float Y0 = j - t; - float x0 = x - X0; // The x,y distances from the cell origin - float y0 = y - Y0; + float t = (float)(i+j)*G2; + float X0 = i-t; // Unskew the cell origin back to (x,y) space + float Y0 = j-t; + float x0 = x-X0; // The x,y distances from the cell origin + float y0 = y-Y0; // For the 2D case, the simplex shape is an equilateral triangle. // Determine which simplex we are in. int i1, j1; // Offsets for second (middle) corner of simplex in (i,j) coords - if (x0 > y0) { i1 = 1; j1 = 0; } // lower triangle, XY order: (0,0)->(1,0)->(1,1) - else { i1 = 0; j1 = 1; } // upper triangle, YX order: (0,0)->(0,1)->(1,1) + if(x0>y0) {i1=1; j1=0;} // lower triangle, XY order: (0,0)->(1,0)->(1,1) + else {i1=0; j1=1;} // upper triangle, YX order: (0,0)->(0,1)->(1,1) // A step of (1,0) in (i,j) means a step of (1-c,-c) in (x,y), and // a step of (0,1) in (i,j) means a step of (-c,1-c) in (x,y), where @@ -101,28 +101,25 @@ public static float Generate(float x, float y) int jj = j % 256; // Calculate the contribution from the three corners - float t0 = 0.5f - x0 * x0 - y0 * y0; - if (t0 < 0.0f) n0 = 0.0f; - else - { + float t0 = 0.5f - x0*x0-y0*y0; + if(t0 < 0.0f) n0 = 0.0f; + else { t0 *= t0; - n0 = t0 * t0 * grad(perm[ii + perm[jj]], x0, y0); + n0 = t0 * t0 * grad(perm[ii+perm[jj]], x0, y0); } - float t1 = 0.5f - x1 * x1 - y1 * y1; - if (t1 < 0.0f) n1 = 0.0f; - else - { + float t1 = 0.5f - x1*x1-y1*y1; + if(t1 < 0.0f) n1 = 0.0f; + else { t1 *= t1; - n1 = t1 * t1 * grad(perm[ii + i1 + perm[jj + j1]], x1, y1); + n1 = t1 * t1 * grad(perm[ii+i1+perm[jj+j1]], x1, y1); } - float t2 = 0.5f - x2 * x2 - y2 * y2; - if (t2 < 0.0f) n2 = 0.0f; - else - { + float t2 = 0.5f - x2*x2-y2*y2; + if(t2 < 0.0f) n2 = 0.0f; + else { t2 *= t2; - n2 = t2 * t2 * grad(perm[ii + 1 + perm[jj + 1]], x2, y2); + n2 = t2 * t2 * grad(perm[ii+1+perm[jj+1]], x2, y2); } // Add contributions from each corner to get the final noise value. @@ -130,7 +127,7 @@ public static float Generate(float x, float y) return 40.0f * (n0 + n1 + n2); // TODO: The scale factor is preliminary! } - + public static float Generate(float x, float y, float z) { // Simple skewing factors for the 3D case @@ -140,21 +137,21 @@ public static float Generate(float x, float y, float z) float n0, n1, n2, n3; // Noise contributions from the four corners // Skew the input space to determine which simplex cell we're in - float s = (x + y + z) * F3; // Very nice and simple skew factor for 3D - float xs = x + s; - float ys = y + s; - float zs = z + s; + float s = (x+y+z)*F3; // Very nice and simple skew factor for 3D + float xs = x+s; + float ys = y+s; + float zs = z+s; int i = FastFloor(xs); int j = FastFloor(ys); int k = FastFloor(zs); - float t = (float)(i + j + k) * G3; - float X0 = i - t; // Unskew the cell origin back to (x,y,z) space - float Y0 = j - t; - float Z0 = k - t; - float x0 = x - X0; // The x,y,z distances from the cell origin - float y0 = y - Y0; - float z0 = z - Z0; + float t = (float)(i+j+k)*G3; + float X0 = i-t; // Unskew the cell origin back to (x,y,z) space + float Y0 = j-t; + float Z0 = k-t; + float x0 = x-X0; // The x,y,z distances from the cell origin + float y0 = y-Y0; + float z0 = z-Z0; // For the 3D case, the simplex shape is a slightly irregular tetrahedron. // Determine which simplex we are in. @@ -162,18 +159,16 @@ public static float Generate(float x, float y, float z) int i2, j2, k2; // Offsets for third corner of simplex in (i,j,k) coords /* This code would benefit from a backport from the GLSL version! */ - if (x0 >= y0) - { - if (y0 >= z0) - { i1 = 1; j1 = 0; k1 = 0; i2 = 1; j2 = 1; k2 = 0; } // X Y Z order - else if (x0 >= z0) { i1 = 1; j1 = 0; k1 = 0; i2 = 1; j2 = 0; k2 = 1; } // X Z Y order - else { i1 = 0; j1 = 0; k1 = 1; i2 = 1; j2 = 0; k2 = 1; } // Z X Y order - } - else - { // x0=y0) { + if(y0>=z0) + { i1=1; j1=0; k1=0; i2=1; j2=1; k2=0; } // X Y Z order + else if(x0>=z0) { i1=1; j1=0; k1=0; i2=1; j2=0; k2=1; } // X Z Y order + else { i1=0; j1=0; k1=1; i2=1; j2=0; k2=1; } // Z X Y order + } + else { // x0= Viewer.PlayerTrain.Cars.Count ? " " : Viewer.PlayerTrain.Cars[CarPosition].CarID), LabelAlignment.Center)); + vbox.Add(ID = new Label(vbox.RemainingWidth, Owner.TextFontDefault.Height, Viewer.Catalog.GetString("Car ID") + " " + (CarPosition >= Viewer.PlayerTrain.Cars.Count? " " :Viewer.PlayerTrain.Cars[CarPosition].CarID), LabelAlignment.Center)); ID.Color = Color.Red; vbox.AddHorizontalSeparator(); vbox.Add(buttonHandbrake = new Label(vbox.RemainingWidth, Owner.TextFontDefault.Height, Viewer.Catalog.GetString("Toggle Handbrake"), LabelAlignment.Center)); diff --git a/Source/RunActivity/Viewer3D/Popups/CompassWindow.cs b/Source/RunActivity/Viewer3D/Popups/CompassWindow.cs index b21e399d3e..7a9f64b944 100644 --- a/Source/RunActivity/Viewer3D/Popups/CompassWindow.cs +++ b/Source/RunActivity/Viewer3D/Popups/CompassWindow.cs @@ -17,40 +17,40 @@ // This file is the responsibility of the 3D & Environment Team. -using System; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Orts.Common; using ORTS.Common; +using System; namespace Orts.Viewer3D.Popups { - public class CompassWindow : Window - { - PopupCompass Compass; - Label Latitude; - Label Longitude; + public class CompassWindow : Window + { + PopupCompass Compass; + Label Latitude; + Label Longitude; - public CompassWindow(WindowManager owner) - : base(owner, Window.DecorationSize.X + owner.TextFontDefault.Height * 15, Window.DecorationSize.Y + owner.TextFontDefault.Height * 4, Viewer.Catalog.GetString("Compass")) - { - } + public CompassWindow(WindowManager owner) + : base(owner, Window.DecorationSize.X + owner.TextFontDefault.Height * 15, Window.DecorationSize.Y + owner.TextFontDefault.Height * 4, Viewer.Catalog.GetString("Compass")) + { + } - protected override ControlLayout Layout(ControlLayout layout) - { - var vbox = base.Layout(layout).AddLayoutVertical(); - vbox.Add(Compass = new PopupCompass(vbox.RemainingWidth, vbox.RemainingHeight - vbox.TextHeight)); - { - var hbox = vbox.AddLayoutHorizontalLineOfText(); - var w = hbox.RemainingWidth / 9; - hbox.Add(new Label(1 * w, hbox.RemainingHeight, Viewer.Catalog.GetString("Lat:"), LabelAlignment.Right)); - hbox.Add(Latitude = new Label(3 * w, hbox.RemainingHeight, "000.000000", LabelAlignment.Right)); - hbox.AddSpace(w, hbox.RemainingHeight); - hbox.Add(new Label(1 * w, hbox.RemainingHeight, Viewer.Catalog.GetString("Lon:"), LabelAlignment.Right)); - hbox.Add(Longitude = new Label(3 * w, hbox.RemainingHeight, "000.000000", LabelAlignment.Right)); - } - return vbox; - } + protected override ControlLayout Layout(ControlLayout layout) + { + var vbox = base.Layout(layout).AddLayoutVertical(); + vbox.Add(Compass = new PopupCompass(vbox.RemainingWidth, vbox.RemainingHeight - vbox.TextHeight)); + { + var hbox = vbox.AddLayoutHorizontalLineOfText(); + var w = hbox.RemainingWidth / 9; + hbox.Add(new Label(1 * w, hbox.RemainingHeight, Viewer.Catalog.GetString("Lat:"), LabelAlignment.Right)); + hbox.Add(Latitude = new Label(3 * w, hbox.RemainingHeight, "000.000000", LabelAlignment.Right)); + hbox.AddSpace(w, hbox.RemainingHeight); + hbox.Add(new Label(1 * w, hbox.RemainingHeight, Viewer.Catalog.GetString("Lon:"), LabelAlignment.Right)); + hbox.Add(Longitude = new Label(3 * w, hbox.RemainingHeight, "000.000000", LabelAlignment.Right)); + } + return vbox; + } public override void PrepareFrame(ElapsedTime elapsedTime, bool updateFull) { @@ -70,20 +70,20 @@ public override void PrepareFrame(ElapsedTime elapsedTime, bool updateFull) Latitude.Text = MathHelper.ToDegrees((float)latitude).ToString("F6"); Longitude.Text = MathHelper.ToDegrees((float)longitude).ToString("F6"); } - } - } + } + } - public class PopupCompass : Control - { - static Texture2D CompassTexture; - static int[] HeadingHalfWidths; + public class PopupCompass : Control + { + static Texture2D CompassTexture; + static int[] HeadingHalfWidths; WindowTextFont Font; - public float Heading; + public float Heading; - public PopupCompass(int width, int height) - : base(0, 0, width, height) - { - } + public PopupCompass(int width, int height) + : base(0, 0, width, height) + { + } public override void Initialize(WindowManager windowManager) { @@ -126,5 +126,5 @@ internal override void Draw(SpriteBatch spriteBatch, Point offset) } spriteBatch.Draw(CompassTexture, new Rectangle(offset.X + Position.X + Position.Width / 2, offset.Y + Position.Bottom - height, 1, height), Color.White); } - } + } } diff --git a/Source/RunActivity/Viewer3D/Popups/ComposeMessage.cs b/Source/RunActivity/Viewer3D/Popups/ComposeMessage.cs index efeef920fc..7da738d485 100644 --- a/Source/RunActivity/Viewer3D/Popups/ComposeMessage.cs +++ b/Source/RunActivity/Viewer3D/Popups/ComposeMessage.cs @@ -17,10 +17,10 @@ // This file is the responsibility of the 3D & Environment Team. -using System.Linq; using Microsoft.Xna.Framework.Input; using Orts.MultiPlayer; using ORTS.Common; +using System.Linq; namespace Orts.Viewer3D.Popups { diff --git a/Source/RunActivity/Viewer3D/Popups/EOTListWindow.cs b/Source/RunActivity/Viewer3D/Popups/EOTListWindow.cs index aa14104ede..51849c3252 100644 --- a/Source/RunActivity/Viewer3D/Popups/EOTListWindow.cs +++ b/Source/RunActivity/Viewer3D/Popups/EOTListWindow.cs @@ -18,11 +18,17 @@ // This file is the responsibility of the 3D & Environment Team. using System; +using System.Collections.Generic; using System.IO; using Microsoft.Xna.Framework; -using Orts.Common; +using Microsoft.Xna.Framework.Graphics; using Orts.Simulation; +using Orts.Simulation.AIs; +using Orts.Simulation.Physics; +using Orts.Simulation.RollingStocks.SubSystems; +using Orts.Common; using ORTS.Common; +using ORTS.Common.Input; namespace Orts.Viewer3D.Popups { @@ -54,13 +60,13 @@ protected override ControlLayout Layout(ControlLayout layout) EOTLabel filename, foldername; line.Add(filename = new EOTLabel(colWidth, line.RemainingHeight, Owner.Viewer, eotType, Path.GetFileNameWithoutExtension(eotType), LabelAlignment.Left)); line.Add(foldername = new EOTLabel(colWidth - Owner.TextFontDefault.Height, line.RemainingHeight, Owner.Viewer, eotType, (Path.GetDirectoryName(eotType)).Remove(0, Owner.Viewer.Simulator.EOTPath.Length), LabelAlignment.Left)); - if (playerLocomotive?.Train != null && eotType.ToLower() == playerLocomotive.Train.EOT?.WagFilePath.ToLower()) - { + if (playerLocomotive?.Train != null && eotType.ToLower() == playerLocomotive.Train.EOT?.WagFilePath.ToLower()) + { filename.Color = Color.Red; foldername.Color = Color.Red; } } - } + } return vbox; } @@ -121,4 +127,4 @@ void EOTListLabel_Click(Control arg1, Point arg2) } } } -} + } diff --git a/Source/RunActivity/Viewer3D/Popups/HUDWindow.cs b/Source/RunActivity/Viewer3D/Popups/HUDWindow.cs index 62ba2634f3..82ab0736dd 100644 --- a/Source/RunActivity/Viewer3D/Popups/HUDWindow.cs +++ b/Source/RunActivity/Viewer3D/Popups/HUDWindow.cs @@ -18,11 +18,6 @@ // This file is the responsibility of the 3D & Environment Team. #define SHOW_PHYSICS_GRAPHS //Matej Pacha - if commented, the physics graphs are not ready for public release -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Orts.Simulation.AIs; @@ -35,6 +30,12 @@ using Orts.Viewer3D.Processes; using ORTS.Common; using ORTS.Scripting.Api; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices; namespace Orts.Viewer3D.Popups { @@ -212,8 +213,8 @@ public override void PrepareFrame(RenderFrame frame, ElapsedTime elapsedTime, bo LocomotiveGraphsThrottle.AddSample(loco.ThrottlePercent * 0.01f); if (locoD != null) { - LocomotiveGraphsInputPower.AddSample(locoD.DieselEngines.MaxOutputPowerW / locoD.DieselEngines.MaxPowerW); - LocomotiveGraphsOutputPower.AddSample(locoD.DieselEngines.PowerW / locoD.DieselEngines.MaxPowerW); + LocomotiveGraphsInputPower.AddSample(locoD.DieselEngines.MaxOutputPowerW / locoD.DieselEngines.MaxPowerW); + LocomotiveGraphsOutputPower.AddSample(locoD.DieselEngines.PowerW / locoD.DieselEngines.MaxPowerW); } if (locoE != null) { @@ -479,7 +480,7 @@ void TextPageCommon(TableData table) else if (Viewer.PlayerTrain.IsWheelSlipWarninq) TableAddLine(table, Viewer.Catalog.GetString("Wheel slip warning") + "???"); - if (Viewer.PlayerTrain.IsBrakeSkid) + if (Viewer.PlayerTrain.IsBrakeSkid ) TableAddLine(table, Viewer.Catalog.GetString("Wheel skid") + "!!!"); if (Viewer.PlayerLocomotive.GetSanderOn()) @@ -491,7 +492,7 @@ void TextPageCommon(TableData table) TableAddLine(table, Viewer.Catalog.GetString("Sander on") + "???"); } - bool flipped = (Viewer.PlayerLocomotive as MSTSLocomotive).GetCabFlipped() ^ (Viewer.PlayerLocomotive as MSTSLocomotive).Flipped; + bool flipped = (Viewer.PlayerLocomotive as MSTSLocomotive).GetCabFlipped() ^ (Viewer.PlayerLocomotive as MSTSLocomotive).Flipped; var doorLeftOpen = Viewer.PlayerLocomotive.Train.DoorState(flipped ? DoorSide.Right : DoorSide.Left) != DoorState.Closed; var doorRightOpen = Viewer.PlayerLocomotive.Train.DoorState(flipped ? DoorSide.Left : DoorSide.Right) != DoorState.Closed; if (doorLeftOpen || doorRightOpen) @@ -530,7 +531,7 @@ void TextPageConsistInfo(TableData table) float tonnage = 0f; foreach (var car in train.Cars) { - if (car.WagonType == TrainCar.WagonTypes.Freight || car.WagonType == TrainCar.WagonTypes.Passenger) + if(car.WagonType == TrainCar.WagonTypes.Freight || car.WagonType == TrainCar.WagonTypes.Passenger) tonnage += car.MassKG; } TableSetCells(table, 0, @@ -645,7 +646,7 @@ void TextPageDistributedPowerInfo(TableData table) var train = locomotive.Train; int numberOfDieselLocomotives = 0; - for (var i = 0; i < train.Cars.Count; i++) + for (var i = 0; i 1 ? atext[0].PadRight(nvalmargin[nmargin]) + " = " + atext[1] : text); + if (!lDebriefEvalFile) wDbfEval.WriteLine(atext.Length > 1 ? atext[0].PadRight(nvalmargin[nmargin]) + " = " + atext[1]: text); } else { - if (!lDebriefEvalFile) wDbfEval.Write(atext.Length > 1 ? atext[0].PadRight(nvalmargin[nmargin]) + " = " + atext[1] : text.PadRight(nvalmargin[nmargin])); + if (!lDebriefEvalFile) wDbfEval.Write(atext.Length > 1 ? atext[0].PadRight(nvalmargin[nmargin]) + " = " + atext[1]: text.PadRight(nvalmargin[nmargin])); } if (!lDebriefEvalFile) @@ -1139,7 +1140,7 @@ private void outmesssage(string text, int colW, bool bScroll, int nmargin) line.Add(new Label(colW, line.RemainingHeight, Viewer.Catalog.GetString(text))); } } - + private void consolewltext(string text) { if (!lDebriefEvalFile) wDbfEval.WriteLine(text + "."); @@ -1169,7 +1170,7 @@ protected override ControlLayout Layout(ControlLayout layout) var label = new Label(tabWidth, hbox.RemainingHeight, Tabs[i].TabLabel, LabelAlignment.Center) { Color = ActiveTab == i ? Color.White : Color.Gray, Tag = i }; label.Click += label_Click; hbox.Add(label); - + } vbox.AddHorizontalSeparator(); Tabs[ActiveTab].Layout(vbox); @@ -1209,10 +1210,10 @@ public TabData(Tab tab, string tabLabel, Action layout) } } - + ActivityTask LastActivityTask; bool StoppedAt; - + public override void PrepareFrame(ElapsedTime elapsedTime, bool updateFull) { diff --git a/Source/RunActivity/Viewer3D/Popups/LayeredWindow.cs b/Source/RunActivity/Viewer3D/Popups/LayeredWindow.cs index 41a68b39f3..b51b7c18cf 100644 --- a/Source/RunActivity/Viewer3D/Popups/LayeredWindow.cs +++ b/Source/RunActivity/Viewer3D/Popups/LayeredWindow.cs @@ -22,20 +22,20 @@ namespace Orts.Viewer3D.Popups { public abstract class LayeredWindow : Window - { - public LayeredWindow(WindowManager owner, int width, int height, string caption) - : base(owner, width, height, caption) - { - } + { + public LayeredWindow(WindowManager owner, int width, int height, string caption) + : base(owner, width, height, caption) + { + } - protected override ControlLayout Layout(ControlLayout layout) - { - return layout; - } + protected override ControlLayout Layout(ControlLayout layout) + { + return layout; + } - public override void Draw(GraphicsDevice graphicsDevice) - { - // Don't draw the normal window stuff here. - } - } + public override void Draw(GraphicsDevice graphicsDevice) + { + // Don't draw the normal window stuff here. + } + } } diff --git a/Source/RunActivity/Viewer3D/Popups/MessagesWindow.cs b/Source/RunActivity/Viewer3D/Popups/MessagesWindow.cs index 72a0c57cf8..f7e3306984 100644 --- a/Source/RunActivity/Viewer3D/Popups/MessagesWindow.cs +++ b/Source/RunActivity/Viewer3D/Popups/MessagesWindow.cs @@ -17,13 +17,13 @@ // This file is the responsibility of the 3D & Environment Team. +using Microsoft.Xna.Framework; +using ORTS.Common; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading; -using Microsoft.Xna.Framework; -using ORTS.Common; namespace Orts.Viewer3D.Popups { @@ -40,19 +40,19 @@ public class MessagesWindow : LayeredWindow List Messages = new List(); bool MessagesChanged; - public List GetTextMessages() - { - List text = null; - foreach (var m in Messages) - { - if (true/*m.Text.StartsWith("TEXT")*/) - { - if (text == null) text = new List(); - text.Add(m.Text); - } - } - return text; - } + public List GetTextMessages() + { + List text = null; + foreach (var m in Messages) + { + if (true/*m.Text.StartsWith("TEXT")*/) + { + if (text == null) text = new List(); + text.Add(m.Text); + } + } + return text; + } public MessagesWindow(WindowManager owner) : base(owner, HorizontalPadding, VerticalPadding, "Messages") { @@ -72,14 +72,14 @@ protected internal override void Restore(BinaryReader inf) { base.Restore(inf); var messages = new List(inf.ReadInt32()); - for (var i = 0; i < messages.Capacity; i++) + for( var i = 0; i < messages.Capacity; i++ ) { messages.Add(new Message(inf)); // Reset the EndTime so the message lasts as long on restore as it did orginally. // Without this reset, the band may last a very long time. var last = messages.Count - 1; var message = messages[last]; - message.EndTime = Owner.Viewer.Simulator.GameTime + (message.EndTime - message.StartTime); + message.EndTime = Owner.Viewer.Simulator.GameTime + (message.EndTime - message.StartTime); MessagesChanged = true; } Messages = messages; @@ -118,7 +118,7 @@ protected override ControlLayout Layout(ControlLayout layout) var maxLines = vbox.RemainingHeight / TextSize; var messages = Messages.Take(maxLines).Reverse().ToList(); vbox.AddSpace(0, vbox.RemainingHeight - TextSize * messages.Count); - foreach (var message in messages) + foreach( var message in messages ) { var hbox = vbox.AddLayoutHorizontal(TextSize); var width = Owner.Viewer.WindowManager.TextFontDefault.MeasureString(message.Text); diff --git a/Source/RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs b/Source/RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs index d6fe9c7567..50d84b2587 100644 --- a/Source/RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs +++ b/Source/RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs @@ -17,13 +17,22 @@ // This file is the responsibility of the 3D & Environment Team. +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ORTS.Common; +using ORTS.Common.Input; +using Orts.Simulation.Physics; +using Orts.Simulation.RollingStocks; +using Orts.Simulation.RollingStocks.SubSystems.Brakes; using System; using System.Collections.Generic; -using System.IO; +using System.Globalization; using System.Linq; -using Microsoft.Xna.Framework; +using System.Text; + +using System.Threading; +using System.IO; using Orts.MultiPlayer; -using ORTS.Common; namespace Orts.Viewer3D.Popups { @@ -110,7 +119,7 @@ protected internal override void Initialize() { base.Initialize(); // Reset window size - if (!Owner.Viewer.Simulator.TimetableMode) + if(!Owner.Viewer.Simulator.TimetableMode) UpdateWindowSize(); } @@ -179,7 +188,7 @@ protected override ControlLayout Layout(ControlLayout layout) void FontToBold_Click(Control arg1, Point arg2) { FontChanged = true; - FontToBold = !FontToBold; + FontToBold = !FontToBold; UpdateWindowSize(); } diff --git a/Source/RunActivity/Viewer3D/Popups/NextStationWindow.cs b/Source/RunActivity/Viewer3D/Popups/NextStationWindow.cs index 8ad59badfa..cd39a4bdf4 100644 --- a/Source/RunActivity/Viewer3D/Popups/NextStationWindow.cs +++ b/Source/RunActivity/Viewer3D/Popups/NextStationWindow.cs @@ -17,14 +17,14 @@ // This file is the responsibility of the 3D & Environment Team. -using System; -using System.Collections.Generic; using Microsoft.Xna.Framework; using Orts.Simulation; using Orts.Simulation.Physics; -using Orts.Simulation.Signalling; using Orts.Simulation.Timetables; +using Orts.Simulation.Signalling; using ORTS.Common; +using System; +using System.Collections.Generic; namespace Orts.Viewer3D.Popups { diff --git a/Source/RunActivity/Viewer3D/Popups/OSDCars.cs b/Source/RunActivity/Viewer3D/Popups/OSDCars.cs index 47af9c92b7..4da23f0330 100644 --- a/Source/RunActivity/Viewer3D/Popups/OSDCars.cs +++ b/Source/RunActivity/Viewer3D/Popups/OSDCars.cs @@ -17,11 +17,12 @@ // This file is the responsibility of the 3D & Environment Team. -using System.Collections.Generic; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Orts.Simulation.RollingStocks; using ORTS.Common; using ORTS.Settings; +using System.Collections.Generic; namespace Orts.Viewer3D.Popups { diff --git a/Source/RunActivity/Viewer3D/Popups/OSDLocations.cs b/Source/RunActivity/Viewer3D/Popups/OSDLocations.cs index a28c0b6b2c..be8ac923d1 100644 --- a/Source/RunActivity/Viewer3D/Popups/OSDLocations.cs +++ b/Source/RunActivity/Viewer3D/Popups/OSDLocations.cs @@ -17,11 +17,12 @@ // This file is the responsibility of the 3D & Environment Team. -using System.Collections.Generic; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Orts.Simulation; using ORTS.Common; using ORTS.Settings; +using System.Collections.Generic; namespace Orts.Viewer3D.Popups { diff --git a/Source/RunActivity/Viewer3D/Popups/QuitWindow.cs b/Source/RunActivity/Viewer3D/Popups/QuitWindow.cs index e220059172..d56cf55120 100644 --- a/Source/RunActivity/Viewer3D/Popups/QuitWindow.cs +++ b/Source/RunActivity/Viewer3D/Popups/QuitWindow.cs @@ -38,23 +38,23 @@ protected override ControlLayout Layout(ControlLayout layout) Label buttonQuit, buttonSave, buttonContinue; var vbox = base.Layout(layout).AddLayoutVertical(); var heightForLabels = 10; - if (!Orts.MultiPlayer.MPManager.IsMultiPlayer()) - heightForLabels = (vbox.RemainingHeight - 2 * ControlLayout.SeparatorSize) / 3; - else heightForLabels = (vbox.RemainingHeight - 2 * ControlLayout.SeparatorSize) / 2; + if (!Orts.MultiPlayer.MPManager.IsMultiPlayer()) + heightForLabels = (vbox.RemainingHeight - 2 * ControlLayout.SeparatorSize) / 3; + else heightForLabels = (vbox.RemainingHeight - 2 * ControlLayout.SeparatorSize) / 2; var spacing = (heightForLabels - Owner.TextFontDefault.Height) / 2; vbox.AddSpace(0, spacing); vbox.Add(buttonQuit = new Label(vbox.RemainingWidth, Owner.TextFontDefault.Height, Viewer.Catalog.GetStringFmt("Quit {1} ({0})", Owner.Viewer.Settings.Input.Commands[(int)UserCommand.GameQuit], Application.ProductName), LabelAlignment.Center)); vbox.AddSpace(0, spacing); vbox.AddHorizontalSeparator(); - if (!Orts.MultiPlayer.MPManager.IsMultiPlayer()) - { + if (!Orts.MultiPlayer.MPManager.IsMultiPlayer()) + { buttonSave = new Label(vbox.RemainingWidth, Owner.TextFontDefault.Height, Viewer.Catalog.GetStringFmt("Save your game ({0})", Owner.Viewer.Settings.Input.Commands[(int)UserCommand.GameSave]), LabelAlignment.Center); - vbox.AddSpace(0, spacing); - vbox.Add(buttonSave); - vbox.AddSpace(0, spacing); - vbox.AddHorizontalSeparator(); - buttonSave.Click += new Action(buttonSave_Click); - } + vbox.AddSpace(0, spacing); + vbox.Add(buttonSave); + vbox.AddSpace(0, spacing); + vbox.AddHorizontalSeparator(); + buttonSave.Click += new Action(buttonSave_Click); + } vbox.AddSpace(0, spacing); vbox.Add(buttonContinue = new Label(vbox.RemainingWidth, Owner.TextFontDefault.Height, Viewer.Catalog.GetStringFmt("Continue playing ({0})", Owner.Viewer.Settings.Input.Commands[(int)UserCommand.GamePauseMenu]), LabelAlignment.Center)); buttonQuit.Click += new Action(buttonQuit_Click); @@ -75,8 +75,7 @@ void buttonSave_Click(Control arg1, Point arg2) void buttonContinue_Click(Control arg1, Point arg2) { Visible = Owner.Viewer.Simulator.Paused = false; - if (Owner.Viewer.Log.PauseState == ReplayPauseState.During) - { + if( Owner.Viewer.Log.PauseState == ReplayPauseState.During ) { Owner.Viewer.Log.PauseState = ReplayPauseState.Done; } Owner.Viewer.ResumeReplaying(); diff --git a/Source/RunActivity/Viewer3D/Popups/SignallingDebugWindow.cs b/Source/RunActivity/Viewer3D/Popups/SignallingDebugWindow.cs index a93333cd88..abf52249ab 100644 --- a/Source/RunActivity/Viewer3D/Popups/SignallingDebugWindow.cs +++ b/Source/RunActivity/Viewer3D/Popups/SignallingDebugWindow.cs @@ -114,7 +114,7 @@ public override void PrepareFrame(ElapsedTime elapsedTime, bool updateFull) totalDistance += cache.Length; } var nodeIndex = cacheNode.TrackNodeIndex; - while (cacheNode.TrackNodeIndex == nodeIndex && cacheNode.NextSection()) ; + while (cacheNode.TrackNodeIndex == nodeIndex && cacheNode.NextSection()); } var switchErrorDistance = initialNodeOffset + DisplayDistance + SignalWarningDistance; @@ -211,7 +211,7 @@ public override void PrepareFrame(ElapsedTime elapsedTime, bool updateFull) } else if (switchObj != null) { - primitives.Add(new DispatcherLabel(currentPosition.WorldLocation, objDistance >= switchErrorDistance ? Color.Red : Color.White, String.Format("Switch ({0}, {1}-way, {2} set)", switchObj.TrackNode.Index, switchObj.TrackNode.Outpins, switchObj.TrackNode.TrJunctionNode.SelectedRoute + 1), Owner.TextFontDefaultOutlined)); + primitives.Add(new DispatcherLabel(currentPosition.WorldLocation, objDistance >= switchErrorDistance ? Color.Red : Color.White, String.Format("Switch ({0}, {1}-way, {2} set)", switchObj.TrackNode.Index, switchObj.TrackNode.Outpins, switchObj.TrackNode.TrJunctionNode.SelectedRoute + 1), Owner.TextFontDefaultOutlined)); } else if (signalObj != null) { @@ -361,8 +361,7 @@ enum DistanceToType Signal, } - public class TrackSectionCacheEntry - { + public class TrackSectionCacheEntry { public int Age; public Traveller.TravellerDirection Direction; public float Length; diff --git a/Source/RunActivity/Viewer3D/Popups/SwitchWindow.cs b/Source/RunActivity/Viewer3D/Popups/SwitchWindow.cs index b43973da74..e5ba460cb2 100644 --- a/Source/RunActivity/Viewer3D/Popups/SwitchWindow.cs +++ b/Source/RunActivity/Viewer3D/Popups/SwitchWindow.cs @@ -17,9 +17,6 @@ // This file is the responsibility of the 3D & Environment Team. -using System; -using System.Diagnostics; -using System.Linq; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Orts.Formats.Msts; @@ -27,6 +24,9 @@ using Orts.Simulation.Physics; using Orts.Simulation.Signalling; using ORTS.Common; +using System; +using System.Diagnostics; +using System.Linq; namespace Orts.Viewer3D.Popups { diff --git a/Source/RunActivity/Viewer3D/Popups/TTDetachWindow.cs b/Source/RunActivity/Viewer3D/Popups/TTDetachWindow.cs index 9cedb62475..0e91698bf8 100644 --- a/Source/RunActivity/Viewer3D/Popups/TTDetachWindow.cs +++ b/Source/RunActivity/Viewer3D/Popups/TTDetachWindow.cs @@ -17,11 +17,13 @@ // This file is the responsibility of the 3D & Environment Team. -using System; -using System.Collections.Generic; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Orts.Simulation.Timetables; using ORTS.Common; +using System; +using System.Linq; +using System.Collections.Generic; namespace Orts.Viewer3D.Popups { @@ -37,7 +39,7 @@ public class TTDetachWindow : Window DetachInfo reqDetach = null; TTTrain reqTrain; - + public TTDetachWindow(WindowManager owner) : base(owner, Window.DecorationSize.X + WindowImageSizeWidth, Window.DecorationSize.Y + owner.TextFontDefault.Height * WindowImageSizeHeightFactor + ControlLayout.SeparatorSize * 2, Viewer.Catalog.GetString("Timetable Detach Menu")) { @@ -93,7 +95,7 @@ public override void PrepareFrame(ElapsedTime elapsedTime, bool updateFull) } else { - formedTrain = String.Concat(Viewer.Catalog.GetString("static consist"), " : ", reqDetach.DetachFormedTrainName); + formedTrain = String.Concat(Viewer.Catalog.GetString("static consist"), " : ",reqDetach.DetachFormedTrainName); } } diff --git a/Source/RunActivity/Viewer3D/Popups/TrackMonitorWindow.cs b/Source/RunActivity/Viewer3D/Popups/TrackMonitorWindow.cs index e98fdc3a4c..e9de5a9a9b 100644 --- a/Source/RunActivity/Viewer3D/Popups/TrackMonitorWindow.cs +++ b/Source/RunActivity/Viewer3D/Popups/TrackMonitorWindow.cs @@ -45,45 +45,45 @@ public class TrackMonitorWindow : Window static readonly Dictionary AuthorityLabels = new Dictionary { - { Train.END_AUTHORITY.END_OF_TRACK, "End Trck" }, - { Train.END_AUTHORITY.END_OF_PATH, "End Path" }, - { Train.END_AUTHORITY.RESERVED_SWITCH, "Switch" }, + { Train.END_AUTHORITY.END_OF_TRACK, "End Trck" }, + { Train.END_AUTHORITY.END_OF_PATH, "End Path" }, + { Train.END_AUTHORITY.RESERVED_SWITCH, "Switch" }, { Train.END_AUTHORITY.LOOP, "Loop" }, - { Train.END_AUTHORITY.TRAIN_AHEAD, "TrainAhd" }, - { Train.END_AUTHORITY.MAX_DISTANCE, "Max Dist" }, - { Train.END_AUTHORITY.NO_PATH_RESERVED, "No Path" }, + { Train.END_AUTHORITY.TRAIN_AHEAD, "TrainAhd" }, + { Train.END_AUTHORITY.MAX_DISTANCE, "Max Dist" }, + { Train.END_AUTHORITY.NO_PATH_RESERVED, "No Path" }, { Train.END_AUTHORITY.SIGNAL, "Signal" }, { Train.END_AUTHORITY.END_OF_AUTHORITY, "End Auth" }, - }; + }; static readonly Dictionary OutOfControlLabels = new Dictionary { - { Train.OUTOFCONTROL.SPAD, "SPAD" }, - { Train.OUTOFCONTROL.SPAD_REAR, "SPAD-Rear" }, + { Train.OUTOFCONTROL.SPAD, "SPAD" }, + { Train.OUTOFCONTROL.SPAD_REAR, "SPAD-Rear" }, { Train.OUTOFCONTROL.MISALIGNED_SWITCH, "Misalg Sw" }, - { Train.OUTOFCONTROL.OUT_OF_AUTHORITY, "Off Auth" }, - { Train.OUTOFCONTROL.OUT_OF_PATH, "Off Path" }, - { Train.OUTOFCONTROL.SLIPPED_INTO_PATH, "Splipped" }, - { Train.OUTOFCONTROL.SLIPPED_TO_ENDOFTRACK, "Slipped" }, - { Train.OUTOFCONTROL.OUT_OF_TRACK, "Off Track" }, + { Train.OUTOFCONTROL.OUT_OF_AUTHORITY, "Off Auth" }, + { Train.OUTOFCONTROL.OUT_OF_PATH, "Off Path" }, + { Train.OUTOFCONTROL.SLIPPED_INTO_PATH, "Splipped" }, + { Train.OUTOFCONTROL.SLIPPED_TO_ENDOFTRACK, "Slipped" }, + { Train.OUTOFCONTROL.OUT_OF_TRACK, "Off Track" }, { Train.OUTOFCONTROL.SLIPPED_INTO_TURNTABLE, "Slip Turn" }, - { Train.OUTOFCONTROL.UNDEFINED, "Undefined" }, - }; + { Train.OUTOFCONTROL.UNDEFINED, "Undefined" }, + }; public TrackMonitorWindow(WindowManager owner) : base(owner, Window.DecorationSize.X + owner.TextFontDefault.Height * 10, Window.DecorationSize.Y + owner.TextFontDefault.Height * (5 + TrackMonitorHeightInLinesOfText) + ControlLayout.SeparatorSize * 3, Viewer.Catalog.GetString("Track Monitor")) { - ControlModeLabels = new Dictionary + ControlModeLabels = new Dictionary { - { Train.TRAIN_CONTROL.AUTO_SIGNAL , Viewer.Catalog.GetString("Auto Signal") }, - { Train.TRAIN_CONTROL.AUTO_NODE, Viewer.Catalog.GetString("Node") }, - { Train.TRAIN_CONTROL.MANUAL, Viewer.Catalog.GetString("Manual") }, + { Train.TRAIN_CONTROL.AUTO_SIGNAL , Viewer.Catalog.GetString("Auto Signal") }, + { Train.TRAIN_CONTROL.AUTO_NODE, Viewer.Catalog.GetString("Node") }, + { Train.TRAIN_CONTROL.MANUAL, Viewer.Catalog.GetString("Manual") }, { Train.TRAIN_CONTROL.EXPLORER, Viewer.Catalog.GetString("Explorer") }, - { Train.TRAIN_CONTROL.OUT_OF_CONTROL, Viewer.Catalog.GetString("OutOfControl : ") }, + { Train.TRAIN_CONTROL.OUT_OF_CONTROL, Viewer.Catalog.GetString("OutOfControl : ") }, { Train.TRAIN_CONTROL.INACTIVE, Viewer.Catalog.GetString("Inactive") }, { Train.TRAIN_CONTROL.TURNTABLE, Viewer.Catalog.GetString("Turntable") }, - { Train.TRAIN_CONTROL.UNDEFINED, Viewer.Catalog.GetString("Unknown") }, - }; + { Train.TRAIN_CONTROL.UNDEFINED, Viewer.Catalog.GetString("Unknown") }, + }; } public override void TabAction() => Monitor.CycleMode(); @@ -430,7 +430,7 @@ void drawTrack(SpriteBatch spriteBatch, Point offset, float speedMpS, float allo { istrackColorRed = true; DbfEvalIniOverSpeedTimeS = Orts.MultiPlayer.MPManager.Simulator.ClockTime; - } + } if (istrackColorRed && trackColor != Color.Red)//Debrief Eval { @@ -735,7 +735,7 @@ void drawItems(SpriteBatch spriteBatch, Point offset, int startObjectArea, int e } } // reverse display of signals to have correct superposition - for (int iItems = itemList.Count - 1; iItems >= 0; iItems--) + for (int iItems = itemList.Count-1 ; iItems >=0; iItems--) { var thisItem = itemList[iItems]; switch (thisItem.ItemType) @@ -864,7 +864,7 @@ void drawSignalBackward(SpriteBatch spriteBatch, Point offset, int startObjectAr break; } var displayItem = SignalMarkers[aspect]; - + var displayRequired = false; var itemLocation = 0; var itemOffset = 0; diff --git a/Source/RunActivity/Viewer3D/Popups/TracksDebugWindow.cs b/Source/RunActivity/Viewer3D/Popups/TracksDebugWindow.cs index 6ec4d9d98b..4bcdbc4bae 100644 --- a/Source/RunActivity/Viewer3D/Popups/TracksDebugWindow.cs +++ b/Source/RunActivity/Viewer3D/Popups/TracksDebugWindow.cs @@ -17,13 +17,13 @@ // This file is the responsibility of the 3D & Environment Team. -using System; -using System.Collections.Generic; -using System.Linq; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Orts.Simulation; using ORTS.Common; +using System; +using System.Collections.Generic; +using System.Linq; namespace Orts.Viewer3D.Popups { @@ -75,7 +75,7 @@ public override void PrepareFrame(ElapsedTime elapsedTime, bool updateFull) { var previousLocation = currentPosition.WorldLocation; var remaining = currentPosition.MoveInSection(DisplaySegmentLength); - if ((Math.Abs(remaining - DisplaySegmentLength) < Tolerance) && !currentPosition.NextVectorSection()) + if ((Math.Abs(remaining - DisplaySegmentLength ) < Tolerance) && !currentPosition.NextVectorSection()) break; primitives.Add(new DispatcherLineSegment(previousLocation, currentPosition.WorldLocation, Color.LightBlue, 2)); } diff --git a/Source/RunActivity/Viewer3D/Popups/TrainDPUWindow.cs b/Source/RunActivity/Viewer3D/Popups/TrainDPUWindow.cs index 85002313e8..f7278763b7 100644 --- a/Source/RunActivity/Viewer3D/Popups/TrainDPUWindow.cs +++ b/Source/RunActivity/Viewer3D/Popups/TrainDPUWindow.cs @@ -17,15 +17,18 @@ // This file is the responsibility of the 3D & Environment Team. +using Microsoft.Xna.Framework.Graphics; +using Orts.Simulation.Physics; +using ORTS.Common; using System; using System.Collections.Generic; -using System.IO; using System.Linq; -using Microsoft.Xna.Framework; -using Orts.Simulation.Physics; +using Orts.Simulation.RollingStocks.SubSystems.Brakes; using Orts.Simulation.RollingStocks; -using ORTS.Common; +using System.Text; using ORTS.Common.Input; +using Microsoft.Xna.Framework; +using System.IO; namespace Orts.Viewer3D.Popups { @@ -38,7 +41,7 @@ public class TrainDpuWindow : Window int LastColLenght = 0; int LastColOverFlow = 0; int LastPlayerTrainCars; - int dpiOffset = 0; + int dpiOffset= 0; public bool normalTextMode = true;// Standard text public bool normalVerticalMode = true;// vertical window size @@ -155,7 +158,7 @@ private static class Symbols public TrainDpuWindow(WindowManager owner) : base(owner, Window.DecorationSize.X + owner.TextFontDefault.Height * 10, Window.DecorationSize.Y + owner.TextFontDefault.Height * 10, Viewer.Catalog.GetString("Train Dpu Info")) { - WindowHeightMin = Location.Height / 2; + WindowHeightMin = Location.Height/2; WindowHeightMax = Location.Height + owner.TextFontDefault.Height * 20; WindowWidthMin = Location.Width; WindowWidthMax = Location.Width + owner.TextFontDefault.Height * 20; @@ -264,11 +267,11 @@ protected override ControlLayout Layout(ControlLayout layout) if (SymbolCol[i].Contains(Symbols.Fence)) { - hbox.Add(indicator = new Label(-(TextSize / 2), 0, TextSize, hbox.RemainingHeight, Symbols.Fence, LabelAlignment.Left)); + hbox.Add(indicator = new Label(-(TextSize/2), 0, TextSize, hbox.RemainingHeight, Symbols.Fence, LabelAlignment.Left)); indicator.Color = Color.Green; // Apply color to LastCol - var lastCol = LastCol[i].Replace("|", " "); + var lastCol = LastCol[i].Replace("|"," "); hbox.Add(indicator = new Label(lastWidth, hbox.RemainingHeight, lastCol, locoGroups ? LabelAlignment.Center : LabelAlignment.Left));//center indicator.Color = colorFirstColEndsWith == Color.White ? colorLastColEndsWith : colorFirstColEndsWith; } @@ -287,8 +290,8 @@ protected override ControlLayout Layout(ControlLayout layout) hbox.Add(indicator = new Label(-(TextSize / 2), 0, TextSize, hbox.RemainingHeight, SymbolCol[i], LabelAlignment.Left)); indicator.Color = colorSymbolCol; } - hbox.Add(indicator = new Label(lastWidth, hbox.RemainingHeight, LastCol[i], locoGroups ? LabelAlignment.Center : LabelAlignment.Left)); - indicator.Color = colorLastColEndsWith; + hbox.Add(indicator = new Label(lastWidth, hbox.RemainingHeight, LastCol[i], locoGroups ? LabelAlignment.Center : LabelAlignment.Left)); + indicator.Color = colorLastColEndsWith; } } } @@ -365,9 +368,9 @@ private void ModifyWindowSize() FirstColLenght = labels.Max(x => x.FirstColWidth); var lastColLenght = 0; - foreach (var data in labels.Where(x => x.LastColWidth != null && x.LastColWidth.Count > 0)) + foreach ( var data in labels.Where(x=> x.LastColWidth!=null && x.LastColWidth.Count > 0 )) { - lastColLenght = data.LastColWidth.Max(x => x) + TextSize / 2; + lastColLenght = data.LastColWidth.Max(x => x) + TextSize/2; LastColLenght = lastColLenght > LastColLenght ? lastColLenght : LastColLenght; } @@ -379,10 +382,10 @@ private void ModifyWindowSize() : (Owner.TextFontDefault.Height + 2) * (rowCount + 1); var desiredWidth = FirstColLenght + (LastColLenght * (dieselLocomotivesCount + 1));// interval between firstcol and lastcol var normalMode = normalTextMode && normalVerticalMode; - var newHeight = desiredHeight < WindowHeightMin ? desiredHeight + Owner.TextFontDefault.Height * 2 - : (int)MathHelper.Clamp(desiredHeight, (normalMode ? WindowHeightMin : 100), WindowHeightMax); + var newHeight = desiredHeight < WindowHeightMin? desiredHeight + Owner.TextFontDefault.Height * 2 + : (int)MathHelper.Clamp(desiredHeight, ( normalMode? WindowHeightMin : 100 ), WindowHeightMax); - var newWidth = (int)MathHelper.Clamp(desiredWidth, (normalTextMode ? WindowWidthMin : 100), WindowWidthMax + (Owner.Viewer.DisplaySize.X / 2)); + var newWidth = (int)MathHelper.Clamp(desiredWidth, (normalTextMode ? WindowWidthMin : 100), WindowWidthMax + (Owner.Viewer.DisplaySize.X/2)); // Move the dialog up if we're expanding it, or down if not; this keeps the center in the same place. var newTop = Location.Y + (Location.Height - newHeight) / 2; @@ -481,7 +484,7 @@ private void UpdateColsWidth(ListLabel label, bool normalmode) if (label.LastCol != null) { - foreach (string data in label.LastCol) + foreach(string data in label.LastCol) { if (data != null) { @@ -503,7 +506,7 @@ private void UpdateColsWidth(ListLabel label, bool normalmode) } //Set a minimum value for LastColWidth to avoid overlap between time value and clickable symbol - if (labels.Count == 1)//&& lastColWidth.Count > 0) + if (labels.Count == 1 )//&& lastColWidth.Count > 0) { lastColWidth.Add(labels[0].LastColWidth[0] + (TextSize * 3) + dpiOffset * 10);// time value + clickable symbol } @@ -646,7 +649,7 @@ void AddLabel(ListLabel label) { var dieselLoco = MSTSDieselLocomotive.GetDpuHeader(normalVerticalMode, numberOfDieselLocomotives, maxNumberOfEngines).Replace("\t", ""); string[] dieselLocoHeader = dieselLoco.Split('\n'); - string[,] tempStatus = new string[numberOfDieselLocomotives, dieselLocoHeader.Length]; + string[,] tempStatus = new string[numberOfDieselLocomotives,dieselLocoHeader.Length]; var k = 0; var dpUnitId = 0; var dpUId = -1; diff --git a/Source/RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs b/Source/RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs index b4790ba61e..04ec4288dc 100644 --- a/Source/RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs +++ b/Source/RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs @@ -15,17 +15,17 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using Microsoft.Xna.Framework; using Orts.Simulation.Physics; using Orts.Simulation.RollingStocks; using Orts.Simulation.RollingStocks.SubSystems; using Orts.Simulation.RollingStocks.SubSystems.Brakes; using ORTS.Common; using ORTS.Common.Input; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Microsoft.Xna.Framework; namespace Orts.Viewer3D.Popups { @@ -284,7 +284,7 @@ protected override ControlLayout Layout(ControlLayout layout) var vbox = base.Layout(layout).AddLayoutVertical(); if (labels.Count > 0) { - var colWidth = labels.Max(x => x.FirstColWidth) + (normalTextMode ? 15 : 20); + var colWidth = labels.Max(x => x.FirstColWidth) + (normalTextMode? 15: 20); var TimeHboxPositionY = 0; // search wider @@ -522,7 +522,7 @@ private void UpdateColsWidth(ListLabel label, bool normalmode) { var tempFirstCol = firstCol.Substring(0, firstCol.Length - 3); firstColWidth = FontToBold ? Owner.TextFontDefaultBold.MeasureString(tempFirstCol.TrimEnd()) - : !normalTextMode ? Owner.TextFontMonoSpacedBold.MeasureString(tempFirstCol.TrimEnd()) + : !normalTextMode? Owner.TextFontMonoSpacedBold.MeasureString(tempFirstCol.TrimEnd()) : Owner.TextFontDefault.MeasureString(tempFirstCol.TrimEnd()); } else @@ -842,7 +842,7 @@ void AddLabel(ListLabel label) if (trainBrakeStatus.Contains(Viewer.Catalog.GetString("EOT"))) { - int indexOffset = Viewer.Catalog.GetString("EOT").Length + 1; + int indexOffset = Viewer.Catalog.GetString("EOT").Length + 1; if (trainBrakeStatus.IndexOf(Viewer.Catalog.GetString("V"), index) > 0) index = trainBrakeStatus.IndexOf(Viewer.Catalog.GetString("V"), index); else diff --git a/Source/RunActivity/Viewer3D/Popups/TrainListWindow.cs b/Source/RunActivity/Viewer3D/Popups/TrainListWindow.cs index abdfce2999..344417f794 100644 --- a/Source/RunActivity/Viewer3D/Popups/TrainListWindow.cs +++ b/Source/RunActivity/Viewer3D/Popups/TrainListWindow.cs @@ -19,6 +19,7 @@ using System; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Orts.Simulation.AIs; using Orts.Simulation.Physics; using ORTS.Common; @@ -79,7 +80,7 @@ protected override ControlLayout Layout(ControlLayout layout) foreach (var thisTrain in Owner.Viewer.Simulator.AI.AITrains) { if (thisTrain.MovementState != AITrain.AI_MOVEMENT_STATE.AI_STATIC && thisTrain.TrainType != Train.TRAINTYPE.PLAYER - && !(thisTrain.TrainType == Train.TRAINTYPE.AI_INCORPORATED && !thisTrain.IncorporatingTrain.IsPathless)) + && ! (thisTrain.TrainType == Train.TRAINTYPE.AI_INCORPORATED && !thisTrain.IncorporatingTrain.IsPathless)) { var line = scrollbox.AddLayoutHorizontalLineOfText(); TrainLabel number, name, viewed; @@ -126,7 +127,7 @@ protected override ControlLayout Layout(ControlLayout layout) } number.Color = Color.Yellow; name.Color = Color.Yellow; - } + } } } } @@ -178,7 +179,7 @@ void TrainListLabel_Click(Control arg1, Point arg2) Viewer.Simulator.TrainSwitcher.ClickedTrainFromList = true; } - if (PickedTrainFromList != null && (PickedTrainFromList == Viewer.SelectedTrain || (PickedTrainFromList.TrainType == Train.TRAINTYPE.AI_INCORPORATED && + if (PickedTrainFromList != null && (PickedTrainFromList == Viewer.SelectedTrain || (PickedTrainFromList.TrainType == Train.TRAINTYPE.AI_INCORPORATED && (PickedTrainFromList as AITrain).IncorporatingTrain.IsPathless && (PickedTrainFromList as AITrain).IncorporatingTrain == Viewer.SelectedTrain)) && !PickedTrainFromList.IsActualPlayerTrain && Viewer.Simulator.IsAutopilotMode && PickedTrainFromList.IsPlayable) { @@ -197,4 +198,4 @@ void TrainListLabel_Click(Control arg1, Point arg2) } } } -} + } diff --git a/Source/RunActivity/Viewer3D/Popups/TrainOperationsWindow.cs b/Source/RunActivity/Viewer3D/Popups/TrainOperationsWindow.cs index 85713b1fc4..aff8a029ef 100644 --- a/Source/RunActivity/Viewer3D/Popups/TrainOperationsWindow.cs +++ b/Source/RunActivity/Viewer3D/Popups/TrainOperationsWindow.cs @@ -17,13 +17,13 @@ // This file is the responsibility of the 3D & Environment Team. -using System; -using System.Linq; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Orts.Simulation.Physics; using Orts.Simulation.RollingStocks; using ORTS.Common; +using System; +using System.Linq; namespace Orts.Viewer3D.Popups { diff --git a/Source/RunActivity/Viewer3D/Popups/Window.cs b/Source/RunActivity/Viewer3D/Popups/Window.cs index 7504e5e9bc..3dc05fb466 100644 --- a/Source/RunActivity/Viewer3D/Popups/Window.cs +++ b/Source/RunActivity/Viewer3D/Popups/Window.cs @@ -17,12 +17,12 @@ // This file is the responsibility of the 3D & Environment Team. -using System; -using System.IO; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ORTS.Common; using ORTS.Settings; +using System; +using System.IO; namespace Orts.Viewer3D.Popups { @@ -231,43 +231,43 @@ public override void Draw(GraphicsDevice graphicsDevice) var vertexData = new[] { // 0 1 2 3 new VertexPositionTexture(new Vector3(0 * location.Width + 00, 0 * location.Height + 00, 0), new Vector2(0.00f / 2, 0.00f)), - new VertexPositionTexture(new Vector3(0 * location.Width + gp, 0 * location.Height + 00, 0), new Vector2(0.25f / 2, 0.00f)), - new VertexPositionTexture(new Vector3(1 * location.Width - gp, 0 * location.Height + 00, 0), new Vector2(0.75f / 2, 0.00f)), - new VertexPositionTexture(new Vector3(1 * location.Width - 00, 0 * location.Height + 00, 0), new Vector2(1.00f / 2, 0.00f)), + new VertexPositionTexture(new Vector3(0 * location.Width + gp, 0 * location.Height + 00, 0), new Vector2(0.25f / 2, 0.00f)), + new VertexPositionTexture(new Vector3(1 * location.Width - gp, 0 * location.Height + 00, 0), new Vector2(0.75f / 2, 0.00f)), + new VertexPositionTexture(new Vector3(1 * location.Width - 00, 0 * location.Height + 00, 0), new Vector2(1.00f / 2, 0.00f)), // 4 5 6 7 new VertexPositionTexture(new Vector3(0 * location.Width + 00, 0 * location.Height + gp, 0), new Vector2(0.00f / 2, 0.25f)), - new VertexPositionTexture(new Vector3(0 * location.Width + gp, 0 * location.Height + gp, 0), new Vector2(0.25f / 2, 0.25f)), - new VertexPositionTexture(new Vector3(1 * location.Width - gp, 0 * location.Height + gp, 0), new Vector2(0.75f / 2, 0.25f)), - new VertexPositionTexture(new Vector3(1 * location.Width - 00, 0 * location.Height + gp, 0), new Vector2(1.00f / 2, 0.25f)), + new VertexPositionTexture(new Vector3(0 * location.Width + gp, 0 * location.Height + gp, 0), new Vector2(0.25f / 2, 0.25f)), + new VertexPositionTexture(new Vector3(1 * location.Width - gp, 0 * location.Height + gp, 0), new Vector2(0.75f / 2, 0.25f)), + new VertexPositionTexture(new Vector3(1 * location.Width - 00, 0 * location.Height + gp, 0), new Vector2(1.00f / 2, 0.25f)), // 8 9 10 11 new VertexPositionTexture(new Vector3(0 * location.Width + 00, 1 * location.Height - gp, 0), new Vector2(0.00f / 2, 0.75f)), - new VertexPositionTexture(new Vector3(0 * location.Width + gp, 1 * location.Height - gp, 0), new Vector2(0.25f / 2, 0.75f)), - new VertexPositionTexture(new Vector3(1 * location.Width - gp, 1 * location.Height - gp, 0), new Vector2(0.75f / 2, 0.75f)), - new VertexPositionTexture(new Vector3(1 * location.Width - 00, 1 * location.Height - gp, 0), new Vector2(1.00f / 2, 0.75f)), + new VertexPositionTexture(new Vector3(0 * location.Width + gp, 1 * location.Height - gp, 0), new Vector2(0.25f / 2, 0.75f)), + new VertexPositionTexture(new Vector3(1 * location.Width - gp, 1 * location.Height - gp, 0), new Vector2(0.75f / 2, 0.75f)), + new VertexPositionTexture(new Vector3(1 * location.Width - 00, 1 * location.Height - gp, 0), new Vector2(1.00f / 2, 0.75f)), // 12 13 14 15 new VertexPositionTexture(new Vector3(0 * location.Width + 00, 1 * location.Height - 00, 0), new Vector2(0.00f / 2, 1.00f)), - new VertexPositionTexture(new Vector3(0 * location.Width + gp, 1 * location.Height - 00, 0), new Vector2(0.25f / 2, 1.00f)), - new VertexPositionTexture(new Vector3(1 * location.Width - gp, 1 * location.Height - 00, 0), new Vector2(0.75f / 2, 1.00f)), - new VertexPositionTexture(new Vector3(1 * location.Width - 00, 1 * location.Height - 00, 0), new Vector2(1.00f / 2, 1.00f)), - }; + new VertexPositionTexture(new Vector3(0 * location.Width + gp, 1 * location.Height - 00, 0), new Vector2(0.25f / 2, 1.00f)), + new VertexPositionTexture(new Vector3(1 * location.Width - gp, 1 * location.Height - 00, 0), new Vector2(0.75f / 2, 1.00f)), + new VertexPositionTexture(new Vector3(1 * location.Width - 00, 1 * location.Height - 00, 0), new Vector2(1.00f / 2, 1.00f)), + }; WindowVertexBuffer = new VertexBuffer(graphicsDevice, typeof(VertexPositionTexture), vertexData.Length, BufferUsage.WriteOnly); WindowVertexBuffer.SetData(vertexData); } if (WindowIndexBuffer == null) { var indexData = new short[] { - 0, 4, 1, 5, 2, 6, 3, 7, - 11, 6, 10, 5, 9, 4, 8, - 12, 9, 13, 10, 14, 11, 15, - }; + 0, 4, 1, 5, 2, 6, 3, 7, + 11, 6, 10, 5, 9, 4, 8, + 12, 9, 13, 10, 14, 11, 15, + }; WindowIndexBuffer = new IndexBuffer(graphicsDevice, typeof(short), indexData.Length, BufferUsage.WriteOnly); WindowIndexBuffer.SetData(indexData); } graphicsDevice.SetVertexBuffer(WindowVertexBuffer); - graphicsDevice.Indices = WindowIndexBuffer; - graphicsDevice.DrawIndexedPrimitives(PrimitiveType.TriangleStrip, baseVertex: 0, startIndex: 0, primitiveCount: 20); - } + graphicsDevice.Indices = WindowIndexBuffer; + graphicsDevice.DrawIndexedPrimitives(PrimitiveType.TriangleStrip, baseVertex: 0, startIndex: 0, primitiveCount: 20); + } [CallOnThread("Updater")] public virtual void PrepareFrame(ElapsedTime elapsedTime, bool updateFull) @@ -338,7 +338,7 @@ public WindowControlLayout(Window window, int width, int height) internal override bool HandleMouseDown(WindowMouseEvent e) { DragWindowOffset = DragInvalid; - + if (base.HandleMouseDown(e)) return true; diff --git a/Source/RunActivity/Viewer3D/Popups/WindowControls.cs b/Source/RunActivity/Viewer3D/Popups/WindowControls.cs index 8605e9827e..fa53d3accb 100644 --- a/Source/RunActivity/Viewer3D/Popups/WindowControls.cs +++ b/Source/RunActivity/Viewer3D/Popups/WindowControls.cs @@ -17,11 +17,11 @@ // This file is the responsibility of the 3D & Environment Team. +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using System; using System.Collections.Generic; using System.Linq; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; namespace Orts.Viewer3D.Popups { @@ -762,7 +762,7 @@ internal override bool HandleUserInput(WindowMouseEvent e) if (UserInput.IsMouseLeftButtonDown) { Client.Position.Height = Client.CurrentTop; - + if (e.MouseDownPosition.X > Position.Right - TextHeight) { var thumbOffset = (int)((float)(Position.Height - 3 * TextHeight) * (float)ScrollPosition / (float)ScrollSize); @@ -814,7 +814,7 @@ internal override bool HandleMouseMove(WindowMouseEvent e) internal override bool HandleMouseUp(WindowMouseEvent e) { if (Dragging) - Dragging = false; + Dragging = false; return base.HandleMouseUp(e); } diff --git a/Source/RunActivity/Viewer3D/Popups/WindowManager.cs b/Source/RunActivity/Viewer3D/Popups/WindowManager.cs index 5d569b2e84..b0ab63759d 100644 --- a/Source/RunActivity/Viewer3D/Popups/WindowManager.cs +++ b/Source/RunActivity/Viewer3D/Popups/WindowManager.cs @@ -19,22 +19,22 @@ // Add DEBUG_WINDOW_ZORDER to project defines to record window visibility and z-order changes. +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ORTS.Common; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using ORTS.Common; namespace Orts.Viewer3D.Popups { public class WindowManager : RenderPrimitive - { - public static Texture2D WhiteTexture; - public static Texture2D ScrollbarTexture; - public static Texture2D LabelShadowTexture; + { + public static Texture2D WhiteTexture; + public static Texture2D ScrollbarTexture; + public static Texture2D LabelShadowTexture; public static Texture2D NoticeTexture; public static Texture2D PauseTexture; @@ -48,7 +48,7 @@ public static void Flush(SpriteBatch spriteBatch) spriteBatch.Draw(FlushTexture, Vector2.Zero, Color.Black); } - public readonly Viewer Viewer; + public readonly Viewer Viewer; public readonly WindowTextManager TextManager; public readonly WindowTextFont TextFontDefault; public readonly WindowTextFont TextFontDefaultBold; @@ -70,7 +70,7 @@ public static void Flush(SpriteBatch spriteBatch) SpriteBatch SpriteBatch; Matrix Identity = Matrix.Identity; Matrix XNAView = Matrix.Identity; - Matrix XNAProjection = Matrix.Identity; + Matrix XNAProjection = Matrix.Identity; internal Point ScreenSize = new Point(10000, 10000); // Arbitrary but necessary. RenderTarget2D Screen; @@ -181,28 +181,28 @@ public void Restore(BinaryReader inf) window.Restore(inf); } - [CallOnThread("Updater")] - public void ScreenChanged() - { - var oldScreenSize = ScreenSize; - ScreenSize = Viewer.DisplaySize; - - // Buffer for screen texture, also same size as viewport and using the backbuffer format. - if (Viewer.Settings.WindowGlass) - { - if (Screen != null) - Screen.Dispose(); + [CallOnThread("Updater")] + public void ScreenChanged() + { + var oldScreenSize = ScreenSize; + ScreenSize = Viewer.DisplaySize; + + // Buffer for screen texture, also same size as viewport and using the backbuffer format. + if (Viewer.Settings.WindowGlass) + { + if (Screen != null) + Screen.Dispose(); Screen = new RenderTarget2D(Viewer.GraphicsDevice, ScreenSize.X, ScreenSize.Y, false, Viewer.GraphicsDevice.PresentationParameters.BackBufferFormat, DepthFormat.Depth24Stencil8); - } + } - // Reposition all the windows. + // Reposition all the windows. foreach (var window in Windows) { if (oldScreenSize.X - window.Location.Width > 0 && oldScreenSize.Y - window.Location.Height > 0) window.MoveTo((ScreenSize.X - window.Location.Width) * window.Location.X / (oldScreenSize.X - window.Location.Width), (ScreenSize.Y - window.Location.Height) * window.Location.Y / (oldScreenSize.Y - window.Location.Height)); window.ScreenChanged(); } - } + } double LastPrepareRealTime; [CallOnThread("Updater")] @@ -223,21 +223,21 @@ public void PrepareFrame(RenderFrame frame, ElapsedTime elapsedTime) [CallOnThread("Render")] public override void Draw(GraphicsDevice graphicsDevice) - { - // Nothing visible? Nothing more to do! - if (!VisibleWindows.Any()) - return; - - // Construct a view where (0, 0) is the top-left and (width, height) is - // bottom-right, so that popups can act more like normal window things. - XNAView = Matrix.CreateTranslation(-ScreenSize.X / 2, -ScreenSize.Y / 2, 0) * - Matrix.CreateScale(1, -1, 1); - // Project into a flat view of the same size as the viewport. - XNAProjection = Matrix.CreateOrthographic(ScreenSize.X, ScreenSize.Y, 0, 100); - - foreach (var window in VisibleWindows) - { - var xnaWorld = window.XNAWorld; + { + // Nothing visible? Nothing more to do! + if (!VisibleWindows.Any()) + return; + + // Construct a view where (0, 0) is the top-left and (width, height) is + // bottom-right, so that popups can act more like normal window things. + XNAView = Matrix.CreateTranslation(-ScreenSize.X / 2, -ScreenSize.Y / 2, 0) * + Matrix.CreateScale(1, -1, 1); + // Project into a flat view of the same size as the viewport. + XNAProjection = Matrix.CreateOrthographic(ScreenSize.X, ScreenSize.Y, 0, 100); + + foreach (var window in VisibleWindows) + { + var xnaWorld = window.XNAWorld; var oldTargets = graphicsDevice.GetRenderTargets(); if (Viewer.Settings.WindowGlass) @@ -270,73 +270,73 @@ public override void Draw(GraphicsDevice graphicsDevice) graphicsDevice.DepthStencilState = DepthStencilState.Default; } - internal void Add(Window window) - { - Windows.Add(window); + internal void Add(Window window) + { + Windows.Add(window); WindowsZOrder = Windows.Concat(new[] { window }).ToArray(); } - public bool HasVisiblePopupWindows() - { + public bool HasVisiblePopupWindows() + { return WindowsZOrder.Any(w => w.Visible); - } + } - public IEnumerable VisibleWindows - { - get - { + public IEnumerable VisibleWindows + { + get + { return WindowsZOrder.Where(w => w.Visible); - } - } + } + } - public const int DragMinimumDistance = 2; + public const int DragMinimumDistance = 2; - Point mouseDownPosition; - public Point MouseDownPosition { get { return mouseDownPosition; } } + Point mouseDownPosition; + public Point MouseDownPosition { get { return mouseDownPosition; } } - Window mouseActiveWindow; - public Window MouseActiveWindow { get { return mouseActiveWindow; } } + Window mouseActiveWindow; + public Window MouseActiveWindow { get { return mouseActiveWindow; } } - double LastUpdateRealTime; - [CallOnThread("Updater")] + double LastUpdateRealTime; + [CallOnThread("Updater")] public void HandleUserInput(ElapsedTime elapsedTime) { - if (UserInput.IsMouseLeftButtonPressed) - { - mouseDownPosition = new Point(UserInput.MouseX, UserInput.MouseY); + if (UserInput.IsMouseLeftButtonPressed) + { + mouseDownPosition = new Point(UserInput.MouseX, UserInput.MouseY); mouseActiveWindow = VisibleWindows.LastOrDefault(w => w.Interactive && w.Location.Contains(mouseDownPosition)); if ((mouseActiveWindow != null) && (mouseActiveWindow != WindowsZOrder.Last())) BringWindowToTop(mouseActiveWindow); - } + } if (UserInput.IsMouseWheelChanged) { mouseActiveWindow = VisibleWindows.LastOrDefault(w => w.Interactive && w.Location.Contains(mouseDownPosition)); - + if (mouseActiveWindow != null) mouseActiveWindow.HandleUserInput(); } if (mouseActiveWindow != null) - { - if (UserInput.IsMouseLeftButtonPressed) - mouseActiveWindow.MouseDown(); - else if (UserInput.IsMouseLeftButtonReleased) - mouseActiveWindow.MouseUp(); + { + if (UserInput.IsMouseLeftButtonPressed) + mouseActiveWindow.MouseDown(); + else if (UserInput.IsMouseLeftButtonReleased) + mouseActiveWindow.MouseUp(); - if (UserInput.IsMouseMoved) - mouseActiveWindow.MouseMove(); + if (UserInput.IsMouseMoved) + mouseActiveWindow.MouseMove(); if (Viewer.RealTime - LastUpdateRealTime >= 0.1) - { - LastUpdateRealTime = Viewer.RealTime; - mouseActiveWindow.HandleUserInput(); - } + { + LastUpdateRealTime = Viewer.RealTime; + mouseActiveWindow.HandleUserInput(); + } - if (UserInput.IsMouseLeftButtonReleased) - mouseActiveWindow = null; + if (UserInput.IsMouseLeftButtonReleased) + mouseActiveWindow = null; } - } + } public void BringWindowToTop(Window mouseActiveWindow) { @@ -368,7 +368,7 @@ public void Mark() WindowManagerMaterial.Mark(); PopupWindowMaterial.Mark(); Label3DMaterial.Mark(); - foreach (var window in Windows) + foreach (var window in Windows) window.Mark(); } diff --git a/Source/RunActivity/Viewer3D/Popups/WindowText.cs b/Source/RunActivity/Viewer3D/Popups/WindowText.cs index c084382844..723b04c49b 100644 --- a/Source/RunActivity/Viewer3D/Popups/WindowText.cs +++ b/Source/RunActivity/Viewer3D/Popups/WindowText.cs @@ -19,14 +19,14 @@ #define WINDOWTEXT_SPRITEBATCH +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ORTS.Common; using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Runtime.InteropServices; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using ORTS.Common; using Font = System.Drawing.Font; using FontStyle = System.Drawing.FontStyle; using GraphicsUnit = System.Drawing.GraphicsUnit; @@ -149,7 +149,7 @@ internal WindowTextFont(string fontFamily, float sizeInPt, FontStyle style, int OutlineSize = outlineSize; Characters = new CharacterGroup(Font, OutlineSize); if (Viewer3D.Viewer.Catalog != null) - EnsureCharacterData(Viewer3D.Viewer.Catalog.GetString("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890 \",.-+|!$%&/()=?;:'_[]")); + EnsureCharacterData(Viewer3D.Viewer.Catalog.GetString("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890 \",.-+|!$%&/()=?;:'_[]")); } /// diff --git a/Source/RunActivity/Viewer3D/Precipitation.cs b/Source/RunActivity/Viewer3D/Precipitation.cs index 9f0135e362..0edbe221c3 100644 --- a/Source/RunActivity/Viewer3D/Precipitation.cs +++ b/Source/RunActivity/Viewer3D/Precipitation.cs @@ -17,15 +17,16 @@ // This file is the responsibility of the 3D & Environment Team. +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework.Graphics.PackedVector; +using Orts.Simulation; +using ORTS.Common; using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Runtime.InteropServices; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Orts.Simulation; -using ORTS.Common; namespace Orts.Viewer3D { @@ -84,7 +85,7 @@ public void Reset() // Added random Wind.X value for rain and snow. // Max value used by randWind.Next is max value - 1. Wind.X = Viewer.Simulator.WeatherType == Orts.Formats.Msts.WeatherType.Snow ? Viewer.Random.Next(2, 6) : Viewer.Random.Next(15, 21); - + var gameTime = (float)Viewer.Simulator.GameTime; Pricipitation.Initialize(Viewer.Simulator.WeatherType, Wind); // Camera is null during first initialisation. @@ -301,7 +302,7 @@ public void Initialize(Orts.Formats.Msts.WeatherType weather, Vector3 wind) public void DynamicUpdate(WeatherControl weatherControl, Weather weather, Viewer viewer, ref Vector3 wind) { if (weather.PrecipitationLiquidity == 0 || weather.PrecipitationLiquidity == 1) return; - ParticleDuration = ParticleBoxHeightM / ((RainVelocityMpS - SnowVelocityMpS) * weather.PrecipitationLiquidity + SnowVelocityMpS) / ParticleVelocityFactor; + ParticleDuration = ParticleBoxHeightM / ((RainVelocityMpS-SnowVelocityMpS) * weather.PrecipitationLiquidity + SnowVelocityMpS)/ ParticleVelocityFactor; wind.X = 18 * weather.PrecipitationLiquidity + 2; ParticleDirection = wind; } @@ -505,7 +506,7 @@ public PrecipitationMaterial(Viewer viewer) SnowTexture = SharedTextureManager.Get(Viewer.RenderProcess.GraphicsDevice, System.IO.Path.Combine(Viewer.ContentPath, "Snowflake.png")); DynamicPrecipitationTexture[0] = SnowTexture; DynamicPrecipitationTexture[11] = RainTexture; - for (int i = 1; i <= 10; i++) + for (int i = 1; i<=10; i++) { var path = "Raindrop" + i.ToString() + ".png"; DynamicPrecipitationTexture[11 - i] = SharedTextureManager.Get(Viewer.RenderProcess.GraphicsDevice, System.IO.Path.Combine(Viewer.ContentPath, path)); diff --git a/Source/RunActivity/Viewer3D/Processes/Game.cs b/Source/RunActivity/Viewer3D/Processes/Game.cs index 47862393f2..384d9a18bf 100644 --- a/Source/RunActivity/Viewer3D/Processes/Game.cs +++ b/Source/RunActivity/Viewer3D/Processes/Game.cs @@ -17,6 +17,9 @@ // This file is the responsibility of the 3D & Environment Team. +using Orts.Common; +using ORTS.Common; +using ORTS.Settings; using System; using System.Collections.Generic; using System.Diagnostics; @@ -24,9 +27,6 @@ using System.Linq; using System.Threading; using System.Windows.Forms; -using Orts.Common; -using ORTS.Common; -using ORTS.Settings; namespace Orts.Viewer3D.Processes { diff --git a/Source/RunActivity/Viewer3D/Processes/GameStateRunActivity.cs b/Source/RunActivity/Viewer3D/Processes/GameStateRunActivity.cs index ea27152638..ea6d7352e0 100644 --- a/Source/RunActivity/Viewer3D/Processes/GameStateRunActivity.cs +++ b/Source/RunActivity/Viewer3D/Processes/GameStateRunActivity.cs @@ -18,14 +18,6 @@ // Define this to include extra data on loading performance and progress indications. //#define DEBUG_LOADING -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices; -using System.Text.RegularExpressions; -using System.Windows.Forms; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Orts.Common; @@ -35,6 +27,14 @@ using Orts.Viewer3D.Debugging; using ORTS.Common; using ORTS.Settings; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices; +using System.Text.RegularExpressions; +using System.Windows.Forms; namespace Orts.Viewer3D.Processes { @@ -64,14 +64,14 @@ public class GameStateRunActivity : GameState /// *.evaluation.txt for the text evaluation if an activity evaluation has been requested. /// public class SaveSet - { + { public string FileStem { get; } - // Prefix with the activity filename so that, when resuming from the Menu.exe, we can quickly find those Saves - // that are likely to match the previously chosen route and activity. - // Append the current date and time, so that each file is unique. - // This is the "sortable" date format, ISO 8601, but with "." in place of the ":" which is not valid in filenames. - public SaveSet() + // Prefix with the activity filename so that, when resuming from the Menu.exe, we can quickly find those Saves + // that are likely to match the previously chosen route and activity. + // Append the current date and time, so that each file is unique. + // This is the "sortable" date format, ISO 8601, but with "." in place of the ":" which is not valid in filenames. + public SaveSet() { FileStem = String.Format("{0} {1} {2:yyyy-MM-dd HH.mm.ss}", Simulator.Activity != null @@ -138,7 +138,7 @@ internal override void Update(RenderFrame frame, double totalRealSeconds) frame.AddPrimitive(LoadingBar.Material, LoadingBar, RenderPrimitiveGroup.Overlay, ref LoadingMatrix); } - if (Simulator != null && Simulator.TimetableMode && TimetableLoadingBar != null + if (Simulator != null && Simulator.TimetableMode && TimetableLoadingBar != null && Simulator.TimetableLoadedFraction < 0.99f // 0.99 to hide loading bar at end of timetable pre-run ) { @@ -162,7 +162,7 @@ internal override void Load() // Look for an action to perform. var action = ""; - var actions = new[] { "start", "resume", "replay", "replay_from_save", "test" }; + var actions = new[] { "start", "resume", "replay", "replay_from_save", "test"}; foreach (var possibleAction in actions) if (args.Contains("-" + possibleAction) || args.Contains("/" + possibleAction, StringComparer.OrdinalIgnoreCase)) { @@ -351,7 +351,7 @@ void Start(UserSettings settings, string acttype, string[] args) { Client.Send((new MSGPlayer(UserName, Code, Simulator.conFileName, Simulator.patFileName, Simulator.Trains[0], 0, Simulator.Settings.AvatarURL)).ToString()); // wait 5 seconds to see if you get a reply from server with updated position/consist data, else go on - + System.Threading.Thread.Sleep(5000); if (Simulator.Trains[0].jumpRequested) { @@ -374,7 +374,7 @@ public static void Save() { if (MPManager.IsMultiPlayer() && !MPManager.IsServer()) return; //no save for multiplayer sessions yet if (ContainerManager.ActiveOperationsCounter > 0) - // don't save if performing a container load/unload + // don't save if performing a container load/unload { Simulator.Confirmer.Message(ConfirmLevel.Warning, Viewer.Catalog.GetString("Game save is not allowed during container load/unload")); return; @@ -418,7 +418,7 @@ public static void Save() Viewer.Save(outf, saveSet.FileStem); // Save multiplayer parameters if (MPManager.IsMultiPlayer() && MPManager.IsServer()) - MPManager.OnlineTrains.Save(outf); + MPManager.OnlineTrains.Save (outf); SaveEvaluation(outf); @@ -437,7 +437,7 @@ public static void Save() // Copy the evaluation file to the save folder if (File.Exists(Program.EvaluationFilename)) - File.Copy(Program.EvaluationFilename, Path.Combine(UserSettings.UserDataFolder, saveSet.FileStem + ".evaluation.txt"), true); + File.Copy(Program.EvaluationFilename, Path.Combine(UserSettings.UserDataFolder, saveSet.FileStem + ".evaluation.txt"), true); } private static void SaveEvaluation(BinaryWriter outf) @@ -1171,7 +1171,7 @@ string GetActivityName(string path) { if (!HasExtension(path, ".act")) return null; - + ActivityFile act = null; try { @@ -1340,7 +1340,7 @@ public void Dispose() { Material.Dispose(); } - + public override void Draw(GraphicsDevice graphicsDevice) { graphicsDevice.SetVertexBuffer(VertexBuffer); @@ -1389,7 +1389,7 @@ protected override VertexPositionTexture[] GetVerticies(Game game) class LoadingBarPrimitive : LoadingPrimitive { - public LoadingBarPrimitive(Game game) + public LoadingBarPrimitive(Game game ) : base(game) { } diff --git a/Source/RunActivity/Viewer3D/Processes/GameStateViewer3D.cs b/Source/RunActivity/Viewer3D/Processes/GameStateViewer3D.cs index edb2d6242f..5ad00ab347 100644 --- a/Source/RunActivity/Viewer3D/Processes/GameStateViewer3D.cs +++ b/Source/RunActivity/Viewer3D/Processes/GameStateViewer3D.cs @@ -17,9 +17,9 @@ // This file is the responsibility of the 3D & Environment Team. -using System; using Orts.MultiPlayer; using Orts.Viewer3D.Debugging; +using System; namespace Orts.Viewer3D.Processes { @@ -131,7 +131,7 @@ internal override void Load() internal override void Dispose() { Viewer.Terminate(); - if (MPManager.Server != null) + if (MPManager.Server != null) MPManager.Server.Stop(); if (MPManager.Client != null) MPManager.Client.Stop(); diff --git a/Source/RunActivity/Viewer3D/Processes/LoaderProcess.cs b/Source/RunActivity/Viewer3D/Processes/LoaderProcess.cs index ea9bbdd4e4..b3012faa9d 100644 --- a/Source/RunActivity/Viewer3D/Processes/LoaderProcess.cs +++ b/Source/RunActivity/Viewer3D/Processes/LoaderProcess.cs @@ -17,11 +17,11 @@ // This file is the responsibility of the 3D & Environment Team. +using Orts.Processes; +using ORTS.Common; using System; using System.Diagnostics; using System.Threading; -using Orts.Processes; -using ORTS.Common; using CancellationToken = ORTS.Common.CancellationToken; using CancellationTokenSource = ORTS.Common.CancellationTokenSource; diff --git a/Source/RunActivity/Viewer3D/Processes/RenderProcess.cs b/Source/RunActivity/Viewer3D/Processes/RenderProcess.cs index 3a8a13a312..ae5cb04398 100644 --- a/Source/RunActivity/Viewer3D/Processes/RenderProcess.cs +++ b/Source/RunActivity/Viewer3D/Processes/RenderProcess.cs @@ -17,13 +17,13 @@ // This file is the responsibility of the 3D & Environment Team. -using System; -using System.Diagnostics; -using System.Windows.Forms; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Orts.Processes; using ORTS.Common; +using System; +using System.Diagnostics; +using System.Windows.Forms; using static ORTS.Settings.UserSettings; namespace Orts.Viewer3D.Processes diff --git a/Source/RunActivity/Viewer3D/Processes/SoundProcess.cs b/Source/RunActivity/Viewer3D/Processes/SoundProcess.cs index 0c5647b855..aafbc92948 100644 --- a/Source/RunActivity/Viewer3D/Processes/SoundProcess.cs +++ b/Source/RunActivity/Viewer3D/Processes/SoundProcess.cs @@ -20,13 +20,13 @@ // Define this to log each change of the sound sources. //#define DEBUG_SOURCE_SOURCES +using Orts.Common; +using Orts.Processes; +using ORTS.Common; using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading; -using Orts.Common; -using Orts.Processes; -using ORTS.Common; namespace Orts.Viewer3D.Processes { @@ -152,7 +152,7 @@ void Sound() StartUpdateTime = viewer.RealTime; int RetryUpdate = 0; int restartIndex = -1; - + while (RetryUpdate >= 0) { bool updateInterrupted = false; @@ -229,10 +229,10 @@ void Sound() // Trace.TraceInformation("Sound Source Update Interrupted more than once: {0}", UpdateInterrupts); // the block below could provide better sound response but is more demanding in terms of CPU time, especially for slow CPUs - /* int resptime = (int)((viewer.RealTime - StartUpdateTime) * 1000); - SleepTime = 50 - resptime; - if (SleepTime < 5) - SleepTime = 5;*/ +/* int resptime = (int)((viewer.RealTime - StartUpdateTime) * 1000); + SleepTime = 50 - resptime; + if (SleepTime < 5) + SleepTime = 5;*/ #if DEBUG_SOURCE_SOURCES SoundTime += (int)((viewer.RealTime - StartUpdateTime) * 1000); if (viewer.RealTime - ConsoleWriteTime >= 15f) diff --git a/Source/RunActivity/Viewer3D/Processes/UpdaterProcess.cs b/Source/RunActivity/Viewer3D/Processes/UpdaterProcess.cs index 5f244717f8..d0aa118dfa 100644 --- a/Source/RunActivity/Viewer3D/Processes/UpdaterProcess.cs +++ b/Source/RunActivity/Viewer3D/Processes/UpdaterProcess.cs @@ -17,11 +17,11 @@ // This file is the responsibility of the 3D & Environment Team. +using Orts.Processes; +using ORTS.Common; using System; using System.Diagnostics; using System.Threading; -using Orts.Processes; -using ORTS.Common; namespace Orts.Viewer3D.Processes { diff --git a/Source/RunActivity/Viewer3D/Processes/WatchdogProcess.cs b/Source/RunActivity/Viewer3D/Processes/WatchdogProcess.cs index 61e1631cc0..a7abcc1ec9 100644 --- a/Source/RunActivity/Viewer3D/Processes/WatchdogProcess.cs +++ b/Source/RunActivity/Viewer3D/Processes/WatchdogProcess.cs @@ -17,6 +17,9 @@ // This file is the responsibility of the 3D & Environment Team. +using Orts.Common; +using Orts.Processes; +using ORTS.Common; using System; using System.Collections.Generic; using System.Diagnostics; @@ -24,9 +27,6 @@ using System.Security; using System.Text; using System.Threading; -using Orts.Common; -using Orts.Processes; -using ORTS.Common; namespace Orts.Viewer3D.Processes { diff --git a/Source/RunActivity/Viewer3D/Processes/WebServerProcess.cs b/Source/RunActivity/Viewer3D/Processes/WebServerProcess.cs index 1795e203a6..30b63a0ae6 100644 --- a/Source/RunActivity/Viewer3D/Processes/WebServerProcess.cs +++ b/Source/RunActivity/Viewer3D/Processes/WebServerProcess.cs @@ -18,17 +18,17 @@ // This file is the responsibility of the 3D & Environment Team. -using System; -using System.Diagnostics; -using System.IO; -using System.Net.Sockets; -using System.Threading; -using System.Windows.Forms; using EmbedIO.Net; -using Orts.Processes; +using System.Threading; using Orts.Viewer3D.WebServices; using ORTS.Common; +using Orts.Processes; +using System.IO; +using System.Windows.Forms; using CancellationTokenSource = System.Threading.CancellationTokenSource; +using System.Net.Sockets; +using System.Diagnostics; +using System; namespace Orts.Viewer3D.Processes { @@ -71,7 +71,7 @@ void WebServerThread() using (EmbedIO.WebServer server = WebServer.CreateWebServer($"http://*:{Game.Settings.WebServerPort}", myWebContentPath)) server.RunAsync(StopServer.Token).Wait(); } - catch (AggregateException ex) + catch(AggregateException ex) { if (ex.InnerException is SocketException) { diff --git a/Source/RunActivity/Viewer3D/RenderFrame.cs b/Source/RunActivity/Viewer3D/RenderFrame.cs index f3bc3cd477..057dacc125 100644 --- a/Source/RunActivity/Viewer3D/RenderFrame.cs +++ b/Source/RunActivity/Viewer3D/RenderFrame.cs @@ -77,16 +77,16 @@ public abstract class RenderPrimitive /// . /// public static readonly RenderPrimitiveSequence[] SequenceForBlended = new[] { - RenderPrimitiveSequence.CabBlended, + RenderPrimitiveSequence.CabBlended, RenderPrimitiveSequence.Sky, - RenderPrimitiveSequence.WorldBlended, - RenderPrimitiveSequence.Lights, - RenderPrimitiveSequence.Precipitation, + RenderPrimitiveSequence.WorldBlended, + RenderPrimitiveSequence.Lights, + RenderPrimitiveSequence.Precipitation, RenderPrimitiveSequence.Particles, RenderPrimitiveSequence.InteriorBlended, RenderPrimitiveSequence.Labels, - RenderPrimitiveSequence.OverlayBlended, - }; + RenderPrimitiveSequence.OverlayBlended, + }; /// /// Mapping from to for opaque @@ -94,16 +94,16 @@ public abstract class RenderPrimitive /// . /// public static readonly RenderPrimitiveSequence[] SequenceForOpaque = new[] { - RenderPrimitiveSequence.CabOpaque, + RenderPrimitiveSequence.CabOpaque, RenderPrimitiveSequence.Sky, - RenderPrimitiveSequence.WorldOpaque, - RenderPrimitiveSequence.Lights, - RenderPrimitiveSequence.Precipitation, + RenderPrimitiveSequence.WorldOpaque, + RenderPrimitiveSequence.Lights, + RenderPrimitiveSequence.Precipitation, RenderPrimitiveSequence.Particles, RenderPrimitiveSequence.InteriorOpaque, RenderPrimitiveSequence.Labels, - RenderPrimitiveSequence.OverlayOpaque, - }; + RenderPrimitiveSequence.OverlayOpaque, + }; /// /// This is an adjustment for the depth buffer calculation which may be used to reduce the chance of co-planar primitives from fighting each other. @@ -191,15 +191,15 @@ public int Compare(RenderItem x, RenderItem y) } } - public class RenderItemCollection : IList, IEnumerator - { - RenderItem[] Items = new RenderItem[4]; - int ItemCount; - int EnumeratorIndex; + public class RenderItemCollection : IList, IEnumerator + { + RenderItem[] Items = new RenderItem[4]; + int ItemCount; + int EnumeratorIndex; - public RenderItemCollection() - { - } + public RenderItemCollection() + { + } public int Capacity { @@ -209,165 +209,165 @@ public int Capacity } } - public int Count - { + public int Count + { get { return ItemCount; } - } + } - public void Sort(IComparer comparer) - { - Array.Sort(Items, 0, ItemCount, comparer); - } + public void Sort(IComparer comparer) + { + Array.Sort(Items, 0, ItemCount, comparer); + } - #region IList Members + #region IList Members - public int IndexOf(RenderItem item) - { + public int IndexOf(RenderItem item) + { throw new NotSupportedException(); - } + } - public void Insert(int index, RenderItem item) - { + public void Insert(int index, RenderItem item) + { throw new NotSupportedException(); - } + } - public void RemoveAt(int index) - { + public void RemoveAt(int index) + { throw new NotSupportedException(); - } - - public RenderItem this[int index] - { - get - { + } + + public RenderItem this[int index] + { + get + { + throw new NotSupportedException(); + } + set + { throw new NotSupportedException(); - } - set - { - throw new NotSupportedException(); - } - } + } + } - #endregion + #endregion - #region ICollection Members + #region ICollection Members - public void Add(RenderItem item) - { - if (ItemCount == Items.Length) - { - var items = new RenderItem[Items.Length * 2]; - Array.Copy(Items, 0, items, 0, Items.Length); + public void Add(RenderItem item) + { + if (ItemCount == Items.Length) + { + var items = new RenderItem[Items.Length * 2]; + Array.Copy(Items, 0, items, 0, Items.Length); Items = items; - } - Items[ItemCount] = item; - ItemCount++; - } - - public void Clear() - { - Array.Clear(Items, 0, ItemCount); - ItemCount = 0; - } - - public bool Contains(RenderItem item) - { + } + Items[ItemCount] = item; + ItemCount++; + } + + public void Clear() + { + Array.Clear(Items, 0, ItemCount); + ItemCount = 0; + } + + public bool Contains(RenderItem item) + { throw new NotSupportedException(); - } + } - public void CopyTo(RenderItem[] array, int arrayIndex) - { + public void CopyTo(RenderItem[] array, int arrayIndex) + { throw new NotSupportedException(); - } + } - int ICollection.Count - { + int ICollection.Count + { get { throw new NotSupportedException(); } - } + } - public bool IsReadOnly - { + public bool IsReadOnly + { get { throw new NotSupportedException(); } - } + } - public bool Remove(RenderItem item) - { - throw new NotSupportedException(); - } + public bool Remove(RenderItem item) + { + throw new NotSupportedException(); + } - #endregion + #endregion - #region IEnumerable Members + #region IEnumerable Members - public IEnumerator GetEnumerator() - { - Reset(); - return this; - } + public IEnumerator GetEnumerator() + { + Reset(); + return this; + } - #endregion + #endregion - #region IEnumerable Members + #region IEnumerable Members - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } - #endregion + #endregion - #region IEnumerator Members + #region IEnumerator Members - public RenderItem Current - { + public RenderItem Current + { get { return Items[EnumeratorIndex]; } - } + } - #endregion + #endregion - #region IEnumerator Members + #region IEnumerator Members - object System.Collections.IEnumerator.Current - { + object System.Collections.IEnumerator.Current + { get { return Current; } - } + } - public bool MoveNext() - { - EnumeratorIndex++; - return EnumeratorIndex < ItemCount; - } + public bool MoveNext() + { + EnumeratorIndex++; + return EnumeratorIndex < ItemCount; + } - public void Reset() - { - EnumeratorIndex = -1; - } + public void Reset() + { + EnumeratorIndex = -1; + } - #endregion + #endregion - #region IDisposable Members + #region IDisposable Members - public void Dispose() - { - // No op. - } + public void Dispose() + { + // No op. + } - #endregion + #endregion } public class RenderFrame @@ -391,7 +391,7 @@ public class RenderFrame SpriteBatchMaterial RenderSurfaceMaterial; readonly Material DummyBlendedMaterial; - readonly Dictionary[] RenderItems = new Dictionary[(int)RenderPrimitiveSequence.Sentinel]; + readonly Dictionary[] RenderItems = new Dictionary[(int)RenderPrimitiveSequence.Sentinel]; readonly RenderItemCollection[] RenderShadowSceneryItems; readonly RenderItemCollection[] RenderShadowForestItems; readonly RenderItemCollection[] RenderShadowTerrainItems; @@ -413,7 +413,7 @@ public RenderFrame(Game game) DummyBlendedMaterial = new EmptyMaterial(null); for (int i = 0; i < RenderItems.Length; i++) - RenderItems[i] = new Dictionary(); + RenderItems[i] = new Dictionary(); if (Game.Settings.DynamicShadows) { @@ -479,7 +479,7 @@ public void Clear() } } } - + // Clear out (reset) all of the RenderItem lists. for (var i = 0; i < RenderItems.Length; i++) foreach (var mat in RenderItems[i].Keys) @@ -739,7 +739,7 @@ public void Draw(GraphicsDevice graphicsDevice) } } - void DrawShadows(GraphicsDevice graphicsDevice, bool logging) + void DrawShadows( GraphicsDevice graphicsDevice, bool logging ) { if (logging) Console.WriteLine(" DrawShadows {"); for (var shadowMapIndex = 0; shadowMapIndex < RenderProcess.ShadowMapCount; shadowMapIndex++) @@ -796,7 +796,7 @@ void DrawShadows(GraphicsDevice graphicsDevice, bool logging, int shadowMapIndex // Blur the shadow map. if (Game.Settings.ShadowMapBlur) { - ShadowMap[shadowMapIndex] = ShadowMapMaterial.ApplyBlur(graphicsDevice, ShadowMap[shadowMapIndex], ShadowMapRenderTarget[shadowMapIndex]); + ShadowMap[shadowMapIndex] = ShadowMapMaterial.ApplyBlur(graphicsDevice, ShadowMap[shadowMapIndex], ShadowMapRenderTarget[shadowMapIndex]); #if DEBUG_RENDER_STATE DebugRenderState(graphicsDevice, ShadowMapMaterial.ToString() + " ApplyBlur()"); #endif diff --git a/Source/RunActivity/Viewer3D/RoadCars.cs b/Source/RunActivity/Viewer3D/RoadCars.cs index c329d652fd..43ccf3ad65 100644 --- a/Source/RunActivity/Viewer3D/RoadCars.cs +++ b/Source/RunActivity/Viewer3D/RoadCars.cs @@ -17,14 +17,14 @@ // This file is the responsibility of the 3D & Environment Team. -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; using Microsoft.Xna.Framework; using Orts.Formats.Msts; using Orts.Simulation; using ORTS.Common; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; namespace Orts.Viewer3D { @@ -79,7 +79,7 @@ public RoadCarSpawner(Viewer viewer, WorldPosition position, CarSpawnerObj carSp } var sortedLevelCrossings = new SortedList(); - for (var crossingTraveller = new Traveller(Traveller); crossingTraveller.NextSection();) + for (var crossingTraveller = new Traveller(Traveller); crossingTraveller.NextSection(); ) if (crossingTraveller.IsTrack && crossingTraveller.TN.TrVectorNode.TrItemRefs != null) foreach (var trItemRef in crossingTraveller.TN.TrVectorNode.TrItemRefs) if (Viewer.Simulator.LevelCrossings.RoadCrossingItems.ContainsKey(trItemRef)) @@ -274,7 +274,7 @@ public void Update(ElapsedTime elapsedTime) stopDistances.Add(cars[spawnerIndex - 1].Travelled - cars[spawnerIndex - 1].Length / 2); else stopDistances.Add(cars[spawnerIndex - 1].Travelled - cars[spawnerIndex - 1].Length * 0.65f - 4 - cars[spawnerIndex - 1].Speed * 0.5f); - } + } // Calculate whether we're too close to the minimum stopping distance (and need to slow down) or going too slowly (and need to speed up). var stopDistance = stopDistances.Count > 0 ? stopDistances.Min() - Travelled - Length / 2 : float.MaxValue; @@ -292,7 +292,7 @@ public void Update(ElapsedTime elapsedTime) RearTraveller.Move(distance); } - public void ChangeSpeed(float speed) + public void ChangeSpeed (float speed) { if (speed > 0) { diff --git a/Source/RunActivity/Viewer3D/RollingStock/MSTSDieselLocomotiveViewer.cs b/Source/RunActivity/Viewer3D/RollingStock/MSTSDieselLocomotiveViewer.cs index 4573d6bc58..fabf6e9f34 100644 --- a/Source/RunActivity/Viewer3D/RollingStock/MSTSDieselLocomotiveViewer.cs +++ b/Source/RunActivity/Viewer3D/RollingStock/MSTSDieselLocomotiveViewer.cs @@ -112,7 +112,7 @@ public override void InitializeUserInputCommands() public override void PrepareFrame(RenderFrame frame, ElapsedTime elapsedTime) { var car = this.Car as MSTSDieselLocomotive; - + // Diesel exhaust var exhaustParticles = car.Train != null && car.Train.TrainType == Train.TRAINTYPE.STATIC ? 0 : car.ExhaustParticles.SmoothedValue; foreach (var drawer in Exhaust) @@ -122,7 +122,7 @@ public override void PrepareFrame(RenderFrame frame, ElapsedTime elapsedTime) var colorB = car.ExhaustColorB.SmoothedValue / 255f; drawer.SetOutput(exhaustParticles, car.ExhaustMagnitude.SmoothedValue, new Color((byte)car.ExhaustColorR.SmoothedValue, (byte)car.ExhaustColorG.SmoothedValue, (byte)car.ExhaustColorB.SmoothedValue)); } - + base.PrepareFrame(frame, elapsedTime); } } diff --git a/Source/RunActivity/Viewer3D/RollingStock/MSTSElectricLocomotiveViewer.cs b/Source/RunActivity/Viewer3D/RollingStock/MSTSElectricLocomotiveViewer.cs index 7b2d402227..f4fb5c0d70 100644 --- a/Source/RunActivity/Viewer3D/RollingStock/MSTSElectricLocomotiveViewer.cs +++ b/Source/RunActivity/Viewer3D/RollingStock/MSTSElectricLocomotiveViewer.cs @@ -38,8 +38,8 @@ public MSTSElectricLocomotiveViewer(Viewer viewer, MSTSElectricLocomotive car) if (ElectricLocomotive.Train != null && (car.Train.TrainType == Train.TRAINTYPE.AI || ((car.Train.TrainType == Train.TRAINTYPE.PLAYER || car.Train.TrainType == Train.TRAINTYPE.AI_PLAYERDRIVEN || car.Train.TrainType == Train.TRAINTYPE.AI_PLAYERHOSTING) && (car.Train.MUDirection != Direction.N && ElectricLocomotive.LocomotivePowerSupply.MainPowerSupplyOn)))) - // following reactivates the sound triggers related to certain states - // for pantos the sound trigger related to the raised panto must be reactivated, else SignalEvent() would raise also another panto + // following reactivates the sound triggers related to certain states + // for pantos the sound trigger related to the raised panto must be reactivated, else SignalEvent() would raise also another panto { var iPanto = 0; Event evt; @@ -99,7 +99,7 @@ public override void InitializeUserInputCommands() new CircuitBreakerClosingOrderButtonCommand(Viewer.Log, true); } }); - UserInputCommands.Add(UserCommand.ControlCircuitBreakerOpeningOrder, new Action[] { () => new CircuitBreakerOpeningOrderButtonCommand(Viewer.Log, false), () => new CircuitBreakerOpeningOrderButtonCommand(Viewer.Log, true) }); + UserInputCommands.Add(UserCommand.ControlCircuitBreakerOpeningOrder, new Action[] { () => new CircuitBreakerOpeningOrderButtonCommand(Viewer.Log, false), () => new CircuitBreakerOpeningOrderButtonCommand(Viewer.Log, true)}); UserInputCommands.Add(UserCommand.ControlCircuitBreakerClosingAuthorization, new Action[] { Noop, () => new CircuitBreakerClosingAuthorizationCommand(Viewer.Log, !ElectricLocomotive.ElectricPowerSupply.CircuitBreaker.DriverClosingAuthorization) }); base.InitializeUserInputCommands(); } diff --git a/Source/RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs b/Source/RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs index 804993df51..e45b980e81 100644 --- a/Source/RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs +++ b/Source/RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs @@ -33,8 +33,8 @@ using Orts.Simulation.RollingStocks.SubSystems.Controllers; using Orts.Viewer3D.Common; using Orts.Viewer3D.Popups; -using Orts.Viewer3D.RollingStock.Subsystems.ETCS; using Orts.Viewer3D.RollingStock.SubSystems; +using Orts.Viewer3D.RollingStock.Subsystems.ETCS; using ORTS.Common; using ORTS.Common.Input; using ORTS.Scripting.Api; @@ -219,7 +219,7 @@ public override void InitializeUserInputCommands() UserInputCommands.Add(UserCommand.ControlDPBrake, new Action[] { Noop, () => new DPDynamicBrakeCommand(Viewer.Log) }); UserInputCommands.Add(UserCommand.ControlDPMore, new Action[] { Noop, () => new DPMoreCommand(Viewer.Log) }); UserInputCommands.Add(UserCommand.ControlDPLess, new Action[] { Noop, () => new DPLessCommand(Viewer.Log) }); - + base.InitializeUserInputCommands(); } @@ -236,7 +236,7 @@ public override void HandleUserInput(ElapsedTime elapsedTime) if (UserInput.IsPressed(UserCommand.DebugResetWheelSlip)) { Locomotive.Train.SignalEvent(Event._ResetWheelSlip); } if (UserInput.IsPressed(UserCommand.DebugToggleAdvancedAdhesion)) { Locomotive.Train.SignalEvent(Event._ResetWheelSlip); Locomotive.Simulator.UseAdvancedAdhesion = !Locomotive.Simulator.UseAdvancedAdhesion; } - ExternalDeviceState[] externalDevices = { UserInput.RDState, UserInput.WebDeviceState }; + ExternalDeviceState[] externalDevices = {UserInput.RDState, UserInput.WebDeviceState}; foreach (var external in externalDevices) { if (external == null) continue; @@ -404,7 +404,7 @@ public override void Unload() if (Locomotive.TrainControlSystem != null && Locomotive.TrainControlSystem.Sounds.Count > 0) foreach (var script in Locomotive.TrainControlSystem.Sounds.Keys) { - Viewer.SoundProcess.RemoveSoundSources(script); + Viewer.SoundProcess.RemoveSoundSources(script); } base.Unload(); } @@ -499,9 +499,9 @@ WagonAndMatchingPickup GetMatchingPickup(Train train, bool onlyUnload = false) pickup.Location = new WorldLocation( worldFile.TileX, worldFile.TileZ, pickup.Position.X, pickup.Position.Y, pickup.Position.Z); - if ((wagon.FreightAnimations != null && ((uint)wagon.FreightAnimations.FreightType == pickup.PickupType || wagon.FreightAnimations.FreightType == MSTSWagon.PickupType.None) && - (uint)intake.Type == pickup.PickupType) - || ((uint)intake.Type == pickup.PickupType && (uint)intake.Type > (uint)MSTSWagon.PickupType.FreightSand && (wagon.WagonType == TrainCar.WagonTypes.Tender || wagon is MSTSLocomotive))) + if ((wagon.FreightAnimations != null && ((uint)wagon.FreightAnimations.FreightType == pickup.PickupType || wagon.FreightAnimations.FreightType == MSTSWagon.PickupType.None) && + (uint)intake.Type == pickup.PickupType) + || ((uint)intake.Type == pickup.PickupType && (uint)intake.Type > (uint)MSTSWagon.PickupType.FreightSand && (wagon.WagonType == TrainCar.WagonTypes.Tender || wagon is MSTSLocomotive))) { if (intake.Type == MSTSWagon.PickupType.Container) { @@ -516,7 +516,7 @@ WagonAndMatchingPickup GetMatchingPickup(Train train, bool onlyUnload = false) intakePosition.X, intakePosition.Y, -intakePosition.Z); var d2 = WorldLocation.GetDistanceSquared(intakeLocation, pickup.Location); - if (intake.Type == MSTSWagon.PickupType.Container && containerStation != null && + if (intake.Type == MSTSWagon.PickupType.Container && containerStation != null && (wagon.Train.FrontTDBTraveller.TN.Index == containerStation.TrackNode.Index || wagon.Train.RearTDBTraveller.TN.Index == containerStation.TrackNode.Index) && d2 < containerStation.MinZSpan * containerStation.MinZSpan) @@ -586,11 +586,11 @@ float GetDistanceToM(WagonAndMatchingPickup match) public void ImmediateRefill() { var loco = this.Locomotive; - + if (loco == null) return; - - foreach (var car in loco.Train.Cars) + + foreach(var car in loco.Train.Cars) { // There is no need to check for the tender. The MSTSSteamLocomotive is the primary key in the refueling process when using immediate refueling. // Electric locomotives may have steam heat boilers fitted, and they can refill these @@ -622,7 +622,7 @@ public void AttemptToRefillOrUnload(bool onlyUnload = false) } float distanceToPickupM = GetDistanceToM(match); if (match.IntakePoint.LinkedFreightAnim != null && match.IntakePoint.LinkedFreightAnim is FreightAnimationDiscrete) - // for container cranes handle distance management using Z span of crane + // for container cranes handle distance management using Z span of crane { var containerStation = Viewer.Simulator.ContainerManager.ContainerHandlingItems.Where(item => item.Key == match.Pickup.TrItemIDList[0].dbID).Select(item => item.Value).First(); if (distanceToPickupM > containerStation.MinZSpan) @@ -1863,14 +1863,14 @@ public override void PrepareFrame(RenderFrame frame, ElapsedTime elapsedTime) if (Gauge.Orientation == 0) { destX = (int)(xratio * (Control.PositionX)) + (int)(xratio * (zeropos < xpos ? zeropos : xpos)); - // destY = (int)(yratio * Control.PositionY); +// destY = (int)(yratio * Control.PositionY); destY = (int)(yratio * (Control.PositionY) - (int)(yratio * (Gauge.Direction == 0 && zeropos > xpos ? (zeropos - xpos) * Math.Sin(DrawRotation) : 0))); destW = ((int)(xratio * xpos) - (int)(xratio * zeropos)) * (xpos >= zeropos ? 1 : -1); destH = (int)(yratio * ypos); } else { - destX = (int)(xratio * Control.PositionX) + (int)(xratio * (Gauge.Direction == 0 && ypos > zeropos ? (ypos - zeropos) * Math.Sin(DrawRotation) : 0)); + destX = (int)(xratio * Control.PositionX) +(int)(xratio * (Gauge.Direction == 0 && ypos > zeropos ? (ypos - zeropos) * Math.Sin(DrawRotation) : 0)); if (Gauge.Direction != 1 && !IsFire) destY = (int)(yratio * (Control.PositionY + zeropos)) + (ypos > zeropos ? (int)(yratio * (zeropos - ypos)) : 0); else @@ -2166,9 +2166,9 @@ public virtual int GetDrawIndex() case CABViewControlTypes.CP_HANDLE: if (Locomotive.CombinedControlType == MSTSLocomotive.CombinedControl.ThrottleDynamic && Locomotive.DynamicBrakePercent >= 0 || Locomotive.CombinedControlType == MSTSLocomotive.CombinedControl.ThrottleAir && Locomotive.TrainBrakeController.CurrentValue > 0) - index = PercentToIndex(Locomotive.GetCombinedHandleValue(false)); - else - index = PercentToIndex(Locomotive.GetCombinedHandleValue(false)); + index = PercentToIndex(Locomotive.GetCombinedHandleValue(false)); + else + index = PercentToIndex(Locomotive.GetCombinedHandleValue(false)); break; case CABViewControlTypes.ORTS_SELECTED_SPEED_DISPLAY: if (Locomotive.CruiseControl == null) @@ -2305,7 +2305,7 @@ public virtual int GetDrawIndex() case CABViewControlTypes.ORTS_CC_SELECTED_SPEED: case CABViewControlTypes.ORTS_MULTI_POSITION_CONTROLLER: case CABViewControlTypes.ORTS_ACCELERATION_IN_TIME: - case CABViewControlTypes.ORTS_CC_SPEED_DELTA: + case CABViewControlTypes.ORTS_CC_SPEED_DELTA: case CABViewControlTypes.ORTS_CC_SPEED_0: index = (int)data; break; @@ -2704,7 +2704,7 @@ public void HandleUserInput() break; } - case CABViewControlTypes.ORTS_CC_SPEED_DELTA: + case CABViewControlTypes.ORTS_CC_SPEED_DELTA: { p = ChangedValue(0); if (p == 1) diff --git a/Source/RunActivity/Viewer3D/RollingStock/MSTSSteamLocomotiveViewer.cs b/Source/RunActivity/Viewer3D/RollingStock/MSTSSteamLocomotiveViewer.cs index a8a7e579a5..9e913394d3 100644 --- a/Source/RunActivity/Viewer3D/RollingStock/MSTSSteamLocomotiveViewer.cs +++ b/Source/RunActivity/Viewer3D/RollingStock/MSTSSteamLocomotiveViewer.cs @@ -21,7 +21,9 @@ using System.Collections.Generic; using Microsoft.Xna.Framework; using Orts.Common; +using Orts.Simulation; using Orts.Simulation.RollingStocks; +using Orts.Simulation.RollingStocks.SubSystems.Controllers; using ORTS.Common; using ORTS.Common.Input; @@ -151,18 +153,18 @@ protected override void ReverserControlBackwards() { SteamLocomotive.StartReverseDecrease(null); } - + /// /// Overrides the base method as steam locomotives have only rudimentary gear boxes. /// protected override void StartGearBoxIncrease() { SteamLocomotive.SteamStartGearBoxIncrease(); - } - + } + protected override void StopGearBoxIncrease() { - SteamLocomotive.SteamStopGearBoxIncrease(); + SteamLocomotive.SteamStopGearBoxIncrease(); } protected override void StartGearBoxDecrease() @@ -174,7 +176,7 @@ protected override void StopGearBoxDecrease() { SteamLocomotive.SteamStopGearBoxDecrease(); } - + public override void InitializeUserInputCommands() { @@ -266,7 +268,7 @@ public override void PrepareFrame(RenderFrame frame, ElapsedTime elapsedTime) foreach (var drawer in Cylinders) drawer.SetOutput(car.Cylinders1SteamVelocityMpS, car.Cylinders1SteamVolumeM3pS, car.Cylinder1ParticleDurationS); - foreach (var drawer in Cylinders2) + foreach (var drawer in Cylinders2) drawer.SetOutput(car.Cylinders2SteamVelocityMpS, car.Cylinders2SteamVolumeM3pS, car.Cylinder2ParticleDurationS); foreach (var drawer in Cylinders11) @@ -307,16 +309,16 @@ public override void PrepareFrame(RenderFrame frame, ElapsedTime elapsedTime) foreach (var drawer in Blowdown) drawer.SetOutput(car.BlowdownSteamVelocityMpS, car.BlowdownSteamVolumeM3pS, car.BlowdownParticleDurationS); - + // TODO: Drainpipe - Not used in either MSTS or OR - currently disabled by zero values set in SteamLocomotive file - foreach (var drawer in Drainpipe) + foreach (var drawer in Drainpipe) drawer.SetOutput(car.DrainpipeSteamVelocityMpS, car.DrainpipeSteamVolumeM3pS, car.DrainpipeParticleDurationS); - foreach (var drawer in Injectors1) + foreach (var drawer in Injectors1) drawer.SetOutput(car.Injector1SteamVelocityMpS, car.Injector1SteamVolumeM3pS, car.Injector1ParticleDurationS); - foreach (var drawer in Injectors2) - drawer.SetOutput(car.Injector2SteamVelocityMpS, car.Injector2SteamVolumeM3pS, car.Injector2ParticleDurationS); + foreach (var drawer in Injectors2) + drawer.SetOutput(car.Injector2SteamVelocityMpS, car.Injector2SteamVolumeM3pS, car.Injector2ParticleDurationS); foreach (var drawer in SmallEjector) drawer.SetOutput(car.SmallEjectorSteamVelocityMpS, car.SmallEjectorSteamVolumeM3pS, car.SmallEjectorParticleDurationS); @@ -325,14 +327,14 @@ public override void PrepareFrame(RenderFrame frame, ElapsedTime elapsedTime) drawer.SetOutput(car.LargeEjectorSteamVelocityMpS, car.LargeEjectorSteamVolumeM3pS, car.LargeEjectorParticleDurationS); foreach (var drawer in Compressor) - drawer.SetOutput(car.CompressorSteamVelocityMpS, car.CompressorSteamVolumeM3pS, car.CompressorParticleDurationS); + drawer.SetOutput(car.CompressorSteamVelocityMpS, car.CompressorSteamVolumeM3pS, car.CompressorParticleDurationS ); foreach (var drawer in Generator) drawer.SetOutput(car.GeneratorSteamVelocityMpS, car.GeneratorSteamVolumeM3pS, car.GeneratorParticleDurationS); - + foreach (var drawer in SafetyValves) drawer.SetOutput(car.SafetyValvesSteamVelocityMpS, car.SafetyValvesSteamVolumeM3pS, car.SafetyValvesParticleDurationS); - + foreach (var drawer in Stack) { Color_Value = car.SmokeColor.SmoothedValue; diff --git a/Source/RunActivity/Viewer3D/RollingStock/MSTSWagonViewer.cs b/Source/RunActivity/Viewer3D/RollingStock/MSTSWagonViewer.cs index 588a20e675..10ca353178 100644 --- a/Source/RunActivity/Viewer3D/RollingStock/MSTSWagonViewer.cs +++ b/Source/RunActivity/Viewer3D/RollingStock/MSTSWagonViewer.cs @@ -27,6 +27,7 @@ using System.Linq; using Microsoft.Xna.Framework; using Orts.Common; +using Orts.Simulation.Physics; using Orts.Simulation.RollingStocks; using Orts.Simulation.RollingStocks.SubSystems; using Orts.Viewer3D.RollingStock.SubSystems; @@ -106,7 +107,7 @@ public class MSTSWagonViewer : TrainCarViewer public MSTSWagonViewer(Viewer viewer, MSTSWagon car) : base(viewer, car) { - + string steamTexture = viewer.Simulator.BasePath + @"\GLOBAL\TEXTURES\smokemain.ace"; string dieselTexture = viewer.Simulator.BasePath + @"\GLOBAL\TEXTURES\dieselsmoke.ace"; @@ -141,7 +142,7 @@ public MSTSWagonViewer(Viewer viewer, MSTSWagon car) // Exhaust for HEP/Power Generator if (emitter.Key.ToLowerInvariant() == "wagongeneratorfx") WagonGenerator.AddRange(emitter.Value); - + foreach (var drawer in WagonGenerator) { drawer.Initialize(dieselTexture); @@ -244,7 +245,7 @@ public MSTSWagonViewer(Viewer viewer, MSTSWagon car) // This insection initialises the MSTS style freight animation - can either be for a coal load, which will adjust with usage, or a static animation, such as additional shape. if (car.FreightShapeFileName != null) { - + car.HasFreightAnim = true; FreightShape = new AnimatedShape(viewer, wagonFolderSlash + car.FreightShapeFileName + '\0' + wagonFolderSlash, new WorldPosition(car.WorldPosition), ShapeFlags.ShadowCaster); @@ -706,7 +707,7 @@ public override void PrepareFrame(RenderFrame frame, ElapsedTime elapsedTime) private void UpdateAnimation(RenderFrame frame, ElapsedTime elapsedTime) { - + float distanceTravelledM = 0.0f; // Distance travelled by non-driven wheels float distanceTravelledDrivenM = 0.0f; // Distance travelled by driven wheels float AnimationWheelRadiusM = MSTSWagon.WheelRadiusM; // Radius of non driven wheels @@ -755,16 +756,16 @@ private void UpdateAnimation(RenderFrame frame, ElapsedTime elapsedTime) // Wheel rotation (animation) - for non-drive wheels in steam locomotives and all wheels in other stock if (WheelPartIndexes.Count > 0) - { + { var wheelCircumferenceM = MathHelper.TwoPi * AnimationWheelRadiusM; var rotationalDistanceR = MathHelper.TwoPi * distanceTravelledM / wheelCircumferenceM; // in radians WheelRotationR = MathHelper.WrapAngle(WheelRotationR - rotationalDistanceR); var wheelRotationMatrix = Matrix.CreateRotationX(WheelRotationR); foreach (var iMatrix in WheelPartIndexes) - { + { TrainCarShape.XNAMatrices[iMatrix] = wheelRotationMatrix * TrainCarShape.SharedShape.Matrices[iMatrix]; - } - } + } + } #if DEBUG_WHEEL_ANIMATION @@ -809,8 +810,8 @@ private void UpdateAnimation(RenderFrame frame, ElapsedTime elapsedTime) FreightShape.Location.TileX = Car.WorldPosition.TileX; FreightShape.Location.TileZ = Car.WorldPosition.TileZ; - bool SteamAnimShape = false; - float FuelControllerLevel = 0.0f; + bool SteamAnimShape = false; + float FuelControllerLevel = 0.0f; // For coal load variation on locomotives determine the current fuel level - and whether locomotive is a tender or tank type locomotive. if (MSTSWagon.WagonType == TrainCar.WagonTypes.Tender || MSTSWagon is MSTSSteamLocomotive) @@ -833,24 +834,24 @@ private void UpdateAnimation(RenderFrame frame, ElapsedTime elapsedTime) { FuelControllerLevel = NonTenderSteamLocomotive.FuelController.CurrentValue; SteamAnimShape = true; - } + } } } - // Set height of FAs - if relevant conditions met, use default position co-ords defined above - if (FreightShape.XNAMatrices.Length > 0) - { - // For tender coal load animation - if (MSTSWagon.FreightAnimFlag > 0 && MSTSWagon.FreightAnimMaxLevelM > MSTSWagon.FreightAnimMinLevelM && SteamAnimShape) - { - FreightShape.XNAMatrices[0].M42 = MSTSWagon.FreightAnimMinLevelM + FuelControllerLevel * (MSTSWagon.FreightAnimMaxLevelM - MSTSWagon.FreightAnimMinLevelM); - } - // reproducing MSTS strange behavior; used to display loco crew when attached to tender - else if (MSTSWagon.WagonType == TrainCar.WagonTypes.Tender) + // Set height of FAs - if relevant conditions met, use default position co-ords defined above + if (FreightShape.XNAMatrices.Length > 0) { - FreightShape.Location.XNAMatrix.M42 += MSTSWagon.FreightAnimMaxLevelM; + // For tender coal load animation + if (MSTSWagon.FreightAnimFlag > 0 && MSTSWagon.FreightAnimMaxLevelM > MSTSWagon.FreightAnimMinLevelM && SteamAnimShape) + { + FreightShape.XNAMatrices[0].M42 = MSTSWagon.FreightAnimMinLevelM + FuelControllerLevel * (MSTSWagon.FreightAnimMaxLevelM - MSTSWagon.FreightAnimMinLevelM); + } + // reproducing MSTS strange behavior; used to display loco crew when attached to tender + else if (MSTSWagon.WagonType == TrainCar.WagonTypes.Tender) + { + FreightShape.Location.XNAMatrix.M42 += MSTSWagon.FreightAnimMaxLevelM; + } } - } // Display Animation Shape FreightShape.PrepareFrame(frame, elapsedTime); } @@ -935,7 +936,7 @@ private void UpdateCouplers(RenderFrame frame, ElapsedTime elapsedTime) if (FrontCouplerShape != null && !(Viewer.Camera.AttachedCar == this.MSTSWagon && Viewer.Camera.Style == Camera.Styles.ThreeDimCab)) { // Get the movement that would be needed to locate the coupler on the car if they were pointing in the default direction. - var displacement = Car.FrontCoupler.Size; + var displacement = Car.FrontCoupler.Size; displacement.Z += (Car.CarLengthM / 2.0f) + Car.FrontCouplerSlackM - Car.WagonFrontCouplerCurveExtM; if (Car.CarAhead != null) // Display animated coupler if there is a car infront of this car @@ -1186,7 +1187,7 @@ private Quaternion PositionCoupler(TrainCar car, AnimatedShape couplerShape, Vec // ToDO - For some reason aligning the coupler with a flipped car introduces a small error in the coupler position such that the couplers between a normal and flipped // car will not align correctly. // To correct this "somewhat" a test has been introduced to align coupler location with the previous car. See code above in front coupler. - + // Place the coupler in the centre of the car var p = new WorldPosition(car.WorldPosition); couplerShape.Location.Location = new Vector3(p.Location.X, p.Location.Y, p.Location.Z); @@ -1231,7 +1232,7 @@ private void AdjustCouplerAngle(TrainCar adjacentCar, AnimatedShape couplerShape var mRotation = Matrix.CreateRotationY(angle); // Rotate the coupler to align with the calculated angle direction - couplerShape.Location.XNAMatrix = mRotation * couplerShape.Location.XNAMatrix; + couplerShape.Location.XNAMatrix = mRotation* couplerShape.Location.XNAMatrix; } @@ -1255,12 +1256,12 @@ private void AdjustAirHoseAngle(TrainCar adjacentCar, AnimatedShape airhoseShape } - /// - /// Rotate the coupler to align with the direction (attitude) of the car. - /// - /// - /// - private void AlignCouplerWithCar(TrainCar car, AnimatedShape couplerShape) + /// + /// Rotate the coupler to align with the direction (attitude) of the car. + /// + /// + /// + private void AlignCouplerWithCar(TrainCar car, AnimatedShape couplerShape) { var p = new WorldPosition(car.WorldPosition); diff --git a/Source/RunActivity/Viewer3D/RollingStock/SubSystems/ContainerViewer.cs b/Source/RunActivity/Viewer3D/RollingStock/SubSystems/ContainerViewer.cs index 48a52d21e5..362137fdc6 100644 --- a/Source/RunActivity/Viewer3D/RollingStock/SubSystems/ContainerViewer.cs +++ b/Source/RunActivity/Viewer3D/RollingStock/SubSystems/ContainerViewer.cs @@ -15,10 +15,13 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System.Collections.Generic; -using System.Linq; +using Microsoft.Xna.Framework; using Orts.Simulation; +using Orts.Simulation.RollingStocks; +using Orts.Simulation.RollingStocks.SubSystems; using ORTS.Common; +using System.Collections.Generic; +using System.Linq; namespace Orts.Viewer3D.RollingStock.SubSystems { @@ -145,13 +148,13 @@ public ContainerViewer(Viewer viewer, Container container) } } } - /* if (ContainerShape.XNAMatrices.Length > 0 && animation is FreightAnimationDiscrete && (animation as FreightAnimationDiscrete).Flipped) - { - var flipper = Matrix.Identity; - flipper.M11 = -1; - flipper.M33 = -1; - ContainerShape.XNAMatrices[0] *= flipper; - }*/ +/* if (ContainerShape.XNAMatrices.Length > 0 && animation is FreightAnimationDiscrete && (animation as FreightAnimationDiscrete).Flipped) + { + var flipper = Matrix.Identity; + flipper.M11 = -1; + flipper.M33 = -1; + ContainerShape.XNAMatrices[0] *= flipper; + }*/ } public void Mark() diff --git a/Source/RunActivity/Viewer3D/RollingStock/SubSystems/CruiseControlViewer.cs b/Source/RunActivity/Viewer3D/RollingStock/SubSystems/CruiseControlViewer.cs index 94a17abbf1..d45a7a6168 100644 --- a/Source/RunActivity/Viewer3D/RollingStock/SubSystems/CruiseControlViewer.cs +++ b/Source/RunActivity/Viewer3D/RollingStock/SubSystems/CruiseControlViewer.cs @@ -15,9 +15,13 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using Microsoft.Xna.Framework; using System; +using System.Collections.Generic; using Orts.Simulation.RollingStocks; using Orts.Simulation.RollingStocks.SubSystems; +using Orts.Viewer3D.RollingStock; +using ORTS.Common; using ORTS.Common.Input; namespace Orts.Viewer3D.RollingStock.SubSystems diff --git a/Source/RunActivity/Viewer3D/RollingStock/SubSystems/DistributedPowerInterface.cs b/Source/RunActivity/Viewer3D/RollingStock/SubSystems/DistributedPowerInterface.cs index 9ade555a30..c09b3619c4 100644 --- a/Source/RunActivity/Viewer3D/RollingStock/SubSystems/DistributedPowerInterface.cs +++ b/Source/RunActivity/Viewer3D/RollingStock/SubSystems/DistributedPowerInterface.cs @@ -17,11 +17,6 @@ // This file is the responsibility of the 3D & Environment Team. -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Orts.Formats.Msts; @@ -29,6 +24,11 @@ using Orts.Viewer3D.Common; using Orts.Viewer3D.Popups; using ORTS.Common; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; using static Orts.Viewer3D.RollingStock.SubSystems.DistributedPowerInterface; namespace Orts.Viewer3D.RollingStock.SubSystems @@ -172,7 +172,7 @@ public DPDefaultWindow(DistributedPowerInterface dpi, CabViewControl control) : sUnits = sUnits.Replace('/', '_'); CABViewControlUnits.TryParse(sUnits, out LoadUnits); } - DPITable = new DPITable(FullTable, LoadUnits, fullScreen: true, dpi: dpi, (control as CVCScreen).Rotation); + DPITable = new DPITable(FullTable, LoadUnits, fullScreen:true, dpi:dpi, (control as CVCScreen).Rotation); AddToLayout(DPITable, new Point(0, 0)); } } @@ -258,13 +258,13 @@ public virtual void Draw(SpriteBatch spriteBatch, Point drawPosition) if (r.DrawAsInteger) DrawIntRectangle(spriteBatch, drawPosition, r.X, r.Y, r.Width, r.Height, r.Color); else DrawRectangle(spriteBatch, drawPosition, r.X, r.Y, r.Width, r.Height, r.Color); } - foreach (var text in Texts) + foreach(var text in Texts) { int x = drawPosition.X + (int)Math.Round(text.Position.X * Scale); int y = drawPosition.Y + (int)Math.Round(text.Position.Y * Scale); text.Draw(spriteBatch, new Point(x, y)); } - foreach (var tex in Textures) + foreach(var tex in Textures) { DrawSymbol(spriteBatch, tex.Texture, drawPosition, tex.Position.Y, tex.Position.Y); } @@ -297,7 +297,7 @@ public void DrawSymbol(SpriteBatch spriteBatch, Texture2D texture, Point origin, { spriteBatch.Draw(texture, new Vector2(origin.X + x * Scale, origin.Y + y * Scale), null, Color.White, 0, Vector2.Zero, Scale * DPI.MipMapScale, SpriteEffects.None, 0); } - public WindowTextFont GetFont(float size, bool bold = false) + public WindowTextFont GetFont(float size, bool bold=false) { return DPI.Viewer.WindowManager.TextManager.GetExact("Arial", GetScaledFontSize(size), bold ? System.Drawing.FontStyle.Bold : System.Drawing.FontStyle.Regular); } @@ -326,7 +326,7 @@ public override void PrepareFrame(DPIStatus status) { if (!Visible) return; base.PrepareFrame(status); - foreach (var area in SubAreas) + foreach(var area in SubAreas) { area.PrepareFrame(status); } @@ -335,7 +335,7 @@ public override void Draw(SpriteBatch spriteBatch, Point drawPosition) { if (!Visible) return; base.Draw(spriteBatch, drawPosition); - foreach (var area in SubAreas) + foreach(var area in SubAreas) { if (area.Visible) area.Draw(spriteBatch, new Point((int)Math.Round(drawPosition.X + area.Position.X * Scale), (int)Math.Round(drawPosition.Y + area.Position.Y * Scale))); } @@ -393,7 +393,7 @@ public class DPITable : DPIWindow public readonly string[] FirstColumn = { "ID", "Throttle", "Load", "BP", "Flow", "Remote", "ER", "BC", "MR" }; - public DPITable(bool fullTable, CABViewControlUnits loadUnits, bool fullScreen, DistributedPowerInterface dpi, float drawRotation) : base(dpi, 640, fullTable ? 230 : 162) + public DPITable(bool fullTable, CABViewControlUnits loadUnits, bool fullScreen, DistributedPowerInterface dpi, float drawRotation) : base(dpi, 640, fullTable? 230 : 162) { DPI = dpi; FullScreen = fullScreen; @@ -417,7 +417,7 @@ public DPITable(bool fullTable, CABViewControlUnits loadUnits, bool fullScreen, public override void ScaleChanged() { - // base.ScaleChanged(); +// base.ScaleChanged(); SetFont(); } void SetFont() @@ -497,7 +497,7 @@ public override void PrepareFrame(DPIStatus dpiStatus) } dieselLocomotivesCount = k;// only leaders loco group - var nRows = Math.Min(FullTable ? NumberOfRowsFull : NumberOfRowsPartial, dieselLocoHeader.Count()); + var nRows = Math.Min (FullTable ? NumberOfRowsFull : NumberOfRowsPartial, dieselLocoHeader.Count()); for (i = 0; i < nRows; i++) { @@ -509,7 +509,7 @@ public override void PrepareFrame(DPIStatus dpiStatus) TableText[i, j + 1].Font = TableTextFont; TableText[i, j + 1].Text = (colorFirstColEndsWith == Color.White) ? text : text.Substring(0, text.Length - 3); ; TableText[i, j + 1].Color = colorFirstColEndsWith; - TableSymbol[i, j + 1].Font = TableSymbolFont; + TableSymbol[i, j + 1].Font = TableSymbolFont; TableSymbol[i, j + 1].Text = (tempStatus[j, i] != null && tempStatus[j, i].Contains("|")) ? Fence : " "; } TableText[i, 0].Font = TableTextFont; @@ -851,14 +851,14 @@ public void Update3DDPITable() // Add a leading space tX = 0.875f; tY = 0.125f; - leadingSpaces++; + leadingSpaces++ ; } else if (iChar == 2 && param.Length < 3) { // Add a further leading space tX = 0.875f; tY = 0.125f; - leadingSpaces++; + leadingSpaces++ ; } else if (iChar < param.Length + 1 + leadingSpaces && param.Length != 0) { diff --git a/Source/RunActivity/Viewer3D/RollingStock/SubSystems/ETCS/DataEntry.cs b/Source/RunActivity/Viewer3D/RollingStock/SubSystems/ETCS/DataEntry.cs index d8369b75b3..7a5ddf859a 100644 --- a/Source/RunActivity/Viewer3D/RollingStock/SubSystems/ETCS/DataEntry.cs +++ b/Source/RunActivity/Viewer3D/RollingStock/SubSystems/ETCS/DataEntry.cs @@ -15,15 +15,15 @@ // This file is the responsibility of the 3D & Environment Team. -using System; -using System.Collections.Generic; -using System.Linq; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using Orts.Viewer3D.Popups; using Orts.Viewer3D.RollingStock.Subsystems.ETCS; -using ORTS.Scripting.Api.ETCS; using static Orts.Viewer3D.RollingStock.Subsystems.ETCS.DriverMachineInterface; +using ORTS.Scripting.Api.ETCS; +using System; +using System.Collections.Generic; +using System.Linq; +using Orts.Viewer3D.Popups; namespace Orts.Viewer3D.RollingStock.SubSystems.ETCS { @@ -53,9 +53,9 @@ public class AlphanumericButton : DMIButton TextPrimitive LettersText; readonly int FontHeightNumber = 16; readonly int FontHeightLetters = 10; - public AlphanumericButton(string num, string letters, DataEntryField field) : base(num + " " + letters, false, () => field.HandleKeyPress(num + letters), 102, 50, field.DMI, true) + public AlphanumericButton(string num, string letters, DataEntryField field) : base(num + " "+ letters, false, () => field.HandleKeyPress(num+ letters), 102, 50, field.DMI, true) { - Number = num + " "; + Number = num+" "; Letters = letters; SetText(); } @@ -208,7 +208,7 @@ void SetText() { var font = GetFont(FontHeightDataField); var size = (int)(font.MeasureString(Name) / Scale); - Label = new TextPrimitive(new Point(Width - 10 - size, (Height - FontHeightDataField) / 2), ColorGrey, Name, font); + Label = new TextPrimitive(new Point(Width-10-size, (Height-FontHeightDataField)/2), ColorGrey, Name, font); } } public class FieldDataArea : DMIButton @@ -279,7 +279,7 @@ public DataEntryField(DMIDataEntryValue field, int index, DataEntryWindow window { Name = field.Name; Field = field; - AcceptedValue = PreviousValue = field.Value ?? ""; + AcceptedValue = PreviousValue = field.Value??""; Index = index; DataEntryWindow = window; DMI = DataEntryWindow.DMI; @@ -407,7 +407,7 @@ public void HandleKeyPress(string keyname) } else if (Keyboard is NumericKeyboard) { - if (keyname == "DEL") KeyboardValue = KeyboardValue.Length > 0 ? KeyboardValue.Substring(0, KeyboardValue.Length - 1) : ""; + if (keyname == "DEL") KeyboardValue = KeyboardValue.Length>0 ? KeyboardValue.Substring(0, KeyboardValue.Length - 1) : ""; else KeyboardValue += keyname; CursorIndex = KeyboardValue.Length; } @@ -423,7 +423,7 @@ public void HandleKeyPress(string keyname) if (CursorIndex >= KeyboardValue.Length || !keyname.Contains(KeyboardValue[KeyboardValue.Length - 1])) { KeyboardValue += keyname[0]; - CursorIndex = keyname.Length == 1 ? KeyboardValue.Length : KeyboardValue.Length - 1; + CursorIndex = keyname.Length == 1 ? KeyboardValue.Length : KeyboardValue.Length-1; } else { @@ -442,7 +442,7 @@ public class DataEntryWindow : DMISubwindow { string Title; int NumPages => (Fields.Count - 1) / 4 + 1; - int CurrentPage => ActiveField / 4; + int CurrentPage => ActiveField/4; public int ActiveField; public readonly IList Fields = new List(); DMIButton[] KeyboardButtons = new DMIButton[12]; @@ -483,7 +483,7 @@ void SetText() { var font = GetFont(FontHeightYes); string text = Viewer.Catalog.GetString("Yes"); - Yes = new TextPrimitive(new Point((Width - (int)(font.MeasureString(text) / Scale)) / 2, (Height - FontHeightYes) / 2), Color.Black, text, font); + Yes = new TextPrimitive(new Point((Width-(int)(font.MeasureString(text)/Scale))/2, (Height-FontHeightYes)/2), Color.Black, text, font); } } public DataEntryWindow(DMIDataEntryDefinition definition, DriverMachineInterface dmi) : base(definition.WindowTitle, definition.FullScreen || definition.Fields.Count > 1, dmi) @@ -552,21 +552,21 @@ public DataEntryWindow(DMIDataEntryDefinition definition, DriverMachineInterface return; } if (overrideOperational) foreach (var check in Definition.OperationalCrossChecks) + { + var conflict = check.GetConflictingVariables(values); + foreach (var name in conflict) { - var conflict = check.GetConflictingVariables(values); - foreach (var name in conflict) + foreach (var field in Fields) { - foreach (var field in Fields) + if (field.Name == name) { - if (field.Name == name) - { - checkPassed = false; - field.OperationalCrossCheckInvalid = true; - break; - } + checkPassed = false; + field.OperationalCrossCheckInvalid = true; + break; } } } + } if (!checkPassed) { YesButton.DelayType = true; @@ -611,7 +611,7 @@ public override void Draw(SpriteBatch spriteBatch, Point drawPosition) { var text = Fields[i].DataEchoText; int x = drawPosition.X + (int)Math.Round((204 + 5) * Scale); - int y = drawPosition.Y + (int)Math.Round((100 + 2 * i * FontHeightLabel) * Scale); + int y = drawPosition.Y + (int)Math.Round((100 + 2*i*FontHeightLabel) * Scale); text.Draw(spriteBatch, new Point(x, y)); } } @@ -643,7 +643,7 @@ public void PrepareLayout() areas.Add(PrevButton); } DataEntryCompleteLabel.Position = new Point(0, 330); - YesButton.Position = new Point(0, 330 + DataEntryCompleteLabel.Height); + YesButton.Position = new Point(0, 330+ DataEntryCompleteLabel.Height); areas.Add(DataEntryCompleteLabel); areas.Add(YesButton); for (int i = 4 * (ActiveField / 4); i < Fields.Count && i < (4 * (ActiveField / 4 + 1)); i++) @@ -667,7 +667,7 @@ public void PrepareLayout() KeyboardButtons[11] = keyboard.MoreKey; break; } - else if (i + keyboard.CurrentKeyPage * 11 < keyboard.Keys.Count) KeyboardButtons[i] = field.Keyboard.Keys[i + keyboard.CurrentKeyPage * 11]; + else if (i+keyboard.CurrentKeyPage*11 < keyboard.Keys.Count) KeyboardButtons[i] = field.Keyboard.Keys[i + keyboard.CurrentKeyPage * 11]; } for (int i = 0; i < KeyboardButtons.Length; i++) { @@ -702,7 +702,7 @@ public void FieldSelected(int index) if (field.TechnicalRangeInvalid || field.TechnicalResolutionInvalid || (field.OperationalRangeInvalid && !overrideOperational)) { if (field.OperationalRangeInvalid) Fields[index].DataArea.DelayType = true; - for (int i = 0; i < Fields.Count; i++) + for (int i=0; i SpeedTargets) } if (oth1 && prev.TargetSpeedMpS < cur.TargetSpeedMpS) oth2 = true; } -Exit: + Exit: PASPRectangles = paspRectangles; } @@ -279,7 +279,7 @@ void CreateTargetSpeeds(List speedTargets) { var speedTargetText = new List(speedTargets.Count); var speedTargetTextures = new List(speedTargets.Count); - int ld = 0; + int ld = 0; for (int i = 1; i < speedTargets.Count; i++) { bool overlap = false; @@ -328,7 +328,7 @@ void CreateTrackConditions(List trackConditions) if (condition.DistanceToTrainM > MaxViewingDistanceM || condition.DistanceToTrainM < 0 || prevObject[row] - posy < 20 || posy < 0) continue; prevObject[row] = posy; Texture2D tex; - switch (condition.Type) + switch(condition.Type) { case TrackConditionType.LowerPantograph: tex = TrackConditionTextureData[condition.YellowColour ? 2 : 1]; @@ -367,7 +367,7 @@ void CreateTrackConditions(List trackConditions) tex = TrackConditionTextureData[35]; break; case TrackConditionType.TractionSystemChange: - switch (condition.TractionSystem) + switch(condition.TractionSystem) { case TractionSystem.NonFitted: tex = TrackConditionTextureData[condition.YellowColour ? 26 : 25]; diff --git a/Source/RunActivity/Viewer3D/RollingStock/SubSystems/ETCS/SpeedDistanceMonitoring.cs b/Source/RunActivity/Viewer3D/RollingStock/SubSystems/ETCS/SpeedDistanceMonitoring.cs index 549db50354..a5e19b9e11 100644 --- a/Source/RunActivity/Viewer3D/RollingStock/SubSystems/ETCS/SpeedDistanceMonitoring.cs +++ b/Source/RunActivity/Viewer3D/RollingStock/SubSystems/ETCS/SpeedDistanceMonitoring.cs @@ -17,14 +17,15 @@ // This file is the responsibility of the 3D & Environment Team. -using System; -using System.Collections.Generic; -using System.Linq; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using Orts.Simulation.RollingStocks; using Orts.Viewer3D.Popups; using ORTS.Common; using ORTS.Scripting.Api.ETCS; +using System; +using System.Collections.Generic; +using System.Linq; using static Orts.Viewer3D.RollingStock.Subsystems.ETCS.DriverMachineInterface; namespace Orts.Viewer3D.RollingStock.Subsystems.ETCS @@ -535,7 +536,7 @@ public override void PrepareFrame(ETCSStatus status) if (status.CurrentMode == Mode.OS || status.CurrentMode == Mode.SR) return; float dist = status.TargetDistanceM.Value; - + var text = (((int)(dist / 10)) * 10).ToString(); var fontSize = TargetDistanceFont.MeasureString(text) / Scale; TargetDistanceText = new TextPrimitive(new Point((int)(54 - fontSize), (int)(30 - FontHeightTargetDistance) / 2), ColorGrey, text, TargetDistanceFont); diff --git a/Source/RunActivity/Viewer3D/RollingStock/SubSystems/ETCS/TextMessages.cs b/Source/RunActivity/Viewer3D/RollingStock/SubSystems/ETCS/TextMessages.cs index de2d6ed74b..2bdf353a3a 100644 --- a/Source/RunActivity/Viewer3D/RollingStock/SubSystems/ETCS/TextMessages.cs +++ b/Source/RunActivity/Viewer3D/RollingStock/SubSystems/ETCS/TextMessages.cs @@ -17,14 +17,14 @@ // This file is the responsibility of the 3D & Environment Team. -using System; -using System.Collections.Generic; -using System.Linq; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Orts.Viewer3D.Popups; using Orts.Viewer3D.RollingStock.Subsystems.ETCS; using ORTS.Scripting.Api.ETCS; +using System; +using System.Collections.Generic; +using System.Linq; namespace Orts.Viewer3D.RollingStock.SubSystems.ETCS { @@ -54,7 +54,7 @@ public class MessageArea : DMIButton List MessageList; TextMessage? AcknowledgingMessage; - public MessageArea(DriverMachineInterface dmi) : base(Viewer.Catalog.GetString("Acknowledge"), true, null, 234, (dmi.IsSoftLayout ? 4 : 5) * RowHeight, dmi, false) + public MessageArea(DriverMachineInterface dmi) : base(Viewer.Catalog.GetString("Acknowledge"), true, null, 234, (dmi.IsSoftLayout ? 4 : 5)*RowHeight, dmi, false) { MaxTextLines = dmi.IsSoftLayout ? 4 : 5; @@ -68,7 +68,7 @@ public MessageArea(DriverMachineInterface dmi) : base(Viewer.Catalog.GetString(" CurrentPage++; SetMessages(); } - }, 46, Height / 2, dmi); + }, 46, Height/2, dmi); ButtonScrollDown = new DMIIconButton("NA_14.bmp", "NA_16.bmp", Viewer.Catalog.GetString("Scroll Down"), true, () => { if (CurrentPage > 0) @@ -141,7 +141,7 @@ string[] GetRowSeparated(string text, bool isBold) var size = font.MeasureString(text) / Scale; if (size > 234 - 48) { - int split = text.LastIndexOf(' ', (int)((234 - 48) / size * text.Length)); + int split = text.LastIndexOf(' ', (int)((234 - 48)/size*text.Length)); if (split == -1) split = (int)((234 - 48) / size * text.Length); var remaining = GetRowSeparated(text.Substring(split + 1), isBold); var arr = new string[remaining.Length + 1]; diff --git a/Source/RunActivity/Viewer3D/RollingStock/SubSystems/FreightAnimationsViewer.cs b/Source/RunActivity/Viewer3D/RollingStock/SubSystems/FreightAnimationsViewer.cs index 770521233a..2a11545fc5 100644 --- a/Source/RunActivity/Viewer3D/RollingStock/SubSystems/FreightAnimationsViewer.cs +++ b/Source/RunActivity/Viewer3D/RollingStock/SubSystems/FreightAnimationsViewer.cs @@ -15,11 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System.Collections.Generic; using Microsoft.Xna.Framework; using Orts.Simulation.RollingStocks; using Orts.Simulation.RollingStocks.SubSystems; using ORTS.Common; +using System.Collections.Generic; namespace Orts.Viewer3D.RollingStock.SubSystems { @@ -58,7 +58,7 @@ public FreightAnimationViewer(Viewer viewer, MSTSWagon wagon, string wagonFolder { foreach (var lodControl in FreightShape.SharedShape.LodControls) { - if (lodControl.DistanceLevels.Length > 0) + if ( lodControl.DistanceLevels.Length > 0) { foreach (var distanceLevel in lodControl.DistanceLevels) { diff --git a/Source/RunActivity/Viewer3D/RollingStock/TrainCarViewer.cs b/Source/RunActivity/Viewer3D/RollingStock/TrainCarViewer.cs index 986d396a5f..0247023b4a 100644 --- a/Source/RunActivity/Viewer3D/RollingStock/TrainCarViewer.cs +++ b/Source/RunActivity/Viewer3D/RollingStock/TrainCarViewer.cs @@ -15,10 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System.Diagnostics; using Microsoft.Xna.Framework; using Orts.Simulation.RollingStocks; using ORTS.Common; +using System.Diagnostics; namespace Orts.Viewer3D.RollingStock { diff --git a/Source/RunActivity/Viewer3D/Scenery.cs b/Source/RunActivity/Viewer3D/Scenery.cs index f1ebea12b0..23621dce9d 100644 --- a/Source/RunActivity/Viewer3D/Scenery.cs +++ b/Source/RunActivity/Viewer3D/Scenery.cs @@ -42,17 +42,17 @@ * */ +using Microsoft.Xna.Framework; +using Orts.Formats.Msts; +using Orts.Formats.OR; +using ORTS.Common; +using Orts.Simulation.RollingStocks; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Text.RegularExpressions; -using Microsoft.Xna.Framework; -using Orts.Formats.Msts; -using Orts.Formats.OR; -using Orts.Simulation.RollingStocks; -using ORTS.Common; namespace Orts.Viewer3D { @@ -384,7 +384,7 @@ public WorldFile(Viewer viewer, int tileX, int tileZ, bool visible) else { var found = false; - foreach (var movingTable in Program.Simulator.MovingTables) + foreach (var movingTable in Program.Simulator. MovingTables) { if (worldObject.UID == movingTable.UID && WFileName == movingTable.WFile) { @@ -504,7 +504,7 @@ public WorldFile(Viewer viewer, int tileX, int tileZ, bool visible) sceneryObjects.Add(new ContainerHandlingItemShape(viewer, shapeFilePath, worldMatrix, shadowCaster ? ShapeFlags.ShadowCaster : ShapeFlags.None, (PickupObj)worldObject)); } else - sceneryObjects.Add(new FuelPickupItemShape(viewer, shapeFilePath, worldMatrix, shadowCaster ? ShapeFlags.ShadowCaster : ShapeFlags.None, (PickupObj)worldObject)); + sceneryObjects.Add(new FuelPickupItemShape(viewer, shapeFilePath, worldMatrix, shadowCaster ? ShapeFlags.ShadowCaster : ShapeFlags.None, (PickupObj)worldObject)); PickupList.Add((PickupObj)worldObject); } else // It's some other type of object - not one of the above. diff --git a/Source/RunActivity/Viewer3D/Shaders.cs b/Source/RunActivity/Viewer3D/Shaders.cs index 1eaeafabe9..0fcced2911 100644 --- a/Source/RunActivity/Viewer3D/Shaders.cs +++ b/Source/RunActivity/Viewer3D/Shaders.cs @@ -124,8 +124,8 @@ public void SetMatrix(Matrix w, ref Matrix v, ref Matrix p) projection.SetValue(p); int vIn = Program.Simulator.Settings.DayAmbientLight; - - float FullBrightness = (float)vIn / 20.0f; + + float FullBrightness = (float)vIn / 20.0f ; //const float HalfShadowBrightness = 0.75; const float HalfNightBrightness = 0.6f; const float ShadowBrightness = 0.5f; @@ -334,7 +334,7 @@ public Vector3 LightVector var skyColor1 = Day2Night(0.25f, -0.25f, -0.5f, value.Y); var skyColor2 = MathHelper.Clamp(skyColor1 + 0.55f, 0, 1); var skyColor3 = 0.001f / (0.8f * Math.Abs(value.Y - 0.1f)); - skyColor.SetValue(new Vector3(skyColor1, skyColor2, skyColor3)); + skyColor.SetValue(new Vector3(skyColor1, skyColor2, skyColor3)); // Fade moon during daylight var moonColor1 = value.Y > 0.1f ? (1 - value.Y) / 1.5f : 1; @@ -363,9 +363,9 @@ public float Time int _moonPhase; public float Random { - set - { - _moonPhase = (int)value; + set + { + _moonPhase = (int)value; moonTexCoord.SetValue(new Vector2((value % 2) / 2, (int)(value / 2) / 4)); } } @@ -386,7 +386,7 @@ public float Overcast public float WindDirection { - set + set { var totalWindDisplacement = 50 * WindSpeed * _time; // This exaggerates the wind speed, but it is necessary to get a visible effect windDisplacement.SetValue(new Vector2(-(float)Math.Sin(value) * totalWindDisplacement, (float)Math.Cos(value) * totalWindDisplacement)); @@ -442,14 +442,14 @@ public SkyShader(GraphicsDevice graphicsDevice) moonMaskTexture = Parameters["MoonMaskTexture"]; cloudMapTexture = Parameters["CloudMapTexture"]; } - + // This function dims the lighting at night, with a transition period as the sun rises or sets static float Day2Night(float startNightTrans, float finishNightTrans, float minDarknessCoeff, float sunDirectionY) { int vIn = Program.Simulator.Settings.DayAmbientLight; - float dayAmbientLight = (float)vIn / 20.0f; - + float dayAmbientLight = (float)vIn / 20.0f ; + // The following two are used to interpoate between day and night lighting (y = mx + b) var slope = (dayAmbientLight - minDarknessCoeff) / (startNightTrans - finishNightTrans); // "m" var incpt = dayAmbientLight - slope * startNightTrans; // "b" diff --git a/Source/RunActivity/Viewer3D/Shapes.cs b/Source/RunActivity/Viewer3D/Shapes.cs index 946b52a134..6ca052ac10 100644 --- a/Source/RunActivity/Viewer3D/Shapes.cs +++ b/Source/RunActivity/Viewer3D/Shapes.cs @@ -27,12 +27,6 @@ // Adds bright green arrows to all normal shapes indicating the direction of their normals. //#define DEBUG_SHAPE_NORMALS -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Threading; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Orts.Formats.Msts; @@ -40,6 +34,12 @@ using Orts.Simulation.RollingStocks; using Orts.Viewer3D.Common; using ORTS.Common; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Threading; using Event = Orts.Common.Event; using Events = Orts.Common.Events; @@ -427,7 +427,7 @@ public override void PrepareFrame(RenderFrame frame, ElapsedTime elapsedTime) } } - //Class AnalogClockShape to animate analog OR-Clocks as child of AnimatedShape <- PoseableShape <- StaticShape + //Class AnalogClockShape to animate analog OR-Clocks as child of AnimatedShape <- PoseableShape <- StaticShape public class AnalogClockShape : AnimatedShape { public AnalogClockShape(Viewer viewer, string path, WorldPosition initialPosition, ShapeFlags flags, float frameRateDivisor = 1.0f) @@ -455,7 +455,7 @@ protected override void AnimateOneMatrix(int iMatrix, float key) var anim_node = SharedShape.Animations[0].anim_nodes[iMatrix]; if (anim_node.controllers.Count == 0) - return; // missing controllers + return; // missing controllers // Start with the intial pose in the shape file. var xnaPose = SharedShape.Matrices[iMatrix]; @@ -1814,8 +1814,7 @@ public MutableShapePrimitive(Material material, int maxVertices, int maxIndices, indexData: new ushort[maxIndices], graphicsDevice: material.Viewer.GraphicsDevice, hierarchy: hierarchy, - hierarchyIndex: hierarchyIndex) - { } + hierarchyIndex: hierarchyIndex) { } public void SetVertexData(VertexPositionNormalTexture[] data, int minVertexIndex, int numVertices, int primitiveCount) { @@ -1995,14 +1994,14 @@ void LoadContent() Trace.Write("S"); var filePath = FilePath; // commented lines allow reading the animation block from an additional file in an Openrails subfolder - // string dir = Path.GetDirectoryName(filePath); - // string file = Path.GetFileName(filePath); - // string orFilePath = dir + @"\openrails\" + file; +// string dir = Path.GetDirectoryName(filePath); +// string file = Path.GetFileName(filePath); +// string orFilePath = dir + @"\openrails\" + file; var sFile = new ShapeFile(filePath, Viewer.Settings.SuppressShapeWarnings); - // if (file.ToLower().Contains("turntable") && File.Exists(orFilePath)) - // { - // sFile.ReadAnimationBlock(orFilePath); - // } +// if (file.ToLower().Contains("turntable") && File.Exists(orFilePath)) +// { +// sFile.ReadAnimationBlock(orFilePath); +// } var textureFlags = Helpers.TextureFlags.None; diff --git a/Source/RunActivity/Viewer3D/Signals.cs b/Source/RunActivity/Viewer3D/Signals.cs index 96237e4e61..6638534265 100644 --- a/Source/RunActivity/Viewer3D/Signals.cs +++ b/Source/RunActivity/Viewer3D/Signals.cs @@ -655,11 +655,11 @@ public SignalLightPrimitive(Viewer viewer, Vector3 position, float radius, Color GlowIntensityNight = glowNight; var verticies = new[] { - new VertexPositionColorTexture(new Vector3(-radius, +radius, 0), color, new Vector2(u1, v0)), - new VertexPositionColorTexture(new Vector3(+radius, +radius, 0), color, new Vector2(u0, v0)), - new VertexPositionColorTexture(new Vector3(-radius, -radius, 0), color, new Vector2(u1, v1)), - new VertexPositionColorTexture(new Vector3(+radius, -radius, 0), color, new Vector2(u0, v1)), - }; + new VertexPositionColorTexture(new Vector3(-radius, +radius, 0), color, new Vector2(u1, v0)), + new VertexPositionColorTexture(new Vector3(+radius, +radius, 0), color, new Vector2(u0, v0)), + new VertexPositionColorTexture(new Vector3(-radius, -radius, 0), color, new Vector2(u1, v1)), + new VertexPositionColorTexture(new Vector3(+radius, -radius, 0), color, new Vector2(u0, v1)), + }; VertexBuffer = new VertexBuffer(viewer.GraphicsDevice, typeof(VertexPositionColorTexture), verticies.Length, BufferUsage.WriteOnly); VertexBuffer.SetData(verticies); diff --git a/Source/RunActivity/Viewer3D/Sky.cs b/Source/RunActivity/Viewer3D/Sky.cs index 666e51158d..99b8e773fd 100644 --- a/Source/RunActivity/Viewer3D/Sky.cs +++ b/Source/RunActivity/Viewer3D/Sky.cs @@ -22,9 +22,9 @@ using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Orts.Common; +using ORTS.Common; using Orts.Viewer3D.Common; using Orts.Viewer3D.Processes; -using ORTS.Common; namespace Orts.Viewer3D { diff --git a/Source/RunActivity/Viewer3D/Sound.cs b/Source/RunActivity/Viewer3D/Sound.cs index 3e50dce066..a08c7bbe15 100644 --- a/Source/RunActivity/Viewer3D/Sound.cs +++ b/Source/RunActivity/Viewer3D/Sound.cs @@ -39,11 +39,6 @@ //#define DEBUGSCR -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; using Orts.Common; using Orts.Formats.Msts; using Orts.Simulation; @@ -53,6 +48,11 @@ using Orts.Simulation.Signalling; using ORTS.Common; using ORTS.Settings; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; using Event = Orts.Common.Event; using Events = Orts.Common.Events; @@ -141,7 +141,7 @@ private void LoadTrackSound(string filename, bool isInside) if (filename == null) return; - string[] pathArray = { Viewer.Simulator.RoutePath, Viewer.Simulator.BasePath }; + string[] pathArray = {Viewer.Simulator.RoutePath, Viewer.Simulator.BasePath}; var fullPath = ORTSPaths.GetFileFromFolders(pathArray, @"SOUND\" + filename); if (fullPath == null) { @@ -159,7 +159,7 @@ public override void Uninitialize() //Trace.TraceInformation("TrackSoundSource Uninitialize"); if (_activeInSource != null) _activeInSource.Uninitialize(); - if (_activeOutSource != null) + if (_activeOutSource !=null) _activeOutSource.Uninitialize(); } @@ -193,12 +193,12 @@ public void UpdateTType(bool stateChange) } else if (Car.Train.SpeedMpS < -0.1f) - { - CarIncr = -1; - CarLeading = Car.Train.Cars.Count - 1; - } - else - return; + { + CarIncr = -1; + CarLeading = Car.Train.Cars.Count - 1; + } + else + return; var CarNo = Car.Train.Cars.IndexOf(Car); float trackSoundDistSquared = 0; @@ -248,13 +248,13 @@ public void UpdateTType(bool stateChange) _curTType != SharedSMSFileManager.SwitchSMSNumber && _curTType != SharedSMSFileManager.CurveSMSNumber && _curTType != SharedSMSFileManager.CurveSwitchSMSNumber)) - Car.TrackSoundType = _curTType; - else - { - Car.TrackSoundType = 0; - _curTType = 0; - } - } + Car.TrackSoundType = _curTType; + else + { + Car.TrackSoundType = 0; + _curTType = 0; + } + } else Car.TrackSoundType = _curTType; } else @@ -262,16 +262,16 @@ public void UpdateTType(bool stateChange) var CarAhead = Car.Train.Cars[CarNo - CarIncr]; if (CarAhead.TrackSoundLocation != WorldLocation.None) { - // if (stateChange) - // Trace.TraceInformation("Time {4} TrainName {6} carNo {0} IsOnSwitch {1} IsOnCurve {7} TracksoundType {2} _CurTType {3} AheadTrackSoundType {5}", - // Car.Train.Cars.IndexOf(Car), CarOnSwitch, Car.TrackSoundType, _curTType, Viewer.Simulator.GameTime, CarAhead.TrackSoundType, Car.Train.Name, CarOnCurve); - if ((_curTType == Car.TrackSoundType || stateChange) && Car.TrackSoundType != CarAhead.TrackSoundType) +// if (stateChange) +// Trace.TraceInformation("Time {4} TrainName {6} carNo {0} IsOnSwitch {1} IsOnCurve {7} TracksoundType {2} _CurTType {3} AheadTrackSoundType {5}", +// Car.Train.Cars.IndexOf(Car), CarOnSwitch, Car.TrackSoundType, _curTType, Viewer.Simulator.GameTime, CarAhead.TrackSoundType, Car.Train.Name, CarOnCurve); + if ((_curTType == Car.TrackSoundType || stateChange ) && Car.TrackSoundType != CarAhead.TrackSoundType) { Car.TrackSoundType = CarAhead.TrackSoundType; Car.TrackSoundLocation = new WorldLocation(CarAhead.TrackSoundLocation); Car.TrackSoundDistSquared = WorldLocation.GetDistanceSquared(Car.WorldPosition.WorldLocation, Car.TrackSoundLocation); - // Trace.TraceInformation("Time {4} TrainName {5} carNo {0} IsOnSwitch {1} IsOnCurve {6} TracksoundType {2} _CurTType {3} to standard", - // Car.Train.Cars.IndexOf(Car), CarOnSwitch, Car.TrackSoundType, _curTType, Viewer.Simulator.GameTime, Car.Train.Name, CarOnCurve); +// Trace.TraceInformation("Time {4} TrainName {5} carNo {0} IsOnSwitch {1} IsOnCurve {6} TracksoundType {2} _CurTType {3} to standard", +// Car.Train.Cars.IndexOf(Car), CarOnSwitch, Car.TrackSoundType, _curTType, Viewer.Simulator.GameTime, Car.Train.Name, CarOnCurve); if (stateChange) { _curTType = Car.TrackSoundType; @@ -285,8 +285,8 @@ public void UpdateTType(bool stateChange) Car.TrackSoundDistSquared = trackSoundDistSquared; else { - // if (_curTType != Car.TrackSoundType) Trace.TraceInformation("Time {4} TrainName {5} carNo {0} IsOnSwitch {1} IsOnCurve {6} TracksoundType {2} _CurTType {3} standard", - // Car.Train.Cars.IndexOf(Car), CarOnSwitch, Car.TrackSoundType, _curTType, Viewer.Simulator.GameTime, Car.Train.Name, CarOnCurve); +// if (_curTType != Car.TrackSoundType) Trace.TraceInformation("Time {4} TrainName {5} carNo {0} IsOnSwitch {1} IsOnCurve {6} TracksoundType {2} _CurTType {3} standard", +// Car.Train.Cars.IndexOf(Car), CarOnSwitch, Car.TrackSoundType, _curTType, Viewer.Simulator.GameTime, Car.Train.Name, CarOnCurve); _curTType = Car.TrackSoundType; } } @@ -320,9 +320,9 @@ public void UpdateTType(bool stateChange) #if DEBUGSCR Trace.TraceInformation("Sound region changed from {0} to {1}.", _prevTType, _curTType); #endif - // if (!stateChange) Trace.TraceInformation("StandardChange Time {4} TrainName {5} carNo {0} IsOnSwitch {1} TracksoundType {2} _CurTType {3} _PrevTType {6}", - // Car.Train.Cars.IndexOf(Car), CarOnSwitch, Car.TrackSoundType, _curTType, Viewer.Simulator.GameTime, Car.Train.Name, _prevTType); - // Trace.TraceInformation("Train {0} Speed {1}, Car {2}: Sound Region {3} changed to {4} at distance {5}", Car.Train.Number, Car.Train.SpeedMpS, CarNo, _prevTType, _curTType, Math.Sqrt(trackSoundDistSquared)); +// if (!stateChange) Trace.TraceInformation("StandardChange Time {4} TrainName {5} carNo {0} IsOnSwitch {1} TracksoundType {2} _CurTType {3} _PrevTType {6}", +// Car.Train.Cars.IndexOf(Car), CarOnSwitch, Car.TrackSoundType, _curTType, Viewer.Simulator.GameTime, Car.Train.Name, _prevTType); +// Trace.TraceInformation("Train {0} Speed {1}, Car {2}: Sound Region {3} changed to {4} at distance {5}", Car.Train.Number, Car.Train.SpeedMpS, CarNo, _prevTType, _curTType, Math.Sqrt(trackSoundDistSquared)); if (CarNo == CarLeading) Car.TrackSoundLocation = new WorldLocation(Car.WorldPosition.WorldLocation); _prevTType = _curTType; @@ -334,12 +334,12 @@ public override bool Update() { bool stateChange = false; if (SharedSMSFileManager.AutoTrackSound) stateChange = UpdateCarOnSwitchAndCurve(); - // if (stateChange) Trace.TraceInformation("Time {4} TrainName {5} carNo {0} IsOnSwitch {1} IsOnCurve {6} TracksoundType {2} _CurTType {3} Radius {7} Before", - // Car.Train.Cars.IndexOf(Car), CarOnSwitch, Car.TrackSoundType, _curTType, Viewer.Simulator.GameTime, Car.Train.Name, CarOnCurve, Car.CurrentCurveRadius); +// if (stateChange) Trace.TraceInformation("Time {4} TrainName {5} carNo {0} IsOnSwitch {1} IsOnCurve {6} TracksoundType {2} _CurTType {3} Radius {7} Before", +// Car.Train.Cars.IndexOf(Car), CarOnSwitch, Car.TrackSoundType, _curTType, Viewer.Simulator.GameTime, Car.Train.Name, CarOnCurve, Car.CurrentCurveRadius); if ((!CarOnSwitch && !CarOnCurve) || !SharedSMSFileManager.AutoTrackSound) UpdateTType(stateChange); - // if (stateChange) Trace.TraceInformation("Time {4} TrainName {5} carNo {0} IsOnSwitch {1} IsOnCurve {6} TracksoundType {2} _CurTType {3} Radius {7} After", - // Car.Train.Cars.IndexOf(Car), CarOnSwitch, Car.TrackSoundType, _curTType, Viewer.Simulator.GameTime, Car.Train.Name, CarOnCurve, Car.CurrentCurveRadius); +// if (stateChange) Trace.TraceInformation("Time {4} TrainName {5} carNo {0} IsOnSwitch {1} IsOnCurve {6} TracksoundType {2} _CurTType {3} Radius {7} After", +// Car.Train.Cars.IndexOf(Car), CarOnSwitch, Car.TrackSoundType, _curTType, Viewer.Simulator.GameTime, Car.Train.Name, CarOnCurve, Car.CurrentCurveRadius); bool retval = true; NeedsFrequentUpdate = false; @@ -431,7 +431,7 @@ public bool UpdateCarOnSwitchAndCurve() // resume results and select sound if change if (carPreviouslyOnSwitch ^ CarOnSwitch || carPreviouslyOnCurve ^ CarOnCurve) - { + { stateChange = true; } if (stateChange && (CarOnSwitch || CarOnCurve)) @@ -498,7 +498,7 @@ public static WorldLocation UidLocation(UiD uid) } - + /// /// Represents an sms file /// @@ -515,7 +515,7 @@ private int CutOffDistanceM2 { const int staticDistanceM2 = 4000000; var isPlayer = Car?.Train?.IsActualPlayerTrain ?? false; - var correctedLength = isPlayer ? Car.Train.Length + 50 : 0; + var correctedLength = isPlayer ? Car.Train.Length + 50 : 0; return (int)Math.Max(staticDistanceM2, correctedLength * correctedLength); } } @@ -598,7 +598,7 @@ public SoundSource(Viewer viewer, WorldLocation worldLocation, Events.Source eve /// /// /// - public SoundSource(Viewer viewer, MSTSWagon car, string wavFilePath, ORTSActSoundFileTypes ORTSActSoundFileType, bool preCompiled) + public SoundSource(Viewer viewer, MSTSWagon car, string wavFilePath, ORTSActSoundFileTypes ORTSActSoundFileType, bool preCompiled) { Car = car; Initialize(viewer, car.WorldPosition.WorldLocation, Events.Source.MSTSCar, wavFilePath, ORTSActSoundFileType, preCompiled); @@ -656,7 +656,7 @@ public override void Uninitialize() NeedsFrequentUpdate = false; } } - + /// /// Current location of the sound source /// @@ -721,7 +721,7 @@ public void Initialize(Viewer viewer, WorldLocation worldLocation, Events.Source // find correct ScalabiltyGroup int iSG = 0; - while (iSG < smsFile.Tr_SMS.ScalabiltyGroups.Count) + while ( iSG < smsFile.Tr_SMS.ScalabiltyGroups.Count) { if (smsFile.Tr_SMS.ScalabiltyGroups[iSG].DetailLevel <= Viewer.Settings.SoundDetailLevel) break; @@ -747,7 +747,7 @@ public void Initialize(Viewer viewer, WorldLocation worldLocation, Events.Source } } - /// + /// /// Set properties of this SoundSource with default precompiled parameters, and generate SoundStreams /// /// Current @@ -834,7 +834,7 @@ public void Initialize(Viewer viewer, WorldLocation worldLocation, Events.Source SetRolloffFactor(); // initialization of the only one sound stream - SoundStreams.Add(new SoundStream(WavFileName, eventSource, this)); + SoundStreams.Add(new SoundStream(WavFileName, eventSource, this)); } } @@ -945,7 +945,7 @@ public override void InitInitials() WasOutOfDistance = false; } } - + public override bool Update() { if (Car != null && !Car.IsPartOfActiveTrain) @@ -972,7 +972,7 @@ public override bool Update() Active = true; // restore any looping sounds - foreach (SoundStream stream in SoundStreams) + foreach(SoundStream stream in SoundStreams) stream.Activate(); } } @@ -1075,7 +1075,7 @@ public bool DeActivate() { if (DeactivationConditions == null) return false; - + if (ConditionsMet(DeactivationConditions)) return true; @@ -1159,10 +1159,10 @@ public override void Dispose() } } - ///////////////////////////////////////////////////////// - // SOUND STREAM - ///////////////////////////////////////////////////////// - +///////////////////////////////////////////////////////// +// SOUND STREAM +///////////////////////////////////////////////////////// + /// /// Owned by a , /// can play only one sound at a time, @@ -1274,17 +1274,17 @@ public SoundStream(Orts.Formats.Msts.SMSStream mstsStream, Events.Source eventSo ORTSDiscreteTrigger ortsTrigger = new ORTSDiscreteTrigger(this, eventSource, (Orts.Formats.Msts.Discrete_Trigger)trigger, settings); Triggers.Add(ortsTrigger); // list them here so we can enable and disable } - // unapplicable trigger type + // unapplicable trigger type else { Triggers.Add(new ORTSTrigger()); // null trigger if (SoundSource.SMSFileName != "ingame.sms") Trace.TraceWarning("Trigger type of trigger number {2} in stream number {1} in file {0} is not existent or not applicable", - SoundSource.SMSFileName, SoundSource.SoundStreams.Count, Triggers.Count - 1); + SoundSource.SMSFileName, SoundSource.SoundStreams.Count, Triggers.Count-1); } IsReleasedWithJump |= (Triggers.Last().SoundCommand is ORTSReleaseLoopReleaseWithJump); } // for each mstsStream.Trigger - VariableTriggers = (from t in Triggers + VariableTriggers = (from t in Triggers where t is ORTSVariableTrigger select t).ToList(); } @@ -1338,7 +1338,7 @@ public void Update() foreach (ORTSTrigger trigger in Triggers) trigger.TryTrigger(); - + if (_InitialTrigger != null) { // If no triggers active, Initialize the Initial @@ -1347,8 +1347,8 @@ public void Update() if (VariableTriggers.Count > 0 || Triggers.Count == 1) { TriggersList = from ORTSVariableTrigger t in VariableTriggers - where t.IsBellow - select t as ORTSTrigger; + where t.IsBellow + select t as ORTSTrigger; if (TriggersList.Count() == VariableTriggers.Count && _InitialTrigger.SoundCommand is ORTSSoundPlayCommand && !(_InitialTrigger.SoundCommand is ORTSPlayOneShot && _InitialTrigger.Signaled)) { @@ -1360,9 +1360,9 @@ where t.IsBellow else { TriggersList = from t in Triggers - where t.Signaled && - (t.SoundCommand is ORTSStartLoop || t.SoundCommand is ORTSStartLoopRelease) - select t; + where t.Signaled && + (t.SoundCommand is ORTSStartLoop || t.SoundCommand is ORTSStartLoopRelease) + select t; if (TriggersList.Count() > 1 && _InitialTrigger.Signaled) _InitialTrigger.Signaled = false; } @@ -1382,7 +1382,7 @@ private void SetFreqAndVolume() if (ALSoundSource == null) return; - if (MSTSStream != null && MSTSStream.FrequencyCurve != null) + if (MSTSStream != null && MSTSStream.FrequencyCurve != null) { if (SoundSource.Car != null || SoundSource.Viewer.Camera.AttachedCar != null) { @@ -1565,9 +1565,9 @@ private void Sweep() } // class ORTSStream - ///////////////////////////////////////////////////////// - // SOUND TRIGGERS - ///////////////////////////////////////////////////////// +///////////////////////////////////////////////////////// +// SOUND TRIGGERS +///////////////////////////////////////////////////////// /// /// Trigger is defined in the SMS file as members of a SoundStream. @@ -1603,7 +1603,7 @@ public class ORTSTrigger /// /// Play this sound when a discrete TrainCar event occurs in the simulator /// - public class ORTSDiscreteTrigger : ORTSTrigger, Orts.Common.EventHandler + public class ORTSDiscreteTrigger: ORTSTrigger, Orts.Common.EventHandler { /// /// Event this trigger listens to @@ -1713,7 +1713,7 @@ public ORTSDistanceTravelledTrigger(SoundStream soundStream, Orts.Formats.Msts.D SoundStream = soundStream; car = soundStream.SoundSource.Car; SMS = smsData; - SoundCommand = ORTSSoundCommand.FromMSTS(SMS.SoundCommand, soundStream); + SoundCommand = ORTSSoundCommand.FromMSTS(SMS.SoundCommand, soundStream ); Initialize(); } @@ -1767,7 +1767,7 @@ private void UpdateTriggerDistance() /// /// Play this sound immediately when this SoundSource becomes active, or in case no other VariableTriggers are active /// - public class ORTSInitialTrigger : ORTSTrigger + public class ORTSInitialTrigger: ORTSTrigger { private SoundStream SoundStream; @@ -1821,7 +1821,7 @@ public ORTSRandomTrigger(SoundStream soundStream, Orts.Formats.Msts.Random_Trigg Initialize(); } - public override void Initialize() + public override void Initialize() { UpdateTriggerAtSeconds(); } @@ -1879,7 +1879,7 @@ public ORTSVariableTrigger(SoundStream soundStream, Orts.Formats.Msts.Variable_T Initialize(); } - public override void Initialize() + public override void Initialize() { StartValue = SMS.Event == Orts.Formats.Msts.Variable_Trigger.Events.Distance_Dec_Past ? float.MaxValue : 0; @@ -1893,7 +1893,7 @@ public override void Initialize() IsBellow = StartValue < SMS.Threshold; } - public override void TryTrigger() + public override void TryTrigger( ) { float newValue = ReadValue(); bool triggered = false; @@ -2004,10 +2004,10 @@ private float ReadValue() } // class VariableTrigger - ///////////////////////////////////////////////////////// - // SOUND COMMANDS - ///////////////////////////////////////////////////////// - +///////////////////////////////////////////////////////// +// SOUND COMMANDS +///////////////////////////////////////////////////////// + /// /// Start playing the whole sound stream once, then stop @@ -2033,18 +2033,18 @@ public override void Run() ORTSStream.ALSoundSource.Queue(p, PlayMode.OneShot, ORTSStream.SoundSource.IsExternal, ORTSStream.RepeatedTrigger); } } - } + } /// /// Start looping the whole stream, release it only at the end /// public class ORTSStartLoop : ORTSSoundPlayCommand { - public ORTSStartLoop(SoundStream ortsStream, Orts.Formats.Msts.SoundPlayCommand mstsSoundPlayCommand) - : base(ortsStream, mstsSoundPlayCommand) + public ORTSStartLoop( SoundStream ortsStream, Orts.Formats.Msts.SoundPlayCommand mstsSoundPlayCommand ) + : base( ortsStream, mstsSoundPlayCommand ) { } - public override void Run() + public override void Run( ) { // Support for Loop functions - by GeorgeS string p = GetNextFile(); @@ -2054,7 +2054,7 @@ public override void Run() ORTSStream.ALSoundSource.Queue(p, PlayMode.Loop, ORTSStream.SoundSource.IsExternal, false); } } - } + } /// /// Release the sound by playing the looped sustain part till its end, then play the last part @@ -2065,7 +2065,7 @@ public ORTSReleaseLoopRelease(SoundStream ortsStream) : base(ortsStream) { } - + public override void Run() { if (ORTSStream != null && ORTSStream.ALSoundSource != null) @@ -2119,7 +2119,7 @@ public class ORTSDisableTrigger : ORTSSoundCommand { int TriggerIndex; // index into the stream's trigger list - public ORTSDisableTrigger(SoundStream ortsStream, Orts.Formats.Msts.DisableTrigger smsData) + public ORTSDisableTrigger(SoundStream ortsStream, Orts.Formats.Msts.DisableTrigger smsData ) : base(ortsStream) { TriggerIndex = smsData.TriggerID - 1; @@ -2147,7 +2147,7 @@ public ORTSEnableTrigger(SoundStream ortsStream, Orts.Formats.Msts.DisableTrigge public override void Run() { - if (TriggerIndex >= 0 && TriggerIndex < ORTSStream.Triggers.Count) + if ( TriggerIndex >= 0 && TriggerIndex < ORTSStream.Triggers.Count) ORTSStream.Triggers[TriggerIndex].Enabled = true; } } @@ -2263,7 +2263,7 @@ public static ORTSSoundCommand FromMSTS(Orts.Formats.Msts.SoundCommand mstsSound /// public static ORTSSoundCommand Precompiled(string wavFileName, SoundStream soundStream) { - return new ORTSPlayOneShot(soundStream, wavFileName); + return new ORTSPlayOneShot(soundStream, wavFileName); } }// ORTSSoundCommand @@ -2324,8 +2324,8 @@ protected string GetNextFile() //SMSFolder is often same as BasePath, which means this searches the more general folder // before the more specific folder. This is surely not intended. - string[] pathArray = {ORTSStream.SoundSource.SMSFolder, - Program.Simulator.RoutePath + @"\SOUND", + string[] pathArray = {ORTSStream.SoundSource.SMSFolder, + Program.Simulator.RoutePath + @"\SOUND", Program.Simulator.BasePath + @"\SOUND"}; var fullPath = ORTSPaths.GetFileFromFolders(pathArray, Files[iFile]); return (fullPath != null) ? fullPath : ""; @@ -2432,7 +2432,7 @@ public int GetTType(Train train, out float outPrevDist, out float outNextDist) // Try to find forward d = tmp.DistanceTo(trItems[trNode].TileX, trItems[trNode].TileZ, trItems[trNode].X, trItems[trNode].Y, trItems[trNode].Z, 8192); - + if (d != -1) { // This is nearer than previous one @@ -2536,8 +2536,8 @@ public void AddByTile(int TileX, int TileZ) WorldSoundFile wf = new WorldSoundFile(name, Viewer.Simulator.TDB.TrackDB.TrItemTable); if (wf.TR_WorldSoundFile != null) { - string[] pathArray = { Viewer.Simulator.RoutePath, Viewer.Simulator.BasePath }; - + string[] pathArray = {Viewer.Simulator.RoutePath, Viewer.Simulator.BasePath}; + var ls = new List(); foreach (var fss in wf.TR_WorldSoundFile.SoundSources) { @@ -2703,15 +2703,15 @@ private TrItem FindItem(Traveller traveller, Func mov } public class ORTSActSoundSources { - public ORTSActSoundSources() + public ORTSActSoundSources( ) { } public void Update() { - if (Program.Simulator.ActivityRun == null || Program.Simulator.ActivityRun.triggeredEventWrapper == null || + if (Program.Simulator.ActivityRun == null || Program.Simulator.ActivityRun.triggeredEventWrapper == null || (Program.Simulator.ActivityRun.triggeredEventWrapper.ParsedObject.ORTSActSoundFile == null && (Program.Simulator.ActivityRun.triggeredEventWrapper.ParsedObject.Outcomes == null - || Program.Simulator.ActivityRun.triggeredEventWrapper.ParsedObject.Outcomes.ActivitySound == null))) + || Program.Simulator.ActivityRun.triggeredEventWrapper.ParsedObject.Outcomes.ActivitySound == null))) return; var localEventID = Program.Simulator.ActivityRun.triggeredEventWrapper.ParsedObject.ID; string ORTSActSoundFile; @@ -2824,6 +2824,6 @@ public void Update() } return; } - } + } } diff --git a/Source/RunActivity/Viewer3D/SuperElevation.cs b/Source/RunActivity/Viewer3D/SuperElevation.cs index 275b76ddcd..01e61b466b 100644 --- a/Source/RunActivity/Viewer3D/SuperElevation.cs +++ b/Source/RunActivity/Viewer3D/SuperElevation.cs @@ -17,14 +17,14 @@ // This file is the responsibility of the 3D & Environment Team. -using System; -using System.Collections.Generic; -using System.Diagnostics; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Orts.Formats.Msts; using Orts.Simulation; using ORTS.Common; +using System; +using System.Collections.Generic; +using System.Diagnostics; namespace Orts.Viewer3D { diff --git a/Source/RunActivity/Viewer3D/Terrain.cs b/Source/RunActivity/Viewer3D/Terrain.cs index 9d4e010174..c895096049 100644 --- a/Source/RunActivity/Viewer3D/Terrain.cs +++ b/Source/RunActivity/Viewer3D/Terrain.cs @@ -19,15 +19,15 @@ //#define SUPERSMOOTHNORMALS -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Orts.Formats.Msts; using Orts.Viewer3D.Common; using ORTS.Common; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; namespace Orts.Viewer3D { @@ -235,7 +235,7 @@ public TerrainPrimitive(Viewer viewer, TileManager tileManager, Tile tile, int x var uv = Tile.Shaders[Patch.ShaderIndex].terrain_uvcalcs; if (ts.Length > 1) PatchMaterial = viewer.MaterialManager.Load(terrainMaterial, Helpers.GetTerrainTextureFile(viewer.Simulator, ts[0].Filename) + "\0" + Helpers.GetTerrainTextureFile(viewer.Simulator, ts[1].Filename) + - (uv[1].D != 0 && uv[1].D != 32 ? "\0" + uv[1].D.ToString() : "")); + (uv[1].D != 0 && uv[1].D != 32 ? "\0" + uv[1].D.ToString(): "")); else PatchMaterial = viewer.MaterialManager.Load(terrainMaterial, Helpers.GetTerrainTextureFile(viewer.Simulator, ts[0].Filename) + "\0" + Helpers.GetTerrainTextureFile(viewer.Simulator, "microtex.ace")); @@ -510,7 +510,7 @@ public TerrainMaterial(Viewer viewer, string terrainTexture, Texture2D defaultTe PatchTexture = Viewer.TextureManager.Get(textures[0], defaultTexture); PatchTextureOverlay = textures.Length > 1 ? Viewer.TextureManager.Get(textures[1]) : null; var converted = textures.Length > 2 && float.TryParse(textures[2], out OverlayScale); - OverlayScale = OverlayScale != 0 && converted ? OverlayScale : 32; + OverlayScale = OverlayScale != 0 && converted ? OverlayScale : 32; } diff --git a/Source/RunActivity/Viewer3D/Tiles.cs b/Source/RunActivity/Viewer3D/Tiles.cs index 5df8bb0146..3309a961dc 100644 --- a/Source/RunActivity/Viewer3D/Tiles.cs +++ b/Source/RunActivity/Viewer3D/Tiles.cs @@ -17,15 +17,15 @@ // This file is the responsibility of the 3D & Environment Team. +using Microsoft.Xna.Framework; +using Orts.Formats.Msts; +using ORTS.Common; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Threading; -using Microsoft.Xna.Framework; -using Orts.Formats.Msts; -using ORTS.Common; namespace Orts.Viewer3D { diff --git a/Source/RunActivity/Viewer3D/Trains.cs b/Source/RunActivity/Viewer3D/Trains.cs index fd16abc750..c9583b9202 100644 --- a/Source/RunActivity/Viewer3D/Trains.cs +++ b/Source/RunActivity/Viewer3D/Trains.cs @@ -17,15 +17,15 @@ // This file is the responsibility of the 3D & Environment Team. +using Orts.Simulation; +using Orts.Simulation.RollingStocks; +using Orts.Viewer3D.RollingStock; +using ORTS.Common; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; -using Orts.Simulation; -using Orts.Simulation.RollingStocks; -using Orts.Viewer3D.RollingStock; -using ORTS.Common; namespace Orts.Viewer3D { @@ -67,27 +67,27 @@ public void Load() if (cancellation.IsCancellationRequested) break; try - { - if (cars.ContainsKey(car)) - newCars.Add(car, cars[car]); - else - newCars.Add(car, LoadCar(car)); - } - catch (Exception error) + { + if (cars.ContainsKey(car)) + newCars.Add(car, cars[car]); + else + newCars.Add(car, LoadCar(car)); + } + catch (Exception error) { Trace.WriteLine(new FileLoadException(car.WagFilePath, error)); } } Cars = newCars; - //for those cars not visible now, will unload them (to remove attached sound) - foreach (var car in cars) - { - if (!visibleCars.Contains(car.Key)) - { - car.Value.Unload(); - } - } - } + //for those cars not visible now, will unload them (to remove attached sound) + foreach (var car in cars) + { + if (!visibleCars.Contains(car.Key)) + { + car.Value.Unload(); + } + } + } // Ensure the player locomotive has a cab view loaded and anything else they need. cars = Cars; diff --git a/Source/RunActivity/Viewer3D/Transfers.cs b/Source/RunActivity/Viewer3D/Transfers.cs index a894726b87..f0a8e330ab 100644 --- a/Source/RunActivity/Viewer3D/Transfers.cs +++ b/Source/RunActivity/Viewer3D/Transfers.cs @@ -17,13 +17,13 @@ // This file is the responsibility of the 3D & Environment Team. -using System; -using System.Collections.Generic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Orts.Formats.Msts; using Orts.Viewer3D.Common; using ORTS.Common; +using System; +using System.Collections.Generic; namespace Orts.Viewer3D { @@ -154,8 +154,7 @@ public TransferMaterial(Viewer viewer, string textureName) : base(viewer, textureName) { Texture = Viewer.TextureManager.Get(textureName, true); - TransferSamplerState = new SamplerState - { + TransferSamplerState = new SamplerState { AddressU = TextureAddressMode.Clamp, AddressV = TextureAddressMode.Clamp, Filter = TextureFilter.Anisotropic, diff --git a/Source/RunActivity/Viewer3D/UserInput.cs b/Source/RunActivity/Viewer3D/UserInput.cs index af64866906..b8a4819185 100644 --- a/Source/RunActivity/Viewer3D/UserInput.cs +++ b/Source/RunActivity/Viewer3D/UserInput.cs @@ -173,10 +173,10 @@ public static bool IsDown(UserCommand command) public static bool IsMouseMoved { get { return MouseState.X != LastMouseState.X || MouseState.Y != LastMouseState.Y; } } public static int MouseMoveX { get { return MouseState.X - LastMouseState.X; } } public static int MouseMoveY { get { return MouseState.Y - LastMouseState.Y; } } - public static bool MouseMovedUp { get { return MouseState.Y < LastMouseState.Y; } } - public static bool MouseMovedDown { get { return MouseState.Y > LastMouseState.Y; } } - public static bool MouseMovedLeft { get { return MouseState.X < LastMouseState.X; } } - public static bool MouseMovedRight { get { return MouseState.X > LastMouseState.X; } } + public static bool MouseMovedUp { get { return MouseState.Y < LastMouseState.Y; } } + public static bool MouseMovedDown { get { return MouseState.Y > LastMouseState.Y; } } + public static bool MouseMovedLeft { get { return MouseState.X < LastMouseState.X; } } + public static bool MouseMovedRight { get { return MouseState.X > LastMouseState.X; } } public static int MouseX { get { return MouseState.X; } } public static int MouseY { get { return MouseState.Y; } } diff --git a/Source/RunActivity/Viewer3D/UserInputExternal.cs b/Source/RunActivity/Viewer3D/UserInputExternal.cs index d0945a247f..2dc517c02f 100644 --- a/Source/RunActivity/Viewer3D/UserInputExternal.cs +++ b/Source/RunActivity/Viewer3D/UserInputExternal.cs @@ -15,8 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using System; using System.Collections.Generic; using Orts.Formats.Msts; +using Orts.Simulation.RollingStocks; +using ORTS.Common; using ORTS.Common.Input; namespace Orts.Viewer3D @@ -26,12 +29,12 @@ namespace Orts.Viewer3D /// public class ExternalDeviceState { - public Dictionary<(CabViewControlType, int), ExternalDeviceCabControl> CabControls; + public Dictionary<(CabViewControlType,int), ExternalDeviceCabControl> CabControls; public Dictionary Commands; public ExternalDeviceState() { Commands = new Dictionary(); - CabControls = new Dictionary<(CabViewControlType, int), ExternalDeviceCabControl>(); + CabControls = new Dictionary<(CabViewControlType,int), ExternalDeviceCabControl>(); } public virtual void Handled() @@ -47,19 +50,19 @@ public virtual void Handled() } public bool IsPressed(UserCommand command) - { + { return Commands.TryGetValue(command, out var button) && button.IsPressed; - } + } - public bool IsReleased(UserCommand command) - { + public bool IsReleased(UserCommand command) + { return Commands.TryGetValue(command, out var button) && button.IsReleased; - } + } - public bool IsDown(UserCommand command) - { + public bool IsDown(UserCommand command) + { return Commands.TryGetValue(command, out var button) && button.IsDown; - } + } } public class ExternalDeviceButton { diff --git a/Source/RunActivity/Viewer3D/UserInputRailDriver.cs b/Source/RunActivity/Viewer3D/UserInputRailDriver.cs index 5521397aaa..897e37f937 100644 --- a/Source/RunActivity/Viewer3D/UserInputRailDriver.cs +++ b/Source/RunActivity/Viewer3D/UserInputRailDriver.cs @@ -105,12 +105,12 @@ public void HandleHidData(byte[] data, PIEDevice sourceDevice, int error) return; State.SaveButtonData(); - State.Direction.Value = Percentage(data[1], FullReversed, Neutral, FullForward) / 100; ; + State.Direction.Value = Percentage(data[1], FullReversed, Neutral, FullForward) / 100;; State.Throttle.Value = Percentage(data[2], ThrottleIdle, FullThrottle) / 100; - State.DynamicBrake.Value = Percentage(data[2], ThrottleIdle, DynamicBrakeSetup, DynamicBrake) / 100; ; - State.TrainBrake.Value = Percentage(data[3], AutoBrakeRelease, FullAutoBrake) / 100; ; - State.EngineBrake.Value = Percentage(data[4], IndependentBrakeRelease, IndependentBrakeFull) / 100; ; - + State.DynamicBrake.Value = Percentage(data[2], ThrottleIdle, DynamicBrakeSetup, DynamicBrake) / 100;; + State.TrainBrake.Value = Percentage(data[3], AutoBrakeRelease, FullAutoBrake) / 100;; + State.EngineBrake.Value = Percentage(data[4], IndependentBrakeRelease, IndependentBrakeFull) / 100;; + float a = State.EngineBrake.Value; float calOff = (1 - a) * BailOffDisengagedRelease + a * BailOffDisengagedFull; float calOn = (1 - a) * BailOffEngagedRelease + a * BailOffEngagedFull; @@ -138,7 +138,7 @@ public void HandleHidData(byte[] data, PIEDevice sourceDevice, int error) } State.Activation.Changed = false; } - + /// /// Error callback /// @@ -151,14 +151,14 @@ public void HandleHidError(PIEDevice sourceDevice, int error) static float Percentage(float x, float x0, float x100) { - float p = 100 * (x - x0) / (x100 - x0); + float p= 100 * (x - x0) / (x100 - x0); if (p < 5) return 0; if (p > 95) return 100; return p; } - + static float Percentage(float x, float xminus100, float x0, float xplus100) { float p = 100 * (x - x0) / (xplus100 - x0); @@ -202,7 +202,7 @@ void EnableSpeaker(bool on) for (int i = 0; i < WriteBuffer.Length; i++) WriteBuffer[i] = 0; WriteBuffer[1] = 133; - WriteBuffer[7] = (byte)(on ? 1 : 0); + WriteBuffer[7] = (byte) (on ? 1 : 0); Device.WriteData(WriteBuffer); } @@ -221,7 +221,7 @@ public void Update(TrainCar playerLoco) if (!Active || playerLoco == null || Device == null) return; float speed = 10 * MpS.FromMpS(playerLoco.SpeedMpS, playerLoco.IsMetric); - int s = (int)(speed >= 0 ? speed + .5 : -speed + .5); + int s = (int) (speed >= 0 ? speed + .5 : -speed + .5); if (s != LEDSpeed) { if (s < 100) @@ -259,7 +259,7 @@ void ReadCalibrationData(string basePath) return; } } - // TODO: This is... kinda weird and cool at the same time. STF parsing being used on RailDriver's calebration file. Probably should be a dedicated parser, though. + // TODO: This is... kinda weird and cool at the same time. STF parsing being used on RailDriver's calebration file. Probably should be a dedicated parser, though. STFReader reader = new STFReader(file, false); while (!reader.Eof) { @@ -267,8 +267,8 @@ void ReadCalibrationData(string basePath) if (token == "Position") { string name = reader.ReadItem(); - int min = -1; - int max = -1; + int min= -1; + int max= -1; while (token != "}") { token = reader.ReadItem(); @@ -433,7 +433,7 @@ public void AddButtonData(byte[] data) public override string ToString() { - string s = String.Format("{0} {1} {2} {3} {4}", Direction, Throttle, DynamicBrake, TrainBrake, EngineBrake); + string s= String.Format("{0} {1} {2} {3} {4}", Direction, Throttle, DynamicBrake, TrainBrake, EngineBrake); for (int i = 0; i < 6; i++) s += " " + ButtonData[i]; return s; diff --git a/Source/RunActivity/Viewer3D/Viewer.cs b/Source/RunActivity/Viewer3D/Viewer.cs index 1f9570858b..5ec2dd31ed 100644 --- a/Source/RunActivity/Viewer3D/Viewer.cs +++ b/Source/RunActivity/Viewer3D/Viewer.cs @@ -41,6 +41,7 @@ using Orts.Viewer3D.RollingStock; using ORTS.Common; using ORTS.Common.Input; +using ORTS.Scripting.Api; using ORTS.Settings; using Event = Orts.Common.Event; @@ -228,17 +229,17 @@ public bool IsBeforeNoon } public bool IsDaytime // After dawn and before dusk, so definitely daytime - { + { get { return (MaterialManager.sunDirection.Y > 0.05f && IsBeforeNoon) || (MaterialManager.sunDirection.Y > 0.15f && !IsBeforeNoon); - } + } } public bool IsNighttime // Before dawn and after dusk, so definitely nighttime { - get - { + get + { return (MaterialManager.sunDirection.Y < -0.05f && !IsBeforeNoon) || (MaterialManager.sunDirection.Y < -0.15f && IsBeforeNoon); } @@ -689,7 +690,7 @@ public float ComputeCabTextureInverseRatio(string cabTextureFileName) { cabTextureInverseRatio = (float)cabTexture.Height / cabTexture.Width; // if square cab texture files with dimension of at least 1024 pixels are used, they are considered as stretched 4 : 3 ones - if (cabTextureInverseRatio == 1 && cabTexture.Width >= 1024) cabTextureInverseRatio = 0.75f; + if (cabTextureInverseRatio == 1 && cabTexture.Width >= 1024) cabTextureInverseRatio = 0.75f; } return cabTextureInverseRatio; } @@ -909,7 +910,7 @@ void HandleUserInput(ElapsedTime elapsedTime) if (ComposeMessageWindow == null) ComposeMessageWindow = new ComposeMessage(WindowManager); ComposeMessageWindow.InitMessage(); } - if ((MPManager.IsMultiPlayer() || (Settings.MultiplayerClient && MPManager.Simulator.Confirmer != null)) && UserInput.IsPressed(UserCommand.DisplayMultiPlayerWindow)) { MultiPlayerWindow.Visible = !MultiPlayerWindow.Visible; } + if ((MPManager.IsMultiPlayer() || (Settings.MultiplayerClient && MPManager.Simulator.Confirmer != null)) && UserInput.IsPressed(UserCommand.DisplayMultiPlayerWindow)){ MultiPlayerWindow.Visible = !MultiPlayerWindow.Visible; } if (!MPManager.IsMultiPlayer() && UserInput.IsPressed(UserCommand.GamePauseMenu)) { QuitWindow.Visible = Simulator.Paused = !QuitWindow.Visible; } if (MPManager.IsMultiPlayer() && UserInput.IsPressed(UserCommand.GamePauseMenu)) { if (Simulator.Confirmer != null) Simulator.Confirmer.Information(Viewer.Catalog.GetString("In MP, use Alt-F4 to quit directly")); } @@ -983,7 +984,7 @@ void HandleUserInput(ElapsedTime elapsedTime) } if (UserInput.IsPressed(UserCommand.DisplaySwitchWindow)) if (UserInput.IsDown(UserCommand.DisplayNextWindowTab)) SwitchWindow.TabAction(); else SwitchWindow.Visible = !SwitchWindow.Visible; if (UserInput.IsPressed(UserCommand.DisplayTrainOperationsWindow)) if (UserInput.IsDown(UserCommand.DisplayNextWindowTab)) TrainOperationsWindow.TabAction(); else { TrainOperationsWindow.Visible = !TrainOperationsWindow.Visible; if (!TrainOperationsWindow.Visible) CarOperationsWindow.Visible = false; } - if (UserInput.IsPressed(UserCommand.DisplayTrainDpuWindow)) if (UserInput.IsDown(UserCommand.DisplayNextWindowTab)) TrainDpuWindow.Visible = !TrainDpuWindow.Visible; else TrainDpuWindow.TabAction(); + if (UserInput.IsPressed(UserCommand.DisplayTrainDpuWindow)) if (UserInput.IsDown(UserCommand.DisplayNextWindowTab)) TrainDpuWindow.Visible = !TrainDpuWindow.Visible ; else TrainDpuWindow.TabAction(); if (UserInput.IsPressed(UserCommand.DisplayNextStationWindow)) if (UserInput.IsDown(UserCommand.DisplayNextWindowTab)) NextStationWindow.TabAction(); else NextStationWindow.Visible = !NextStationWindow.Visible; if (UserInput.IsPressed(UserCommand.DisplayCompassWindow)) if (UserInput.IsDown(UserCommand.DisplayNextWindowTab)) CompassWindow.TabAction(); else CompassWindow.Visible = !CompassWindow.Visible; if (UserInput.IsPressed(UserCommand.DebugTracks)) if (UserInput.IsDown(UserCommand.DisplayNextWindowTab)) TracksDebugWindow.TabAction(); else TracksDebugWindow.Visible = !TracksDebugWindow.Visible; @@ -1072,7 +1073,7 @@ void HandleUserInput(ElapsedTime elapsedTime) " " + Catalog.GetString("messages suppressed")); } - else + else { Simulator.Confirmer.Message(ConfirmLevel.Warning, Catalog.GetString("All messages visible")); } @@ -1226,7 +1227,7 @@ void HandleUserInput(ElapsedTime elapsedTime) { var success = ((AITrain)PlayerLocomotive.Train).SwitchToPlayerControl(); if (success) - { + { Simulator.Confirmer.Message(ConfirmLevel.Information, Viewer.Catalog.GetString("Switched to player control")); DbfEvalAutoPilot = false;//Debrief eval } @@ -1248,8 +1249,8 @@ void HandleUserInput(ElapsedTime elapsedTime) } } - if (DbfEvalAutoPilot && (Simulator.ClockTime - DbfEvalIniAutoPilotTimeS) > 1.0000) - { + if (DbfEvalAutoPilot && (Simulator.ClockTime - DbfEvalIniAutoPilotTimeS) > 1.0000 ) + { DbfEvalAutoPilotTimeS = DbfEvalAutoPilotTimeS + (Simulator.ClockTime - DbfEvalIniAutoPilotTimeS);//Debrief eval train.DbfEvalValueChanged = true; DbfEvalIniAutoPilotTimeS = Simulator.ClockTime;//Debrief eval @@ -1394,7 +1395,7 @@ void HandleUserInput(ElapsedTime elapsedTime) // explore 2D cabview controls - if (Camera is CabCamera && (PlayerLocomotiveViewer as MSTSLocomotiveViewer)._hasCabRenderer && MouseChangingControl == null && + if (Camera is CabCamera && (PlayerLocomotiveViewer as MSTSLocomotiveViewer)._hasCabRenderer && MouseChangingControl == null && RenderProcess.IsMouseVisible) { var cabRenderer = (PlayerLocomotiveViewer as MSTSLocomotiveViewer)._CabRenderer; @@ -1619,7 +1620,7 @@ static bool IsReverserInNeutral(TrainCar car) // Diesel and electric locos have a Reverser lever and, // in the neutral position, direction == N return car.Direction == Direction.N - // Steam locos never have direction == N, so check for setting close to zero. + // Steam locos never have direction == N, so check for setting close to zero. || Math.Abs(car.Train.MUReverserPercent) <= 1; } /// diff --git a/Source/RunActivity/Viewer3D/Water.cs b/Source/RunActivity/Viewer3D/Water.cs index ed1e392048..d19eeacd39 100644 --- a/Source/RunActivity/Viewer3D/Water.cs +++ b/Source/RunActivity/Viewer3D/Water.cs @@ -17,13 +17,13 @@ // This file is the responsibility of the 3D & Environment Team. -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Orts.Common; using ORTS.Common; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; namespace Orts.Viewer3D { @@ -49,8 +49,8 @@ public WaterPrimitive(Viewer viewer, Tile tile) Size = tile.Size; if (Viewer.ENVFile.WaterLayers != null) - WaterLayers = Viewer.ENVFile.WaterLayers.Select(layer => new KeyValuePair(layer.Height, Viewer.MaterialManager.Load("Water", Viewer.Simulator.RoutePath + @"\envfiles\textures\" + layer.TextureName))).ToArray(); - + WaterLayers = Viewer.ENVFile.WaterLayers.Select(layer => new KeyValuePair(layer.Height, Viewer.MaterialManager.Load("Water", Viewer.Simulator.RoutePath + @"\envfiles\textures\" + layer.TextureName))).ToArray(); + LoadGeometry(Viewer.GraphicsDevice, tile, out PrimitiveCount, out IndexBuffer, out VertexBuffer); VertexBufferBindings = new[] { new VertexBufferBinding(VertexBuffer), new VertexBufferBinding(GetDummyVertexBuffer(viewer.GraphicsDevice)) }; @@ -92,7 +92,7 @@ void LoadGeometry(GraphicsDevice graphicsDevice, Tile tile, out int primitiveCou { for (var x = 0; x < tile.PatchCount; ++x) { - + var patch = tile.GetPatch(x, z); if (!patch.WaterEnabled) diff --git a/Source/RunActivity/Viewer3D/Weather.cs b/Source/RunActivity/Viewer3D/Weather.cs index 20f8eb840f..f74273e204 100644 --- a/Source/RunActivity/Viewer3D/Weather.cs +++ b/Source/RunActivity/Viewer3D/Weather.cs @@ -25,6 +25,7 @@ using System.Diagnostics; using System.IO; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Orts.Common; using Orts.Formats.Msts; using Orts.Formats.OR; @@ -106,7 +107,7 @@ public WeatherControl(Viewer viewer) UpdateSoundSources(); UpdateVolume(); // We have a pause in weather change, depending from randomization level - dynamicWeather.stableWeatherTimer = (4.0f - Viewer.Settings.ActWeatherRandomizationLevel) * 600 + Viewer.Random.Next(300) - 150; + dynamicWeather.stableWeatherTimer = ( 4.0f - Viewer.Settings.ActWeatherRandomizationLevel) * 600 + Viewer.Random.Next(300) - 150; weatherChangeOn = true; } @@ -154,7 +155,7 @@ public virtual void RestoreWeatherParameters(BinaryReader inf) { dynamicWeather = new DynamicWeather(); dynamicWeather.Restore(inf); - } + } UpdateVolume(); } @@ -263,7 +264,7 @@ private bool RandomizeInitialWeather() // First define overcast var randValue = Viewer.Random.Next(170); var intermValue = randValue >= 50 ? (float)(randValue - 50f) : (float)randValue; - Weather.OvercastFactor = intermValue >= 20 ? (float)(intermValue - 20f) / 100f : (float)intermValue / 100f; // give more probability to less overcast + Weather.OvercastFactor = intermValue >= 20 ? (float)(intermValue - 20f)/100f: (float)intermValue/100f; // give more probability to less overcast Viewer.Simulator.WeatherType = Orts.Formats.Msts.WeatherType.Clear; // Then check if we are in precipitation zone if (Weather.OvercastFactor > 0.5) @@ -288,9 +289,9 @@ private bool RandomizeInitialWeather() else Weather.PricipitationIntensityPPSPM2 = 0; // and now define visibility randValue = Viewer.Random.Next(2000); - if (Weather.PricipitationIntensityPPSPM2 > 0 || Weather.OvercastFactor > 0.7f) - // use first digit to define power of ten and the other three to define the multiplying number - Weather.FogDistance = Math.Max(100, (float)Math.Pow(10, ((int)(randValue / 1000) + 2)) * (float)((randValue % 1000 + 1) / 100f)); + if (Weather.PricipitationIntensityPPSPM2 > 0 || Weather.OvercastFactor > 0.7f ) + // use first digit to define power of ten and the other three to define the multiplying number + Weather.FogDistance = Math.Max ( 100, (float)Math.Pow(10 , ((int)(randValue / 1000) + 2)) * (float)((randValue % 1000 + 1) / 100f)); else Weather.FogDistance = Math.Max(500, (float)Math.Pow(10, (int)((randValue / 1000) + 3)) * (float)((randValue % 1000 + 1) / 100f)); return true; @@ -315,14 +316,14 @@ private void CheckDesertZone() // Compare player train lat/lon with array of desert zones for (int i = 0; i < DesertZones.Length / 4; i++) { - if (LatitudeDeg > DesertZones[i, 0] && LatitudeDeg < DesertZones[i, 1] && LongitudeDeg > DesertZones[i, 2] && LongitudeDeg < DesertZones[i, 3] + if (LatitudeDeg > DesertZones[i,0] && LatitudeDeg < DesertZones[i,1] && LongitudeDeg > DesertZones[i,2] && LongitudeDeg < DesertZones[i,3] && Viewer.PlayerLocomotive.Train.FrontTDBTraveller.Location.Y < 1000 || - LatitudeDeg > DesertZones[i, 0] + 1 && LatitudeDeg < DesertZones[i, 1] - 1 && LongitudeDeg > DesertZones[i, 2] + 1 && LongitudeDeg < DesertZones[i, 3] - 1) + LatitudeDeg > DesertZones[i, 0] + 1 && LatitudeDeg < DesertZones[i, 1] -1 && LongitudeDeg > DesertZones[i, 2] + 1 && LongitudeDeg < DesertZones[i, 3] -1) { DesertZone = true; return; } - } + } } [CallOnThread("Updater")] @@ -441,7 +442,7 @@ public virtual void Update(ElapsedTime elapsedTime) if (dynamicWeather != null) dynamicWeather.ORTSPrecipitationIntensity = -1; } if (UserInput.IsDown(UserCommand.DebugPrecipitationIncrease) || UserInput.IsDown(UserCommand.DebugPrecipitationDecrease)) UpdateVolume(); - + // Change in precipitation liquidity, passing from rain to snow and vice-versa if (UserInput.IsDown(UserCommand.DebugPrecipitationLiquidityIncrease)) { @@ -509,7 +510,7 @@ public virtual void Update(ElapsedTime elapsedTime) } if (Program.Simulator != null && Program.Simulator.ActivityRun != null && Program.Simulator.ActivityRun.triggeredEventWrapper != null && (Program.Simulator.ActivityRun.triggeredEventWrapper.ParsedObject.ORTSWeatherChange != null || Program.Simulator.ActivityRun.triggeredEventWrapper.ParsedObject.Outcomes.ORTSWeatherChange != null)) - // Start a weather change sequence in activity mode + // Start a weather change sequence in activity mode { // if not yet weather changes, create the instance if (dynamicWeather == null) @@ -518,10 +519,10 @@ public virtual void Update(ElapsedTime elapsedTime) } var weatherChange = Program.Simulator.ActivityRun.triggeredEventWrapper.ParsedObject.ORTSWeatherChange ?? Program.Simulator.ActivityRun.triggeredEventWrapper.ParsedObject.Outcomes.ORTSWeatherChange; dynamicWeather.WeatherChange_Init(weatherChange, this); - Program.Simulator.ActivityRun.triggeredEventWrapper = null; + Program.Simulator.ActivityRun.triggeredEventWrapper = null; } if (weatherChangeOn) - // manage the weather change sequence + // manage the weather change sequence { dynamicWeather.WeatherChange_Update(elapsedTime, this); } @@ -698,7 +699,7 @@ public void WeatherChange_Update(ElapsedTime elapsedTime, WeatherControl weather { precipitationIntensityTimer -= elapsedTime.ClockSeconds; if (precipitationIntensityTimer <= 0) precipitationIntensityTimer = 0; - else if (weatherControl.RandomizedWeather == false) wChangeOn = true; + else if (weatherControl.RandomizedWeather == false ) wChangeOn = true; var oldPricipitationIntensityPPSPM2 = weatherControl.Weather.PricipitationIntensityPPSPM2; weatherControl.Weather.PricipitationIntensityPPSPM2 = ORTSPrecipitationIntensity - precipitationIntensityTimer * precipitationIntensityChangeRate; if (weatherControl.Weather.PricipitationIntensityPPSPM2 > 0) @@ -813,7 +814,7 @@ public void WeatherChange_Update(ElapsedTime elapsedTime, WeatherControl weather ORTSPrecipitationIntensityTransitionTimeS = weatherChangeTimer; } if (ORTSPrecipitationIntensity >= 0) - { + { precipitationIntensityTimer = (float)ORTSPrecipitationIntensityTransitionTimeS; precipitationIntensityChangeRate = precipitationIntensityTimer > 0 ? (MathHelper.Clamp(ORTSPrecipitationIntensity, 0, PrecipitationViewer.MaxIntensityPPSPM2) - weatherControl.Weather.PricipitationIntensityPPSPM2) / ORTSPrecipitationIntensityTransitionTimeS : 0; @@ -990,7 +991,7 @@ void CheckValue(ref float setValue, bool randomize, float minValue, float maxVal // overcast if (setValue < 0 && randomize) { - setValue = (float)(Viewer.Random.Next((int)maxValue * 100) / 100); // ensure there is a value if range is 0 - 1 + setValue = (float)(Viewer.Random.Next((int)maxValue*100)/100); // ensure there is a value if range is 0 - 1 } else { @@ -1066,7 +1067,7 @@ void SetInitialWeatherParameters(double realTime) else if (lastWeather is WeatherSettingOvercast) { WeatherSettingOvercast lastWeatherOvercast = lastWeather as WeatherSettingOvercast; - AWOvercastCloudcover = Math.Max(0, Math.Min(1, (lastWeatherOvercast.Overcast / 100) + + AWOvercastCloudcover = Math.Max(0, Math.Min(1, (lastWeatherOvercast.Overcast/100) + ((float)Viewer.Random.Next((int)(-0.5f * lastWeatherOvercast.OvercastVariation), (int)(0.5f * lastWeatherOvercast.OvercastVariation)) / 100))); AWActualVisibility = Weather.FogDistance = lastWeatherOvercast.OvercastVisibilityM; @@ -1257,7 +1258,7 @@ public override void Update(ElapsedTime elapsedTime) // check for change in required weather // time to change but no change after midnight and further weather available - if (Time < 24 * 3600 && Time > AWNextChangeTime && AWActiveIndex < (weatherDetails.Count - 1)) + if (Time < 24*3600 && Time > AWNextChangeTime && AWActiveIndex < (weatherDetails.Count - 1)) { // if precipitation still active or fog not lifted, postpone change by one minute if (AWPrecipitationActiveType != WeatherType.Clear || fogActive) @@ -1349,7 +1350,7 @@ void StartPrecipitation(WeatherSettingPrecipitation lastWeatherPrecipitation, fl // determine actual duration of precipitation float maxDuration = AWNextChangeTime - weatherDetails[AWActiveIndex].Time; - AWPrecipitationTotalDuration = (float)maxDuration * (lastWeatherPrecipitation.PrecipitationProbability / 100f); // nominal value + AWPrecipitationTotalDuration = (float)maxDuration * (lastWeatherPrecipitation.PrecipitationProbability/100f); // nominal value AWPrecipitationTotalDuration = (0.9f + ((float)Viewer.Random.Next(20) / 20)) * AWPrecipitationTotalDuration; // randomized value, +- 10% AWPrecipitationTotalDuration = Math.Min(AWPrecipitationTotalDuration, maxDuration); // but never exceeding maximum duration AWPrecipitationNextSpell = lastWeatherPrecipitation.Time; // set start of spell to start of weather change @@ -1393,7 +1394,7 @@ void StartPrecipitation(WeatherSettingPrecipitation lastWeatherPrecipitation, fl float baseDensitiy = PrecipitationViewer.MaxIntensityPPSPM2 * lastWeatherPrecipitation.PrecipitationDensity; AWPrecipitationActualPPSPM2 = MathHelper.Clamp(((1.0f + ((float)Viewer.Random.Next(-precvariation, precvariation) / 100)) * baseDensitiy), PrecipitationViewer.MinIntensityPPSPM2, PrecipitationViewer.MaxIntensityPPSPM2); - AWPrecipitationRequiredPPSPM2 = MathHelper.Clamp(((1.0f + ((float)Viewer.Random.Next(-precvariation, precvariation) / 100)) * baseDensitiy), + AWPrecipitationRequiredPPSPM2 = MathHelper.Clamp(((1.0f + ((float)Viewer.Random.Next(-precvariation, precvariation) / 100)) * baseDensitiy), PrecipitationViewer.MinIntensityPPSPM2, PrecipitationViewer.MaxIntensityPPSPM2); // rate of change is max. difference over random timespan between 1 and 10 mins. @@ -1407,7 +1408,7 @@ void StartPrecipitation(WeatherSettingPrecipitation lastWeatherPrecipitation, fl float endrate = 1.75f * lastWeatherPrecipitation.PrecipitationRateOfChange + (0.5F * (float)(Viewer.Random.Next((int)(lastWeatherPrecipitation.PrecipitationRateOfChange * 100))) / 100f); float spellEndPhase = Math.Min(60f + (300f * endrate), 600); - + float avduration = AWPrecipitationTotalDuration / AWPrecipitationTotalSpread; float actduration = (0.5f + ((float)Viewer.Random.Next(100) / 100)) * avduration; float spellEndTime = Math.Min(startTime + actduration, AWNextChangeTime); @@ -1584,7 +1585,7 @@ public override void SaveWeatherParameters(BinaryWriter outf) outf.Write(1); // save input details - foreach (WeatherSetting autoweather in weatherDetails) + foreach(WeatherSetting autoweather in weatherDetails) { if (autoweather is WeatherSettingFog) { diff --git a/Source/RunActivity/Viewer3D/WebServices/ControlValue.cs b/Source/RunActivity/Viewer3D/WebServices/ControlValue.cs index a81512ef26..3df7f95c91 100644 --- a/Source/RunActivity/Viewer3D/WebServices/ControlValue.cs +++ b/Source/RunActivity/Viewer3D/WebServices/ControlValue.cs @@ -15,8 +15,8 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System.Collections.Generic; using Orts.Viewer3D.RollingStock; +using System.Collections.Generic; namespace Orts.Viewer3D.WebServices { @@ -55,15 +55,11 @@ public static IList GetWebControlValueList(this MSTSLocomotiveView foreach (var controlRenderer in viewer._CabRenderer.ControlMap.Values) { controlValueList.Add(new ControlValue - { - TypeName = controlRenderer.GetControlType().ToString() - , - MinValue = controlRenderer.Control.MinValue - , - MaxValue = controlRenderer.Control.MaxValue - , - RangeFraction = controlRenderer.GetRangeFraction() - }); + { TypeName = controlRenderer.GetControlType().ToString() + , MinValue = controlRenderer.Control.MinValue + , MaxValue = controlRenderer.Control.MaxValue + , RangeFraction = controlRenderer.GetRangeFraction() + }); } return controlValueList; } diff --git a/Source/RunActivity/Viewer3D/WebServices/TrackMonitorDisplay.cs b/Source/RunActivity/Viewer3D/WebServices/TrackMonitorDisplay.cs index f2e553c2c8..73b643d451 100644 --- a/Source/RunActivity/Viewer3D/WebServices/TrackMonitorDisplay.cs +++ b/Source/RunActivity/Viewer3D/WebServices/TrackMonitorDisplay.cs @@ -15,13 +15,14 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.Linq; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Orts.Simulation.Physics; using Orts.Simulation.RollingStocks; using ORTS.Common; +using System; +using System.Collections.Generic; +using System.Linq; using static Orts.Simulation.Physics.Train.TrainObjectItem; namespace Orts.Viewer3D.WebServices @@ -522,7 +523,7 @@ private static void DrawMPModeInfo(List labels, Train.TrainInfo train // Draw forward items DrawTrackItems(labels, trainInfo.ObjectInfoForward, zeroObjectPointTop, distanceFactor, markerIntervalM, direction: TrainDirection.Forward, useMetric); } - if (trainInfo.direction != 0) + if (trainInfo.direction !=0) { // Draw fixed distance indications float markerIntervalM = DrawDistanceMarkers(labels, distanceFactor, zeroObjectPointBottom, numberOfMarkers: 4, direction: TrainDirection.Backward, useMetric); diff --git a/Source/RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs b/Source/RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs index b3c012842f..c375afdfb9 100644 --- a/Source/RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs +++ b/Source/RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs @@ -15,12 +15,15 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using Orts.Simulation.Physics; +using Orts.Simulation.RollingStocks; +using Orts.Simulation.RollingStocks.SubSystems.Brakes; +using ORTS.Common; +using ORTS.Common.Input; using System; using System.Collections.Generic; using System.Drawing; using System.Linq; -using Orts.Simulation.Physics; -using Orts.Simulation.RollingStocks; namespace Orts.Viewer3D.WebServices { diff --git a/Source/RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs b/Source/RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs index 72558857ac..2a03fff1d4 100644 --- a/Source/RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs +++ b/Source/RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs @@ -15,16 +15,16 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System; -using System.Collections.Generic; -using System.Drawing; -using System.Linq; using Orts.Simulation.Physics; using Orts.Simulation.RollingStocks; using Orts.Simulation.RollingStocks.SubSystems; using Orts.Simulation.RollingStocks.SubSystems.Brakes; using ORTS.Common; using ORTS.Common.Input; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; namespace Orts.Viewer3D.WebServices { diff --git a/Source/RunActivity/Viewer3D/WebServices/WebServer.cs b/Source/RunActivity/Viewer3D/WebServices/WebServer.cs index cd5417bbbd..e3184d9afd 100644 --- a/Source/RunActivity/Viewer3D/WebServices/WebServer.cs +++ b/Source/RunActivity/Viewer3D/WebServices/WebServer.cs @@ -20,12 +20,6 @@ // Based on an idea by Dan Reynolds (HighAspect) - 2017-12-21 // =========================================================================================== -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading; -using System.Threading.Tasks; using EmbedIO; using EmbedIO.Routing; using EmbedIO.WebApi; @@ -34,8 +28,17 @@ using Newtonsoft.Json.Serialization; using Orts.Common; using Orts.Formats.Msts; +using Orts.Simulation.Physics; using Orts.Viewer3D.RollingStock; using ORTS.Common; +using ORTS.Settings; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using static Orts.Common.InfoApiMap; namespace Orts.Viewer3D.WebServices { @@ -87,7 +90,7 @@ await text.WriteAsync(JsonConvert.SerializeObject(data, new JsonSerializerSettin })); } } - + public static async Task DeserializationCallback(IHttpContext context) { using (var text = context.OpenRequestText()) diff --git a/Source/RunActivity/Viewer3D/Wire.cs b/Source/RunActivity/Viewer3D/Wire.cs index b5a4a85d50..a171594f4d 100644 --- a/Source/RunActivity/Viewer3D/Wire.cs +++ b/Source/RunActivity/Viewer3D/Wire.cs @@ -23,16 +23,16 @@ * */ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Orts.Formats.Msts; using Orts.Simulation; using ORTS.Common; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; namespace Orts.Viewer3D { @@ -351,7 +351,7 @@ public void VerticalAccumulate(int count) VerticalNumSegments += (uint)count - 1; } } - + // Dynamic Wire profile class public class WireProfile : TrProfile { @@ -570,7 +570,7 @@ public class WirePrimitive : DynamicTrackPrimitive if (DTrackData.IsCurved == 0) ObjectRadius = 0.5f * DTrackData.param1; // half-length else ObjectRadius = DTrackData.param2 * (float)Math.Sin(0.5 * Math.Abs(DTrackData.param1)); // half chord length } - + /// /// Builds a Wire LOD to WireProfile specifications as one vertex buffer and one index buffer. /// The order in which the buffers are built reflects the nesting in the TrProfile. The nesting order is: diff --git a/Source/RunActivity/Viewer3D/World.cs b/Source/RunActivity/Viewer3D/World.cs index 0dfaf2b347..f4850e7c40 100644 --- a/Source/RunActivity/Viewer3D/World.cs +++ b/Source/RunActivity/Viewer3D/World.cs @@ -18,12 +18,12 @@ // This file is the responsibility of the 3D & Environment Team. using System; -using System.Collections.Generic; using System.Diagnostics; using Microsoft.Xna.Framework; using Orts.Common; -using Orts.Viewer3D.RollingStock.SubSystems; using ORTS.Common; +using Orts.Viewer3D.RollingStock.SubSystems; +using System.Collections.Generic; namespace Orts.Viewer3D { diff --git a/Source/Tests/AssertWarnings.cs b/Source/Tests/AssertWarnings.cs index c28bf71e3f..963de4da31 100644 --- a/Source/Tests/AssertWarnings.cs +++ b/Source/Tests/AssertWarnings.cs @@ -16,7 +16,10 @@ // along with Open Rails. If not, see . using System; +using System.Collections.Generic; using System.Diagnostics; +using System.Linq; +using System.Text; using System.Text.RegularExpressions; using Xunit; diff --git a/Source/Tests/Orts.Common/Conversions.cs b/Source/Tests/Orts.Common/Conversions.cs index 4b6695c5b2..aba52830f0 100644 --- a/Source/Tests/Orts.Common/Conversions.cs +++ b/Source/Tests/Orts.Common/Conversions.cs @@ -15,9 +15,9 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using ORTS.Common; using System; using System.Collections.Generic; -using ORTS.Common; using Xunit; namespace Tests.Orts.Common diff --git a/Source/Tests/Orts.Parsers.Msts/StfReader.cs b/Source/Tests/Orts.Parsers.Msts/StfReader.cs index d0e426ba59..58f67130e9 100644 --- a/Source/Tests/Orts.Parsers.Msts/StfReader.cs +++ b/Source/Tests/Orts.Parsers.Msts/StfReader.cs @@ -15,14 +15,14 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using Microsoft.Xna.Framework; +using Orts.Parsers.Msts; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Text.RegularExpressions; -using Microsoft.Xna.Framework; -using Orts.Parsers.Msts; using Xunit; #region Integration tests (all tests from original reader) @@ -754,7 +754,7 @@ public static void BeThrowable() } namespace Tests.Orts.Parsers.Msts.StfReader -{ +{ // NEW_READER compilation flag is set for those tests that can be performed (compiled) only for the new STFReader, // but not on the old reader. The new reader should also pass all tests that compile on the old reader. // This means in this file NEW_READER flag adds a number of tests, but it should also work if the flag is not set. @@ -1441,7 +1441,7 @@ public static void SkipBlockOnCommentOtherCase() var reader = Create.Reader("Comment(a)" + someFollowingToken); Assert.Equal(someFollowingToken, reader.ReadItem()); } - + [Fact] public static void DontWarnOnMissingBlockAfterComment() { @@ -2223,8 +2223,8 @@ public static void ReturnValueInBlockAndSkipRestOfBlock() public class OnReadingBoolBlockShould { static readonly bool SOMEDEFAULT = false; - static readonly bool[] SOMEDEFAULTS1 = new bool[] { false, true, false, true, true, true, true }; - static readonly string[] STRINGDEFAULTS1 = new string[] { "false", "true", "0", "1", "1.1", "-2.9e3", "non" }; + static readonly bool[] SOMEDEFAULTS1 = new bool[] { false, true, false, true, true, true, true }; + static readonly string[] STRINGDEFAULTS1 = new string[] { "false", "true", "0", "1", "1.1", "-2.9e3", "non" }; [Fact] public static void OnEofWarnAndReturnDefault() @@ -2250,16 +2250,16 @@ public static void OnBlockEndReturnGivenDefault() [Fact] public static void ReturnStringValueInBlock() { - string[] inputValues = { "true", "false" }; - bool[] expectedValues = { true, false }; + string[] inputValues = {"true", "false"}; + bool[] expectedValues = {true, false}; StfTokenReaderCommon.ReturnValueInBlock(expectedValues, inputValues, reader => reader.ReadBoolBlock(false)); } [Fact] public static void ReturnIntValueInBlock() { - string[] inputValues = { "0", "1", "-2" }; - bool[] expectedValues = { false, true, true }; + string[] inputValues = {"0", "1", "-2"}; + bool[] expectedValues = {false, true, true}; StfTokenReaderCommon.ReturnValueInBlock(expectedValues, inputValues, reader => reader.ReadBoolBlock(false)); } @@ -2269,9 +2269,9 @@ public static void ReturnDefaultValueOtherwiseInBlock() bool[] expectedValues; string[] inputValues = { "0.1", "1.1", "something", "()" }; bool expectedValue = false; - expectedValues = new bool[] { expectedValue, expectedValue, expectedValue, expectedValue }; + expectedValues = new bool[]{ expectedValue, expectedValue, expectedValue, expectedValue}; StfTokenReaderCommon.ReturnValueInBlock(expectedValues, inputValues, reader => reader.ReadBoolBlock(expectedValue)); - + expectedValue = true; expectedValues = new bool[] { expectedValue, expectedValue, expectedValue, expectedValue }; StfTokenReaderCommon.ReturnValueInBlock(expectedValues, inputValues, reader => reader.ReadBoolBlock(expectedValue)); @@ -2318,7 +2318,7 @@ public static void OnNonBoolOrIntInBlockReturnFalseWithoutWarning() var reader = Create.Reader(inputString); foreach (string testValue in testValues) { - bool result = !expectedResult; + bool result = ! expectedResult; result = reader.ReadBoolBlock(expectedResult); Assert.Equal(expectedResult, result); } diff --git a/Source/Tests/Orts.Parsers.OR/TimetableReaderTests.cs b/Source/Tests/Orts.Parsers.OR/TimetableReaderTests.cs index c733dc3d93..9d6d82c889 100644 --- a/Source/Tests/Orts.Parsers.OR/TimetableReaderTests.cs +++ b/Source/Tests/Orts.Parsers.OR/TimetableReaderTests.cs @@ -15,8 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . -using System.IO; using Orts.Parsers.OR; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; using Xunit; namespace Tests.Orts.Parsers.OR @@ -46,8 +50,7 @@ public static void DetectSeparator() } using (var file = new TestFile(":")) { - Assert.Throws(() => - { + Assert.Throws(() => { var tr = new TimetableReader(file.FileName); }); } diff --git a/Source/Tests/TestFile.cs b/Source/Tests/TestFile.cs index e0e08c625b..c435c78433 100644 --- a/Source/Tests/TestFile.cs +++ b/Source/Tests/TestFile.cs @@ -16,7 +16,10 @@ // along with Open Rails. If not, see . using System; +using System.Collections.Generic; using System.IO; +using System.Linq; +using System.Text; namespace Tests { diff --git a/Source/Updater/UpdaterProgress.cs b/Source/Updater/UpdaterProgress.cs index ca0830a186..9442d0d6ee 100644 --- a/Source/Updater/UpdaterProgress.cs +++ b/Source/Updater/UpdaterProgress.cs @@ -15,6 +15,11 @@ // You should have received a copy of the GNU General Public License // along with Open Rails. If not, see . +using GNU.Gettext; +using GNU.Gettext.WinForms; +using ORTS.Common; +using ORTS.Settings; +using ORTS.Updater; using System; using System.ComponentModel; using System.Diagnostics; @@ -24,11 +29,6 @@ using System.Linq; using System.Threading; using System.Windows.Forms; -using GNU.Gettext; -using GNU.Gettext.WinForms; -using ORTS.Common; -using ORTS.Settings; -using ORTS.Updater; namespace Updater { From 079300b28f6314d3509928b976d564f11fdc1b78 Mon Sep 17 00:00:00 2001 From: Looky1173 Date: Sun, 20 Aug 2023 14:24:10 +0200 Subject: [PATCH 05/33] Added switch control --- .../Debugging/DebugViewerBetaForm.Designer.cs | 70 +++++-- .../Viewer3D/Debugging/DebugViewerBetaForm.cs | 196 +++++++++++++++++- .../Debugging/DebugViewerBetaForm.resx | 3 + .../Debugging/DebugViewerForm.Designer.cs | 8 +- 4 files changed, 258 insertions(+), 19 deletions(-) diff --git a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs index e3d4ea33a0..2ad5ec2b5a 100644 --- a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs +++ b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs @@ -79,7 +79,7 @@ private void InitializeComponent() this.seeTrainInGameButton = new System.Windows.Forms.Button(); this.label3 = new System.Windows.Forms.Label(); this.mapResolutionUpDown = new System.Windows.Forms.NumericUpDown(); - this.checkBox3 = new System.Windows.Forms.CheckBox(); + this.allowThrowingSwitchesCheckbox = new System.Windows.Forms.CheckBox(); this.allowChangingSignalsCheckbox = new System.Windows.Forms.CheckBox(); this.drawPathCheckbox = new System.Windows.Forms.CheckBox(); this.playersPanel = new System.Windows.Forms.Panel(); @@ -93,6 +93,10 @@ private void InitializeComponent() this.jumpToThisPlayerInGameToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.followToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.kickFromMultiplayerSessionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.setSwitchMenu = new System.Windows.Forms.ContextMenuStrip(this.components); + this.setSwitchToToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.mainRouteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.sideRouteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.playerRolePanel.SuspendLayout(); this.tableLayoutPanel1.SuspendLayout(); this.tableLayoutPanel2.SuspendLayout(); @@ -111,6 +115,7 @@ private void InitializeComponent() this.groupBox3.SuspendLayout(); this.messageActionsMenu.SuspendLayout(); this.playerActionsMenu.SuspendLayout(); + this.setSwitchMenu.SuspendLayout(); this.SuspendLayout(); // // playerRolePanel @@ -605,7 +610,7 @@ private void InitializeComponent() this.groupBox1.Controls.Add(this.seeTrainInGameButton); this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.mapResolutionUpDown); - this.groupBox1.Controls.Add(this.checkBox3); + this.groupBox1.Controls.Add(this.allowThrowingSwitchesCheckbox); this.groupBox1.Controls.Add(this.allowChangingSignalsCheckbox); this.groupBox1.Controls.Add(this.drawPathCheckbox); this.groupBox1.Location = new System.Drawing.Point(10, 3); @@ -688,21 +693,23 @@ private void InitializeComponent() 0}); this.mapResolutionUpDown.ValueChanged += new System.EventHandler(this.mapResolutionUpDown_ValueChanged); // - // checkBox3 + // allowThrowingSwitchesCheckbox // - this.checkBox3.AutoSize = true; - this.checkBox3.Enabled = false; - this.checkBox3.Location = new System.Drawing.Point(7, 57); - this.checkBox3.Name = "checkBox3"; - this.checkBox3.Size = new System.Drawing.Size(138, 17); - this.checkBox3.TabIndex = 2; - this.checkBox3.Text = "Allow throwing switches"; - this.checkBox3.UseVisualStyleBackColor = true; + this.allowThrowingSwitchesCheckbox.AutoSize = true; + this.allowThrowingSwitchesCheckbox.Checked = true; + this.allowThrowingSwitchesCheckbox.CheckState = System.Windows.Forms.CheckState.Checked; + this.allowThrowingSwitchesCheckbox.Location = new System.Drawing.Point(7, 57); + this.allowThrowingSwitchesCheckbox.Name = "allowThrowingSwitchesCheckbox"; + this.allowThrowingSwitchesCheckbox.Size = new System.Drawing.Size(138, 17); + this.allowThrowingSwitchesCheckbox.TabIndex = 2; + this.allowThrowingSwitchesCheckbox.Text = "Allow throwing switches"; + this.allowThrowingSwitchesCheckbox.UseVisualStyleBackColor = true; // // allowChangingSignalsCheckbox // this.allowChangingSignalsCheckbox.AutoSize = true; - this.allowChangingSignalsCheckbox.Enabled = false; + this.allowChangingSignalsCheckbox.Checked = true; + this.allowChangingSignalsCheckbox.CheckState = System.Windows.Forms.CheckState.Checked; this.allowChangingSignalsCheckbox.Location = new System.Drawing.Point(7, 38); this.allowChangingSignalsCheckbox.Name = "allowChangingSignalsCheckbox"; this.allowChangingSignalsCheckbox.Size = new System.Drawing.Size(133, 17); @@ -836,6 +843,38 @@ private void InitializeComponent() this.kickFromMultiplayerSessionToolStripMenuItem.Size = new System.Drawing.Size(229, 22); this.kickFromMultiplayerSessionToolStripMenuItem.Text = "Kick from multiplayer session"; // + // setSwitchMenu + // + this.setSwitchMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.setSwitchToToolStripMenuItem, + this.mainRouteToolStripMenuItem, + this.sideRouteToolStripMenuItem}); + this.setSwitchMenu.Name = "contextMenuStrip1"; + this.setSwitchMenu.Size = new System.Drawing.Size(181, 92); + this.setSwitchMenu.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.setSwitchMenu_ItemClicked); + // + // setSwitchToToolStripMenuItem + // + this.setSwitchToToolStripMenuItem.Enabled = false; + this.setSwitchToToolStripMenuItem.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold); + this.setSwitchToToolStripMenuItem.Name = "setSwitchToToolStripMenuItem"; + this.setSwitchToToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.setSwitchToToolStripMenuItem.Text = "Set switch to..."; + // + // mainRouteToolStripMenuItem + // + this.mainRouteToolStripMenuItem.Name = "mainRouteToolStripMenuItem"; + this.mainRouteToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.mainRouteToolStripMenuItem.Tag = "mainRoute"; + this.mainRouteToolStripMenuItem.Text = "Main route"; + // + // sideRouteToolStripMenuItem + // + this.sideRouteToolStripMenuItem.Name = "sideRouteToolStripMenuItem"; + this.sideRouteToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.sideRouteToolStripMenuItem.Tag = "sideRoute"; + this.sideRouteToolStripMenuItem.Text = "Side route"; + // // DispatchViewerBeta // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -871,6 +910,7 @@ private void InitializeComponent() this.groupBox3.ResumeLayout(false); this.messageActionsMenu.ResumeLayout(false); this.playerActionsMenu.ResumeLayout(false); + this.setSwitchMenu.ResumeLayout(false); this.ResumeLayout(false); } @@ -894,7 +934,7 @@ private void InitializeComponent() private System.Windows.Forms.TableLayoutPanel tableLayoutPanel4; private System.Windows.Forms.Panel mapSettingsPanel; private System.Windows.Forms.GroupBox groupBox1; - private System.Windows.Forms.CheckBox checkBox3; + private System.Windows.Forms.CheckBox allowThrowingSwitchesCheckbox; private System.Windows.Forms.CheckBox allowChangingSignalsCheckbox; private System.Windows.Forms.CheckBox drawPathCheckbox; public System.Windows.Forms.Panel multiplayerSettingsPanel; @@ -936,6 +976,10 @@ private void InitializeComponent() private System.Windows.Forms.CheckBox showTrainStateCheckbox; private System.Windows.Forms.CheckBox showTrainLabelsCheckbox; private System.Windows.Forms.RadioButton showAllTrainsRadio; + private System.Windows.Forms.ContextMenuStrip setSwitchMenu; + private System.Windows.Forms.ToolStripMenuItem setSwitchToToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem mainRouteToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem sideRouteToolStripMenuItem; } } diff --git a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs index c960fbb05d..e37a98c40b 100644 --- a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs +++ b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs @@ -1640,7 +1640,7 @@ private void mapCanvas_MouseUp(object sender, MouseEventArgs e) if (LastCursorPosition.X == e.X && LastCursorPosition.Y == e.Y) { var range = 5 * (int)xScale; if (range > 10) range = 10; - /*var temp = findItemFromMouse(e.X, e.Y, range); + var temp = findItemFromMouse(e.X, e.Y, range); if (temp != null) { if (temp is SwitchWidget) @@ -1662,7 +1662,7 @@ private void mapCanvas_MouseUp(object sender, MouseEventArgs e) signalPickedItem = null; UnHandleItemPick(); PickedTrain = null; - }*/ + } } } @@ -1672,6 +1672,151 @@ private void mapCanvas_MouseUp(object sender, MouseEventArgs e) lblInstruction4.Visible = false;*/ } + private void UnHandleItemPick() + { + //boxSetSignal.Visible = false; + setSwitchMenu.Visible = false; + } + + private void HandlePickedSignal() + { + if (MPManager.IsClient() && !MPManager.Instance().AmAider) // normal client not server or aider + return; + setSwitchMenu.Visible = false; + if (signalPickedItem == null) return; + var y = LastCursorPosition.Y; + if (LastCursorPosition.Y < 100) y = 100; + if (LastCursorPosition.Y > mapCanvas.Size.Height - 100) y = mapCanvas.Size.Height - 100; + + /*if (boxSetSignal.Items.Count == 5) + boxSetSignal.Items.RemoveAt(4); + + if (signalPickedItem.Signal.enabledTrain != null && signalPickedItem.Signal.CallOnEnabled) + { + if (!signalPickedItem.Signal.CallOnManuallyAllowed) + boxSetSignal.Items.Add("Allow call on"); + } + + boxSetSignal.Location = new System.Drawing.Point(LastCursorPosition.X + 2, y); + boxSetSignal.Enabled = true; + boxSetSignal.Focus(); + boxSetSignal.SelectedIndex = -1; + boxSetSignal.Visible = true; + return;*/ + } + + private void HandlePickedSwitch() + { + if (MPManager.IsClient() && !MPManager.Instance().AmAider) + return;//normal client not server + + //boxSetSignal.Visible = false; + if (switchPickedItem == null) return; + setSwitchMenu.Show(Cursor.Position); + setSwitchMenu.Enabled = true; + setSwitchMenu.Focus(); + setSwitchMenu.Visible = true; + return; + } + + private ItemWidget findItemFromMouse(int x, int y, int range) + { + if (range < 5) range = 5; + double closest = float.NaN; + ItemWidget closestItem = null; + if (allowThrowingSwitchesCheckbox.Checked == true) + { + foreach (var item in switchItemsDrawn) + { + //if out of range, continue + if (item.Location2D.X < x - range || item.Location2D.X > x + range + || item.Location2D.Y < y - range || item.Location2D.Y > y + range) + continue; + + if (closestItem != null) + { + var dist = Math.Pow(item.Location2D.X - closestItem.Location2D.X, 2) + Math.Pow(item.Location2D.Y - closestItem.Location2D.Y, 2); + if (dist < closest) + { + closest = dist; closestItem = item; + } + } + else closestItem = item; + } + if (closestItem != null) + { + switchPickedTime = simulator.GameTime; + return closestItem; + } + } + if (allowChangingSignalsCheckbox.Checked == true) + { + foreach (var item in signalItemsDrawn) + { + //if out of range, continue + if (item.Location2D.X < x - range || item.Location2D.X > x + range + || item.Location2D.Y < y - range || item.Location2D.Y > y + range) + continue; + + if (closestItem != null) + { + var dist = Math.Pow(item.Location2D.X - closestItem.Location2D.X, 2) + Math.Pow(item.Location2D.Y - closestItem.Location2D.Y, 2); + if (dist < closest) + { + closest = dist; closestItem = item; + } + } + else closestItem = item; + } + if (closestItem != null) + { + switchPickedTime = simulator.GameTime; + return closestItem; + } + } + + //now check for trains (first car only) + TrainCar firstCar; + PickedTrain = null; float tX, tY; + closest = 100f; + + foreach (var t in Program.Simulator.Trains) + { + firstCar = null; + if (t.LeadLocomotive != null) + { + worldPos = t.LeadLocomotive.WorldPosition; + firstCar = t.LeadLocomotive; + } + else if (t.Cars != null && t.Cars.Count > 0) + { + worldPos = t.Cars[0].WorldPosition; + firstCar = t.Cars[0]; + + } + else + continue; + + worldPos = firstCar.WorldPosition; + tX = (worldPos.TileX * 2048 - subX + worldPos.Location.X) * xScale; + tY = mapCanvas.Height - (worldPos.TileZ * 2048 - subY + worldPos.Location.Z) * yScale; + float xSpeedCorr = Math.Abs(t.SpeedMpS) * xScale * 1.5f; + float ySpeedCorr = Math.Abs(t.SpeedMpS) * yScale * 1.5f; + + if (tX < x - range - xSpeedCorr || tX > x + range + xSpeedCorr || tY < y - range - ySpeedCorr || tY > y + range + ySpeedCorr) + continue; + if (PickedTrain == null) + PickedTrain = t; + } + //if a train is picked, will clear the avatar list selection + if (PickedTrain != null) + { + //AvatarView.SelectedItems.Clear(); + return new TrainWidget(PickedTrain); + } + return null; + } + private void mapCanvas_MouseMove(object sender, MouseEventArgs e) { if (Dragging && !Zooming) @@ -1763,6 +1908,53 @@ private void penaltyCheckbox_CheckedChanged(object sender, EventArgs e) else { MPManager.BroadCast(new MSGMessage("All", "NoOverSpeed", "Penalty for overspeed and passing stop light").ToString()); } } + + private void setSwitchMenu_ItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + if (switchPickedItem == null) + { + UnHandleItemPick(); return; + } + var sw = switchPickedItem.Item.TrJunctionNode; + var type = e.ClickedItem.Tag.ToString(); + + // Aider can send message to the server for a switch + if (MPManager.IsMultiPlayer() && MPManager.Instance().AmAider) + { + var nextSwitchTrack = sw; + var Selected = 0; + switch (type) + { + case "mainRoute": + Selected = (int)switchPickedItem.main; + break; + case "sideRoute": + Selected = 1 - (int)switchPickedItem.main; + break; + } + // Aider selects and throws the switch, but need to confirm by the dispatcher + MPManager.Notify(new MSGSwitch(MPManager.GetUserName(), + nextSwitchTrack.TN.UiD.WorldTileX, nextSwitchTrack.TN.UiD.WorldTileZ, nextSwitchTrack.TN.UiD.WorldId, Selected, true).ToString()); + Program.Simulator.Confirmer.Information(Viewer.Catalog.GetString("Switching Request Sent to the Server")); + + } + else // Server throws the switch immediately + { + switch (type) + { + case "mainRoute": + Program.Simulator.Signals.RequestSetSwitch(sw.TN, (int)switchPickedItem.main); + //sw.SelectedRoute = (int)switchPickedItem.main; + break; + case "sideRoute": + Program.Simulator.Signals.RequestSetSwitch(sw.TN, 1 - (int)switchPickedItem.main); + //sw.SelectedRoute = 1 - (int)switchPickedItem.main; + break; + } + } + UnHandleItemPick(); + } + private void DispatchViewerBeta_FormClosing(object sender, FormClosingEventArgs e) { // Prevent the window from closing; instead, hide it diff --git a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.resx b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.resx index c01dbc95a6..c793f4ca35 100644 --- a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.resx +++ b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.resx @@ -123,6 +123,9 @@ 174, 16 + + 331, 16 + 110 diff --git a/Source/RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs b/Source/RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs index bdfa6c0ffe..1ce3a0ff36 100644 --- a/Source/RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs +++ b/Source/RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs @@ -677,7 +677,7 @@ private void InitializeComponent() // lblInstruction1 // this.lblInstruction1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.lblInstruction1.Location = new System.Drawing.Point(8, 709); + this.lblInstruction1.Location = new System.Drawing.Point(8, 717); this.lblInstruction1.Name = "lblInstruction1"; this.lblInstruction1.Padding = new System.Windows.Forms.Padding(3); this.lblInstruction1.Size = new System.Drawing.Size(327, 22); @@ -749,7 +749,7 @@ private void InitializeComponent() // lblInstruction2 // this.lblInstruction2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.lblInstruction2.Location = new System.Drawing.Point(8, 730); + this.lblInstruction2.Location = new System.Drawing.Point(8, 738); this.lblInstruction2.Name = "lblInstruction2"; this.lblInstruction2.Padding = new System.Windows.Forms.Padding(3); this.lblInstruction2.Size = new System.Drawing.Size(327, 21); @@ -760,7 +760,7 @@ private void InitializeComponent() // lblInstruction3 // this.lblInstruction3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.lblInstruction3.Location = new System.Drawing.Point(8, 751); + this.lblInstruction3.Location = new System.Drawing.Point(8, 759); this.lblInstruction3.Name = "lblInstruction3"; this.lblInstruction3.Padding = new System.Windows.Forms.Padding(3); this.lblInstruction3.Size = new System.Drawing.Size(327, 21); @@ -771,7 +771,7 @@ private void InitializeComponent() // lblInstruction4 // this.lblInstruction4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.lblInstruction4.Location = new System.Drawing.Point(8, 772); + this.lblInstruction4.Location = new System.Drawing.Point(8, 780); this.lblInstruction4.Name = "lblInstruction4"; this.lblInstruction4.Padding = new System.Windows.Forms.Padding(3); this.lblInstruction4.Size = new System.Drawing.Size(327, 21); From f0f2a72ce746eadf12e86fd864ea23ec243cb2ad Mon Sep 17 00:00:00 2001 From: Looky1173 Date: Sun, 20 Aug 2023 15:41:08 +0200 Subject: [PATCH 06/33] Added signal controls --- .../Debugging/DebugViewerBetaForm.Designer.cs | 94 +++++++++- .../Viewer3D/Debugging/DebugViewerBetaForm.cs | 171 +++++++++++------- .../Debugging/DebugViewerBetaForm.resx | 3 + 3 files changed, 198 insertions(+), 70 deletions(-) diff --git a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs index 2ad5ec2b5a..b8e7ecedc2 100644 --- a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs +++ b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs @@ -97,6 +97,14 @@ private void InitializeComponent() this.setSwitchToToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.mainRouteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.sideRouteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.setSignalMenu = new System.Windows.Forms.ContextMenuStrip(this.components); + this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem(); + this.approachToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.proceedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + this.allowCallOnToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.playerRolePanel.SuspendLayout(); this.tableLayoutPanel1.SuspendLayout(); this.tableLayoutPanel2.SuspendLayout(); @@ -116,6 +124,7 @@ private void InitializeComponent() this.messageActionsMenu.SuspendLayout(); this.playerActionsMenu.SuspendLayout(); this.setSwitchMenu.SuspendLayout(); + this.setSignalMenu.SuspendLayout(); this.SuspendLayout(); // // playerRolePanel @@ -850,7 +859,7 @@ private void InitializeComponent() this.mainRouteToolStripMenuItem, this.sideRouteToolStripMenuItem}); this.setSwitchMenu.Name = "contextMenuStrip1"; - this.setSwitchMenu.Size = new System.Drawing.Size(181, 92); + this.setSwitchMenu.Size = new System.Drawing.Size(157, 70); this.setSwitchMenu.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.setSwitchMenu_ItemClicked); // // setSwitchToToolStripMenuItem @@ -858,23 +867,91 @@ private void InitializeComponent() this.setSwitchToToolStripMenuItem.Enabled = false; this.setSwitchToToolStripMenuItem.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold); this.setSwitchToToolStripMenuItem.Name = "setSwitchToToolStripMenuItem"; - this.setSwitchToToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.setSwitchToToolStripMenuItem.Size = new System.Drawing.Size(156, 22); this.setSwitchToToolStripMenuItem.Text = "Set switch to..."; // // mainRouteToolStripMenuItem // this.mainRouteToolStripMenuItem.Name = "mainRouteToolStripMenuItem"; - this.mainRouteToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.mainRouteToolStripMenuItem.Size = new System.Drawing.Size(156, 22); this.mainRouteToolStripMenuItem.Tag = "mainRoute"; this.mainRouteToolStripMenuItem.Text = "Main route"; // // sideRouteToolStripMenuItem // this.sideRouteToolStripMenuItem.Name = "sideRouteToolStripMenuItem"; - this.sideRouteToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.sideRouteToolStripMenuItem.Size = new System.Drawing.Size(156, 22); this.sideRouteToolStripMenuItem.Tag = "sideRoute"; this.sideRouteToolStripMenuItem.Text = "Side route"; // + // setSignalMenu + // + this.setSignalMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripMenuItem1, + this.toolStripMenuItem2, + this.toolStripMenuItem3, + this.approachToolStripMenuItem, + this.proceedToolStripMenuItem, + this.toolStripSeparator1, + this.allowCallOnToolStripMenuItem}); + this.setSignalMenu.Name = "contextMenuStrip1"; + this.setSignalMenu.Size = new System.Drawing.Size(191, 142); + this.setSignalMenu.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.setSignalMenu_ItemClicked); + // + // toolStripMenuItem1 + // + this.toolStripMenuItem1.Enabled = false; + this.toolStripMenuItem1.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold); + this.toolStripMenuItem1.Name = "toolStripMenuItem1"; + this.toolStripMenuItem1.Size = new System.Drawing.Size(190, 22); + this.toolStripMenuItem1.Text = "Set signal aspect to..."; + // + // toolStripMenuItem2 + // + this.toolStripMenuItem2.Name = "toolStripMenuItem2"; + this.toolStripMenuItem2.Size = new System.Drawing.Size(190, 22); + this.toolStripMenuItem2.Tag = "system"; + this.toolStripMenuItem2.Text = "System controlled"; + // + // toolStripMenuItem3 + // + this.toolStripMenuItem3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(67)))), ((int)(((byte)(53))))); + this.toolStripMenuItem3.ForeColor = System.Drawing.Color.White; + this.toolStripMenuItem3.Name = "toolStripMenuItem3"; + this.toolStripMenuItem3.Size = new System.Drawing.Size(190, 22); + this.toolStripMenuItem3.Tag = "stop"; + this.toolStripMenuItem3.Text = "Stop"; + // + // approachToolStripMenuItem + // + this.approachToolStripMenuItem.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(241)))), ((int)(((byte)(196)))), ((int)(((byte)(15))))); + this.approachToolStripMenuItem.Name = "approachToolStripMenuItem"; + this.approachToolStripMenuItem.Size = new System.Drawing.Size(190, 22); + this.approachToolStripMenuItem.Tag = "approach"; + this.approachToolStripMenuItem.Text = "Approach"; + // + // proceedToolStripMenuItem + // + this.proceedToolStripMenuItem.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(34)))), ((int)(((byte)(153)))), ((int)(((byte)(84))))); + this.proceedToolStripMenuItem.ForeColor = System.Drawing.Color.White; + this.proceedToolStripMenuItem.Name = "proceedToolStripMenuItem"; + this.proceedToolStripMenuItem.Size = new System.Drawing.Size(190, 22); + this.proceedToolStripMenuItem.Tag = "proceed"; + this.proceedToolStripMenuItem.Text = "Proceed"; + // + // toolStripSeparator1 + // + this.toolStripSeparator1.Name = "toolStripSeparator1"; + this.toolStripSeparator1.Size = new System.Drawing.Size(187, 6); + // + // allowCallOnToolStripMenuItem + // + this.allowCallOnToolStripMenuItem.Enabled = false; + this.allowCallOnToolStripMenuItem.Name = "allowCallOnToolStripMenuItem"; + this.allowCallOnToolStripMenuItem.Size = new System.Drawing.Size(190, 22); + this.allowCallOnToolStripMenuItem.Tag = "callOn"; + this.allowCallOnToolStripMenuItem.Text = "Allow call on"; + // // DispatchViewerBeta // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -911,6 +988,7 @@ private void InitializeComponent() this.messageActionsMenu.ResumeLayout(false); this.playerActionsMenu.ResumeLayout(false); this.setSwitchMenu.ResumeLayout(false); + this.setSignalMenu.ResumeLayout(false); this.ResumeLayout(false); } @@ -980,6 +1058,14 @@ private void InitializeComponent() private System.Windows.Forms.ToolStripMenuItem setSwitchToToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem mainRouteToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem sideRouteToolStripMenuItem; + private System.Windows.Forms.ContextMenuStrip setSignalMenu; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem3; + private System.Windows.Forms.ToolStripMenuItem approachToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem proceedToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; + private System.Windows.Forms.ToolStripMenuItem allowCallOnToolStripMenuItem; } } diff --git a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs index e37a98c40b..893c8b6dc0 100644 --- a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs +++ b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs @@ -1025,7 +1025,7 @@ private void ShowSignalState(Graphics g, PointF scaledItem, SignalWidget sw) { if (!showSignalStateCheckbox.Checked) return; - + var item = sw.Item as SignalItem; var trainNumber = sw.Signal?.enabledTrain?.Train?.Number; var trainString = (trainNumber == null) ? "" : $" train: {trainNumber}"; @@ -1041,7 +1041,7 @@ private void ShowSignalState(Graphics g, PointF scaledItem, SignalWidget sw) if (scaledItem.Y >= 0f) // -1 indicates no free slot to draw label g.DrawString(text, SignalFont, SignalBrush, scaledItem); } - + } private void ShowSidingLabels(Graphics g) @@ -1674,7 +1674,7 @@ private void mapCanvas_MouseUp(object sender, MouseEventArgs e) private void UnHandleItemPick() { - //boxSetSignal.Visible = false; + setSignalMenu.Visible = false; setSwitchMenu.Visible = false; } @@ -1684,25 +1684,16 @@ private void HandlePickedSignal() return; setSwitchMenu.Visible = false; if (signalPickedItem == null) return; - var y = LastCursorPosition.Y; - if (LastCursorPosition.Y < 100) y = 100; - if (LastCursorPosition.Y > mapCanvas.Size.Height - 100) y = mapCanvas.Size.Height - 100; - /*if (boxSetSignal.Items.Count == 5) - boxSetSignal.Items.RemoveAt(4); - - if (signalPickedItem.Signal.enabledTrain != null && signalPickedItem.Signal.CallOnEnabled) - { - if (!signalPickedItem.Signal.CallOnManuallyAllowed) - boxSetSignal.Items.Add("Allow call on"); - } + allowCallOnToolStripMenuItem.Enabled = false; + if (signalPickedItem.Signal.enabledTrain != null && signalPickedItem.Signal.CallOnEnabled && !signalPickedItem.Signal.CallOnManuallyAllowed) + allowCallOnToolStripMenuItem.Enabled = true; - boxSetSignal.Location = new System.Drawing.Point(LastCursorPosition.X + 2, y); - boxSetSignal.Enabled = true; - boxSetSignal.Focus(); - boxSetSignal.SelectedIndex = -1; - boxSetSignal.Visible = true; - return;*/ + setSignalMenu.Show(Cursor.Position); + setSignalMenu.Enabled = true; + setSignalMenu.Focus(); + setSignalMenu.Visible = true; + return; } private void HandlePickedSwitch() @@ -1710,7 +1701,7 @@ private void HandlePickedSwitch() if (MPManager.IsClient() && !MPManager.Instance().AmAider) return;//normal client not server - //boxSetSignal.Visible = false; + setSignalMenu.Visible = false; if (switchPickedItem == null) return; setSwitchMenu.Show(Cursor.Position); setSwitchMenu.Enabled = true; @@ -1719,6 +1710,99 @@ private void HandlePickedSwitch() return; } + private void setSignalMenu_ItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + if (signalPickedItem == null) + { + UnHandleItemPick(); + return; + } + + var signal = signalPickedItem.Signal; + var type = e.ClickedItem.Tag.ToString(); + + string[] signalAspects = { "system", "stop", "approach", "proceed" }; + int numericSignalAspect = Array.IndexOf(signalAspects, "stop"); + + if (MPManager.Instance().AmAider) + { + MPManager.Notify(new MSGSignalChange(signal, numericSignalAspect).ToString()); + UnHandleItemPick(); + return; + } + + switch (type) + { + case "system": + signal.ClearHoldSignalDispatcher(); + break; + + case "stop": + signal.RequestHoldSignalDispatcher(true); + break; + + case "approach": + signal.RequestApproachAspect(); + break; + + case "proceed": + signal.RequestLeastRestrictiveAspect(); + break; + + case "callOn": + signal.SetManualCallOn(true); + break; + } + + UnHandleItemPick(); + } + + private void setSwitchMenu_ItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + if (switchPickedItem == null) + { + UnHandleItemPick(); return; + } + var sw = switchPickedItem.Item.TrJunctionNode; + var type = e.ClickedItem.Tag.ToString(); + + // Aider can send message to the server for a switch + if (MPManager.IsMultiPlayer() && MPManager.Instance().AmAider) + { + var nextSwitchTrack = sw; + var Selected = 0; + switch (type) + { + case "mainRoute": + Selected = (int)switchPickedItem.main; + break; + case "sideRoute": + Selected = 1 - (int)switchPickedItem.main; + break; + } + // Aider selects and throws the switch, but need to confirm by the dispatcher + MPManager.Notify(new MSGSwitch(MPManager.GetUserName(), + nextSwitchTrack.TN.UiD.WorldTileX, nextSwitchTrack.TN.UiD.WorldTileZ, nextSwitchTrack.TN.UiD.WorldId, Selected, true).ToString()); + Program.Simulator.Confirmer.Information(Viewer.Catalog.GetString("Switching Request Sent to the Server")); + + } + else // Server throws the switch immediately + { + switch (type) + { + case "mainRoute": + Program.Simulator.Signals.RequestSetSwitch(sw.TN, (int)switchPickedItem.main); + //sw.SelectedRoute = (int)switchPickedItem.main; + break; + case "sideRoute": + Program.Simulator.Signals.RequestSetSwitch(sw.TN, 1 - (int)switchPickedItem.main); + //sw.SelectedRoute = 1 - (int)switchPickedItem.main; + break; + } + } + UnHandleItemPick(); + } + private ItemWidget findItemFromMouse(int x, int y, int range) { if (range < 5) range = 5; @@ -1909,51 +1993,6 @@ private void penaltyCheckbox_CheckedChanged(object sender, EventArgs e) } - private void setSwitchMenu_ItemClicked(object sender, ToolStripItemClickedEventArgs e) - { - if (switchPickedItem == null) - { - UnHandleItemPick(); return; - } - var sw = switchPickedItem.Item.TrJunctionNode; - var type = e.ClickedItem.Tag.ToString(); - - // Aider can send message to the server for a switch - if (MPManager.IsMultiPlayer() && MPManager.Instance().AmAider) - { - var nextSwitchTrack = sw; - var Selected = 0; - switch (type) - { - case "mainRoute": - Selected = (int)switchPickedItem.main; - break; - case "sideRoute": - Selected = 1 - (int)switchPickedItem.main; - break; - } - // Aider selects and throws the switch, but need to confirm by the dispatcher - MPManager.Notify(new MSGSwitch(MPManager.GetUserName(), - nextSwitchTrack.TN.UiD.WorldTileX, nextSwitchTrack.TN.UiD.WorldTileZ, nextSwitchTrack.TN.UiD.WorldId, Selected, true).ToString()); - Program.Simulator.Confirmer.Information(Viewer.Catalog.GetString("Switching Request Sent to the Server")); - - } - else // Server throws the switch immediately - { - switch (type) - { - case "mainRoute": - Program.Simulator.Signals.RequestSetSwitch(sw.TN, (int)switchPickedItem.main); - //sw.SelectedRoute = (int)switchPickedItem.main; - break; - case "sideRoute": - Program.Simulator.Signals.RequestSetSwitch(sw.TN, 1 - (int)switchPickedItem.main); - //sw.SelectedRoute = 1 - (int)switchPickedItem.main; - break; - } - } - UnHandleItemPick(); - } private void DispatchViewerBeta_FormClosing(object sender, FormClosingEventArgs e) { diff --git a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.resx b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.resx index c793f4ca35..0b1b1d3cce 100644 --- a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.resx +++ b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.resx @@ -126,6 +126,9 @@ 331, 16 + + 486, 16 + 110 From 8da038f582e9135559e7e7a3bd3364cf95c78bf4 Mon Sep 17 00:00:00 2001 From: Looky1173 Date: Sun, 20 Aug 2023 16:05:12 +0200 Subject: [PATCH 07/33] Revised colours --- .../Viewer3D/Debugging/DebugViewerBetaForm.cs | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs index 893c8b6dc0..fa713fa130 100644 --- a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs +++ b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs @@ -61,11 +61,11 @@ public partial class DispatchViewerBeta : Form /// contains the last position of the mouse /// private System.Drawing.Point LastCursorPosition = new System.Drawing.Point(); - public Pen redPen = new Pen(Color.Red); - public Pen greenPen = new Pen(Color.Green); - public Pen orangePen = new Pen(Color.Orange); + public Pen redPen = new Pen(Color.FromArgb(244, 67, 54)); + public Pen greenPen = new Pen(Color.FromArgb(76, 175, 80)); + public Pen orangePen = new Pen(Color.FromArgb(255, 235, 59)); public Pen trainPen = new Pen(Color.DarkGreen); - public Pen pathPen = new Pen(Color.DeepPink); + public Pen pathPen = new Pen(Color.FromArgb(52, 152, 219)); public Pen grayPen = new Pen(Color.Gray); public Pen PlatformPen = new Pen(Color.Blue); public Pen TrackPen = new Pen(Color.FromArgb(46, 64, 83)); @@ -140,6 +140,10 @@ void InitializeForm() messagesPanel.Visible = true; multiplayerSettingsPanel.Visible = true; } + + float[] dashPattern = { 4, 2 }; + ZoomTargetPen.DashPattern = dashPattern; + pathPen.DashPattern = dashPattern; } #region initData @@ -392,11 +396,6 @@ public void GenerateView(bool dragging = false) grayPen.Width = greenPen.Width = orangePen.Width = redPen.Width = penWidth; pathPen.Width = penWidth * 2; - float[] dashPattern = { 4, 2 }; - ZoomTargetPen.DashPattern = dashPattern; - - - var forwardDist = 100 / xScale; if (forwardDist < 5) forwardDist = 5; /*PointF scaledA = new PointF(0, 0); @@ -967,9 +966,9 @@ private void ShowSwitches(Graphics g, float width) var scaledItem = new PointF() { X = x, Y = y }; if (sw.Item.TrJunctionNode.SelectedRoute == sw.main) - g.FillEllipse(Brushes.Black, DispatchViewer.GetRect(scaledItem, width)); + g.FillEllipse(new SolidBrush(Color.FromArgb(93, 64, 55)), DispatchViewer.GetRect(scaledItem, width)); else - g.FillEllipse(Brushes.Gray, DispatchViewer.GetRect(scaledItem, width)); + g.FillEllipse(new SolidBrush(Color.FromArgb(161, 136, 127)), DispatchViewer.GetRect(scaledItem, width)); sw.Location2D.X = scaledItem.X; sw.Location2D.Y = scaledItem.Y; switchItemsDrawn.Add(sw); @@ -994,19 +993,19 @@ private void ShowSignals(Graphics g, PointF scaledB, float width) s.Location2D.X = scaledItem.X; s.Location2D.Y = scaledItem.Y; if (s.Signal.isSignalNormal()) { - var color = Brushes.Lime; // bright colour for readability + var color = new SolidBrush(Color.FromArgb(76, 175, 80)); var pen = greenPen; if (s.IsProceed == 0) { } else if (s.IsProceed == 1) { - color = Brushes.Yellow; // bright colour for readbility + color = new SolidBrush(Color.FromArgb(255, 235, 59)); pen = orangePen; } else { - color = Brushes.Red; + color = new SolidBrush(Color.FromArgb(244, 67, 54)); pen = redPen; } g.FillEllipse(color, DispatchViewer.GetRect(scaledItem, width)); From 8918de1474498f88ed2c356c8e112cde5191b4aa Mon Sep 17 00:00:00 2001 From: Looky1173 Date: Sun, 20 Aug 2023 17:43:09 +0200 Subject: [PATCH 08/33] Re-enabled effects compilation that I disabled erroneously --- Source/RunActivity/PostBuildActions.bat | 2 -- 1 file changed, 2 deletions(-) diff --git a/Source/RunActivity/PostBuildActions.bat b/Source/RunActivity/PostBuildActions.bat index f7bc0c6d87..cc11252309 100644 --- a/Source/RunActivity/PostBuildActions.bat +++ b/Source/RunActivity/PostBuildActions.bat @@ -1,5 +1,3 @@ -EXIT - CD ..\..\ IF EXIST "Program\Content\Web" RMDIR "Program\Content\Web" /S /Q IF NOT EXIST "Program\Content\Web" MKDIR "Program\Content\Web" From 7d62bb23f5b19d71437a8192085dea4d4ed07c79 Mon Sep 17 00:00:00 2001 From: Looky1173 Date: Sun, 20 Aug 2023 19:34:32 +0200 Subject: [PATCH 09/33] Code cleanup & increased map zoom out limit --- .../Viewer3D/Debugging/DebugViewerBetaForm.cs | 111 +----------------- 1 file changed, 2 insertions(+), 109 deletions(-) diff --git a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs index fa713fa130..4f4cd47ac2 100644 --- a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs +++ b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs @@ -166,7 +166,6 @@ private void InitializeData() if (currNode != null) { - if (currNode.TrEndNode) { //buffers.Add(new PointF(currNode.UiD.TileX * 2048 + currNode.UiD.X, currNode.UiD.TileZ * 2048 + currNode.UiD.Z)); @@ -191,8 +190,6 @@ private void InitializeData() dVector B = new dVector(connectedNode.UiD.TileX, connectedNode.UiD.X, connectedNode.UiD.TileZ, connectedNode.UiD.Z); segments.Add(new LineSegment(A, B, /*s.InterlockingTrack.IsOccupied*/ false, null)); } - - } } else if (currNode.TrJunctionNode != null) @@ -215,8 +212,8 @@ private void InitializeData() } var maxsize = maxX - minX > maxY - minY ? maxX - minX : maxY - minY; - // Take up to next 100 - maxsize = (int)(maxsize / 100 + 1) * 100; + // Take up to next 500 + maxsize = (int)(maxsize / 100 + 1) * 500; mapResolutionUpDown.Maximum = (decimal)maxsize; Inited = true; @@ -1120,108 +1117,9 @@ private void DrawZoomTarget(Graphics g) } - - - - - - - - - - - - - private PointF DrawSiding(Graphics g, PointF scaledItem, SidingWidget s) - { - scaledItem.X = (s.Location.X - subX) * xScale; - scaledItem.Y = DetermineSidingLocation(scaledItem.X, mapCanvas.Height - (s.Location.Y - subY) * yScale, s.Name); - if (scaledItem.Y >= 0f) //if we need to draw the siding names - { - g.DrawString(s.Name, sidingFont, sidingBrush, scaledItem); - } - return scaledItem; - } - - private PointF DrawPlatform(Graphics g, PointF scaledItem, PlatformWidget s) - { - scaledItem.X = (s.Location.X - subX) * xScale; - scaledItem.Y = DetermineSidingLocation(scaledItem.X, mapCanvas.Height - (s.Location.Y - subY) * yScale, s.Name); - if (scaledItem.Y >= 0f) //if we need to draw the siding names - { - g.DrawString(s.Name, sidingFont, sidingBrush, scaledItem); - } - return scaledItem; - } - public Vector2[][] alignedTextY; public int[] alignedTextNum; public const int spacing = 12; - private void CleanVerticalCells() - { - if (alignedTextY == null || alignedTextY.Length != IM_Height / spacing) //first time to put text, or the text height has changed - { - alignedTextY = new Vector2[IM_Height / spacing][]; - alignedTextNum = new int[IM_Height / spacing]; - for (var i = 0; i < IM_Height / spacing; i++) - alignedTextY[i] = new Vector2[4]; //each line has at most 4 sidings - } - for (var i = 0; i < IM_Height / spacing; i++) - { - alignedTextNum[i] = 0; - } - } - - private float DetermineSidingLocation(float startX, float wantY, string name) - { - //out of drawing area - if (startX < -64 || startX > IM_Width || wantY < -spacing || wantY > IM_Height) return -1f; - - int position = (int)(wantY / spacing);//the cell of the text it wants in - if (position > alignedTextY.Length) return wantY;//position is larger than the number of cells - var endX = startX + name.Length * trainFont.Size; - int desiredPosition = position; - while (position < alignedTextY.Length && position >= 0) - { - //if the line contains no text yet, put it there - if (alignedTextNum[position] == 0) - { - alignedTextY[position][alignedTextNum[position]].X = startX; - alignedTextY[position][alignedTextNum[position]].Y = endX;//add info for the text (i.e. start and end location) - alignedTextNum[position]++; - return position * spacing; - } - - bool conflict = false; - //check if it is intersect any one in the cell - foreach (Vector2 v in alignedTextY[position]) - { - //check conflict with a text, v.x is the start of the text, v.y is the end of the text - if ((startX > v.X && startX < v.Y) || (endX > v.X && endX < v.Y) || (v.X > startX && v.X < endX) || (v.Y > startX && v.Y < endX)) - { - conflict = true; - break; - } - } - if (conflict == false) //no conflict - { - if (alignedTextNum[position] >= alignedTextY[position].Length) return -1f; - alignedTextY[position][alignedTextNum[position]].X = startX; - alignedTextY[position][alignedTextNum[position]].Y = endX;//add info for the text (i.e. start and end location) - alignedTextNum[position]++; - return position * spacing; - } - position--; - //cannot move up, then try to move it down - if (position - desiredPosition < -1) - { - position = desiredPosition + 2; - } - //could not find any position up or down, just return negative - if (position == desiredPosition) return -1f; - } - return position * spacing; - } const float SignalErrorDistance = 100; const float SignalWarningDistance = 500; @@ -1991,16 +1889,12 @@ private void penaltyCheckbox_CheckedChanged(object sender, EventArgs e) else { MPManager.BroadCast(new MSGMessage("All", "NoOverSpeed", "Penalty for overspeed and passing stop light").ToString()); } } - - private void DispatchViewerBeta_FormClosing(object sender, FormClosingEventArgs e) { // Prevent the window from closing; instead, hide it e.Cancel = true; Viewer.DebugViewerBetaEnabled = false; } - - } #region SignalWidget @@ -2314,5 +2208,4 @@ static public double DistanceSqr(dVector v1, dVector v2) + Math.Pow((v1.TileZ - v2.TileZ) * 2048 + v1.Z - v2.Z, 2); } } - } From 5184abc020fa1898f11ee5c274079fea7b41709b Mon Sep 17 00:00:00 2001 From: Looky1173 Date: Tue, 22 Aug 2023 12:09:15 +0200 Subject: [PATCH 10/33] Cleaned up code + began rewriting the player list --- .../Debugging/DebugViewerBetaForm.Designer.cs | 5 +- .../Viewer3D/Debugging/DebugViewerBetaForm.cs | 336 ++++-------------- .../Viewer3D/Debugging/MapDataProvider.cs | 6 + 3 files changed, 81 insertions(+), 266 deletions(-) diff --git a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs index b8e7ecedc2..55a1d86e14 100644 --- a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs +++ b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs @@ -750,6 +750,7 @@ private void InitializeComponent() this.playersPanel.Padding = new System.Windows.Forms.Padding(10, 0, 10, 10); this.playersPanel.Size = new System.Drawing.Size(200, 237); this.playersPanel.TabIndex = 2; + this.playersPanel.Visible = false; // // groupBox3 // @@ -770,7 +771,6 @@ private void InitializeComponent() this.playersView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.playersView.Enabled = false; this.playersView.HideSelection = false; this.playersView.HoverSelection = true; this.playersView.Items.AddRange(new System.Windows.Forms.ListViewItem[] { @@ -962,6 +962,7 @@ private void InitializeComponent() this.Name = "DispatchViewerBeta"; this.Text = "Dispatcher window"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.DispatchViewerBeta_FormClosing); + this.Resize += new System.EventHandler(this.DispatchViewerBeta_Resize); this.playerRolePanel.ResumeLayout(false); this.playerRolePanel.PerformLayout(); this.tableLayoutPanel1.ResumeLayout(false); @@ -1025,7 +1026,7 @@ private void InitializeComponent() private System.Windows.Forms.Button button5; private System.Windows.Forms.Button centerOnMyTrainButton; private System.Windows.Forms.Button seeTrainInGameButton; - private System.Windows.Forms.Panel playersPanel; + public System.Windows.Forms.Panel playersPanel; private System.Windows.Forms.GroupBox groupBox3; private System.Windows.Forms.ListView playersView; private System.Windows.Forms.ContextMenuStrip playerActionsMenu; diff --git a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs index 4f4cd47ac2..8caf5a330a 100644 --- a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs +++ b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs @@ -32,9 +32,6 @@ public partial class DispatchViewerBeta : Form private Timer UITimer; public Viewer Viewer; - private int IM_Width; - private int IM_Height; - /// /// True when the user is dragging the route view /// @@ -134,12 +131,7 @@ public DispatchViewerBeta(Simulator simulator, Viewer viewer) void InitializeForm() { - if (MPManager.IsMultiPlayer() && MPManager.IsServer()) - { - playerRolePanel.Visible = true; - messagesPanel.Visible = true; - multiplayerSettingsPanel.Visible = true; - } + MapDataProvider.SetControls(); float[] dashPattern = { 4, 2 }; ZoomTargetPen.DashPattern = dashPattern; @@ -235,8 +227,6 @@ private void InitializeData() /// public void InitializeImage() { - /*mapCanvas.Width = IM_Width; - mapCanvas.Height = IM_Height;*/ if (mapCanvas.Image != null) { @@ -244,57 +234,83 @@ public void InitializeImage() } mapCanvas.Image = new Bitmap(mapCanvas.Width, mapCanvas.Height); - /*imageList1 = new ImageList(); - playersView.View = View.LargeIcon; - imageList1.ImageSize = new Size(64, 64); - playersView.LargeImageList = imageList1;*/ } #endregion - #region Draw - public bool firstShow = true; - public bool followTrain; - public float subX, subY; - public float oldWidth; - public float oldHeight; + #region playersList + List PlayersList = new List(); - //determine locations of buttons and boxes - void DetermineLocations() + public void AddPlayer(string name) { - IM_Width = mapCanvas.Width; - IM_Height = mapCanvas.Height; + PlayersList.Add(name); + } - if (mapCanvas.Image != null) + // TODO: Colour code players based on their roles + // TODO: FUNCTION NOT WORKING CORRECTLY + public void CheckPlayers() + { + if (!MPManager.IsMultiPlayer() || MPManager.OnlineTrains == null || MPManager.OnlineTrains.Players == null) return; + var players = MPManager.OnlineTrains.Players; + var username = MPManager.GetUserName(); + players = players.Concat(MPManager.Instance().lostPlayer).ToDictionary(x => x.Key, x => x.Value); + + bool PlayersListChanged = false; + + // Add myself + if (!PlayersList.Contains(username)) { - mapCanvas.Image.Dispose(); + AddPlayer(username); + PlayersListChanged = true; } - mapCanvas.Image = new Bitmap(mapCanvas.Width, mapCanvas.Height); - /*if (Height < 600 || Width < 800) return; - if (oldHeight != Height || oldWidth != label1.Left)//use the label "Res" as anchor point to determine the picture size - { - oldWidth = label1.Left; oldHeight = Height; - IM_Width = label1.Left - 20; - IM_Height = Height - mapCanvas.Top; - mapCanvas.Width = IM_Width; - mapCanvas.Height = Height - mapCanvas.Top - 40; - if (mapCanvas.Image != null) - { - mapCanvas.Image.Dispose(); - } + foreach (var p in players) + { + if (PlayersList.Contains(p.Key)) continue; + AddPlayer(p.Key); + PlayersListChanged = true; + } - mapCanvas.Image = new Bitmap(mapCanvas.Width, mapCanvas.Height); + // Remove players from `PlayersList` if they are no longer on the server + foreach (var p in PlayersList.ToList()) // https://stackoverflow.com/a/604843/ + { + if (players.ContainsKey(p) || p == username) continue; + PlayersList.Remove(p); + PlayersListChanged = true; + } - if (btnAssist.Left - 10 < composeMSG.Right) + // If `PlayersList` hasn't changed since we've last checked, we should not clear/update + // `playersView` to avoid flickering + if (!PlayersListChanged) return; + + playersView.Items.Clear(); + Console.Beep(); + foreach (var p in PlayersList) + { + if (p == username) + playersView.Items.Add(p); + + if (MPManager.Instance().aiderList.Contains(p)) { - var size = composeMSG.Width; - composeMSG.Left = msgAll.Left = msgSelected.Left = reply2Selected.Left = btnAssist.Left - 10 - size; - MSG.Width = messages.Width = composeMSG.Left - 20; - MSG.Width = messages.Width = composeMSG.Left - 20; + playersView.Items.Add(p + " (Helper)"); } - firstShow = true; - }*/ + else if (MPManager.Instance().lostPlayer.ContainsKey(p)) + { + playersView.Items.Add(p + " (Disconnected)"); + } + else + { + playersView.Items.Add(p); + } + } } + #endregion + + #region Draw + public bool firstShow = true; + public bool followTrain; + public float subX, subY; + public float oldWidth; + public float oldHeight; /// /// Regenerates the 2D view. At the moment, examines the track network @@ -308,8 +324,7 @@ public void GenerateView(bool dragging = false) if (showTimeCheckbox.Checked) MapDataProvider.ShowSimulationTime(); - if (mapCanvas.Image == null) InitializeImage(); - DetermineLocations(); + if (mapCanvas.Image == null || firstShow) InitializeImage(); /*if (firstShow) { @@ -365,6 +380,8 @@ public void GenerateView(bool dragging = false) } } + CheckPlayers(); + using (Graphics g = Graphics.FromImage(mapCanvas.Image)) { // Optional anti-aliasing @@ -428,220 +445,6 @@ public void GenerateView(bool dragging = false) } DrawZoomTarget(g); - - /* - foreach (var line in segments) - { - - scaledA.X = (line.A.TileX * 2048 - subX + (float)line.A.X) * xScale; scaledA.Y = mapCanvas.Height - (line.A.TileZ * 2048 - subY + (float)line.A.Z) * yScale; - scaledB.X = (line.B.TileX * 2048 - subX + (float)line.B.X) * xScale; scaledB.Y = mapCanvas.Height - (line.B.TileZ * 2048 - subY + (float)line.B.Z) * yScale; - - if ((scaledA.X < 0 && scaledB.X < 0) || (scaledA.X > mapCanvas.Width && scaledB.X > IM_Width) || (scaledA.Y > IM_Height && scaledB.Y > IM_Height) || (scaledA.Y < 0 && scaledB.Y < 0)) - continue; - - if (line.isCurved == true) - { - scaledC.X = ((float)line.C.X - subX) * xScale; scaledC.Y = mapCanvas.Height - ((float)line.C.Z - subY) * yScale; - points[0] = scaledA; points[1] = scaledC; points[2] = scaledB; - g.DrawCurve(p, points); - } - else - { - g.DrawLine(p, scaledA, scaledB); - } - } - - switchItemsDrawn.Clear(); - signalItemsDrawn.Clear(); - float x, y; - PointF scaledItem = new PointF(0f, 0f); - var width = 6f * p.Width; if (width > 15) width = 15;//not to make it too large - for (var i = 0; i < switches.Count; i++) - { - SwitchWidget sw = switches[i]; - - x = (sw.Location.X - subX) * xScale; y = mapCanvas.Height - (sw.Location.Y - subY) * yScale; - - if (x < 0 || x > IM_Width || y > IM_Height || y < 0) continue; - - scaledItem.X = x; scaledItem.Y = y; - - - if (sw.Item.TrJunctionNode.SelectedRoute == sw.main) g.FillEllipse(Brushes.Black, GetRect(scaledItem, width)); - else g.FillEllipse(Brushes.Gray, GetRect(scaledItem, width)); - - sw.Location2D.X = scaledItem.X; sw.Location2D.Y = scaledItem.Y; - switchItemsDrawn.Add(sw); - } - - foreach (var s in signals) - { - if (float.IsNaN(s.Location.X) || float.IsNaN(s.Location.Y)) continue; - x = (s.Location.X - subX) * xScale; y = mapCanvas.Height - (s.Location.Y - subY) * yScale; - if (x < 0 || x > IM_Width || y > IM_Height || y < 0) continue; - scaledItem.X = x; scaledItem.Y = y; - s.Location2D.X = scaledItem.X; s.Location2D.Y = scaledItem.Y; - if (s.Signal.isSignalNormal())//only show nor - { - var color = Brushes.Green; - var pen = greenPen; - if (s.IsProceed == 0) - { - } - else if (s.IsProceed == 1) - { - color = Brushes.Orange; - pen = orangePen; - } - else - { - color = Brushes.Red; - pen = redPen; - } - g.FillEllipse(color, GetRect(scaledItem, width)); - signalItemsDrawn.Add(s); - if (s.hasDir) - { - scaledB.X = (s.Dir.X - subX) * xScale; scaledB.Y = mapCanvas.Height - (s.Dir.Y - subY) * yScale; - g.DrawLine(pen, scaledItem, scaledB); - } - } - } - */ - /*if (true) - { - CleanVerticalCells();//clean the drawing area for text of sidings and platforms - foreach (var sw in sidings) - scaledItem = DrawSiding(g, scaledItem, sw); - foreach (var pw in platforms) - scaledItem = DrawPlatform(g, scaledItem, pw); - - var margin = 30 * xScale;//margins to determine if we want to draw a train - var margin2 = 5000 * xScale; - - //variable for drawing train path - var mDist = 5000f; var pDist = 50; //segment length when draw path - - selectedTrainList.Clear(); - foreach (var t in simulator.Trains) selectedTrainList.Add(t); - - var redTrain = selectedTrainList.Count; - - //choosen trains will be drawn later using blue, so it will overlap on the red lines - var chosen = playersView.SelectedItems; - if (chosen.Count > 0) - { - for (var i = 0; i < chosen.Count; i++) - { - var name = chosen[i].Text.Split(' ')[0].Trim(); //filter out (H) in the text - var train = MPManager.OnlineTrains.findTrain(name); - if (train != null) { selectedTrainList.Remove(train); selectedTrainList.Add(train); redTrain--; } - //if selected include myself, will show it as blue - if (MPManager.GetUserName() == name && Program.Simulator.PlayerLocomotive != null) - { - selectedTrainList.Remove(Program.Simulator.PlayerLocomotive.Train); selectedTrainList.Add(Program.Simulator.PlayerLocomotive.Train); - redTrain--; - } - - } - } - - //trains selected in the avatar view list will be drawn in blue, others will be drawn in red - pathPen.Color = Color.Red; - var drawRed = 0; - int ValidTrain = selectedTrainList.Count(); - //add trains quit into the end, will draw them in gray - var quitTrains = MPManager.Instance().lostPlayer.Values - .Select((OnlinePlayer lost) => lost?.Train) - .Where((Train t) => t != null) - .Where((Train t) => !selectedTrainList.Contains(t)); - selectedTrainList.AddRange(quitTrains); - foreach (Train t in selectedTrainList) - { - drawRed++;//how many red has been drawn - if (drawRed > redTrain) pathPen.Color = Color.Blue; //more than the red should be drawn, thus draw in blue - - name = ""; - TrainCar firstCar = null; - if (t.LeadLocomotive != null) - { - worldPos = t.LeadLocomotive.WorldPosition; - name = t.GetTrainName(t.LeadLocomotive.CarID); - firstCar = t.LeadLocomotive; - } - else if (t.Cars != null && t.Cars.Count > 0) - { - worldPos = t.Cars[0].WorldPosition; - name = t.GetTrainName(t.Cars[0].CarID); - if (t.TrainType == Train.TRAINTYPE.AI) - name = t.Number.ToString() + ":" + t.Name; - firstCar = t.Cars[0]; - } - else continue; - - if (xScale < 0.3 || t.FrontTDBTraveller == null || t.RearTDBTraveller == null) - { - worldPos = firstCar.WorldPosition; - scaledItem.X = (worldPos.TileX * 2048 - subX + worldPos.Location.X) * xScale; - scaledItem.Y = mapCanvas.Height - (worldPos.TileZ * 2048 - subY + worldPos.Location.Z) * yScale; - if (scaledItem.X < -margin2 || scaledItem.X > IM_Width + margin2 || scaledItem.Y > IM_Height + margin2 || scaledItem.Y < -margin2) continue; - if (drawRed > ValidTrain) g.FillRectangle(Brushes.Gray, GetRect(scaledItem, 15f)); - else - { - if (t == PickedTrain) g.FillRectangle(Brushes.Red, GetRect(scaledItem, 15f)); - else g.FillRectangle(Brushes.DarkGreen, GetRect(scaledItem, 15f)); - scaledItem.Y -= 25; - DrawTrainPath(t, subX, subY, pathPen, g, scaledA, scaledB, pDist, mDist); - } - g.DrawString(name, trainFont, trainBrush, scaledItem); - continue; - } - var loc = t.FrontTDBTraveller.WorldLocation; - x = (loc.TileX * 2048 + loc.Location.X - subX) * xScale; y = mapCanvas.Height - (loc.TileZ * 2048 + loc.Location.Z - subY) * yScale; - if (x < -margin2 || x > IM_Width + margin2 || y > IM_Height + margin2 || y < -margin2) continue; - - //train quit will not draw path, others will draw it - if (drawRed <= ValidTrain) DrawTrainPath(t, subX, subY, pathPen, g, scaledA, scaledB, pDist, mDist); - - trainPen.Color = Color.DarkGreen; - foreach (var car in t.Cars) - { - Traveller t1 = new Traveller(t.RearTDBTraveller); - worldPos = car.WorldPosition; - var dist = t1.DistanceTo(worldPos.WorldLocation.TileX, worldPos.WorldLocation.TileZ, worldPos.WorldLocation.Location.X, worldPos.WorldLocation.Location.Y, worldPos.WorldLocation.Location.Z); - if (dist > 0) - { - t1.Move(dist - 1 + car.CarLengthM / 2); - x = (t1.TileX * 2048 + t1.Location.X - subX) * xScale; y = mapCanvas.Height - (t1.TileZ * 2048 + t1.Location.Z - subY) * yScale; - //x = (worldPos.TileX * 2048 + worldPos.Location.X - minX - ViewWindow.X) * xScale; y = pictureBox1.Height - (worldPos.TileZ * 2048 + worldPos.Location.Z - minY - ViewWindow.Y) * yScale; - if (x < -margin || x > IM_Width + margin || y > IM_Height + margin || y < -margin) continue; - - scaledItem.X = x; scaledItem.Y = y; - - t1.Move(-car.CarLengthM); - x = (t1.TileX * 2048 + t1.Location.X - subX) * xScale; y = mapCanvas.Height - (t1.TileZ * 2048 + t1.Location.Z - subY) * yScale; - if (x < -margin || x > IM_Width + margin || y > IM_Height + margin || y < -margin) continue; - - scaledA.X = x; scaledA.Y = y; - - //if the train has quit, will draw in gray, if the train is selected by left click of the mouse, will draw it in red - if (drawRed > ValidTrain) trainPen.Color = Color.Gray; - else if (t == PickedTrain) trainPen.Color = Color.Red; - g.DrawLine(trainPen, scaledA, scaledItem); - } - } - worldPos = firstCar.WorldPosition; - scaledItem.X = (worldPos.TileX * 2048 - subX + worldPos.Location.X) * xScale; - scaledItem.Y = -25 + mapCanvas.Height - (worldPos.TileZ * 2048 - subY + worldPos.Location.Z) * yScale; - - g.DrawString(name, trainFont, trainBrush, scaledItem); - - } - if (switchPickedItemHandled) - switchPickedItem = null; - if (signalPickedItemHandled) - signalPickedItem = null; - }*/ } mapCanvas.Invalidate(); // Triggers a re-paint @@ -1889,6 +1692,11 @@ private void penaltyCheckbox_CheckedChanged(object sender, EventArgs e) else { MPManager.BroadCast(new MSGMessage("All", "NoOverSpeed", "Penalty for overspeed and passing stop light").ToString()); } } + private void DispatchViewerBeta_Resize(object sender, EventArgs e) + { + InitializeImage(); + } + private void DispatchViewerBeta_FormClosing(object sender, FormClosingEventArgs e) { // Prevent the window from closing; instead, hide it diff --git a/Source/RunActivity/Viewer3D/Debugging/MapDataProvider.cs b/Source/RunActivity/Viewer3D/Debugging/MapDataProvider.cs index c0b2b90bc5..2840330d9b 100644 --- a/Source/RunActivity/Viewer3D/Debugging/MapDataProvider.cs +++ b/Source/RunActivity/Viewer3D/Debugging/MapDataProvider.cs @@ -49,11 +49,17 @@ private void UpdateControlVisibility() { var isMultiPlayer = MPManager.IsMultiPlayer(); + if (isMultiPlayer) + { + F.playersPanel.Visible = true; + } + if (isMultiPlayer && MPManager.IsServer()) { F.playerRolePanel.Visible = true; F.messagesPanel.Visible = true; F.multiplayerSettingsPanel.Visible = true; + //F.playersPanel.Visible = true; } } From 715841eca730073553990a291240fb33513d6f0f Mon Sep 17 00:00:00 2001 From: Looky1173 Date: Tue, 22 Aug 2023 12:16:45 +0200 Subject: [PATCH 11/33] Renamed the Dispatcher window to "Map window" --- .../Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs index 55a1d86e14..60466c7ad0 100644 --- a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs +++ b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs @@ -960,7 +960,7 @@ private void InitializeComponent() this.Controls.Add(this.tableLayoutPanel1); this.MinimumSize = new System.Drawing.Size(600, 400); this.Name = "DispatchViewerBeta"; - this.Text = "Dispatcher window"; + this.Text = "Map window"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.DispatchViewerBeta_FormClosing); this.Resize += new System.EventHandler(this.DispatchViewerBeta_Resize); this.playerRolePanel.ResumeLayout(false); From 54b7a7b28bdda1e5ea236e8eaaa34ab146bab96f Mon Sep 17 00:00:00 2001 From: Looky1173 Date: Tue, 22 Aug 2023 12:31:37 +0200 Subject: [PATCH 12/33] Coloured switch control menu --- .../Debugging/DebugViewerBetaForm.Designer.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs index 60466c7ad0..ce1c678137 100644 --- a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs +++ b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs @@ -859,7 +859,7 @@ private void InitializeComponent() this.mainRouteToolStripMenuItem, this.sideRouteToolStripMenuItem}); this.setSwitchMenu.Name = "contextMenuStrip1"; - this.setSwitchMenu.Size = new System.Drawing.Size(157, 70); + this.setSwitchMenu.Size = new System.Drawing.Size(181, 92); this.setSwitchMenu.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.setSwitchMenu_ItemClicked); // // setSwitchToToolStripMenuItem @@ -867,20 +867,23 @@ private void InitializeComponent() this.setSwitchToToolStripMenuItem.Enabled = false; this.setSwitchToToolStripMenuItem.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold); this.setSwitchToToolStripMenuItem.Name = "setSwitchToToolStripMenuItem"; - this.setSwitchToToolStripMenuItem.Size = new System.Drawing.Size(156, 22); + this.setSwitchToToolStripMenuItem.Size = new System.Drawing.Size(180, 22); this.setSwitchToToolStripMenuItem.Text = "Set switch to..."; // // mainRouteToolStripMenuItem // + this.mainRouteToolStripMenuItem.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(93)))), ((int)(((byte)(64)))), ((int)(((byte)(55))))); + this.mainRouteToolStripMenuItem.ForeColor = System.Drawing.Color.White; this.mainRouteToolStripMenuItem.Name = "mainRouteToolStripMenuItem"; - this.mainRouteToolStripMenuItem.Size = new System.Drawing.Size(156, 22); + this.mainRouteToolStripMenuItem.Size = new System.Drawing.Size(180, 22); this.mainRouteToolStripMenuItem.Tag = "mainRoute"; this.mainRouteToolStripMenuItem.Text = "Main route"; // // sideRouteToolStripMenuItem // + this.sideRouteToolStripMenuItem.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(161)))), ((int)(((byte)(136)))), ((int)(((byte)(127))))); this.sideRouteToolStripMenuItem.Name = "sideRouteToolStripMenuItem"; - this.sideRouteToolStripMenuItem.Size = new System.Drawing.Size(156, 22); + this.sideRouteToolStripMenuItem.Size = new System.Drawing.Size(180, 22); this.sideRouteToolStripMenuItem.Tag = "sideRoute"; this.sideRouteToolStripMenuItem.Text = "Side route"; // From bfba8f08284279bcf6a53018f0fddf5bba5bd13c Mon Sep 17 00:00:00 2001 From: Looky1173 Date: Tue, 22 Aug 2023 15:33:09 +0200 Subject: [PATCH 13/33] Initial theme switching --- .../Debugging/DebugViewerBetaForm.Designer.cs | 11 +-- .../Viewer3D/Debugging/DebugViewerBetaForm.cs | 76 ++++++++++++++++--- .../Viewer3D/Debugging/MapThemeProvider.cs | 47 ++++++++++++ 3 files changed, 117 insertions(+), 17 deletions(-) create mode 100644 Source/RunActivity/Viewer3D/Debugging/MapThemeProvider.cs diff --git a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs index ce1c678137..ac55b15547 100644 --- a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs +++ b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs @@ -327,6 +327,7 @@ private void InitializeComponent() this.mapCustomizationButton.Name = "mapCustomizationButton"; this.mapCustomizationButton.Size = new System.Drawing.Size(120, 23); this.mapCustomizationButton.TabIndex = 0; + this.mapCustomizationButton.Tag = "mapCustomization"; this.mapCustomizationButton.Text = "Map customization"; this.mapCustomizationButton.UseVisualStyleBackColor = true; this.mapCustomizationButton.Click += new System.EventHandler(this.mapCustomizationButton_Click); @@ -470,13 +471,13 @@ private void InitializeComponent() // rotateThemesButton // this.rotateThemesButton.AutoSize = true; - this.rotateThemesButton.Enabled = false; this.rotateThemesButton.Location = new System.Drawing.Point(10, 52); this.rotateThemesButton.Name = "rotateThemesButton"; this.rotateThemesButton.Size = new System.Drawing.Size(167, 23); this.rotateThemesButton.TabIndex = 8; this.rotateThemesButton.Text = "Rotate between themes"; this.rotateThemesButton.UseVisualStyleBackColor = true; + this.rotateThemesButton.Click += new System.EventHandler(this.rotateThemesButton_Click); // // showTimeCheckbox // @@ -859,7 +860,7 @@ private void InitializeComponent() this.mainRouteToolStripMenuItem, this.sideRouteToolStripMenuItem}); this.setSwitchMenu.Name = "contextMenuStrip1"; - this.setSwitchMenu.Size = new System.Drawing.Size(181, 92); + this.setSwitchMenu.Size = new System.Drawing.Size(157, 70); this.setSwitchMenu.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.setSwitchMenu_ItemClicked); // // setSwitchToToolStripMenuItem @@ -867,7 +868,7 @@ private void InitializeComponent() this.setSwitchToToolStripMenuItem.Enabled = false; this.setSwitchToToolStripMenuItem.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold); this.setSwitchToToolStripMenuItem.Name = "setSwitchToToolStripMenuItem"; - this.setSwitchToToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.setSwitchToToolStripMenuItem.Size = new System.Drawing.Size(156, 22); this.setSwitchToToolStripMenuItem.Text = "Set switch to..."; // // mainRouteToolStripMenuItem @@ -875,7 +876,7 @@ private void InitializeComponent() this.mainRouteToolStripMenuItem.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(93)))), ((int)(((byte)(64)))), ((int)(((byte)(55))))); this.mainRouteToolStripMenuItem.ForeColor = System.Drawing.Color.White; this.mainRouteToolStripMenuItem.Name = "mainRouteToolStripMenuItem"; - this.mainRouteToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.mainRouteToolStripMenuItem.Size = new System.Drawing.Size(156, 22); this.mainRouteToolStripMenuItem.Tag = "mainRoute"; this.mainRouteToolStripMenuItem.Text = "Main route"; // @@ -883,7 +884,7 @@ private void InitializeComponent() // this.sideRouteToolStripMenuItem.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(161)))), ((int)(((byte)(136)))), ((int)(((byte)(127))))); this.sideRouteToolStripMenuItem.Name = "sideRouteToolStripMenuItem"; - this.sideRouteToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.sideRouteToolStripMenuItem.Size = new System.Drawing.Size(156, 22); this.sideRouteToolStripMenuItem.Tag = "sideRoute"; this.sideRouteToolStripMenuItem.Text = "Side route"; // diff --git a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs index 8caf5a330a..1928a09fc1 100644 --- a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs +++ b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs @@ -25,6 +25,8 @@ public partial class DispatchViewerBeta : Form /// public readonly Simulator simulator; private MapDataProvider MapDataProvider; + private MapThemeProvider MapThemeProvider; + private ThemeStyle Theme; /// /// Used to periodically check if we should shift the view when the /// user is holding down a "shift view" button. @@ -58,6 +60,7 @@ public partial class DispatchViewerBeta : Form /// contains the last position of the mouse /// private System.Drawing.Point LastCursorPosition = new System.Drawing.Point(); + public Pen redPen = new Pen(Color.FromArgb(244, 67, 54)); public Pen greenPen = new Pen(Color.FromArgb(76, 175, 80)); public Pen orangePen = new Pen(Color.FromArgb(255, 235, 59)); @@ -67,6 +70,18 @@ public partial class DispatchViewerBeta : Form public Pen PlatformPen = new Pen(Color.Blue); public Pen TrackPen = new Pen(Color.FromArgb(46, 64, 83)); public Pen ZoomTargetPen = new Pen(Color.FromArgb(46, 64, 83)); + + public Font trainFont = new Font("Segoe UI Semibold", 10, FontStyle.Bold); + public Font sidingFont = new Font("Segoe UI Semibold", 10, FontStyle.Regular); + public Font PlatformFont = new Font("Segoe UI Semibold", 10, FontStyle.Regular); + public Font SignalFont = new Font("Segoe UI Semibold", 10, FontStyle.Regular); + private SolidBrush trainBrush = new SolidBrush(Color.Red); + public SolidBrush sidingBrush = new SolidBrush(Color.Blue); + public SolidBrush PlatformBrush = new SolidBrush(Color.DarkBlue); + public SolidBrush SignalBrush = new SolidBrush(Color.DarkRed); + public SolidBrush InactiveTrainBrush = new SolidBrush(Color.DarkRed); + private Color MapCanvasColor = Color.White; + // the train selected by leftclicking the mouse public Train PickedTrain; /// @@ -81,16 +96,6 @@ public partial class DispatchViewerBeta : Form public float maxY = float.MinValue; public int RedrawCount; - public Font trainFont = new Font("Segoe UI Semibold", 10, FontStyle.Bold); - public Font sidingFont = new Font("Segoe UI Semibold", 10, FontStyle.Regular); - public Font PlatformFont = new Font("Segoe UI Semibold", 10, FontStyle.Regular); - public Font SignalFont = new Font("Segoe UI Semibold", 10, FontStyle.Regular); - private SolidBrush trainBrush = new SolidBrush(Color.Red); - public SolidBrush sidingBrush = new SolidBrush(Color.Blue); - public SolidBrush PlatformBrush = new SolidBrush(Color.DarkBlue); - public SolidBrush SignalBrush = new SolidBrush(Color.DarkRed); - public SolidBrush InactiveTrainBrush = new SolidBrush(Color.DarkRed); - private double lastUpdateTime; private bool MapCustomizationVisible = false; @@ -106,6 +111,7 @@ public DispatchViewerBeta(Simulator simulator, Viewer viewer) this.simulator = simulator; Viewer = viewer; MapDataProvider = new MapDataProvider(this); + MapThemeProvider = new MapThemeProvider(); nodes = simulator.TDB.TrackDB.TrackNodes; InitializeForm(); @@ -132,6 +138,8 @@ public DispatchViewerBeta(Simulator simulator, Viewer viewer) void InitializeForm() { MapDataProvider.SetControls(); + MapThemeProvider.InitializeThemes(); + Theme = MapThemeProvider.LightTheme; float[] dashPattern = { 4, 2 }; ZoomTargetPen.DashPattern = dashPattern; @@ -281,7 +289,7 @@ public void CheckPlayers() // If `PlayersList` hasn't changed since we've last checked, we should not clear/update // `playersView` to avoid flickering if (!PlayersListChanged) return; - + playersView.Items.Clear(); Console.Beep(); foreach (var p in PlayersList) @@ -389,7 +397,7 @@ public void GenerateView(bool dragging = false) g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality; subX = minX + ViewWindow.X; subY = minY + ViewWindow.Y; - g.Clear(Color.White); + g.Clear(MapCanvasColor); xScale = mapCanvas.Width / ViewWindow.Width; yScale = mapCanvas.Height / ViewWindow.Height; @@ -1137,6 +1145,34 @@ public void DrawTrainPath(Train train, float subX, float subY, Pen pathPen, Grap } #endregion + #region themes + private void ApplyThemeRecursively(System.Windows.Forms.Control parent) + { + foreach (System.Windows.Forms.Control c in parent.Controls) + { + if (c is Button && c?.Tag?.ToString() != "mapCustomization") + { + Button b = (Button)c; + b.BackColor = Theme.BackColor; + b.ForeColor = Theme.ForeColor; + b.FlatStyle = Theme.FlatStyle; + } + else if (c is GroupBox || c is Panel) + { + c.BackColor = Theme.PanelBackColor; + c.ForeColor = Theme.ForeColor; + } + else + { + c.BackColor = Theme.PanelBackColor; + c.ForeColor = Theme.ForeColor; + } + + ApplyThemeRecursively(c); + } + } + #endregion + /// /// Generates a rectangle representing a dot being drawn. /// @@ -1697,6 +1733,22 @@ private void DispatchViewerBeta_Resize(object sender, EventArgs e) InitializeImage(); } + private void rotateThemesButton_Click(object sender, EventArgs e) + { + if (Theme == MapThemeProvider.LightTheme) + { + Theme = MapThemeProvider.DarkTheme; + } + else + { + Theme = MapThemeProvider.LightTheme; + } + + ApplyThemeRecursively(this); + MapCanvasColor = Theme.MapCanvasColor; + TrackPen.Color = Theme.TrackColor; + } + private void DispatchViewerBeta_FormClosing(object sender, FormClosingEventArgs e) { // Prevent the window from closing; instead, hide it diff --git a/Source/RunActivity/Viewer3D/Debugging/MapThemeProvider.cs b/Source/RunActivity/Viewer3D/Debugging/MapThemeProvider.cs new file mode 100644 index 0000000000..ed07106670 --- /dev/null +++ b/Source/RunActivity/Viewer3D/Debugging/MapThemeProvider.cs @@ -0,0 +1,47 @@ +using System.Drawing; +using System.Windows.Forms; +using Orts.Formats.Msts; + +namespace Orts.Viewer3D.Debugging +{ + public class MapThemeProvider + { + public ThemeStyle LightTheme; + public ThemeStyle DarkTheme; + + public void InitializeThemes() + { + LightTheme = new ThemeStyle + { + BackColor = Color.Transparent, + ForeColor = SystemColors.ControlText, + PanelBackColor = SystemColors.Control, + FlatStyle = FlatStyle.Standard, + MapCanvasColor = Color.White, + TrackColor = Color.FromArgb(46, 64, 83), + }; + + DarkTheme = new ThemeStyle + { + BackColor = Color.FromArgb(44, 62, 80), + ForeColor = Color.FromArgb(247, 249, 249), + PanelBackColor = Color.FromArgb(28, 40, 51), + FlatStyle = FlatStyle.Flat, + MapCanvasColor = Color.FromArgb(44, 62, 80), + TrackColor = Color.FromArgb(234, 236, 238), + }; + } + } + + public class ThemeStyle + { + public Color BackColor; + public Color ForeColor; + public Color PanelBackColor; + public FlatStyle FlatStyle; + public Color MapCanvasColor; + public Color TrackColor; + } +} + + From d00c6d9beab34140aecc9d771dcfb519dd3a096b Mon Sep 17 00:00:00 2001 From: Looky1173 Date: Wed, 23 Aug 2023 10:23:12 +0200 Subject: [PATCH 14/33] Reimplemented daylight offset as debug commands --- Source/ORTS.Common/Input/UserCommand.cs | 2 ++ Source/ORTS.Settings/InputSettings.cs | 2 ++ Source/Orts.Simulation/Simulation/Weather.cs | 3 +++ Source/RunActivity/Viewer3D/SkyInterpolation.cs | 2 +- Source/RunActivity/Viewer3D/Weather.cs | 11 ++++++++++- 5 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Source/ORTS.Common/Input/UserCommand.cs b/Source/ORTS.Common/Input/UserCommand.cs index ba7ec3ac3c..150f68f577 100644 --- a/Source/ORTS.Common/Input/UserCommand.cs +++ b/Source/ORTS.Common/Input/UserCommand.cs @@ -61,6 +61,8 @@ public enum UserCommand [GetString("Debug Precipitation Decrease")] DebugPrecipitationDecrease, [GetString("Debug Precipitation Liquidity Increase")] DebugPrecipitationLiquidityIncrease, [GetString("Debug Precipitation Liquidity Decrease")] DebugPrecipitationLiquidityDecrease, + [GetString("Debug Daylight Offset Increase")] DebugDaylightOffsetIncrease, + [GetString("Debug Daylight Offset Decrease")] DebugDaylightOffsetDecrease, [GetString("Debug Weather Change")] DebugWeatherChange, [GetString("Debug Clock Forwards")] DebugClockForwards, [GetString("Debug Clock Backwards")] DebugClockBackwards, diff --git a/Source/ORTS.Settings/InputSettings.cs b/Source/ORTS.Settings/InputSettings.cs index 5202db55c9..3d72189b24 100644 --- a/Source/ORTS.Settings/InputSettings.cs +++ b/Source/ORTS.Settings/InputSettings.cs @@ -474,6 +474,8 @@ static void InitializeCommands(UserCommandInput[] Commands) Commands[(int)UserCommand.DebugLockShadows] = new UserCommandKeyInput(0x1F, KeyModifiers.Control | KeyModifiers.Alt); Commands[(int)UserCommand.DebugLogger] = new UserCommandKeyInput(0x58); Commands[(int)UserCommand.DebugLogRenderFrame] = new UserCommandKeyInput(0x58, KeyModifiers.Alt); + Commands[(int)UserCommand.DebugDaylightOffsetDecrease] = new UserCommandKeyInput(0x0C, KeyModifiers.Shift | KeyModifiers.Alt); + Commands[(int)UserCommand.DebugDaylightOffsetIncrease] = new UserCommandKeyInput(0x0D, KeyModifiers.Shift | KeyModifiers.Alt); Commands[(int)UserCommand.DebugOvercastDecrease] = new UserCommandKeyInput(0x0C, KeyModifiers.Control); Commands[(int)UserCommand.DebugOvercastIncrease] = new UserCommandKeyInput(0x0D, KeyModifiers.Control); Commands[(int)UserCommand.DebugPhysicsForm] = new UserCommandKeyInput(0x3D, KeyModifiers.Alt); diff --git a/Source/Orts.Simulation/Simulation/Weather.cs b/Source/Orts.Simulation/Simulation/Weather.cs index 2d6fff3cbe..543a232977 100644 --- a/Source/Orts.Simulation/Simulation/Weather.cs +++ b/Source/Orts.Simulation/Simulation/Weather.cs @@ -44,6 +44,9 @@ public class Weather // Fog/visibility distance. Ranges from 10m (can't see anything), 5km (medium), 20km (clear) to 100km (clear arctic). public float FogDistance; + + // Daylight offset (-12h to +12h) + public int DaylightOffset = 0; // Precipitation liquidity; =1 for rain, =0 for snow; intermediate values possible with dynamic weather; public float PrecipitationLiquidity; diff --git a/Source/RunActivity/Viewer3D/SkyInterpolation.cs b/Source/RunActivity/Viewer3D/SkyInterpolation.cs index 7bbf187a23..a247eb27c3 100644 --- a/Source/RunActivity/Viewer3D/SkyInterpolation.cs +++ b/Source/RunActivity/Viewer3D/SkyInterpolation.cs @@ -29,7 +29,7 @@ public class SkyInterpolation public int Step1; public int Step2; - static float DaylightOffsetS => (Program.DebugViewer == null) ? 0f : (float)Program.DebugViewer.DaylightOffsetHrs * 60 * 60; + static float DaylightOffsetS => (float)Program.Simulator.Weather.DaylightOffset * 60 * 60; public void SetSunAndMoonDirection(ref Vector3 solarDirection, ref Vector3 lunarDirection, Vector3[] solarPosArray, Vector3[] lunarPosArray, double clockTime) { diff --git a/Source/RunActivity/Viewer3D/Weather.cs b/Source/RunActivity/Viewer3D/Weather.cs index f74273e204..bd5660ce0e 100644 --- a/Source/RunActivity/Viewer3D/Weather.cs +++ b/Source/RunActivity/Viewer3D/Weather.cs @@ -1,4 +1,4 @@ -// COPYRIGHT 2010, 2011, 2014 by the Open Rails project. +// COPYRIGHT 2010, 2011, 2014 by the Open Rails project. // // This file is part of Open Rails. // @@ -487,6 +487,15 @@ public virtual void Update(ElapsedTime elapsedTime) weatherChangeOn = false; } + // Daylight offset is useful for debugging night running timetables; it ranges from -12h to +12h + if (UserInput.IsPressed(UserCommand.DebugDaylightOffsetIncrease) && Weather.DaylightOffset < 12) { + Weather.DaylightOffset += 1; + } + if (UserInput.IsPressed(UserCommand.DebugDaylightOffsetDecrease) && Weather.DaylightOffset > -12) + { + Weather.DaylightOffset -= 1; + } + UpdateWind(elapsedTime); } From cc5b9d38159c812326674a516812daf6cc3ffcec Mon Sep 17 00:00:00 2001 From: Looky1173 Date: Thu, 24 Aug 2023 17:13:05 +0200 Subject: [PATCH 15/33] Fixed http://www.elvastower.com/forums/index.php?/topic/37165-reworking-the-dispatcher-window/page__view__findpost__p__299986 --- .../Viewer3D/Debugging/DebugViewerBetaForm.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs index 1928a09fc1..b0463cbd4f 100644 --- a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs +++ b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs @@ -235,12 +235,11 @@ private void InitializeData() /// public void InitializeImage() { + // When minimizing the window, `mapCanvas.Width` gets reported as 0 + // This crashes `System.Drawing.dll`, hence the check below + if (mapCanvas.Width <= 0 || mapCanvas.Height <= 0) return; - if (mapCanvas.Image != null) - { - mapCanvas.Image.Dispose(); - } - + mapCanvas.Image?.Dispose(); mapCanvas.Image = new Bitmap(mapCanvas.Width, mapCanvas.Height); } #endregion @@ -1747,6 +1746,7 @@ private void rotateThemesButton_Click(object sender, EventArgs e) ApplyThemeRecursively(this); MapCanvasColor = Theme.MapCanvasColor; TrackPen.Color = Theme.TrackColor; + InitializeImage(); } private void DispatchViewerBeta_FormClosing(object sender, FormClosingEventArgs e) From 705126ea21959b4741b612f5ee1440737bc54663 Mon Sep 17 00:00:00 2001 From: Looky1173 Date: Thu, 24 Aug 2023 17:18:44 +0200 Subject: [PATCH 16/33] Code quality improvements --- .../Viewer3D/Debugging/DebugViewerBetaForm.cs | 213 ++++++++---------- .../Viewer3D/Debugging/MapDataProvider.cs | 27 +-- .../Viewer3D/Debugging/MapThemeProvider.cs | 1 - 3 files changed, 103 insertions(+), 138 deletions(-) diff --git a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs index b0463cbd4f..9679a6955a 100644 --- a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs +++ b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs @@ -24,14 +24,14 @@ public partial class DispatchViewerBeta : Form /// Reference to the main simulator object. /// public readonly Simulator simulator; - private MapDataProvider MapDataProvider; - private MapThemeProvider MapThemeProvider; + private readonly MapDataProvider MapDataProvider; + private readonly MapThemeProvider MapThemeProvider; private ThemeStyle Theme; /// /// Used to periodically check if we should shift the view when the /// user is holding down a "shift view" button. /// - private Timer UITimer; + private readonly Timer UITimer; public Viewer Viewer; /// @@ -42,7 +42,7 @@ public partial class DispatchViewerBeta : Form public float xScale = 1; // pixels / metre public float yScale = 1; // pixels / metre - string name = ""; + readonly string name = ""; public List switchItemsDrawn; public List signalItemsDrawn; @@ -53,7 +53,7 @@ public partial class DispatchViewerBeta : Form public bool signalPickedItemHandled; public double signalPickedTime; public bool DrawPath = true; //draw train path - TrackNode[] nodes; + readonly TrackNode[] nodes; public List selectedTrainList; /// @@ -75,7 +75,7 @@ public partial class DispatchViewerBeta : Form public Font sidingFont = new Font("Segoe UI Semibold", 10, FontStyle.Regular); public Font PlatformFont = new Font("Segoe UI Semibold", 10, FontStyle.Regular); public Font SignalFont = new Font("Segoe UI Semibold", 10, FontStyle.Regular); - private SolidBrush trainBrush = new SolidBrush(Color.Red); + private readonly SolidBrush trainBrush = new SolidBrush(Color.Red); public SolidBrush sidingBrush = new SolidBrush(Color.Blue); public SolidBrush PlatformBrush = new SolidBrush(Color.DarkBlue); public SolidBrush SignalBrush = new SolidBrush(Color.DarkRed); @@ -213,7 +213,7 @@ private void InitializeData() var maxsize = maxX - minX > maxY - minY ? maxX - minX : maxY - minY; // Take up to next 500 - maxsize = (int)(maxsize / 100 + 1) * 500; + maxsize = (int)((maxsize / 100) + 1) * 500; mapResolutionUpDown.Maximum = (decimal)maxsize; Inited = true; @@ -245,7 +245,7 @@ public void InitializeImage() #endregion #region playersList - List PlayersList = new List(); + readonly List PlayersList = new List(); public void AddPlayer(string name) { @@ -381,8 +381,8 @@ public void GenerateView(bool dragging = false) pos = PickedTrain?.Cars?.FirstOrDefault()?.WorldPosition; if (pos != null) { - var ploc = new PointF(pos.TileX * 2048 + pos.Location.X, pos.TileZ * 2048 + pos.Location.Z); - ViewWindow.X = ploc.X - minX - ViewWindow.Width / 2; ViewWindow.Y = ploc.Y - minY - ViewWindow.Width / 2; + var ploc = new PointF((pos.TileX * 2048) + pos.Location.X, (pos.TileZ * 2048) + pos.Location.Z); + ViewWindow.X = ploc.X - minX - (ViewWindow.Width / 2); ViewWindow.Y = ploc.Y - minY - (ViewWindow.Width / 2); firstShow = false; } } @@ -403,7 +403,7 @@ public void GenerateView(bool dragging = false) xScale = yScale = Math.Max(xScale, yScale); // Make X and Y scales the same to maintain correct angles // Set the default pen to represent 1 meter - var scale = (float)Math.Round((double)xScale); // Round to nearest pixels/meter + var scale = (float)Math.Round(xScale); // Round to nearest pixels/meter var penWidth = (int)MathHelper.Clamp(scale, 1, 4); // Keep 1 <= width <= 4 pixels PointF[] points = new PointF[3]; @@ -477,8 +477,8 @@ private void DrawPlatforms(Graphics g, int penWidth) PlatformPen.Width = width; foreach (var p in platforms) { - var scaledA = new PointF((p.Extent1.X - subX) * xScale, mapCanvas.Height - (p.Extent1.Y - subY) * yScale); - var scaledB = new PointF((p.Extent2.X - subX) * xScale, mapCanvas.Height - (p.Extent2.Y - subY) * yScale); + var scaledA = new PointF((p.Extent1.X - subX) * xScale, mapCanvas.Height - ((p.Extent1.Y - subY) * yScale)); + var scaledB = new PointF((p.Extent2.X - subX) * xScale, mapCanvas.Height - ((p.Extent2.Y - subY) * yScale)); MapDataProvider.FixForBadData(width, ref scaledA, ref scaledB, p.Extent1, p.Extent2); g.DrawLine(PlatformPen, scaledA, scaledB); @@ -494,10 +494,10 @@ private void DrawTrack(Graphics g, Pen p, out PointF scaledA, out PointF scaledB PointF scaledC = new PointF(0, 0); foreach (var line in segments) { - scaledA.X = (line.A.TileX * 2048 - subX + (float)line.A.X) * xScale; - scaledA.Y = mapCanvas.Height - (line.A.TileZ * 2048 - subY + (float)line.A.Z) * yScale; - scaledB.X = (line.B.TileX * 2048 - subX + (float)line.B.X) * xScale; - scaledB.Y = mapCanvas.Height - (line.B.TileZ * 2048 - subY + (float)line.B.Z) * yScale; + scaledA.X = ((line.A.TileX * 2048) - subX + (float)line.A.X) * xScale; + scaledA.Y = mapCanvas.Height - (((line.A.TileZ * 2048) - subY + (float)line.A.Z) * yScale); + scaledB.X = ((line.B.TileX * 2048) - subX + (float)line.B.X) * xScale; + scaledB.Y = mapCanvas.Height - (((line.B.TileZ * 2048) - subY + (float)line.B.Z) * yScale); if ((scaledA.X < 0 && scaledB.X < 0) || (scaledA.Y < 0 && scaledB.Y < 0)) @@ -505,7 +505,7 @@ private void DrawTrack(Graphics g, Pen p, out PointF scaledA, out PointF scaledB if (line.isCurved == true) { - scaledC.X = ((float)line.C.X - subX) * xScale; scaledC.Y = mapCanvas.Height - ((float)line.C.Z - subY) * yScale; + scaledC.X = ((float)line.C.X - subX) * xScale; scaledC.Y = mapCanvas.Height - (((float)line.C.Z - subY) * yScale); points[0] = scaledA; points[1] = scaledC; points[2] = scaledB; g.DrawCurve(TrackPen, points); } @@ -566,8 +566,8 @@ private void DrawTrains(Graphics g, PointF scaledA, PointF scaledB) // Draw the path, then each car of the train, then maybe the name var loc = train.FrontTDBTraveller.WorldLocation; - float x = (loc.TileX * 2048 + loc.Location.X - subX) * xScale; - float y = mapCanvas.Height - (loc.TileZ * 2048 + loc.Location.Z - subY) * yScale; + float x = ((loc.TileX * 2048) + loc.Location.X - subX) * xScale; + float y = mapCanvas.Height - (((loc.TileZ * 2048) + loc.Location.Z - subY) * yScale); // If train out of view then skip it. if (x < -margin2 @@ -594,9 +594,11 @@ private void DrawTrains(Graphics g, PointF scaledA, PointF scaledB) DrawCar(g, train, car, locoCar, margin, minTrainPx, drawEveryCar); worldPos = locoCar.WorldPosition; - var scaledTrain = new PointF(); - scaledTrain.X = (worldPos.TileX * 2048 - subX + worldPos.Location.X) * xScale; - scaledTrain.Y = -25 + mapCanvas.Height - (worldPos.TileZ * 2048 - subY + worldPos.Location.Z) * yScale; + var scaledTrain = new PointF + { + X = ((worldPos.TileX * 2048) - subX + worldPos.Location.X) * xScale, + Y = -25 + mapCanvas.Height - (((worldPos.TileZ * 2048) - subY + worldPos.Location.Z) * yScale) + }; if (showTrainLabelsCheckbox.Checked) DrawTrainLabels(g, train, trainName, locoCar, scaledTrain); } @@ -619,9 +621,9 @@ private void DrawCar(Graphics g, Train train, TrainCar car, TrainCar locoCar, fl float y; if (drawEveryCar) { - t.Move(dist + car.CarLengthM / 2); // Move along from centre of car to front of car - x = (t.TileX * 2048 + t.Location.X - subX) * xScale; - y = mapCanvas.Height - (t.TileZ * 2048 + t.Location.Z - subY) * yScale; + t.Move(dist + (car.CarLengthM / 2)); // Move along from centre of car to front of car + x = ((t.TileX * 2048) + t.Location.X - subX) * xScale; + y = mapCanvas.Height - (((t.TileZ * 2048) + t.Location.Z - subY) * yScale); // If car out of view then skip it. if (x < -margin || y < -margin) @@ -636,9 +638,9 @@ private void DrawCar(Graphics g, Train train, TrainCar car, TrainCar locoCar, fl if (car == train.Cars.First()) { // Draw first half a train back from the front of the first car as abox - t.Move(dist + car.CarLengthM / 2); - x = (t.TileX * 2048 + t.Location.X - subX) * xScale; - y = mapCanvas.Height - (t.TileZ * 2048 + t.Location.Z - subY) * yScale; + t.Move(dist + (car.CarLengthM / 2)); + x = ((t.TileX * 2048) + t.Location.X - subX) * xScale; + y = mapCanvas.Height - (((t.TileZ * 2048) + t.Location.Z - subY) * yScale); // If car out of view then skip it. if (x < -margin || y < -margin) @@ -651,17 +653,17 @@ private void DrawCar(Graphics g, Train train, TrainCar car, TrainCar locoCar, fl // Draw half a train back from the rear of the first box worldPos = train.Cars.First().WorldPosition; dist = t.DistanceTo(worldPos.WorldLocation.TileX, worldPos.WorldLocation.TileZ, worldPos.WorldLocation.Location.X, worldPos.WorldLocation.Location.Y, worldPos.WorldLocation.Location.Z); - t.Move(dist + train.Cars.First().CarLengthM / 2 - minTrainPx / xScale / 2); - x = (t.TileX * 2048 + t.Location.X - subX) * xScale; - y = mapCanvas.Height - (t.TileZ * 2048 + t.Location.Z - subY) * yScale; + t.Move(dist + (train.Cars.First().CarLengthM / 2) - (minTrainPx / xScale / 2)); + x = ((t.TileX * 2048) + t.Location.X - subX) * xScale; + y = mapCanvas.Height - (((t.TileZ * 2048) + t.Location.Z - subY) * yScale); if (x < -margin || y < -margin) return; t.Move(-minTrainPx / xScale / 2); } scaledTrain.X = x; scaledTrain.Y = y; } - x = (t.TileX * 2048 + t.Location.X - subX) * xScale; - y = mapCanvas.Height - (t.TileZ * 2048 + t.Location.Z - subY) * yScale; + x = ((t.TileX * 2048) + t.Location.X - subX) * xScale; + y = mapCanvas.Height - (((t.TileZ * 2048) + t.Location.Z - subY) * yScale); // If car out of view then skip it. if (x < -margin || y < -margin) @@ -684,16 +686,11 @@ private void SetTrainColor(Train t, TrainCar locoCar, TrainCar car) // inactive loco: RGB 153,128,0 // active car: RGB 0,204,0 // inactive car: RGB 0,153,0 - if (MapDataProvider.IsActiveTrain(t as Simulation.AIs.AITrain)) - if (car is MSTSLocomotive) - trainPen.Color = (car == locoCar) ? Color.FromArgb(204, 170, 0) : Color.FromArgb(153, 128, 0); - else - trainPen.Color = Color.FromArgb(0, 204, 0); - else - if (car is MSTSLocomotive) - trainPen.Color = Color.FromArgb(153, 128, 0); - else - trainPen.Color = Color.FromArgb(0, 153, 0); + trainPen.Color = MapDataProvider.IsActiveTrain(t as Simulation.AIs.AITrain) + ? car is MSTSLocomotive + ? (car == locoCar) ? Color.FromArgb(204, 170, 0) : Color.FromArgb(153, 128, 0) + : Color.FromArgb(0, 204, 0) + : car is MSTSLocomotive ? Color.FromArgb(153, 128, 0) : Color.FromArgb(0, 153, 0); // Draw player train with loco in red if (t.TrainType == Train.TRAINTYPE.PLAYER && car == locoCar) @@ -703,8 +700,8 @@ private void SetTrainColor(Train t, TrainCar locoCar, TrainCar car) private void DrawTrainLabels(Graphics g, Train t, string trainName, TrainCar firstCar, PointF scaledTrain) { WorldPosition worldPos = firstCar.WorldPosition; - scaledTrain.X = (worldPos.TileX * 2048 - subX + worldPos.Location.X) * xScale; - scaledTrain.Y = -25 + mapCanvas.Height - (worldPos.TileZ * 2048 - subY + worldPos.Location.Z) * yScale; + scaledTrain.X = ((worldPos.TileX * 2048) - subX + worldPos.Location.X) * xScale; + scaledTrain.Y = -25 + mapCanvas.Height - (((worldPos.TileZ * 2048) - subY + worldPos.Location.Z) * yScale); if (showActiveTrainsRadio.Checked) { if (t is Simulation.AIs.AITrain && MapDataProvider.IsActiveTrain(t as Simulation.AIs.AITrain)) @@ -720,8 +717,7 @@ private void ShowTrainNameAndState(Graphics g, PointF scaledItem, Train t, strin { if (simulator.TimetableMode) { - var tTTrain = t as Simulation.Timetables.TTTrain; - if (tTTrain != null) + if (t is Simulation.Timetables.TTTrain tTTrain) { // Remove name of timetable, e.g.: ":SCE" var lastPos = trainName.LastIndexOf(":"); @@ -766,7 +762,7 @@ private void ShowSwitches(Graphics g, float width) SwitchWidget sw = switches[i]; var x = (sw.Location.X - subX) * xScale; - var y = mapCanvas.Height - (sw.Location.Y - subY) * yScale; + var y = mapCanvas.Height - ((sw.Location.Y - subY) * yScale); if (x < 0 || y < 0) continue; @@ -792,7 +788,7 @@ private void ShowSignals(Graphics g, PointF scaledB, float width) if (float.IsNaN(s.Location.X) || float.IsNaN(s.Location.Y)) continue; var x = (s.Location.X - subX) * xScale; - var y = mapCanvas.Height - (s.Location.Y - subY) * yScale; + var y = mapCanvas.Height - ((s.Location.Y - subY) * yScale); if (x < 0 || y < 0) continue; @@ -819,7 +815,7 @@ private void ShowSignals(Graphics g, PointF scaledB, float width) signalItemsDrawn.Add(s); if (s.hasDir) { - scaledB.X = (s.Dir.X - subX) * xScale; scaledB.Y = mapCanvas.Height - (s.Dir.Y - subY) * yScale; + scaledB.X = (s.Dir.X - subX) * xScale; scaledB.Y = mapCanvas.Height - ((s.Dir.Y - subY) * yScale); g.DrawLine(pen, scaledItem, scaledB); } ShowSignalState(g, scaledItem, s); @@ -843,7 +839,7 @@ private void ShowSignalState(Graphics g, PointF scaledItem, SignalWidget sw) position.X += offset * 10; position.Y += offset * 15; var text = $" {item?.SigObj} {signalHead.SignalTypeName} {signalHead.state} {trainString}"; - scaledItem.Y = MapDataProvider.GetUnusedYLocation(scaledItem.X, mapCanvas.Height - (sw.Location.Y - subY) * yScale, text); + scaledItem.Y = MapDataProvider.GetUnusedYLocation(scaledItem.X, mapCanvas.Height - ((sw.Location.Y - subY) * yScale), text); if (scaledItem.Y >= 0f) // -1 indicates no free slot to draw label g.DrawString(text, SignalFont, SignalBrush, scaledItem); } @@ -860,7 +856,7 @@ private void ShowSidingLabels(Graphics g) var scaledItem = new PointF(); scaledItem.X = (s.Location.X - subX) * xScale; - scaledItem.Y = MapDataProvider.GetUnusedYLocation(scaledItem.X, mapCanvas.Height - (s.Location.Y - subY) * yScale, s.Name); + scaledItem.Y = MapDataProvider.GetUnusedYLocation(scaledItem.X, mapCanvas.Height - ((s.Location.Y - subY) * yScale), s.Name); if (scaledItem.Y >= 0f) // -1 indicates no free slot to draw label g.DrawString(s.Name, sidingFont, sidingBrush, scaledItem); } @@ -876,15 +872,15 @@ private void ShowPlatformLabels(Graphics g) foreach (var p in platforms) { var scaledItem = new PointF(); - scaledItem.X = (p.Location.X - subX) * xScale + platformMarginPxX; - var yPixels = mapCanvas.Height - (p.Location.Y - subY) * yScale; + scaledItem.X = ((p.Location.X - subX) * xScale) + platformMarginPxX; + var yPixels = mapCanvas.Height - ((p.Location.Y - subY) * yScale); // If track is close to horizontal, then start label search 1 row down to minimise overwriting platform line. if (p.Extent1.X != p.Extent2.X && Math.Abs((p.Extent1.Y - p.Extent2.Y) / (p.Extent1.X - p.Extent2.X)) < 0.1) yPixels += DispatchViewer.spacing; - scaledItem.Y = MapDataProvider.GetUnusedYLocation(scaledItem.X, mapCanvas.Height - (p.Location.Y - subY) * yScale, p.Name); + scaledItem.Y = MapDataProvider.GetUnusedYLocation(scaledItem.X, mapCanvas.Height - ((p.Location.Y - subY) * yScale), p.Name); if (scaledItem.Y >= 0f) // -1 indicates no free slot to draw label g.DrawString(p.Name, PlatformFont, PlatformBrush, scaledItem); } @@ -921,8 +917,8 @@ private void DrawZoomTarget(Graphics g) return; const int size = 24; - var top = mapCanvas.Height / 2 - size / 2; - var left = mapCanvas.Width / 2 - size / 2; + var top = (mapCanvas.Height / 2) - (size / 2); + var left = (mapCanvas.Width / 2) - (size / 2); g.DrawRectangle(ZoomTargetPen, left, top, size, size); } @@ -937,7 +933,7 @@ private void DrawZoomTarget(Graphics g) const float DisplaySegmentLength = 10; const float MaximumSectionDistance = 10000; - Dictionary Cache = new Dictionary(); + readonly Dictionary Cache = new Dictionary(); SignallingDebugWindow.TrackSectionCacheEntry GetCacheEntry(Traveller position) { SignallingDebugWindow.TrackSectionCacheEntry rv; @@ -1034,8 +1030,7 @@ public void DrawTrainPath(Train train, float subX, float subY, Pen pathPen, Grap if (objDistance < initialNodeOffset) continue; - var switchObj = obj as SignallingDebugWindow.TrackSectionSwitch; - if (switchObj != null) + if (obj is SignallingDebugWindow.TrackSectionSwitch switchObj) { for (var pin = switchObj.TrackNode.Inpins; pin < switchObj.TrackNode.Inpins + switchObj.TrackNode.Outpins; pin++) { @@ -1076,10 +1071,10 @@ public void DrawTrainPath(Train train, float subX, float subY, Pen pathPen, Grap if (stepDistance + stepLength >= initialNodeOffset && stepDistance <= initialNodeOffset + DisplayDistance) { var currentLocation = currentPosition.WorldLocation; - scaledA.X = (float)((previousLocation.TileX * WorldLocation.TileSize + previousLocation.Location.X - subX) * xScale); - scaledA.Y = (float)(mapCanvas.Height - (previousLocation.TileZ * WorldLocation.TileSize + previousLocation.Location.Z - subY) * yScale); - scaledB.X = (float)((currentLocation.TileX * WorldLocation.TileSize + currentLocation.Location.X - subX) * xScale); - scaledB.Y = (float)(mapCanvas.Height - (currentPosition.TileZ * WorldLocation.TileSize + currentPosition.Location.Z - subY) * yScale); g.DrawLine(pathPen, scaledA, scaledB); + scaledA.X = (float)(((previousLocation.TileX * WorldLocation.TileSize) + previousLocation.Location.X - subX) * xScale); + scaledA.Y = (float)(mapCanvas.Height - (((previousLocation.TileZ * WorldLocation.TileSize) + previousLocation.Location.Z - subY) * yScale)); + scaledB.X = (float)(((currentLocation.TileX * WorldLocation.TileSize) + currentLocation.Location.X - subX) * xScale); + scaledB.Y = (float)(mapCanvas.Height - (((currentPosition.TileZ * WorldLocation.TileSize) + currentPosition.Location.Z - subY) * yScale)); g.DrawLine(pathPen, scaledA, scaledB); } } lastObjDistance = obj.Distance; @@ -1108,8 +1103,7 @@ public void DrawTrainPath(Train train, float subX, float subY, Pen pathPen, Grap if (objDistance < initialNodeOffset || objDistance > initialNodeOffset + DisplayDistance) continue; - var switchObj = obj as SignallingDebugWindow.TrackSectionSwitch; - if (switchObj != null) + if (obj is SignallingDebugWindow.TrackSectionSwitch switchObj) { for (var pin = switchObj.TrackNode.Inpins; pin < switchObj.TrackNode.Inpins + switchObj.TrackNode.Outpins; pin++) { @@ -1149,9 +1143,9 @@ private void ApplyThemeRecursively(System.Windows.Forms.Control parent) { foreach (System.Windows.Forms.Control c in parent.Controls) { - if (c is Button && c?.Tag?.ToString() != "mapCustomization") + if (c is Button button && c?.Tag?.ToString() != "mapCustomization") { - Button b = (Button)c; + Button b = button; b.BackColor = Theme.BackColor; b.ForeColor = Theme.ForeColor; b.FlatStyle = Theme.FlatStyle; @@ -1178,9 +1172,9 @@ private void ApplyThemeRecursively(System.Windows.Forms.Control parent) /// Center point of the dot, in pixels. /// Size of the dot's diameter, in pixels /// - static public RectangleF GetRect(PointF p, float size) + public static RectangleF GetRect(PointF p, float size) { - return new RectangleF(p.X - size / 2f, p.Y - size / 2f, size, size); + return new RectangleF(p.X - (size / 2f), p.Y - (size / 2f), size, size); } /// @@ -1206,8 +1200,8 @@ private static void AddSegments(List segments, TrackNode node, TrVe dVector A = new dVector(items[i].TileX, items[i].X, items[i].TileZ, items[i].Z); dVector B = new dVector(items[i + 1].TileX, items[i + 1].X, items[i + 1].TileZ, items[i + 1].Z); - tempX1 = A.TileX * 2048 + A.X; tempX2 = B.TileX * 2048 + B.X; - tempZ1 = A.TileZ * 2048 + A.Z; tempZ2 = B.TileZ * 2048 + B.Z; + tempX1 = (A.TileX * 2048) + A.X; tempX2 = (B.TileX * 2048) + B.X; + tempZ1 = (A.TileZ * 2048) + A.Z; tempZ2 = (B.TileZ * 2048) + B.Z; CalcBounds(ref maxX, tempX1, true); CalcBounds(ref maxY, tempZ1, true); CalcBounds(ref maxX, tempX2, true); @@ -1278,13 +1272,13 @@ private void drawPathCheckbox_CheckedChanged(object sender, EventArgs e) private void mapResolutionUpDown_ValueChanged(object sender, EventArgs e) { // Center point of the map viewport before the change in resolution - PointF center = new PointF(ViewWindow.X + ViewWindow.Width / 2f, ViewWindow.Y + ViewWindow.Height / 2f); + PointF center = new PointF(ViewWindow.X + (ViewWindow.Width / 2f), ViewWindow.Y + (ViewWindow.Height / 2f)); float newSizeH = (float)mapResolutionUpDown.Value; float verticalByHorizontal = ViewWindow.Height / ViewWindow.Width; float newSizeV = newSizeH * verticalByHorizontal; - ViewWindow = new RectangleF(center.X - newSizeH / 2f, center.Y - newSizeV / 2f, newSizeH, newSizeV); + ViewWindow = new RectangleF(center.X - (newSizeH / 2f), center.Y - (newSizeV / 2f), newSizeH, newSizeV); GenerateView(); } @@ -1378,15 +1372,15 @@ private void mapCanvas_MouseUp(object sender, MouseEventArgs e) var temp = findItemFromMouse(e.X, e.Y, range); if (temp != null) { - if (temp is SwitchWidget) + if (temp is SwitchWidget widget) { - switchPickedItem = (SwitchWidget)temp; + switchPickedItem = widget; signalPickedItem = null; HandlePickedSwitch(); } - if (temp is SignalWidget) + if (temp is SignalWidget widget1) { - signalPickedItem = (SignalWidget)temp; + signalPickedItem = widget1; switchPickedItem = null; HandlePickedSignal(); } @@ -1617,8 +1611,8 @@ private ItemWidget findItemFromMouse(int x, int y, int range) continue; worldPos = firstCar.WorldPosition; - tX = (worldPos.TileX * 2048 - subX + worldPos.Location.X) * xScale; - tY = mapCanvas.Height - (worldPos.TileZ * 2048 - subY + worldPos.Location.Z) * yScale; + tX = ((worldPos.TileX * 2048) - subX + worldPos.Location.X) * xScale; + tY = mapCanvas.Height - (((worldPos.TileZ * 2048) - subY + worldPos.Location.Z) * yScale); float xSpeedCorr = Math.Abs(t.SpeedMpS) * xScale * 1.5f; float ySpeedCorr = Math.Abs(t.SpeedMpS) * yScale * 1.5f; @@ -1663,8 +1657,8 @@ private void mapCanvas_MouseMove(object sender, MouseEventArgs e) private void CanvasMoveAndZoomInOut(int x, int y, decimal scale) { - int diffX = x - mapCanvas.Width / 2; - int diffY = y - mapCanvas.Height / 2; + int diffX = x - (mapCanvas.Width / 2); + int diffY = y - (mapCanvas.Height / 2); ViewWindow.Offset(diffX / xScale, -diffY / yScale); if (scale < mapResolutionUpDown.Minimum) scale = mapResolutionUpDown.Minimum; if (scale > mapResolutionUpDown.Maximum) scale = mapResolutionUpDown.Maximum; @@ -1709,8 +1703,7 @@ private void playersView_MouseClick(object sender, MouseEventArgs e) public bool ClickedTrain; private void seeTrainInGameButton_Click(object sender, EventArgs e) { - if (PickedTrain != null) ClickedTrain = true; - else ClickedTrain = false; + ClickedTrain = PickedTrain != null; } private void centerOnMyTrainButton_Click(object sender, EventArgs e) @@ -1734,14 +1727,7 @@ private void DispatchViewerBeta_Resize(object sender, EventArgs e) private void rotateThemesButton_Click(object sender, EventArgs e) { - if (Theme == MapThemeProvider.LightTheme) - { - Theme = MapThemeProvider.DarkTheme; - } - else - { - Theme = MapThemeProvider.LightTheme; - } + Theme = Theme == MapThemeProvider.LightTheme ? MapThemeProvider.DarkTheme : MapThemeProvider.LightTheme; ApplyThemeRecursively(this); MapCanvasColor = Theme.MapCanvasColor; @@ -1810,8 +1796,8 @@ public SignalWidget(SignalItem item, SignalObject signal) Item = item; Signal = signal; hasDir = false; - Location.X = item.TileX * 2048 + item.X; - Location.Y = item.TileZ * 2048 + item.Z; + Location.X = (item.TileX * 2048) + item.X; + Location.Y = (item.TileZ * 2048) + item.Z; var node = Program.Simulator.TDB.TrackDB.TrackNodes?[signal.trackNode]; Vector2 v2; if (node?.TrVectorNode != null) @@ -1819,14 +1805,14 @@ public SignalWidget(SignalItem item, SignalObject signal) var ts = node.TrVectorNode.TrVectorSections?.FirstOrDefault(); if (ts == null) return; - v2 = new Vector2(ts.TileX * 2048 + ts.X, ts.TileZ * 2048 + ts.Z); + v2 = new Vector2((ts.TileX * 2048) + ts.X, (ts.TileZ * 2048) + ts.Z); } else if (node?.TrJunctionNode != null) { var ts = node?.UiD; if (ts == null) return; - v2 = new Vector2(ts.TileX * 2048 + ts.X, ts.TileZ * 2048 + ts.Z); + v2 = new Vector2((ts.TileX * 2048) + ts.X, (ts.TileZ * 2048) + ts.Z); } else { @@ -1867,16 +1853,9 @@ public SwitchWidget(TrackNode item) Item = item; var TS = Program.Simulator.TSectionDat.TrackShapes.Get(item.TrJunctionNode.ShapeIndex); // TSECTION.DAT tells us which is the main route - if (TS != null) - { - main = TS.MainRoute; - } - else - { - main = 0; - } + main = TS != null ? TS.MainRoute : 0; - Location.X = Item.UiD.TileX * 2048 + Item.UiD.X; Location.Y = Item.UiD.TileZ * 2048 + Item.UiD.Z; + Location.X = (Item.UiD.TileX * 2048) + Item.UiD.X; Location.Y = (Item.UiD.TileZ * 2048) + Item.UiD.Z; } } @@ -1896,7 +1875,7 @@ public BufferWidget(TrackNode item) { Item = item; - Location.X = Item.UiD.TileX * 2048 + Item.UiD.X; Location.Y = Item.UiD.TileZ * 2048 + Item.UiD.Z; + Location.X = (Item.UiD.TileX * 2048) + Item.UiD.X; Location.Y = (Item.UiD.TileZ * 2048) + Item.UiD.Z; } } #endregion @@ -1967,15 +1946,11 @@ public LineSegment(dVector A, dVector B, bool Occupied, TrVectorSection Section) float diff = (float)(ts.SectionCurve.Radius * (1 - Math.Cos(ts.SectionCurve.Angle * 3.14f / 360))); if (diff < 3) return; //not need to worry, curve too small //curve = ts.SectionCurve; - Vector3 v = new Vector3((float)((B.TileX - A.TileX) * 2048 + B.X - A.X), 0, (float)((B.TileZ - A.TileZ) * 2048 + B.Z - A.Z)); + Vector3 v = new Vector3((float)(((B.TileX - A.TileX) * 2048) + B.X - A.X), 0, (float)(((B.TileZ - A.TileZ) * 2048) + B.Z - A.Z)); isCurved = true; Vector3 v2 = Vector3.Cross(Vector3.Up, v); v2.Normalize(); - v = v / 2; v.X += A.TileX * 2048 + (float)A.X; v.Z += A.TileZ * 2048 + (float)A.Z; - if (ts.SectionCurve.Angle > 0) - { - v = v2 * -diff + v; - } - else v = v2 * diff + v; + v /= 2; v.X += (A.TileX * 2048) + (float)A.X; v.Z += (A.TileZ * 2048) + (float)A.Z; + v = ts.SectionCurve.Angle > 0 ? (v2 * -diff) + v : (v2 * diff) + v; C = new dVector(0, v.X, 0, v.Z); } } @@ -2011,7 +1986,7 @@ public SidingWidget(SidingItem item) LinkId = item.LinkedSidingId; Item = item; Name = item.ItemName; - Location = new PointF(item.TileX * 2048 + item.X, item.TileZ * 2048 + item.Z); + Location = new PointF((item.TileX * 2048) + item.X, (item.TileZ * 2048) + item.Z); } } #endregion @@ -2043,7 +2018,7 @@ public PlatformWidget(PlatformItem item) Item = item; Name = item.ItemName; Station = item.Station; - Location = new PointF(item.TileX * 2048 + item.X, item.TileZ * 2048 + item.Z); + Location = new PointF((item.TileX * 2048) + item.X, (item.TileZ * 2048) + item.Z); Extent1 = default; Extent2 = default; } @@ -2062,10 +2037,10 @@ public dVector(int tilex1, double x1, int tilez1, double z1) Z = z1; } - static public double DistanceSqr(dVector v1, dVector v2) + public static double DistanceSqr(dVector v1, dVector v2) { - return Math.Pow((v1.TileX - v2.TileX) * 2048 + v1.X - v2.X, 2) - + Math.Pow((v1.TileZ - v2.TileZ) * 2048 + v1.Z - v2.Z, 2); + return Math.Pow(((v1.TileX - v2.TileX) * 2048) + v1.X - v2.X, 2) + + Math.Pow(((v1.TileZ - v2.TileZ) * 2048) + v1.Z - v2.Z, 2); } } } diff --git a/Source/RunActivity/Viewer3D/Debugging/MapDataProvider.cs b/Source/RunActivity/Viewer3D/Debugging/MapDataProvider.cs index 2840330d9b..d48a885b53 100644 --- a/Source/RunActivity/Viewer3D/Debugging/MapDataProvider.cs +++ b/Source/RunActivity/Viewer3D/Debugging/MapDataProvider.cs @@ -18,16 +18,11 @@ using System; using System.Diagnostics; using System.Drawing; -using System.Linq; using Microsoft.Xna.Framework; using Orts.Formats.Msts; using Orts.MultiPlayer; -using Orts.Simulation; using Orts.Simulation.Physics; -using Orts.Simulation.RollingStocks; using Orts.Simulation.Signalling; -using ORTS.Common; -using Color = System.Drawing.Color; namespace Orts.Viewer3D.Debugging { @@ -97,7 +92,7 @@ public void PopulateItemLists() { var oldSiding = F.sidings[oldSidingIndex]; var oldLocation = oldSiding.Location; - var newLocation = new PointF(item.TileX * 2048 + item.X, item.TileZ * 2048 + item.Z); + var newLocation = new PointF((item.TileX * 2048) + item.X, (item.TileZ * 2048) + item.Z); // Because these are structs, not classes, compiler won't let you overwrite them. // Instead create a single item which replaces the 2 platform items. @@ -122,7 +117,7 @@ public void PopulateItemLists() { var newPlatform = new PlatformWidget(item as PlatformItem) { - Extent1 = new PointF(item.TileX * 2048 + item.X, item.TileZ * 2048 + item.Z) + Extent1 = new PointF((item.TileX * 2048) + item.X, (item.TileZ * 2048) + item.Z) }; F.platforms.Add(newPlatform); } @@ -130,7 +125,7 @@ public void PopulateItemLists() { var oldPlatform = F.platforms[oldPlatformIndex]; var oldLocation = oldPlatform.Location; - var newLocation = new PointF(item.TileX * 2048 + item.X, item.TileZ * 2048 + item.Z); + var newLocation = new PointF((item.TileX * 2048) + item.X, (item.TileZ * 2048) + item.Z); // Because these are structs, not classes, compiler won't let you overwrite them. // Instead create a single item which replaces the 2 platform items. @@ -207,12 +202,11 @@ public void FixForBadData(float width, ref PointF scaledA, ref PointF scaledB, P public bool IsActiveTrain(Simulation.AIs.AITrain t) { - if (t == null) - return false; - return (t.MovementState != Simulation.AIs.AITrain.AI_MOVEMENT_STATE.AI_STATIC + return t != null +&& ((t.MovementState != Simulation.AIs.AITrain.AI_MOVEMENT_STATE.AI_STATIC && !(t.TrainType == Train.TRAINTYPE.AI_INCORPORATED && !t.IncorporatingTrain.IsPathless) ) - || t.TrainType == Train.TRAINTYPE.PLAYER; + || t.TrainType == Train.TRAINTYPE.PLAYER); } /* @@ -255,7 +249,7 @@ public float GetUnusedYLocation(float startX, float wantY, string name) const float noFreeSlotFound = -1f; var desiredPositionY = (int)(wantY / DispatchViewer.spacing); // The positionY of the ideal row for the text. - var endX = startX + name.Length * F.trainFont.Size; + var endX = startX + (name.Length * F.trainFont.Size); //out of drawing area if (endX < 0) return noFreeSlotFound; @@ -274,7 +268,7 @@ public float GetUnusedYLocation(float startX, float wantY, string name) { var v = F.alignedTextY[positionY][col]; //check conflict with a text, v.X is the start of the text, v.Y is the end of the text - if ((endX >= v.X && startX <= v.Y)) + if (endX >= v.X && startX <= v.Y) { conflict = true; break; @@ -294,10 +288,7 @@ public float GetUnusedYLocation(float startX, float wantY, string name) else { // Check that row has an unused column in its fixed size array - if (F.alignedTextNum[positionY] >= F.alignedTextY[positionY].Length) - return noFreeSlotFound; - - return SaveLabelLocation(startX, endX, positionY); + return F.alignedTextNum[positionY] >= F.alignedTextY[positionY].Length ? noFreeSlotFound : SaveLabelLocation(startX, endX, positionY); } } return noFreeSlotFound; diff --git a/Source/RunActivity/Viewer3D/Debugging/MapThemeProvider.cs b/Source/RunActivity/Viewer3D/Debugging/MapThemeProvider.cs index ed07106670..a338d517f2 100644 --- a/Source/RunActivity/Viewer3D/Debugging/MapThemeProvider.cs +++ b/Source/RunActivity/Viewer3D/Debugging/MapThemeProvider.cs @@ -1,6 +1,5 @@ using System.Drawing; using System.Windows.Forms; -using Orts.Formats.Msts; namespace Orts.Viewer3D.Debugging { From 698c0137b526cdb971b345538a906ccf6aa5e433 Mon Sep 17 00:00:00 2001 From: Looky1173 Date: Fri, 25 Aug 2023 07:36:23 +0200 Subject: [PATCH 17/33] Include static consists in the Map window --- .../Viewer3D/Debugging/DebugViewerBetaForm.cs | 80 +++++++++---------- 1 file changed, 36 insertions(+), 44 deletions(-) diff --git a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs index 9679a6955a..4106a0aaa2 100644 --- a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs +++ b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs @@ -8,6 +8,7 @@ using Orts.Formats.Msts; using Orts.MultiPlayer; using Orts.Simulation; +using Orts.Simulation.AIs; using Orts.Simulation.Physics; using Orts.Simulation.RollingStocks; using Orts.Simulation.Signalling; @@ -333,36 +334,6 @@ public void GenerateView(bool dragging = false) if (mapCanvas.Image == null || firstShow) InitializeImage(); - /*if (firstShow) - { - if (!MPManager.IsServer()) - { - chkAllowUserSwitch.Visible = false; - chkAllowUserSwitch.Checked = false; - rmvButton.Visible = false; - btnAssist.Visible = false; - btnNormal.Visible = false; - msgAll.Text = "MSG to Server"; - } - else - { - msgAll.Text = "MSG to All"; - } - if (MPManager.IsServer()) - { - rmvButton.Visible = true; - chkAllowNew.Visible = true; - chkAllowUserSwitch.Visible = true; - } - else - { - rmvButton.Visible = false; - chkAllowNew.Visible = false; - chkAllowUserSwitch.Visible = false; - chkBoxPenalty.Visible = false; - chkPreferGreen.Visible = false; - } - }*/ if (firstShow || followTrain) { //see who should I look at: @@ -515,23 +486,29 @@ private void DrawTrack(Graphics g, Pen p, out PointF scaledA, out PointF scaledB private void DrawTrains(Graphics g, PointF scaledA, PointF scaledB) { - var margin = 30 * xScale; //margins to determine if we want to draw a train + var margin = 30 * xScale; // Margins to determine if we want to draw a train var margin2 = 5000 * xScale; - //variable for drawing train path - var mDist = 5000f; var pDist = 50; //segment length when drawing path + // Variable for drawing train path + var mDist = 5000f; var pDist = 50; // Segment length when drawing path selectedTrainList.Clear(); if (simulator.TimetableMode) { - // Add the player's train - if (simulator.PlayerLocomotive.Train is Orts.Simulation.AIs.AITrain) - selectedTrainList.Add(simulator.PlayerLocomotive.Train as Orts.Simulation.AIs.AITrain); + // Add the player's train... + if (simulator.PlayerLocomotive.Train is Simulation.AIs.AITrain) + selectedTrainList.Add(simulator.PlayerLocomotive.Train as Simulation.AIs.AITrain); - // and all the other trains - foreach (var train in simulator.AI.AITrains) + // ...then all the AI trains... + foreach (AITrain train in simulator.AI.AITrains) selectedTrainList.Add(train); + + // ...and finally the static consists. + foreach (Train staticConsist in simulator.Trains.Where(c => c.TrainType == Train.TRAINTYPE.STATIC)) + { + selectedTrainList.Add(staticConsist); + } } else { @@ -552,7 +529,7 @@ private void DrawTrains(Graphics g, PointF scaledA, PointF scaledB) else if (train.Cars != null && train.Cars.Count > 0) { trainName = train.GetTrainName(train.Cars[0].CarID); - if (train.TrainType == Train.TRAINTYPE.AI) + if (train.TrainType == Train.TRAINTYPE.AI || train.TrainType == Train.TRAINTYPE.STATIC) trainName = train.Number.ToString() + ":" + train.Name; locoCar = train.Cars.Where(r => r is MSTSLocomotive).FirstOrDefault(); @@ -686,11 +663,26 @@ private void SetTrainColor(Train t, TrainCar locoCar, TrainCar car) // inactive loco: RGB 153,128,0 // active car: RGB 0,204,0 // inactive car: RGB 0,153,0 - trainPen.Color = MapDataProvider.IsActiveTrain(t as Simulation.AIs.AITrain) - ? car is MSTSLocomotive - ? (car == locoCar) ? Color.FromArgb(204, 170, 0) : Color.FromArgb(153, 128, 0) - : Color.FromArgb(0, 204, 0) - : car is MSTSLocomotive ? Color.FromArgb(153, 128, 0) : Color.FromArgb(0, 153, 0); + if (MapDataProvider.IsActiveTrain(t as AITrain)) + { + if (car is MSTSLocomotive) + { + trainPen.Color = (car == locoCar) ? Color.FromArgb(204, 170, 0) : Color.FromArgb(153, 128, 0); + } + else + { + trainPen.Color = Color.FromArgb(0, 204, 0); + } + } + else + { + trainPen.Color = car is MSTSLocomotive ? Color.FromArgb(153, 128, 0) : Color.FromArgb(0, 153, 0); + } + + if (t.TrainType == Train.TRAINTYPE.STATIC) + { + trainPen.Color = Color.FromArgb(83, 237, 214); + } // Draw player train with loco in red if (t.TrainType == Train.TRAINTYPE.PLAYER && car == locoCar) From 55ee45ebe3bf843b68a6500c2ba70b3c3e640d1a Mon Sep 17 00:00:00 2001 From: Looky1173 Date: Fri, 25 Aug 2023 07:37:11 +0200 Subject: [PATCH 18/33] Clean-up --- .../Viewer3D/Debugging/DebugViewerBetaForm.cs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs index 4106a0aaa2..0b6006ec21 100644 --- a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs +++ b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs @@ -665,14 +665,9 @@ private void SetTrainColor(Train t, TrainCar locoCar, TrainCar car) // inactive car: RGB 0,153,0 if (MapDataProvider.IsActiveTrain(t as AITrain)) { - if (car is MSTSLocomotive) - { - trainPen.Color = (car == locoCar) ? Color.FromArgb(204, 170, 0) : Color.FromArgb(153, 128, 0); - } - else - { - trainPen.Color = Color.FromArgb(0, 204, 0); - } + trainPen.Color = car is MSTSLocomotive + ? (car == locoCar) ? Color.FromArgb(204, 170, 0) : Color.FromArgb(153, 128, 0) + : Color.FromArgb(0, 204, 0); } else { From 77a827cfa6a63a11254cc7ce57e245264cf08cb4 Mon Sep 17 00:00:00 2001 From: Looky1173 Date: Fri, 25 Aug 2023 09:16:00 +0200 Subject: [PATCH 19/33] Added Daylight offset change confirmation message --- Source/RunActivity/Viewer3D/Weather.cs | 201 ++++++++++++------------- 1 file changed, 95 insertions(+), 106 deletions(-) diff --git a/Source/RunActivity/Viewer3D/Weather.cs b/Source/RunActivity/Viewer3D/Weather.cs index bd5660ce0e..5d15c11bb8 100644 --- a/Source/RunActivity/Viewer3D/Weather.cs +++ b/Source/RunActivity/Viewer3D/Weather.cs @@ -25,7 +25,6 @@ using System.Diagnostics; using System.IO; using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; using Orts.Common; using Orts.Formats.Msts; using Orts.Formats.OR; @@ -51,19 +50,19 @@ public class WeatherControl public DynamicWeather dynamicWeather; public bool RandomizedWeather; public bool DesertZone; // we are in a desert zone, so no randomized weather change... - private float[,] DesertZones = { { 30, 45, -120, -105 } }; // minlat, maxlat, minlong, maxlong + private readonly float[,] DesertZones = { { 30, 45, -120, -105 } }; // minlat, maxlat, minlong, maxlong // Variables used for wind calculations Vector2 WindSpeedInternalMpS; - Vector2[] windSpeedMpS = new Vector2[2]; + readonly Vector2[] windSpeedMpS = new Vector2[2]; public float Time; readonly float[] WindChangeMpSS = { 40, 5 }; // Flurry, steady const float WindSpeedMaxMpS = 4.5f; float WindUpdateTimer = 0.0f; - float WindGustUpdateTimeS = 1.0f; + readonly float WindGustUpdateTimeS = 1.0f; bool InitialWind = true; float BaseWindDirectionRad; - float WindDirectionVariationRad = (float)MathHelper.ToRadians(45.0f); // Set at 45 Deg + readonly float WindDirectionVariationRad = MathHelper.ToRadians(45.0f); // Set at 45 Deg float calculatedWindDirection; @@ -107,7 +106,7 @@ public WeatherControl(Viewer viewer) UpdateSoundSources(); UpdateVolume(); // We have a pause in weather change, depending from randomization level - dynamicWeather.stableWeatherTimer = ( 4.0f - Viewer.Settings.ActWeatherRandomizationLevel) * 600 + Viewer.Random.Next(300) - 150; + dynamicWeather.stableWeatherTimer = ((4.0f - Viewer.Settings.ActWeatherRandomizationLevel) * 600) + Viewer.Random.Next(300) - 150; weatherChangeOn = true; } @@ -155,7 +154,7 @@ public virtual void RestoreWeatherParameters(BinaryReader inf) { dynamicWeather = new DynamicWeather(); dynamicWeather.Restore(inf); - } + } UpdateVolume(); } @@ -217,8 +216,8 @@ private void UpdateWind(ElapsedTime elapsedTime) WindSpeedInternalMpS = Vector2.Zero; for (var i = 0; i < windSpeedMpS.Length; i++) { - windSpeedMpS[i].X += ((float)Viewer.Random.NextDouble() * 2 - 1) * WindChangeMpSS[i] * WindUpdateTimer; - windSpeedMpS[i].Y += ((float)Viewer.Random.NextDouble() * 2 - 1) * WindChangeMpSS[i] * WindUpdateTimer; + windSpeedMpS[i].X += (((float)Viewer.Random.NextDouble() * 2) - 1) * WindChangeMpSS[i] * WindUpdateTimer; + windSpeedMpS[i].Y += (((float)Viewer.Random.NextDouble() * 2) - 1) * WindChangeMpSS[i] * WindUpdateTimer; var windMagnitude = windSpeedMpS[i].Length() / (i == 0 ? Weather.WindSpeedMpS.Length() * 0.4f : WindSpeedMaxMpS); @@ -228,7 +227,7 @@ private void UpdateWind(ElapsedTime elapsedTime) WindSpeedInternalMpS += windSpeedMpS[i]; } - var TotalwindMagnitude = WindSpeedInternalMpS.Length() / (WindSpeedMaxMpS); + var TotalwindMagnitude = WindSpeedInternalMpS.Length() / WindSpeedMaxMpS; if (TotalwindMagnitude > 1) WindSpeedInternalMpS /= TotalwindMagnitude; @@ -263,8 +262,8 @@ private bool RandomizeInitialWeather() if (DesertZone) return false; // First define overcast var randValue = Viewer.Random.Next(170); - var intermValue = randValue >= 50 ? (float)(randValue - 50f) : (float)randValue; - Weather.OvercastFactor = intermValue >= 20 ? (float)(intermValue - 20f)/100f: (float)intermValue/100f; // give more probability to less overcast + var intermValue = randValue >= 50 ? (float)(randValue - 50f) : randValue; + Weather.OvercastFactor = intermValue >= 20 ? (float)(intermValue - 20f) / 100f : (float)intermValue / 100f; // give more probability to less overcast Viewer.Simulator.WeatherType = Orts.Formats.Msts.WeatherType.Clear; // Then check if we are in precipitation zone if (Weather.OvercastFactor > 0.5) @@ -289,11 +288,11 @@ private bool RandomizeInitialWeather() else Weather.PricipitationIntensityPPSPM2 = 0; // and now define visibility randValue = Viewer.Random.Next(2000); - if (Weather.PricipitationIntensityPPSPM2 > 0 || Weather.OvercastFactor > 0.7f ) - // use first digit to define power of ten and the other three to define the multiplying number - Weather.FogDistance = Math.Max ( 100, (float)Math.Pow(10 , ((int)(randValue / 1000) + 2)) * (float)((randValue % 1000 + 1) / 100f)); + if (Weather.PricipitationIntensityPPSPM2 > 0 || Weather.OvercastFactor > 0.7f) + // use first digit to define power of ten and the other three to define the multiplying number + Weather.FogDistance = Math.Max(100, (float)Math.Pow(10, randValue / 1000 + 2) * (float)(((randValue % 1000) + 1) / 100f)); else - Weather.FogDistance = Math.Max(500, (float)Math.Pow(10, (int)((randValue / 1000) + 3)) * (float)((randValue % 1000 + 1) / 100f)); + Weather.FogDistance = Math.Max(500, (float)Math.Pow(10, (randValue / 1000) + 3) * (float)(((randValue % 1000) + 1) / 100f)); return true; } @@ -316,14 +315,14 @@ private void CheckDesertZone() // Compare player train lat/lon with array of desert zones for (int i = 0; i < DesertZones.Length / 4; i++) { - if (LatitudeDeg > DesertZones[i,0] && LatitudeDeg < DesertZones[i,1] && LongitudeDeg > DesertZones[i,2] && LongitudeDeg < DesertZones[i,3] + if (LatitudeDeg > DesertZones[i, 0] && LatitudeDeg < DesertZones[i, 1] && LongitudeDeg > DesertZones[i, 2] && LongitudeDeg < DesertZones[i, 3] && Viewer.PlayerLocomotive.Train.FrontTDBTraveller.Location.Y < 1000 || - LatitudeDeg > DesertZones[i, 0] + 1 && LatitudeDeg < DesertZones[i, 1] -1 && LongitudeDeg > DesertZones[i, 2] + 1 && LongitudeDeg < DesertZones[i, 3] -1) + LatitudeDeg > DesertZones[i, 0] + 1 && LatitudeDeg < DesertZones[i, 1] - 1 && LongitudeDeg > DesertZones[i, 2] + 1 && LongitudeDeg < DesertZones[i, 3] - 1) { DesertZone = true; return; } - } + } } [CallOnThread("Updater")] @@ -380,24 +379,24 @@ public virtual void Update(ElapsedTime elapsedTime) } // block dynamic weather change after a manual weather change operation weatherChangeOn = false; - if (dynamicWeather != null) dynamicWeather.ResetWeatherTargets(); + dynamicWeather?.ResetWeatherTargets(); UpdateWeatherParameters(); // If we're a multiplayer server, send out the new weather to all clients. if (MPManager.IsServer()) - MPManager.Notify((new MSGWeather((int)Viewer.Simulator.WeatherType, -1, -1, -1)).ToString()); + MPManager.Notify(new MSGWeather((int)Viewer.Simulator.WeatherType, -1, -1, -1).ToString()); } // Overcast ranges from 0 (completely clear) to 1 (completely overcast). if (UserInput.IsDown(UserCommand.DebugOvercastIncrease)) { - Weather.OvercastFactor = MathHelper.Clamp(Weather.OvercastFactor + elapsedTime.RealSeconds / 10, 0, 1); + Weather.OvercastFactor = MathHelper.Clamp(Weather.OvercastFactor + (elapsedTime.RealSeconds / 10), 0, 1); weatherChangeOn = false; if (dynamicWeather != null) dynamicWeather.ORTSOvercast = -1; } if (UserInput.IsDown(UserCommand.DebugOvercastDecrease)) { - Weather.OvercastFactor = MathHelper.Clamp(Weather.OvercastFactor - elapsedTime.RealSeconds / 10, 0, 1); + Weather.OvercastFactor = MathHelper.Clamp(Weather.OvercastFactor - (elapsedTime.RealSeconds / 10), 0, 1); weatherChangeOn = false; if (dynamicWeather != null) dynamicWeather.ORTSOvercast = -1; } @@ -442,7 +441,7 @@ public virtual void Update(ElapsedTime elapsedTime) if (dynamicWeather != null) dynamicWeather.ORTSPrecipitationIntensity = -1; } if (UserInput.IsDown(UserCommand.DebugPrecipitationIncrease) || UserInput.IsDown(UserCommand.DebugPrecipitationDecrease)) UpdateVolume(); - + // Change in precipitation liquidity, passing from rain to snow and vice-versa if (UserInput.IsDown(UserCommand.DebugPrecipitationLiquidityIncrease)) { @@ -476,30 +475,34 @@ public virtual void Update(ElapsedTime elapsedTime) // Fog ranges from 10m (can't see anything) to 100km (clear arctic conditions). if (UserInput.IsDown(UserCommand.DebugFogIncrease)) { - Weather.FogDistance = MathHelper.Clamp(Weather.FogDistance - elapsedTime.RealSeconds * Weather.FogDistance, 10, 100000); + Weather.FogDistance = MathHelper.Clamp(Weather.FogDistance - (elapsedTime.RealSeconds * Weather.FogDistance), 10, 100000); weatherChangeOn = false; if (dynamicWeather != null) dynamicWeather.ORTSFog = -1; } if (UserInput.IsDown(UserCommand.DebugFogDecrease)) { - Weather.FogDistance = MathHelper.Clamp(Weather.FogDistance + elapsedTime.RealSeconds * Weather.FogDistance, 10, 100000); + Weather.FogDistance = MathHelper.Clamp(Weather.FogDistance + (elapsedTime.RealSeconds * Weather.FogDistance), 10, 100000); if (dynamicWeather != null) dynamicWeather.ORTSFog = -1; weatherChangeOn = false; } // Daylight offset is useful for debugging night running timetables; it ranges from -12h to +12h - if (UserInput.IsPressed(UserCommand.DebugDaylightOffsetIncrease) && Weather.DaylightOffset < 12) { + string FormatDaylightOffsetHour(int h) => h <= 0 ? h.ToString() : $"+{h}"; + if (UserInput.IsPressed(UserCommand.DebugDaylightOffsetIncrease) && Weather.DaylightOffset < 12) + { Weather.DaylightOffset += 1; + Viewer.Simulator.Confirmer.Message(ConfirmLevel.None, Simulator.Catalog.GetStringFmt("Increased daylight offset to {0} h", FormatDaylightOffsetHour(Weather.DaylightOffset))); } if (UserInput.IsPressed(UserCommand.DebugDaylightOffsetDecrease) && Weather.DaylightOffset > -12) { Weather.DaylightOffset -= 1; + Viewer.Simulator.Confirmer.Message(ConfirmLevel.None, Simulator.Catalog.GetStringFmt("Decreased daylight offset to {0} h", FormatDaylightOffsetHour(Weather.DaylightOffset))); } UpdateWind(elapsedTime); } - if (!Orts.MultiPlayer.MPManager.IsMultiPlayer()) + if (!MPManager.IsMultiPlayer()) { // Shift the clock forwards or backwards at 1h-per-second. if (UserInput.IsDown(UserCommand.DebugClockForwards)) Viewer.Simulator.ClockTime += elapsedTime.RealSeconds * 3600; @@ -514,12 +517,12 @@ public virtual void Update(ElapsedTime elapsedTime) || UserInput.IsReleased(UserCommand.DebugFogIncrease) || UserInput.IsReleased(UserCommand.DebugFogDecrease)) { manager.SetEnvInfo(Weather.OvercastFactor, Weather.FogDistance); - MPManager.Notify((new MSGWeather(-1, Weather.OvercastFactor, Weather.PricipitationIntensityPPSPM2, Weather.FogDistance)).ToString()); + MPManager.Notify(new MSGWeather(-1, Weather.OvercastFactor, Weather.PricipitationIntensityPPSPM2, Weather.FogDistance).ToString()); } } if (Program.Simulator != null && Program.Simulator.ActivityRun != null && Program.Simulator.ActivityRun.triggeredEventWrapper != null && (Program.Simulator.ActivityRun.triggeredEventWrapper.ParsedObject.ORTSWeatherChange != null || Program.Simulator.ActivityRun.triggeredEventWrapper.ParsedObject.Outcomes.ORTSWeatherChange != null)) - // Start a weather change sequence in activity mode + // Start a weather change sequence in activity mode { // if not yet weather changes, create the instance if (dynamicWeather == null) @@ -528,10 +531,10 @@ public virtual void Update(ElapsedTime elapsedTime) } var weatherChange = Program.Simulator.ActivityRun.triggeredEventWrapper.ParsedObject.ORTSWeatherChange ?? Program.Simulator.ActivityRun.triggeredEventWrapper.ParsedObject.Outcomes.ORTSWeatherChange; dynamicWeather.WeatherChange_Init(weatherChange, this); - Program.Simulator.ActivityRun.triggeredEventWrapper = null; + Program.Simulator.ActivityRun.triggeredEventWrapper = null; } if (weatherChangeOn) - // manage the weather change sequence + // manage the weather change sequence { dynamicWeather.WeatherChange_Update(elapsedTime, this); } @@ -632,7 +635,7 @@ public void WeatherChange_Init(ORTSWeatherChange eventWeatherChange, WeatherCont { ORTSOvercast = eventWeatherChange.ORTSOvercast; ORTSOvercastTransitionTimeS = eventWeatherChange.ORTSOvercastTransitionTimeS; - overcastTimer = (float)ORTSOvercastTransitionTimeS; + overcastTimer = ORTSOvercastTransitionTimeS; overcastChangeRate = overcastTimer > 0 ? (MathHelper.Clamp(ORTSOvercast, 0, 1.0f) - weatherControl.Weather.OvercastFactor) / ORTSOvercastTransitionTimeS : 0; wChangeOn = true; } @@ -640,7 +643,7 @@ public void WeatherChange_Init(ORTSWeatherChange eventWeatherChange, WeatherCont { ORTSFog = eventWeatherChange.ORTSFog; ORTSFogTransitionTimeS = eventWeatherChange.ORTSFogTransitionTimeS; - fogTimer = (float)ORTSFogTransitionTimeS; + fogTimer = ORTSFogTransitionTimeS; var fogFinalValue = MathHelper.Clamp(ORTSFog, 10, 100000); fogDistanceIncreasing = false; fogChangeRate = fogTimer > 0 ? (fogFinalValue - weatherControl.Weather.FogDistance) / (ORTSFogTransitionTimeS * ORTSFogTransitionTimeS) : 0; @@ -656,14 +659,13 @@ public void WeatherChange_Init(ORTSWeatherChange eventWeatherChange, WeatherCont { ORTSPrecipitationIntensity = eventWeatherChange.ORTSPrecipitationIntensity; ORTSPrecipitationIntensityTransitionTimeS = eventWeatherChange.ORTSPrecipitationIntensityTransitionTimeS; - precipitationIntensityTimer = (float)ORTSPrecipitationIntensityTransitionTimeS; + precipitationIntensityTimer = ORTSPrecipitationIntensityTransitionTimeS; // Pricipitation ranges from 0 to max PrecipitationViewer.MaxIntensityPPSPM2 if 32bit. // 16bit uses PrecipitationViewer.MaxIntensityPPSPM2_16 - if (PrecipitationViewer.IndexesAre32bit) - precipitationIntensityChangeRate = precipitationIntensityTimer > 0 ? (MathHelper.Clamp(ORTSPrecipitationIntensity, 0, PrecipitationViewer.MaxIntensityPPSPM2) - - weatherControl.Weather.PricipitationIntensityPPSPM2) / ORTSPrecipitationIntensityTransitionTimeS : 0; - else - precipitationIntensityChangeRate = precipitationIntensityTimer > 0 ? (MathHelper.Clamp(ORTSPrecipitationIntensity, 0, PrecipitationViewer.MaxIntensityPPSPM2_16) + precipitationIntensityChangeRate = PrecipitationViewer.IndexesAre32bit + ? precipitationIntensityTimer > 0 ? (MathHelper.Clamp(ORTSPrecipitationIntensity, 0, PrecipitationViewer.MaxIntensityPPSPM2) + - weatherControl.Weather.PricipitationIntensityPPSPM2) / ORTSPrecipitationIntensityTransitionTimeS : 0 + : precipitationIntensityTimer > 0 ? (MathHelper.Clamp(ORTSPrecipitationIntensity, 0, PrecipitationViewer.MaxIntensityPPSPM2_16) - weatherControl.Weather.PricipitationIntensityPPSPM2) / ORTSPrecipitationIntensityTransitionTimeS : 0; wChangeOn = true; } @@ -671,7 +673,7 @@ public void WeatherChange_Init(ORTSWeatherChange eventWeatherChange, WeatherCont { ORTSPrecipitationLiquidity = eventWeatherChange.ORTSPrecipitationLiquidity; ORTSPrecipitationLiquidityTransitionTimeS = eventWeatherChange.ORTSPrecipitationLiquidityTransitionTimeS; - precipitationLiquidityTimer = (float)ORTSPrecipitationLiquidityTransitionTimeS; + precipitationLiquidityTimer = ORTSPrecipitationLiquidityTransitionTimeS; precipitationLiquidityChangeRate = precipitationLiquidityTimer > 0 ? (MathHelper.Clamp(ORTSPrecipitationLiquidity, 0, 1.0f) - weatherControl.Weather.PrecipitationLiquidity) / ORTSPrecipitationLiquidityTransitionTimeS : 0; wChangeOn = true; @@ -687,7 +689,7 @@ public void WeatherChange_Update(ElapsedTime elapsedTime, WeatherControl weather overcastTimer -= elapsedTime.ClockSeconds; if (overcastTimer <= 0) overcastTimer = 0; else wChangeOn = true; - weatherControl.Weather.OvercastFactor = ORTSOvercast - overcastTimer * overcastChangeRate; + weatherControl.Weather.OvercastFactor = ORTSOvercast - (overcastTimer * overcastChangeRate); if (overcastTimer == 0) ORTSOvercast = -1; } if (ORTSFog >= 0) @@ -696,11 +698,11 @@ public void WeatherChange_Update(ElapsedTime elapsedTime, WeatherControl weather if (fogTimer <= 0) fogTimer = 0; else wChangeOn = true; if (!fogDistanceIncreasing) - weatherControl.Weather.FogDistance = ORTSFog - fogTimer * fogTimer * fogChangeRate; + weatherControl.Weather.FogDistance = ORTSFog - (fogTimer * fogTimer * fogChangeRate); else { var fogTimerDifference = ORTSFogTransitionTimeS - fogTimer; - weatherControl.Weather.FogDistance = ORTSFog - fogTimerDifference * fogTimerDifference * fogChangeRate; + weatherControl.Weather.FogDistance = ORTSFog - (fogTimerDifference * fogTimerDifference * fogChangeRate); } if (fogTimer == 0) ORTSFog = -1; } @@ -708,15 +710,14 @@ public void WeatherChange_Update(ElapsedTime elapsedTime, WeatherControl weather { precipitationIntensityTimer -= elapsedTime.ClockSeconds; if (precipitationIntensityTimer <= 0) precipitationIntensityTimer = 0; - else if (weatherControl.RandomizedWeather == false ) wChangeOn = true; + else if (weatherControl.RandomizedWeather == false) wChangeOn = true; var oldPricipitationIntensityPPSPM2 = weatherControl.Weather.PricipitationIntensityPPSPM2; - weatherControl.Weather.PricipitationIntensityPPSPM2 = ORTSPrecipitationIntensity - precipitationIntensityTimer * precipitationIntensityChangeRate; + weatherControl.Weather.PricipitationIntensityPPSPM2 = ORTSPrecipitationIntensity - (precipitationIntensityTimer * precipitationIntensityChangeRate); if (weatherControl.Weather.PricipitationIntensityPPSPM2 > 0) { if (oldPricipitationIntensityPPSPM2 == 0) { - if (weatherControl.Weather.PrecipitationLiquidity > RainSnowLiquidityThreshold) weatherControl.Viewer.Simulator.WeatherType = WeatherType.Rain; - else weatherControl.Viewer.Simulator.WeatherType = WeatherType.Snow; + weatherControl.Viewer.Simulator.WeatherType = weatherControl.Weather.PrecipitationLiquidity > RainSnowLiquidityThreshold ? WeatherType.Rain : WeatherType.Snow; weatherControl.UpdateSoundSources(); } weatherControl.UpdateVolume(); @@ -746,7 +747,7 @@ public void WeatherChange_Update(ElapsedTime elapsedTime, WeatherControl weather if (precipitationLiquidityTimer <= 0) precipitationLiquidityTimer = 0; else wChangeOn = true; var oldPrecipitationLiquidity = weatherControl.Weather.PrecipitationLiquidity; - weatherControl.Weather.PrecipitationLiquidity = ORTSPrecipitationLiquidity - precipitationLiquidityTimer * precipitationLiquidityChangeRate; + weatherControl.Weather.PrecipitationLiquidity = ORTSPrecipitationLiquidity - (precipitationLiquidityTimer * precipitationLiquidityChangeRate); if (weatherControl.Weather.PrecipitationLiquidity > RainSnowLiquidityThreshold) { if (oldPrecipitationLiquidity <= RainSnowLiquidityThreshold) @@ -780,14 +781,14 @@ public void WeatherChange_Update(ElapsedTime elapsedTime, WeatherControl weather public void WeatherChange_NextRandomization(ElapsedTime elapsedTime, WeatherControl weatherControl) // start next randomization { // define how much time transition will last - var weatherChangeTimer = (4 - weatherControl.Viewer.Settings.ActWeatherRandomizationLevel) * 600 + + var weatherChangeTimer = ((4 - weatherControl.Viewer.Settings.ActWeatherRandomizationLevel) * 600) + Viewer.Random.Next((4 - weatherControl.Viewer.Settings.ActWeatherRandomizationLevel) * 600); // begin with overcast var randValue = Viewer.Random.Next(170); - var intermValue = randValue >= 50 ? (float)(randValue - 50f) : (float)randValue; + var intermValue = randValue >= 50 ? (float)(randValue - 50f) : randValue; ORTSOvercast = intermValue >= 20 ? (float)(intermValue - 20f) / 100f : (float)intermValue / 100f; // give more probability to less overcast ORTSOvercastTransitionTimeS = weatherChangeTimer; - overcastTimer = (float)ORTSOvercastTransitionTimeS; + overcastTimer = ORTSOvercastTransitionTimeS; overcastChangeRate = overcastTimer > 0 ? (MathHelper.Clamp(ORTSOvercast, 0, 1.0f) - weatherControl.Weather.OvercastFactor) / ORTSOvercastTransitionTimeS : 0; // Then check if we are in precipitation zone if (ORTSOvercast > 0.5) @@ -796,14 +797,7 @@ public void WeatherChange_Update(ElapsedTime elapsedTime, WeatherControl weather if (randValue > 40) { ORTSPrecipitationIntensity = (float)(randValue - 40f) / 1000f; - if (weatherControl.Viewer.Simulator.Season == SeasonType.Winter) - { - weatherControl.Weather.PrecipitationLiquidity = 0; - } - else - { - weatherControl.Weather.PrecipitationLiquidity = 1; - } + weatherControl.Weather.PrecipitationLiquidity = weatherControl.Viewer.Simulator.Season == SeasonType.Winter ? 0 : 1; } } if (weatherControl.Weather.PricipitationIntensityPPSPM2 > 0 && ORTSPrecipitationIntensity == -1) @@ -823,8 +817,8 @@ public void WeatherChange_Update(ElapsedTime elapsedTime, WeatherControl weather ORTSPrecipitationIntensityTransitionTimeS = weatherChangeTimer; } if (ORTSPrecipitationIntensity >= 0) - { - precipitationIntensityTimer = (float)ORTSPrecipitationIntensityTransitionTimeS; + { + precipitationIntensityTimer = ORTSPrecipitationIntensityTransitionTimeS; precipitationIntensityChangeRate = precipitationIntensityTimer > 0 ? (MathHelper.Clamp(ORTSPrecipitationIntensity, 0, PrecipitationViewer.MaxIntensityPPSPM2) - weatherControl.Weather.PricipitationIntensityPPSPM2) / ORTSPrecipitationIntensityTransitionTimeS : 0; } @@ -833,11 +827,11 @@ public void WeatherChange_Update(ElapsedTime elapsedTime, WeatherControl weather randValue = Viewer.Random.Next(2000); if (ORTSPrecipitationIntensity > 0 || ORTSOvercast > 0.7f) // use first digit to define power of ten and the other three to define the multiplying number - ORTSFog = Math.Max(100, (float)Math.Pow(10, ((int)(randValue / 1000) + 2)) * (float)((randValue % 1000 + 1) / 100f)); + ORTSFog = Math.Max(100, (float)Math.Pow(10, randValue / 1000 + 2) * (float)(((randValue % 1000) + 1) / 100f)); else - ORTSFog = Math.Max(500, (float)Math.Pow(10, (int)((randValue / 1000) + 3)) * (float)((randValue % 1000 + 1) / 100f)); + ORTSFog = Math.Max(500, (float)Math.Pow(10, (randValue / 1000) + 3) * (float)(((randValue % 1000) + 1) / 100f)); ORTSFogTransitionTimeS = weatherChangeTimer; - fogTimer = (float)ORTSFogTransitionTimeS; + fogTimer = ORTSFogTransitionTimeS; var fogFinalValue = MathHelper.Clamp(ORTSFog, 10, 100000); fogDistanceIncreasing = false; fogChangeRate = fogTimer > 0 ? (fogFinalValue - weatherControl.Weather.FogDistance) / (ORTSFogTransitionTimeS * ORTSFogTransitionTimeS) : 0; @@ -858,7 +852,7 @@ public class AutomaticWeather : WeatherControl { // Variables used for auto weather control // settings - List weatherDetails = new List(); + readonly List weatherDetails = new List(); // running values // general @@ -1000,7 +994,7 @@ void CheckValue(ref float setValue, bool randomize, float minValue, float maxVal // overcast if (setValue < 0 && randomize) { - setValue = (float)(Viewer.Random.Next((int)maxValue*100)/100); // ensure there is a value if range is 0 - 1 + setValue = Viewer.Random.Next((int)maxValue * 100) / 100; // ensure there is a value if range is 0 - 1 } else { @@ -1048,7 +1042,7 @@ void SetInitialWeatherParameters(double realTime) if (lastWeather is WeatherSettingFog) { WeatherSettingFog lastWeatherFog = lastWeather as WeatherSettingFog; - float actualLiftingTime = (0.9f * lastWeatherFog.FogLiftTimeS) + (((float)Viewer.Random.Next(10) / 100) * lastWeatherFog.FogLiftTimeS); // defined time +- 10% + float actualLiftingTime = (0.9f * lastWeatherFog.FogLiftTimeS) + ((float)Viewer.Random.Next(10) / 100 * lastWeatherFog.FogLiftTimeS); // defined time +- 10% AWFogLiftTime = AWNextChangeTime - actualLiftingTime; // check if fog is allready lifting @@ -1076,7 +1070,7 @@ void SetInitialWeatherParameters(double realTime) else if (lastWeather is WeatherSettingOvercast) { WeatherSettingOvercast lastWeatherOvercast = lastWeather as WeatherSettingOvercast; - AWOvercastCloudcover = Math.Max(0, Math.Min(1, (lastWeatherOvercast.Overcast/100) + + AWOvercastCloudcover = Math.Max(0, Math.Min(1, (lastWeatherOvercast.Overcast / 100) + ((float)Viewer.Random.Next((int)(-0.5f * lastWeatherOvercast.OvercastVariation), (int)(0.5f * lastWeatherOvercast.OvercastVariation)) / 100))); AWActualVisibility = Weather.FogDistance = lastWeatherOvercast.OvercastVisibilityM; @@ -1190,11 +1184,11 @@ public override void Update(ElapsedTime elapsedTime) AWOvercastCloudcover = CalculateOvercast(lastWeatherPrecipitation.Overcast, lastWeatherPrecipitation.OvercastVariation, lastWeatherPrecipitation.OvercastRateOfChange, elapsedTime); if (Weather.FogDistance > lastWeatherPrecipitation.OvercastVisibilityM) { - AWActualVisibility = Weather.FogDistance - 40 * elapsedTime.RealSeconds; // reduce visibility by 40 m/s + AWActualVisibility = Weather.FogDistance - (40 * elapsedTime.RealSeconds); // reduce visibility by 40 m/s } else if (Weather.FogDistance < lastWeatherPrecipitation.OvercastVisibilityM) { - AWActualVisibility = Weather.FogDistance + 40 * elapsedTime.RealSeconds; // increase visibility by 40 m/s + AWActualVisibility = Weather.FogDistance + (40 * elapsedTime.RealSeconds); // increase visibility by 40 m/s } } } @@ -1227,11 +1221,11 @@ public override void Update(ElapsedTime elapsedTime) AWOvercastCloudcover = CalculateOvercast(lastWeatherOvercast.Overcast, lastWeatherOvercast.OvercastVariation, lastWeatherOvercast.OvercastRateOfChange, elapsedTime); if (AWActualVisibility > lastWeatherOvercast.OvercastVisibilityM) { - AWActualVisibility = Math.Max(lastWeatherOvercast.OvercastVisibilityM, AWActualVisibility - 40 * elapsedTime.RealSeconds); // reduce visibility by 40 m/s + AWActualVisibility = Math.Max(lastWeatherOvercast.OvercastVisibilityM, AWActualVisibility - (40 * elapsedTime.RealSeconds)); // reduce visibility by 40 m/s } else if (AWActualVisibility < lastWeatherOvercast.OvercastVisibilityM) { - AWActualVisibility = Math.Min(lastWeatherOvercast.OvercastVisibilityM, AWActualVisibility + 40 * elapsedTime.RealSeconds); // increase visibility by 40 m/s + AWActualVisibility = Math.Min(lastWeatherOvercast.OvercastVisibilityM, AWActualVisibility + (40 * elapsedTime.RealSeconds)); // increase visibility by 40 m/s } } @@ -1267,7 +1261,7 @@ public override void Update(ElapsedTime elapsedTime) // check for change in required weather // time to change but no change after midnight and further weather available - if (Time < 24*3600 && Time > AWNextChangeTime && AWActiveIndex < (weatherDetails.Count - 1)) + if (Time < 24 * 3600 && Time > AWNextChangeTime && AWActiveIndex < (weatherDetails.Count - 1)) { // if precipitation still active or fog not lifted, postpone change by one minute if (AWPrecipitationActiveType != WeatherType.Clear || fogActive) @@ -1319,7 +1313,7 @@ float GetWeatherVisibility(WeatherSetting weatherDetail) WeatherSettingPrecipitation weatherPrecipitation = weatherDetail as WeatherSettingPrecipitation; nextVisibility = weatherPrecipitation.OvercastVisibilityM; } - return (nextVisibility); + return nextVisibility; } void StartFog(WeatherSettingFog lastWeatherFog, float startTime, int activeIndex) @@ -1359,7 +1353,7 @@ void StartPrecipitation(WeatherSettingPrecipitation lastWeatherPrecipitation, fl // determine actual duration of precipitation float maxDuration = AWNextChangeTime - weatherDetails[AWActiveIndex].Time; - AWPrecipitationTotalDuration = (float)maxDuration * (lastWeatherPrecipitation.PrecipitationProbability/100f); // nominal value + AWPrecipitationTotalDuration = (float)maxDuration * (lastWeatherPrecipitation.PrecipitationProbability / 100f); // nominal value AWPrecipitationTotalDuration = (0.9f + ((float)Viewer.Random.Next(20) / 20)) * AWPrecipitationTotalDuration; // randomized value, +- 10% AWPrecipitationTotalDuration = Math.Min(AWPrecipitationTotalDuration, maxDuration); // but never exceeding maximum duration AWPrecipitationNextSpell = lastWeatherPrecipitation.Time; // set start of spell to start of weather change @@ -1380,7 +1374,7 @@ void StartPrecipitation(WeatherSettingPrecipitation lastWeatherPrecipitation, fl // determine actual precipitation state - only if immediate start allowed - bool precipitationActive = allowImmediateStart ? Viewer.Random.Next(100) >= lastWeatherPrecipitation.PrecipitationProbability : false; + bool precipitationActive = allowImmediateStart && Viewer.Random.Next(100) >= lastWeatherPrecipitation.PrecipitationProbability; #if DEBUG_AUTOWEATHER Trace.TraceInformation("Precipitation active on start : {0}", precipitationActive.ToString()); @@ -1401,23 +1395,23 @@ void StartPrecipitation(WeatherSettingPrecipitation lastWeatherPrecipitation, fl // precipitation active : set actual details, calculate end of present spell int precvariation = (int)(lastWeatherPrecipitation.PrecipitationVariation * 100); float baseDensitiy = PrecipitationViewer.MaxIntensityPPSPM2 * lastWeatherPrecipitation.PrecipitationDensity; - AWPrecipitationActualPPSPM2 = MathHelper.Clamp(((1.0f + ((float)Viewer.Random.Next(-precvariation, precvariation) / 100)) * baseDensitiy), + AWPrecipitationActualPPSPM2 = MathHelper.Clamp((1.0f + ((float)Viewer.Random.Next(-precvariation, precvariation) / 100)) * baseDensitiy, PrecipitationViewer.MinIntensityPPSPM2, PrecipitationViewer.MaxIntensityPPSPM2); - AWPrecipitationRequiredPPSPM2 = MathHelper.Clamp(((1.0f + ((float)Viewer.Random.Next(-precvariation, precvariation) / 100)) * baseDensitiy), + AWPrecipitationRequiredPPSPM2 = MathHelper.Clamp((1.0f + ((float)Viewer.Random.Next(-precvariation, precvariation) / 100)) * baseDensitiy, PrecipitationViewer.MinIntensityPPSPM2, PrecipitationViewer.MaxIntensityPPSPM2); // rate of change is max. difference over random timespan between 1 and 10 mins. // startphase - float startrate = 1.75f * lastWeatherPrecipitation.PrecipitationRateOfChange + - (0.5F * (float)(Viewer.Random.Next((int)(lastWeatherPrecipitation.PrecipitationRateOfChange * 100))) / 100f); + float startrate = (1.75f * lastWeatherPrecipitation.PrecipitationRateOfChange) + + (0.5F * Viewer.Random.Next((int)(lastWeatherPrecipitation.PrecipitationRateOfChange * 100)) / 100f); float spellStartPhase = Math.Min(60f + (300f * startrate), 600); AWPrecipitationStartRate = (AWPrecipitationRequiredPPSPM2 - AWPrecipitationActualPPSPM2) / spellStartPhase; // endphase - float endrate = 1.75f * lastWeatherPrecipitation.PrecipitationRateOfChange + - (0.5F * (float)(Viewer.Random.Next((int)(lastWeatherPrecipitation.PrecipitationRateOfChange * 100))) / 100f); + float endrate = (1.75f * lastWeatherPrecipitation.PrecipitationRateOfChange) + + (0.5F * Viewer.Random.Next((int)(lastWeatherPrecipitation.PrecipitationRateOfChange * 100)) / 100f); float spellEndPhase = Math.Min(60f + (300f * endrate), 600); - + float avduration = AWPrecipitationTotalDuration / AWPrecipitationTotalSpread; float actduration = (0.5f + ((float)Viewer.Random.Next(100) / 100)) * avduration; float spellEndTime = Math.Min(startTime + actduration, AWNextChangeTime); @@ -1431,7 +1425,7 @@ void StartPrecipitation(WeatherSettingPrecipitation lastWeatherPrecipitation, fl if (AWPrecipitationTotalDuration > 0 && AWPrecipitationTotalSpread > 0) { float avclearspell = (AWNextChangeTime - startTime - AWPrecipitationTotalDuration) / AWPrecipitationTotalSpread; - AWPrecipitationNextSpell = spellEndTime + (0.9f + ((float)Viewer.Random.Next(200) / 1000f)) * avclearspell; + AWPrecipitationNextSpell = spellEndTime + ((0.9f + (Viewer.Random.Next(200) / 1000f)) * avclearspell); } else { @@ -1479,7 +1473,7 @@ void StartPrecipitationSpell(WeatherSettingPrecipitation lastWeatherPrecipitatio float baseDensitiy = PrecipitationViewer.MaxIntensityPPSPM2 * lastWeatherPrecipitation.PrecipitationDensity; AWPrecipitationActiveType = AWPrecipitationRequiredType; AWPrecipitationActualPPSPM2 = PrecipitationViewer.MinIntensityPPSPM2; - AWPrecipitationRequiredPPSPM2 = MathHelper.Clamp(((1.0f + ((float)Viewer.Random.Next(-precvariation, precvariation) / 100)) * baseDensitiy), + AWPrecipitationRequiredPPSPM2 = MathHelper.Clamp((1.0f + ((float)Viewer.Random.Next(-precvariation, precvariation) / 100)) * baseDensitiy, PrecipitationViewer.MinIntensityPPSPM2, PrecipitationViewer.MaxIntensityPPSPM2); AWLastVisibility = Weather.FogDistance; @@ -1524,18 +1518,18 @@ void CalculatePrecipitation(WeatherSettingPrecipitation lastWeatherPrecipitation { if (AWPrecipitationActualPPSPM2 < AWPrecipitationRequiredPPSPM2) { - AWPrecipitationActualPPSPM2 = Math.Min(AWPrecipitationRequiredPPSPM2, AWPrecipitationActualPPSPM2 + AWPrecipitationRateOfChangePPSPM2PS * elapsedTime.RealSeconds); + AWPrecipitationActualPPSPM2 = Math.Min(AWPrecipitationRequiredPPSPM2, AWPrecipitationActualPPSPM2 + (AWPrecipitationRateOfChangePPSPM2PS * elapsedTime.RealSeconds)); } else if (AWPrecipitationActualPPSPM2 > AWPrecipitationRequiredPPSPM2) { - AWPrecipitationActualPPSPM2 = Math.Max(AWPrecipitationRequiredPPSPM2, AWPrecipitationActualPPSPM2 - AWPrecipitationRateOfChangePPSPM2PS * elapsedTime.RealSeconds); + AWPrecipitationActualPPSPM2 = Math.Max(AWPrecipitationRequiredPPSPM2, AWPrecipitationActualPPSPM2 - (AWPrecipitationRateOfChangePPSPM2PS * elapsedTime.RealSeconds)); } else { - AWPrecipitationRateOfChangePPSPM2PS = (lastWeatherPrecipitation.PrecipitationRateOfChange / 120) * (PrecipitationViewer.MaxIntensityPPSPM2 - PrecipitationViewer.MinIntensityPPSPM2); + AWPrecipitationRateOfChangePPSPM2PS = lastWeatherPrecipitation.PrecipitationRateOfChange / 120 * (PrecipitationViewer.MaxIntensityPPSPM2 - PrecipitationViewer.MinIntensityPPSPM2); int precvariation = (int)(lastWeatherPrecipitation.PrecipitationVariation * 100); float baseDensitiy = PrecipitationViewer.MaxIntensityPPSPM2 * lastWeatherPrecipitation.PrecipitationDensity; - AWPrecipitationRequiredPPSPM2 = MathHelper.Clamp(((1.0f + ((float)Viewer.Random.Next(-precvariation, precvariation) / 100)) * baseDensitiy), + AWPrecipitationRequiredPPSPM2 = MathHelper.Clamp((1.0f + ((float)Viewer.Random.Next(-precvariation, precvariation) / 100)) * baseDensitiy, PrecipitationViewer.MinIntensityPPSPM2, PrecipitationViewer.MaxIntensityPPSPM2); #if DEBUG_AUTOWEATHER Trace.TraceInformation("New density : {0}", AWPrecipitationRequiredPPSPM2); @@ -1545,7 +1539,7 @@ void CalculatePrecipitation(WeatherSettingPrecipitation lastWeatherPrecipitation } // calculate visibility - use last visibility which is either visibility at start of precipitation (at start of spell) or visibility at minimum density (after reaching required density) - float reqVisibility = lastWeatherPrecipitation.PrecipitationVisibilityAtMinDensityM + ((float)(Math.Sqrt(AWPrecipitationRequiredPPSPM2 / PrecipitationViewer.MaxIntensityPPSPM2)) * + float reqVisibility = lastWeatherPrecipitation.PrecipitationVisibilityAtMinDensityM + ((float)Math.Sqrt(AWPrecipitationRequiredPPSPM2 / PrecipitationViewer.MaxIntensityPPSPM2) * (lastWeatherPrecipitation.PrecipitationVisibilityAtMaxDensityM - lastWeatherPrecipitation.PrecipitationVisibilityAtMinDensityM)); AWActualVisibility = AWLastVisibility + (float)(Math.Sqrt(AWPrecipitationActualPPSPM2 / AWPrecipitationRequiredPPSPM2) * (reqVisibility - AWLastVisibility)); @@ -1553,7 +1547,7 @@ void CalculatePrecipitation(WeatherSettingPrecipitation lastWeatherPrecipitation void StopPrecipitationSpell(WeatherSettingPrecipitation lastWeatherPrecipitation, ElapsedTime elapsedTime) { - AWPrecipitationActualPPSPM2 = Math.Max(PrecipitationViewer.MinIntensityPPSPM2, AWPrecipitationActualPPSPM2 - AWPrecipitationEndRate * elapsedTime.RealSeconds); + AWPrecipitationActualPPSPM2 = Math.Max(PrecipitationViewer.MinIntensityPPSPM2, AWPrecipitationActualPPSPM2 - (AWPrecipitationEndRate * elapsedTime.RealSeconds)); AWActualVisibility = AWLastVisibility + (float)(Math.Sqrt(AWPrecipitationActualPPSPM2 / PrecipitationViewer.MaxIntensityPPSPM2) * (lastWeatherPrecipitation.PrecipitationVisibilityAtMaxDensityM - AWLastVisibility)); AWOvercastCloudcover = CalculateOvercast(lastWeatherPrecipitation.Overcast, 0, lastWeatherPrecipitation.OvercastDispersion, elapsedTime); @@ -1562,29 +1556,24 @@ void StopPrecipitationSpell(WeatherSettingPrecipitation lastWeatherPrecipitation float CalculateOvercast(float requiredOvercast, float overcastVariation, float overcastRateOfChange, ElapsedTime elapsedTime) { float requiredOvercastFactor = requiredOvercast / 100f; - if (overcastRateOfChange == 0) - { - AWOvercastCloudRateOfChangepS = ((float)Viewer.Random.Next(50) / (100 * 300)) * (0.8f + ((float)Viewer.Random.Next(100) / 250)); - } - else - { - AWOvercastCloudRateOfChangepS = (overcastRateOfChange / 300) * (0.8f + ((float)Viewer.Random.Next(100) / 250)); - } + AWOvercastCloudRateOfChangepS = overcastRateOfChange == 0 + ? (float)Viewer.Random.Next(50) / (100 * 300) * (0.8f + ((float)Viewer.Random.Next(100) / 250)) + : overcastRateOfChange / 300 * (0.8f + ((float)Viewer.Random.Next(100) / 250)); if (AWOvercastCloudcover < requiredOvercastFactor) { - float newOvercast = Math.Min(requiredOvercastFactor, Weather.OvercastFactor + AWOvercastCloudRateOfChangepS * elapsedTime.RealSeconds); - return (newOvercast); + float newOvercast = Math.Min(requiredOvercastFactor, Weather.OvercastFactor + (AWOvercastCloudRateOfChangepS * elapsedTime.RealSeconds)); + return newOvercast; } else if (Weather.OvercastFactor > requiredOvercastFactor) { - float newOvercast = Math.Max(requiredOvercastFactor, Weather.OvercastFactor - AWOvercastCloudRateOfChangepS * elapsedTime.RealSeconds); - return (newOvercast); + float newOvercast = Math.Max(requiredOvercastFactor, Weather.OvercastFactor - (AWOvercastCloudRateOfChangepS * elapsedTime.RealSeconds)); + return newOvercast; } else { float newOvercast = Math.Max(0, Math.Min(1, requiredOvercastFactor + ((float)Viewer.Random.Next((int)(-0.5f * overcastVariation), (int)(0.5f * overcastVariation)) / 100))); - return (newOvercast); + return newOvercast; } } @@ -1594,7 +1583,7 @@ public override void SaveWeatherParameters(BinaryWriter outf) outf.Write(1); // save input details - foreach(WeatherSetting autoweather in weatherDetails) + foreach (WeatherSetting autoweather in weatherDetails) { if (autoweather is WeatherSettingFog) { From dadbc9fe8e9bf7433881ca9a96c5ed4ae1409b27 Mon Sep 17 00:00:00 2001 From: Looky1173 Date: Fri, 25 Aug 2023 09:41:54 +0200 Subject: [PATCH 20/33] Update locales --- Source/Locales/Contrib/Contrib.pot | 10 +- Source/Locales/Menu/Menu.pot | 325 +-- Source/Locales/ORTS.Common/ORTS.Common.pot | 466 ++-- Source/Locales/ORTS.Menu/ORTS.Menu.pot | 4 +- .../Locales/ORTS.Settings/ORTS.Settings.pot | 12 +- .../Orts.Formats.OR/Orts.Formats.OR.pot | 4 +- .../Orts.Simulation/Orts.Simulation.pot | 1808 ++++++++-------- Source/Locales/RunActivity/RunActivity.pot | 1804 +++++++++------- Source/Locales/RunActivity/hu.po | 1885 ++++++++++------- Source/Locales/Updater/Updater.pot | 4 +- 10 files changed, 3507 insertions(+), 2815 deletions(-) diff --git a/Source/Locales/Contrib/Contrib.pot b/Source/Locales/Contrib/Contrib.pot index b15250d334..a339403a03 100644 --- a/Source/Locales/Contrib/Contrib.pot +++ b/Source/Locales/Contrib/Contrib.pot @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2022-08-17 02:43:24+0200\n" -"PO-Revision-Date: 2022-08-17 02:43:28+0200\n" +"POT-Creation-Date: 2023-08-25 09:17:47+0200\n" +"PO-Revision-Date: 2023-08-25 09:17:48+0200\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -199,7 +199,7 @@ msgid "menuStrip1" msgstr "" #: ../../Contrib/ActivityEditor/ActivityEditor/Engine/ActEditor.Designer.cs:118 -#: ../../Contrib/ActivityEditor/ActivityEditor/Engine/SimpleTextEd.Designer.cs:62 +#: ../../Contrib/ActivityEditor/ActivityEditor/Engine/SimpleTextEd.Designer.cs:63 msgid "File" msgstr "" @@ -218,7 +218,7 @@ msgid "Traffic" msgstr "" #: ../../Contrib/ActivityEditor/ActivityEditor/Engine/ActEditor.Designer.cs:153 -#: ../../Contrib/ActivityEditor/ActivityEditor/Engine/SimpleTextEd.Designer.cs:68 +#: ../../Contrib/ActivityEditor/ActivityEditor/Engine/SimpleTextEd.Designer.cs:70 msgid "Save" msgstr "" @@ -351,7 +351,7 @@ msgstr "" msgid "Click to Edit Metadata for a specified route" msgstr "" -#: ../../Contrib/ActivityEditor/ActivityEditor/Engine/SimpleTextEd.Designer.cs:85 +#: ../../Contrib/ActivityEditor/ActivityEditor/Engine/SimpleTextEd.Designer.cs:91 msgid "Form1" msgstr "" diff --git a/Source/Locales/Menu/Menu.pot b/Source/Locales/Menu/Menu.pot index 4f91e69f0d..1e7573c77f 100644 --- a/Source/Locales/Menu/Menu.pot +++ b/Source/Locales/Menu/Menu.pot @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2022-08-17 02:43:28+0200\n" -"PO-Revision-Date: 2022-08-17 02:43:29+0200\n" +"POT-Creation-Date: 2023-08-25 09:17:51+0200\n" +"PO-Revision-Date: 2023-08-25 09:17:51+0200\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -113,7 +113,7 @@ msgid "Rain" msgstr "" #: ../../Menu/MainForm.cs:156 -#: ../../Menu/Options.cs:583 +#: ../../Menu/Options.cs:596 msgid "Easy" msgstr "" @@ -122,7 +122,7 @@ msgid "Medium" msgstr "" #: ../../Menu/MainForm.cs:158 -#: ../../Menu/Options.cs:589 +#: ../../Menu/Options.cs:602 msgid "Hard" msgstr "" @@ -255,7 +255,7 @@ msgid "Logging" msgstr "" #: ../../Menu/MainForm.Designer.cs:159 -#: ../../Menu/Options.Designer.cs:2440 +#: ../../Menu/Options.Designer.cs:2667 msgid "Options" msgstr "" @@ -527,6 +527,7 @@ msgid "Unstable" msgstr "" #: ../../Menu/Options.cs:266 +#: ../../Menu/Options.cs:311 msgid "None" msgstr "" @@ -549,55 +550,67 @@ msgstr "" msgid "No updates." msgstr "" -#: ../../Menu/Options.cs:396 +#: ../../Menu/Options.cs:312 +msgid "Information" +msgstr "" + +#: ../../Menu/Options.cs:313 +msgid "Warning" +msgstr "" + +#: ../../Menu/Options.cs:314 +msgid "Error" +msgstr "" + +#: ../../Menu/Options.cs:409 msgid "Click to change this key" msgstr "" -#: ../../Menu/Options.cs:412 +#: ../../Menu/Options.cs:425 msgid "" "Continue with conflicting key assignments?\n" "\n" msgstr "" -#: ../../Menu/Options.cs:534 +#: ../../Menu/Options.cs:547 msgid "Remove all custom key assignments?" msgstr "" -#: ../../Menu/Options.cs:545 +#: ../../Menu/Options.cs:558 msgid "" "A listing of all keyboard commands and keys has been placed here:\n" "\n" msgstr "" -#: ../../Menu/Options.cs:554 +#: ../../Menu/Options.cs:567 msgid "No errors found." msgstr "" -#: ../../Menu/Options.cs:581 +#: ../../Menu/Options.cs:594 msgid "Very easy" msgstr "" -#: ../../Menu/Options.cs:585 +#: ../../Menu/Options.cs:598 msgid "MSTS Compatible" msgstr "" -#: ../../Menu/Options.cs:587 +#: ../../Menu/Options.cs:600 msgid "Normal" msgstr "" -#: ../../Menu/Options.cs:591 +#: ../../Menu/Options.cs:604 msgid "Very Hard" msgstr "" -#: ../../Menu/Options.cs:593 +#: ../../Menu/Options.cs:606 msgid "Good luck!" msgstr "" -#: ../../Menu/Options.cs:688 +#: ../../Menu/Options.cs:701 msgid "Select an installation profile (MSTS folder) to add:" msgstr "" -#: ../../Menu/Options.cs:559 +#: ../../Menu/Options.cs:572 #, csharp-format msgid "" "{0:F0}° vertical FOV is the same as:\n" @@ -605,507 +618,515 @@ msgid "" "{2:F0}° horizontal FOV on 16:9" msgstr "" -#: ../../Menu/Options.cs:603 +#: ../../Menu/Options.cs:616 #, csharp-format msgid "{0}%" msgstr "" -#: ../../Menu/Options.cs:639 +#: ../../Menu/Options.cs:652 #, csharp-format msgid "No detail (-{0}%)" msgstr "" -#: ../../Menu/Options.cs:641 +#: ../../Menu/Options.cs:654 #, csharp-format msgid "Less detail (-{0}%)" msgstr "" -#: ../../Menu/Options.cs:643 +#: ../../Menu/Options.cs:656 #, csharp-format msgid "Default detail (+{0}%)" msgstr "" -#: ../../Menu/Options.cs:645 +#: ../../Menu/Options.cs:658 #, csharp-format msgid "More detail (+{0}%)" msgstr "" -#: ../../Menu/Options.cs:647 +#: ../../Menu/Options.cs:660 #, csharp-format msgid "All detail (+{0}%)" msgstr "" -#: ../../Menu/Options.Designer.cs:268 +#: ../../Menu/Options.Designer.cs:293 msgid "OK" msgstr "" -#: ../../Menu/Options.Designer.cs:302 +#: ../../Menu/Options.Designer.cs:327 msgid "Brake pipe charging rate (PSI/s) " msgstr "" -#: ../../Menu/Options.Designer.cs:313 +#: ../../Menu/Options.Designer.cs:338 msgid "Graduated release air brakes " msgstr "" -#: ../../Menu/Options.Designer.cs:326 +#: ../../Menu/Options.Designer.cs:351 #: ../../Menu/TestingForm.Designer.cs:87 msgid "Cancel" msgstr "" -#: ../../Menu/Options.Designer.cs:336 +#: ../../Menu/Options.Designer.cs:361 msgid "Alerter in cab " msgstr "" -#: ../../Menu/Options.Designer.cs:390 +#: ../../Menu/Options.Designer.cs:415 msgid "General" msgstr "" -#: ../../Menu/Options.Designer.cs:496 +#: ../../Menu/Options.Designer.cs:521 msgid "Overspeed monitor " msgstr "" -#: ../../Menu/Options.Designer.cs:508 +#: ../../Menu/Options.Designer.cs:533 msgid "Use TCS scripts " msgstr "" -#: ../../Menu/Options.Designer.cs:521 +#: ../../Menu/Options.Designer.cs:546 msgid "Other units " msgstr "" -#: ../../Menu/Options.Designer.cs:533 +#: ../../Menu/Options.Designer.cs:558 msgid "Pressure unit " msgstr "" -#: ../../Menu/Options.Designer.cs:563 +#: ../../Menu/Options.Designer.cs:588 msgid "Also in external views " msgstr "" -#: ../../Menu/Options.Designer.cs:573 +#: ../../Menu/Options.Designer.cs:598 msgid "Retainer valve on all cars " msgstr "" -#: ../../Menu/Options.Designer.cs:594 +#: ../../Menu/Options.Designer.cs:619 msgid "Audio" msgstr "" -#: ../../Menu/Options.Designer.cs:660 +#: ../../Menu/Options.Designer.cs:685 msgid "% external sound heard internally" msgstr "" -#: ../../Menu/Options.Designer.cs:696 +#: ../../Menu/Options.Designer.cs:721 msgid "% sound volume" msgstr "" -#: ../../Menu/Options.Designer.cs:707 +#: ../../Menu/Options.Designer.cs:732 msgid "Sound detail level" msgstr "" -#: ../../Menu/Options.Designer.cs:755 +#: ../../Menu/Options.Designer.cs:799 msgid "Video" msgstr "" -#: ../../Menu/Options.Designer.cs:765 +#: ../../Menu/Options.Designer.cs:821 +msgid "Default detail (+0%)" +msgstr "" + +#: ../../Menu/Options.Designer.cs:999 +msgid "Level of detail bias:" +msgstr "" + +#: ../../Menu/Options.Designer.cs:1025 +msgid "Signal light glow" +msgstr "" + +#: ../../Menu/Options.Designer.cs:1036 msgid "Extend object maximum viewing distance to horizon" msgstr "" -#: ../../Menu/Options.Designer.cs:776 -#: ../../Menu/Options.Designer.cs:977 +#: ../../Menu/Options.Designer.cs:1049 +#: ../../Menu/Options.Designer.cs:1268 msgid "XXX" msgstr "" -#: ../../Menu/Options.Designer.cs:787 +#: ../../Menu/Options.Designer.cs:1059 msgid "Anti-aliasing:" msgstr "" -#: ../../Menu/Options.Designer.cs:813 +#: ../../Menu/Options.Designer.cs:1088 msgid "Shadow for all shapes" msgstr "" -#: ../../Menu/Options.Designer.cs:823 +#: ../../Menu/Options.Designer.cs:1099 msgid "Double overhead wires" msgstr "" -#: ../../Menu/Options.Designer.cs:834 +#: ../../Menu/Options.Designer.cs:1111 msgid "Ambient daylight brightness:" msgstr "" -#: ../../Menu/Options.Designer.cs:852 +#: ../../Menu/Options.Designer.cs:1122 +msgid "YYY" +msgstr "" + +#: ../../Menu/Options.Designer.cs:1131 msgid "Model instancing" msgstr "" -#: ../../Menu/Options.Designer.cs:879 +#: ../../Menu/Options.Designer.cs:1161 msgid "Vertical sync" msgstr "" -#: ../../Menu/Options.Designer.cs:890 +#: ../../Menu/Options.Designer.cs:1173 msgid "Viewing distance (km)" msgstr "" -#: ../../Menu/Options.Designer.cs:928 +#: ../../Menu/Options.Designer.cs:1214 msgid "Distant mountains" msgstr "" -#: ../../Menu/Options.Designer.cs:940 +#: ../../Menu/Options.Designer.cs:1227 msgid "Viewing distance (m)" msgstr "" -#: ../../Menu/Options.Designer.cs:1010 +#: ../../Menu/Options.Designer.cs:1302 msgid "Viewing vertical FOV" msgstr "" -#: ../../Menu/Options.Designer.cs:1020 +#: ../../Menu/Options.Designer.cs:1313 msgid "World object density" msgstr "" -#: ../../Menu/Options.Designer.cs:1041 +#: ../../Menu/Options.Designer.cs:1337 msgid "Dynamic shadows" msgstr "" -#: ../../Menu/Options.Designer.cs:1051 +#: ../../Menu/Options.Designer.cs:1348 msgid "Overhead wire" msgstr "" -#: ../../Menu/Options.Designer.cs:1072 +#: ../../Menu/Options.Designer.cs:1371 msgid "Simulation" msgstr "" -#: ../../Menu/Options.Designer.cs:1085 +#: ../../Menu/Options.Designer.cs:1384 msgid "Electric - power connected" msgstr "" -#: ../../Menu/Options.Designer.cs:1095 +#: ../../Menu/Options.Designer.cs:1394 msgid "At game start, locomotives have:" msgstr "" -#: ../../Menu/Options.Designer.cs:1104 +#: ../../Menu/Options.Designer.cs:1403 msgid "Diesel - engine(s) started" msgstr "" -#: ../../Menu/Options.Designer.cs:1118 +#: ../../Menu/Options.Designer.cs:1417 msgid "Activity Options" msgstr "" -#: ../../Menu/Options.Designer.cs:1128 +#: ../../Menu/Options.Designer.cs:1427 msgid "Location-linked passing path processing" msgstr "" -#: ../../Menu/Options.Designer.cs:1139 +#: ../../Menu/Options.Designer.cs:1438 msgid "Open/close doors in AI trains" msgstr "" -#: ../../Menu/Options.Designer.cs:1150 +#: ../../Menu/Options.Designer.cs:1449 msgid "Forced red at station stops" msgstr "" -#: ../../Menu/Options.Designer.cs:1160 +#: ../../Menu/Options.Designer.cs:1459 msgid "Steam - boiler pre-heated" msgstr "" -#: ../../Menu/Options.Designer.cs:1170 +#: ../../Menu/Options.Designer.cs:1469 msgid "Simple controls and physics" msgstr "" -#: ../../Menu/Options.Designer.cs:1180 +#: ../../Menu/Options.Designer.cs:1479 msgid "Curve dependent speed limit" msgstr "" -#: ../../Menu/Options.Designer.cs:1191 +#: ../../Menu/Options.Designer.cs:1490 msgid "Adhesion moving average filter size" msgstr "" -#: ../../Menu/Options.Designer.cs:1218 +#: ../../Menu/Options.Designer.cs:1517 msgid "Break couplers" msgstr "" -#: ../../Menu/Options.Designer.cs:1228 +#: ../../Menu/Options.Designer.cs:1527 msgid "Advanced adhesion model" msgstr "" -#: ../../Menu/Options.Designer.cs:1244 +#: ../../Menu/Options.Designer.cs:1543 msgid "Keyboard" msgstr "" -#: ../../Menu/Options.Designer.cs:1254 +#: ../../Menu/Options.Designer.cs:1553 msgid "Export" msgstr "" -#: ../../Menu/Options.Designer.cs:1267 +#: ../../Menu/Options.Designer.cs:1566 msgid "Defaults" msgstr "" -#: ../../Menu/Options.Designer.cs:1279 +#: ../../Menu/Options.Designer.cs:1578 msgid "Check" msgstr "" -#: ../../Menu/Options.Designer.cs:1313 +#: ../../Menu/Options.Designer.cs:1612 msgid "Data logger" msgstr "" -#: ../../Menu/Options.Designer.cs:1344 +#: ../../Menu/Options.Designer.cs:1643 msgid "Speed units" msgstr "" -#: ../../Menu/Options.Designer.cs:1366 +#: ../../Menu/Options.Designer.cs:1665 msgid "Log miscellaneous data" msgstr "" -#: ../../Menu/Options.Designer.cs:1376 +#: ../../Menu/Options.Designer.cs:1675 msgid "Log performance data" msgstr "" -#: ../../Menu/Options.Designer.cs:1386 +#: ../../Menu/Options.Designer.cs:1685 msgid "Start logging with the simulation start" msgstr "" -#: ../../Menu/Options.Designer.cs:1397 +#: ../../Menu/Options.Designer.cs:1696 msgid "Separator" msgstr "" -#: ../../Menu/Options.Designer.cs:1406 +#: ../../Menu/Options.Designer.cs:1705 msgid "Log physics data" msgstr "" -#: ../../Menu/Options.Designer.cs:1416 +#: ../../Menu/Options.Designer.cs:1715 msgid "Log Steam performance data" msgstr "" -#: ../../Menu/Options.Designer.cs:1426 +#: ../../Menu/Options.Designer.cs:1725 msgid "Verbose ENG/WAG configuration messages" msgstr "" -#: ../../Menu/Options.Designer.cs:1441 +#: ../../Menu/Options.Designer.cs:1740 msgid "Evaluation" msgstr "" -#: ../../Menu/Options.Designer.cs:1461 +#: ../../Menu/Options.Designer.cs:1760 msgid "Interval (sec)" msgstr "" -#: ../../Menu/Options.Designer.cs:1470 +#: ../../Menu/Options.Designer.cs:1769 msgid "Log station stops" msgstr "" -#: ../../Menu/Options.Designer.cs:1503 +#: ../../Menu/Options.Designer.cs:1802 msgid "Log train speed" msgstr "" -#: ../../Menu/Options.Designer.cs:1519 +#: ../../Menu/Options.Designer.cs:1818 msgid "Content" msgstr "" -#: ../../Menu/Options.Designer.cs:1542 +#: ../../Menu/Options.Designer.cs:1841 #: ../../Menu/ResumeForm.Designer.cs:150 msgid "Delete" msgstr "" -#: ../../Menu/Options.Designer.cs:1560 +#: ../../Menu/Options.Designer.cs:1859 msgid "Installation profile" msgstr "" -#: ../../Menu/Options.Designer.cs:1569 +#: ../../Menu/Options.Designer.cs:1868 msgid "Change..." msgstr "" -#: ../../Menu/Options.Designer.cs:1590 +#: ../../Menu/Options.Designer.cs:1889 msgid "Name:" msgstr "" -#: ../../Menu/Options.Designer.cs:1599 +#: ../../Menu/Options.Designer.cs:1898 msgid "Path:" msgstr "" -#: ../../Menu/Options.Designer.cs:1618 +#: ../../Menu/Options.Designer.cs:1917 msgid "Add..." msgstr "" -#: ../../Menu/Options.Designer.cs:1725 +#: ../../Menu/Options.Designer.cs:2025 msgid "System" msgstr "" -#: ../../Menu/Options.Designer.cs:1747 +#: ../../Menu/Options.Designer.cs:2047 msgid "Target frame rate" msgstr "" -#: ../../Menu/Options.Designer.cs:1786 +#: ../../Menu/Options.Designer.cs:2086 msgid "Automatically tune settings to keep performance level" msgstr "" -#: ../../Menu/Options.Designer.cs:1810 +#: ../../Menu/Options.Designer.cs:2110 msgid "Web server port" msgstr "" -#: ../../Menu/Options.Designer.cs:1854 -msgid "Show control confirmations " +#: ../../Menu/Options.Designer.cs:2166 +msgid "Messages suppressed " msgstr "" -#: ../../Menu/Options.Designer.cs:1877 +#: ../../Menu/Options.Designer.cs:2188 msgid "Use glass for in-game windows" msgstr "" -#: ../../Menu/Options.Designer.cs:1915 +#: ../../Menu/Options.Designer.cs:2226 msgid "Window size (choose or specify WIDTHxHEIGHT)" msgstr "" -#: ../../Menu/Options.Designer.cs:1937 +#: ../../Menu/Options.Designer.cs:2248 msgid "Windowed" msgstr "" -#: ../../Menu/Options.Designer.cs:1973 +#: ../../Menu/Options.Designer.cs:2284 msgid "Language " msgstr "" -#: ../../Menu/Options.Designer.cs:1995 +#: ../../Menu/Options.Designer.cs:2306 msgid "Update mode:" msgstr "" -#: ../../Menu/Options.Designer.cs:2035 +#: ../../Menu/Options.Designer.cs:2342 msgid "Experimental" msgstr "" -#: ../../Menu/Options.Designer.cs:2046 -#: ../../Menu/Options.Designer.cs:2090 -#: ../../Menu/Options.Designer.cs:2351 +#: ../../Menu/Options.Designer.cs:2353 +#: ../../Menu/Options.Designer.cs:2397 +#: ../../Menu/Options.Designer.cs:2614 msgid "Level" msgstr "" -#: ../../Menu/Options.Designer.cs:2070 +#: ../../Menu/Options.Designer.cs:2377 msgid "Activity weather randomization" msgstr "" -#: ../../Menu/Options.Designer.cs:2080 +#: ../../Menu/Options.Designer.cs:2387 msgid "Activity randomization" msgstr "" -#: ../../Menu/Options.Designer.cs:2113 +#: ../../Menu/Options.Designer.cs:2420 msgid "Correct questionable braking parameters" msgstr "" -#: ../../Menu/Options.Designer.cs:2124 +#: ../../Menu/Options.Designer.cs:2431 msgid "Adhesion factor random change:" msgstr "" -#: ../../Menu/Options.Designer.cs:2134 +#: ../../Menu/Options.Designer.cs:2441 msgid "Adhesion factor correction:" msgstr "" -#: ../../Menu/Options.Designer.cs:2144 -msgid "Level of detail bias:" -msgstr "" - -#: ../../Menu/Options.Designer.cs:2180 +#: ../../Menu/Options.Designer.cs:2468 msgid "Show shape warnings" msgstr "" -#: ../../Menu/Options.Designer.cs:2213 +#: ../../Menu/Options.Designer.cs:2486 msgid "Level:" msgstr "" -#: ../../Menu/Options.Designer.cs:2253 -msgid "Signal light glow" -msgstr "" - -#: ../../Menu/Options.Designer.cs:2263 +#: ../../Menu/Options.Designer.cs:2526 msgid "MSTS environments" msgstr "" -#: ../../Menu/Options.Designer.cs:2274 +#: ../../Menu/Options.Designer.cs:2537 msgid "Gauge (mm)" msgstr "" -#: ../../Menu/Options.Designer.cs:2312 +#: ../../Menu/Options.Designer.cs:2575 msgid "Minimum length (m)" msgstr "" -#: ../../Menu/Options.Designer.cs:2363 +#: ../../Menu/Options.Designer.cs:2626 msgid "" "Experimental features that may slow down the game, use at your own risk." msgstr "" -#: ../../Menu/Options.Designer.cs:2387 +#: ../../Menu/Options.Designer.cs:2650 msgid "Super-elevation" msgstr "" -#: ../../Menu/Options.Designer.cs:1356 +#: ../../Menu/Options.Designer.cs:1655 msgid "" "Use data logger to record your simulation data (in-game command: F12).\r\n" "Please remember that the size of the dump file grows with the simulation " "time!" msgstr "" -#: ../../Menu/Options.Designer.cs:1532 +#: ../../Menu/Options.Designer.cs:1831 msgid "" "Installation profiles tell Open Rails where to look for game content. Add " "each full and mini-route MSTS installation." msgstr "" -#: ../../Menu/Options.Designer.cs:1681 +#: ../../Menu/Options.Designer.cs:1980 msgid "Name" msgstr "" -#: ../../Menu/Options.Designer.cs:1689 +#: ../../Menu/Options.Designer.cs:1988 #: ../../Menu/ResumeForm.Designer.cs:372 msgid "Path" msgstr "" -#: ../../Menu/Options.Designer.cs:644 +#: ../../Menu/Options.Designer.cs:669 msgid "" "Min 0 Max 100. Higher: louder sound\r\n" "\r\n" msgstr "" -#: ../../Menu/Options.Designer.cs:680 +#: ../../Menu/Options.Designer.cs:705 msgid "Sound Volume 0-100" msgstr "" -#: ../../Menu/Options.Designer.cs:802 +#: ../../Menu/Options.Designer.cs:1015 +msgid "Default is 0%" +msgstr "" + +#: ../../Menu/Options.Designer.cs:1076 msgid "Default is 2x MSAA" msgstr "" -#: ../../Menu/Options.Designer.cs:868 +#: ../../Menu/Options.Designer.cs:1149 msgid "Default is 100%" msgstr "" -#: ../../Menu/Options.Designer.cs:914 -#: ../../Menu/Options.Designer.cs:1773 +#: ../../Menu/Options.Designer.cs:1199 +#: ../../Menu/Options.Designer.cs:2073 msgid "Distance to see mountains" msgstr "" -#: ../../Menu/Options.Designer.cs:1268 +#: ../../Menu/Options.Designer.cs:1567 msgid "Load the factory default key assignments." msgstr "" -#: ../../Menu/Options.Designer.cs:1280 +#: ../../Menu/Options.Designer.cs:1579 msgid "Check for incorrect key assignments." msgstr "" -#: ../../Menu/Options.Designer.cs:2060 -#: ../../Menu/Options.Designer.cs:2104 +#: ../../Menu/Options.Designer.cs:2367 +#: ../../Menu/Options.Designer.cs:2411 msgid "" "0: no randomization, 1: moderate, 2: significant; 3: high (may be " "unrealistic)" msgstr "" -#: ../../Menu/Options.Designer.cs:2195 -msgid "Default is 0%" -msgstr "" - -#: ../../Menu/Options.Designer.cs:2226 +#: ../../Menu/Options.Designer.cs:2499 msgid "Default is 10%" msgstr "" -#: ../../Menu/Options.Designer.cs:2242 +#: ../../Menu/Options.Designer.cs:2515 msgid "Default is 130%" msgstr "" -#: ../../Menu/Options.Designer.cs:2336 +#: ../../Menu/Options.Designer.cs:2599 msgid "Shortest curve to have elevation" msgstr "" -#: ../../Menu/Options.Designer.cs:2377 +#: ../../Menu/Options.Designer.cs:2640 msgid "0: no elevation, 1: 9cm max; 10: 18cm max" msgstr "" -#: ../../Menu/Options.Designer.cs:1255 +#: ../../Menu/Options.Designer.cs:1554 msgid "" "Generate a listing of your keyboard assignments. \r\n" "The output is placed on your desktop." diff --git a/Source/Locales/ORTS.Common/ORTS.Common.pot b/Source/Locales/ORTS.Common/ORTS.Common.pot index f5a11c24cd..64142068d3 100644 --- a/Source/Locales/ORTS.Common/ORTS.Common.pot +++ b/Source/Locales/ORTS.Common/ORTS.Common.pot @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2022-08-17 02:43:29+0200\n" -"PO-Revision-Date: 2022-08-17 02:43:29+0200\n" +"POT-Creation-Date: 2023-08-25 09:17:55+0200\n" +"PO-Revision-Date: 2023-08-25 09:17:55+0200\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -254,786 +254,858 @@ msgid "Game Multi Player Dispatcher" msgstr "" #: ../../ORTS.Common/Input/UserCommand.cs:26 -msgid "Game Multi Player Texting" +msgid "Game Multi Player Dispatcher Beta" msgstr "" #: ../../ORTS.Common/Input/UserCommand.cs:27 -msgid "Game Switch Manual Mode" +msgid "Game Multi Player Texting" msgstr "" #: ../../ORTS.Common/Input/UserCommand.cs:28 -msgid "Game Reset Out Of Control Mode" +msgid "Game Switch Manual Mode" msgstr "" #: ../../ORTS.Common/Input/UserCommand.cs:29 -msgid "Game Clear Signal Forward" +msgid "Game Reset Out Of Control Mode" msgstr "" #: ../../ORTS.Common/Input/UserCommand.cs:30 -msgid "Game Clear Signal Backward" +msgid "Game Clear Signal Forward" msgstr "" #: ../../ORTS.Common/Input/UserCommand.cs:31 -msgid "Game Reset Signal Forward" +msgid "Game Clear Signal Backward" msgstr "" #: ../../ORTS.Common/Input/UserCommand.cs:32 -msgid "Game Reset Signal Backward" +msgid "Game Reset Signal Forward" msgstr "" #: ../../ORTS.Common/Input/UserCommand.cs:33 -msgid "Game Autopilot Mode" +msgid "Game Reset Signal Backward" msgstr "" #: ../../ORTS.Common/Input/UserCommand.cs:34 +msgid "Game Autopilot Mode" +msgstr "" + +#: ../../ORTS.Common/Input/UserCommand.cs:35 msgid "Game Suspend Old Player" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:36 +#: ../../ORTS.Common/Input/UserCommand.cs:37 msgid "Display Next Window Tab" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:37 +#: ../../ORTS.Common/Input/UserCommand.cs:38 msgid "Display Help Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:38 +#: ../../ORTS.Common/Input/UserCommand.cs:39 msgid "Display Track Monitor Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:39 +#: ../../ORTS.Common/Input/UserCommand.cs:40 msgid "Display HUD" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:40 +#: ../../ORTS.Common/Input/UserCommand.cs:41 msgid "Display Train Driving Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:41 +#: ../../ORTS.Common/Input/UserCommand.cs:42 msgid "Display Multi Player Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:42 +#: ../../ORTS.Common/Input/UserCommand.cs:43 msgid "Display Car Labels" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:43 +#: ../../ORTS.Common/Input/UserCommand.cs:44 msgid "Display Station Labels" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:44 +#: ../../ORTS.Common/Input/UserCommand.cs:45 msgid "Display Switch Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:45 +#: ../../ORTS.Common/Input/UserCommand.cs:46 msgid "Display Train Operations Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:46 +#: ../../ORTS.Common/Input/UserCommand.cs:47 msgid "Display Train Dpu Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:47 +#: ../../ORTS.Common/Input/UserCommand.cs:48 msgid "Display Next Station Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:48 +#: ../../ORTS.Common/Input/UserCommand.cs:49 msgid "Display Compass Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:49 +#: ../../ORTS.Common/Input/UserCommand.cs:50 msgid "Display Train List Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:50 +#: ../../ORTS.Common/Input/UserCommand.cs:51 msgid "Display EOT List Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:52 +#: ../../ORTS.Common/Input/UserCommand.cs:53 msgid "Debug Speed Up" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:53 +#: ../../ORTS.Common/Input/UserCommand.cs:54 msgid "Debug Speed Down" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:54 +#: ../../ORTS.Common/Input/UserCommand.cs:55 msgid "Debug Speed Reset" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:55 +#: ../../ORTS.Common/Input/UserCommand.cs:56 msgid "Debug Overcast Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:56 +#: ../../ORTS.Common/Input/UserCommand.cs:57 msgid "Debug Overcast Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:57 +#: ../../ORTS.Common/Input/UserCommand.cs:58 msgid "Debug Fog Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:58 +#: ../../ORTS.Common/Input/UserCommand.cs:59 msgid "Debug Fog Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:59 +#: ../../ORTS.Common/Input/UserCommand.cs:60 msgid "Debug Precipitation Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:60 +#: ../../ORTS.Common/Input/UserCommand.cs:61 msgid "Debug Precipitation Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:61 +#: ../../ORTS.Common/Input/UserCommand.cs:62 msgid "Debug Precipitation Liquidity Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:62 +#: ../../ORTS.Common/Input/UserCommand.cs:63 msgid "Debug Precipitation Liquidity Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:63 +#: ../../ORTS.Common/Input/UserCommand.cs:64 +msgid "Debug Daylight Offset Increase" +msgstr "" + +#: ../../ORTS.Common/Input/UserCommand.cs:65 +msgid "Debug Daylight Offset Decrease" +msgstr "" + +#: ../../ORTS.Common/Input/UserCommand.cs:66 msgid "Debug Weather Change" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:64 +#: ../../ORTS.Common/Input/UserCommand.cs:67 msgid "Debug Clock Forwards" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:65 +#: ../../ORTS.Common/Input/UserCommand.cs:68 msgid "Debug Clock Backwards" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:66 +#: ../../ORTS.Common/Input/UserCommand.cs:69 msgid "Debug Logger" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:67 +#: ../../ORTS.Common/Input/UserCommand.cs:70 msgid "Debug Lock Shadows" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:68 +#: ../../ORTS.Common/Input/UserCommand.cs:71 msgid "Debug Dump Keyboard Map" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:69 +#: ../../ORTS.Common/Input/UserCommand.cs:72 msgid "Debug Log Render Frame" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:70 +#: ../../ORTS.Common/Input/UserCommand.cs:73 msgid "Debug Tracks" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:71 +#: ../../ORTS.Common/Input/UserCommand.cs:74 msgid "Debug Signalling" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:72 +#: ../../ORTS.Common/Input/UserCommand.cs:75 msgid "Debug Reset Wheel Slip" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:73 +#: ../../ORTS.Common/Input/UserCommand.cs:76 msgid "Debug Toggle Advanced Adhesion" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:74 +#: ../../ORTS.Common/Input/UserCommand.cs:77 msgid "Debug Sound Form" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:75 +#: ../../ORTS.Common/Input/UserCommand.cs:78 msgid "Debug Physics Form" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:76 +#: ../../ORTS.Common/Input/UserCommand.cs:79 msgid "Debug Toggle Confirmations" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:78 +#: ../../ORTS.Common/Input/UserCommand.cs:81 msgid "Camera Cab" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:79 +#: ../../ORTS.Common/Input/UserCommand.cs:82 msgid "Camera Change Passenger Viewpoint" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:80 +#: ../../ORTS.Common/Input/UserCommand.cs:83 msgid "Camera Toggle 3D Cab" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:81 +#: ../../ORTS.Common/Input/UserCommand.cs:84 msgid "Camera Toggle Show Cab" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:82 +#: ../../ORTS.Common/Input/UserCommand.cs:85 msgid "Camera Toggle Letterbox Cab" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:83 +#: ../../ORTS.Common/Input/UserCommand.cs:86 msgid "Camera Head Out Forward" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:84 +#: ../../ORTS.Common/Input/UserCommand.cs:87 msgid "Camera Head Out Backward" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:85 +#: ../../ORTS.Common/Input/UserCommand.cs:88 msgid "Camera Outside Front" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:86 +#: ../../ORTS.Common/Input/UserCommand.cs:89 msgid "Camera Outside Rear" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:87 +#: ../../ORTS.Common/Input/UserCommand.cs:90 msgid "Camera Trackside" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:88 +#: ../../ORTS.Common/Input/UserCommand.cs:91 msgid "Camera SpecialTracksidePoint" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:89 +#: ../../ORTS.Common/Input/UserCommand.cs:92 msgid "Camera Passenger" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:90 +#: ../../ORTS.Common/Input/UserCommand.cs:93 msgid "Camera Brakeman" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:91 +#: ../../ORTS.Common/Input/UserCommand.cs:94 msgid "Camera Free" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:92 +#: ../../ORTS.Common/Input/UserCommand.cs:95 msgid "Camera Previous Free" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:93 +#: ../../ORTS.Common/Input/UserCommand.cs:96 msgid "Camera Reset" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:94 +#: ../../ORTS.Common/Input/UserCommand.cs:97 msgid "Camera Move Fast" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:95 +#: ../../ORTS.Common/Input/UserCommand.cs:98 msgid "Camera Move Slow" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:96 +#: ../../ORTS.Common/Input/UserCommand.cs:99 msgid "Camera Pan (Rotate) Left" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:97 +#: ../../ORTS.Common/Input/UserCommand.cs:100 msgid "Camera Pan (Rotate) Right" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:98 +#: ../../ORTS.Common/Input/UserCommand.cs:101 msgid "Camera Pan (Rotate) Up" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:99 +#: ../../ORTS.Common/Input/UserCommand.cs:102 msgid "Camera Pan (Rotate) Down" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:100 +#: ../../ORTS.Common/Input/UserCommand.cs:103 msgid "Camera Zoom In (Move Z)" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:101 +#: ../../ORTS.Common/Input/UserCommand.cs:104 msgid "Camera Zoom Out (Move Z)" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:102 +#: ../../ORTS.Common/Input/UserCommand.cs:105 msgid "Camera Rotate (Pan) Left" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:103 +#: ../../ORTS.Common/Input/UserCommand.cs:106 msgid "Camera Rotate (Pan) Right" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:104 +#: ../../ORTS.Common/Input/UserCommand.cs:107 msgid "Camera Rotate (Pan) Up" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:105 +#: ../../ORTS.Common/Input/UserCommand.cs:108 msgid "Camera Rotate (Pan) Down" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:106 +#: ../../ORTS.Common/Input/UserCommand.cs:109 msgid "Camera Car Next" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:107 +#: ../../ORTS.Common/Input/UserCommand.cs:110 msgid "Camera Car Previous" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:108 +#: ../../ORTS.Common/Input/UserCommand.cs:111 msgid "Camera Car First" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:109 +#: ../../ORTS.Common/Input/UserCommand.cs:112 msgid "Camera Car Last" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:110 +#: ../../ORTS.Common/Input/UserCommand.cs:113 msgid "Camera Jumping Trains" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:111 +#: ../../ORTS.Common/Input/UserCommand.cs:114 msgid "Camera Jump Back Player" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:112 +#: ../../ORTS.Common/Input/UserCommand.cs:115 msgid "Camera Jump See Switch" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:113 +#: ../../ORTS.Common/Input/UserCommand.cs:116 msgid "Camera Vibrate" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:114 +#: ../../ORTS.Common/Input/UserCommand.cs:117 msgid "Camera Scroll Right" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:115 +#: ../../ORTS.Common/Input/UserCommand.cs:118 msgid "Camera Scroll Left" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:116 +#: ../../ORTS.Common/Input/UserCommand.cs:119 msgid "Camera Browse Backwards" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:117 +#: ../../ORTS.Common/Input/UserCommand.cs:120 msgid "Camera Browse Forwards" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:119 +#: ../../ORTS.Common/Input/UserCommand.cs:122 msgid "Control Forwards" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:120 +#: ../../ORTS.Common/Input/UserCommand.cs:123 msgid "Control Backwards" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:121 +#: ../../ORTS.Common/Input/UserCommand.cs:124 msgid "Control Throttle Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:122 +#: ../../ORTS.Common/Input/UserCommand.cs:125 msgid "Control Throttle Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:123 +#: ../../ORTS.Common/Input/UserCommand.cs:126 msgid "Control Throttle Zero" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:124 +#: ../../ORTS.Common/Input/UserCommand.cs:127 msgid "Control Gear Up" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:125 +#: ../../ORTS.Common/Input/UserCommand.cs:128 msgid "Control Gear Down" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:126 +#: ../../ORTS.Common/Input/UserCommand.cs:129 msgid "Control Train Brake Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:127 +#: ../../ORTS.Common/Input/UserCommand.cs:130 msgid "Control Train Brake Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:128 +#: ../../ORTS.Common/Input/UserCommand.cs:131 msgid "Control Train Brake Zero" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:129 +#: ../../ORTS.Common/Input/UserCommand.cs:132 msgid "Control Engine Brake Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:130 +#: ../../ORTS.Common/Input/UserCommand.cs:133 msgid "Control Engine Brake Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:131 +#: ../../ORTS.Common/Input/UserCommand.cs:134 msgid "Control Brakeman Brake Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:132 +#: ../../ORTS.Common/Input/UserCommand.cs:135 msgid "Control Brakeman Brake Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:133 +#: ../../ORTS.Common/Input/UserCommand.cs:136 msgid "Control Dynamic Brake Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:134 +#: ../../ORTS.Common/Input/UserCommand.cs:137 msgid "Control Dynamic Brake Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:135 +#: ../../ORTS.Common/Input/UserCommand.cs:138 msgid "Control Bail Off" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:136 +#: ../../ORTS.Common/Input/UserCommand.cs:139 +msgid "Control Brake Quick Release" +msgstr "" + +#: ../../ORTS.Common/Input/UserCommand.cs:140 +msgid "Control Brake Overcharge" +msgstr "" + +#: ../../ORTS.Common/Input/UserCommand.cs:141 msgid "Control Initialize Brakes" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:137 +#: ../../ORTS.Common/Input/UserCommand.cs:142 msgid "Control Handbrake Full" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:138 +#: ../../ORTS.Common/Input/UserCommand.cs:143 msgid "Control Handbrake None" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:139 +#: ../../ORTS.Common/Input/UserCommand.cs:144 msgid "Control Odometer Show/Hide" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:140 +#: ../../ORTS.Common/Input/UserCommand.cs:145 msgid "Control Odometer Reset" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:141 +#: ../../ORTS.Common/Input/UserCommand.cs:146 msgid "Control Odometer Direction" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:142 +#: ../../ORTS.Common/Input/UserCommand.cs:147 msgid "Control Retainers On" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:143 +#: ../../ORTS.Common/Input/UserCommand.cs:148 msgid "Control Retainers Off" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:144 +#: ../../ORTS.Common/Input/UserCommand.cs:149 msgid "Control Brake Hose Connect" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:145 +#: ../../ORTS.Common/Input/UserCommand.cs:150 msgid "Control Brake Hose Disconnect" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:146 +#: ../../ORTS.Common/Input/UserCommand.cs:151 msgid "Control Alerter" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:147 +#: ../../ORTS.Common/Input/UserCommand.cs:152 msgid "Control Emergency Push Button" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:148 +#: ../../ORTS.Common/Input/UserCommand.cs:153 msgid "Control EOT Emergency Brake" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:149 +#: ../../ORTS.Common/Input/UserCommand.cs:154 msgid "Control Sander" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:150 +#: ../../ORTS.Common/Input/UserCommand.cs:155 msgid "Control Sander Toggle" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:151 +#: ../../ORTS.Common/Input/UserCommand.cs:156 msgid "Control Wiper" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:152 +#: ../../ORTS.Common/Input/UserCommand.cs:157 msgid "Control Horn" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:153 +#: ../../ORTS.Common/Input/UserCommand.cs:158 msgid "Control Bell" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:154 +#: ../../ORTS.Common/Input/UserCommand.cs:159 msgid "Control Bell Toggle" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:155 +#: ../../ORTS.Common/Input/UserCommand.cs:160 msgid "Control Door Left" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:156 +#: ../../ORTS.Common/Input/UserCommand.cs:161 msgid "Control Door Right" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:157 +#: ../../ORTS.Common/Input/UserCommand.cs:162 msgid "Control Mirror" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:158 +#: ../../ORTS.Common/Input/UserCommand.cs:163 msgid "Control Light" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:159 +#: ../../ORTS.Common/Input/UserCommand.cs:164 msgid "Control Pantograph 1" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:160 +#: ../../ORTS.Common/Input/UserCommand.cs:165 msgid "Control Pantograph 2" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:161 +#: ../../ORTS.Common/Input/UserCommand.cs:166 msgid "Control Pantograph 3" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:162 +#: ../../ORTS.Common/Input/UserCommand.cs:167 msgid "Control Pantograph 4" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:163 +#: ../../ORTS.Common/Input/UserCommand.cs:168 msgid "Control Battery Close" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:164 +#: ../../ORTS.Common/Input/UserCommand.cs:169 msgid "Control Battery Open" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:165 +#: ../../ORTS.Common/Input/UserCommand.cs:170 msgid "Control Master Key" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:166 +#: ../../ORTS.Common/Input/UserCommand.cs:171 msgid "Control Service Retention" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:167 +#: ../../ORTS.Common/Input/UserCommand.cs:172 msgid "Control Service Retention Cancellation" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:168 +#: ../../ORTS.Common/Input/UserCommand.cs:173 msgid "Control Circuit Breaker Closing Order" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:169 +#: ../../ORTS.Common/Input/UserCommand.cs:174 msgid "Control Circuit Breaker Opening Order" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:170 +#: ../../ORTS.Common/Input/UserCommand.cs:175 msgid "Control Circuit Breaker Closing Authorization" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:171 +#: ../../ORTS.Common/Input/UserCommand.cs:176 msgid "Control Traction Cut-Off Relay Closing Order" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:172 +#: ../../ORTS.Common/Input/UserCommand.cs:177 msgid "Control Traction Cut-Off Relay Opening Order" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:173 +#: ../../ORTS.Common/Input/UserCommand.cs:178 msgid "Control Traction Cut-Off Relay Closing Authorization" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:174 +#: ../../ORTS.Common/Input/UserCommand.cs:179 msgid "Control Electric Train Supply" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:175 +#: ../../ORTS.Common/Input/UserCommand.cs:180 msgid "Control Diesel Player" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:176 +#: ../../ORTS.Common/Input/UserCommand.cs:181 msgid "Control Diesel Helper" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:177 +#: ../../ORTS.Common/Input/UserCommand.cs:182 msgid "Control Headlight Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:178 +#: ../../ORTS.Common/Input/UserCommand.cs:183 msgid "Control Headlight Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:179 +#: ../../ORTS.Common/Input/UserCommand.cs:184 msgid "Control Injector 1 Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:180 +#: ../../ORTS.Common/Input/UserCommand.cs:185 msgid "Control Injector 1 Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:181 +#: ../../ORTS.Common/Input/UserCommand.cs:186 msgid "Control Injector 1" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:182 +#: ../../ORTS.Common/Input/UserCommand.cs:187 msgid "Control Injector 2 Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:183 +#: ../../ORTS.Common/Input/UserCommand.cs:188 msgid "Control Injector 2 Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:184 +#: ../../ORTS.Common/Input/UserCommand.cs:189 msgid "Control Injector 2" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:185 +#: ../../ORTS.Common/Input/UserCommand.cs:190 msgid "Control Blowdown Valve" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:186 +#: ../../ORTS.Common/Input/UserCommand.cs:191 msgid "Control Blower Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:187 +#: ../../ORTS.Common/Input/UserCommand.cs:192 msgid "Control Blower Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:188 +#: ../../ORTS.Common/Input/UserCommand.cs:193 msgid "Control Steam Heat Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:189 +#: ../../ORTS.Common/Input/UserCommand.cs:194 msgid "Control Steam Heat Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:190 +#: ../../ORTS.Common/Input/UserCommand.cs:195 msgid "Control Damper Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:191 +#: ../../ORTS.Common/Input/UserCommand.cs:196 msgid "Control Damper Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:192 +#: ../../ORTS.Common/Input/UserCommand.cs:197 msgid "Control Firebox Open" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:193 +#: ../../ORTS.Common/Input/UserCommand.cs:198 msgid "Control Firebox Close" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:194 +#: ../../ORTS.Common/Input/UserCommand.cs:199 msgid "Control Firing Rate Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:195 +#: ../../ORTS.Common/Input/UserCommand.cs:200 msgid "Control Firing Rate Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:196 +#: ../../ORTS.Common/Input/UserCommand.cs:201 msgid "Control Fire Shovel Full" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:197 +#: ../../ORTS.Common/Input/UserCommand.cs:202 msgid "Control Cylinder Cocks" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:198 +#: ../../ORTS.Common/Input/UserCommand.cs:203 msgid "Control Large Ejector Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:199 +#: ../../ORTS.Common/Input/UserCommand.cs:204 msgid "Control Large Ejector Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:200 +#: ../../ORTS.Common/Input/UserCommand.cs:205 msgid "Control Small Ejector Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:201 +#: ../../ORTS.Common/Input/UserCommand.cs:206 msgid "Control Small Ejector Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:202 +#: ../../ORTS.Common/Input/UserCommand.cs:207 msgid "Control Vacuum Exhauster" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:203 +#: ../../ORTS.Common/Input/UserCommand.cs:208 msgid "Control Cylinder Compound" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:204 +#: ../../ORTS.Common/Input/UserCommand.cs:209 msgid "Control Firing" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:205 +#: ../../ORTS.Common/Input/UserCommand.cs:210 msgid "Control Refill" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:206 +#: ../../ORTS.Common/Input/UserCommand.cs:211 msgid "Control Discrete Unload" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:207 +#: ../../ORTS.Common/Input/UserCommand.cs:212 msgid "Control Water Scoop" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:208 +#: ../../ORTS.Common/Input/UserCommand.cs:213 msgid "Control ImmediateRefill" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:209 +#: ../../ORTS.Common/Input/UserCommand.cs:214 msgid "Control Turntable Clockwise" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:210 +#: ../../ORTS.Common/Input/UserCommand.cs:215 msgid "Control Turntable Counterclockwise" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:211 +#: ../../ORTS.Common/Input/UserCommand.cs:216 msgid "Control Generic Item 1" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:212 +#: ../../ORTS.Common/Input/UserCommand.cs:217 msgid "Control Generic Item 2" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:213 +#: ../../ORTS.Common/Input/UserCommand.cs:218 msgid "Control TCS Generic 1" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:214 +#: ../../ORTS.Common/Input/UserCommand.cs:219 msgid "Control TCS Generic 2" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:215 +#: ../../ORTS.Common/Input/UserCommand.cs:220 msgid "Control Cab Radio" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:216 +#: ../../ORTS.Common/Input/UserCommand.cs:221 msgid "Control AI Fire On" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:217 +#: ../../ORTS.Common/Input/UserCommand.cs:222 msgid "Control AI Fire Off" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:218 +#: ../../ORTS.Common/Input/UserCommand.cs:223 msgid "Control AI Fire Reset" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:221 +#: ../../ORTS.Common/Input/UserCommand.cs:226 +msgid "Control Speed Regulator Mode Increase" +msgstr "" + +#: ../../ORTS.Common/Input/UserCommand.cs:227 +msgid "Control Speed Regulator Mode Descrease" +msgstr "" + +#: ../../ORTS.Common/Input/UserCommand.cs:228 +msgid "Control Selected Speed Increase" +msgstr "" + +#: ../../ORTS.Common/Input/UserCommand.cs:229 +msgid "Control Selected Speed Decrease" +msgstr "" + +#: ../../ORTS.Common/Input/UserCommand.cs:230 +msgid "Control Speed Regulator Max Acceleration Increase" +msgstr "" + +#: ../../ORTS.Common/Input/UserCommand.cs:231 +msgid "Control Speed Regulator Max Acceleration Decrease" +msgstr "" + +#: ../../ORTS.Common/Input/UserCommand.cs:232 +msgid "Control Number Of Axles Increase" +msgstr "" + +#: ../../ORTS.Common/Input/UserCommand.cs:233 +msgid "Control Number Of Axles Decrease" +msgstr "" + +#: ../../ORTS.Common/Input/UserCommand.cs:234 +msgid "Control Restricted Speed Zone Active" +msgstr "" + +#: ../../ORTS.Common/Input/UserCommand.cs:235 +msgid "Control Cruise Control Mode Increase" +msgstr "" + +#: ../../ORTS.Common/Input/UserCommand.cs:236 +msgid "Control Cruise Control Mode Decrease" +msgstr "" + +#: ../../ORTS.Common/Input/UserCommand.cs:237 +msgid "Control Train Type Change (Passenger/Cargo)" +msgstr "" + +#: ../../ORTS.Common/Input/UserCommand.cs:238 +msgid "Control Selected Speed To Zero" +msgstr "" + +#: ../../ORTS.Common/Input/UserCommand.cs:240 msgid "Control DP Move To Front" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:222 +#: ../../ORTS.Common/Input/UserCommand.cs:241 msgid "Control DP Move To Back" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:223 +#: ../../ORTS.Common/Input/UserCommand.cs:242 msgid "Control DP Traction" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:224 +#: ../../ORTS.Common/Input/UserCommand.cs:243 msgid "Control DP Idle" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:225 +#: ../../ORTS.Common/Input/UserCommand.cs:244 msgid "Control DP Brake" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:226 +#: ../../ORTS.Common/Input/UserCommand.cs:245 msgid "Control DP More" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:227 +#: ../../ORTS.Common/Input/UserCommand.cs:246 msgid "Control DP Less" msgstr "" diff --git a/Source/Locales/ORTS.Menu/ORTS.Menu.pot b/Source/Locales/ORTS.Menu/ORTS.Menu.pot index 83f46ecfca..7e5016ec5a 100644 --- a/Source/Locales/ORTS.Menu/ORTS.Menu.pot +++ b/Source/Locales/ORTS.Menu/ORTS.Menu.pot @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2022-04-12 14:33:09-0300\n" -"PO-Revision-Date: 2022-04-12 14:33:09-0300\n" +"POT-Creation-Date: 2023-08-25 09:18:00+0200\n" +"PO-Revision-Date: 2023-08-25 09:18:00+0200\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" diff --git a/Source/Locales/ORTS.Settings/ORTS.Settings.pot b/Source/Locales/ORTS.Settings/ORTS.Settings.pot index 136a7e4d9f..cd3fafc181 100644 --- a/Source/Locales/ORTS.Settings/ORTS.Settings.pot +++ b/Source/Locales/ORTS.Settings/ORTS.Settings.pot @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2022-08-17 02:43:29+0200\n" -"PO-Revision-Date: 2022-08-17 02:43:30+0200\n" +"POT-Creation-Date: 2023-08-25 09:18:04+0200\n" +"PO-Revision-Date: 2023-08-25 09:18:04+0200\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -11,22 +11,22 @@ msgstr "" "X-Generator: MonoDevelop Gettext addin\n" -#: ../../ORTS.Settings/InputSettings.cs:540 +#: ../../ORTS.Settings/InputSettings.cs:560 #, csharp-format msgid "{0} requires and is modified by Shift" msgstr "" -#: ../../ORTS.Settings/InputSettings.cs:542 +#: ../../ORTS.Settings/InputSettings.cs:562 #, csharp-format msgid "{0} requires and is modified by Control" msgstr "" -#: ../../ORTS.Settings/InputSettings.cs:544 +#: ../../ORTS.Settings/InputSettings.cs:564 #, csharp-format msgid "{0} requires and is modified by Alt" msgstr "" -#: ../../ORTS.Settings/InputSettings.cs:575 +#: ../../ORTS.Settings/InputSettings.cs:595 #, csharp-format msgid "{0} and {1} both match {2}" msgstr "" diff --git a/Source/Locales/Orts.Formats.OR/Orts.Formats.OR.pot b/Source/Locales/Orts.Formats.OR/Orts.Formats.OR.pot index f337641428..4b95e40033 100644 --- a/Source/Locales/Orts.Formats.OR/Orts.Formats.OR.pot +++ b/Source/Locales/Orts.Formats.OR/Orts.Formats.OR.pot @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2022-04-12 14:33:09-0300\n" -"PO-Revision-Date: 2022-04-12 14:33:09-0300\n" +"POT-Creation-Date: 2023-08-25 09:17:58+0200\n" +"PO-Revision-Date: 2023-08-25 09:17:58+0200\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" diff --git a/Source/Locales/Orts.Simulation/Orts.Simulation.pot b/Source/Locales/Orts.Simulation/Orts.Simulation.pot index e2001f6240..489fe372ab 100644 --- a/Source/Locales/Orts.Simulation/Orts.Simulation.pot +++ b/Source/Locales/Orts.Simulation/Orts.Simulation.pot @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2022-08-17 02:43:30+0200\n" -"PO-Revision-Date: 2022-08-17 02:43:30+0200\n" +"POT-Creation-Date: 2023-08-25 09:18:06+0200\n" +"PO-Revision-Date: 2023-08-25 09:18:09+0200\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -11,185 +11,194 @@ msgstr "" "X-Generator: MonoDevelop Gettext addin\n" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:276 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:81 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:377 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:80 msgid "Release" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:277 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:233 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:378 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:236 msgid "Quick Release" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:279 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:380 msgid "Neutral" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:280 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:80 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:381 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:79 msgid "Apply" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:281 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:382 msgid "EPApply" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:282 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:82 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:383 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:81 msgid "Emergency" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:283 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:384 msgid "Self Lap" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:284 -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:285 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:385 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:386 msgid "Service" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:286 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:79 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:387 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:78 msgid "Lap" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:287 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:388 msgid "Suppression" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:288 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:389 msgid "Cont. Service" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:289 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:390 msgid "Full Service" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:290 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:391 msgid "Minimum Reduction" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:291 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:392 msgid "Hold" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:292 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:393 msgid "Str. Brk. Release On:" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:293 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:394 msgid "Str. Brk. Release Off:" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:294 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:395 msgid "Str. Brk. Release:" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:295 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:396 msgid "Str. Brk. Lap:" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:296 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:397 msgid "Str. Brk. Apply:" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:297 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:398 msgid "Str. Brk. Apply All:" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:298 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:399 msgid "Str. Brk. Emerg:" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:299 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:234 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:400 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:237 msgid "Overcharge" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:300 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:401 msgid "Emergency Braking Push Button" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:301 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:402 msgid "TCS Emergency Braking" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:302 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:403 msgid "TCS Full Service Braking" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:303 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:404 msgid "Vac. Cont. Service" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:304 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:405 msgid "Vac. Apply Cont. Service" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:305 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:406 msgid "Manual Braking" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:306 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:407 msgid "Notch" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:307 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:408 msgid "EP Service" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:308 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:409 msgid "EP Full Service" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:309 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:410 msgid "Slow service" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:310 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:411 msgid "SME Service" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:311 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:412 msgid "SME Full Service" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:312 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:413 msgid "SME Self Lap" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:313 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:414 msgid "SME Release Start" msgstr "" +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:415 +msgid "Hold Engine" +msgstr "" + +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:416 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:231 +msgid "Bail Off" +msgstr "" + #. Context: Brake Controller -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:278 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:379 msgctxt "Brake Controller" msgid "Running" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/PowerSupply/CircuitBreaker.cs:49 +#: ../../Orts.Simulation/Common/Scripting/PowerSupply/CircuitBreaker.cs:59 #: ../../Orts.Simulation/Common/Scripting/PowerSupply/PowerSupply.cs:164 #: ../../Orts.Simulation/Common/Scripting/PowerSupply/PowerSupply.cs:172 #: ../../Orts.Simulation/Common/Scripting/PowerSupply/PowerSupply.cs:181 -#: ../../Orts.Simulation/Common/Scripting/PowerSupply/TractionCutOffRelay.cs:47 +#: ../../Orts.Simulation/Common/Scripting/PowerSupply/TractionCutOffRelay.cs:58 msgid "Unavailable" msgstr "" #. Context: CircuitBreaker -#: ../../Orts.Simulation/Common/Scripting/PowerSupply/CircuitBreaker.cs:50 +#: ../../Orts.Simulation/Common/Scripting/PowerSupply/CircuitBreaker.cs:60 msgctxt "CircuitBreaker" msgid "Open" msgstr "" #. Context: CircuitBreaker -#: ../../Orts.Simulation/Common/Scripting/PowerSupply/CircuitBreaker.cs:51 +#: ../../Orts.Simulation/Common/Scripting/PowerSupply/CircuitBreaker.cs:61 msgctxt "CircuitBreaker" msgid "Closing" msgstr "" #. Context: CircuitBreaker -#: ../../Orts.Simulation/Common/Scripting/PowerSupply/CircuitBreaker.cs:52 +#: ../../Orts.Simulation/Common/Scripting/PowerSupply/CircuitBreaker.cs:62 msgctxt "CircuitBreaker" msgid "Closed" msgstr "" @@ -303,19 +312,19 @@ msgid "Running" msgstr "" #. Context: TractionCutOffRelay -#: ../../Orts.Simulation/Common/Scripting/PowerSupply/TractionCutOffRelay.cs:48 +#: ../../Orts.Simulation/Common/Scripting/PowerSupply/TractionCutOffRelay.cs:59 msgctxt "TractionCutOffRelay" msgid "Open" msgstr "" #. Context: TractionCutOffRelay -#: ../../Orts.Simulation/Common/Scripting/PowerSupply/TractionCutOffRelay.cs:49 +#: ../../Orts.Simulation/Common/Scripting/PowerSupply/TractionCutOffRelay.cs:60 msgctxt "TractionCutOffRelay" msgid "Closing" msgstr "" #. Context: TractionCutOffRelay -#: ../../Orts.Simulation/Common/Scripting/PowerSupply/TractionCutOffRelay.cs:50 +#: ../../Orts.Simulation/Common/Scripting/PowerSupply/TractionCutOffRelay.cs:61 msgctxt "TractionCutOffRelay" msgid "Closed" msgstr "" @@ -329,80 +338,80 @@ msgstr "" msgid "Alt-E to gain control of your train" msgstr "" -#: ../../Orts.Simulation/MultiPlayer/Message.cs:835 +#: ../../Orts.Simulation/MultiPlayer/Message.cs:858 msgid "Dispatcher does not allow hand throw at this time" msgstr "" -#: ../../Orts.Simulation/MultiPlayer/Message.cs:879 +#: ../../Orts.Simulation/MultiPlayer/Message.cs:902 msgid "main route" msgstr "" -#: ../../Orts.Simulation/MultiPlayer/Message.cs:879 +#: ../../Orts.Simulation/MultiPlayer/Message.cs:902 msgid "side route" msgstr "" -#: ../../Orts.Simulation/MultiPlayer/Message.cs:1719 +#: ../../Orts.Simulation/MultiPlayer/Message.cs:1796 msgid "You are the new dispatcher. Enjoy!" msgstr "" -#: ../../Orts.Simulation/MultiPlayer/Message.cs:1850 +#: ../../Orts.Simulation/MultiPlayer/Message.cs:1927 msgid "Name conflicted with people in the game, will play in single mode" msgstr "" -#: ../../Orts.Simulation/MultiPlayer/Message.cs:1930 +#: ../../Orts.Simulation/MultiPlayer/Message.cs:2007 #: ../../Orts.Simulation/MultiPlayer/MPManager.cs:188 msgid "You gained back the control of your train" msgstr "" -#: ../../Orts.Simulation/MultiPlayer/Message.cs:2176 +#: ../../Orts.Simulation/MultiPlayer/Message.cs:2253 msgid "Server quits, will play as single mode" msgstr "" -#: ../../Orts.Simulation/MultiPlayer/Message.cs:2457 -#: ../../Orts.Simulation/MultiPlayer/Message.cs:2711 +#: ../../Orts.Simulation/MultiPlayer/Message.cs:2534 +#: ../../Orts.Simulation/MultiPlayer/Message.cs:2788 msgid "Trains uncoupled, gain back control by Alt-E" msgstr "" -#: ../../Orts.Simulation/MultiPlayer/Message.cs:2855 -#: ../../Orts.Simulation/MultiPlayer/Message.cs:2983 +#: ../../Orts.Simulation/MultiPlayer/Message.cs:2933 +#: ../../Orts.Simulation/MultiPlayer/Message.cs:3061 msgid "Trains coupled, hit \\ then Shift-? to release brakes" msgstr "" -#: ../../Orts.Simulation/MultiPlayer/Message.cs:3487 +#: ../../Orts.Simulation/MultiPlayer/Message.cs:3565 msgid "You are an assistant now, will be able to handle switches and signals." msgstr "" -#: ../../Orts.Simulation/MultiPlayer/Message.cs:3493 +#: ../../Orts.Simulation/MultiPlayer/Message.cs:3571 msgid "You are no longer an assistant." msgstr "" -#: ../../Orts.Simulation/MultiPlayer/Message.cs:878 +#: ../../Orts.Simulation/MultiPlayer/Message.cs:901 #, csharp-format msgid "Switched, current route is {0}" msgstr "" -#: ../../Orts.Simulation/MultiPlayer/Message.cs:1727 +#: ../../Orts.Simulation/MultiPlayer/Message.cs:1804 #, csharp-format msgid "New dispatcher is {0}" msgstr "" -#: ../../Orts.Simulation/MultiPlayer/Message.cs:2187 +#: ../../Orts.Simulation/MultiPlayer/Message.cs:2264 #: ../../Orts.Simulation/MultiPlayer/OnlinePlayer.cs:175 #, csharp-format msgid "{0} quit." msgstr "" -#: ../../Orts.Simulation/MultiPlayer/Message.cs:2259 +#: ../../Orts.Simulation/MultiPlayer/Message.cs:2336 #, csharp-format msgid "{0} lost." msgstr "" -#: ../../Orts.Simulation/MultiPlayer/Message.cs:3373 +#: ../../Orts.Simulation/MultiPlayer/Message.cs:3451 #, csharp-format msgid " From {0}: {1}" msgstr "" -#: ../../Orts.Simulation/MultiPlayer/MPManager.cs:829 +#: ../../Orts.Simulation/MultiPlayer/MPManager.cs:840 msgid "Missing car, have substituted with other one." msgstr "" @@ -414,20 +423,20 @@ msgstr[0] "" msgstr[1] "" #: ../../Orts.Simulation/Simulation/Activity.cs:1004 -#: ../../Orts.Simulation/Simulation/AIs/AITrain.cs:6576 -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10599 +#: ../../Orts.Simulation/Simulation/AIs/AITrain.cs:6625 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10712 msgid "Passenger boarding completed. Waiting for signal ahead to clear." msgstr "" #: ../../Orts.Simulation/Simulation/Activity.cs:1009 -#: ../../Orts.Simulation/Simulation/AIs/AITrain.cs:6581 -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10607 +#: ../../Orts.Simulation/Simulation/AIs/AITrain.cs:6630 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10720 msgid "Passenger boarding completed. You may depart now." msgstr "" #: ../../Orts.Simulation/Simulation/Activity.cs:984 -#: ../../Orts.Simulation/Simulation/AIs/AITrain.cs:6588 -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10614 +#: ../../Orts.Simulation/Simulation/AIs/AITrain.cs:6637 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10727 #, csharp-format msgid "Passenger boarding completes in {0:D2}:{1:D2}" msgstr "" @@ -452,1101 +461,1130 @@ msgstr "" msgid "MSG" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:180 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:183 msgid "" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:182 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:201 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:185 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:204 msgid "reverse" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:182 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:201 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:185 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:204 msgid "neutral" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:182 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:201 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:185 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:204 msgid "forward" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:182 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:201 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:185 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:204 msgid "locked. Close throttle, stop train then re-try." msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:183 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1208 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1222 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:186 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1210 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1224 msgid "Throttle" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:183 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:191 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:192 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:199 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:186 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:194 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:195 #: ../../Orts.Simulation/Simulation/Confirmer.cs:202 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:203 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:204 #: ../../Orts.Simulation/Simulation/Confirmer.cs:205 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:206 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:207 #: ../../Orts.Simulation/Simulation/Confirmer.cs:208 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:209 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:213 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:214 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:249 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:250 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:211 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:212 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:216 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:217 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:255 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:256 msgid "close" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:183 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:191 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:192 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:199 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:186 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:194 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:195 #: ../../Orts.Simulation/Simulation/Confirmer.cs:202 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:203 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:204 #: ../../Orts.Simulation/Simulation/Confirmer.cs:205 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:206 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:207 #: ../../Orts.Simulation/Simulation/Confirmer.cs:208 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:209 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:213 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:214 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:249 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:250 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:211 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:212 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:216 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:217 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:255 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:256 msgid "open" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:183 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:186 msgid "locked. Release dynamic brake then re-try." msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:184 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:187 msgid "Wheel-slip" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:184 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:187 msgid "over" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:184 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:187 msgid "occurring. Tractive power greatly reduced." msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:184 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:187 msgid "warning" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:186 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:189 msgid "Power" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:186 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:195 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:196 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:203 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:204 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:211 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:226 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:231 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:233 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:189 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:198 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:199 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:206 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:207 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:214 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:229 #: ../../Orts.Simulation/Simulation/Confirmer.cs:234 #: ../../Orts.Simulation/Simulation/Confirmer.cs:236 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:238 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:237 #: ../../Orts.Simulation/Simulation/Confirmer.cs:239 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:240 #: ../../Orts.Simulation/Simulation/Confirmer.cs:241 #: ../../Orts.Simulation/Simulation/Confirmer.cs:242 #: ../../Orts.Simulation/Simulation/Confirmer.cs:243 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:244 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:245 #: ../../Orts.Simulation/Simulation/Confirmer.cs:246 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:247 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:265 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:249 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:250 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:253 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:271 msgid "off" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:186 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:195 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:196 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:203 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:204 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:211 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:231 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:233 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:189 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:198 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:199 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:206 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:207 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:214 #: ../../Orts.Simulation/Simulation/Confirmer.cs:234 #: ../../Orts.Simulation/Simulation/Confirmer.cs:236 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:242 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:243 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:237 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:239 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:245 #: ../../Orts.Simulation/Simulation/Confirmer.cs:246 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:247 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:265 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:249 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:250 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:253 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:271 msgid "on" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:187 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:190 msgid "Pantograph 1" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:187 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:188 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:189 #: ../../Orts.Simulation/Simulation/Confirmer.cs:190 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:191 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:192 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:193 msgid "lower" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:187 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:188 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:189 #: ../../Orts.Simulation/Simulation/Confirmer.cs:190 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:191 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:192 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:193 msgid "raise" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:188 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:191 msgid "Pantograph 2" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:189 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:192 msgid "Pantograph 3" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:190 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:193 msgid "Pantograph 4" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:191 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:192 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:354 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:369 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:194 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:195 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:355 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:370 msgid "Circuit breaker" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:193 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:196 msgid "Circuit breaker closing authorization" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:193 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:196 msgid "remove" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:193 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:196 msgid "give" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:195 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:198 msgid "Player Diesel Power" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:195 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:198 msgid "locked. Close throttle then re-try." msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:196 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:199 msgid "Helper Diesel Power" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:197 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:200 msgid "Diesel Tank" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:197 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:198 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:200 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:201 msgid "re-fueled" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:197 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:198 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:200 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:201 msgid "level" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:198 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:201 msgid "Boiler Water Tank" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:199 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:938 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:202 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:940 msgid "Traction cut-off relay" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:202 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:205 msgid "Regulator" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:203 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:206 msgid "Injector 1" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:204 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:207 msgid "Injector 2" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:205 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:208 msgid "Blowdown Valve" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:206 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6062 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6089 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:209 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6354 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6381 msgid "Blower" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:206 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:207 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:209 #: ../../Orts.Simulation/Simulation/Confirmer.cs:210 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:215 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:216 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:226 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:256 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:213 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:218 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:219 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:229 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:262 msgid "decrease" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:206 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:207 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:209 #: ../../Orts.Simulation/Simulation/Confirmer.cs:210 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:215 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:216 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:226 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:256 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:213 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:218 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:219 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:229 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:262 msgid "increase" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:207 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:210 msgid "SteamHeat" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:208 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:211 msgid "Damper" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:209 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:212 msgid "Firebox Door" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:210 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:213 msgid "Firing Rate" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:211 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:214 msgid "Manual Firing" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:212 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:215 msgid "Fire" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:212 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:215 msgid "add shovel-full" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:213 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:216 msgid "Cylinder Cocks" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:214 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:217 msgid "Cylinder Compound" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:215 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:218 msgid "LargeEjector" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:216 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:219 msgid "SmallEjector" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:217 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:220 msgid "VacuumExhauster" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:217 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:220 msgid "normal" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:217 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:220 msgid "fast" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:218 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:219 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:221 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:222 msgid "Tender" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:218 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:221 msgid "Coal re-filled" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:218 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:221 msgid "Coal level" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:219 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:222 msgid "Water re-filled" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:219 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:222 msgid "Water level" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:221 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6686 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:224 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6986 msgid "Water Scoop" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:221 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:260 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:224 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:266 msgid "up" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:221 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:260 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:224 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:266 msgid "down" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:223 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:226 msgid "Train Brake" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:223 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:224 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:225 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:226 #: ../../Orts.Simulation/Simulation/Confirmer.cs:227 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:228 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:230 msgid "release" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:223 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:224 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:225 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:226 #: ../../Orts.Simulation/Simulation/Confirmer.cs:227 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:228 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:230 msgid "apply" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:224 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:227 msgid "Engine Brake" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:225 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:228 msgid "Brakeman Brake" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:226 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:229 msgid "Dynamic Brake" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:226 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:229 msgid "setup" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:227 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:230 msgid "Emergency Brake" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:228 -msgid "Bail Off" -msgstr "" - -#: ../../Orts.Simulation/Simulation/Confirmer.cs:228 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:231 msgid "disengage" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:228 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:231 msgid "engage" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:229 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:232 msgid "Brakes" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:229 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:232 msgid "initialize" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:229 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:232 msgid "cannot initialize. Stop train then re-try." msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:230 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:143 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/EPBrakeSystem.cs:84 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:233 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:142 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/EPBrakeSystem.cs:143 #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SingleTransferPipe.cs:92 #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SingleTransferPipe.cs:101 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SMEBrakeSystem.cs:87 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SMEBrakeSystem.cs:103 #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/VacuumSinglePipe.cs:141 msgid "Handbrake" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:230 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:233 msgid "none" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:230 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:233 msgid "full" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:231 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:234 msgid "Retainers" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:231 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:234 #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/BrakeSystem.cs:102 msgid "Exhaust" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:231 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:234 #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/BrakeSystem.cs:103 msgid "High Pressure" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:231 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:234 #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/BrakeSystem.cs:104 msgid "Low Pressure" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:231 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:234 #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/BrakeSystem.cs:105 msgid "Slow Direct" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:232 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:235 msgid "Brake Hose" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:232 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:235 msgid "disconnect" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:232 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:235 msgid "connect" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:236 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:239 msgid "Sander" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:237 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:240 msgid "Alerter" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:237 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:240 msgid "acknowledge" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:238 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:241 msgid "Horn" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:239 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:242 msgid "Whistle" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:239 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:242 msgid "blow" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:240 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:243 msgid "Bell" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:240 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:243 msgid "ring" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:241 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:244 msgid "Headlight" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:241 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:244 msgid "dim" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:241 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:244 msgid "bright" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:242 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:245 msgid "Cab Light" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:243 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:246 msgid "Wipers" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:244 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:247 msgid "Cab" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:244 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:247 msgid "changing is not available" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:244 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:247 msgid "" "changing disabled. Close throttle, set reverser to neutral, stop train then " "re-try." msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:245 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:248 msgid "Odometer" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:246 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:249 msgid "Battery" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:247 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:935 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:351 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:250 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:937 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:352 msgid "Master key" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:249 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:252 +msgid "Max acceleration" +msgstr "" + +#: ../../Orts.Simulation/Simulation/Confirmer.cs:253 +msgid "Restricted speed zone" +msgstr "" + +#: ../../Orts.Simulation/Simulation/Confirmer.cs:255 msgid "Doors Left" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:250 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:256 msgid "Doors Right" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:251 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:257 msgid "Mirror" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:251 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:257 msgid "retract" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:251 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:257 msgid "extend" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:253 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:259 msgid "Switch Ahead" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:253 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:254 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:259 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:260 msgid "locked. Use Control+M to change signals to manual mode then re-try." msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:254 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:260 msgid "Switch Behind" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:256 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:262 msgid "Simulation Speed" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:256 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:262 msgid "reset" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:257 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:263 msgid "Uncouple After" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:258 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:264 msgid "Activity" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:258 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:264 msgid "quit" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:258 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:264 msgid "resume" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:259 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:265 msgid "Replay" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:259 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:265 msgid "Overriding camera replay. Press Escape to resume camera replay." msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:260 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:266 msgid "Gearbox" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:260 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:266 msgid "locked. Use shaft before changing gear." msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:261 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:267 msgid "Signal mode" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:261 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:267 msgid "manual" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:261 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:267 msgid "auto" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:261 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:267 msgid "locked. Stop train, then re-try." msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:263 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:269 msgid "Wagon" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:263 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:269 msgid "Wagon fully unloaded" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:263 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:269 msgid "Wagon fully loaded" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:263 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:269 msgid "Freight load" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:265 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:271 msgid "Cab Radio" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:275 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:284 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:322 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:281 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:290 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:328 #, csharp-format msgid "{0} {1}" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:279 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:285 #, csharp-format msgid "{0}" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:289 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:295 #, csharp-format msgid "{0} to {1:0}%" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:294 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:300 #, csharp-format msgid "{0} {1:0}% {2}" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:299 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:305 #, csharp-format msgid "{0:0}% {1}" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:304 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:310 #, csharp-format msgid "{0:0}%" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:312 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:317 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:318 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:323 #, csharp-format msgid "{0} {1:0}%" msgstr "" #. Context: NonSteam -#: ../../Orts.Simulation/Simulation/Confirmer.cs:182 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1209 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:185 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1211 msgctxt "NonSteam" msgid "Reverser" msgstr "" #. Context: Steam -#: ../../Orts.Simulation/Simulation/Confirmer.cs:201 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:204 msgctxt "Steam" msgid "Reverser" msgstr "" #. Context: Alerter -#: ../../Orts.Simulation/Simulation/Confirmer.cs:237 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:240 msgctxt "Alerter" msgid "sound" msgstr "" #. Context: Horn -#: ../../Orts.Simulation/Simulation/Confirmer.cs:238 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:241 msgctxt "Horn" msgid "sound" msgstr "" #. Context: Cab -#: ../../Orts.Simulation/Simulation/Confirmer.cs:244 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:247 msgctxt "Cab" msgid "change" msgstr "" #. Context: Odometer -#: ../../Orts.Simulation/Simulation/Confirmer.cs:245 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:248 msgctxt "Odometer" msgid "reset" msgstr "" #. Context: Odometer -#: ../../Orts.Simulation/Simulation/Confirmer.cs:245 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:248 msgctxt "Odometer" msgid "counting down" msgstr "" #. Context: Odometer -#: ../../Orts.Simulation/Simulation/Confirmer.cs:245 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:248 msgctxt "Odometer" msgid "counting up" msgstr "" #. Context: Switch -#: ../../Orts.Simulation/Simulation/Confirmer.cs:253 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:254 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:259 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:260 msgctxt "Switch" msgid "change" msgstr "" -#: ../../Orts.Simulation/Simulation/Container.cs:1018 +#: ../../Orts.Simulation/Simulation/Container.cs:1052 msgid "No suitable position to unload" msgstr "" -#: ../../Orts.Simulation/Simulation/Container.cs:1070 +#: ../../Orts.Simulation/Simulation/Container.cs:1104 msgid "No suitable container to load" msgstr "" -#: ../../Orts.Simulation/Simulation/Container.cs:689 +#: ../../Orts.Simulation/Simulation/Container.cs:723 #, csharp-format msgid "Wagon out of range: move wagon towards crane by {0} metres" msgstr "" -#: ../../Orts.Simulation/Simulation/Simulator.cs:1893 +#: ../../Orts.Simulation/Simulation/Simulator.cs:1895 msgid "Train can't be suspended with speed not equal 0" msgstr "" -#: ../../Orts.Simulation/Simulation/Simulator.cs:2015 +#: ../../Orts.Simulation/Simulation/Simulator.cs:2017 msgid "To return to static train speed must be = 0" msgstr "" #: ../../Orts.Simulation/Simulation/Simulator.cs:940 -#: ../../Orts.Simulation/Simulation/AIs/AITrain.cs:4459 +#: ../../Orts.Simulation/Simulation/AIs/AITrain.cs:4463 #, csharp-format msgid "" "Player train has been included into train {0} service {1}, that automatically " "becomes the new player train" msgstr "" -#: ../../Orts.Simulation/Simulation/Transfertables.cs:259 -msgid "Train partially on transfertable, can't transfer" +#: ../../Orts.Simulation/Simulation/Transfertables.cs:277 +#: ../../Orts.Simulation/Simulation/Turntables.cs:627 +msgid "Rotation can't start: check throttle, speed, direction and control mode" msgstr "" -#: ../../Orts.Simulation/Simulation/Transfertables.cs:270 -msgid "Transfer can't start: check throttle, speed, direction and control mode" +#: ../../Orts.Simulation/Simulation/Transfertables.cs:296 +msgid "Train partially on transfertable, can't transfer" msgstr "" -#: ../../Orts.Simulation/Simulation/Transfertables.cs:297 +#: ../../Orts.Simulation/Simulation/Transfertables.cs:327 msgid "Transfertable starting transferring train" msgstr "" -#: ../../Orts.Simulation/Simulation/Transfertables.cs:366 -#: ../../Orts.Simulation/Simulation/Transfertables.cs:382 +#: ../../Orts.Simulation/Simulation/Transfertables.cs:396 +#: ../../Orts.Simulation/Simulation/Transfertables.cs:412 msgid "Transfertable connected" msgstr "" -#: ../../Orts.Simulation/Simulation/Turntables.cs:205 +#: ../../Orts.Simulation/Simulation/Turntables.cs:213 msgid "turntable" msgstr "" -#: ../../Orts.Simulation/Simulation/Turntables.cs:205 +#: ../../Orts.Simulation/Simulation/Turntables.cs:213 msgid "transfertable" msgstr "" -#: ../../Orts.Simulation/Simulation/Turntables.cs:224 -#: ../../Orts.Simulation/Simulation/Turntables.cs:265 +#: ../../Orts.Simulation/Simulation/Turntables.cs:232 +#: ../../Orts.Simulation/Simulation/Turntables.cs:273 #, csharp-format msgid "Train slipped into non aligned {0}" msgstr "" -#: ../../Orts.Simulation/Simulation/Turntables.cs:231 +#: ../../Orts.Simulation/Simulation/Turntables.cs:239 #, csharp-format msgid "Train front on {0}" msgstr "" -#: ../../Orts.Simulation/Simulation/Turntables.cs:239 +#: ../../Orts.Simulation/Simulation/Turntables.cs:247 #, csharp-format msgid "Train front outside {0}" msgstr "" -#: ../../Orts.Simulation/Simulation/Turntables.cs:272 +#: ../../Orts.Simulation/Simulation/Turntables.cs:280 #, csharp-format msgid "Train rear on {0}" msgstr "" -#: ../../Orts.Simulation/Simulation/Turntables.cs:280 +#: ../../Orts.Simulation/Simulation/Turntables.cs:288 #, csharp-format msgid "Train rear outside {0}" msgstr "" -#: ../../Orts.Simulation/Simulation/Turntables.cs:599 -msgid "Train partially on turntable, can't rotate" +#: ../../Orts.Simulation/Simulation/Turntables.cs:649 +msgid "Turntable is at its bound, can't rotate" msgstr "" -#: ../../Orts.Simulation/Simulation/Turntables.cs:610 -msgid "Rotation can't start: check throttle, speed, direction and control mode" +#: ../../Orts.Simulation/Simulation/Turntables.cs:658 +msgid "Train partially on turntable, can't rotate" msgstr "" -#: ../../Orts.Simulation/Simulation/Turntables.cs:618 +#: ../../Orts.Simulation/Simulation/Turntables.cs:670 msgid "Turntable starting rotation with train" msgstr "" -#: ../../Orts.Simulation/Simulation/Turntables.cs:730 -#: ../../Orts.Simulation/Simulation/Turntables.cs:761 +#: ../../Orts.Simulation/Simulation/Turntables.cs:787 +#: ../../Orts.Simulation/Simulation/Turntables.cs:818 msgid "Turntable forward connected" msgstr "" -#: ../../Orts.Simulation/Simulation/Turntables.cs:743 -#: ../../Orts.Simulation/Simulation/Turntables.cs:774 +#: ../../Orts.Simulation/Simulation/Turntables.cs:800 +#: ../../Orts.Simulation/Simulation/Turntables.cs:831 msgid "Turntable backward connected" msgstr "" -#: ../../Orts.Simulation/Simulation/AIs/AITrain.cs:5019 +#: ../../Orts.Simulation/Simulation/AIs/AITrain.cs:5023 #, csharp-format msgid "" "Join success: Train {0} service {1} has been incorporated into train {2} " "service {3}" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:2004 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:2009 msgid "Coupler broken!" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:2007 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:2012 msgid "Coupler overloaded!" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:2436 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:2441 msgid "" "The steam usage has exceeded the capacity of the steam boiler. Steam boiler " "locked out." msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:6961 -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:6966 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:6906 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:6911 msgid "Other train is blocking path" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:7826 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:7764 msgid "Stopped due to errors in route setting" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:8540 -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:9729 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:8478 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:9673 msgid "No signal in train's path" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:8548 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:8486 msgid "Next signal already allocated to other train" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:8609 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:8547 msgid "Request to clear signal cannot be processed" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:8717 -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:9849 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:8655 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:9793 msgid "No switch found" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10209 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10147 msgid "You cannot enter manual mode when autopiloted" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10214 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10152 msgid "You cannot use this command for pathless trains" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10226 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10164 msgid "Train is not back on original route" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10235 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10173 msgid "" "Original route is reverse from present direction, stop train before switching" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10255 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10186 msgid "Cannot change to Manual Mode while in Explorer Mode" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10344 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10191 +msgid "" +"Cannot change to Manual Mode. Use the Reset Out Of Control Mode command to " +"release brakes" +msgstr "" + +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10280 msgid "Reversal required and rear of train not on required route" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10618 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10554 msgid "Cannot clear signal behind train while in AUTO mode" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10850 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10786 msgid "Out of control mode reset" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10855 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10791 msgid "" "You can only reset if you passed a signal at danger or if you passed a " "misaligned switch." msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:16398 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:16396 msgid "Car " msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:16472 -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:16477 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:16468 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:16473 msgid "Locomotive " msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:2384 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:2389 #, csharp-format msgid "Carriage {0} temperature is too cold, the passengers are freezing." msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:2388 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:2393 #, csharp-format msgid "Car {0} temperature is too cold for the freight." msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:11148 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:11084 #, csharp-format msgid "Train stopped due to problems with other train: train {0} , reason: {1}" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:925 -msgid "Engine" +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSControlTrailerCar.cs:206 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:930 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:958 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6247 +msgid "Gear" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:928 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:956 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5955 -msgid "Gear" +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSControlTrailerCar.cs:237 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSControlTrailerCar.cs:268 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:4074 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:4136 +msgid "Throttle must be reduced to Idle before gear change can happen." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:932 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:348 -msgid "Battery switch" +#. Context: Gear +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSControlTrailerCar.cs:207 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:931 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6248 +msgctxt "Gear" +msgid "N" +msgstr "" + +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:927 +msgid "Engine" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:933 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:936 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:942 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:934 #: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:349 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:352 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:358 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6210 +msgid "Battery switch" +msgstr "" + +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:935 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:938 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:944 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:350 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:353 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:359 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6502 msgid "On" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:933 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:936 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:942 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:349 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:352 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:358 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6210 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:935 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:938 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:944 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:350 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:353 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:359 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6502 msgid "Off" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:941 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:357 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:943 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:358 msgid "Electric train supply" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:956 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:958 msgid "N" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:959 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1211 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:961 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1213 msgid "Fuel" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:968 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:379 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6245 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:970 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:380 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6537 msgid "StHeat:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:969 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:979 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:380 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:390 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6246 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6254 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6633 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6648 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:971 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:981 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:381 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:391 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6538 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6546 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6933 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6948 msgid "Press" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:971 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:382 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6248 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:973 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:383 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6540 msgid "StTemp" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:973 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:384 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6250 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:975 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:385 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6542 msgid "StUse" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:976 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:387 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:978 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:388 msgid "WaterLvl" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:978 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:389 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6253 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:980 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:390 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6545 msgid "Last:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:981 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:392 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6256 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:983 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:393 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6548 msgid "Temp" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:983 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:394 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6258 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:985 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:395 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6550 msgid "OutTemp" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:985 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:396 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6260 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:987 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:397 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6552 msgid "NetHt" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1017 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1061 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1019 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1063 msgid "Setup" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1026 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1028 msgid "(flipped)" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1027 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1132 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1136 -#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2186 -#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2202 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1029 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1134 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1138 +#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2145 +#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2161 msgid "Sync" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1027 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1132 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1136 -#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2186 -#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2202 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1029 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1134 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1138 +#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2145 +#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2161 msgid "Async" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1123 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1224 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:131 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:139 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1125 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1226 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:130 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:138 #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SingleTransferPipe.cs:75 #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SingleTransferPipe.cs:79 #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SingleTransferPipe.cs:97 @@ -1554,1080 +1592,1140 @@ msgstr "" msgid "BP" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1123 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:141 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1125 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:140 #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SingleTransferPipe.cs:90 #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SingleTransferPipe.cs:99 #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/VacuumSinglePipe.cs:139 msgid "EOT" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1141 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:137 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1143 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:136 #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/VacuumSinglePipe.cs:129 msgid "EQ" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1141 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1234 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:130 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:138 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/EPBrakeSystem.cs:82 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SMEBrakeSystem.cs:85 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1143 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1236 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:129 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:137 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/EPBrakeSystem.cs:141 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SMEBrakeSystem.cs:101 msgid "BC" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1207 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1221 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1209 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1223 msgid "ID" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1210 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1227 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1232 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1212 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1229 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1234 msgid "Remote" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1212 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1214 msgid "Tractive Effort" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1223 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:404 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:435 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1225 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:405 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:436 msgid "Load" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1233 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1235 msgid "ER" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1235 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1237 msgid "MR" msgstr "" -#. Context: Gear -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:929 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5956 -msgctxt "Gear" -msgid "N" -msgstr "" - #. Context: PowerSupply -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:945 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:361 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:947 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:362 msgctxt "PowerSupply" msgid "Power" msgstr "" #. Context: Notch -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:997 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1041 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:999 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1043 msgctxt "Notch" msgid "N" msgstr "" #. Context: Notch -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1005 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1013 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1049 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1057 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1007 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1015 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1051 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1059 msgctxt "Notch" msgid "B" msgstr "" #. Context: Notch -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1019 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1063 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1021 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1065 msgctxt "Notch" msgid "Idle" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:343 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:344 msgid "Pantographs" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:370 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:371 msgid "TCS" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:370 #: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:371 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:372 msgid "OK" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:370 #: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:371 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:372 msgid "NOT OK" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:371 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:372 msgid "Driver" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:372 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:373 msgid "Auxiliary power" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:2766 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:2927 msgid "No water scoop on this loco" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:2773 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:2934 msgid "Scoop is broken, can't refill" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:2780 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:2941 msgid "Scoop is broken by junction track" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:2790 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:2951 msgid "Scoop is not over trough, can't refill" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:3155 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:3307 msgid "Sand supply has been exhausted" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:3590 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:3651 -msgid "Throttle must be reduced to Idle before gear change can happen." -msgstr "" - -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:2801 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:2962 msgid "Refill: Loco must be moving forward." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:2810 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:2971 #, csharp-format msgid "Refill: Loco speed must exceed {0} for water to enter tender." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:2820 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:2981 msgid "Refill: Water supply now replenished." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:2349 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:2712 msgid "Tender coal supply is empty. Your loco will fail." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:2446 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:2809 msgid "Tender water supply is empty. Your loco will fail." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:2572 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:2935 msgid "Fire has dropped too far. Your loco will fail." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:2654 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:3017 msgid "" "FireMass is getting low. Your fireman will shovel faster, but don't wear him " "out." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:2666 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:3029 msgid "FireMass is back within limits. Your fireman will shovel as per normal." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:3139 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:3502 msgid "Grate limit exceeded - boiler heat rate cannot increase." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:3147 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:3510 msgid "Grate limit return to normal." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5320 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5612 msgid "Water level dropped too far. Plug has fused and loco has failed." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5327 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5619 msgid "Boiler overfull and priming." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5333 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5625 msgid "Boiler no longer priming." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5953 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6245 msgid "Fixed gear" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5957 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6249 msgid "Steam usage" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5958 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6250 msgid "Boiler pressure" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5959 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6251 msgid "Boiler water glass" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5959 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6251 msgid "(safe range)" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5963 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6255 msgid "Boiler water level" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5963 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6255 msgid "(absolute)" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5965 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6257 msgid "Fire mass" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5967 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6259 msgid "Fire Heat Loss" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5970 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6262 msgid "Fuel levels" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5970 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6262 msgid "coal" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5970 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6262 msgid "water" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5979 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6271 msgid "Key Inputs" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5981 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6273 msgid "Locomotive Type:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5985 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6277 msgid "Input:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5986 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6278 msgid "Evap" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5987 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6279 msgid "Grate" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5988 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6280 msgid "Boiler" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5989 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6281 msgid "SuperHr" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5990 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6282 msgid "FuelCal" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5998 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6290 msgid "Adj:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5999 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6291 msgid "CylEff" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6001 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6293 msgid "PortOpen" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6005 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6297 msgid "Steam Production" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6010 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6302 msgid "Boiler:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6012 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6304 msgid "Mass" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6013 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6305 msgid "MaxOutp" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6014 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6306 msgid "BoilerEff" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6022 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6314 msgid "Heat:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6023 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6315 msgid "In" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6025 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6664 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6317 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6964 msgid "Out" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6027 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6319 msgid "Rad" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6029 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6321 msgid "Stored" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6031 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6325 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6323 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6617 msgid "Max" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6033 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6203 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6325 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6495 msgid "Safety" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6035 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6327 msgid "Raw" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6040 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6332 msgid "Temp:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6041 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6333 msgid "Flue" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6043 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6366 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6335 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6658 msgid "Water" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6045 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6337 msgid "MaxSupH" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6047 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6339 msgid "CurSupH" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6051 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6343 msgid "Steam Usage" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6059 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6086 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6351 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6378 msgid "Usage:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6060 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6087 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6352 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6379 msgid "Cyl" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6064 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6356 msgid "Comprsr" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6066 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6093 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6358 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6385 msgid "SafetyV" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6068 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6095 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6360 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6387 msgid "CylCock" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6070 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6097 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6362 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6389 msgid "Genertr" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6072 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6099 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6384 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6364 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6391 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6676 msgid "Stoker" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6074 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6101 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6366 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6393 msgid "BlowD" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6076 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6103 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6368 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6395 msgid "MaxSafe" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6091 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6383 msgid "Ejector" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6114 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6406 msgid "CylValve:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6115 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6407 msgid "Travel" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6117 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6135 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6155 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6170 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6190 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6409 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6427 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6447 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6462 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6482 msgid "Cutoff" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6119 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6411 msgid "Lead" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6121 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6413 msgid "ExhLap" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6123 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6415 msgid "StLap" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6125 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6417 msgid "AdvAng" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6134 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6426 msgid "CylEvts:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6137 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6429 msgid "CylExh" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6139 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6431 msgid "CylComp" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6141 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6433 msgid "CyAdmis" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6150 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6442 msgid "PressHP:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6151 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6186 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6443 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6478 msgid "Chest" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6153 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6168 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6188 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6445 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6460 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6480 msgid "Initial" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6157 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6172 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6192 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6449 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6464 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6484 msgid "Rel" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6159 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6174 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6194 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6451 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6466 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6486 msgid "Back" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6161 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6176 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6196 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6453 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6468 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6488 msgid "MEP" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6167 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6459 msgid "PressLP:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6185 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6477 msgid "Press:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6202 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6377 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6494 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6669 msgid "Status:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6204 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:167 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:185 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SingleTransferPipe.cs:141 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/VacuumSinglePipe.cs:162 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/VacuumSinglePipe.cs:181 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6496 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:162 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SingleTransferPipe.cs:142 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SMEBrakeSystem.cs:95 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/VacuumSinglePipe.cs:163 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/VacuumSinglePipe.cs:183 msgid "Open" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6204 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6496 msgid "Closed" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6205 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6497 msgid "Plug" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6206 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6208 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6379 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6381 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6383 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6385 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6387 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6389 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6391 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6393 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6395 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6410 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6425 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6455 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6470 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6508 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6641 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6656 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6669 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6690 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6692 -#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2185 -#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2200 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6498 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6500 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6671 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6673 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6675 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6677 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6679 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6681 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6683 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6685 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6687 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6702 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6717 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6747 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6762 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6796 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6814 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6816 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6818 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6820 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6941 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6956 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6969 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6990 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6992 +#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2144 +#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2159 msgid "Yes" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6206 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6208 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6379 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6381 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6383 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6385 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6387 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6389 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6391 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6393 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6395 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6410 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6425 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6455 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6470 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6508 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6641 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6656 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6669 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6690 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6692 -#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2185 -#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2200 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6498 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6500 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6671 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6673 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6675 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6677 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6679 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6681 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6683 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6685 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6687 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6702 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6717 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6747 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6762 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6796 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6814 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6816 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6818 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6820 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6941 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6956 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6969 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6990 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6992 +#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2144 +#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2159 msgid "No" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6207 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6499 msgid "Prime" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6209 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6501 msgid "Comp" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6264 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6556 msgid "Fireman" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6266 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6558 msgid "Fire:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6267 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6559 msgid "Ideal" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6269 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6561 msgid "Actual" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6271 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6563 msgid "MaxFireR" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6273 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6565 msgid "FeedRate" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6275 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6567 msgid "BurnRate" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6277 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6569 msgid "Combust" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6281 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6388 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6573 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6680 msgid "GrLimit" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6285 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6577 msgid "MaxBurn" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6324 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6616 msgid "Injector:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6326 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6618 msgid "Inj1" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6327 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6619 msgid "Temp1" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6328 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6620 msgid "Inj2" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6329 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6621 msgid "Temp2" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6342 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6362 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6634 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6654 msgid "Tender:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6343 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6363 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6635 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6655 msgid "Coal" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6346 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6638 msgid "Water(C)" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6349 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6641 msgid "Water(T)" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6351 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6643 msgid "Water(A)" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6353 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6369 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6645 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6661 msgid "Steam" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6355 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6371 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6647 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6663 msgid "TotSteam" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6378 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6670 msgid "CoalOut" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6380 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6672 msgid "WaterOut" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6382 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6674 msgid "FireOut" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6386 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6678 msgid "Boost" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6390 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6682 msgid "FireOn" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6392 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6684 msgid "FireOff" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6394 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6686 msgid "AIOR" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6400 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6445 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6692 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6737 msgid "Performance" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6402 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6447 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6694 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6739 msgid "Power:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6403 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6448 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6695 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6740 msgid "MaxInd" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6405 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6450 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6697 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6742 msgid "Ind" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6407 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6452 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6699 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6744 msgid "Drawbar" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6409 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6454 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6701 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6746 msgid "BlrLmt" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6413 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6458 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6705 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6750 msgid "Force:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6414 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6459 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6706 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6751 msgid "TheorTE" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6416 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6461 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6708 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6753 msgid "StartTE" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6418 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6463 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6710 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6755 msgid "TE" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6420 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6465 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6712 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6757 msgid "Draw" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6422 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6467 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6714 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6759 msgid "CritSpeed" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6424 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6469 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6716 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6761 msgid "SpdLmt" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6428 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6473 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6720 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6765 msgid "Move:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6429 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6474 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6497 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6721 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6766 msgid "Piston" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6431 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6476 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6723 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6768 msgid "DrvWhl" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6433 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6478 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6725 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6770 msgid "MF-Gear" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6438 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6483 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6730 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6775 msgid "Max-SpdF" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6492 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6784 msgid "Slip Monitor" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6494 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6786 msgid "Slip:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6495 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6787 msgid "MForceN" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6499 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6576 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6590 -msgid "Tang(c)" -msgstr "" - -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6501 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6578 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6592 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6789 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6878 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6892 msgid "Tang(t)" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6503 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6580 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6594 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6791 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6880 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6894 msgid "Static" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6505 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6793 msgid "Coeff" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6507 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6795 msgid "Slip" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6509 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6797 msgid "WheelM" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6511 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6799 msgid "FoA" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6515 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6803 msgid "Sand:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6516 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6804 msgid "S/Use" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6518 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6806 msgid "S/Box" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6520 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6808 msgid "M/Press" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6569 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6812 +msgid "CylE:" +msgstr "" + +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6813 +msgid "#1" +msgstr "" + +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6815 +msgid "#2" +msgstr "" + +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6817 +msgid "#3" +msgstr "" + +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6819 +msgid "#4" +msgstr "" + +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6869 msgid "Slip Debug" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6571 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6871 msgid "Start:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6572 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6586 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6872 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6886 msgid "CyPressL" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6574 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6588 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6874 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6888 msgid "CyPressR" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6585 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6876 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6890 +msgid "Tang(c)" +msgstr "" + +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6885 msgid "Speed:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6599 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6899 msgid "Wheel:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6600 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6900 msgid "TangSp" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6610 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6910 msgid "Sound Variables" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6612 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6912 msgid "V1:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6614 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6914 msgid "V2:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6616 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6916 msgid "V3:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6627 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6927 msgid "Ejector / Vacuum Pump" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6632 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6932 msgid "Large:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6635 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6650 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6935 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6950 msgid "StCons" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6638 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6653 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6666 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6938 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6953 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6966 msgid "Rate" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6640 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6940 msgid "Lg Ej" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6647 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6947 msgid "Small:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6655 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6955 msgid "Sm Ej" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6663 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6963 msgid "Vac:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6668 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6968 msgid "Pump" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6674 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6974 msgid "Leak:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6676 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6976 msgid "Net:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6688 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6988 msgid "Fill:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6689 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6989 msgid "ScDwn" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6691 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6991 msgid "ScBrk" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6693 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6993 msgid "Min" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6695 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6995 msgid "WaVel" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6697 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6997 msgid "Drag" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6699 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6999 msgid "WaterU" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6701 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:7001 msgid "Input" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6703 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:7003 msgid "Total" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6817 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6895 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:7117 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:7195 msgid "Gears can't be changed unless throttle is at zero." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:7555 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:7855 msgid "AI Fireman has started adding fuel to fire" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:7562 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:7862 msgid "AI Fireman has stopped adding fuel to fire" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:7569 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:7869 msgid "AI Fireman has been reset" msgstr "" #. Context: HUD -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6011 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:403 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:422 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:430 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6303 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:404 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:423 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:431 msgctxt "HUD" msgid "Power" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:1993 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:1980 msgid "Starting unload" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4051 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:3994 msgid "Incompatible data" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4066 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4009 msgid "Starting refill" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4075 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4122 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4018 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4065 msgid "Preparing for unload" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4095 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4038 msgid "Container station busy with preceding mission" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4102 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4045 msgid "No containers to load" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4106 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4049 msgid "Starting load" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4116 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4059 msgid "Container station full, can't unload" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:1980 +#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:1939 msgid "" "You were travelling too fast for this curve, and have snapped a brake hose on " "Car " msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:1668 +#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:1627 #, csharp-format msgid "Car {0} has derailed on the curve." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:1942 +#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:1901 #, csharp-format msgid "" "You are travelling too fast for this curve. Slow down, your freight car {0} " "may be damaged. The recommended speed for this curve is {1}" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:1946 +#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:1905 #, csharp-format msgid "" "You are travelling too fast for this curve. Slow down, your passengers in car " "{0} are feeling uncomfortable. The recommended speed for this curve is {1}" msgstr "" +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/CruiseControl.cs:710 +msgid "Speed selector mode changed to" +msgstr "" + +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/CruiseControl.cs:1110 +msgid "Number of axles increased to " +msgstr "" + +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/CruiseControl.cs:1122 +msgid "Number of axles decreased to " +msgstr "" + +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/CruiseControl.cs:1153 +msgid "Selected speed set to " +msgstr "" + +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/CruiseControl.cs:650 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/CruiseControl.cs:690 +#, csharp-format +msgid "Speed regulator mode changed to {0}" +msgstr "" + +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/CruiseControl.cs:731 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/CruiseControl.cs:754 +#, csharp-format +msgid "Speed selector mode changed to {0}" +msgstr "" + +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/CruiseControl.cs:989 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/CruiseControl.cs:1051 +#, csharp-format +msgid "Selected speed changed to {0} mph" +msgstr "" + +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/CruiseControl.cs:991 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/CruiseControl.cs:1053 +#, csharp-format +msgid "Selected speed changed to {0} km/h" +msgstr "" + +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/CruiseControl.cs:1095 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/CruiseControl.cs:1097 +#, csharp-format +msgid "Selected speed changed to {0}" +msgstr "" + #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/ManualBraking.cs:233 #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/ManualBraking.cs:240 msgid "Manual Brake" @@ -2642,45 +2740,45 @@ msgstr "" msgid "Lead BP" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/CircuitBreaker.cs:413 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/CircuitBreaker.cs:384 msgid "Circuit breaker closing not authorized" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:402 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:416 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:403 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:417 msgid "Status" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:405 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:406 msgid "RPM" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:406 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:453 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:407 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:454 msgid "Flow" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:407 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:408 msgid "Temperature" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:408 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:409 msgid "Oil Pressure" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:422 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:423 msgid " " msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:461 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:462 msgid "Oil" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:1256 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:1271 msgid "Diesel Engine has stalled due to underspeed." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:1275 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:1290 msgid "Diesel Engine has stalled due to overspeed." msgstr "" @@ -2688,47 +2786,47 @@ msgstr "" msgid "Pantograph raised even though this route is not electrified" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/TractionCutOffRelay.cs:411 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/TractionCutOffRelay.cs:382 msgid "Traction cut-off relay closing not authorized" msgstr "" -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10409 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10522 msgid "Held for connecting train : " msgstr "" -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10417 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10530 msgid "Waiting for train to attach : " msgstr "" -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10433 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10546 msgid "Waiting for transfer with train : " msgstr "" -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10448 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10561 msgid "Waiting for train to arrive : " msgstr "" -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10503 -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10534 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10616 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10647 msgid ", backward" msgstr "" -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10518 -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10534 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10631 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10647 msgid ", forward" msgstr "" -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10527 -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10535 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10640 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10648 msgid "Train is ready to attach to : " msgstr "" -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10590 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10703 msgid "Passenger detraining completed. Train terminated." msgstr "" -#: ../../Orts.Simulation/Simulation/Timetables/TTTurntable.cs:1788 -#: ../../Orts.Simulation/Simulation/Timetables/TTTurntable.cs:1829 +#: ../../Orts.Simulation/Simulation/Timetables/TTTurntable.cs:1934 +#: ../../Orts.Simulation/Simulation/Timetables/TTTurntable.cs:1983 #, csharp-format msgid "Turntable is ready for access - allowed speed set to {0}" msgstr "" diff --git a/Source/Locales/RunActivity/RunActivity.pot b/Source/Locales/RunActivity/RunActivity.pot index 7c5c13115b..476d72f5ab 100644 --- a/Source/Locales/RunActivity/RunActivity.pot +++ b/Source/Locales/RunActivity/RunActivity.pot @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2022-08-17 02:43:31+0200\n" -"PO-Revision-Date: 2022-08-17 02:43:31+0200\n" +"POT-Creation-Date: 2023-08-25 09:18:12+0200\n" +"PO-Revision-Date: 2023-08-25 09:18:13+0200\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -75,127 +75,345 @@ msgid_plural "{0:F0} tiles" msgstr[0] "" msgstr[1] "" -#: ../../RunActivity/Viewer3D/Viewer.cs:829 -#: ../../RunActivity/Viewer3D/Viewer.cs:1017 +#: ../../RunActivity/Viewer3D/Viewer.cs:830 +#: ../../RunActivity/Viewer3D/Viewer.cs:1018 msgid "Cab view not available" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:914 +#: ../../RunActivity/Viewer3D/Viewer.cs:915 msgid "In MP, use Alt-F4 to quit directly" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:946 +#: ../../RunActivity/Viewer3D/Viewer.cs:947 msgid "Automatic platform and siding labels visible." msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:949 +#: ../../RunActivity/Viewer3D/Viewer.cs:950 msgid "Platform and siding labels visible." msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:952 +#: ../../RunActivity/Viewer3D/Viewer.cs:953 msgid "Platform labels visible." msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:955 +#: ../../RunActivity/Viewer3D/Viewer.cs:956 msgid "Siding labels visible." msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:961 +#: ../../RunActivity/Viewer3D/Viewer.cs:962 msgid "Platform and siding labels hidden." msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:972 +#: ../../RunActivity/Viewer3D/Viewer.cs:973 msgid "Train labels visible." msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:975 +#: ../../RunActivity/Viewer3D/Viewer.cs:976 msgid "Car labels visible." msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:981 +#: ../../RunActivity/Viewer3D/Viewer.cs:982 msgid "Train and car labels hidden." msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1024 +#: ../../RunActivity/Viewer3D/Viewer.cs:1025 msgid "This car doesn't have a 2D cab" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1028 +#: ../../RunActivity/Viewer3D/Viewer.cs:1029 msgid "This car doesn't have a 3D cab" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1059 -msgid "Confirmations suppressed" +#: ../../RunActivity/Viewer3D/Viewer.cs:1074 +msgid "messages suppressed" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1061 -msgid "Confirmations visible" +#: ../../RunActivity/Viewer3D/Viewer.cs:1078 +msgid "All messages visible" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1210 +#: ../../RunActivity/Viewer3D/Viewer.cs:1231 msgid "Switched to player control" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1217 +#: ../../RunActivity/Viewer3D/Viewer.cs:1238 msgid "You can't switch from manual to autopilot mode" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1223 +#: ../../RunActivity/Viewer3D/Viewer.cs:1244 msgid "Switched to autopilot" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1896 +#: ../../RunActivity/Viewer3D/Viewer.cs:1919 msgid "Game saved" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:348 +#: ../../RunActivity/Viewer3D/Viewer.cs:349 #, csharp-format msgid "Allowed speed raised to {0}" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1050 +#: ../../RunActivity/Viewer3D/Viewer.cs:1051 #, csharp-format msgid "Vibrating at level {0}" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1241 +#: ../../RunActivity/Viewer3D/Viewer.cs:1262 #, csharp-format msgid "Keyboard map list saved to '{0}'." msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1245 +#: ../../RunActivity/Viewer3D/Viewer.cs:1266 #, csharp-format msgid "Keyboard map image saved to '{0}'." msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1097 +#: ../../RunActivity/Viewer3D/Viewer.cs:1117 #, csharp-format msgid "{0} viewpoint stored. Use Shift+8 to restore viewpoints." msgid_plural "{0} viewpoints stored. Use Shift+8 to restore viewpoints." msgstr[0] "" msgstr[1] "" -#: ../../RunActivity/Viewer3D/Weather.cs:145 +#: ../../RunActivity/Viewer3D/Weather.cs:144 msgid "" "Restoring wrong weather type : trying to restore dynamic weather but save " "contains user controlled weather" msgstr "" -#: ../../RunActivity/Viewer3D/Weather.cs:1642 +#: ../../RunActivity/Viewer3D/Weather.cs:1640 msgid "" "Restoring wrong weather type : trying to restore user controlled weather but " "save contains dynamic weather" msgstr "" -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.cs:2004 +#: ../../RunActivity/Viewer3D/Weather.cs:494 +#, csharp-format +msgid "Increased daylight offset to {0} h" +msgstr "" + +#: ../../RunActivity/Viewer3D/Weather.cs:499 +#, csharp-format +msgid "Decreased daylight offset to {0} h" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs:1484 +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.cs:1918 msgid "Switching Request Sent to the Server" msgstr "" -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.cs:580 +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:155 +msgid "Learn more" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:167 +msgid "You are the dispatcher in this multiplayer session" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:257 +msgid "Message all players" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:271 +msgid ">" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:291 +msgid "Messages:" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:318 +msgid "Simulation time" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:331 +msgid "Map customization" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:366 +msgid "All trains" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:378 +msgid "Only active trains" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:388 +msgid "Train state" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:398 +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:572 +msgid "Train labels" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:408 +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:556 +msgid "Signal state" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:418 +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:543 +msgid "Signals" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:428 +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:673 +msgid "Switches" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:438 +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:530 +msgid "Siding labels" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:448 +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:517 +msgid "Platform labels" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:458 +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:793 +msgid "Platforms" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:469 +msgid "Map features" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:478 +msgid "Rotate between themes" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:491 +msgid "Show simulation time" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:501 +msgid "Use anti-aliasing" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:566 +msgid "Multiplayer settings" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:577 +msgid "Penalty for speeding && SPAD" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:589 +msgid "Prefer green (?)" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:601 +msgid "Allow new players to join" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:631 +msgid "Map settings and controls" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:641 +msgid "Follow my train on the map" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:651 +msgid "Jump to my train on the map" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:663 +msgid "Jump to my train in game" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:674 +msgid "Map resolution (m):" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:715 +msgid "Allow throwing switches" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:727 +msgid "Allow changing signals" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:739 +msgid "Draw next path section" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:766 +msgid "Players" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:807 +msgid "Message the selected player" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:815 +msgid "Reply to the selected player" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:833 +msgid "Make this player an assistant" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:840 +msgid "Jump to this player in game" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:847 +msgid "Follow on the map" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:854 +msgid "Kick from multiplayer session" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:872 +msgid "Set switch to..." +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:881 +msgid "Main route" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:889 +msgid "Side route" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:911 +msgid "Set signal aspect to..." +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:918 +msgid "System controlled" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:927 +msgid "Stop" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:935 +msgid "Approach" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:944 +msgid "Proceed" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:957 +msgid "Allow call on" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:967 +msgid "Map window" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.cs:555 msgid "MSG to Server" msgstr "" -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.cs:584 +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.cs:559 #: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:256 msgid "MSG to All" msgstr "" @@ -258,11 +476,11 @@ msgid "Assist" msgstr "" #: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:417 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1195 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1244 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1310 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:718 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:766 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1226 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1275 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1341 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:719 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:767 msgid "Normal" msgstr "" @@ -294,26 +512,6 @@ msgstr "" msgid "Show:" msgstr "" -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:517 -msgid "Platform labels" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:530 -msgid "Siding labels" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:543 -msgid "Signals" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:556 -msgid "Signal state" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:572 -msgid "Train labels" -msgstr "" - #: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:583 msgid "Key" msgstr "" @@ -334,10 +532,6 @@ msgstr "" msgid "Background color" msgstr "" -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:673 -msgid "Switches" -msgstr "" - #: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:685 msgid "To pan, drag with left mouse." msgstr "" @@ -371,10 +565,6 @@ msgstr "" msgid "To zoom out of a location, press Alt and click the left mouse." msgstr "" -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:793 -msgid "Platforms" -msgstr "" - #: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:852 msgid "Map Window" msgstr "" @@ -423,14 +613,14 @@ msgid "3D" msgstr "" #: ../../RunActivity/Viewer3D/Debugging/SoundDebugForm.Designer.cs:284 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:430 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:615 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1182 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:146 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:668 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:431 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:629 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1193 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:148 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:671 #: ../../RunActivity/Viewer3D/WebServices/TrackMonitorDisplay.cs:291 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:109 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:230 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:110 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:231 msgid "Speed" msgstr "" @@ -447,8 +637,8 @@ msgid "Variable 1" msgstr "" #: ../../RunActivity/Viewer3D/Debugging/SoundDebugForm.Designer.cs:351 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1188 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1190 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1199 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1201 #: ../../RunActivity/Viewer3D/Popups/NextStationWindow.cs:78 msgid "Distance" msgstr "" @@ -706,11 +896,11 @@ msgstr "" msgid "Can't attach EOT if player train not stopped" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/EOTListWindow.cs:110 +#: ../../RunActivity/Viewer3D/Popups/EOTListWindow.cs:111 msgid "Player train already has a mounted EOT" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/EOTListWindow.cs:122 +#: ../../RunActivity/Viewer3D/Popups/EOTListWindow.cs:124 msgid "Can't mount an EOT if another one is mounted" msgstr "" @@ -838,8 +1028,8 @@ msgid "- Missed station stops: " msgstr "" #: ../../RunActivity/Viewer3D/Popups/HelpWindow.cs:416 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:963 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1126 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:980 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1137 msgid " " msgstr "" @@ -918,962 +1108,981 @@ msgid_plural "{0} minutes" msgstr[0] "" msgstr[1] "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:105 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:433 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:601 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:614 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:106 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:434 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:615 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:628 #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:146 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:148 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:151 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:85 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:111 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:112 msgid "Throttle" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:106 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:107 msgid "Power In/Out" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:110 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:111 msgid "Motive force" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:112 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:113 msgid "Num of substeps" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:115 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1336 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:116 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1347 msgid "Memory" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:116 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:117 msgid "GCs" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:117 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:118 msgid "Frame time" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:118 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1350 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:119 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1361 msgid "Render process" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:119 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1351 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:120 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1362 msgid "Updater process" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:120 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1352 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:121 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1363 msgid "Loader process" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:121 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1353 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:122 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1364 msgid "Sound process" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:419 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:420 msgid "Version" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:423 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:425 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:424 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:426 #: ../../RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs:158 #: ../../RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs:164 #: ../../RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs:332 #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:147 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:149 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:645 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:152 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:648 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:86 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:112 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:207 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:113 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:208 msgid "Time" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:428 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:142 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:652 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:105 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:214 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:429 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:144 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:655 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:106 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:215 msgid "Replay" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:431 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1121 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:135 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:686 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:432 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1132 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:136 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:689 #: ../../RunActivity/Viewer3D/WebServices/TrackMonitorDisplay.cs:322 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:99 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:248 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:100 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:249 msgid "Gradient" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:432 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:599 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:611 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:124 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:433 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:613 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:625 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:125 #: ../../RunActivity/Viewer3D/WebServices/TrackMonitorDisplay.cs:332 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:89 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:90 msgid "Direction" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:433 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:601 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:141 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:104 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:434 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:615 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:143 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:105 msgid "Regulator" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:437 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:151 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:823 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:880 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:914 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:114 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:383 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:428 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:462 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:438 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:154 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:826 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:883 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:917 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:115 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:384 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:429 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:463 msgid "Train brake" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:439 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:143 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:931 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:106 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:479 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:440 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:145 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:934 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:107 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:480 msgid "Retainers" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:441 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:129 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:940 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:955 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:93 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:488 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:503 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:442 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:130 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:943 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:958 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:94 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:489 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:504 msgid "Engine brake" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:443 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:444 msgid "Brakemen brake" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:445 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:602 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:127 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:966 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:975 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:91 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:514 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:522 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:446 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:616 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:128 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:969 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:978 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:92 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:515 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:523 msgid "Dynamic brake" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:459 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:462 +msgid "Cruise control status" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:465 +msgid "Speed target" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:466 +msgid "Max acceleration" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:470 msgid "Multiple Units" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:461 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1116 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:639 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:472 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1147 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:640 msgid "FPS" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:465 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:476 #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:117 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1126 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:82 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:649 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1157 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:83 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:650 msgid "Autopilot" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:468 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1068 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:479 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1078 msgid "Wheel slip" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:470 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:481 msgid "Wheel slip warning" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:473 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:484 msgid "Wheel skid" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:479 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:490 msgid "Sander blocked" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:481 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:492 msgid "Sander on" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:494 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:126 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1331 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1345 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:90 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:786 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:800 -msgid "Doors open" +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:503 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1358 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:783 +msgid "Left" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:500 -msgid "MultiPlayerStatus: " +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:505 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1360 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:785 +msgid "Right" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:501 -#: ../../RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs:344 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:508 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:127 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1364 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1378 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:91 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:789 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:803 +msgid "Doors open" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:514 +msgid "MultiPlayerStatus: " +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:515 +#: ../../RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs:344 msgid "Dispatcher" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:502 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:516 #: ../../RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs:345 msgid "Helper" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:503 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:517 #: ../../RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs:346 msgid "Client" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:512 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:526 msgid "CONSIST INFORMATION" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:524 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:538 msgid "Player" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:525 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:539 msgid "Tilted" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:526 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:548 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:669 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:904 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:923 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:953 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:983 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1012 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:540 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:562 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:683 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:918 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:938 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:969 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1000 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1030 msgid "Type" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:527 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:549 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:541 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:563 msgid "Length" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:528 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:550 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:542 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:564 msgid "Weight" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:529 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:543 msgid "Tonnage" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:530 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:544 msgid "Control Mode" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:531 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:545 msgid "Out of Control" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:532 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:546 msgid "Cab Aspect" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:535 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:558 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1153 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1332 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:549 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:572 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1164 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1343 #: ../../RunActivity/Viewer3D/RollingStock/SubSystems/ETCS/DataEntry.cs:460 #: ../../RunActivity/Viewer3D/RollingStock/SubSystems/ETCS/DataEntry.cs:485 msgid "Yes" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:535 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:558 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1153 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1332 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:549 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:572 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1164 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1343 msgid "No" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:536 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:559 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:550 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:573 msgid "Freight" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:536 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:559 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:550 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:573 msgid "Pass" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:546 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:903 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:922 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:952 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:982 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1011 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1108 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:560 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:917 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:937 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:968 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:999 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1029 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1119 msgid "Car" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:547 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:612 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1155 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:561 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:626 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1166 msgid "Flipped" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:551 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:565 msgid "Drv/Cabs" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:552 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:566 msgid "Wheels" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:553 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:567 msgid "Temp" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:593 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:607 msgid "LOCOMOTIVE INFORMATION" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:606 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:790 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:799 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:801 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:805 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:814 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:816 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:824 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:826 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:861 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:891 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:620 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:804 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:813 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:815 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:819 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:828 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:830 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:838 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:840 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:875 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:905 msgid "off" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:607 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:788 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:797 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:812 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:822 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:849 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:857 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:621 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:802 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:811 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:826 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:836 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:863 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:871 msgid "PlayerLoco" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:610 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:878 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:885 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:624 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:892 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:899 msgid "Loco" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:613 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:627 msgid "MU'd" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:617 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:681 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:631 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:695 #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:140 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:140 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:142 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:79 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:103 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:104 msgid "Power" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:618 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:632 msgid "Force" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:628 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:642 msgid "DISTRIBUTED POWER INFORMATION" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:662 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:676 msgid "POWER SUPPLY INFORMATION" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:668 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:682 msgid "Wagon" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:674 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:688 msgid "MainPS" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:675 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:689 msgid "AuxPS" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:676 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:690 msgid "Battery" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:677 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:691 msgid "LowVoltPS" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:678 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:692 msgid "CabPS" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:679 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:693 msgid "ETS" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:680 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:694 msgid "ETSCable" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:707 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:720 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:735 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:744 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:721 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:734 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:749 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:758 msgid "connected" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:707 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:720 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:735 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:744 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:721 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:734 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:749 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:758 msgid "disconnected" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:772 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:786 msgid "BRAKE INFORMATION" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:789 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:803 msgid "Exhauster" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:790 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:799 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:801 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:805 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:814 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:816 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:824 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:826 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:861 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:891 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:804 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:813 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:815 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:819 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:828 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:830 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:838 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:840 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:875 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:905 msgid "on" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:798 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:813 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:823 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:812 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:827 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:837 msgid "Large Ejector" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:800 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:825 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:814 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:839 msgid "Small Ejector" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:802 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:827 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:816 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:841 msgid "Pressure" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:804 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:815 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:818 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:829 msgid "Vacuum Pump" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:833 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:847 msgid "Brake Sys Vol" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:834 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:848 msgid "Train Pipe" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:836 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:850 msgid "Brake Cyl" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:838 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:852 msgid "Air Vol" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:850 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:864 msgid "No compressor or reservoir fitted" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:858 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:888 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:872 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:902 msgid "Main reservoir" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:860 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:890 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:874 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:904 msgid "Compressor" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:905 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:924 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:984 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1013 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:919 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:939 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1001 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1031 msgid "BrkCyl" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:906 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:925 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1014 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:920 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:940 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1032 msgid "BrkPipe" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:913 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:932 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:962 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:992 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1021 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:928 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:948 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:979 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1010 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1040 msgid "Handbrk" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:914 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:933 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:993 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1022 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:929 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:949 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1011 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1041 msgid "Conn" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:915 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:934 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:994 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1023 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:930 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:950 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1012 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1042 msgid "AnglCock" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:926 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:941 msgid "VacRes" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:954 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:970 msgid "Brk" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:985 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1002 msgid "SrvPipe" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:986 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1015 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1003 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1033 msgid "AuxRes" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:987 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1016 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1004 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1034 msgid "ErgRes" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:988 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1005 msgid "StrPipe" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:989 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1018 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1006 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1036 +msgid "CtrlRes" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1007 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1037 msgid "RetValve" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:990 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1019 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1008 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1038 msgid "TripleValve" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:995 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1024 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1013 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1043 msgid "BleedOff" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1017 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1035 msgid "MRPipe" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1041 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1061 msgid "FORCE INFORMATION" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1058 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1067 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1077 msgid "(Advanced adhesion model)" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1059 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1084 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1092 -msgid "Loco Adhesion" -msgstr "" - -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1060 -msgid "Wag Adhesion" -msgstr "" - -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1061 -msgid "Tang. Force" -msgstr "" - -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1062 -msgid "Static Force" -msgstr "" - -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1069 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1079 msgid "Conditions" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1070 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1080 msgid "Axle drive force" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1072 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1082 msgid "Axle brake force" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1073 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1083 msgid "Number of substeps" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1074 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1091 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1084 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1102 msgid "Axle out force" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1077 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1087 msgid "Comp Axle out force" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1080 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1090 msgid "Wheel Speed" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1085 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1093 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1094 +msgid "Wheel ang. pos." +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1095 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1103 +msgid "Loco Adhesion" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1096 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1104 msgid "Wagon Adhesion" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1090 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1101 msgid "(Simple adhesion model)" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1099 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1110 msgid "Wind Speed:" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1100 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1111 msgid "Wind Direction:" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1101 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1112 msgid "Train Direction:" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1102 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1113 msgid "ResWind:" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1103 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1114 msgid "ResSpeed:" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1109 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1120 msgid "Total" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1110 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1121 msgid "Motive" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1111 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1122 msgid "Brake" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1112 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1123 msgid "Friction" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1113 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1124 msgid "Gravity" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1114 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1122 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1125 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1133 msgid "Curve" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1115 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1126 msgid "Tunnel" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1116 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1323 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1127 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1334 msgid "Wind" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1117 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1118 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1128 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1129 msgid "Coupler" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1119 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1130 msgid "Slack" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1120 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1131 msgid "Mass" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1123 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1134 msgid "Brk Frict." msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1124 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1135 msgid "Brk Slide" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1125 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1136 msgid "Bear Temp" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1127 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:125 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1286 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1294 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1309 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1138 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:126 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1317 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1325 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1340 msgid "DerailCoeff" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1177 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1188 msgid "DISPATCHER INFORMATION : active trains : " msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1180 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1191 msgid "Train" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1181 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1192 msgid "Travelled" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1183 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1194 msgid "Max" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1184 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1195 msgid "AI mode" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1185 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1196 msgid "AI data" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1186 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1197 msgid "Mode" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1187 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1198 msgid "Auth" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1189 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1200 msgid "Signal" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1191 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1202 msgid "Consist" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1192 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1203 msgid "Path" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1317 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1328 msgid "WEATHER INFORMATION" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1319 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1330 msgid "Visibility" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1320 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1331 msgid "Cloud cover" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1321 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1332 msgid "Intensity" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1322 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1333 msgid "Liquidity" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1324 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1335 msgid "Amb Temp" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1330 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1341 msgid "DEBUG INFORMATION" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1332 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1343 msgid "Logging enabled" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1333 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1344 msgid "Build" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1334 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1345 msgid "CPU" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1335 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1346 msgid "GPU" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1337 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1348 msgid "CPU Memory" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1338 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1349 msgid "GPU Memory" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1339 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1350 msgid "Adapter" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1344 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1355 msgid "Shadow maps" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1346 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1357 msgid "Shadow primitives" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1349 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1360 msgid "Render primitives" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1350 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1351 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1352 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1353 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1354 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1361 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1362 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1363 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1364 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1365 msgid "wait" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1354 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1365 msgid "Total process" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1355 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1366 msgid "Camera" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1099 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1103 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1110 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1114 #, csharp-format msgid "{0:N2} mph" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1100 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1101 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1102 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1111 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1112 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1113 #, csharp-format msgid "{0:N2} Deg" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1319 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1330 #, csharp-format msgid "{0:N0} m" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1320 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1322 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1331 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1333 #, csharp-format msgid "{0:F0} %" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1321 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1332 #, csharp-format msgid "{0:F4} p/s/m^2" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1323 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1334 #, csharp-format msgid "{0:F1},{1:F1} m/s" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1334 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1345 #, csharp-format msgid "{0:F0}% ({1})" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1335 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1346 #, csharp-format msgid "" "{0:F0} FPS (50th/95th/99th percentiles {1:F1} / {2:F1} / {3:F1} ms, DirectX " "feature level >= {4})" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1336 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1347 #, csharp-format msgid "" "{3}, {4}, {5}, {6} ({7:F0} kB/frame allocated, {0:F0}/{1:F0}/{2:F0} GCs)" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1337 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1348 #, csharp-format msgid "" "{0:F0} MB private, {1:F0} MB working set, {2:F0} MB private working set, " "{3:F0} MB managed, {4:F0} MB virtual" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1338 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1349 #, csharp-format msgid "{0:F0} MB committed, {1:F0} MB dedicated, {2:F0} MB shared" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1339 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1350 #, csharp-format msgid "{0} ({1:F0} MB)" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1342 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1353 #, csharp-format msgid "{0}/{1}" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1343 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1354 #, csharp-format msgid "({0}x{0})" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1346 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1349 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1357 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1360 #, csharp-format msgid "{0:F0}" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1350 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1351 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1352 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1353 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1354 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1361 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1362 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1363 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1364 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1365 #, csharp-format msgid "{0:F0}% ({1:F0}% {2})" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1334 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1345 #, csharp-format msgid "{0} logical processor" msgid_plural "{0} logical processors" @@ -1881,57 +2090,57 @@ msgstr[0] "" msgstr[1] "" #. Context: Cab -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:534 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:562 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:548 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:576 msgctxt "Cab" msgid "R" msgstr "" #. Context: Cab -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:534 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:562 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:548 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:576 msgctxt "Cab" msgid "F" msgstr "" #. Context: Cab -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:562 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:576 msgctxt "Cab" msgid "D" msgstr "" #. Context: Steam -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:600 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:614 msgctxt "Steam" msgid "Reverser" msgstr "" #. Context: NonSteam -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:600 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:614 msgctxt "NonSteam" msgid "Reverser" msgstr "" #. Context: Pantograph -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:670 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:684 msgctxt "Pantograph" msgid "Panto" msgstr "" #. Context: Engine -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:671 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:685 msgctxt "Engine" msgid "Eng" msgstr "" #. Context: CircuitBreaker -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:672 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:686 msgctxt "CircuitBreaker" msgid "CB" msgstr "" #. Context: TractionCutOffRelay -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:673 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:687 msgctxt "TractionCutOffRelay" msgid "TCOR" msgstr "" @@ -2024,12 +2233,12 @@ msgstr "" msgid "Activity completed." msgstr "" -#: ../../RunActivity/Viewer3D/Popups/NoticeWindow.cs:96 +#: ../../RunActivity/Viewer3D/Popups/NoticeWindow.cs:97 #, csharp-format msgid "Odometer {0}" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/NoticeWindow.cs:110 +#: ../../RunActivity/Viewer3D/Popups/NoticeWindow.cs:113 #, csharp-format msgid "FOV: {0:F0}°" msgstr "" @@ -2133,9 +2342,9 @@ msgid "Fuel" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:136 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:133 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:134 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:75 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:97 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:98 msgid "FUEL" msgstr "" @@ -2152,8 +2361,8 @@ msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:138 #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:239 #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:615 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:137 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1105 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:138 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1136 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:77 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:197 msgid "Loco Groups" @@ -2161,7 +2370,7 @@ msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:138 #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:239 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:137 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:138 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:77 msgid "GRUP" msgstr "" @@ -2177,9 +2386,9 @@ msgid "OIL" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:140 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:140 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:142 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:79 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:103 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:104 msgid "POWR" msgstr "" @@ -2199,17 +2408,17 @@ msgid "RPM" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:143 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:144 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:146 #: ../../RunActivity/Viewer3D/WebServices/TrackMonitorDisplay.cs:332 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:82 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:107 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:108 msgid "Reverser" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:143 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:144 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:146 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:82 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:107 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:108 msgid "REVR" msgstr "" @@ -2229,16 +2438,16 @@ msgid "TEMP" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:146 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:148 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:151 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:85 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:111 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:112 msgid "THRO" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:147 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:149 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:152 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:86 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:112 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:113 msgid "TIME" msgstr "" @@ -2292,601 +2501,628 @@ msgid "BP" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:52 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:805 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:820 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:829 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:365 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:380 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:389 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:808 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:823 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:832 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:366 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:381 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:390 msgid "EQ" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:53 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:830 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:831 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:843 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:844 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:862 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:863 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:833 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:834 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:846 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:847 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:865 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:866 msgid "V" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:116 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1163 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:81 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:686 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1194 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:82 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:687 msgid "AI Fireman" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:116 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:81 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:82 msgid "AIFR" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:117 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:82 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:83 msgid "AUTO" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:118 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:83 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:84 msgid "Battery switch" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:118 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:83 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:84 msgid "BATT" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:119 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:990 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1008 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:84 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:537 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:555 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:993 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1011 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:85 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:538 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:556 msgid "Boiler pressure" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:119 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:84 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:85 msgid "PRES" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:120 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:85 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:86 msgid "Boiler water glass" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:120 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:85 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:86 msgid "WATR" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:121 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:86 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:87 msgid "Boiler water level" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:121 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:86 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:87 msgid "LEVL" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:122 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:87 -msgid "Circuit breaker" +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1096 +msgid "CCStatus" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:122 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:87 -msgid "CIRC" +msgid "CCST" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:123 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:765 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:88 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:325 -msgid "Cylinder cocks" +msgid "Circuit breaker" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:123 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:88 -msgid "CCOK" +msgid "CIRC" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:124 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:768 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:89 -msgid "DIRC" +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:326 +msgid "Cylinder cocks" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:124 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:89 +msgid "CCOK" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:125 -msgid "DRLC" +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:90 +msgid "DIRC" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:126 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:90 -msgid "DOOR" +msgid "DRLC" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:127 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:91 -msgid "BDYN" -msgstr "" - -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:128 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:92 -msgid "Electric train supply" +msgid "DOOR" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:128 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:92 -msgid "TSUP" +msgid "BDYN" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:129 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:93 -msgid "BLOC" +msgid "Electric train supply" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:130 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1066 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:94 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:614 -msgid "Engine" +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:129 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:93 +msgid "TSUP" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:130 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:94 -msgid "ENGN" +msgid "BLOC" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:131 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1069 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:95 -msgid "Fire mass" +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:615 +msgid "Engine" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:131 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:95 -msgid "FIRE" +msgid "ENGN" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:132 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:96 -msgid "Fixed gear" +msgid "Fire mass" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:132 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:134 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:96 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:98 -msgid "GEAR" +msgid "FIRE" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:133 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1013 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:97 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:560 -msgid "Fuel levels" +msgid "Fixed gear" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:133 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:135 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:97 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:99 +msgid "GEAR" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:134 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1021 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1016 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:98 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:568 -msgid "Gear" +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:561 +msgid "Fuel levels" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:135 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1024 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:99 -msgid "GRAD" +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:569 +msgid "Gear" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:136 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1180 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1194 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:100 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:703 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:717 +msgid "GRAD" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:137 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1211 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1225 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:101 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:704 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:718 msgid "Grate limit" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:136 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:100 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:137 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:101 msgid "GRAT" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:138 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:101 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:139 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:102 msgid "Master key" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:138 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:101 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:139 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:102 msgid "MAST" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:139 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1045 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:102 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:592 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:140 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1111 +msgid "MaxAccel" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:140 +msgid "MACC" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:141 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1048 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:103 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:593 msgid "Pantographs" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:139 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:102 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:141 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:103 msgid "PANT" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:141 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:104 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:143 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:105 msgid "REGL" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:142 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:105 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:144 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:106 msgid "RPLY" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:143 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:106 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:145 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:107 msgid "RETN" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:145 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:779 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:789 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:108 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:339 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:349 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:147 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:782 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:792 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:109 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:340 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:350 msgid "Sander" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:145 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:108 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:147 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:109 msgid "SAND" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:146 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:109 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:148 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:110 msgid "SPED" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:147 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:110 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:149 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:111 msgid "Steam usage" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:147 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:110 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:149 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:111 msgid "STEM" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:150 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:113 -msgid "Traction cut-off relay" +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1104 +msgid "Target" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:150 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:113 -msgid "TRAC" +msgid "TARG" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:151 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:153 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:114 -msgid "BTRN" +msgid "Traction cut-off relay" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:152 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1213 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1221 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1229 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1243 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:153 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:114 +msgid "TRAC" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:154 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:115 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:735 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:743 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:751 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:765 +msgid "BTRN" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:155 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1244 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1252 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1260 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1274 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:116 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:736 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:744 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:752 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:766 msgid "Wheel" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:152 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:115 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:155 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:116 msgid "WHEL" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:157 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:120 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:160 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:121 msgid "(absolute)" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:157 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:120 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:160 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:121 msgid "(Abs.)" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:158 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:121 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:161 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:122 msgid "apply Service" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:158 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:121 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:161 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:122 msgid "Apply" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:159 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:122 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:162 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:123 msgid "Apply Quick" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:159 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:122 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:162 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:123 msgid "ApplQ" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:160 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:123 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:163 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:124 msgid "Apply Slow" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:160 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:123 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:163 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:124 msgid "ApplS" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:161 -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:407 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:124 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:164 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:442 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:125 msgid "coal" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:161 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:124 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:164 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:125 msgid "c" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:162 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:165 msgid "Cont. Service" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:162 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:165 msgid "Serv" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:163 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:125 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:166 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:126 msgid "Emergency Braking Push Button" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:163 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:125 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:166 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:126 msgid "EmerBPB" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:164 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:126 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:167 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:127 msgid "Lap Self" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:164 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:126 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:167 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:127 msgid "LapS" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:165 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:127 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:168 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:128 msgid "Minimum Reduction" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:165 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:127 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:168 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:128 msgid "MRedc" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:166 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:128 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:169 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:129 msgid "(safe range)" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:166 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:128 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:169 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:129 msgid "(safe)" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:167 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1230 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:129 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:752 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:170 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1261 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:130 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:753 msgid "skid" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:167 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:129 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:170 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:130 msgid "Skid" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:168 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1222 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:130 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:744 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:171 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1253 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:131 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:745 msgid "slip warning" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:168 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1295 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:130 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:171 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1326 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:131 msgid "Warning" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:169 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1214 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:131 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:736 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:172 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1245 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:132 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:737 msgid "slip" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:169 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:131 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:172 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:132 msgid "Slip" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:170 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:173 msgid "Vac. Cont. Service" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:170 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:173 msgid "Vac.Serv" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:171 -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:406 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:132 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:174 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:441 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:133 msgid "water" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:171 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:132 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:174 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:133 msgid "w" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:219 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:222 msgid "Train Driving Info" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:631 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:634 msgid "bar" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:632 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:635 msgid "inHg" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:633 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:636 msgid "kgf/cm²" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:634 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:637 msgid "kPa" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:635 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:638 msgid "psi" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:636 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:639 msgid "lib./pal." msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:637 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:640 msgid "pal.rtuti" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:755 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:315 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:758 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:316 msgid "Open" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:760 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1346 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:320 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:801 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:763 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1379 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:321 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:804 msgid "Closed" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:780 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:340 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:783 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:341 msgid "Blocked" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:780 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1127 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1164 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:340 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:650 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:687 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:783 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1158 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1195 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:341 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:651 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:688 msgid "On" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:790 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:976 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1127 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1164 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:350 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:523 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:650 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:687 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:793 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:979 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1158 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1195 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:351 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:524 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:651 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:688 msgid "Off" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:833 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:846 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:865 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:909 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:911 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:918 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:936 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:943 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:390 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:399 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:414 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:457 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:459 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:466 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:484 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:491 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:836 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:849 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:868 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:912 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:914 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:921 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:939 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:946 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:391 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:400 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:415 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:458 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:460 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:467 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:485 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:492 msgid "BC" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:840 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:842 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:848 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:853 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:885 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:887 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:893 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1093 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:396 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:398 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:400 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:405 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:433 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:435 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:441 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:843 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:845 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:851 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:856 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:888 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:890 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:896 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1124 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:397 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:399 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:401 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:406 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:434 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:436 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:442 msgid "EOT" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:874 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:876 #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:877 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:884 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:422 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:424 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:879 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:880 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:887 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:423 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:425 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:432 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:426 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:433 msgid "Lead" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:967 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:515 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:970 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:516 msgid "Setup" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1051 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:598 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1054 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:599 msgid "Up" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1164 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:687 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1195 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:688 msgid "Reset" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1181 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:704 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1212 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:705 msgid "Exceeded" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1287 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1318 msgid "Derailed" msgstr "" @@ -2971,137 +3207,137 @@ msgid "" "\",.-+|!$%&/()=?;:'_[]" msgstr "" -#: ../../RunActivity/Viewer3D/Processes/GameStateRunActivity.cs:367 +#: ../../RunActivity/Viewer3D/Processes/GameStateRunActivity.cs:379 msgid "Game save is not allowed during container load/unload" msgstr "" -#: ../../RunActivity/Viewer3D/Processes/GameStateRunActivity.cs:1257 +#: ../../RunActivity/Viewer3D/Processes/GameStateRunActivity.cs:1270 #, csharp-format msgid "Activity Save file '*.save' not found in folder {0}" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:402 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:437 msgid "freight-grain" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:403 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:438 msgid "freight-coal" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:404 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:439 msgid "freight-gravel" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:405 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:440 msgid "freight-sand" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:408 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:443 msgid "diesel oil" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:409 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:444 msgid "wood" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:410 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:445 msgid "sand" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:411 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:446 msgid "freight-general" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:412 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:447 msgid "freight-livestock" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:413 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:448 msgid "freight-fuel" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:414 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:449 msgid "freight-milk" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:415 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:450 msgid "mail" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:416 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:451 msgid "container" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:564 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:599 msgid "Refill: Immediate refill process selected, refilling immediately." msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:585 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:620 msgid "Refill: Electric loco and no pickup. Command rejected" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:745 -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:764 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:780 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:799 msgid "Incompatible pickup type" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:751 -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:769 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:786 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:804 msgid "Starting refill" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:595 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:630 #, csharp-format msgid "Container crane: Distance to {0} supply is {1}." msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:606 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:641 #, csharp-format msgid "Refill: Distance to {0} supply is {1}." msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:616 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:651 #, csharp-format msgid "Refill: Loco must be stationary to refill {0}." msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:622 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:657 #, csharp-format msgid "Refill: Loco speed must exceed {0}." msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:629 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:664 #, csharp-format msgid "Refill: Loco speed must not exceed {0}." msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:647 -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:668 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:682 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:703 #, csharp-format msgid "Refill: {0} supply now replenished." msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:674 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:709 #, csharp-format msgid "Unload: {0} fuel or freight now unloaded." msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:692 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:727 msgid "wag file not equipped for containers" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:697 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:732 #, csharp-format msgid "{0} now loaded." msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:703 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:738 #, csharp-format msgid "{0} now unloaded." msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:596 -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:607 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:631 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:642 #, csharp-format msgid "{0} meter" msgid_plural "{0} meters" diff --git a/Source/Locales/RunActivity/hu.po b/Source/Locales/RunActivity/hu.po index c9a4ce0705..895ad63c2e 100644 --- a/Source/Locales/RunActivity/hu.po +++ b/Source/Locales/RunActivity/hu.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: RunActivity\n" -"POT-Creation-Date: 2022-07-26 19:38:43+0200\n" +"POT-Creation-Date: 2023-08-25 09:18:12+0200\n" "PO-Revision-Date: \n" "Last-Translator: Péter Gulyás \n" "Language-Team: Open Rails Dev Team\n" @@ -10,7 +10,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 3.1.1\n" +"X-Generator: Poedit 3.3.2\n" #: ../../RunActivity/Viewer3D/Cameras.cs:601 msgid "Free" @@ -76,100 +76,104 @@ msgid_plural "{0:F0} tiles" msgstr[0] "{0:F0} mező" msgstr[1] "{0:F0} mező" -#: ../../RunActivity/Viewer3D/Viewer.cs:829 -#: ../../RunActivity/Viewer3D/Viewer.cs:1017 +#: ../../RunActivity/Viewer3D/Viewer.cs:830 +#: ../../RunActivity/Viewer3D/Viewer.cs:1018 msgid "Cab view not available" msgstr "Vezérállás nem elérhető" -#: ../../RunActivity/Viewer3D/Viewer.cs:914 +#: ../../RunActivity/Viewer3D/Viewer.cs:915 msgid "In MP, use Alt-F4 to quit directly" msgstr "Többrésztvevős módból csak Alt+F4 -gyel lehet kilépni" -#: ../../RunActivity/Viewer3D/Viewer.cs:946 +#: ../../RunActivity/Viewer3D/Viewer.cs:947 msgid "Automatic platform and siding labels visible." msgstr "Automatikus peron- és mellékvágánycímkék láthatók." -#: ../../RunActivity/Viewer3D/Viewer.cs:949 +#: ../../RunActivity/Viewer3D/Viewer.cs:950 msgid "Platform and siding labels visible." msgstr "Peron- és mellékvágánycímkék láthatók." -#: ../../RunActivity/Viewer3D/Viewer.cs:952 +#: ../../RunActivity/Viewer3D/Viewer.cs:953 msgid "Platform labels visible." msgstr "Peroncímkék láthatók." -#: ../../RunActivity/Viewer3D/Viewer.cs:955 +#: ../../RunActivity/Viewer3D/Viewer.cs:956 msgid "Siding labels visible." msgstr "Mellékvágánycímkék láthatók." -#: ../../RunActivity/Viewer3D/Viewer.cs:961 +#: ../../RunActivity/Viewer3D/Viewer.cs:962 msgid "Platform and siding labels hidden." msgstr "Peron- és mellékvágánycímkék elrejtve." -#: ../../RunActivity/Viewer3D/Viewer.cs:972 +#: ../../RunActivity/Viewer3D/Viewer.cs:973 msgid "Train labels visible." msgstr "Vonatcímkék láthatók." -#: ../../RunActivity/Viewer3D/Viewer.cs:975 +#: ../../RunActivity/Viewer3D/Viewer.cs:976 msgid "Car labels visible." msgstr "Kocsicímkék láthatók." -#: ../../RunActivity/Viewer3D/Viewer.cs:981 +#: ../../RunActivity/Viewer3D/Viewer.cs:982 msgid "Train and car labels hidden." msgstr "Vonat- és kocsicímkék elrejtve." -#: ../../RunActivity/Viewer3D/Viewer.cs:1024 +#: ../../RunActivity/Viewer3D/Viewer.cs:1025 msgid "This car doesn't have a 2D cab" msgstr "Ennek a kocsinak nincs 2D vezérállása" -#: ../../RunActivity/Viewer3D/Viewer.cs:1028 +#: ../../RunActivity/Viewer3D/Viewer.cs:1029 msgid "This car doesn't have a 3D cab" msgstr "Ennek a kocsinak nincs 3D vezérállása" -#: ../../RunActivity/Viewer3D/Viewer.cs:1059 -msgid "Confirmations suppressed" +#: ../../RunActivity/Viewer3D/Viewer.cs:1074 +#, fuzzy +#| msgid "Confirmations suppressed" +msgid "messages suppressed" msgstr "Visszajelzések elrejtve" -#: ../../RunActivity/Viewer3D/Viewer.cs:1061 -msgid "Confirmations visible" -msgstr "Visszajelzések láthatóak" +#: ../../RunActivity/Viewer3D/Viewer.cs:1078 +#, fuzzy +#| msgid "Car labels visible." +msgid "All messages visible" +msgstr "Kocsicímkék láthatók." -#: ../../RunActivity/Viewer3D/Viewer.cs:1210 +#: ../../RunActivity/Viewer3D/Viewer.cs:1231 msgid "Switched to player control" msgstr "Robotpilóta kikapcsolva" -#: ../../RunActivity/Viewer3D/Viewer.cs:1217 +#: ../../RunActivity/Viewer3D/Viewer.cs:1238 msgid "You can't switch from manual to autopilot mode" msgstr "Helyi forgalomirányításból nem lehet robotpilótára váltani" -#: ../../RunActivity/Viewer3D/Viewer.cs:1223 +#: ../../RunActivity/Viewer3D/Viewer.cs:1244 msgid "Switched to autopilot" msgstr "Robotpilóta bekapcsolva" -#: ../../RunActivity/Viewer3D/Viewer.cs:1896 +#: ../../RunActivity/Viewer3D/Viewer.cs:1919 msgid "Game saved" msgstr "A játékállás elmentve" -#: ../../RunActivity/Viewer3D/Viewer.cs:348 +#: ../../RunActivity/Viewer3D/Viewer.cs:349 #, csharp-format msgid "Allowed speed raised to {0}" msgstr "A megengedett sebesség {0}-ra emelkedett" -#: ../../RunActivity/Viewer3D/Viewer.cs:1050 +#: ../../RunActivity/Viewer3D/Viewer.cs:1051 #, csharp-format msgid "Vibrating at level {0}" msgstr "Vibrálás szintje: {0}" -#: ../../RunActivity/Viewer3D/Viewer.cs:1241 +#: ../../RunActivity/Viewer3D/Viewer.cs:1262 #, csharp-format msgid "Keyboard map list saved to '{0}'." msgstr "Billentyűzetkiosztási lista mentve: '{0}'." -#: ../../RunActivity/Viewer3D/Viewer.cs:1245 +#: ../../RunActivity/Viewer3D/Viewer.cs:1266 #, csharp-format msgid "Keyboard map image saved to '{0}'." msgstr "Billentyűzetkiosztási ábra mentve: '{0}'." -#: ../../RunActivity/Viewer3D/Viewer.cs:1097 +#: ../../RunActivity/Viewer3D/Viewer.cs:1117 #, csharp-format msgid "{0} viewpoint stored. Use Shift+8 to restore viewpoints." msgid_plural "{0} viewpoints stored. Use Shift+8 to restore viewpoints." @@ -178,7 +182,7 @@ msgstr[0] "" msgstr[1] "" "{0} nézőpont van eltárolva. Használd a Shift+B -t a visszaállításhoz." -#: ../../RunActivity/Viewer3D/Weather.cs:145 +#: ../../RunActivity/Viewer3D/Weather.cs:144 msgid "" "Restoring wrong weather type : trying to restore dynamic weather but save " "contains user controlled weather" @@ -186,7 +190,7 @@ msgstr "" "Rossz időjárástípus betöltése: dinamikus időjárást nem lehet betölteni " "felhasználó által beállított időjárású mentésből" -#: ../../RunActivity/Viewer3D/Weather.cs:1642 +#: ../../RunActivity/Viewer3D/Weather.cs:1640 msgid "" "Restoring wrong weather type : trying to restore user controlled weather but " "save contains dynamic weather" @@ -194,15 +198,266 @@ msgstr "" "Rossz időjárástípus betöltése: felhasználó által beállított időjárást nem " "lehet betölteni dinamikus időjárású mentésből" -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.cs:2004 +#: ../../RunActivity/Viewer3D/Weather.cs:494 +#, csharp-format +msgid "Increased daylight offset to {0} h" +msgstr "Időeltolás növelése {0} órára" + +#: ../../RunActivity/Viewer3D/Weather.cs:499 +#, csharp-format +msgid "Decreased daylight offset to {0} h" +msgstr "Időeltolás csökkentése {0} órára" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs:1484 +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.cs:1918 msgid "Switching Request Sent to the Server" msgstr "A vágányútállítási kérelem el lett küldve az irányítónak" -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.cs:580 +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:155 +msgid "Learn more" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:167 +msgid "You are the dispatcher in this multiplayer session" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:257 +msgid "Message all players" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:271 +msgid ">" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:291 +#, fuzzy +#| msgid "Usage:" +msgid "Messages:" +msgstr "Felhaszn:" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:318 +#, fuzzy +#| msgid "Simulation Time" +msgid "Simulation time" +msgstr "Szimulációs idő" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:331 +msgid "Map customization" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:366 +msgid "All trains" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:378 +#, fuzzy +#| msgid "Inactive sounds" +msgid "Only active trains" +msgstr "Inaktív hangok" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:388 +#, fuzzy +#| msgid "Train static." +msgid "Train state" +msgstr "A vonat statikus." + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:398 +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:572 +msgid "Train labels" +msgstr "Vonatcímkék" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:408 +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:556 +msgid "Signal state" +msgstr "Jelzésképek" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:418 +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:543 +msgid "Signals" +msgstr "Jelzők" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:428 +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:673 +msgid "Switches" +msgstr "Váltók" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:438 +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:530 +msgid "Siding labels" +msgstr "Mellékvágánycímkék" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:448 +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:517 +msgid "Platform labels" +msgstr "Peroncímkék" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:458 +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:793 +msgid "Platforms" +msgstr "Peronok" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:469 +#, fuzzy +#| msgid "Temperature" +msgid "Map features" +msgstr "Hőmérséklet" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:478 +msgid "Rotate between themes" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:491 +#, fuzzy +#| msgid "Simulation Time" +msgid "Show simulation time" +msgstr "Szimulációs idő" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:501 +msgid "Use anti-aliasing" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:566 +#, fuzzy +#| msgid "MultiPlayer Info" +msgid "Multiplayer settings" +msgstr "MultiPlayer Infó" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:577 +msgid "Penalty for speeding && SPAD" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:589 +#, fuzzy +#| msgid "Prefer Green" +msgid "Prefer green (?)" +msgstr "Zöld előnyben részesítése" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:601 +msgid "Allow new players to join" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:631 +msgid "Map settings and controls" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:641 +msgid "Follow my train on the map" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:651 +msgid "Jump to my train on the map" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:663 +msgid "Jump to my train in game" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:674 +msgid "Map resolution (m):" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:715 +msgid "Allow throwing switches" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:727 +msgid "Allow changing signals" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:739 +msgid "Draw next path section" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:766 +#, fuzzy +#| msgid "Player" +msgid "Players" +msgstr "Játékos" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:807 +msgid "Message the selected player" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:815 +#, fuzzy +#| msgid "Reply to Selected" +msgid "Reply to the selected player" +msgstr "Válasz a kiválasztottnak" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:833 +#, fuzzy +#| msgid "You are no longer an assistant." +msgid "Make this player an assistant" +msgstr "Nem vagy többé alirányító" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:840 +msgid "Jump to this player in game" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:847 +msgid "Follow on the map" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:854 +msgid "Kick from multiplayer session" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:872 +msgid "Set switch to..." +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:881 +#, fuzzy +#| msgid "main route" +msgid "Main route" +msgstr "fővágány" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:889 +#, fuzzy +#| msgid "side route" +msgid "Side route" +msgstr "mellékvágány" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:911 +msgid "Set signal aspect to..." +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:918 +msgid "System controlled" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:927 +#, fuzzy +#| msgctxt "Engine" +#| msgid "Stopped" +msgid "Stop" +msgstr "Leállítva" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:935 +msgid "Approach" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:944 +#, fuzzy +#| msgid "Procedures" +msgid "Proceed" +msgstr "Eljárások" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:957 +msgid "Allow call on" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:967 +#, fuzzy +#| msgid "Map Window" +msgid "Map window" +msgstr "Térképablak" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.cs:555 msgid "MSG to Server" msgstr "Üzenet a kiszolgálónak" -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.cs:584 +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.cs:559 #: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:256 msgid "MSG to All" msgstr "Ózenet mindenkinek" @@ -265,11 +520,11 @@ msgid "Assist" msgstr "Segítő" #: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:417 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1195 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1244 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1310 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:718 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:766 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1226 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1275 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1341 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:719 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:767 msgid "Normal" msgstr "Normál" @@ -301,26 +556,6 @@ msgstr "SzimulációsIdő" msgid "Show:" msgstr "Megjelenítés:" -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:517 -msgid "Platform labels" -msgstr "Peroncímkék" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:530 -msgid "Siding labels" -msgstr "Mellékvágánycímkék" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:543 -msgid "Signals" -msgstr "Jelzők" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:556 -msgid "Signal state" -msgstr "Jelzésképek" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:572 -msgid "Train labels" -msgstr "Vonatcímkék" - #: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:583 msgid "Key" msgstr "Azonosítók" @@ -341,10 +576,6 @@ msgstr "Időeltolás (óra)" msgid "Background color" msgstr "Háttérszín" -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:673 -msgid "Switches" -msgstr "Váltók" - #: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:685 msgid "To pan, drag with left mouse." msgstr "Pásztázáshoz húzd bal egérgombbal." @@ -378,10 +609,6 @@ msgstr "Adott helyre nagyítás Shift és bal egérgombbal." msgid "To zoom out of a location, press Alt and click the left mouse." msgstr "Visszakicsinyítés Alt és bal egérgombbal." -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:793 -msgid "Platforms" -msgstr "Peronok" - #: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:852 msgid "Map Window" msgstr "Térképablak" @@ -430,14 +657,14 @@ msgid "3D" msgstr "3D" #: ../../RunActivity/Viewer3D/Debugging/SoundDebugForm.Designer.cs:284 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:536 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:721 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1288 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:146 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:668 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:431 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:629 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1193 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:148 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:671 #: ../../RunActivity/Viewer3D/WebServices/TrackMonitorDisplay.cs:291 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:109 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:230 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:110 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:231 msgid "Speed" msgstr "Sebesség" @@ -454,8 +681,8 @@ msgid "Variable 1" msgstr "Variable 1" #: ../../RunActivity/Viewer3D/Debugging/SoundDebugForm.Designer.cs:351 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1294 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1296 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1199 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1201 #: ../../RunActivity/Viewer3D/Popups/NextStationWindow.cs:78 msgid "Distance" msgstr "Távolság" @@ -714,11 +941,11 @@ msgstr "Könyvtárnév" msgid "Can't attach EOT if player train not stopped" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/EOTListWindow.cs:110 +#: ../../RunActivity/Viewer3D/Popups/EOTListWindow.cs:111 msgid "Player train already has a mounted EOT" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/EOTListWindow.cs:122 +#: ../../RunActivity/Viewer3D/Popups/EOTListWindow.cs:124 msgid "Can't mount an EOT if another one is mounted" msgstr "" @@ -846,8 +1073,8 @@ msgid "- Missed station stops: " msgstr "- Elszalasztott állomási megállások: " #: ../../RunActivity/Viewer3D/Popups/HelpWindow.cs:416 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1069 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1232 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:980 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1137 msgid " " msgstr " " @@ -926,962 +1153,981 @@ msgid_plural "{0} minutes" msgstr[0] "{0} perc" msgstr[1] "{0} perc" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:204 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:539 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:707 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:720 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:106 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:434 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:615 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:628 #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:146 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:148 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:151 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:85 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:111 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:112 msgid "Throttle" msgstr "Menetszabályzó" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:205 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:107 msgid "Power In/Out" msgstr "Teljesítmény Be/Ki" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:209 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:111 msgid "Motive force" msgstr "Mozgatóerő" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:211 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:113 msgid "Num of substeps" msgstr "Allépések száma" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:214 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1442 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:116 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1347 msgid "Memory" msgstr "Memória" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:215 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:117 msgid "GCs" msgstr "GC-k" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:216 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:118 msgid "Frame time" msgstr "Frame idő" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:217 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1456 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:119 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1361 msgid "Render process" msgstr "Render folyamat" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:218 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1457 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:120 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1362 msgid "Updater process" msgstr "Updater folyamat" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:219 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1458 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:121 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1363 msgid "Loader process" msgstr "Loader folyamat" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:220 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1459 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:122 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1364 msgid "Sound process" msgstr "Sound folyamat" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:525 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:420 msgid "Version" msgstr "Verzió" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:529 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:531 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:424 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:426 #: ../../RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs:158 #: ../../RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs:164 #: ../../RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs:332 #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:147 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:149 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:645 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:152 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:648 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:86 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:112 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:207 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:113 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:208 msgid "Time" msgstr "Idő" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:534 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:142 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:652 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:105 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:214 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:429 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:144 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:655 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:106 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:215 msgid "Replay" msgstr "Visszajátszás" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:537 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1227 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:135 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:686 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:432 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1132 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:136 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:689 #: ../../RunActivity/Viewer3D/WebServices/TrackMonitorDisplay.cs:322 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:99 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:248 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:100 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:249 msgid "Gradient" msgstr "Pályaemelkedés" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:538 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:705 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:717 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:124 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:433 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:613 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:625 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:125 #: ../../RunActivity/Viewer3D/WebServices/TrackMonitorDisplay.cs:332 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:89 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:90 msgid "Direction" msgstr "Irány" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:539 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:707 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:141 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:104 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:434 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:615 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:143 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:105 msgid "Regulator" msgstr "Töltésszabályzó" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:543 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:151 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:823 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:880 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:914 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:114 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:383 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:428 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:462 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:438 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:154 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:826 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:883 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:917 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:115 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:384 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:429 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:463 msgid "Train brake" msgstr "Vonatfék" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:545 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:143 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:931 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:106 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:479 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:440 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:145 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:934 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:107 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:480 msgid "Retainers" msgstr "Visszatartó szelepek" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:547 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:129 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:940 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:955 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:93 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:488 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:503 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:442 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:130 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:943 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:958 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:94 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:489 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:504 msgid "Engine brake" msgstr "Mozdonyfék" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:549 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:444 msgid "Brakemen brake" msgstr "Fékezőszemélyzet" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:551 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:708 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:127 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:966 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:975 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:91 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:514 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:522 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:446 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:616 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:128 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:969 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:978 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:92 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:515 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:523 msgid "Dynamic brake" msgstr "Dinamikus fék" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:565 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:462 +msgid "Cruise control status" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:465 +msgid "Speed target" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:466 +msgid "Max acceleration" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:470 msgid "Multiple Units" msgstr "Mozdonycsoport" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:567 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1116 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:639 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:472 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1147 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:640 msgid "FPS" msgstr "FPS" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:571 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:476 #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:117 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1126 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:82 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:649 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1157 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:83 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:650 msgid "Autopilot" msgstr "Robotpilóta" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:574 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1174 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:479 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1078 msgid "Wheel slip" msgstr "Kerékmegperdülés" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:576 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:481 msgid "Wheel slip warning" msgstr "Kerékmegperdülési figyelmeztetés" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:579 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:484 msgid "Wheel skid" msgstr "Kerékmegcsúszás" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:585 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:490 msgid "Sander blocked" msgstr "Homokoló letiltva" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:587 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:492 msgid "Sander on" msgstr "Homokoló üzemben" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:600 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:126 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1331 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1345 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:90 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:786 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:800 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:503 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1358 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:783 +msgid "Left" +msgstr "Bal" + +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:505 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1360 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:785 +msgid "Right" +msgstr "Jobb" + +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:508 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:127 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1364 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1378 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:91 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:789 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:803 msgid "Doors open" msgstr "Ajtók nyitva" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:606 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:514 msgid "MultiPlayerStatus: " msgstr "MultiPlayer Állapot: " -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:607 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:515 #: ../../RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs:344 msgid "Dispatcher" msgstr "Irányító" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:608 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:516 #: ../../RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs:345 msgid "Helper" msgstr "Segéd" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:609 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:517 #: ../../RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs:346 msgid "Client" msgstr "Résztvevő" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:618 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:526 msgid "CONSIST INFORMATION" msgstr "SZERELVÉNY INFORMÁCIÓI" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:630 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:538 msgid "Player" msgstr "Játékos" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:631 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:539 msgid "Tilted" msgstr "Dönthető" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:632 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:654 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:775 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1010 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1029 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1059 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1089 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1118 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:540 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:562 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:683 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:918 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:938 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:969 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1000 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1030 msgid "Type" msgstr "Típus" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:633 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:655 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:541 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:563 msgid "Length" msgstr "Hossz" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:634 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:656 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:542 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:564 msgid "Weight" msgstr "Tömeg" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:635 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:543 msgid "Tonnage" msgstr "Tonna" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:636 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:544 msgid "Control Mode" msgstr "Irányítási mód" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:637 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:545 msgid "Out of Control" msgstr "Irányítás nélkül" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:638 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:546 msgid "Cab Aspect" msgstr "Jelzéskép" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:641 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:664 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1259 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1438 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:549 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:572 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1164 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1343 #: ../../RunActivity/Viewer3D/RollingStock/SubSystems/ETCS/DataEntry.cs:460 #: ../../RunActivity/Viewer3D/RollingStock/SubSystems/ETCS/DataEntry.cs:485 msgid "Yes" msgstr "Igen" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:641 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:664 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1259 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1438 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:549 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:572 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1164 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1343 msgid "No" msgstr "Nem" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:642 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:665 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:550 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:573 msgid "Freight" msgstr "Teher" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:642 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:665 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:550 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:573 msgid "Pass" msgstr "Személy" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:652 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1009 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1028 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1058 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1088 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1117 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1214 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:560 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:917 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:937 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:968 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:999 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1029 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1119 msgid "Car" msgstr "Kocsi" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:653 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:718 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1261 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:561 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:626 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1166 msgid "Flipped" msgstr "Fordított" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:657 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:565 msgid "Drv/Cabs" msgstr "Vezethető" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:658 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:566 msgid "Wheels" msgstr "Tengelyek" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:659 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:567 msgid "Temp" msgstr "Hőm" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:699 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:607 msgid "LOCOMOTIVE INFORMATION" msgstr "MOZDONY INFORMÁCIÓI" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:712 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:896 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:620 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:804 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:813 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:815 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:819 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:828 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:830 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:838 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:840 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:875 #: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:905 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:907 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:911 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:920 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:922 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:930 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:932 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:967 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:997 msgid "off" msgstr "ki" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:713 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:894 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:903 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:918 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:928 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:955 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:963 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:621 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:802 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:811 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:826 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:836 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:863 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:871 msgid "PlayerLoco" msgstr "VezetettGép" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:716 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:984 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:991 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:624 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:892 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:899 msgid "Loco" msgstr "Mozdony" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:719 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:627 msgid "MU'd" msgstr "Távvez" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:723 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:787 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:631 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:695 #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:140 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:140 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:142 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:79 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:103 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:104 msgid "Power" msgstr "Főmegszakító" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:724 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:632 msgid "Force" msgstr "Erők" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:734 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:642 msgid "DISTRIBUTED POWER INFORMATION" msgstr "GÉPCSOPORT-INFORMÁCIÓK" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:768 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:676 msgid "POWER SUPPLY INFORMATION" msgstr "ENERGIAELLÁTÁSI INFORMÁCIÓK" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:774 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:682 msgid "Wagon" msgstr "Vagon" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:780 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:688 msgid "MainPS" msgstr "Főüzem" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:781 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:689 msgid "AuxPS" msgstr "Segédüz." -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:782 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:690 msgid "Battery" msgstr "Akku" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:783 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:691 msgid "LowVoltPS" msgstr "KisFeszE" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:784 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:692 msgid "CabPS" msgstr "VezÁllE" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:785 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:693 msgid "ETS" msgstr "El. fűtés" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:786 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:694 msgid "ETSCable" msgstr "Fűtéskábel" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:813 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:826 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:841 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:850 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:721 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:734 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:749 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:758 msgid "connected" msgstr "csatl." -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:813 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:826 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:841 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:850 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:721 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:734 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:749 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:758 msgid "disconnected" msgstr "nincs cs." -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:878 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:786 msgid "BRAKE INFORMATION" msgstr "FÉKINFORMÁCIÓK" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:895 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:803 msgid "Exhauster" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:896 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:804 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:813 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:815 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:819 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:828 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:830 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:838 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:840 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:875 #: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:905 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:907 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:911 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:920 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:922 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:930 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:932 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:967 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:997 msgid "on" msgstr "be" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:904 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:919 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:929 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:812 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:827 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:837 msgid "Large Ejector" msgstr "Nagy légsűrítő" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:906 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:931 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:814 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:839 msgid "Small Ejector" msgstr "Kis légsűrítő" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:908 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:933 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:816 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:841 msgid "Pressure" msgstr "Nyomás" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:910 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:921 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:818 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:829 msgid "Vacuum Pump" msgstr "Vákuumszivattyú" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:939 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:847 msgid "Brake Sys Vol" msgstr "Fékr Térf" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:940 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:848 msgid "Train Pipe" msgstr "Átmenőfék" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:942 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:850 msgid "Brake Cyl" msgstr "Féktartály" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:944 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:852 msgid "Air Vol" msgstr "Levegőtérfogat" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:956 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:864 msgid "No compressor or reservoir fitted" msgstr "Nincs kompresszor és tartály" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:964 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:994 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:872 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:902 msgid "Main reservoir" msgstr "Főlégtartály" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:966 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:996 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:874 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:904 msgid "Compressor" msgstr "Légsűrítő" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1011 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1030 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1090 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1119 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:919 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:939 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1001 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1031 msgid "BrkCyl" msgstr "Fékheng" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1012 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1031 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1120 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:920 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:940 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1032 msgid "BrkPipe" msgstr "Fővez" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1019 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1038 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1068 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1098 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1127 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:928 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:948 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:979 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1010 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1040 msgid "Handbrk" msgstr "Kézifék" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1020 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1039 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1099 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1128 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:929 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:949 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1011 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1041 msgid "Conn" msgstr "Csatlás" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1021 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1040 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1100 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1129 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:930 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:950 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1012 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1042 msgid "AnglCock" msgstr "Végelzáró" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1032 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:941 msgid "VacRes" msgstr "VákTart" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1060 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:970 msgid "Brk" msgstr "Fék" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1091 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1002 msgid "SrvPipe" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1092 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1121 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1003 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1033 msgid "AuxRes" msgstr "KészlLT" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1093 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1122 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1004 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1034 msgid "ErgRes" msgstr "VészLT" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1094 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1005 msgid "StrPipe" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1095 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1124 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1006 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1036 +msgid "CtrlRes" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1007 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1037 msgid "RetValve" msgstr "Visszat" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1096 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1125 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1008 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1038 msgid "TripleValve" msgstr "Kormányszelep" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1101 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1130 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1013 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1043 msgid "BleedOff" msgstr "KieresztőSz" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1123 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1035 msgid "MRPipe" msgstr "FőlégVez" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1147 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1061 msgid "FORCE INFORMATION" msgstr "ERŐINFORMÁCIÓK" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1164 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1173 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1077 msgid "(Advanced adhesion model)" msgstr "(Fejlett csúszási modell)" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1165 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1190 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1198 -msgid "Loco Adhesion" -msgstr "Mozdony tapadása" - -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1166 -msgid "Wag Adhesion" -msgstr "Vagon tapadása" - -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1167 -msgid "Tang. Force" -msgstr "Kerületi erő" - -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1168 -msgid "Static Force" -msgstr "Statikus erő" - -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1175 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1079 msgid "Conditions" msgstr "Csúszási állapot" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1176 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1080 msgid "Axle drive force" msgstr "Tengely hajtóerő" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1178 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1082 msgid "Axle brake force" msgstr "Tengely fékezőerő" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1179 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1083 msgid "Number of substeps" msgstr "Allépések száma" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1180 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1197 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1084 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1102 msgid "Axle out force" msgstr "Tengely eredő erő" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1183 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1087 msgid "Comp Axle out force" msgstr "Kompenzált teng. eredő erő" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1186 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1090 msgid "Wheel Speed" msgstr "Keréksebesség" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1191 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1199 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1094 +msgid "Wheel ang. pos." +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1095 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1103 +msgid "Loco Adhesion" +msgstr "Mozdony tapadása" + +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1096 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1104 msgid "Wagon Adhesion" msgstr "Vagon tapadása" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1196 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1101 msgid "(Simple adhesion model)" msgstr "(Egyszerűsített csúszási modell)" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1205 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1110 msgid "Wind Speed:" msgstr "Szélsebesség:" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1206 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1111 msgid "Wind Direction:" msgstr "Szélirány:" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1207 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1112 msgid "Train Direction:" msgstr "Haladási irány:" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1208 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1113 msgid "ResWind:" msgstr "Eredő szélseb:" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1209 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1114 msgid "ResSpeed:" msgstr "Eredő sebesség:" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1215 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1120 msgid "Total" msgstr "Össz" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1216 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1121 msgid "Motive" msgstr "Mozgató" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1217 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1122 msgid "Brake" msgstr "Fékező" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1218 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1123 msgid "Friction" msgstr "Súrlód" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1219 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1124 msgid "Gravity" msgstr "Gravit" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1220 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1228 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1125 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1133 msgid "Curve" msgstr "Ívellenáll" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1221 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1126 msgid "Tunnel" msgstr "Alagút" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1222 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1429 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1127 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1334 msgid "Wind" msgstr "Szél" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1223 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1224 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1128 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1129 msgid "Coupler" msgstr "Vonókész" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1225 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1130 msgid "Slack" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1226 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1131 msgid "Mass" msgstr "Tömeg" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1229 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1134 msgid "Brk Frict." msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1230 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1135 msgid "Brk Slide" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1231 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1136 msgid "Bear Temp" msgstr "Csapágyhőm" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1233 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:125 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1286 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1294 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1309 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1138 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:126 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1317 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1325 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1340 msgid "DerailCoeff" msgstr "Siklási együtth" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1283 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1188 msgid "DISPATCHER INFORMATION : active trains : " msgstr "FORGALOMIRÁNYÍTÁSI INFORMÁCIÓK : aktív vonatok : " -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1286 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1191 msgid "Train" msgstr "Vonat" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1287 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1192 msgid "Travelled" msgstr "MegtettÚt" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1289 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1194 msgid "Max" msgstr "Max" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1290 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1195 msgid "AI mode" msgstr "AI mód" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1291 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1196 msgid "AI data" msgstr "AI adatok" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1292 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1197 msgid "Mode" msgstr "Mód" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1293 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1198 msgid "Auth" msgstr "Engedély" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1295 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1200 msgid "Signal" msgstr "Jelző" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1297 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1202 msgid "Consist" msgstr "Szerelv" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1298 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1203 msgid "Path" msgstr "Útvonal" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1423 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1328 msgid "WEATHER INFORMATION" msgstr "IDŐJÁRÁSI INFORMÁCIÓK" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1425 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1330 msgid "Visibility" msgstr "Látótávolság" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1426 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1331 msgid "Cloud cover" msgstr "Felhőzet" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1427 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1332 msgid "Intensity" msgstr "Csapadékintenzitás" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1428 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1333 msgid "Liquidity" msgstr "Nedvesség" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1430 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1335 msgid "Amb Temp" msgstr "Külső hőmérséklet" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1436 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1341 msgid "DEBUG INFORMATION" msgstr "HIBAKERESÉSI INFORMÁCIÓK" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1438 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1343 msgid "Logging enabled" msgstr "Naplózás" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1439 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1344 msgid "Build" msgstr "Build" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1440 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1345 msgid "CPU" msgstr "CPU" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1441 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1346 msgid "GPU" msgstr "GPU" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1443 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1348 msgid "CPU Memory" msgstr "CPU memória" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1444 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1349 msgid "GPU Memory" msgstr "GPU memória" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1445 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1350 msgid "Adapter" msgstr "Adapter" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1450 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1355 msgid "Shadow maps" msgstr "Árnyéktérképek" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1452 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1357 msgid "Shadow primitives" msgstr "Árnyék primitívek" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1455 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1360 msgid "Render primitives" msgstr "Render primitívek" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1456 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1457 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1458 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1459 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1460 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1361 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1362 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1363 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1364 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1365 msgid "wait" msgstr "várakozás" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1460 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1365 msgid "Total process" msgstr "Összes folyamat" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1461 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1366 msgid "Camera" msgstr "Kamera" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1205 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1209 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1110 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1114 #, csharp-format msgid "{0:N2} mph" msgstr "{0:N2} mf/h" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1206 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1207 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1208 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1111 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1112 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1113 #, csharp-format msgid "{0:N2} Deg" msgstr "{0:N2} fok" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1425 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1330 #, csharp-format msgid "{0:N0} m" msgstr "{0:N0} m" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1426 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1428 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1331 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1333 #, csharp-format msgid "{0:F0} %" msgstr "{0:F0} %" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1427 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1332 #, csharp-format msgid "{0:F4} p/s/m^2" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1429 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1334 #, csharp-format msgid "{0:F1},{1:F1} m/s" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1440 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1345 #, csharp-format msgid "{0:F0}% ({1})" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1441 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1346 #, csharp-format msgid "" "{0:F0} FPS (50th/95th/99th percentiles {1:F1} / {2:F1} / {3:F1} ms, DirectX " "feature level >= {4})" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1442 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1347 #, csharp-format msgid "" "{3}, {4}, {5}, {6} ({7:F0} kB/frame allocated, {0:F0}/{1:F0}/{2:F0} GCs)" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1443 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1348 #, csharp-format msgid "" "{0:F0} MB private, {1:F0} MB working set, {2:F0} MB private working set, " "{3:F0} MB managed, {4:F0} MB virtual" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1444 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1349 #, csharp-format msgid "{0:F0} MB committed, {1:F0} MB dedicated, {2:F0} MB shared" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1445 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1350 #, csharp-format msgid "{0} ({1:F0} MB)" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1448 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1353 #, csharp-format msgid "{0}/{1}" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1449 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1354 #, csharp-format msgid "({0}x{0})" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1452 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1455 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1357 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1360 #, csharp-format msgid "{0:F0}" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1456 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1457 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1458 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1459 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1460 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1361 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1362 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1363 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1364 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1365 #, csharp-format msgid "{0:F0}% ({1:F0}% {2})" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1440 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1345 #, csharp-format msgid "{0} logical processor" msgid_plural "{0} logical processors" @@ -1889,57 +2135,57 @@ msgstr[0] "{0} logikai processzor" msgstr[1] "{0} logikai processzor" #. Context: Cab -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:640 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:668 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:548 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:576 msgctxt "Cab" msgid "R" msgstr "H" #. Context: Cab -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:640 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:668 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:548 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:576 msgctxt "Cab" msgid "F" msgstr "E" #. Context: Cab -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:668 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:576 msgctxt "Cab" msgid "D" msgstr "V" #. Context: Steam -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:706 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:614 msgctxt "Steam" msgid "Reverser" msgstr "Vezérmű" #. Context: NonSteam -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:706 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:614 msgctxt "NonSteam" msgid "Reverser" msgstr "Irányváltó" #. Context: Pantograph -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:776 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:684 msgctxt "Pantograph" msgid "Panto" msgstr "Áramsz" #. Context: Engine -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:777 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:685 msgctxt "Engine" msgid "Eng" msgstr "Motor" #. Context: CircuitBreaker -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:778 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:686 msgctxt "CircuitBreaker" msgid "CB" msgstr "FőMegsz" #. Context: TractionCutOffRelay -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:779 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:687 msgctxt "TractionCutOffRelay" msgid "TCOR" msgstr "VontTiltóR" @@ -2034,12 +2280,12 @@ msgstr "Elegy cseréje az elöl lévő vonattal" msgid "Activity completed." msgstr "Szolgálat teljesítve." -#: ../../RunActivity/Viewer3D/Popups/NoticeWindow.cs:96 +#: ../../RunActivity/Viewer3D/Popups/NoticeWindow.cs:97 #, csharp-format msgid "Odometer {0}" msgstr "Útmérő {0}" -#: ../../RunActivity/Viewer3D/Popups/NoticeWindow.cs:110 +#: ../../RunActivity/Viewer3D/Popups/NoticeWindow.cs:113 #, csharp-format msgid "FOV: {0:F0}°" msgstr "Látószög: {0:F0}°" @@ -2143,9 +2389,9 @@ msgid "Fuel" msgstr "Üzemanyag" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:136 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:133 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:134 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:75 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:97 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:98 msgid "FUEL" msgstr "" @@ -2162,8 +2408,8 @@ msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:138 #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:239 #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:615 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:137 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1105 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:138 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1136 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:77 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:197 msgid "Loco Groups" @@ -2171,7 +2417,7 @@ msgstr "Gépcsoport" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:138 #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:239 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:137 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:138 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:77 msgid "GRUP" msgstr "" @@ -2187,9 +2433,9 @@ msgid "OIL" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:140 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:140 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:142 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:79 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:103 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:104 msgid "POWR" msgstr "" @@ -2209,17 +2455,17 @@ msgid "RPM" msgstr "ford/perc" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:143 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:144 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:146 #: ../../RunActivity/Viewer3D/WebServices/TrackMonitorDisplay.cs:332 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:82 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:107 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:108 msgid "Reverser" msgstr "Irányváltó" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:143 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:144 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:146 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:82 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:107 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:108 msgid "REVR" msgstr "" @@ -2239,16 +2485,16 @@ msgid "TEMP" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:146 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:148 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:151 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:85 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:111 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:112 msgid "THRO" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:147 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:149 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:152 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:86 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:112 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:113 msgid "TIME" msgstr "" @@ -2302,601 +2548,630 @@ msgid "BP" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:52 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:805 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:820 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:829 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:365 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:380 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:389 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:808 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:823 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:832 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:366 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:381 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:390 msgid "EQ" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:53 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:830 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:831 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:843 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:844 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:862 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:863 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:833 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:834 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:846 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:847 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:865 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:866 msgid "V" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:116 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1163 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:81 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:686 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1194 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:82 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:687 msgid "AI Fireman" msgstr "Autofűtő" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:116 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:81 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:82 msgid "AIFR" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:117 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:82 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:83 msgid "AUTO" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:118 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:83 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:84 msgid "Battery switch" msgstr "Akkumulátorkapcsoló" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:118 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:83 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:84 msgid "BATT" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:119 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:990 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1008 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:84 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:537 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:555 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:993 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1011 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:85 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:538 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:556 msgid "Boiler pressure" msgstr "Kazánnyomás" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:119 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:84 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:85 msgid "PRES" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:120 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:85 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:86 msgid "Boiler water glass" msgstr "Kazán vízszintfigyelő" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:120 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:85 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:86 msgid "WATR" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:121 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:86 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:87 msgid "Boiler water level" msgstr "Kazánvízszint" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:121 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:86 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:87 msgid "LEVL" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:122 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:87 -msgid "Circuit breaker" -msgstr "Főmegszakító" +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1096 +#, fuzzy +#| msgid "Status" +msgid "CCStatus" +msgstr "Állapot" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:122 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:87 -msgid "CIRC" +msgid "CCST" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:123 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:765 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:88 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:325 -msgid "Cylinder cocks" -msgstr "Hengercsapok" +msgid "Circuit breaker" +msgstr "Főmegszakító" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:123 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:88 -msgid "CCOK" +msgid "CIRC" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:124 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:768 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:89 -msgid "DIRC" +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:326 +msgid "Cylinder cocks" +msgstr "Hengercsapok" + +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:124 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:89 +msgid "CCOK" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:125 -msgid "DRLC" +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:90 +msgid "DIRC" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:126 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:90 -msgid "DOOR" +msgid "DRLC" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:127 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:91 -msgid "BDYN" +msgid "DOOR" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:128 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:92 +msgid "BDYN" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:129 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:93 msgid "Electric train supply" msgstr "Villamos fűtés" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:128 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:92 -msgid "TSUP" -msgstr "" - #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:129 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:93 -msgid "BLOC" +msgid "TSUP" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:130 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1066 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:94 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:614 +msgid "BLOC" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:131 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1069 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:95 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:615 msgid "Engine" msgstr "Gép" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:130 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:94 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:131 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:95 msgid "ENGN" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:131 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:95 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:132 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:96 msgid "Fire mass" msgstr "Tűztömeg" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:131 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:95 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:132 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:96 msgid "FIRE" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:132 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:96 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:133 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:97 msgid "Fixed gear" msgstr "Rögzített seb.fokozat" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:132 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:134 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:96 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:98 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:133 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:135 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:97 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:99 msgid "GEAR" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:133 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1013 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:97 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:560 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:134 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1016 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:98 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:561 msgid "Fuel levels" msgstr "Készletszintek" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:134 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1021 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:98 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:568 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:135 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1024 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:99 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:569 msgid "Gear" msgstr "Seb.fokozat" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:135 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:99 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:136 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:100 msgid "GRAD" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:136 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1180 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1194 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:100 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:703 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:717 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:137 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1211 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1225 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:101 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:704 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:718 msgid "Grate limit" msgstr "Rostély korlát" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:136 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:100 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:137 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:101 msgid "GRAT" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:138 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:101 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:139 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:102 msgid "Master key" msgstr "Mesterkulcs" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:138 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:101 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:139 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:102 msgid "MAST" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:139 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1045 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:102 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:592 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:140 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1111 +msgid "MaxAccel" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:140 +msgid "MACC" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:141 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1048 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:103 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:593 msgid "Pantographs" msgstr "Áramszedők" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:139 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:102 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:141 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:103 msgid "PANT" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:141 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:104 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:143 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:105 msgid "REGL" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:142 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:105 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:144 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:106 msgid "RPLY" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:143 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:106 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:145 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:107 msgid "RETN" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:145 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:779 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:789 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:108 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:339 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:349 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:147 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:782 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:792 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:109 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:340 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:350 msgid "Sander" msgstr "Homokoló" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:145 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:108 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:147 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:109 msgid "SAND" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:146 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:109 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:148 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:110 msgid "SPED" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:147 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:110 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:149 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:111 msgid "Steam usage" msgstr "Gőzfelhasználás" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:147 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:110 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:149 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:111 msgid "STEM" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:150 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:113 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1104 +msgid "Target" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:150 +msgid "TARG" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:153 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:114 msgid "Traction cut-off relay" msgstr "Vontatástiltó relé" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:150 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:113 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:153 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:114 msgid "TRAC" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:151 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:114 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:154 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:115 msgid "BTRN" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:152 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1213 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1221 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1229 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1243 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:115 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:735 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:743 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:751 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:765 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:155 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1244 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1252 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1260 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1274 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:116 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:736 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:744 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:752 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:766 msgid "Wheel" msgstr "Tengely" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:152 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:115 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:155 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:116 msgid "WHEL" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:157 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:120 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:160 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:121 msgid "(absolute)" msgstr "(abszolút)" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:157 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:120 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:160 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:121 msgid "(Abs.)" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:158 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:121 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:161 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:122 msgid "apply Service" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:158 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:121 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:161 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:122 msgid "Apply" msgstr "Működtetés" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:159 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:122 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:162 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:123 msgid "Apply Quick" msgstr "Gyorsműködtetés" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:159 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:122 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:162 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:123 msgid "ApplQ" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:160 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:123 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:163 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:124 msgid "Apply Slow" msgstr "Lassú működtetés" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:160 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:123 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:163 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:124 msgid "ApplS" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:161 -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:411 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:124 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:164 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:442 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:125 msgid "coal" msgstr "szén" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:161 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:124 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:164 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:125 msgid "c" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:162 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:165 msgid "Cont. Service" msgstr "Folyamatos üzem" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:162 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:165 msgid "Serv" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:163 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:125 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:166 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:126 msgid "Emergency Braking Push Button" msgstr "Vészfék ütőgomb" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:163 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:125 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:166 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:126 msgid "EmerBPB" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:164 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:126 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:167 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:127 msgid "Lap Self" msgstr "Fokozatos fékezés" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:164 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:126 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:167 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:127 msgid "LapS" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:165 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:127 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:168 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:128 msgid "Minimum Reduction" msgstr "Elsőfokozati nyomáscsökkentés" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:165 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:127 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:168 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:128 msgid "MRedc" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:166 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:128 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:169 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:129 msgid "(safe range)" msgstr "(biztonságos)" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:166 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:128 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:169 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:129 msgid "(safe)" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:167 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1230 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:129 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:752 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:170 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1261 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:130 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:753 msgid "skid" msgstr "csúszás" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:167 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:129 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:170 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:130 msgid "Skid" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:168 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1222 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:130 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:744 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:171 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1253 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:131 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:745 msgid "slip warning" msgstr "kerékmegperdülési figyelmeztetés" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:168 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1295 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:130 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:171 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1326 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:131 msgid "Warning" msgstr "Figyelmeztetés" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:169 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1214 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:131 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:736 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:172 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1245 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:132 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:737 msgid "slip" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:169 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:131 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:172 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:132 msgid "Slip" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:170 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:173 msgid "Vac. Cont. Service" msgstr "Vákuum folyamatos üzem" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:170 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:173 msgid "Vac.Serv" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:171 -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:410 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:132 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:174 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:441 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:133 msgid "water" msgstr "víz" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:171 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:132 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:174 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:133 msgid "w" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:219 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:222 msgid "Train Driving Info" msgstr "Vonatvezetési infó" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:631 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:634 msgid "bar" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:632 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:635 msgid "inHg" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:633 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:636 msgid "kgf/cm²" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:634 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:637 msgid "kPa" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:635 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:638 msgid "psi" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:636 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:639 msgid "lib./pal." msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:637 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:640 msgid "pal.rtuti" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:755 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:315 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:758 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:316 msgid "Open" msgstr "Nyitva" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:760 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1346 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:320 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:801 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:763 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1379 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:321 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:804 msgid "Closed" msgstr "Zárva" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:780 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:340 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:783 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:341 msgid "Blocked" msgstr "Tiltva" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:780 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1127 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1164 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:340 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:650 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:687 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:783 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1158 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1195 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:341 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:651 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:688 msgid "On" msgstr "Be" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:790 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:976 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1127 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1164 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:350 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:523 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:650 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:687 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:793 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:979 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1158 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1195 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:351 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:524 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:651 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:688 msgid "Off" msgstr "Ki" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:833 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:846 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:865 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:909 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:911 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:918 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:936 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:943 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:390 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:399 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:414 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:457 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:459 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:466 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:484 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:491 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:836 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:849 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:868 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:912 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:914 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:921 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:939 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:946 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:391 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:400 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:415 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:458 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:460 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:467 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:485 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:492 msgid "BC" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:840 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:842 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:848 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:853 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:885 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:887 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:893 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1093 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:396 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:398 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:400 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:405 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:433 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:435 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:441 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:843 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:845 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:851 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:856 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:888 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:890 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:896 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1124 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:397 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:399 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:401 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:406 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:434 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:436 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:442 msgid "EOT" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:874 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:876 #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:877 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:884 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:422 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:424 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:879 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:880 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:887 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:423 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:425 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:432 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:426 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:433 msgid "Lead" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:967 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:515 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:970 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:516 msgid "Setup" msgstr "Beállítás" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1051 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:598 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1054 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:599 msgid "Up" msgstr "Fel" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1164 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:687 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1195 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:688 msgid "Reset" msgstr "Alaphelyzet" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1181 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:704 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1212 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:705 msgid "Exceeded" msgstr "Túllépte" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1287 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1318 msgid "Derailed" msgstr "Kisiklott" @@ -2987,138 +3262,138 @@ msgstr "" "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890 \",.-+|!$%&/" "()=?;:'_[]ÁÍŰŐÜÖÚÓÉáíűőüöúóé" -#: ../../RunActivity/Viewer3D/Processes/GameStateRunActivity.cs:367 +#: ../../RunActivity/Viewer3D/Processes/GameStateRunActivity.cs:379 msgid "Game save is not allowed during container load/unload" msgstr "Játékmentés nem lehetséges konténerrakodás közben" -#: ../../RunActivity/Viewer3D/Processes/GameStateRunActivity.cs:1257 +#: ../../RunActivity/Viewer3D/Processes/GameStateRunActivity.cs:1270 #, csharp-format msgid "Activity Save file '*.save' not found in folder {0}" msgstr "A {0} könyvtár nem tartalmaz '*.save' mentést" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:406 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:437 msgid "freight-grain" msgstr "szemestermény" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:407 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:438 msgid "freight-coal" msgstr "szén" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:408 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:439 msgid "freight-gravel" msgstr "kavics" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:409 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:440 msgid "freight-sand" msgstr "homok" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:412 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:443 msgid "diesel oil" msgstr "dízelolaj" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:413 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:444 msgid "wood" msgstr "fa" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:414 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:445 msgid "sand" msgstr "homok" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:415 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:446 msgid "freight-general" msgstr "vegyesteher" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:416 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:447 msgid "freight-livestock" msgstr "élőállat" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:417 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:448 msgid "freight-fuel" msgstr "olaj" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:418 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:449 msgid "freight-milk" msgstr "tej" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:419 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:450 msgid "mail" msgstr "posta" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:420 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:451 msgid "container" msgstr "konténer" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:568 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:599 msgid "Refill: Immediate refill process selected, refilling immediately." msgstr "Feltöltés: Azonnali feltöltés aktiválva." -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:589 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:620 msgid "Refill: Electric loco and no pickup. Command rejected" msgstr "Feltöltés: Villanymozdony üzemanyag nélkül. Parancs visszautasítva" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:749 -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:768 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:780 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:799 msgid "Incompatible pickup type" msgstr "Nem megfelelő üzemanyag" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:755 -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:773 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:786 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:804 msgid "Starting refill" msgstr "A feltöltés megkezdődött" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:599 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:630 #, csharp-format msgid "Container crane: Distance to {0} supply is {1}." msgstr "Konténerdaru: Távolság a {0}ig {1}." -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:610 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:641 #, csharp-format msgid "Refill: Distance to {0} supply is {1}." msgstr "Feltöltés: A {0} töltőhelyétől való távolság {1}." -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:620 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:651 #, csharp-format msgid "Refill: Loco must be stationary to refill {0}." msgstr "" "Feltöltés: A mozdonynak álló helyzetben kell lennie a {0} feltöltéséhez." -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:626 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:657 #, csharp-format msgid "Refill: Loco speed must exceed {0}." msgstr "Feltöltés: A mozdony sebességének magasabbnak kell lennie {0}-nál." -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:633 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:664 #, csharp-format msgid "Refill: Loco speed must not exceed {0}." msgstr "Feltöltés: A mozdony sebessége nem lehet több {0}-nál." -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:651 -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:672 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:682 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:703 #, csharp-format msgid "Refill: {0} supply now replenished." msgstr "Feltöltés: A {0} feltöltve a vételezési helyen." -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:678 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:709 #, csharp-format msgid "Unload: {0} fuel or freight now unloaded." msgstr "Lerakodás: {0} áru kirakodva." -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:696 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:727 msgid "wag file not equipped for containers" msgstr "A wag fájl nincs felkészítve konténerekre" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:701 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:732 #, csharp-format msgid "{0} now loaded." msgstr "{0} felrakodva." -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:707 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:738 #, csharp-format msgid "{0} now unloaded." msgstr "{0} lerakodva." -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:600 -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:611 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:631 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:642 #, csharp-format msgid "{0} meter" msgid_plural "{0} meters" @@ -3179,6 +3454,18 @@ msgstr "Mérföldkő" msgid "Dist" msgstr "Táv" +#~ msgid "Confirmations visible" +#~ msgstr "Visszajelzések láthatóak" + +#~ msgid "Wag Adhesion" +#~ msgstr "Vagon tapadása" + +#~ msgid "Tang. Force" +#~ msgstr "Kerületi erő" + +#~ msgid "Static Force" +#~ msgstr "Statikus erő" + #~ msgid "Solver" #~ msgstr "Számítóképlet" @@ -3293,12 +3580,6 @@ msgstr "Táv" #~ msgid "Dispatcher does not allow hand throw at this time" #~ msgstr "A forgalomirányító nem engedi a váltó kézi állítását pillanatnyilag" -#~ msgid "main route" -#~ msgstr "fővágány" - -#~ msgid "side route" -#~ msgstr "mellékvágány" - #~ msgid "You are the new dispatcher. Enjoy!" #~ msgstr "Te vagy az új forgalomirányító. Élvezd!" @@ -3326,9 +3607,6 @@ msgstr "Táv" #~ msgstr "" #~ "Mostantól alirányító vagy, képes leszel kezelni a váltókat és jelzőket." -#~ msgid "You are no longer an assistant." -#~ msgstr "Nem vagy többé alirányító" - #~ msgid "Switched, current route is {0}" #~ msgstr "Átváltva, a beállított vágány a {0}" @@ -3927,9 +4205,6 @@ msgstr "Táv" #~ msgid "Steam Usage" #~ msgstr "Gőzfelhasználás" -#~ msgid "Usage:" -#~ msgstr "Felhaszn:" - #~ msgid "Cyl" #~ msgstr "Henger" @@ -4169,10 +4444,6 @@ msgstr "Táv" #~ msgid "Oil" #~ msgstr "Olaj" -#~ msgctxt "Engine" -#~ msgid "Stopped" -#~ msgstr "Leállítva" - #~ msgctxt "Engine" #~ msgid "Starting" #~ msgstr "Indul" @@ -4188,12 +4459,6 @@ msgstr "Táv" #~ msgid "Held for connecting train : " #~ msgstr "Várakoztatás csatlakozó vonat miatt: " -#~ msgid "Left" -#~ msgstr "Bal" - -#~ msgid "Right" -#~ msgstr "Jobb" - #~ msgid "Compound locomotive" #~ msgstr "Kompaund mozdony" diff --git a/Source/Locales/Updater/Updater.pot b/Source/Locales/Updater/Updater.pot index 487f961e53..2b6360cbe1 100644 --- a/Source/Locales/Updater/Updater.pot +++ b/Source/Locales/Updater/Updater.pot @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2022-04-12 14:33:18-0300\n" -"PO-Revision-Date: 2022-04-12 14:33:18-0300\n" +"POT-Creation-Date: 2023-08-25 09:18:16+0200\n" +"PO-Revision-Date: 2023-08-25 09:18:16+0200\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" From 3097086b6eb8e794e034fda08805d77365183ae5 Mon Sep 17 00:00:00 2001 From: Looky1173 Date: Sat, 26 Aug 2023 10:19:00 +0200 Subject: [PATCH 21/33] Revert "Update locales" This reverts commit dadbc9fe8e9bf7433881ca9a96c5ed4ae1409b27. --- Source/Locales/Contrib/Contrib.pot | 10 +- Source/Locales/Menu/Menu.pot | 325 ++- Source/Locales/ORTS.Common/ORTS.Common.pot | 466 ++-- Source/Locales/ORTS.Menu/ORTS.Menu.pot | 4 +- .../Locales/ORTS.Settings/ORTS.Settings.pot | 12 +- .../Orts.Formats.OR/Orts.Formats.OR.pot | 4 +- .../Orts.Simulation/Orts.Simulation.pot | 1808 ++++++++-------- Source/Locales/RunActivity/RunActivity.pot | 1802 +++++++--------- Source/Locales/RunActivity/hu.po | 1885 +++++++---------- Source/Locales/Updater/Updater.pot | 4 +- 10 files changed, 2814 insertions(+), 3506 deletions(-) diff --git a/Source/Locales/Contrib/Contrib.pot b/Source/Locales/Contrib/Contrib.pot index a339403a03..b15250d334 100644 --- a/Source/Locales/Contrib/Contrib.pot +++ b/Source/Locales/Contrib/Contrib.pot @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2023-08-25 09:17:47+0200\n" -"PO-Revision-Date: 2023-08-25 09:17:48+0200\n" +"POT-Creation-Date: 2022-08-17 02:43:24+0200\n" +"PO-Revision-Date: 2022-08-17 02:43:28+0200\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -199,7 +199,7 @@ msgid "menuStrip1" msgstr "" #: ../../Contrib/ActivityEditor/ActivityEditor/Engine/ActEditor.Designer.cs:118 -#: ../../Contrib/ActivityEditor/ActivityEditor/Engine/SimpleTextEd.Designer.cs:63 +#: ../../Contrib/ActivityEditor/ActivityEditor/Engine/SimpleTextEd.Designer.cs:62 msgid "File" msgstr "" @@ -218,7 +218,7 @@ msgid "Traffic" msgstr "" #: ../../Contrib/ActivityEditor/ActivityEditor/Engine/ActEditor.Designer.cs:153 -#: ../../Contrib/ActivityEditor/ActivityEditor/Engine/SimpleTextEd.Designer.cs:70 +#: ../../Contrib/ActivityEditor/ActivityEditor/Engine/SimpleTextEd.Designer.cs:68 msgid "Save" msgstr "" @@ -351,7 +351,7 @@ msgstr "" msgid "Click to Edit Metadata for a specified route" msgstr "" -#: ../../Contrib/ActivityEditor/ActivityEditor/Engine/SimpleTextEd.Designer.cs:91 +#: ../../Contrib/ActivityEditor/ActivityEditor/Engine/SimpleTextEd.Designer.cs:85 msgid "Form1" msgstr "" diff --git a/Source/Locales/Menu/Menu.pot b/Source/Locales/Menu/Menu.pot index 1e7573c77f..4f91e69f0d 100644 --- a/Source/Locales/Menu/Menu.pot +++ b/Source/Locales/Menu/Menu.pot @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2023-08-25 09:17:51+0200\n" -"PO-Revision-Date: 2023-08-25 09:17:51+0200\n" +"POT-Creation-Date: 2022-08-17 02:43:28+0200\n" +"PO-Revision-Date: 2022-08-17 02:43:29+0200\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -113,7 +113,7 @@ msgid "Rain" msgstr "" #: ../../Menu/MainForm.cs:156 -#: ../../Menu/Options.cs:596 +#: ../../Menu/Options.cs:583 msgid "Easy" msgstr "" @@ -122,7 +122,7 @@ msgid "Medium" msgstr "" #: ../../Menu/MainForm.cs:158 -#: ../../Menu/Options.cs:602 +#: ../../Menu/Options.cs:589 msgid "Hard" msgstr "" @@ -255,7 +255,7 @@ msgid "Logging" msgstr "" #: ../../Menu/MainForm.Designer.cs:159 -#: ../../Menu/Options.Designer.cs:2667 +#: ../../Menu/Options.Designer.cs:2440 msgid "Options" msgstr "" @@ -527,7 +527,6 @@ msgid "Unstable" msgstr "" #: ../../Menu/Options.cs:266 -#: ../../Menu/Options.cs:311 msgid "None" msgstr "" @@ -550,67 +549,55 @@ msgstr "" msgid "No updates." msgstr "" -#: ../../Menu/Options.cs:312 -msgid "Information" -msgstr "" - -#: ../../Menu/Options.cs:313 -msgid "Warning" -msgstr "" - -#: ../../Menu/Options.cs:314 -msgid "Error" -msgstr "" - -#: ../../Menu/Options.cs:409 +#: ../../Menu/Options.cs:396 msgid "Click to change this key" msgstr "" -#: ../../Menu/Options.cs:425 +#: ../../Menu/Options.cs:412 msgid "" "Continue with conflicting key assignments?\n" "\n" msgstr "" -#: ../../Menu/Options.cs:547 +#: ../../Menu/Options.cs:534 msgid "Remove all custom key assignments?" msgstr "" -#: ../../Menu/Options.cs:558 +#: ../../Menu/Options.cs:545 msgid "" "A listing of all keyboard commands and keys has been placed here:\n" "\n" msgstr "" -#: ../../Menu/Options.cs:567 +#: ../../Menu/Options.cs:554 msgid "No errors found." msgstr "" -#: ../../Menu/Options.cs:594 +#: ../../Menu/Options.cs:581 msgid "Very easy" msgstr "" -#: ../../Menu/Options.cs:598 +#: ../../Menu/Options.cs:585 msgid "MSTS Compatible" msgstr "" -#: ../../Menu/Options.cs:600 +#: ../../Menu/Options.cs:587 msgid "Normal" msgstr "" -#: ../../Menu/Options.cs:604 +#: ../../Menu/Options.cs:591 msgid "Very Hard" msgstr "" -#: ../../Menu/Options.cs:606 +#: ../../Menu/Options.cs:593 msgid "Good luck!" msgstr "" -#: ../../Menu/Options.cs:701 +#: ../../Menu/Options.cs:688 msgid "Select an installation profile (MSTS folder) to add:" msgstr "" -#: ../../Menu/Options.cs:572 +#: ../../Menu/Options.cs:559 #, csharp-format msgid "" "{0:F0}° vertical FOV is the same as:\n" @@ -618,515 +605,507 @@ msgid "" "{2:F0}° horizontal FOV on 16:9" msgstr "" -#: ../../Menu/Options.cs:616 +#: ../../Menu/Options.cs:603 #, csharp-format msgid "{0}%" msgstr "" -#: ../../Menu/Options.cs:652 +#: ../../Menu/Options.cs:639 #, csharp-format msgid "No detail (-{0}%)" msgstr "" -#: ../../Menu/Options.cs:654 +#: ../../Menu/Options.cs:641 #, csharp-format msgid "Less detail (-{0}%)" msgstr "" -#: ../../Menu/Options.cs:656 +#: ../../Menu/Options.cs:643 #, csharp-format msgid "Default detail (+{0}%)" msgstr "" -#: ../../Menu/Options.cs:658 +#: ../../Menu/Options.cs:645 #, csharp-format msgid "More detail (+{0}%)" msgstr "" -#: ../../Menu/Options.cs:660 +#: ../../Menu/Options.cs:647 #, csharp-format msgid "All detail (+{0}%)" msgstr "" -#: ../../Menu/Options.Designer.cs:293 +#: ../../Menu/Options.Designer.cs:268 msgid "OK" msgstr "" -#: ../../Menu/Options.Designer.cs:327 +#: ../../Menu/Options.Designer.cs:302 msgid "Brake pipe charging rate (PSI/s) " msgstr "" -#: ../../Menu/Options.Designer.cs:338 +#: ../../Menu/Options.Designer.cs:313 msgid "Graduated release air brakes " msgstr "" -#: ../../Menu/Options.Designer.cs:351 +#: ../../Menu/Options.Designer.cs:326 #: ../../Menu/TestingForm.Designer.cs:87 msgid "Cancel" msgstr "" -#: ../../Menu/Options.Designer.cs:361 +#: ../../Menu/Options.Designer.cs:336 msgid "Alerter in cab " msgstr "" -#: ../../Menu/Options.Designer.cs:415 +#: ../../Menu/Options.Designer.cs:390 msgid "General" msgstr "" -#: ../../Menu/Options.Designer.cs:521 +#: ../../Menu/Options.Designer.cs:496 msgid "Overspeed monitor " msgstr "" -#: ../../Menu/Options.Designer.cs:533 +#: ../../Menu/Options.Designer.cs:508 msgid "Use TCS scripts " msgstr "" -#: ../../Menu/Options.Designer.cs:546 +#: ../../Menu/Options.Designer.cs:521 msgid "Other units " msgstr "" -#: ../../Menu/Options.Designer.cs:558 +#: ../../Menu/Options.Designer.cs:533 msgid "Pressure unit " msgstr "" -#: ../../Menu/Options.Designer.cs:588 +#: ../../Menu/Options.Designer.cs:563 msgid "Also in external views " msgstr "" -#: ../../Menu/Options.Designer.cs:598 +#: ../../Menu/Options.Designer.cs:573 msgid "Retainer valve on all cars " msgstr "" -#: ../../Menu/Options.Designer.cs:619 +#: ../../Menu/Options.Designer.cs:594 msgid "Audio" msgstr "" -#: ../../Menu/Options.Designer.cs:685 +#: ../../Menu/Options.Designer.cs:660 msgid "% external sound heard internally" msgstr "" -#: ../../Menu/Options.Designer.cs:721 +#: ../../Menu/Options.Designer.cs:696 msgid "% sound volume" msgstr "" -#: ../../Menu/Options.Designer.cs:732 +#: ../../Menu/Options.Designer.cs:707 msgid "Sound detail level" msgstr "" -#: ../../Menu/Options.Designer.cs:799 +#: ../../Menu/Options.Designer.cs:755 msgid "Video" msgstr "" -#: ../../Menu/Options.Designer.cs:821 -msgid "Default detail (+0%)" -msgstr "" - -#: ../../Menu/Options.Designer.cs:999 -msgid "Level of detail bias:" -msgstr "" - -#: ../../Menu/Options.Designer.cs:1025 -msgid "Signal light glow" -msgstr "" - -#: ../../Menu/Options.Designer.cs:1036 +#: ../../Menu/Options.Designer.cs:765 msgid "Extend object maximum viewing distance to horizon" msgstr "" -#: ../../Menu/Options.Designer.cs:1049 -#: ../../Menu/Options.Designer.cs:1268 +#: ../../Menu/Options.Designer.cs:776 +#: ../../Menu/Options.Designer.cs:977 msgid "XXX" msgstr "" -#: ../../Menu/Options.Designer.cs:1059 +#: ../../Menu/Options.Designer.cs:787 msgid "Anti-aliasing:" msgstr "" -#: ../../Menu/Options.Designer.cs:1088 +#: ../../Menu/Options.Designer.cs:813 msgid "Shadow for all shapes" msgstr "" -#: ../../Menu/Options.Designer.cs:1099 +#: ../../Menu/Options.Designer.cs:823 msgid "Double overhead wires" msgstr "" -#: ../../Menu/Options.Designer.cs:1111 +#: ../../Menu/Options.Designer.cs:834 msgid "Ambient daylight brightness:" msgstr "" -#: ../../Menu/Options.Designer.cs:1122 -msgid "YYY" -msgstr "" - -#: ../../Menu/Options.Designer.cs:1131 +#: ../../Menu/Options.Designer.cs:852 msgid "Model instancing" msgstr "" -#: ../../Menu/Options.Designer.cs:1161 +#: ../../Menu/Options.Designer.cs:879 msgid "Vertical sync" msgstr "" -#: ../../Menu/Options.Designer.cs:1173 +#: ../../Menu/Options.Designer.cs:890 msgid "Viewing distance (km)" msgstr "" -#: ../../Menu/Options.Designer.cs:1214 +#: ../../Menu/Options.Designer.cs:928 msgid "Distant mountains" msgstr "" -#: ../../Menu/Options.Designer.cs:1227 +#: ../../Menu/Options.Designer.cs:940 msgid "Viewing distance (m)" msgstr "" -#: ../../Menu/Options.Designer.cs:1302 +#: ../../Menu/Options.Designer.cs:1010 msgid "Viewing vertical FOV" msgstr "" -#: ../../Menu/Options.Designer.cs:1313 +#: ../../Menu/Options.Designer.cs:1020 msgid "World object density" msgstr "" -#: ../../Menu/Options.Designer.cs:1337 +#: ../../Menu/Options.Designer.cs:1041 msgid "Dynamic shadows" msgstr "" -#: ../../Menu/Options.Designer.cs:1348 +#: ../../Menu/Options.Designer.cs:1051 msgid "Overhead wire" msgstr "" -#: ../../Menu/Options.Designer.cs:1371 +#: ../../Menu/Options.Designer.cs:1072 msgid "Simulation" msgstr "" -#: ../../Menu/Options.Designer.cs:1384 +#: ../../Menu/Options.Designer.cs:1085 msgid "Electric - power connected" msgstr "" -#: ../../Menu/Options.Designer.cs:1394 +#: ../../Menu/Options.Designer.cs:1095 msgid "At game start, locomotives have:" msgstr "" -#: ../../Menu/Options.Designer.cs:1403 +#: ../../Menu/Options.Designer.cs:1104 msgid "Diesel - engine(s) started" msgstr "" -#: ../../Menu/Options.Designer.cs:1417 +#: ../../Menu/Options.Designer.cs:1118 msgid "Activity Options" msgstr "" -#: ../../Menu/Options.Designer.cs:1427 +#: ../../Menu/Options.Designer.cs:1128 msgid "Location-linked passing path processing" msgstr "" -#: ../../Menu/Options.Designer.cs:1438 +#: ../../Menu/Options.Designer.cs:1139 msgid "Open/close doors in AI trains" msgstr "" -#: ../../Menu/Options.Designer.cs:1449 +#: ../../Menu/Options.Designer.cs:1150 msgid "Forced red at station stops" msgstr "" -#: ../../Menu/Options.Designer.cs:1459 +#: ../../Menu/Options.Designer.cs:1160 msgid "Steam - boiler pre-heated" msgstr "" -#: ../../Menu/Options.Designer.cs:1469 +#: ../../Menu/Options.Designer.cs:1170 msgid "Simple controls and physics" msgstr "" -#: ../../Menu/Options.Designer.cs:1479 +#: ../../Menu/Options.Designer.cs:1180 msgid "Curve dependent speed limit" msgstr "" -#: ../../Menu/Options.Designer.cs:1490 +#: ../../Menu/Options.Designer.cs:1191 msgid "Adhesion moving average filter size" msgstr "" -#: ../../Menu/Options.Designer.cs:1517 +#: ../../Menu/Options.Designer.cs:1218 msgid "Break couplers" msgstr "" -#: ../../Menu/Options.Designer.cs:1527 +#: ../../Menu/Options.Designer.cs:1228 msgid "Advanced adhesion model" msgstr "" -#: ../../Menu/Options.Designer.cs:1543 +#: ../../Menu/Options.Designer.cs:1244 msgid "Keyboard" msgstr "" -#: ../../Menu/Options.Designer.cs:1553 +#: ../../Menu/Options.Designer.cs:1254 msgid "Export" msgstr "" -#: ../../Menu/Options.Designer.cs:1566 +#: ../../Menu/Options.Designer.cs:1267 msgid "Defaults" msgstr "" -#: ../../Menu/Options.Designer.cs:1578 +#: ../../Menu/Options.Designer.cs:1279 msgid "Check" msgstr "" -#: ../../Menu/Options.Designer.cs:1612 +#: ../../Menu/Options.Designer.cs:1313 msgid "Data logger" msgstr "" -#: ../../Menu/Options.Designer.cs:1643 +#: ../../Menu/Options.Designer.cs:1344 msgid "Speed units" msgstr "" -#: ../../Menu/Options.Designer.cs:1665 +#: ../../Menu/Options.Designer.cs:1366 msgid "Log miscellaneous data" msgstr "" -#: ../../Menu/Options.Designer.cs:1675 +#: ../../Menu/Options.Designer.cs:1376 msgid "Log performance data" msgstr "" -#: ../../Menu/Options.Designer.cs:1685 +#: ../../Menu/Options.Designer.cs:1386 msgid "Start logging with the simulation start" msgstr "" -#: ../../Menu/Options.Designer.cs:1696 +#: ../../Menu/Options.Designer.cs:1397 msgid "Separator" msgstr "" -#: ../../Menu/Options.Designer.cs:1705 +#: ../../Menu/Options.Designer.cs:1406 msgid "Log physics data" msgstr "" -#: ../../Menu/Options.Designer.cs:1715 +#: ../../Menu/Options.Designer.cs:1416 msgid "Log Steam performance data" msgstr "" -#: ../../Menu/Options.Designer.cs:1725 +#: ../../Menu/Options.Designer.cs:1426 msgid "Verbose ENG/WAG configuration messages" msgstr "" -#: ../../Menu/Options.Designer.cs:1740 +#: ../../Menu/Options.Designer.cs:1441 msgid "Evaluation" msgstr "" -#: ../../Menu/Options.Designer.cs:1760 +#: ../../Menu/Options.Designer.cs:1461 msgid "Interval (sec)" msgstr "" -#: ../../Menu/Options.Designer.cs:1769 +#: ../../Menu/Options.Designer.cs:1470 msgid "Log station stops" msgstr "" -#: ../../Menu/Options.Designer.cs:1802 +#: ../../Menu/Options.Designer.cs:1503 msgid "Log train speed" msgstr "" -#: ../../Menu/Options.Designer.cs:1818 +#: ../../Menu/Options.Designer.cs:1519 msgid "Content" msgstr "" -#: ../../Menu/Options.Designer.cs:1841 +#: ../../Menu/Options.Designer.cs:1542 #: ../../Menu/ResumeForm.Designer.cs:150 msgid "Delete" msgstr "" -#: ../../Menu/Options.Designer.cs:1859 +#: ../../Menu/Options.Designer.cs:1560 msgid "Installation profile" msgstr "" -#: ../../Menu/Options.Designer.cs:1868 +#: ../../Menu/Options.Designer.cs:1569 msgid "Change..." msgstr "" -#: ../../Menu/Options.Designer.cs:1889 +#: ../../Menu/Options.Designer.cs:1590 msgid "Name:" msgstr "" -#: ../../Menu/Options.Designer.cs:1898 +#: ../../Menu/Options.Designer.cs:1599 msgid "Path:" msgstr "" -#: ../../Menu/Options.Designer.cs:1917 +#: ../../Menu/Options.Designer.cs:1618 msgid "Add..." msgstr "" -#: ../../Menu/Options.Designer.cs:2025 +#: ../../Menu/Options.Designer.cs:1725 msgid "System" msgstr "" -#: ../../Menu/Options.Designer.cs:2047 +#: ../../Menu/Options.Designer.cs:1747 msgid "Target frame rate" msgstr "" -#: ../../Menu/Options.Designer.cs:2086 +#: ../../Menu/Options.Designer.cs:1786 msgid "Automatically tune settings to keep performance level" msgstr "" -#: ../../Menu/Options.Designer.cs:2110 +#: ../../Menu/Options.Designer.cs:1810 msgid "Web server port" msgstr "" -#: ../../Menu/Options.Designer.cs:2166 -msgid "Messages suppressed " +#: ../../Menu/Options.Designer.cs:1854 +msgid "Show control confirmations " msgstr "" -#: ../../Menu/Options.Designer.cs:2188 +#: ../../Menu/Options.Designer.cs:1877 msgid "Use glass for in-game windows" msgstr "" -#: ../../Menu/Options.Designer.cs:2226 +#: ../../Menu/Options.Designer.cs:1915 msgid "Window size (choose or specify WIDTHxHEIGHT)" msgstr "" -#: ../../Menu/Options.Designer.cs:2248 +#: ../../Menu/Options.Designer.cs:1937 msgid "Windowed" msgstr "" -#: ../../Menu/Options.Designer.cs:2284 +#: ../../Menu/Options.Designer.cs:1973 msgid "Language " msgstr "" -#: ../../Menu/Options.Designer.cs:2306 +#: ../../Menu/Options.Designer.cs:1995 msgid "Update mode:" msgstr "" -#: ../../Menu/Options.Designer.cs:2342 +#: ../../Menu/Options.Designer.cs:2035 msgid "Experimental" msgstr "" -#: ../../Menu/Options.Designer.cs:2353 -#: ../../Menu/Options.Designer.cs:2397 -#: ../../Menu/Options.Designer.cs:2614 +#: ../../Menu/Options.Designer.cs:2046 +#: ../../Menu/Options.Designer.cs:2090 +#: ../../Menu/Options.Designer.cs:2351 msgid "Level" msgstr "" -#: ../../Menu/Options.Designer.cs:2377 +#: ../../Menu/Options.Designer.cs:2070 msgid "Activity weather randomization" msgstr "" -#: ../../Menu/Options.Designer.cs:2387 +#: ../../Menu/Options.Designer.cs:2080 msgid "Activity randomization" msgstr "" -#: ../../Menu/Options.Designer.cs:2420 +#: ../../Menu/Options.Designer.cs:2113 msgid "Correct questionable braking parameters" msgstr "" -#: ../../Menu/Options.Designer.cs:2431 +#: ../../Menu/Options.Designer.cs:2124 msgid "Adhesion factor random change:" msgstr "" -#: ../../Menu/Options.Designer.cs:2441 +#: ../../Menu/Options.Designer.cs:2134 msgid "Adhesion factor correction:" msgstr "" -#: ../../Menu/Options.Designer.cs:2468 +#: ../../Menu/Options.Designer.cs:2144 +msgid "Level of detail bias:" +msgstr "" + +#: ../../Menu/Options.Designer.cs:2180 msgid "Show shape warnings" msgstr "" -#: ../../Menu/Options.Designer.cs:2486 +#: ../../Menu/Options.Designer.cs:2213 msgid "Level:" msgstr "" -#: ../../Menu/Options.Designer.cs:2526 +#: ../../Menu/Options.Designer.cs:2253 +msgid "Signal light glow" +msgstr "" + +#: ../../Menu/Options.Designer.cs:2263 msgid "MSTS environments" msgstr "" -#: ../../Menu/Options.Designer.cs:2537 +#: ../../Menu/Options.Designer.cs:2274 msgid "Gauge (mm)" msgstr "" -#: ../../Menu/Options.Designer.cs:2575 +#: ../../Menu/Options.Designer.cs:2312 msgid "Minimum length (m)" msgstr "" -#: ../../Menu/Options.Designer.cs:2626 +#: ../../Menu/Options.Designer.cs:2363 msgid "" "Experimental features that may slow down the game, use at your own risk." msgstr "" -#: ../../Menu/Options.Designer.cs:2650 +#: ../../Menu/Options.Designer.cs:2387 msgid "Super-elevation" msgstr "" -#: ../../Menu/Options.Designer.cs:1655 +#: ../../Menu/Options.Designer.cs:1356 msgid "" "Use data logger to record your simulation data (in-game command: F12).\r\n" "Please remember that the size of the dump file grows with the simulation " "time!" msgstr "" -#: ../../Menu/Options.Designer.cs:1831 +#: ../../Menu/Options.Designer.cs:1532 msgid "" "Installation profiles tell Open Rails where to look for game content. Add " "each full and mini-route MSTS installation." msgstr "" -#: ../../Menu/Options.Designer.cs:1980 +#: ../../Menu/Options.Designer.cs:1681 msgid "Name" msgstr "" -#: ../../Menu/Options.Designer.cs:1988 +#: ../../Menu/Options.Designer.cs:1689 #: ../../Menu/ResumeForm.Designer.cs:372 msgid "Path" msgstr "" -#: ../../Menu/Options.Designer.cs:669 +#: ../../Menu/Options.Designer.cs:644 msgid "" "Min 0 Max 100. Higher: louder sound\r\n" "\r\n" msgstr "" -#: ../../Menu/Options.Designer.cs:705 +#: ../../Menu/Options.Designer.cs:680 msgid "Sound Volume 0-100" msgstr "" -#: ../../Menu/Options.Designer.cs:1015 -msgid "Default is 0%" -msgstr "" - -#: ../../Menu/Options.Designer.cs:1076 +#: ../../Menu/Options.Designer.cs:802 msgid "Default is 2x MSAA" msgstr "" -#: ../../Menu/Options.Designer.cs:1149 +#: ../../Menu/Options.Designer.cs:868 msgid "Default is 100%" msgstr "" -#: ../../Menu/Options.Designer.cs:1199 -#: ../../Menu/Options.Designer.cs:2073 +#: ../../Menu/Options.Designer.cs:914 +#: ../../Menu/Options.Designer.cs:1773 msgid "Distance to see mountains" msgstr "" -#: ../../Menu/Options.Designer.cs:1567 +#: ../../Menu/Options.Designer.cs:1268 msgid "Load the factory default key assignments." msgstr "" -#: ../../Menu/Options.Designer.cs:1579 +#: ../../Menu/Options.Designer.cs:1280 msgid "Check for incorrect key assignments." msgstr "" -#: ../../Menu/Options.Designer.cs:2367 -#: ../../Menu/Options.Designer.cs:2411 +#: ../../Menu/Options.Designer.cs:2060 +#: ../../Menu/Options.Designer.cs:2104 msgid "" "0: no randomization, 1: moderate, 2: significant; 3: high (may be " "unrealistic)" msgstr "" -#: ../../Menu/Options.Designer.cs:2499 +#: ../../Menu/Options.Designer.cs:2195 +msgid "Default is 0%" +msgstr "" + +#: ../../Menu/Options.Designer.cs:2226 msgid "Default is 10%" msgstr "" -#: ../../Menu/Options.Designer.cs:2515 +#: ../../Menu/Options.Designer.cs:2242 msgid "Default is 130%" msgstr "" -#: ../../Menu/Options.Designer.cs:2599 +#: ../../Menu/Options.Designer.cs:2336 msgid "Shortest curve to have elevation" msgstr "" -#: ../../Menu/Options.Designer.cs:2640 +#: ../../Menu/Options.Designer.cs:2377 msgid "0: no elevation, 1: 9cm max; 10: 18cm max" msgstr "" -#: ../../Menu/Options.Designer.cs:1554 +#: ../../Menu/Options.Designer.cs:1255 msgid "" "Generate a listing of your keyboard assignments. \r\n" "The output is placed on your desktop." diff --git a/Source/Locales/ORTS.Common/ORTS.Common.pot b/Source/Locales/ORTS.Common/ORTS.Common.pot index 64142068d3..f5a11c24cd 100644 --- a/Source/Locales/ORTS.Common/ORTS.Common.pot +++ b/Source/Locales/ORTS.Common/ORTS.Common.pot @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2023-08-25 09:17:55+0200\n" -"PO-Revision-Date: 2023-08-25 09:17:55+0200\n" +"POT-Creation-Date: 2022-08-17 02:43:29+0200\n" +"PO-Revision-Date: 2022-08-17 02:43:29+0200\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -254,858 +254,786 @@ msgid "Game Multi Player Dispatcher" msgstr "" #: ../../ORTS.Common/Input/UserCommand.cs:26 -msgid "Game Multi Player Dispatcher Beta" -msgstr "" - -#: ../../ORTS.Common/Input/UserCommand.cs:27 msgid "Game Multi Player Texting" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:28 +#: ../../ORTS.Common/Input/UserCommand.cs:27 msgid "Game Switch Manual Mode" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:29 +#: ../../ORTS.Common/Input/UserCommand.cs:28 msgid "Game Reset Out Of Control Mode" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:30 +#: ../../ORTS.Common/Input/UserCommand.cs:29 msgid "Game Clear Signal Forward" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:31 +#: ../../ORTS.Common/Input/UserCommand.cs:30 msgid "Game Clear Signal Backward" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:32 +#: ../../ORTS.Common/Input/UserCommand.cs:31 msgid "Game Reset Signal Forward" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:33 +#: ../../ORTS.Common/Input/UserCommand.cs:32 msgid "Game Reset Signal Backward" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:34 +#: ../../ORTS.Common/Input/UserCommand.cs:33 msgid "Game Autopilot Mode" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:35 +#: ../../ORTS.Common/Input/UserCommand.cs:34 msgid "Game Suspend Old Player" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:37 +#: ../../ORTS.Common/Input/UserCommand.cs:36 msgid "Display Next Window Tab" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:38 +#: ../../ORTS.Common/Input/UserCommand.cs:37 msgid "Display Help Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:39 +#: ../../ORTS.Common/Input/UserCommand.cs:38 msgid "Display Track Monitor Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:40 +#: ../../ORTS.Common/Input/UserCommand.cs:39 msgid "Display HUD" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:41 +#: ../../ORTS.Common/Input/UserCommand.cs:40 msgid "Display Train Driving Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:42 +#: ../../ORTS.Common/Input/UserCommand.cs:41 msgid "Display Multi Player Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:43 +#: ../../ORTS.Common/Input/UserCommand.cs:42 msgid "Display Car Labels" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:44 +#: ../../ORTS.Common/Input/UserCommand.cs:43 msgid "Display Station Labels" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:45 +#: ../../ORTS.Common/Input/UserCommand.cs:44 msgid "Display Switch Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:46 +#: ../../ORTS.Common/Input/UserCommand.cs:45 msgid "Display Train Operations Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:47 +#: ../../ORTS.Common/Input/UserCommand.cs:46 msgid "Display Train Dpu Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:48 +#: ../../ORTS.Common/Input/UserCommand.cs:47 msgid "Display Next Station Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:49 +#: ../../ORTS.Common/Input/UserCommand.cs:48 msgid "Display Compass Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:50 +#: ../../ORTS.Common/Input/UserCommand.cs:49 msgid "Display Train List Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:51 +#: ../../ORTS.Common/Input/UserCommand.cs:50 msgid "Display EOT List Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:53 +#: ../../ORTS.Common/Input/UserCommand.cs:52 msgid "Debug Speed Up" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:54 +#: ../../ORTS.Common/Input/UserCommand.cs:53 msgid "Debug Speed Down" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:55 +#: ../../ORTS.Common/Input/UserCommand.cs:54 msgid "Debug Speed Reset" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:56 +#: ../../ORTS.Common/Input/UserCommand.cs:55 msgid "Debug Overcast Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:57 +#: ../../ORTS.Common/Input/UserCommand.cs:56 msgid "Debug Overcast Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:58 +#: ../../ORTS.Common/Input/UserCommand.cs:57 msgid "Debug Fog Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:59 +#: ../../ORTS.Common/Input/UserCommand.cs:58 msgid "Debug Fog Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:60 +#: ../../ORTS.Common/Input/UserCommand.cs:59 msgid "Debug Precipitation Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:61 +#: ../../ORTS.Common/Input/UserCommand.cs:60 msgid "Debug Precipitation Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:62 +#: ../../ORTS.Common/Input/UserCommand.cs:61 msgid "Debug Precipitation Liquidity Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:63 +#: ../../ORTS.Common/Input/UserCommand.cs:62 msgid "Debug Precipitation Liquidity Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:64 -msgid "Debug Daylight Offset Increase" -msgstr "" - -#: ../../ORTS.Common/Input/UserCommand.cs:65 -msgid "Debug Daylight Offset Decrease" -msgstr "" - -#: ../../ORTS.Common/Input/UserCommand.cs:66 +#: ../../ORTS.Common/Input/UserCommand.cs:63 msgid "Debug Weather Change" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:67 +#: ../../ORTS.Common/Input/UserCommand.cs:64 msgid "Debug Clock Forwards" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:68 +#: ../../ORTS.Common/Input/UserCommand.cs:65 msgid "Debug Clock Backwards" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:69 +#: ../../ORTS.Common/Input/UserCommand.cs:66 msgid "Debug Logger" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:70 +#: ../../ORTS.Common/Input/UserCommand.cs:67 msgid "Debug Lock Shadows" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:71 +#: ../../ORTS.Common/Input/UserCommand.cs:68 msgid "Debug Dump Keyboard Map" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:72 +#: ../../ORTS.Common/Input/UserCommand.cs:69 msgid "Debug Log Render Frame" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:73 +#: ../../ORTS.Common/Input/UserCommand.cs:70 msgid "Debug Tracks" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:74 +#: ../../ORTS.Common/Input/UserCommand.cs:71 msgid "Debug Signalling" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:75 +#: ../../ORTS.Common/Input/UserCommand.cs:72 msgid "Debug Reset Wheel Slip" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:76 +#: ../../ORTS.Common/Input/UserCommand.cs:73 msgid "Debug Toggle Advanced Adhesion" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:77 +#: ../../ORTS.Common/Input/UserCommand.cs:74 msgid "Debug Sound Form" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:78 +#: ../../ORTS.Common/Input/UserCommand.cs:75 msgid "Debug Physics Form" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:79 +#: ../../ORTS.Common/Input/UserCommand.cs:76 msgid "Debug Toggle Confirmations" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:81 +#: ../../ORTS.Common/Input/UserCommand.cs:78 msgid "Camera Cab" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:82 +#: ../../ORTS.Common/Input/UserCommand.cs:79 msgid "Camera Change Passenger Viewpoint" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:83 +#: ../../ORTS.Common/Input/UserCommand.cs:80 msgid "Camera Toggle 3D Cab" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:84 +#: ../../ORTS.Common/Input/UserCommand.cs:81 msgid "Camera Toggle Show Cab" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:85 +#: ../../ORTS.Common/Input/UserCommand.cs:82 msgid "Camera Toggle Letterbox Cab" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:86 +#: ../../ORTS.Common/Input/UserCommand.cs:83 msgid "Camera Head Out Forward" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:87 +#: ../../ORTS.Common/Input/UserCommand.cs:84 msgid "Camera Head Out Backward" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:88 +#: ../../ORTS.Common/Input/UserCommand.cs:85 msgid "Camera Outside Front" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:89 +#: ../../ORTS.Common/Input/UserCommand.cs:86 msgid "Camera Outside Rear" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:90 +#: ../../ORTS.Common/Input/UserCommand.cs:87 msgid "Camera Trackside" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:91 +#: ../../ORTS.Common/Input/UserCommand.cs:88 msgid "Camera SpecialTracksidePoint" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:92 +#: ../../ORTS.Common/Input/UserCommand.cs:89 msgid "Camera Passenger" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:93 +#: ../../ORTS.Common/Input/UserCommand.cs:90 msgid "Camera Brakeman" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:94 +#: ../../ORTS.Common/Input/UserCommand.cs:91 msgid "Camera Free" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:95 +#: ../../ORTS.Common/Input/UserCommand.cs:92 msgid "Camera Previous Free" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:96 +#: ../../ORTS.Common/Input/UserCommand.cs:93 msgid "Camera Reset" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:97 +#: ../../ORTS.Common/Input/UserCommand.cs:94 msgid "Camera Move Fast" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:98 +#: ../../ORTS.Common/Input/UserCommand.cs:95 msgid "Camera Move Slow" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:99 +#: ../../ORTS.Common/Input/UserCommand.cs:96 msgid "Camera Pan (Rotate) Left" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:100 +#: ../../ORTS.Common/Input/UserCommand.cs:97 msgid "Camera Pan (Rotate) Right" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:101 +#: ../../ORTS.Common/Input/UserCommand.cs:98 msgid "Camera Pan (Rotate) Up" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:102 +#: ../../ORTS.Common/Input/UserCommand.cs:99 msgid "Camera Pan (Rotate) Down" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:103 +#: ../../ORTS.Common/Input/UserCommand.cs:100 msgid "Camera Zoom In (Move Z)" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:104 +#: ../../ORTS.Common/Input/UserCommand.cs:101 msgid "Camera Zoom Out (Move Z)" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:105 +#: ../../ORTS.Common/Input/UserCommand.cs:102 msgid "Camera Rotate (Pan) Left" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:106 +#: ../../ORTS.Common/Input/UserCommand.cs:103 msgid "Camera Rotate (Pan) Right" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:107 +#: ../../ORTS.Common/Input/UserCommand.cs:104 msgid "Camera Rotate (Pan) Up" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:108 +#: ../../ORTS.Common/Input/UserCommand.cs:105 msgid "Camera Rotate (Pan) Down" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:109 +#: ../../ORTS.Common/Input/UserCommand.cs:106 msgid "Camera Car Next" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:110 +#: ../../ORTS.Common/Input/UserCommand.cs:107 msgid "Camera Car Previous" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:111 +#: ../../ORTS.Common/Input/UserCommand.cs:108 msgid "Camera Car First" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:112 +#: ../../ORTS.Common/Input/UserCommand.cs:109 msgid "Camera Car Last" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:113 +#: ../../ORTS.Common/Input/UserCommand.cs:110 msgid "Camera Jumping Trains" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:114 +#: ../../ORTS.Common/Input/UserCommand.cs:111 msgid "Camera Jump Back Player" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:115 +#: ../../ORTS.Common/Input/UserCommand.cs:112 msgid "Camera Jump See Switch" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:116 +#: ../../ORTS.Common/Input/UserCommand.cs:113 msgid "Camera Vibrate" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:117 +#: ../../ORTS.Common/Input/UserCommand.cs:114 msgid "Camera Scroll Right" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:118 +#: ../../ORTS.Common/Input/UserCommand.cs:115 msgid "Camera Scroll Left" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:119 +#: ../../ORTS.Common/Input/UserCommand.cs:116 msgid "Camera Browse Backwards" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:120 +#: ../../ORTS.Common/Input/UserCommand.cs:117 msgid "Camera Browse Forwards" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:122 +#: ../../ORTS.Common/Input/UserCommand.cs:119 msgid "Control Forwards" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:123 +#: ../../ORTS.Common/Input/UserCommand.cs:120 msgid "Control Backwards" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:124 +#: ../../ORTS.Common/Input/UserCommand.cs:121 msgid "Control Throttle Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:125 +#: ../../ORTS.Common/Input/UserCommand.cs:122 msgid "Control Throttle Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:126 +#: ../../ORTS.Common/Input/UserCommand.cs:123 msgid "Control Throttle Zero" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:127 +#: ../../ORTS.Common/Input/UserCommand.cs:124 msgid "Control Gear Up" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:128 +#: ../../ORTS.Common/Input/UserCommand.cs:125 msgid "Control Gear Down" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:129 +#: ../../ORTS.Common/Input/UserCommand.cs:126 msgid "Control Train Brake Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:130 +#: ../../ORTS.Common/Input/UserCommand.cs:127 msgid "Control Train Brake Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:131 +#: ../../ORTS.Common/Input/UserCommand.cs:128 msgid "Control Train Brake Zero" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:132 +#: ../../ORTS.Common/Input/UserCommand.cs:129 msgid "Control Engine Brake Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:133 +#: ../../ORTS.Common/Input/UserCommand.cs:130 msgid "Control Engine Brake Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:134 +#: ../../ORTS.Common/Input/UserCommand.cs:131 msgid "Control Brakeman Brake Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:135 +#: ../../ORTS.Common/Input/UserCommand.cs:132 msgid "Control Brakeman Brake Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:136 +#: ../../ORTS.Common/Input/UserCommand.cs:133 msgid "Control Dynamic Brake Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:137 +#: ../../ORTS.Common/Input/UserCommand.cs:134 msgid "Control Dynamic Brake Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:138 +#: ../../ORTS.Common/Input/UserCommand.cs:135 msgid "Control Bail Off" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:139 -msgid "Control Brake Quick Release" -msgstr "" - -#: ../../ORTS.Common/Input/UserCommand.cs:140 -msgid "Control Brake Overcharge" -msgstr "" - -#: ../../ORTS.Common/Input/UserCommand.cs:141 +#: ../../ORTS.Common/Input/UserCommand.cs:136 msgid "Control Initialize Brakes" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:142 +#: ../../ORTS.Common/Input/UserCommand.cs:137 msgid "Control Handbrake Full" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:143 +#: ../../ORTS.Common/Input/UserCommand.cs:138 msgid "Control Handbrake None" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:144 +#: ../../ORTS.Common/Input/UserCommand.cs:139 msgid "Control Odometer Show/Hide" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:145 +#: ../../ORTS.Common/Input/UserCommand.cs:140 msgid "Control Odometer Reset" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:146 +#: ../../ORTS.Common/Input/UserCommand.cs:141 msgid "Control Odometer Direction" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:147 +#: ../../ORTS.Common/Input/UserCommand.cs:142 msgid "Control Retainers On" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:148 +#: ../../ORTS.Common/Input/UserCommand.cs:143 msgid "Control Retainers Off" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:149 +#: ../../ORTS.Common/Input/UserCommand.cs:144 msgid "Control Brake Hose Connect" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:150 +#: ../../ORTS.Common/Input/UserCommand.cs:145 msgid "Control Brake Hose Disconnect" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:151 +#: ../../ORTS.Common/Input/UserCommand.cs:146 msgid "Control Alerter" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:152 +#: ../../ORTS.Common/Input/UserCommand.cs:147 msgid "Control Emergency Push Button" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:153 +#: ../../ORTS.Common/Input/UserCommand.cs:148 msgid "Control EOT Emergency Brake" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:154 +#: ../../ORTS.Common/Input/UserCommand.cs:149 msgid "Control Sander" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:155 +#: ../../ORTS.Common/Input/UserCommand.cs:150 msgid "Control Sander Toggle" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:156 +#: ../../ORTS.Common/Input/UserCommand.cs:151 msgid "Control Wiper" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:157 +#: ../../ORTS.Common/Input/UserCommand.cs:152 msgid "Control Horn" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:158 +#: ../../ORTS.Common/Input/UserCommand.cs:153 msgid "Control Bell" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:159 +#: ../../ORTS.Common/Input/UserCommand.cs:154 msgid "Control Bell Toggle" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:160 +#: ../../ORTS.Common/Input/UserCommand.cs:155 msgid "Control Door Left" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:161 +#: ../../ORTS.Common/Input/UserCommand.cs:156 msgid "Control Door Right" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:162 +#: ../../ORTS.Common/Input/UserCommand.cs:157 msgid "Control Mirror" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:163 +#: ../../ORTS.Common/Input/UserCommand.cs:158 msgid "Control Light" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:164 +#: ../../ORTS.Common/Input/UserCommand.cs:159 msgid "Control Pantograph 1" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:165 +#: ../../ORTS.Common/Input/UserCommand.cs:160 msgid "Control Pantograph 2" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:166 +#: ../../ORTS.Common/Input/UserCommand.cs:161 msgid "Control Pantograph 3" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:167 +#: ../../ORTS.Common/Input/UserCommand.cs:162 msgid "Control Pantograph 4" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:168 +#: ../../ORTS.Common/Input/UserCommand.cs:163 msgid "Control Battery Close" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:169 +#: ../../ORTS.Common/Input/UserCommand.cs:164 msgid "Control Battery Open" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:170 +#: ../../ORTS.Common/Input/UserCommand.cs:165 msgid "Control Master Key" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:171 +#: ../../ORTS.Common/Input/UserCommand.cs:166 msgid "Control Service Retention" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:172 +#: ../../ORTS.Common/Input/UserCommand.cs:167 msgid "Control Service Retention Cancellation" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:173 +#: ../../ORTS.Common/Input/UserCommand.cs:168 msgid "Control Circuit Breaker Closing Order" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:174 +#: ../../ORTS.Common/Input/UserCommand.cs:169 msgid "Control Circuit Breaker Opening Order" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:175 +#: ../../ORTS.Common/Input/UserCommand.cs:170 msgid "Control Circuit Breaker Closing Authorization" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:176 +#: ../../ORTS.Common/Input/UserCommand.cs:171 msgid "Control Traction Cut-Off Relay Closing Order" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:177 +#: ../../ORTS.Common/Input/UserCommand.cs:172 msgid "Control Traction Cut-Off Relay Opening Order" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:178 +#: ../../ORTS.Common/Input/UserCommand.cs:173 msgid "Control Traction Cut-Off Relay Closing Authorization" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:179 +#: ../../ORTS.Common/Input/UserCommand.cs:174 msgid "Control Electric Train Supply" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:180 +#: ../../ORTS.Common/Input/UserCommand.cs:175 msgid "Control Diesel Player" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:181 +#: ../../ORTS.Common/Input/UserCommand.cs:176 msgid "Control Diesel Helper" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:182 +#: ../../ORTS.Common/Input/UserCommand.cs:177 msgid "Control Headlight Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:183 +#: ../../ORTS.Common/Input/UserCommand.cs:178 msgid "Control Headlight Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:184 +#: ../../ORTS.Common/Input/UserCommand.cs:179 msgid "Control Injector 1 Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:185 +#: ../../ORTS.Common/Input/UserCommand.cs:180 msgid "Control Injector 1 Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:186 +#: ../../ORTS.Common/Input/UserCommand.cs:181 msgid "Control Injector 1" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:187 +#: ../../ORTS.Common/Input/UserCommand.cs:182 msgid "Control Injector 2 Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:188 +#: ../../ORTS.Common/Input/UserCommand.cs:183 msgid "Control Injector 2 Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:189 +#: ../../ORTS.Common/Input/UserCommand.cs:184 msgid "Control Injector 2" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:190 +#: ../../ORTS.Common/Input/UserCommand.cs:185 msgid "Control Blowdown Valve" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:191 +#: ../../ORTS.Common/Input/UserCommand.cs:186 msgid "Control Blower Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:192 +#: ../../ORTS.Common/Input/UserCommand.cs:187 msgid "Control Blower Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:193 +#: ../../ORTS.Common/Input/UserCommand.cs:188 msgid "Control Steam Heat Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:194 +#: ../../ORTS.Common/Input/UserCommand.cs:189 msgid "Control Steam Heat Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:195 +#: ../../ORTS.Common/Input/UserCommand.cs:190 msgid "Control Damper Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:196 +#: ../../ORTS.Common/Input/UserCommand.cs:191 msgid "Control Damper Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:197 +#: ../../ORTS.Common/Input/UserCommand.cs:192 msgid "Control Firebox Open" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:198 +#: ../../ORTS.Common/Input/UserCommand.cs:193 msgid "Control Firebox Close" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:199 +#: ../../ORTS.Common/Input/UserCommand.cs:194 msgid "Control Firing Rate Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:200 +#: ../../ORTS.Common/Input/UserCommand.cs:195 msgid "Control Firing Rate Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:201 +#: ../../ORTS.Common/Input/UserCommand.cs:196 msgid "Control Fire Shovel Full" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:202 +#: ../../ORTS.Common/Input/UserCommand.cs:197 msgid "Control Cylinder Cocks" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:203 +#: ../../ORTS.Common/Input/UserCommand.cs:198 msgid "Control Large Ejector Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:204 +#: ../../ORTS.Common/Input/UserCommand.cs:199 msgid "Control Large Ejector Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:205 +#: ../../ORTS.Common/Input/UserCommand.cs:200 msgid "Control Small Ejector Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:206 +#: ../../ORTS.Common/Input/UserCommand.cs:201 msgid "Control Small Ejector Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:207 +#: ../../ORTS.Common/Input/UserCommand.cs:202 msgid "Control Vacuum Exhauster" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:208 +#: ../../ORTS.Common/Input/UserCommand.cs:203 msgid "Control Cylinder Compound" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:209 +#: ../../ORTS.Common/Input/UserCommand.cs:204 msgid "Control Firing" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:210 +#: ../../ORTS.Common/Input/UserCommand.cs:205 msgid "Control Refill" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:211 +#: ../../ORTS.Common/Input/UserCommand.cs:206 msgid "Control Discrete Unload" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:212 +#: ../../ORTS.Common/Input/UserCommand.cs:207 msgid "Control Water Scoop" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:213 +#: ../../ORTS.Common/Input/UserCommand.cs:208 msgid "Control ImmediateRefill" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:214 +#: ../../ORTS.Common/Input/UserCommand.cs:209 msgid "Control Turntable Clockwise" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:215 +#: ../../ORTS.Common/Input/UserCommand.cs:210 msgid "Control Turntable Counterclockwise" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:216 +#: ../../ORTS.Common/Input/UserCommand.cs:211 msgid "Control Generic Item 1" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:217 +#: ../../ORTS.Common/Input/UserCommand.cs:212 msgid "Control Generic Item 2" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:218 +#: ../../ORTS.Common/Input/UserCommand.cs:213 msgid "Control TCS Generic 1" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:219 +#: ../../ORTS.Common/Input/UserCommand.cs:214 msgid "Control TCS Generic 2" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:220 +#: ../../ORTS.Common/Input/UserCommand.cs:215 msgid "Control Cab Radio" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:221 +#: ../../ORTS.Common/Input/UserCommand.cs:216 msgid "Control AI Fire On" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:222 +#: ../../ORTS.Common/Input/UserCommand.cs:217 msgid "Control AI Fire Off" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:223 +#: ../../ORTS.Common/Input/UserCommand.cs:218 msgid "Control AI Fire Reset" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:226 -msgid "Control Speed Regulator Mode Increase" -msgstr "" - -#: ../../ORTS.Common/Input/UserCommand.cs:227 -msgid "Control Speed Regulator Mode Descrease" -msgstr "" - -#: ../../ORTS.Common/Input/UserCommand.cs:228 -msgid "Control Selected Speed Increase" -msgstr "" - -#: ../../ORTS.Common/Input/UserCommand.cs:229 -msgid "Control Selected Speed Decrease" -msgstr "" - -#: ../../ORTS.Common/Input/UserCommand.cs:230 -msgid "Control Speed Regulator Max Acceleration Increase" -msgstr "" - -#: ../../ORTS.Common/Input/UserCommand.cs:231 -msgid "Control Speed Regulator Max Acceleration Decrease" -msgstr "" - -#: ../../ORTS.Common/Input/UserCommand.cs:232 -msgid "Control Number Of Axles Increase" -msgstr "" - -#: ../../ORTS.Common/Input/UserCommand.cs:233 -msgid "Control Number Of Axles Decrease" -msgstr "" - -#: ../../ORTS.Common/Input/UserCommand.cs:234 -msgid "Control Restricted Speed Zone Active" -msgstr "" - -#: ../../ORTS.Common/Input/UserCommand.cs:235 -msgid "Control Cruise Control Mode Increase" -msgstr "" - -#: ../../ORTS.Common/Input/UserCommand.cs:236 -msgid "Control Cruise Control Mode Decrease" -msgstr "" - -#: ../../ORTS.Common/Input/UserCommand.cs:237 -msgid "Control Train Type Change (Passenger/Cargo)" -msgstr "" - -#: ../../ORTS.Common/Input/UserCommand.cs:238 -msgid "Control Selected Speed To Zero" -msgstr "" - -#: ../../ORTS.Common/Input/UserCommand.cs:240 +#: ../../ORTS.Common/Input/UserCommand.cs:221 msgid "Control DP Move To Front" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:241 +#: ../../ORTS.Common/Input/UserCommand.cs:222 msgid "Control DP Move To Back" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:242 +#: ../../ORTS.Common/Input/UserCommand.cs:223 msgid "Control DP Traction" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:243 +#: ../../ORTS.Common/Input/UserCommand.cs:224 msgid "Control DP Idle" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:244 +#: ../../ORTS.Common/Input/UserCommand.cs:225 msgid "Control DP Brake" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:245 +#: ../../ORTS.Common/Input/UserCommand.cs:226 msgid "Control DP More" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:246 +#: ../../ORTS.Common/Input/UserCommand.cs:227 msgid "Control DP Less" msgstr "" diff --git a/Source/Locales/ORTS.Menu/ORTS.Menu.pot b/Source/Locales/ORTS.Menu/ORTS.Menu.pot index 7e5016ec5a..83f46ecfca 100644 --- a/Source/Locales/ORTS.Menu/ORTS.Menu.pot +++ b/Source/Locales/ORTS.Menu/ORTS.Menu.pot @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2023-08-25 09:18:00+0200\n" -"PO-Revision-Date: 2023-08-25 09:18:00+0200\n" +"POT-Creation-Date: 2022-04-12 14:33:09-0300\n" +"PO-Revision-Date: 2022-04-12 14:33:09-0300\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" diff --git a/Source/Locales/ORTS.Settings/ORTS.Settings.pot b/Source/Locales/ORTS.Settings/ORTS.Settings.pot index cd3fafc181..136a7e4d9f 100644 --- a/Source/Locales/ORTS.Settings/ORTS.Settings.pot +++ b/Source/Locales/ORTS.Settings/ORTS.Settings.pot @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2023-08-25 09:18:04+0200\n" -"PO-Revision-Date: 2023-08-25 09:18:04+0200\n" +"POT-Creation-Date: 2022-08-17 02:43:29+0200\n" +"PO-Revision-Date: 2022-08-17 02:43:30+0200\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -11,22 +11,22 @@ msgstr "" "X-Generator: MonoDevelop Gettext addin\n" -#: ../../ORTS.Settings/InputSettings.cs:560 +#: ../../ORTS.Settings/InputSettings.cs:540 #, csharp-format msgid "{0} requires and is modified by Shift" msgstr "" -#: ../../ORTS.Settings/InputSettings.cs:562 +#: ../../ORTS.Settings/InputSettings.cs:542 #, csharp-format msgid "{0} requires and is modified by Control" msgstr "" -#: ../../ORTS.Settings/InputSettings.cs:564 +#: ../../ORTS.Settings/InputSettings.cs:544 #, csharp-format msgid "{0} requires and is modified by Alt" msgstr "" -#: ../../ORTS.Settings/InputSettings.cs:595 +#: ../../ORTS.Settings/InputSettings.cs:575 #, csharp-format msgid "{0} and {1} both match {2}" msgstr "" diff --git a/Source/Locales/Orts.Formats.OR/Orts.Formats.OR.pot b/Source/Locales/Orts.Formats.OR/Orts.Formats.OR.pot index 4b95e40033..f337641428 100644 --- a/Source/Locales/Orts.Formats.OR/Orts.Formats.OR.pot +++ b/Source/Locales/Orts.Formats.OR/Orts.Formats.OR.pot @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2023-08-25 09:17:58+0200\n" -"PO-Revision-Date: 2023-08-25 09:17:58+0200\n" +"POT-Creation-Date: 2022-04-12 14:33:09-0300\n" +"PO-Revision-Date: 2022-04-12 14:33:09-0300\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" diff --git a/Source/Locales/Orts.Simulation/Orts.Simulation.pot b/Source/Locales/Orts.Simulation/Orts.Simulation.pot index 489fe372ab..e2001f6240 100644 --- a/Source/Locales/Orts.Simulation/Orts.Simulation.pot +++ b/Source/Locales/Orts.Simulation/Orts.Simulation.pot @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2023-08-25 09:18:06+0200\n" -"PO-Revision-Date: 2023-08-25 09:18:09+0200\n" +"POT-Creation-Date: 2022-08-17 02:43:30+0200\n" +"PO-Revision-Date: 2022-08-17 02:43:30+0200\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -11,194 +11,185 @@ msgstr "" "X-Generator: MonoDevelop Gettext addin\n" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:377 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:80 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:276 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:81 msgid "Release" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:378 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:236 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:277 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:233 msgid "Quick Release" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:380 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:279 msgid "Neutral" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:381 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:79 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:280 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:80 msgid "Apply" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:382 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:281 msgid "EPApply" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:383 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:81 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:282 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:82 msgid "Emergency" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:384 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:283 msgid "Self Lap" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:385 -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:386 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:284 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:285 msgid "Service" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:387 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:78 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:286 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:79 msgid "Lap" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:388 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:287 msgid "Suppression" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:389 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:288 msgid "Cont. Service" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:390 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:289 msgid "Full Service" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:391 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:290 msgid "Minimum Reduction" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:392 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:291 msgid "Hold" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:393 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:292 msgid "Str. Brk. Release On:" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:394 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:293 msgid "Str. Brk. Release Off:" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:395 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:294 msgid "Str. Brk. Release:" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:396 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:295 msgid "Str. Brk. Lap:" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:397 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:296 msgid "Str. Brk. Apply:" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:398 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:297 msgid "Str. Brk. Apply All:" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:399 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:298 msgid "Str. Brk. Emerg:" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:400 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:237 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:299 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:234 msgid "Overcharge" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:401 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:300 msgid "Emergency Braking Push Button" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:402 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:301 msgid "TCS Emergency Braking" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:403 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:302 msgid "TCS Full Service Braking" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:404 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:303 msgid "Vac. Cont. Service" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:405 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:304 msgid "Vac. Apply Cont. Service" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:406 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:305 msgid "Manual Braking" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:407 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:306 msgid "Notch" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:408 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:307 msgid "EP Service" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:409 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:308 msgid "EP Full Service" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:410 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:309 msgid "Slow service" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:411 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:310 msgid "SME Service" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:412 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:311 msgid "SME Full Service" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:413 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:312 msgid "SME Self Lap" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:414 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:313 msgid "SME Release Start" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:415 -msgid "Hold Engine" -msgstr "" - -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:416 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:231 -msgid "Bail Off" -msgstr "" - #. Context: Brake Controller -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:379 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:278 msgctxt "Brake Controller" msgid "Running" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/PowerSupply/CircuitBreaker.cs:59 +#: ../../Orts.Simulation/Common/Scripting/PowerSupply/CircuitBreaker.cs:49 #: ../../Orts.Simulation/Common/Scripting/PowerSupply/PowerSupply.cs:164 #: ../../Orts.Simulation/Common/Scripting/PowerSupply/PowerSupply.cs:172 #: ../../Orts.Simulation/Common/Scripting/PowerSupply/PowerSupply.cs:181 -#: ../../Orts.Simulation/Common/Scripting/PowerSupply/TractionCutOffRelay.cs:58 +#: ../../Orts.Simulation/Common/Scripting/PowerSupply/TractionCutOffRelay.cs:47 msgid "Unavailable" msgstr "" #. Context: CircuitBreaker -#: ../../Orts.Simulation/Common/Scripting/PowerSupply/CircuitBreaker.cs:60 +#: ../../Orts.Simulation/Common/Scripting/PowerSupply/CircuitBreaker.cs:50 msgctxt "CircuitBreaker" msgid "Open" msgstr "" #. Context: CircuitBreaker -#: ../../Orts.Simulation/Common/Scripting/PowerSupply/CircuitBreaker.cs:61 +#: ../../Orts.Simulation/Common/Scripting/PowerSupply/CircuitBreaker.cs:51 msgctxt "CircuitBreaker" msgid "Closing" msgstr "" #. Context: CircuitBreaker -#: ../../Orts.Simulation/Common/Scripting/PowerSupply/CircuitBreaker.cs:62 +#: ../../Orts.Simulation/Common/Scripting/PowerSupply/CircuitBreaker.cs:52 msgctxt "CircuitBreaker" msgid "Closed" msgstr "" @@ -312,19 +303,19 @@ msgid "Running" msgstr "" #. Context: TractionCutOffRelay -#: ../../Orts.Simulation/Common/Scripting/PowerSupply/TractionCutOffRelay.cs:59 +#: ../../Orts.Simulation/Common/Scripting/PowerSupply/TractionCutOffRelay.cs:48 msgctxt "TractionCutOffRelay" msgid "Open" msgstr "" #. Context: TractionCutOffRelay -#: ../../Orts.Simulation/Common/Scripting/PowerSupply/TractionCutOffRelay.cs:60 +#: ../../Orts.Simulation/Common/Scripting/PowerSupply/TractionCutOffRelay.cs:49 msgctxt "TractionCutOffRelay" msgid "Closing" msgstr "" #. Context: TractionCutOffRelay -#: ../../Orts.Simulation/Common/Scripting/PowerSupply/TractionCutOffRelay.cs:61 +#: ../../Orts.Simulation/Common/Scripting/PowerSupply/TractionCutOffRelay.cs:50 msgctxt "TractionCutOffRelay" msgid "Closed" msgstr "" @@ -338,80 +329,80 @@ msgstr "" msgid "Alt-E to gain control of your train" msgstr "" -#: ../../Orts.Simulation/MultiPlayer/Message.cs:858 +#: ../../Orts.Simulation/MultiPlayer/Message.cs:835 msgid "Dispatcher does not allow hand throw at this time" msgstr "" -#: ../../Orts.Simulation/MultiPlayer/Message.cs:902 +#: ../../Orts.Simulation/MultiPlayer/Message.cs:879 msgid "main route" msgstr "" -#: ../../Orts.Simulation/MultiPlayer/Message.cs:902 +#: ../../Orts.Simulation/MultiPlayer/Message.cs:879 msgid "side route" msgstr "" -#: ../../Orts.Simulation/MultiPlayer/Message.cs:1796 +#: ../../Orts.Simulation/MultiPlayer/Message.cs:1719 msgid "You are the new dispatcher. Enjoy!" msgstr "" -#: ../../Orts.Simulation/MultiPlayer/Message.cs:1927 +#: ../../Orts.Simulation/MultiPlayer/Message.cs:1850 msgid "Name conflicted with people in the game, will play in single mode" msgstr "" -#: ../../Orts.Simulation/MultiPlayer/Message.cs:2007 +#: ../../Orts.Simulation/MultiPlayer/Message.cs:1930 #: ../../Orts.Simulation/MultiPlayer/MPManager.cs:188 msgid "You gained back the control of your train" msgstr "" -#: ../../Orts.Simulation/MultiPlayer/Message.cs:2253 +#: ../../Orts.Simulation/MultiPlayer/Message.cs:2176 msgid "Server quits, will play as single mode" msgstr "" -#: ../../Orts.Simulation/MultiPlayer/Message.cs:2534 -#: ../../Orts.Simulation/MultiPlayer/Message.cs:2788 +#: ../../Orts.Simulation/MultiPlayer/Message.cs:2457 +#: ../../Orts.Simulation/MultiPlayer/Message.cs:2711 msgid "Trains uncoupled, gain back control by Alt-E" msgstr "" -#: ../../Orts.Simulation/MultiPlayer/Message.cs:2933 -#: ../../Orts.Simulation/MultiPlayer/Message.cs:3061 +#: ../../Orts.Simulation/MultiPlayer/Message.cs:2855 +#: ../../Orts.Simulation/MultiPlayer/Message.cs:2983 msgid "Trains coupled, hit \\ then Shift-? to release brakes" msgstr "" -#: ../../Orts.Simulation/MultiPlayer/Message.cs:3565 +#: ../../Orts.Simulation/MultiPlayer/Message.cs:3487 msgid "You are an assistant now, will be able to handle switches and signals." msgstr "" -#: ../../Orts.Simulation/MultiPlayer/Message.cs:3571 +#: ../../Orts.Simulation/MultiPlayer/Message.cs:3493 msgid "You are no longer an assistant." msgstr "" -#: ../../Orts.Simulation/MultiPlayer/Message.cs:901 +#: ../../Orts.Simulation/MultiPlayer/Message.cs:878 #, csharp-format msgid "Switched, current route is {0}" msgstr "" -#: ../../Orts.Simulation/MultiPlayer/Message.cs:1804 +#: ../../Orts.Simulation/MultiPlayer/Message.cs:1727 #, csharp-format msgid "New dispatcher is {0}" msgstr "" -#: ../../Orts.Simulation/MultiPlayer/Message.cs:2264 +#: ../../Orts.Simulation/MultiPlayer/Message.cs:2187 #: ../../Orts.Simulation/MultiPlayer/OnlinePlayer.cs:175 #, csharp-format msgid "{0} quit." msgstr "" -#: ../../Orts.Simulation/MultiPlayer/Message.cs:2336 +#: ../../Orts.Simulation/MultiPlayer/Message.cs:2259 #, csharp-format msgid "{0} lost." msgstr "" -#: ../../Orts.Simulation/MultiPlayer/Message.cs:3451 +#: ../../Orts.Simulation/MultiPlayer/Message.cs:3373 #, csharp-format msgid " From {0}: {1}" msgstr "" -#: ../../Orts.Simulation/MultiPlayer/MPManager.cs:840 +#: ../../Orts.Simulation/MultiPlayer/MPManager.cs:829 msgid "Missing car, have substituted with other one." msgstr "" @@ -423,20 +414,20 @@ msgstr[0] "" msgstr[1] "" #: ../../Orts.Simulation/Simulation/Activity.cs:1004 -#: ../../Orts.Simulation/Simulation/AIs/AITrain.cs:6625 -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10712 +#: ../../Orts.Simulation/Simulation/AIs/AITrain.cs:6576 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10599 msgid "Passenger boarding completed. Waiting for signal ahead to clear." msgstr "" #: ../../Orts.Simulation/Simulation/Activity.cs:1009 -#: ../../Orts.Simulation/Simulation/AIs/AITrain.cs:6630 -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10720 +#: ../../Orts.Simulation/Simulation/AIs/AITrain.cs:6581 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10607 msgid "Passenger boarding completed. You may depart now." msgstr "" #: ../../Orts.Simulation/Simulation/Activity.cs:984 -#: ../../Orts.Simulation/Simulation/AIs/AITrain.cs:6637 -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10727 +#: ../../Orts.Simulation/Simulation/AIs/AITrain.cs:6588 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10614 #, csharp-format msgid "Passenger boarding completes in {0:D2}:{1:D2}" msgstr "" @@ -461,1130 +452,1101 @@ msgstr "" msgid "MSG" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:183 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:180 msgid "" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:185 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:204 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:182 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:201 msgid "reverse" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:185 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:204 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:182 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:201 msgid "neutral" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:185 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:204 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:182 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:201 msgid "forward" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:185 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:204 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:182 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:201 msgid "locked. Close throttle, stop train then re-try." msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:186 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1210 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1224 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:183 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1208 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1222 msgid "Throttle" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:186 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:194 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:195 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:183 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:191 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:192 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:199 #: ../../Orts.Simulation/Simulation/Confirmer.cs:202 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:203 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:204 #: ../../Orts.Simulation/Simulation/Confirmer.cs:205 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:206 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:207 #: ../../Orts.Simulation/Simulation/Confirmer.cs:208 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:211 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:212 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:216 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:217 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:255 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:256 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:209 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:213 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:214 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:249 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:250 msgid "close" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:186 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:194 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:195 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:183 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:191 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:192 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:199 #: ../../Orts.Simulation/Simulation/Confirmer.cs:202 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:203 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:204 #: ../../Orts.Simulation/Simulation/Confirmer.cs:205 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:206 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:207 #: ../../Orts.Simulation/Simulation/Confirmer.cs:208 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:211 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:212 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:216 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:217 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:255 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:256 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:209 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:213 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:214 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:249 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:250 msgid "open" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:186 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:183 msgid "locked. Release dynamic brake then re-try." msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:187 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:184 msgid "Wheel-slip" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:187 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:184 msgid "over" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:187 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:184 msgid "occurring. Tractive power greatly reduced." msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:187 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:184 msgid "warning" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:189 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:186 msgid "Power" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:189 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:198 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:199 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:206 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:207 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:214 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:229 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:186 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:195 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:196 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:203 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:204 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:211 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:226 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:231 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:233 #: ../../Orts.Simulation/Simulation/Confirmer.cs:234 #: ../../Orts.Simulation/Simulation/Confirmer.cs:236 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:237 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:238 #: ../../Orts.Simulation/Simulation/Confirmer.cs:239 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:240 #: ../../Orts.Simulation/Simulation/Confirmer.cs:241 #: ../../Orts.Simulation/Simulation/Confirmer.cs:242 #: ../../Orts.Simulation/Simulation/Confirmer.cs:243 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:244 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:245 #: ../../Orts.Simulation/Simulation/Confirmer.cs:246 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:249 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:250 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:253 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:271 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:247 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:265 msgid "off" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:189 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:198 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:199 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:206 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:207 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:214 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:186 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:195 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:196 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:203 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:204 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:211 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:231 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:233 #: ../../Orts.Simulation/Simulation/Confirmer.cs:234 #: ../../Orts.Simulation/Simulation/Confirmer.cs:236 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:237 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:239 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:245 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:242 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:243 #: ../../Orts.Simulation/Simulation/Confirmer.cs:246 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:249 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:250 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:253 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:271 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:247 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:265 msgid "on" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:190 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:187 msgid "Pantograph 1" msgstr "" +#: ../../Orts.Simulation/Simulation/Confirmer.cs:187 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:188 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:189 #: ../../Orts.Simulation/Simulation/Confirmer.cs:190 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:191 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:192 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:193 msgid "lower" msgstr "" +#: ../../Orts.Simulation/Simulation/Confirmer.cs:187 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:188 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:189 #: ../../Orts.Simulation/Simulation/Confirmer.cs:190 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:191 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:192 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:193 msgid "raise" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:191 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:188 msgid "Pantograph 2" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:192 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:189 msgid "Pantograph 3" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:193 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:190 msgid "Pantograph 4" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:194 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:195 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:355 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:370 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:191 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:192 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:354 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:369 msgid "Circuit breaker" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:196 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:193 msgid "Circuit breaker closing authorization" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:196 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:193 msgid "remove" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:196 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:193 msgid "give" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:198 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:195 msgid "Player Diesel Power" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:198 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:195 msgid "locked. Close throttle then re-try." msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:199 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:196 msgid "Helper Diesel Power" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:200 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:197 msgid "Diesel Tank" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:200 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:201 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:197 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:198 msgid "re-fueled" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:200 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:201 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:197 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:198 msgid "level" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:201 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:198 msgid "Boiler Water Tank" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:202 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:940 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:199 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:938 msgid "Traction cut-off relay" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:205 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:202 msgid "Regulator" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:206 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:203 msgid "Injector 1" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:207 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:204 msgid "Injector 2" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:208 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:205 msgid "Blowdown Valve" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:209 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6354 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6381 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:206 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6062 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6089 msgid "Blower" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:209 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:206 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:207 #: ../../Orts.Simulation/Simulation/Confirmer.cs:210 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:213 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:218 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:219 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:229 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:262 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:215 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:216 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:226 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:256 msgid "decrease" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:209 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:206 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:207 #: ../../Orts.Simulation/Simulation/Confirmer.cs:210 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:213 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:218 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:219 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:229 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:262 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:215 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:216 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:226 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:256 msgid "increase" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:210 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:207 msgid "SteamHeat" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:211 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:208 msgid "Damper" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:212 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:209 msgid "Firebox Door" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:213 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:210 msgid "Firing Rate" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:214 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:211 msgid "Manual Firing" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:215 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:212 msgid "Fire" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:215 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:212 msgid "add shovel-full" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:216 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:213 msgid "Cylinder Cocks" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:217 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:214 msgid "Cylinder Compound" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:218 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:215 msgid "LargeEjector" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:219 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:216 msgid "SmallEjector" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:220 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:217 msgid "VacuumExhauster" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:220 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:217 msgid "normal" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:220 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:217 msgid "fast" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:221 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:222 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:218 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:219 msgid "Tender" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:221 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:218 msgid "Coal re-filled" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:221 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:218 msgid "Coal level" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:222 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:219 msgid "Water re-filled" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:222 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:219 msgid "Water level" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:224 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6986 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:221 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6686 msgid "Water Scoop" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:224 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:266 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:221 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:260 msgid "up" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:224 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:266 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:221 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:260 msgid "down" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:226 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:223 msgid "Train Brake" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:226 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:223 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:224 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:225 #: ../../Orts.Simulation/Simulation/Confirmer.cs:227 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:228 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:230 msgid "release" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:226 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:223 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:224 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:225 #: ../../Orts.Simulation/Simulation/Confirmer.cs:227 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:228 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:230 msgid "apply" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:227 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:224 msgid "Engine Brake" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:228 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:225 msgid "Brakeman Brake" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:229 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:226 msgid "Dynamic Brake" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:229 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:226 msgid "setup" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:230 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:227 msgid "Emergency Brake" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:231 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:228 +msgid "Bail Off" +msgstr "" + +#: ../../Orts.Simulation/Simulation/Confirmer.cs:228 msgid "disengage" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:231 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:228 msgid "engage" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:232 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:229 msgid "Brakes" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:232 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:229 msgid "initialize" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:232 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:229 msgid "cannot initialize. Stop train then re-try." msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:233 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:142 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/EPBrakeSystem.cs:143 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:230 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:143 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/EPBrakeSystem.cs:84 #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SingleTransferPipe.cs:92 #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SingleTransferPipe.cs:101 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SMEBrakeSystem.cs:103 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SMEBrakeSystem.cs:87 #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/VacuumSinglePipe.cs:141 msgid "Handbrake" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:233 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:230 msgid "none" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:233 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:230 msgid "full" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:234 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:231 msgid "Retainers" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:234 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:231 #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/BrakeSystem.cs:102 msgid "Exhaust" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:234 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:231 #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/BrakeSystem.cs:103 msgid "High Pressure" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:234 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:231 #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/BrakeSystem.cs:104 msgid "Low Pressure" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:234 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:231 #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/BrakeSystem.cs:105 msgid "Slow Direct" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:235 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:232 msgid "Brake Hose" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:235 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:232 msgid "disconnect" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:235 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:232 msgid "connect" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:239 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:236 msgid "Sander" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:240 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:237 msgid "Alerter" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:240 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:237 msgid "acknowledge" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:241 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:238 msgid "Horn" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:242 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:239 msgid "Whistle" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:242 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:239 msgid "blow" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:243 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:240 msgid "Bell" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:243 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:240 msgid "ring" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:244 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:241 msgid "Headlight" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:244 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:241 msgid "dim" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:244 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:241 msgid "bright" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:245 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:242 msgid "Cab Light" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:246 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:243 msgid "Wipers" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:247 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:244 msgid "Cab" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:247 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:244 msgid "changing is not available" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:247 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:244 msgid "" "changing disabled. Close throttle, set reverser to neutral, stop train then " "re-try." msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:248 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:245 msgid "Odometer" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:249 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:246 msgid "Battery" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:250 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:937 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:352 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:247 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:935 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:351 msgid "Master key" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:252 -msgid "Max acceleration" -msgstr "" - -#: ../../Orts.Simulation/Simulation/Confirmer.cs:253 -msgid "Restricted speed zone" -msgstr "" - -#: ../../Orts.Simulation/Simulation/Confirmer.cs:255 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:249 msgid "Doors Left" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:256 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:250 msgid "Doors Right" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:257 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:251 msgid "Mirror" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:257 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:251 msgid "retract" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:257 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:251 msgid "extend" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:259 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:253 msgid "Switch Ahead" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:259 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:260 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:253 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:254 msgid "locked. Use Control+M to change signals to manual mode then re-try." msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:260 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:254 msgid "Switch Behind" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:262 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:256 msgid "Simulation Speed" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:262 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:256 msgid "reset" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:263 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:257 msgid "Uncouple After" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:264 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:258 msgid "Activity" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:264 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:258 msgid "quit" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:264 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:258 msgid "resume" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:265 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:259 msgid "Replay" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:265 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:259 msgid "Overriding camera replay. Press Escape to resume camera replay." msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:266 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:260 msgid "Gearbox" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:266 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:260 msgid "locked. Use shaft before changing gear." msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:267 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:261 msgid "Signal mode" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:267 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:261 msgid "manual" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:267 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:261 msgid "auto" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:267 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:261 msgid "locked. Stop train, then re-try." msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:269 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:263 msgid "Wagon" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:269 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:263 msgid "Wagon fully unloaded" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:269 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:263 msgid "Wagon fully loaded" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:269 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:263 msgid "Freight load" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:271 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:265 msgid "Cab Radio" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:281 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:290 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:328 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:275 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:284 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:322 #, csharp-format msgid "{0} {1}" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:285 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:279 #, csharp-format msgid "{0}" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:295 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:289 #, csharp-format msgid "{0} to {1:0}%" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:300 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:294 #, csharp-format msgid "{0} {1:0}% {2}" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:305 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:299 #, csharp-format msgid "{0:0}% {1}" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:310 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:304 #, csharp-format msgid "{0:0}%" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:318 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:323 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:312 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:317 #, csharp-format msgid "{0} {1:0}%" msgstr "" #. Context: NonSteam -#: ../../Orts.Simulation/Simulation/Confirmer.cs:185 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1211 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:182 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1209 msgctxt "NonSteam" msgid "Reverser" msgstr "" #. Context: Steam -#: ../../Orts.Simulation/Simulation/Confirmer.cs:204 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:201 msgctxt "Steam" msgid "Reverser" msgstr "" #. Context: Alerter -#: ../../Orts.Simulation/Simulation/Confirmer.cs:240 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:237 msgctxt "Alerter" msgid "sound" msgstr "" #. Context: Horn -#: ../../Orts.Simulation/Simulation/Confirmer.cs:241 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:238 msgctxt "Horn" msgid "sound" msgstr "" #. Context: Cab -#: ../../Orts.Simulation/Simulation/Confirmer.cs:247 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:244 msgctxt "Cab" msgid "change" msgstr "" #. Context: Odometer -#: ../../Orts.Simulation/Simulation/Confirmer.cs:248 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:245 msgctxt "Odometer" msgid "reset" msgstr "" #. Context: Odometer -#: ../../Orts.Simulation/Simulation/Confirmer.cs:248 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:245 msgctxt "Odometer" msgid "counting down" msgstr "" #. Context: Odometer -#: ../../Orts.Simulation/Simulation/Confirmer.cs:248 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:245 msgctxt "Odometer" msgid "counting up" msgstr "" #. Context: Switch -#: ../../Orts.Simulation/Simulation/Confirmer.cs:259 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:260 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:253 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:254 msgctxt "Switch" msgid "change" msgstr "" -#: ../../Orts.Simulation/Simulation/Container.cs:1052 +#: ../../Orts.Simulation/Simulation/Container.cs:1018 msgid "No suitable position to unload" msgstr "" -#: ../../Orts.Simulation/Simulation/Container.cs:1104 +#: ../../Orts.Simulation/Simulation/Container.cs:1070 msgid "No suitable container to load" msgstr "" -#: ../../Orts.Simulation/Simulation/Container.cs:723 +#: ../../Orts.Simulation/Simulation/Container.cs:689 #, csharp-format msgid "Wagon out of range: move wagon towards crane by {0} metres" msgstr "" -#: ../../Orts.Simulation/Simulation/Simulator.cs:1895 +#: ../../Orts.Simulation/Simulation/Simulator.cs:1893 msgid "Train can't be suspended with speed not equal 0" msgstr "" -#: ../../Orts.Simulation/Simulation/Simulator.cs:2017 +#: ../../Orts.Simulation/Simulation/Simulator.cs:2015 msgid "To return to static train speed must be = 0" msgstr "" #: ../../Orts.Simulation/Simulation/Simulator.cs:940 -#: ../../Orts.Simulation/Simulation/AIs/AITrain.cs:4463 +#: ../../Orts.Simulation/Simulation/AIs/AITrain.cs:4459 #, csharp-format msgid "" "Player train has been included into train {0} service {1}, that automatically " "becomes the new player train" msgstr "" -#: ../../Orts.Simulation/Simulation/Transfertables.cs:277 -#: ../../Orts.Simulation/Simulation/Turntables.cs:627 -msgid "Rotation can't start: check throttle, speed, direction and control mode" +#: ../../Orts.Simulation/Simulation/Transfertables.cs:259 +msgid "Train partially on transfertable, can't transfer" msgstr "" -#: ../../Orts.Simulation/Simulation/Transfertables.cs:296 -msgid "Train partially on transfertable, can't transfer" +#: ../../Orts.Simulation/Simulation/Transfertables.cs:270 +msgid "Transfer can't start: check throttle, speed, direction and control mode" msgstr "" -#: ../../Orts.Simulation/Simulation/Transfertables.cs:327 +#: ../../Orts.Simulation/Simulation/Transfertables.cs:297 msgid "Transfertable starting transferring train" msgstr "" -#: ../../Orts.Simulation/Simulation/Transfertables.cs:396 -#: ../../Orts.Simulation/Simulation/Transfertables.cs:412 +#: ../../Orts.Simulation/Simulation/Transfertables.cs:366 +#: ../../Orts.Simulation/Simulation/Transfertables.cs:382 msgid "Transfertable connected" msgstr "" -#: ../../Orts.Simulation/Simulation/Turntables.cs:213 +#: ../../Orts.Simulation/Simulation/Turntables.cs:205 msgid "turntable" msgstr "" -#: ../../Orts.Simulation/Simulation/Turntables.cs:213 +#: ../../Orts.Simulation/Simulation/Turntables.cs:205 msgid "transfertable" msgstr "" -#: ../../Orts.Simulation/Simulation/Turntables.cs:232 -#: ../../Orts.Simulation/Simulation/Turntables.cs:273 +#: ../../Orts.Simulation/Simulation/Turntables.cs:224 +#: ../../Orts.Simulation/Simulation/Turntables.cs:265 #, csharp-format msgid "Train slipped into non aligned {0}" msgstr "" -#: ../../Orts.Simulation/Simulation/Turntables.cs:239 +#: ../../Orts.Simulation/Simulation/Turntables.cs:231 #, csharp-format msgid "Train front on {0}" msgstr "" -#: ../../Orts.Simulation/Simulation/Turntables.cs:247 +#: ../../Orts.Simulation/Simulation/Turntables.cs:239 #, csharp-format msgid "Train front outside {0}" msgstr "" -#: ../../Orts.Simulation/Simulation/Turntables.cs:280 +#: ../../Orts.Simulation/Simulation/Turntables.cs:272 #, csharp-format msgid "Train rear on {0}" msgstr "" -#: ../../Orts.Simulation/Simulation/Turntables.cs:288 +#: ../../Orts.Simulation/Simulation/Turntables.cs:280 #, csharp-format msgid "Train rear outside {0}" msgstr "" -#: ../../Orts.Simulation/Simulation/Turntables.cs:649 -msgid "Turntable is at its bound, can't rotate" +#: ../../Orts.Simulation/Simulation/Turntables.cs:599 +msgid "Train partially on turntable, can't rotate" msgstr "" -#: ../../Orts.Simulation/Simulation/Turntables.cs:658 -msgid "Train partially on turntable, can't rotate" +#: ../../Orts.Simulation/Simulation/Turntables.cs:610 +msgid "Rotation can't start: check throttle, speed, direction and control mode" msgstr "" -#: ../../Orts.Simulation/Simulation/Turntables.cs:670 +#: ../../Orts.Simulation/Simulation/Turntables.cs:618 msgid "Turntable starting rotation with train" msgstr "" -#: ../../Orts.Simulation/Simulation/Turntables.cs:787 -#: ../../Orts.Simulation/Simulation/Turntables.cs:818 +#: ../../Orts.Simulation/Simulation/Turntables.cs:730 +#: ../../Orts.Simulation/Simulation/Turntables.cs:761 msgid "Turntable forward connected" msgstr "" -#: ../../Orts.Simulation/Simulation/Turntables.cs:800 -#: ../../Orts.Simulation/Simulation/Turntables.cs:831 +#: ../../Orts.Simulation/Simulation/Turntables.cs:743 +#: ../../Orts.Simulation/Simulation/Turntables.cs:774 msgid "Turntable backward connected" msgstr "" -#: ../../Orts.Simulation/Simulation/AIs/AITrain.cs:5023 +#: ../../Orts.Simulation/Simulation/AIs/AITrain.cs:5019 #, csharp-format msgid "" "Join success: Train {0} service {1} has been incorporated into train {2} " "service {3}" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:2009 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:2004 msgid "Coupler broken!" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:2012 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:2007 msgid "Coupler overloaded!" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:2441 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:2436 msgid "" "The steam usage has exceeded the capacity of the steam boiler. Steam boiler " "locked out." msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:6906 -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:6911 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:6961 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:6966 msgid "Other train is blocking path" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:7764 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:7826 msgid "Stopped due to errors in route setting" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:8478 -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:9673 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:8540 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:9729 msgid "No signal in train's path" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:8486 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:8548 msgid "Next signal already allocated to other train" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:8547 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:8609 msgid "Request to clear signal cannot be processed" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:8655 -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:9793 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:8717 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:9849 msgid "No switch found" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10147 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10209 msgid "You cannot enter manual mode when autopiloted" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10152 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10214 msgid "You cannot use this command for pathless trains" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10164 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10226 msgid "Train is not back on original route" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10173 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10235 msgid "" "Original route is reverse from present direction, stop train before switching" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10186 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10255 msgid "Cannot change to Manual Mode while in Explorer Mode" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10191 -msgid "" -"Cannot change to Manual Mode. Use the Reset Out Of Control Mode command to " -"release brakes" -msgstr "" - -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10280 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10344 msgid "Reversal required and rear of train not on required route" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10554 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10618 msgid "Cannot clear signal behind train while in AUTO mode" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10786 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10850 msgid "Out of control mode reset" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10791 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10855 msgid "" "You can only reset if you passed a signal at danger or if you passed a " "misaligned switch." msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:16396 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:16398 msgid "Car " msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:16468 -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:16473 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:16472 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:16477 msgid "Locomotive " msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:2389 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:2384 #, csharp-format msgid "Carriage {0} temperature is too cold, the passengers are freezing." msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:2393 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:2388 #, csharp-format msgid "Car {0} temperature is too cold for the freight." msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:11084 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:11148 #, csharp-format msgid "Train stopped due to problems with other train: train {0} , reason: {1}" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSControlTrailerCar.cs:206 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:930 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:958 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6247 -msgid "Gear" -msgstr "" - -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSControlTrailerCar.cs:237 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSControlTrailerCar.cs:268 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:4074 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:4136 -msgid "Throttle must be reduced to Idle before gear change can happen." -msgstr "" - -#. Context: Gear -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSControlTrailerCar.cs:207 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:931 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6248 -msgctxt "Gear" -msgid "N" +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:925 +msgid "Engine" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:927 -msgid "Engine" +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:928 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:956 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5955 +msgid "Gear" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:934 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:349 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:932 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:348 msgid "Battery switch" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:935 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:938 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:944 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:350 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:353 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:359 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6502 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:933 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:936 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:942 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:349 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:352 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:358 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6210 msgid "On" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:935 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:938 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:944 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:350 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:353 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:359 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6502 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:933 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:936 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:942 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:349 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:352 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:358 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6210 msgid "Off" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:943 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:358 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:941 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:357 msgid "Electric train supply" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:958 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:956 msgid "N" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:961 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1213 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:959 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1211 msgid "Fuel" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:970 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:380 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6537 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:968 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:379 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6245 msgid "StHeat:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:971 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:981 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:381 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:391 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6538 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6546 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6933 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6948 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:969 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:979 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:380 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:390 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6246 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6254 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6633 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6648 msgid "Press" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:973 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:383 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6540 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:971 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:382 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6248 msgid "StTemp" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:975 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:385 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6542 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:973 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:384 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6250 msgid "StUse" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:978 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:388 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:976 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:387 msgid "WaterLvl" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:980 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:390 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6545 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:978 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:389 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6253 msgid "Last:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:983 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:393 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6548 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:981 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:392 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6256 msgid "Temp" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:985 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:395 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6550 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:983 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:394 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6258 msgid "OutTemp" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:987 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:397 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6552 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:985 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:396 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6260 msgid "NetHt" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1019 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1063 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1017 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1061 msgid "Setup" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1028 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1026 msgid "(flipped)" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1029 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1134 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1138 -#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2145 -#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2161 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1027 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1132 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1136 +#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2186 +#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2202 msgid "Sync" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1029 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1134 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1138 -#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2145 -#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2161 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1027 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1132 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1136 +#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2186 +#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2202 msgid "Async" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1125 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1226 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:130 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:138 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1123 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1224 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:131 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:139 #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SingleTransferPipe.cs:75 #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SingleTransferPipe.cs:79 #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SingleTransferPipe.cs:97 @@ -1592,1140 +1554,1080 @@ msgstr "" msgid "BP" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1125 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:140 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1123 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:141 #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SingleTransferPipe.cs:90 #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SingleTransferPipe.cs:99 #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/VacuumSinglePipe.cs:139 msgid "EOT" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1143 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:136 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1141 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:137 #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/VacuumSinglePipe.cs:129 msgid "EQ" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1143 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1236 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:129 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:137 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/EPBrakeSystem.cs:141 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SMEBrakeSystem.cs:101 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1141 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1234 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:130 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:138 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/EPBrakeSystem.cs:82 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SMEBrakeSystem.cs:85 msgid "BC" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1209 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1223 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1207 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1221 msgid "ID" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1212 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1229 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1234 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1210 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1227 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1232 msgid "Remote" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1214 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1212 msgid "Tractive Effort" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1225 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:405 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:436 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1223 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:404 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:435 msgid "Load" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1235 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1233 msgid "ER" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1237 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1235 msgid "MR" msgstr "" +#. Context: Gear +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:929 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5956 +msgctxt "Gear" +msgid "N" +msgstr "" + #. Context: PowerSupply -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:947 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:362 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:945 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:361 msgctxt "PowerSupply" msgid "Power" msgstr "" #. Context: Notch -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:999 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1043 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:997 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1041 msgctxt "Notch" msgid "N" msgstr "" #. Context: Notch -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1007 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1015 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1051 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1059 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1005 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1013 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1049 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1057 msgctxt "Notch" msgid "B" msgstr "" #. Context: Notch -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1021 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1065 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1019 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1063 msgctxt "Notch" msgid "Idle" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:344 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:343 msgid "Pantographs" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:371 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:370 msgid "TCS" msgstr "" +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:370 #: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:371 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:372 msgid "OK" msgstr "" +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:370 #: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:371 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:372 msgid "NOT OK" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:372 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:371 msgid "Driver" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:373 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:372 msgid "Auxiliary power" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:2927 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:2766 msgid "No water scoop on this loco" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:2934 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:2773 msgid "Scoop is broken, can't refill" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:2941 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:2780 msgid "Scoop is broken by junction track" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:2951 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:2790 msgid "Scoop is not over trough, can't refill" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:3307 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:3155 msgid "Sand supply has been exhausted" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:2962 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:3590 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:3651 +msgid "Throttle must be reduced to Idle before gear change can happen." +msgstr "" + +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:2801 msgid "Refill: Loco must be moving forward." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:2971 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:2810 #, csharp-format msgid "Refill: Loco speed must exceed {0} for water to enter tender." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:2981 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:2820 msgid "Refill: Water supply now replenished." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:2712 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:2349 msgid "Tender coal supply is empty. Your loco will fail." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:2809 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:2446 msgid "Tender water supply is empty. Your loco will fail." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:2935 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:2572 msgid "Fire has dropped too far. Your loco will fail." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:3017 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:2654 msgid "" "FireMass is getting low. Your fireman will shovel faster, but don't wear him " "out." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:3029 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:2666 msgid "FireMass is back within limits. Your fireman will shovel as per normal." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:3502 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:3139 msgid "Grate limit exceeded - boiler heat rate cannot increase." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:3510 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:3147 msgid "Grate limit return to normal." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5612 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5320 msgid "Water level dropped too far. Plug has fused and loco has failed." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5619 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5327 msgid "Boiler overfull and priming." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5625 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5333 msgid "Boiler no longer priming." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6245 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5953 msgid "Fixed gear" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6249 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5957 msgid "Steam usage" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6250 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5958 msgid "Boiler pressure" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6251 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5959 msgid "Boiler water glass" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6251 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5959 msgid "(safe range)" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6255 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5963 msgid "Boiler water level" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6255 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5963 msgid "(absolute)" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6257 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5965 msgid "Fire mass" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6259 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5967 msgid "Fire Heat Loss" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6262 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5970 msgid "Fuel levels" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6262 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5970 msgid "coal" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6262 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5970 msgid "water" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6271 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5979 msgid "Key Inputs" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6273 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5981 msgid "Locomotive Type:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6277 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5985 msgid "Input:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6278 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5986 msgid "Evap" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6279 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5987 msgid "Grate" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6280 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5988 msgid "Boiler" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6281 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5989 msgid "SuperHr" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6282 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5990 msgid "FuelCal" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6290 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5998 msgid "Adj:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6291 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5999 msgid "CylEff" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6293 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6001 msgid "PortOpen" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6297 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6005 msgid "Steam Production" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6302 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6010 msgid "Boiler:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6304 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6012 msgid "Mass" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6305 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6013 msgid "MaxOutp" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6306 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6014 msgid "BoilerEff" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6314 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6022 msgid "Heat:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6315 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6023 msgid "In" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6317 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6964 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6025 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6664 msgid "Out" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6319 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6027 msgid "Rad" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6321 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6029 msgid "Stored" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6323 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6617 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6031 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6325 msgid "Max" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6325 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6495 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6033 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6203 msgid "Safety" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6327 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6035 msgid "Raw" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6332 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6040 msgid "Temp:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6333 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6041 msgid "Flue" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6335 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6658 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6043 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6366 msgid "Water" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6337 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6045 msgid "MaxSupH" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6339 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6047 msgid "CurSupH" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6343 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6051 msgid "Steam Usage" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6351 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6378 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6059 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6086 msgid "Usage:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6352 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6379 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6060 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6087 msgid "Cyl" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6356 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6064 msgid "Comprsr" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6358 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6385 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6066 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6093 msgid "SafetyV" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6360 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6387 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6068 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6095 msgid "CylCock" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6362 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6389 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6070 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6097 msgid "Genertr" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6364 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6391 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6676 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6072 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6099 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6384 msgid "Stoker" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6366 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6393 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6074 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6101 msgid "BlowD" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6368 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6395 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6076 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6103 msgid "MaxSafe" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6383 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6091 msgid "Ejector" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6406 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6114 msgid "CylValve:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6407 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6115 msgid "Travel" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6409 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6427 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6447 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6462 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6482 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6117 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6135 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6155 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6170 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6190 msgid "Cutoff" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6411 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6119 msgid "Lead" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6413 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6121 msgid "ExhLap" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6415 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6123 msgid "StLap" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6417 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6125 msgid "AdvAng" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6426 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6134 msgid "CylEvts:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6429 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6137 msgid "CylExh" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6431 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6139 msgid "CylComp" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6433 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6141 msgid "CyAdmis" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6442 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6150 msgid "PressHP:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6443 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6478 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6151 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6186 msgid "Chest" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6445 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6460 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6480 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6153 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6168 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6188 msgid "Initial" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6449 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6464 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6484 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6157 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6172 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6192 msgid "Rel" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6451 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6466 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6486 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6159 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6174 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6194 msgid "Back" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6453 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6468 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6488 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6161 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6176 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6196 msgid "MEP" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6459 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6167 msgid "PressLP:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6477 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6185 msgid "Press:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6494 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6669 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6202 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6377 msgid "Status:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6496 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:162 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SingleTransferPipe.cs:142 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SMEBrakeSystem.cs:95 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/VacuumSinglePipe.cs:163 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/VacuumSinglePipe.cs:183 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6204 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:167 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:185 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SingleTransferPipe.cs:141 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/VacuumSinglePipe.cs:162 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/VacuumSinglePipe.cs:181 msgid "Open" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6496 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6204 msgid "Closed" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6497 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6205 msgid "Plug" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6498 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6500 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6671 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6673 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6675 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6677 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6679 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6681 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6683 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6685 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6687 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6702 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6717 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6747 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6762 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6796 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6814 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6816 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6818 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6820 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6941 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6956 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6969 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6990 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6992 -#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2144 -#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2159 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6206 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6208 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6379 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6381 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6383 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6385 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6387 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6389 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6391 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6393 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6395 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6410 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6425 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6455 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6470 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6508 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6641 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6656 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6669 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6690 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6692 +#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2185 +#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2200 msgid "Yes" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6498 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6500 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6671 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6673 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6675 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6677 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6679 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6681 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6683 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6685 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6687 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6702 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6717 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6747 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6762 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6796 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6814 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6816 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6818 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6820 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6941 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6956 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6969 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6990 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6992 -#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2144 -#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2159 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6206 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6208 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6379 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6381 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6383 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6385 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6387 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6389 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6391 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6393 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6395 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6410 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6425 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6455 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6470 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6508 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6641 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6656 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6669 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6690 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6692 +#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2185 +#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2200 msgid "No" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6499 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6207 msgid "Prime" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6501 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6209 msgid "Comp" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6556 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6264 msgid "Fireman" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6558 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6266 msgid "Fire:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6559 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6267 msgid "Ideal" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6561 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6269 msgid "Actual" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6563 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6271 msgid "MaxFireR" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6565 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6273 msgid "FeedRate" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6567 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6275 msgid "BurnRate" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6569 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6277 msgid "Combust" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6573 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6680 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6281 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6388 msgid "GrLimit" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6577 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6285 msgid "MaxBurn" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6616 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6324 msgid "Injector:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6618 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6326 msgid "Inj1" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6619 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6327 msgid "Temp1" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6620 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6328 msgid "Inj2" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6621 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6329 msgid "Temp2" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6634 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6654 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6342 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6362 msgid "Tender:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6635 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6655 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6343 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6363 msgid "Coal" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6638 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6346 msgid "Water(C)" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6641 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6349 msgid "Water(T)" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6643 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6351 msgid "Water(A)" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6645 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6661 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6353 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6369 msgid "Steam" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6647 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6663 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6355 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6371 msgid "TotSteam" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6670 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6378 msgid "CoalOut" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6672 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6380 msgid "WaterOut" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6674 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6382 msgid "FireOut" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6678 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6386 msgid "Boost" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6682 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6390 msgid "FireOn" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6684 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6392 msgid "FireOff" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6686 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6394 msgid "AIOR" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6692 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6737 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6400 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6445 msgid "Performance" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6694 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6739 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6402 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6447 msgid "Power:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6695 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6740 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6403 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6448 msgid "MaxInd" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6697 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6742 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6405 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6450 msgid "Ind" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6699 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6744 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6407 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6452 msgid "Drawbar" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6701 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6746 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6409 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6454 msgid "BlrLmt" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6705 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6750 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6413 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6458 msgid "Force:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6706 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6751 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6414 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6459 msgid "TheorTE" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6708 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6753 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6416 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6461 msgid "StartTE" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6710 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6755 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6418 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6463 msgid "TE" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6712 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6757 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6420 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6465 msgid "Draw" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6714 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6759 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6422 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6467 msgid "CritSpeed" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6716 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6761 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6424 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6469 msgid "SpdLmt" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6720 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6765 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6428 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6473 msgid "Move:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6721 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6766 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6429 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6474 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6497 msgid "Piston" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6723 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6768 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6431 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6476 msgid "DrvWhl" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6725 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6770 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6433 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6478 msgid "MF-Gear" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6730 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6775 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6438 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6483 msgid "Max-SpdF" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6784 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6492 msgid "Slip Monitor" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6786 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6494 msgid "Slip:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6787 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6495 msgid "MForceN" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6789 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6878 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6892 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6499 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6576 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6590 +msgid "Tang(c)" +msgstr "" + +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6501 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6578 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6592 msgid "Tang(t)" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6791 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6880 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6894 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6503 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6580 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6594 msgid "Static" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6793 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6505 msgid "Coeff" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6795 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6507 msgid "Slip" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6797 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6509 msgid "WheelM" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6799 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6511 msgid "FoA" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6803 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6515 msgid "Sand:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6804 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6516 msgid "S/Use" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6806 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6518 msgid "S/Box" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6808 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6520 msgid "M/Press" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6812 -msgid "CylE:" -msgstr "" - -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6813 -msgid "#1" -msgstr "" - -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6815 -msgid "#2" -msgstr "" - -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6817 -msgid "#3" -msgstr "" - -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6819 -msgid "#4" -msgstr "" - -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6869 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6569 msgid "Slip Debug" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6871 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6571 msgid "Start:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6872 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6886 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6572 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6586 msgid "CyPressL" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6874 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6888 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6574 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6588 msgid "CyPressR" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6876 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6890 -msgid "Tang(c)" -msgstr "" - -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6885 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6585 msgid "Speed:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6899 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6599 msgid "Wheel:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6900 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6600 msgid "TangSp" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6910 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6610 msgid "Sound Variables" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6912 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6612 msgid "V1:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6914 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6614 msgid "V2:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6916 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6616 msgid "V3:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6927 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6627 msgid "Ejector / Vacuum Pump" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6932 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6632 msgid "Large:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6935 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6950 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6635 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6650 msgid "StCons" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6938 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6953 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6966 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6638 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6653 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6666 msgid "Rate" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6940 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6640 msgid "Lg Ej" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6947 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6647 msgid "Small:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6955 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6655 msgid "Sm Ej" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6963 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6663 msgid "Vac:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6968 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6668 msgid "Pump" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6974 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6674 msgid "Leak:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6976 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6676 msgid "Net:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6988 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6688 msgid "Fill:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6989 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6689 msgid "ScDwn" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6991 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6691 msgid "ScBrk" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6993 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6693 msgid "Min" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6995 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6695 msgid "WaVel" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6997 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6697 msgid "Drag" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6999 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6699 msgid "WaterU" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:7001 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6701 msgid "Input" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:7003 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6703 msgid "Total" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:7117 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:7195 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6817 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6895 msgid "Gears can't be changed unless throttle is at zero." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:7855 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:7555 msgid "AI Fireman has started adding fuel to fire" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:7862 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:7562 msgid "AI Fireman has stopped adding fuel to fire" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:7869 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:7569 msgid "AI Fireman has been reset" msgstr "" #. Context: HUD -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6303 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:404 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:423 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:431 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6011 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:403 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:422 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:430 msgctxt "HUD" msgid "Power" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:1980 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:1993 msgid "Starting unload" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:3994 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4051 msgid "Incompatible data" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4009 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4066 msgid "Starting refill" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4018 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4065 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4075 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4122 msgid "Preparing for unload" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4038 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4095 msgid "Container station busy with preceding mission" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4045 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4102 msgid "No containers to load" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4049 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4106 msgid "Starting load" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4059 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4116 msgid "Container station full, can't unload" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:1939 +#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:1980 msgid "" "You were travelling too fast for this curve, and have snapped a brake hose on " "Car " msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:1627 +#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:1668 #, csharp-format msgid "Car {0} has derailed on the curve." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:1901 +#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:1942 #, csharp-format msgid "" "You are travelling too fast for this curve. Slow down, your freight car {0} " "may be damaged. The recommended speed for this curve is {1}" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:1905 +#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:1946 #, csharp-format msgid "" "You are travelling too fast for this curve. Slow down, your passengers in car " "{0} are feeling uncomfortable. The recommended speed for this curve is {1}" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/CruiseControl.cs:710 -msgid "Speed selector mode changed to" -msgstr "" - -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/CruiseControl.cs:1110 -msgid "Number of axles increased to " -msgstr "" - -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/CruiseControl.cs:1122 -msgid "Number of axles decreased to " -msgstr "" - -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/CruiseControl.cs:1153 -msgid "Selected speed set to " -msgstr "" - -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/CruiseControl.cs:650 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/CruiseControl.cs:690 -#, csharp-format -msgid "Speed regulator mode changed to {0}" -msgstr "" - -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/CruiseControl.cs:731 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/CruiseControl.cs:754 -#, csharp-format -msgid "Speed selector mode changed to {0}" -msgstr "" - -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/CruiseControl.cs:989 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/CruiseControl.cs:1051 -#, csharp-format -msgid "Selected speed changed to {0} mph" -msgstr "" - -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/CruiseControl.cs:991 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/CruiseControl.cs:1053 -#, csharp-format -msgid "Selected speed changed to {0} km/h" -msgstr "" - -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/CruiseControl.cs:1095 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/CruiseControl.cs:1097 -#, csharp-format -msgid "Selected speed changed to {0}" -msgstr "" - #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/ManualBraking.cs:233 #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/ManualBraking.cs:240 msgid "Manual Brake" @@ -2740,45 +2642,45 @@ msgstr "" msgid "Lead BP" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/CircuitBreaker.cs:384 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/CircuitBreaker.cs:413 msgid "Circuit breaker closing not authorized" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:403 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:417 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:402 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:416 msgid "Status" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:406 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:405 msgid "RPM" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:407 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:454 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:406 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:453 msgid "Flow" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:408 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:407 msgid "Temperature" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:409 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:408 msgid "Oil Pressure" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:423 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:422 msgid " " msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:462 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:461 msgid "Oil" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:1271 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:1256 msgid "Diesel Engine has stalled due to underspeed." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:1290 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:1275 msgid "Diesel Engine has stalled due to overspeed." msgstr "" @@ -2786,47 +2688,47 @@ msgstr "" msgid "Pantograph raised even though this route is not electrified" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/TractionCutOffRelay.cs:382 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/TractionCutOffRelay.cs:411 msgid "Traction cut-off relay closing not authorized" msgstr "" -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10522 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10409 msgid "Held for connecting train : " msgstr "" -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10530 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10417 msgid "Waiting for train to attach : " msgstr "" -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10546 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10433 msgid "Waiting for transfer with train : " msgstr "" -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10561 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10448 msgid "Waiting for train to arrive : " msgstr "" -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10616 -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10647 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10503 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10534 msgid ", backward" msgstr "" -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10631 -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10647 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10518 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10534 msgid ", forward" msgstr "" -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10640 -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10648 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10527 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10535 msgid "Train is ready to attach to : " msgstr "" -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10703 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10590 msgid "Passenger detraining completed. Train terminated." msgstr "" -#: ../../Orts.Simulation/Simulation/Timetables/TTTurntable.cs:1934 -#: ../../Orts.Simulation/Simulation/Timetables/TTTurntable.cs:1983 +#: ../../Orts.Simulation/Simulation/Timetables/TTTurntable.cs:1788 +#: ../../Orts.Simulation/Simulation/Timetables/TTTurntable.cs:1829 #, csharp-format msgid "Turntable is ready for access - allowed speed set to {0}" msgstr "" diff --git a/Source/Locales/RunActivity/RunActivity.pot b/Source/Locales/RunActivity/RunActivity.pot index 476d72f5ab..7c5c13115b 100644 --- a/Source/Locales/RunActivity/RunActivity.pot +++ b/Source/Locales/RunActivity/RunActivity.pot @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2023-08-25 09:18:12+0200\n" -"PO-Revision-Date: 2023-08-25 09:18:13+0200\n" +"POT-Creation-Date: 2022-08-17 02:43:31+0200\n" +"PO-Revision-Date: 2022-08-17 02:43:31+0200\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -75,345 +75,127 @@ msgid_plural "{0:F0} tiles" msgstr[0] "" msgstr[1] "" -#: ../../RunActivity/Viewer3D/Viewer.cs:830 -#: ../../RunActivity/Viewer3D/Viewer.cs:1018 +#: ../../RunActivity/Viewer3D/Viewer.cs:829 +#: ../../RunActivity/Viewer3D/Viewer.cs:1017 msgid "Cab view not available" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:915 +#: ../../RunActivity/Viewer3D/Viewer.cs:914 msgid "In MP, use Alt-F4 to quit directly" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:947 +#: ../../RunActivity/Viewer3D/Viewer.cs:946 msgid "Automatic platform and siding labels visible." msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:950 +#: ../../RunActivity/Viewer3D/Viewer.cs:949 msgid "Platform and siding labels visible." msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:953 +#: ../../RunActivity/Viewer3D/Viewer.cs:952 msgid "Platform labels visible." msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:956 +#: ../../RunActivity/Viewer3D/Viewer.cs:955 msgid "Siding labels visible." msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:962 +#: ../../RunActivity/Viewer3D/Viewer.cs:961 msgid "Platform and siding labels hidden." msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:973 +#: ../../RunActivity/Viewer3D/Viewer.cs:972 msgid "Train labels visible." msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:976 +#: ../../RunActivity/Viewer3D/Viewer.cs:975 msgid "Car labels visible." msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:982 +#: ../../RunActivity/Viewer3D/Viewer.cs:981 msgid "Train and car labels hidden." msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1025 +#: ../../RunActivity/Viewer3D/Viewer.cs:1024 msgid "This car doesn't have a 2D cab" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1029 +#: ../../RunActivity/Viewer3D/Viewer.cs:1028 msgid "This car doesn't have a 3D cab" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1074 -msgid "messages suppressed" +#: ../../RunActivity/Viewer3D/Viewer.cs:1059 +msgid "Confirmations suppressed" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1078 -msgid "All messages visible" +#: ../../RunActivity/Viewer3D/Viewer.cs:1061 +msgid "Confirmations visible" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1231 +#: ../../RunActivity/Viewer3D/Viewer.cs:1210 msgid "Switched to player control" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1238 +#: ../../RunActivity/Viewer3D/Viewer.cs:1217 msgid "You can't switch from manual to autopilot mode" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1244 +#: ../../RunActivity/Viewer3D/Viewer.cs:1223 msgid "Switched to autopilot" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1919 +#: ../../RunActivity/Viewer3D/Viewer.cs:1896 msgid "Game saved" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:349 +#: ../../RunActivity/Viewer3D/Viewer.cs:348 #, csharp-format msgid "Allowed speed raised to {0}" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1051 +#: ../../RunActivity/Viewer3D/Viewer.cs:1050 #, csharp-format msgid "Vibrating at level {0}" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1262 +#: ../../RunActivity/Viewer3D/Viewer.cs:1241 #, csharp-format msgid "Keyboard map list saved to '{0}'." msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1266 +#: ../../RunActivity/Viewer3D/Viewer.cs:1245 #, csharp-format msgid "Keyboard map image saved to '{0}'." msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1117 +#: ../../RunActivity/Viewer3D/Viewer.cs:1097 #, csharp-format msgid "{0} viewpoint stored. Use Shift+8 to restore viewpoints." msgid_plural "{0} viewpoints stored. Use Shift+8 to restore viewpoints." msgstr[0] "" msgstr[1] "" -#: ../../RunActivity/Viewer3D/Weather.cs:144 +#: ../../RunActivity/Viewer3D/Weather.cs:145 msgid "" "Restoring wrong weather type : trying to restore dynamic weather but save " "contains user controlled weather" msgstr "" -#: ../../RunActivity/Viewer3D/Weather.cs:1640 +#: ../../RunActivity/Viewer3D/Weather.cs:1642 msgid "" "Restoring wrong weather type : trying to restore user controlled weather but " "save contains dynamic weather" msgstr "" -#: ../../RunActivity/Viewer3D/Weather.cs:494 -#, csharp-format -msgid "Increased daylight offset to {0} h" -msgstr "" - -#: ../../RunActivity/Viewer3D/Weather.cs:499 -#, csharp-format -msgid "Decreased daylight offset to {0} h" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs:1484 -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.cs:1918 +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.cs:2004 msgid "Switching Request Sent to the Server" msgstr "" -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:155 -msgid "Learn more" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:167 -msgid "You are the dispatcher in this multiplayer session" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:257 -msgid "Message all players" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:271 -msgid ">" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:291 -msgid "Messages:" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:318 -msgid "Simulation time" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:331 -msgid "Map customization" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:366 -msgid "All trains" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:378 -msgid "Only active trains" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:388 -msgid "Train state" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:398 -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:572 -msgid "Train labels" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:408 -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:556 -msgid "Signal state" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:418 -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:543 -msgid "Signals" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:428 -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:673 -msgid "Switches" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:438 -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:530 -msgid "Siding labels" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:448 -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:517 -msgid "Platform labels" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:458 -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:793 -msgid "Platforms" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:469 -msgid "Map features" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:478 -msgid "Rotate between themes" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:491 -msgid "Show simulation time" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:501 -msgid "Use anti-aliasing" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:566 -msgid "Multiplayer settings" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:577 -msgid "Penalty for speeding && SPAD" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:589 -msgid "Prefer green (?)" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:601 -msgid "Allow new players to join" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:631 -msgid "Map settings and controls" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:641 -msgid "Follow my train on the map" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:651 -msgid "Jump to my train on the map" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:663 -msgid "Jump to my train in game" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:674 -msgid "Map resolution (m):" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:715 -msgid "Allow throwing switches" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:727 -msgid "Allow changing signals" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:739 -msgid "Draw next path section" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:766 -msgid "Players" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:807 -msgid "Message the selected player" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:815 -msgid "Reply to the selected player" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:833 -msgid "Make this player an assistant" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:840 -msgid "Jump to this player in game" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:847 -msgid "Follow on the map" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:854 -msgid "Kick from multiplayer session" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:872 -msgid "Set switch to..." -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:881 -msgid "Main route" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:889 -msgid "Side route" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:911 -msgid "Set signal aspect to..." -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:918 -msgid "System controlled" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:927 -msgid "Stop" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:935 -msgid "Approach" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:944 -msgid "Proceed" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:957 -msgid "Allow call on" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:967 -msgid "Map window" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.cs:555 +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.cs:580 msgid "MSG to Server" msgstr "" -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.cs:559 +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.cs:584 #: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:256 msgid "MSG to All" msgstr "" @@ -476,11 +258,11 @@ msgid "Assist" msgstr "" #: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:417 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1226 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1275 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1341 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:719 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:767 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1195 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1244 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1310 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:718 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:766 msgid "Normal" msgstr "" @@ -512,6 +294,26 @@ msgstr "" msgid "Show:" msgstr "" +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:517 +msgid "Platform labels" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:530 +msgid "Siding labels" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:543 +msgid "Signals" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:556 +msgid "Signal state" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:572 +msgid "Train labels" +msgstr "" + #: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:583 msgid "Key" msgstr "" @@ -532,6 +334,10 @@ msgstr "" msgid "Background color" msgstr "" +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:673 +msgid "Switches" +msgstr "" + #: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:685 msgid "To pan, drag with left mouse." msgstr "" @@ -565,6 +371,10 @@ msgstr "" msgid "To zoom out of a location, press Alt and click the left mouse." msgstr "" +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:793 +msgid "Platforms" +msgstr "" + #: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:852 msgid "Map Window" msgstr "" @@ -613,14 +423,14 @@ msgid "3D" msgstr "" #: ../../RunActivity/Viewer3D/Debugging/SoundDebugForm.Designer.cs:284 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:431 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:629 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1193 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:148 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:671 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:430 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:615 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1182 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:146 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:668 #: ../../RunActivity/Viewer3D/WebServices/TrackMonitorDisplay.cs:291 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:110 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:231 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:109 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:230 msgid "Speed" msgstr "" @@ -637,8 +447,8 @@ msgid "Variable 1" msgstr "" #: ../../RunActivity/Viewer3D/Debugging/SoundDebugForm.Designer.cs:351 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1199 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1201 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1188 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1190 #: ../../RunActivity/Viewer3D/Popups/NextStationWindow.cs:78 msgid "Distance" msgstr "" @@ -896,11 +706,11 @@ msgstr "" msgid "Can't attach EOT if player train not stopped" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/EOTListWindow.cs:111 +#: ../../RunActivity/Viewer3D/Popups/EOTListWindow.cs:110 msgid "Player train already has a mounted EOT" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/EOTListWindow.cs:124 +#: ../../RunActivity/Viewer3D/Popups/EOTListWindow.cs:122 msgid "Can't mount an EOT if another one is mounted" msgstr "" @@ -1028,8 +838,8 @@ msgid "- Missed station stops: " msgstr "" #: ../../RunActivity/Viewer3D/Popups/HelpWindow.cs:416 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:980 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1137 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:963 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1126 msgid " " msgstr "" @@ -1108,981 +918,962 @@ msgid_plural "{0} minutes" msgstr[0] "" msgstr[1] "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:106 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:434 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:615 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:628 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:105 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:433 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:601 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:614 #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:146 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:151 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:148 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:85 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:112 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:111 msgid "Throttle" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:107 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:106 msgid "Power In/Out" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:111 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:110 msgid "Motive force" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:113 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:112 msgid "Num of substeps" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:116 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1347 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:115 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1336 msgid "Memory" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:117 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:116 msgid "GCs" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:118 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:117 msgid "Frame time" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:119 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1361 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:118 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1350 msgid "Render process" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:120 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1362 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:119 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1351 msgid "Updater process" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:121 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1363 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:120 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1352 msgid "Loader process" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:122 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1364 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:121 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1353 msgid "Sound process" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:420 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:419 msgid "Version" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:424 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:426 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:423 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:425 #: ../../RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs:158 #: ../../RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs:164 #: ../../RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs:332 #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:147 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:152 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:648 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:149 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:645 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:86 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:113 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:208 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:112 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:207 msgid "Time" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:429 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:144 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:655 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:106 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:215 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:428 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:142 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:652 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:105 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:214 msgid "Replay" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:432 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1132 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:136 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:689 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:431 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1121 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:135 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:686 #: ../../RunActivity/Viewer3D/WebServices/TrackMonitorDisplay.cs:322 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:100 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:249 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:99 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:248 msgid "Gradient" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:433 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:613 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:625 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:125 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:432 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:599 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:611 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:124 #: ../../RunActivity/Viewer3D/WebServices/TrackMonitorDisplay.cs:332 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:90 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:89 msgid "Direction" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:434 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:615 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:143 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:105 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:433 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:601 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:141 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:104 msgid "Regulator" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:438 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:154 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:826 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:883 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:917 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:115 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:384 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:429 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:463 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:437 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:151 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:823 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:880 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:914 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:114 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:383 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:428 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:462 msgid "Train brake" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:440 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:145 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:934 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:107 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:480 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:439 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:143 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:931 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:106 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:479 msgid "Retainers" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:442 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:130 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:943 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:958 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:94 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:489 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:504 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:441 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:129 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:940 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:955 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:93 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:488 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:503 msgid "Engine brake" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:444 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:443 msgid "Brakemen brake" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:446 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:616 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:128 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:969 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:978 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:92 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:515 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:523 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:445 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:602 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:127 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:966 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:975 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:91 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:514 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:522 msgid "Dynamic brake" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:462 -msgid "Cruise control status" -msgstr "" - -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:465 -msgid "Speed target" -msgstr "" - -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:466 -msgid "Max acceleration" -msgstr "" - -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:470 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:459 msgid "Multiple Units" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:472 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1147 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:640 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:461 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1116 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:639 msgid "FPS" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:476 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:465 #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:117 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1157 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:83 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:650 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1126 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:82 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:649 msgid "Autopilot" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:479 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1078 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:468 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1068 msgid "Wheel slip" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:481 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:470 msgid "Wheel slip warning" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:484 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:473 msgid "Wheel skid" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:490 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:479 msgid "Sander blocked" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:492 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:481 msgid "Sander on" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:503 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1358 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:783 -msgid "Left" +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:494 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:126 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1331 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1345 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:90 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:786 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:800 +msgid "Doors open" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:505 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1360 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:785 -msgid "Right" +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:500 +msgid "MultiPlayerStatus: " msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:508 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:127 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1364 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1378 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:91 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:789 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:803 -msgid "Doors open" -msgstr "" - -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:514 -msgid "MultiPlayerStatus: " -msgstr "" - -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:515 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:501 #: ../../RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs:344 msgid "Dispatcher" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:516 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:502 #: ../../RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs:345 msgid "Helper" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:517 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:503 #: ../../RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs:346 msgid "Client" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:526 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:512 msgid "CONSIST INFORMATION" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:538 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:524 msgid "Player" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:539 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:525 msgid "Tilted" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:540 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:562 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:683 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:918 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:938 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:969 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1000 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1030 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:526 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:548 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:669 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:904 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:923 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:953 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:983 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1012 msgid "Type" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:541 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:563 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:527 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:549 msgid "Length" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:542 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:564 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:528 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:550 msgid "Weight" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:543 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:529 msgid "Tonnage" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:544 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:530 msgid "Control Mode" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:545 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:531 msgid "Out of Control" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:546 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:532 msgid "Cab Aspect" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:549 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:572 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1164 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1343 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:535 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:558 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1153 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1332 #: ../../RunActivity/Viewer3D/RollingStock/SubSystems/ETCS/DataEntry.cs:460 #: ../../RunActivity/Viewer3D/RollingStock/SubSystems/ETCS/DataEntry.cs:485 msgid "Yes" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:549 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:572 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1164 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1343 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:535 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:558 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1153 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1332 msgid "No" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:550 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:573 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:536 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:559 msgid "Freight" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:550 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:573 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:536 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:559 msgid "Pass" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:560 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:917 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:937 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:968 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:999 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1029 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1119 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:546 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:903 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:922 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:952 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:982 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1011 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1108 msgid "Car" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:561 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:626 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1166 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:547 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:612 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1155 msgid "Flipped" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:565 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:551 msgid "Drv/Cabs" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:566 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:552 msgid "Wheels" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:567 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:553 msgid "Temp" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:607 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:593 msgid "LOCOMOTIVE INFORMATION" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:620 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:804 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:813 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:815 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:819 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:828 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:830 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:838 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:840 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:875 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:905 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:606 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:790 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:799 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:801 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:805 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:814 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:816 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:824 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:826 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:861 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:891 msgid "off" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:621 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:802 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:811 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:826 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:836 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:863 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:871 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:607 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:788 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:797 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:812 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:822 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:849 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:857 msgid "PlayerLoco" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:624 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:892 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:899 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:610 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:878 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:885 msgid "Loco" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:627 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:613 msgid "MU'd" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:631 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:695 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:617 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:681 #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:140 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:142 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:140 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:79 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:104 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:103 msgid "Power" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:632 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:618 msgid "Force" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:642 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:628 msgid "DISTRIBUTED POWER INFORMATION" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:676 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:662 msgid "POWER SUPPLY INFORMATION" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:682 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:668 msgid "Wagon" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:688 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:674 msgid "MainPS" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:689 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:675 msgid "AuxPS" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:690 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:676 msgid "Battery" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:691 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:677 msgid "LowVoltPS" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:692 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:678 msgid "CabPS" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:693 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:679 msgid "ETS" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:694 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:680 msgid "ETSCable" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:721 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:734 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:749 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:758 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:707 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:720 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:735 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:744 msgid "connected" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:721 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:734 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:749 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:758 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:707 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:720 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:735 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:744 msgid "disconnected" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:786 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:772 msgid "BRAKE INFORMATION" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:803 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:789 msgid "Exhauster" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:804 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:813 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:815 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:819 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:828 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:830 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:838 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:840 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:875 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:905 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:790 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:799 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:801 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:805 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:814 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:816 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:824 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:826 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:861 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:891 msgid "on" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:812 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:827 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:837 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:798 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:813 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:823 msgid "Large Ejector" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:814 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:839 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:800 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:825 msgid "Small Ejector" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:816 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:841 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:802 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:827 msgid "Pressure" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:818 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:829 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:804 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:815 msgid "Vacuum Pump" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:847 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:833 msgid "Brake Sys Vol" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:848 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:834 msgid "Train Pipe" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:850 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:836 msgid "Brake Cyl" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:852 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:838 msgid "Air Vol" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:864 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:850 msgid "No compressor or reservoir fitted" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:872 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:902 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:858 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:888 msgid "Main reservoir" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:874 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:904 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:860 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:890 msgid "Compressor" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:919 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:939 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1001 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1031 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:905 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:924 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:984 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1013 msgid "BrkCyl" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:920 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:940 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1032 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:906 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:925 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1014 msgid "BrkPipe" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:928 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:948 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:979 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1010 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1040 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:913 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:932 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:962 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:992 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1021 msgid "Handbrk" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:929 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:949 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1011 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1041 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:914 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:933 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:993 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1022 msgid "Conn" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:930 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:950 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1012 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1042 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:915 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:934 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:994 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1023 msgid "AnglCock" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:941 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:926 msgid "VacRes" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:970 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:954 msgid "Brk" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1002 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:985 msgid "SrvPipe" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1003 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1033 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:986 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1015 msgid "AuxRes" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1004 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1034 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:987 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1016 msgid "ErgRes" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1005 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:988 msgid "StrPipe" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1006 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1036 -msgid "CtrlRes" -msgstr "" - -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1007 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1037 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:989 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1018 msgid "RetValve" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1008 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1038 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:990 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1019 msgid "TripleValve" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1013 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1043 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:995 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1024 msgid "BleedOff" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1035 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1017 msgid "MRPipe" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1061 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1041 msgid "FORCE INFORMATION" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1077 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1058 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1067 msgid "(Advanced adhesion model)" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1079 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1059 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1084 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1092 +msgid "Loco Adhesion" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1060 +msgid "Wag Adhesion" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1061 +msgid "Tang. Force" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1062 +msgid "Static Force" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1069 msgid "Conditions" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1080 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1070 msgid "Axle drive force" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1082 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1072 msgid "Axle brake force" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1083 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1073 msgid "Number of substeps" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1084 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1102 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1074 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1091 msgid "Axle out force" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1087 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1077 msgid "Comp Axle out force" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1090 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1080 msgid "Wheel Speed" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1094 -msgid "Wheel ang. pos." -msgstr "" - -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1095 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1103 -msgid "Loco Adhesion" -msgstr "" - -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1096 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1104 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1085 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1093 msgid "Wagon Adhesion" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1101 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1090 msgid "(Simple adhesion model)" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1110 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1099 msgid "Wind Speed:" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1111 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1100 msgid "Wind Direction:" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1112 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1101 msgid "Train Direction:" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1113 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1102 msgid "ResWind:" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1114 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1103 msgid "ResSpeed:" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1120 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1109 msgid "Total" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1121 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1110 msgid "Motive" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1122 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1111 msgid "Brake" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1123 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1112 msgid "Friction" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1124 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1113 msgid "Gravity" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1125 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1133 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1114 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1122 msgid "Curve" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1126 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1115 msgid "Tunnel" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1127 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1334 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1116 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1323 msgid "Wind" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1128 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1129 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1117 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1118 msgid "Coupler" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1130 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1119 msgid "Slack" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1131 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1120 msgid "Mass" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1134 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1123 msgid "Brk Frict." msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1135 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1124 msgid "Brk Slide" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1136 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1125 msgid "Bear Temp" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1138 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:126 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1317 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1325 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1340 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1127 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:125 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1286 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1294 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1309 msgid "DerailCoeff" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1188 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1177 msgid "DISPATCHER INFORMATION : active trains : " msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1191 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1180 msgid "Train" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1192 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1181 msgid "Travelled" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1194 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1183 msgid "Max" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1195 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1184 msgid "AI mode" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1196 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1185 msgid "AI data" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1197 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1186 msgid "Mode" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1198 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1187 msgid "Auth" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1200 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1189 msgid "Signal" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1202 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1191 msgid "Consist" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1203 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1192 msgid "Path" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1328 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1317 msgid "WEATHER INFORMATION" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1330 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1319 msgid "Visibility" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1331 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1320 msgid "Cloud cover" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1332 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1321 msgid "Intensity" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1333 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1322 msgid "Liquidity" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1335 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1324 msgid "Amb Temp" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1341 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1330 msgid "DEBUG INFORMATION" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1343 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1332 msgid "Logging enabled" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1344 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1333 msgid "Build" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1345 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1334 msgid "CPU" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1346 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1335 msgid "GPU" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1348 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1337 msgid "CPU Memory" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1349 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1338 msgid "GPU Memory" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1350 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1339 msgid "Adapter" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1355 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1344 msgid "Shadow maps" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1357 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1346 msgid "Shadow primitives" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1360 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1349 msgid "Render primitives" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1361 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1362 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1363 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1364 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1365 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1350 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1351 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1352 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1353 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1354 msgid "wait" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1365 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1354 msgid "Total process" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1366 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1355 msgid "Camera" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1110 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1114 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1099 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1103 #, csharp-format msgid "{0:N2} mph" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1111 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1112 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1113 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1100 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1101 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1102 #, csharp-format msgid "{0:N2} Deg" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1330 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1319 #, csharp-format msgid "{0:N0} m" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1331 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1333 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1320 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1322 #, csharp-format msgid "{0:F0} %" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1332 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1321 #, csharp-format msgid "{0:F4} p/s/m^2" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1334 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1323 #, csharp-format msgid "{0:F1},{1:F1} m/s" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1345 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1334 #, csharp-format msgid "{0:F0}% ({1})" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1346 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1335 #, csharp-format msgid "" "{0:F0} FPS (50th/95th/99th percentiles {1:F1} / {2:F1} / {3:F1} ms, DirectX " "feature level >= {4})" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1347 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1336 #, csharp-format msgid "" "{3}, {4}, {5}, {6} ({7:F0} kB/frame allocated, {0:F0}/{1:F0}/{2:F0} GCs)" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1348 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1337 #, csharp-format msgid "" "{0:F0} MB private, {1:F0} MB working set, {2:F0} MB private working set, " "{3:F0} MB managed, {4:F0} MB virtual" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1349 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1338 #, csharp-format msgid "{0:F0} MB committed, {1:F0} MB dedicated, {2:F0} MB shared" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1350 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1339 #, csharp-format msgid "{0} ({1:F0} MB)" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1353 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1342 #, csharp-format msgid "{0}/{1}" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1354 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1343 #, csharp-format msgid "({0}x{0})" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1357 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1360 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1346 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1349 #, csharp-format msgid "{0:F0}" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1361 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1362 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1363 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1364 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1365 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1350 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1351 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1352 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1353 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1354 #, csharp-format msgid "{0:F0}% ({1:F0}% {2})" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1345 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1334 #, csharp-format msgid "{0} logical processor" msgid_plural "{0} logical processors" @@ -2090,57 +1881,57 @@ msgstr[0] "" msgstr[1] "" #. Context: Cab -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:548 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:576 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:534 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:562 msgctxt "Cab" msgid "R" msgstr "" #. Context: Cab -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:548 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:576 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:534 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:562 msgctxt "Cab" msgid "F" msgstr "" #. Context: Cab -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:576 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:562 msgctxt "Cab" msgid "D" msgstr "" #. Context: Steam -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:614 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:600 msgctxt "Steam" msgid "Reverser" msgstr "" #. Context: NonSteam -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:614 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:600 msgctxt "NonSteam" msgid "Reverser" msgstr "" #. Context: Pantograph -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:684 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:670 msgctxt "Pantograph" msgid "Panto" msgstr "" #. Context: Engine -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:685 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:671 msgctxt "Engine" msgid "Eng" msgstr "" #. Context: CircuitBreaker -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:686 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:672 msgctxt "CircuitBreaker" msgid "CB" msgstr "" #. Context: TractionCutOffRelay -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:687 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:673 msgctxt "TractionCutOffRelay" msgid "TCOR" msgstr "" @@ -2233,12 +2024,12 @@ msgstr "" msgid "Activity completed." msgstr "" -#: ../../RunActivity/Viewer3D/Popups/NoticeWindow.cs:97 +#: ../../RunActivity/Viewer3D/Popups/NoticeWindow.cs:96 #, csharp-format msgid "Odometer {0}" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/NoticeWindow.cs:113 +#: ../../RunActivity/Viewer3D/Popups/NoticeWindow.cs:110 #, csharp-format msgid "FOV: {0:F0}°" msgstr "" @@ -2342,9 +2133,9 @@ msgid "Fuel" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:136 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:134 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:133 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:75 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:98 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:97 msgid "FUEL" msgstr "" @@ -2361,8 +2152,8 @@ msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:138 #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:239 #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:615 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:138 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1136 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:137 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1105 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:77 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:197 msgid "Loco Groups" @@ -2370,7 +2161,7 @@ msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:138 #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:239 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:138 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:137 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:77 msgid "GRUP" msgstr "" @@ -2386,9 +2177,9 @@ msgid "OIL" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:140 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:142 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:140 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:79 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:104 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:103 msgid "POWR" msgstr "" @@ -2408,17 +2199,17 @@ msgid "RPM" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:143 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:146 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:144 #: ../../RunActivity/Viewer3D/WebServices/TrackMonitorDisplay.cs:332 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:82 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:108 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:107 msgid "Reverser" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:143 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:146 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:144 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:82 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:108 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:107 msgid "REVR" msgstr "" @@ -2438,16 +2229,16 @@ msgid "TEMP" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:146 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:151 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:148 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:85 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:112 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:111 msgid "THRO" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:147 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:152 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:149 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:86 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:113 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:112 msgid "TIME" msgstr "" @@ -2501,628 +2292,601 @@ msgid "BP" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:52 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:808 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:823 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:832 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:366 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:381 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:390 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:805 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:820 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:829 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:365 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:380 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:389 msgid "EQ" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:53 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:833 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:834 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:846 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:847 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:865 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:866 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:830 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:831 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:843 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:844 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:862 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:863 msgid "V" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:116 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1194 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:82 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:687 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1163 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:81 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:686 msgid "AI Fireman" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:116 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:82 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:81 msgid "AIFR" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:117 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:83 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:82 msgid "AUTO" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:118 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:84 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:83 msgid "Battery switch" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:118 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:84 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:83 msgid "BATT" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:119 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:993 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1011 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:85 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:538 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:556 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:990 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1008 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:84 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:537 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:555 msgid "Boiler pressure" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:119 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:85 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:84 msgid "PRES" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:120 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:86 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:85 msgid "Boiler water glass" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:120 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:86 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:85 msgid "WATR" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:121 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:87 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:86 msgid "Boiler water level" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:121 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:87 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:86 msgid "LEVL" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:122 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1096 -msgid "CCStatus" +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:87 +msgid "Circuit breaker" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:122 -msgid "CCST" +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:87 +msgid "CIRC" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:123 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:765 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:88 -msgid "Circuit breaker" +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:325 +msgid "Cylinder cocks" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:123 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:88 -msgid "CIRC" -msgstr "" - -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:124 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:768 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:89 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:326 -msgid "Cylinder cocks" +msgid "CCOK" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:124 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:89 -msgid "CCOK" +msgid "DIRC" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:125 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:90 -msgid "DIRC" +msgid "DRLC" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:126 -msgid "DRLC" +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:90 +msgid "DOOR" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:127 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:91 -msgid "DOOR" +msgid "BDYN" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:128 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:92 -msgid "BDYN" +msgid "Electric train supply" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:129 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:93 -msgid "Electric train supply" +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:128 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:92 +msgid "TSUP" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:129 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:93 -msgid "TSUP" +msgid "BLOC" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:130 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1066 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:94 -msgid "BLOC" +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:614 +msgid "Engine" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:130 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:94 +msgid "ENGN" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:131 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1069 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:95 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:615 -msgid "Engine" +msgid "Fire mass" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:131 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:95 -msgid "ENGN" +msgid "FIRE" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:132 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:96 -msgid "Fire mass" +msgid "Fixed gear" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:132 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:134 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:96 -msgid "FIRE" -msgstr "" - -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:133 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:97 -msgid "Fixed gear" +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:98 +msgid "GEAR" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:133 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:135 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1013 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:97 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:99 -msgid "GEAR" +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:560 +msgid "Fuel levels" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:134 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1016 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1021 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:98 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:561 -msgid "Fuel levels" +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:568 +msgid "Gear" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:135 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1024 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:99 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:569 -msgid "Gear" +msgid "GRAD" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:136 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1180 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1194 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:100 -msgid "GRAD" -msgstr "" - -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:137 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1211 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1225 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:101 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:704 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:718 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:703 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:717 msgid "Grate limit" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:137 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:101 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:136 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:100 msgid "GRAT" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:139 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:102 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:138 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:101 msgid "Master key" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:139 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:102 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:138 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:101 msgid "MAST" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:140 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1111 -msgid "MaxAccel" -msgstr "" - -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:140 -msgid "MACC" -msgstr "" - -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:141 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1048 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:103 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:593 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:139 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1045 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:102 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:592 msgid "Pantographs" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:141 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:103 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:139 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:102 msgid "PANT" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:143 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:105 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:141 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:104 msgid "REGL" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:144 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:106 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:142 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:105 msgid "RPLY" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:145 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:107 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:143 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:106 msgid "RETN" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:147 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:782 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:792 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:109 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:340 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:350 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:145 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:779 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:789 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:108 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:339 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:349 msgid "Sander" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:147 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:109 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:145 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:108 msgid "SAND" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:148 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:110 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:146 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:109 msgid "SPED" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:149 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:111 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:147 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:110 msgid "Steam usage" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:149 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:111 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:147 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:110 msgid "STEM" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:150 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1104 -msgid "Target" -msgstr "" - -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:150 -msgid "TARG" -msgstr "" - -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:153 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:114 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:113 msgid "Traction cut-off relay" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:153 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:114 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:150 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:113 msgid "TRAC" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:154 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:115 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:151 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:114 msgid "BTRN" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:155 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1244 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1252 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1260 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1274 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:116 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:736 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:744 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:752 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:766 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:152 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1213 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1221 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1229 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1243 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:115 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:735 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:743 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:751 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:765 msgid "Wheel" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:155 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:116 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:152 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:115 msgid "WHEL" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:160 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:121 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:157 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:120 msgid "(absolute)" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:160 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:121 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:157 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:120 msgid "(Abs.)" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:161 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:122 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:158 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:121 msgid "apply Service" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:161 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:122 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:158 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:121 msgid "Apply" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:162 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:123 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:159 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:122 msgid "Apply Quick" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:162 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:123 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:159 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:122 msgid "ApplQ" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:163 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:124 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:160 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:123 msgid "Apply Slow" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:163 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:124 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:160 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:123 msgid "ApplS" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:164 -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:442 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:125 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:161 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:407 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:124 msgid "coal" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:164 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:125 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:161 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:124 msgid "c" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:165 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:162 msgid "Cont. Service" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:165 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:162 msgid "Serv" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:166 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:126 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:163 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:125 msgid "Emergency Braking Push Button" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:166 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:126 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:163 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:125 msgid "EmerBPB" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:167 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:127 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:164 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:126 msgid "Lap Self" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:167 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:127 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:164 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:126 msgid "LapS" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:168 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:128 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:165 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:127 msgid "Minimum Reduction" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:168 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:128 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:165 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:127 msgid "MRedc" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:169 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:129 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:166 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:128 msgid "(safe range)" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:169 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:129 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:166 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:128 msgid "(safe)" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:170 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1261 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:130 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:753 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:167 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1230 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:129 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:752 msgid "skid" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:170 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:130 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:167 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:129 msgid "Skid" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:171 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1253 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:131 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:745 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:168 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1222 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:130 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:744 msgid "slip warning" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:171 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1326 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:131 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:168 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1295 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:130 msgid "Warning" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:172 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1245 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:132 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:737 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:169 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1214 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:131 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:736 msgid "slip" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:172 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:132 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:169 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:131 msgid "Slip" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:173 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:170 msgid "Vac. Cont. Service" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:173 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:170 msgid "Vac.Serv" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:174 -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:441 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:133 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:171 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:406 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:132 msgid "water" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:174 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:133 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:171 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:132 msgid "w" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:222 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:219 msgid "Train Driving Info" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:634 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:631 msgid "bar" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:635 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:632 msgid "inHg" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:636 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:633 msgid "kgf/cm²" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:637 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:634 msgid "kPa" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:638 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:635 msgid "psi" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:639 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:636 msgid "lib./pal." msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:640 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:637 msgid "pal.rtuti" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:758 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:316 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:755 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:315 msgid "Open" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:763 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1379 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:321 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:804 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:760 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1346 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:320 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:801 msgid "Closed" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:783 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:341 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:780 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:340 msgid "Blocked" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:783 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1158 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1195 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:341 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:651 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:688 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:780 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1127 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1164 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:340 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:650 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:687 msgid "On" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:793 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:979 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1158 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1195 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:351 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:524 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:651 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:688 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:790 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:976 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1127 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1164 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:350 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:523 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:650 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:687 msgid "Off" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:836 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:849 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:868 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:912 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:914 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:921 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:939 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:946 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:391 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:400 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:415 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:458 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:460 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:467 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:485 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:492 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:833 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:846 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:865 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:909 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:911 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:918 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:936 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:943 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:390 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:399 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:414 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:457 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:459 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:466 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:484 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:491 msgid "BC" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:843 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:845 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:851 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:856 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:888 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:890 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:896 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1124 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:397 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:399 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:401 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:406 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:434 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:436 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:442 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:840 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:842 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:848 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:853 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:885 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:887 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:893 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1093 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:396 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:398 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:400 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:405 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:433 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:435 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:441 msgid "EOT" msgstr "" +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:874 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:876 #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:877 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:879 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:880 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:887 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:423 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:884 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:422 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:424 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:425 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:426 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:433 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:432 msgid "Lead" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:970 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:516 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:967 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:515 msgid "Setup" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1054 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:599 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1051 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:598 msgid "Up" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1195 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:688 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1164 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:687 msgid "Reset" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1212 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:705 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1181 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:704 msgid "Exceeded" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1318 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1287 msgid "Derailed" msgstr "" @@ -3207,137 +2971,137 @@ msgid "" "\",.-+|!$%&/()=?;:'_[]" msgstr "" -#: ../../RunActivity/Viewer3D/Processes/GameStateRunActivity.cs:379 +#: ../../RunActivity/Viewer3D/Processes/GameStateRunActivity.cs:367 msgid "Game save is not allowed during container load/unload" msgstr "" -#: ../../RunActivity/Viewer3D/Processes/GameStateRunActivity.cs:1270 +#: ../../RunActivity/Viewer3D/Processes/GameStateRunActivity.cs:1257 #, csharp-format msgid "Activity Save file '*.save' not found in folder {0}" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:437 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:402 msgid "freight-grain" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:438 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:403 msgid "freight-coal" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:439 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:404 msgid "freight-gravel" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:440 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:405 msgid "freight-sand" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:443 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:408 msgid "diesel oil" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:444 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:409 msgid "wood" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:445 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:410 msgid "sand" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:446 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:411 msgid "freight-general" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:447 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:412 msgid "freight-livestock" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:448 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:413 msgid "freight-fuel" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:449 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:414 msgid "freight-milk" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:450 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:415 msgid "mail" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:451 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:416 msgid "container" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:599 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:564 msgid "Refill: Immediate refill process selected, refilling immediately." msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:620 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:585 msgid "Refill: Electric loco and no pickup. Command rejected" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:780 -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:799 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:745 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:764 msgid "Incompatible pickup type" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:786 -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:804 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:751 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:769 msgid "Starting refill" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:630 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:595 #, csharp-format msgid "Container crane: Distance to {0} supply is {1}." msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:641 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:606 #, csharp-format msgid "Refill: Distance to {0} supply is {1}." msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:651 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:616 #, csharp-format msgid "Refill: Loco must be stationary to refill {0}." msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:657 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:622 #, csharp-format msgid "Refill: Loco speed must exceed {0}." msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:664 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:629 #, csharp-format msgid "Refill: Loco speed must not exceed {0}." msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:682 -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:703 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:647 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:668 #, csharp-format msgid "Refill: {0} supply now replenished." msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:709 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:674 #, csharp-format msgid "Unload: {0} fuel or freight now unloaded." msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:727 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:692 msgid "wag file not equipped for containers" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:732 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:697 #, csharp-format msgid "{0} now loaded." msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:738 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:703 #, csharp-format msgid "{0} now unloaded." msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:631 -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:642 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:596 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:607 #, csharp-format msgid "{0} meter" msgid_plural "{0} meters" diff --git a/Source/Locales/RunActivity/hu.po b/Source/Locales/RunActivity/hu.po index 895ad63c2e..c9a4ce0705 100644 --- a/Source/Locales/RunActivity/hu.po +++ b/Source/Locales/RunActivity/hu.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: RunActivity\n" -"POT-Creation-Date: 2023-08-25 09:18:12+0200\n" +"POT-Creation-Date: 2022-07-26 19:38:43+0200\n" "PO-Revision-Date: \n" "Last-Translator: Péter Gulyás \n" "Language-Team: Open Rails Dev Team\n" @@ -10,7 +10,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 3.3.2\n" +"X-Generator: Poedit 3.1.1\n" #: ../../RunActivity/Viewer3D/Cameras.cs:601 msgid "Free" @@ -76,104 +76,100 @@ msgid_plural "{0:F0} tiles" msgstr[0] "{0:F0} mező" msgstr[1] "{0:F0} mező" -#: ../../RunActivity/Viewer3D/Viewer.cs:830 -#: ../../RunActivity/Viewer3D/Viewer.cs:1018 +#: ../../RunActivity/Viewer3D/Viewer.cs:829 +#: ../../RunActivity/Viewer3D/Viewer.cs:1017 msgid "Cab view not available" msgstr "Vezérállás nem elérhető" -#: ../../RunActivity/Viewer3D/Viewer.cs:915 +#: ../../RunActivity/Viewer3D/Viewer.cs:914 msgid "In MP, use Alt-F4 to quit directly" msgstr "Többrésztvevős módból csak Alt+F4 -gyel lehet kilépni" -#: ../../RunActivity/Viewer3D/Viewer.cs:947 +#: ../../RunActivity/Viewer3D/Viewer.cs:946 msgid "Automatic platform and siding labels visible." msgstr "Automatikus peron- és mellékvágánycímkék láthatók." -#: ../../RunActivity/Viewer3D/Viewer.cs:950 +#: ../../RunActivity/Viewer3D/Viewer.cs:949 msgid "Platform and siding labels visible." msgstr "Peron- és mellékvágánycímkék láthatók." -#: ../../RunActivity/Viewer3D/Viewer.cs:953 +#: ../../RunActivity/Viewer3D/Viewer.cs:952 msgid "Platform labels visible." msgstr "Peroncímkék láthatók." -#: ../../RunActivity/Viewer3D/Viewer.cs:956 +#: ../../RunActivity/Viewer3D/Viewer.cs:955 msgid "Siding labels visible." msgstr "Mellékvágánycímkék láthatók." -#: ../../RunActivity/Viewer3D/Viewer.cs:962 +#: ../../RunActivity/Viewer3D/Viewer.cs:961 msgid "Platform and siding labels hidden." msgstr "Peron- és mellékvágánycímkék elrejtve." -#: ../../RunActivity/Viewer3D/Viewer.cs:973 +#: ../../RunActivity/Viewer3D/Viewer.cs:972 msgid "Train labels visible." msgstr "Vonatcímkék láthatók." -#: ../../RunActivity/Viewer3D/Viewer.cs:976 +#: ../../RunActivity/Viewer3D/Viewer.cs:975 msgid "Car labels visible." msgstr "Kocsicímkék láthatók." -#: ../../RunActivity/Viewer3D/Viewer.cs:982 +#: ../../RunActivity/Viewer3D/Viewer.cs:981 msgid "Train and car labels hidden." msgstr "Vonat- és kocsicímkék elrejtve." -#: ../../RunActivity/Viewer3D/Viewer.cs:1025 +#: ../../RunActivity/Viewer3D/Viewer.cs:1024 msgid "This car doesn't have a 2D cab" msgstr "Ennek a kocsinak nincs 2D vezérállása" -#: ../../RunActivity/Viewer3D/Viewer.cs:1029 +#: ../../RunActivity/Viewer3D/Viewer.cs:1028 msgid "This car doesn't have a 3D cab" msgstr "Ennek a kocsinak nincs 3D vezérállása" -#: ../../RunActivity/Viewer3D/Viewer.cs:1074 -#, fuzzy -#| msgid "Confirmations suppressed" -msgid "messages suppressed" +#: ../../RunActivity/Viewer3D/Viewer.cs:1059 +msgid "Confirmations suppressed" msgstr "Visszajelzések elrejtve" -#: ../../RunActivity/Viewer3D/Viewer.cs:1078 -#, fuzzy -#| msgid "Car labels visible." -msgid "All messages visible" -msgstr "Kocsicímkék láthatók." +#: ../../RunActivity/Viewer3D/Viewer.cs:1061 +msgid "Confirmations visible" +msgstr "Visszajelzések láthatóak" -#: ../../RunActivity/Viewer3D/Viewer.cs:1231 +#: ../../RunActivity/Viewer3D/Viewer.cs:1210 msgid "Switched to player control" msgstr "Robotpilóta kikapcsolva" -#: ../../RunActivity/Viewer3D/Viewer.cs:1238 +#: ../../RunActivity/Viewer3D/Viewer.cs:1217 msgid "You can't switch from manual to autopilot mode" msgstr "Helyi forgalomirányításból nem lehet robotpilótára váltani" -#: ../../RunActivity/Viewer3D/Viewer.cs:1244 +#: ../../RunActivity/Viewer3D/Viewer.cs:1223 msgid "Switched to autopilot" msgstr "Robotpilóta bekapcsolva" -#: ../../RunActivity/Viewer3D/Viewer.cs:1919 +#: ../../RunActivity/Viewer3D/Viewer.cs:1896 msgid "Game saved" msgstr "A játékállás elmentve" -#: ../../RunActivity/Viewer3D/Viewer.cs:349 +#: ../../RunActivity/Viewer3D/Viewer.cs:348 #, csharp-format msgid "Allowed speed raised to {0}" msgstr "A megengedett sebesség {0}-ra emelkedett" -#: ../../RunActivity/Viewer3D/Viewer.cs:1051 +#: ../../RunActivity/Viewer3D/Viewer.cs:1050 #, csharp-format msgid "Vibrating at level {0}" msgstr "Vibrálás szintje: {0}" -#: ../../RunActivity/Viewer3D/Viewer.cs:1262 +#: ../../RunActivity/Viewer3D/Viewer.cs:1241 #, csharp-format msgid "Keyboard map list saved to '{0}'." msgstr "Billentyűzetkiosztási lista mentve: '{0}'." -#: ../../RunActivity/Viewer3D/Viewer.cs:1266 +#: ../../RunActivity/Viewer3D/Viewer.cs:1245 #, csharp-format msgid "Keyboard map image saved to '{0}'." msgstr "Billentyűzetkiosztási ábra mentve: '{0}'." -#: ../../RunActivity/Viewer3D/Viewer.cs:1117 +#: ../../RunActivity/Viewer3D/Viewer.cs:1097 #, csharp-format msgid "{0} viewpoint stored. Use Shift+8 to restore viewpoints." msgid_plural "{0} viewpoints stored. Use Shift+8 to restore viewpoints." @@ -182,7 +178,7 @@ msgstr[0] "" msgstr[1] "" "{0} nézőpont van eltárolva. Használd a Shift+B -t a visszaállításhoz." -#: ../../RunActivity/Viewer3D/Weather.cs:144 +#: ../../RunActivity/Viewer3D/Weather.cs:145 msgid "" "Restoring wrong weather type : trying to restore dynamic weather but save " "contains user controlled weather" @@ -190,7 +186,7 @@ msgstr "" "Rossz időjárástípus betöltése: dinamikus időjárást nem lehet betölteni " "felhasználó által beállított időjárású mentésből" -#: ../../RunActivity/Viewer3D/Weather.cs:1640 +#: ../../RunActivity/Viewer3D/Weather.cs:1642 msgid "" "Restoring wrong weather type : trying to restore user controlled weather but " "save contains dynamic weather" @@ -198,266 +194,15 @@ msgstr "" "Rossz időjárástípus betöltése: felhasználó által beállított időjárást nem " "lehet betölteni dinamikus időjárású mentésből" -#: ../../RunActivity/Viewer3D/Weather.cs:494 -#, csharp-format -msgid "Increased daylight offset to {0} h" -msgstr "Időeltolás növelése {0} órára" - -#: ../../RunActivity/Viewer3D/Weather.cs:499 -#, csharp-format -msgid "Decreased daylight offset to {0} h" -msgstr "Időeltolás csökkentése {0} órára" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs:1484 -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.cs:1918 +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.cs:2004 msgid "Switching Request Sent to the Server" msgstr "A vágányútállítási kérelem el lett küldve az irányítónak" -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:155 -msgid "Learn more" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:167 -msgid "You are the dispatcher in this multiplayer session" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:257 -msgid "Message all players" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:271 -msgid ">" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:291 -#, fuzzy -#| msgid "Usage:" -msgid "Messages:" -msgstr "Felhaszn:" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:318 -#, fuzzy -#| msgid "Simulation Time" -msgid "Simulation time" -msgstr "Szimulációs idő" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:331 -msgid "Map customization" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:366 -msgid "All trains" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:378 -#, fuzzy -#| msgid "Inactive sounds" -msgid "Only active trains" -msgstr "Inaktív hangok" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:388 -#, fuzzy -#| msgid "Train static." -msgid "Train state" -msgstr "A vonat statikus." - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:398 -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:572 -msgid "Train labels" -msgstr "Vonatcímkék" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:408 -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:556 -msgid "Signal state" -msgstr "Jelzésképek" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:418 -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:543 -msgid "Signals" -msgstr "Jelzők" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:428 -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:673 -msgid "Switches" -msgstr "Váltók" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:438 -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:530 -msgid "Siding labels" -msgstr "Mellékvágánycímkék" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:448 -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:517 -msgid "Platform labels" -msgstr "Peroncímkék" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:458 -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:793 -msgid "Platforms" -msgstr "Peronok" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:469 -#, fuzzy -#| msgid "Temperature" -msgid "Map features" -msgstr "Hőmérséklet" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:478 -msgid "Rotate between themes" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:491 -#, fuzzy -#| msgid "Simulation Time" -msgid "Show simulation time" -msgstr "Szimulációs idő" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:501 -msgid "Use anti-aliasing" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:566 -#, fuzzy -#| msgid "MultiPlayer Info" -msgid "Multiplayer settings" -msgstr "MultiPlayer Infó" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:577 -msgid "Penalty for speeding && SPAD" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:589 -#, fuzzy -#| msgid "Prefer Green" -msgid "Prefer green (?)" -msgstr "Zöld előnyben részesítése" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:601 -msgid "Allow new players to join" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:631 -msgid "Map settings and controls" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:641 -msgid "Follow my train on the map" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:651 -msgid "Jump to my train on the map" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:663 -msgid "Jump to my train in game" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:674 -msgid "Map resolution (m):" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:715 -msgid "Allow throwing switches" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:727 -msgid "Allow changing signals" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:739 -msgid "Draw next path section" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:766 -#, fuzzy -#| msgid "Player" -msgid "Players" -msgstr "Játékos" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:807 -msgid "Message the selected player" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:815 -#, fuzzy -#| msgid "Reply to Selected" -msgid "Reply to the selected player" -msgstr "Válasz a kiválasztottnak" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:833 -#, fuzzy -#| msgid "You are no longer an assistant." -msgid "Make this player an assistant" -msgstr "Nem vagy többé alirányító" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:840 -msgid "Jump to this player in game" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:847 -msgid "Follow on the map" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:854 -msgid "Kick from multiplayer session" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:872 -msgid "Set switch to..." -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:881 -#, fuzzy -#| msgid "main route" -msgid "Main route" -msgstr "fővágány" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:889 -#, fuzzy -#| msgid "side route" -msgid "Side route" -msgstr "mellékvágány" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:911 -msgid "Set signal aspect to..." -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:918 -msgid "System controlled" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:927 -#, fuzzy -#| msgctxt "Engine" -#| msgid "Stopped" -msgid "Stop" -msgstr "Leállítva" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:935 -msgid "Approach" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:944 -#, fuzzy -#| msgid "Procedures" -msgid "Proceed" -msgstr "Eljárások" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:957 -msgid "Allow call on" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs:967 -#, fuzzy -#| msgid "Map Window" -msgid "Map window" -msgstr "Térképablak" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.cs:555 +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.cs:580 msgid "MSG to Server" msgstr "Üzenet a kiszolgálónak" -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.cs:559 +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.cs:584 #: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:256 msgid "MSG to All" msgstr "Ózenet mindenkinek" @@ -520,11 +265,11 @@ msgid "Assist" msgstr "Segítő" #: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:417 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1226 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1275 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1341 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:719 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:767 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1195 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1244 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1310 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:718 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:766 msgid "Normal" msgstr "Normál" @@ -556,6 +301,26 @@ msgstr "SzimulációsIdő" msgid "Show:" msgstr "Megjelenítés:" +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:517 +msgid "Platform labels" +msgstr "Peroncímkék" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:530 +msgid "Siding labels" +msgstr "Mellékvágánycímkék" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:543 +msgid "Signals" +msgstr "Jelzők" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:556 +msgid "Signal state" +msgstr "Jelzésképek" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:572 +msgid "Train labels" +msgstr "Vonatcímkék" + #: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:583 msgid "Key" msgstr "Azonosítók" @@ -576,6 +341,10 @@ msgstr "Időeltolás (óra)" msgid "Background color" msgstr "Háttérszín" +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:673 +msgid "Switches" +msgstr "Váltók" + #: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:685 msgid "To pan, drag with left mouse." msgstr "Pásztázáshoz húzd bal egérgombbal." @@ -609,6 +378,10 @@ msgstr "Adott helyre nagyítás Shift és bal egérgombbal." msgid "To zoom out of a location, press Alt and click the left mouse." msgstr "Visszakicsinyítés Alt és bal egérgombbal." +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:793 +msgid "Platforms" +msgstr "Peronok" + #: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:852 msgid "Map Window" msgstr "Térképablak" @@ -657,14 +430,14 @@ msgid "3D" msgstr "3D" #: ../../RunActivity/Viewer3D/Debugging/SoundDebugForm.Designer.cs:284 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:431 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:629 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1193 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:148 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:671 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:536 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:721 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1288 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:146 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:668 #: ../../RunActivity/Viewer3D/WebServices/TrackMonitorDisplay.cs:291 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:110 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:231 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:109 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:230 msgid "Speed" msgstr "Sebesség" @@ -681,8 +454,8 @@ msgid "Variable 1" msgstr "Variable 1" #: ../../RunActivity/Viewer3D/Debugging/SoundDebugForm.Designer.cs:351 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1199 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1201 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1294 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1296 #: ../../RunActivity/Viewer3D/Popups/NextStationWindow.cs:78 msgid "Distance" msgstr "Távolság" @@ -941,11 +714,11 @@ msgstr "Könyvtárnév" msgid "Can't attach EOT if player train not stopped" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/EOTListWindow.cs:111 +#: ../../RunActivity/Viewer3D/Popups/EOTListWindow.cs:110 msgid "Player train already has a mounted EOT" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/EOTListWindow.cs:124 +#: ../../RunActivity/Viewer3D/Popups/EOTListWindow.cs:122 msgid "Can't mount an EOT if another one is mounted" msgstr "" @@ -1073,8 +846,8 @@ msgid "- Missed station stops: " msgstr "- Elszalasztott állomási megállások: " #: ../../RunActivity/Viewer3D/Popups/HelpWindow.cs:416 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:980 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1137 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1069 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1232 msgid " " msgstr " " @@ -1153,981 +926,962 @@ msgid_plural "{0} minutes" msgstr[0] "{0} perc" msgstr[1] "{0} perc" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:106 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:434 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:615 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:628 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:204 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:539 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:707 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:720 #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:146 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:151 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:148 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:85 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:112 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:111 msgid "Throttle" msgstr "Menetszabályzó" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:107 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:205 msgid "Power In/Out" msgstr "Teljesítmény Be/Ki" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:111 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:209 msgid "Motive force" msgstr "Mozgatóerő" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:113 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:211 msgid "Num of substeps" msgstr "Allépések száma" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:116 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1347 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:214 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1442 msgid "Memory" msgstr "Memória" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:117 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:215 msgid "GCs" msgstr "GC-k" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:118 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:216 msgid "Frame time" msgstr "Frame idő" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:119 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1361 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:217 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1456 msgid "Render process" msgstr "Render folyamat" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:120 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1362 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:218 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1457 msgid "Updater process" msgstr "Updater folyamat" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:121 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1363 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:219 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1458 msgid "Loader process" msgstr "Loader folyamat" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:122 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1364 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:220 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1459 msgid "Sound process" msgstr "Sound folyamat" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:420 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:525 msgid "Version" msgstr "Verzió" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:424 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:426 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:529 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:531 #: ../../RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs:158 #: ../../RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs:164 #: ../../RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs:332 #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:147 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:152 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:648 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:149 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:645 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:86 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:113 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:208 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:112 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:207 msgid "Time" msgstr "Idő" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:429 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:144 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:655 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:106 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:215 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:534 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:142 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:652 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:105 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:214 msgid "Replay" msgstr "Visszajátszás" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:432 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1132 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:136 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:689 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:537 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1227 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:135 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:686 #: ../../RunActivity/Viewer3D/WebServices/TrackMonitorDisplay.cs:322 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:100 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:249 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:99 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:248 msgid "Gradient" msgstr "Pályaemelkedés" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:433 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:613 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:625 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:125 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:538 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:705 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:717 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:124 #: ../../RunActivity/Viewer3D/WebServices/TrackMonitorDisplay.cs:332 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:90 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:89 msgid "Direction" msgstr "Irány" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:434 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:615 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:143 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:105 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:539 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:707 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:141 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:104 msgid "Regulator" msgstr "Töltésszabályzó" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:438 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:154 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:826 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:883 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:917 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:115 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:384 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:429 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:463 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:543 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:151 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:823 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:880 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:914 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:114 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:383 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:428 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:462 msgid "Train brake" msgstr "Vonatfék" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:440 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:145 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:934 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:107 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:480 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:545 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:143 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:931 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:106 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:479 msgid "Retainers" msgstr "Visszatartó szelepek" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:442 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:130 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:943 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:958 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:94 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:489 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:504 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:547 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:129 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:940 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:955 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:93 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:488 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:503 msgid "Engine brake" msgstr "Mozdonyfék" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:444 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:549 msgid "Brakemen brake" msgstr "Fékezőszemélyzet" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:446 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:616 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:128 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:969 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:978 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:92 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:515 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:523 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:551 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:708 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:127 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:966 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:975 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:91 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:514 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:522 msgid "Dynamic brake" msgstr "Dinamikus fék" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:462 -msgid "Cruise control status" -msgstr "" - -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:465 -msgid "Speed target" -msgstr "" - -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:466 -msgid "Max acceleration" -msgstr "" - -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:470 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:565 msgid "Multiple Units" msgstr "Mozdonycsoport" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:472 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1147 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:640 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:567 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1116 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:639 msgid "FPS" msgstr "FPS" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:476 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:571 #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:117 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1157 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:83 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:650 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1126 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:82 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:649 msgid "Autopilot" msgstr "Robotpilóta" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:479 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1078 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:574 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1174 msgid "Wheel slip" msgstr "Kerékmegperdülés" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:481 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:576 msgid "Wheel slip warning" msgstr "Kerékmegperdülési figyelmeztetés" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:484 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:579 msgid "Wheel skid" msgstr "Kerékmegcsúszás" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:490 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:585 msgid "Sander blocked" msgstr "Homokoló letiltva" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:492 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:587 msgid "Sander on" msgstr "Homokoló üzemben" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:503 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1358 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:783 -msgid "Left" -msgstr "Bal" - -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:505 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1360 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:785 -msgid "Right" -msgstr "Jobb" - -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:508 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:127 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1364 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1378 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:91 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:789 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:803 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:600 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:126 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1331 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1345 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:90 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:786 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:800 msgid "Doors open" msgstr "Ajtók nyitva" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:514 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:606 msgid "MultiPlayerStatus: " msgstr "MultiPlayer Állapot: " -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:515 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:607 #: ../../RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs:344 msgid "Dispatcher" msgstr "Irányító" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:516 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:608 #: ../../RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs:345 msgid "Helper" msgstr "Segéd" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:517 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:609 #: ../../RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs:346 msgid "Client" msgstr "Résztvevő" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:526 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:618 msgid "CONSIST INFORMATION" msgstr "SZERELVÉNY INFORMÁCIÓI" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:538 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:630 msgid "Player" msgstr "Játékos" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:539 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:631 msgid "Tilted" msgstr "Dönthető" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:540 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:562 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:683 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:918 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:938 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:969 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1000 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1030 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:632 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:654 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:775 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1010 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1029 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1059 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1089 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1118 msgid "Type" msgstr "Típus" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:541 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:563 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:633 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:655 msgid "Length" msgstr "Hossz" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:542 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:564 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:634 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:656 msgid "Weight" msgstr "Tömeg" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:543 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:635 msgid "Tonnage" msgstr "Tonna" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:544 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:636 msgid "Control Mode" msgstr "Irányítási mód" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:545 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:637 msgid "Out of Control" msgstr "Irányítás nélkül" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:546 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:638 msgid "Cab Aspect" msgstr "Jelzéskép" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:549 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:572 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1164 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1343 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:641 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:664 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1259 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1438 #: ../../RunActivity/Viewer3D/RollingStock/SubSystems/ETCS/DataEntry.cs:460 #: ../../RunActivity/Viewer3D/RollingStock/SubSystems/ETCS/DataEntry.cs:485 msgid "Yes" msgstr "Igen" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:549 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:572 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1164 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1343 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:641 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:664 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1259 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1438 msgid "No" msgstr "Nem" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:550 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:573 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:642 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:665 msgid "Freight" msgstr "Teher" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:550 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:573 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:642 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:665 msgid "Pass" msgstr "Személy" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:560 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:917 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:937 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:968 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:999 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1029 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1119 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:652 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1009 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1028 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1058 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1088 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1117 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1214 msgid "Car" msgstr "Kocsi" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:561 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:626 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1166 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:653 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:718 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1261 msgid "Flipped" msgstr "Fordított" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:565 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:657 msgid "Drv/Cabs" msgstr "Vezethető" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:566 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:658 msgid "Wheels" msgstr "Tengelyek" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:567 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:659 msgid "Temp" msgstr "Hőm" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:607 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:699 msgid "LOCOMOTIVE INFORMATION" msgstr "MOZDONY INFORMÁCIÓI" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:620 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:804 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:813 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:815 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:819 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:828 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:830 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:838 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:840 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:875 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:712 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:896 #: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:905 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:907 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:911 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:920 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:922 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:930 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:932 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:967 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:997 msgid "off" msgstr "ki" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:621 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:802 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:811 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:826 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:836 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:863 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:871 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:713 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:894 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:903 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:918 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:928 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:955 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:963 msgid "PlayerLoco" msgstr "VezetettGép" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:624 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:892 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:899 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:716 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:984 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:991 msgid "Loco" msgstr "Mozdony" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:627 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:719 msgid "MU'd" msgstr "Távvez" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:631 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:695 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:723 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:787 #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:140 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:142 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:140 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:79 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:104 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:103 msgid "Power" msgstr "Főmegszakító" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:632 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:724 msgid "Force" msgstr "Erők" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:642 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:734 msgid "DISTRIBUTED POWER INFORMATION" msgstr "GÉPCSOPORT-INFORMÁCIÓK" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:676 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:768 msgid "POWER SUPPLY INFORMATION" msgstr "ENERGIAELLÁTÁSI INFORMÁCIÓK" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:682 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:774 msgid "Wagon" msgstr "Vagon" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:688 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:780 msgid "MainPS" msgstr "Főüzem" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:689 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:781 msgid "AuxPS" msgstr "Segédüz." -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:690 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:782 msgid "Battery" msgstr "Akku" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:691 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:783 msgid "LowVoltPS" msgstr "KisFeszE" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:692 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:784 msgid "CabPS" msgstr "VezÁllE" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:693 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:785 msgid "ETS" msgstr "El. fűtés" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:694 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:786 msgid "ETSCable" msgstr "Fűtéskábel" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:721 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:734 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:749 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:758 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:813 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:826 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:841 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:850 msgid "connected" msgstr "csatl." -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:721 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:734 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:749 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:758 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:813 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:826 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:841 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:850 msgid "disconnected" msgstr "nincs cs." -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:786 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:878 msgid "BRAKE INFORMATION" msgstr "FÉKINFORMÁCIÓK" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:803 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:895 msgid "Exhauster" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:804 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:813 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:815 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:819 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:828 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:830 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:838 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:840 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:875 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:896 #: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:905 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:907 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:911 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:920 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:922 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:930 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:932 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:967 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:997 msgid "on" msgstr "be" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:812 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:827 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:837 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:904 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:919 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:929 msgid "Large Ejector" msgstr "Nagy légsűrítő" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:814 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:839 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:906 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:931 msgid "Small Ejector" msgstr "Kis légsűrítő" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:816 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:841 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:908 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:933 msgid "Pressure" msgstr "Nyomás" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:818 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:829 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:910 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:921 msgid "Vacuum Pump" msgstr "Vákuumszivattyú" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:847 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:939 msgid "Brake Sys Vol" msgstr "Fékr Térf" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:848 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:940 msgid "Train Pipe" msgstr "Átmenőfék" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:850 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:942 msgid "Brake Cyl" msgstr "Féktartály" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:852 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:944 msgid "Air Vol" msgstr "Levegőtérfogat" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:864 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:956 msgid "No compressor or reservoir fitted" msgstr "Nincs kompresszor és tartály" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:872 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:902 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:964 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:994 msgid "Main reservoir" msgstr "Főlégtartály" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:874 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:904 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:966 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:996 msgid "Compressor" msgstr "Légsűrítő" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:919 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:939 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1001 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1031 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1011 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1030 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1090 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1119 msgid "BrkCyl" msgstr "Fékheng" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:920 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:940 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1032 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1012 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1031 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1120 msgid "BrkPipe" msgstr "Fővez" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:928 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:948 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:979 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1010 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1040 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1019 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1038 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1068 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1098 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1127 msgid "Handbrk" msgstr "Kézifék" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:929 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:949 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1011 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1041 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1020 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1039 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1099 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1128 msgid "Conn" msgstr "Csatlás" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:930 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:950 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1012 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1042 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1021 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1040 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1100 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1129 msgid "AnglCock" msgstr "Végelzáró" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:941 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1032 msgid "VacRes" msgstr "VákTart" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:970 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1060 msgid "Brk" msgstr "Fék" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1002 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1091 msgid "SrvPipe" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1003 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1033 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1092 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1121 msgid "AuxRes" msgstr "KészlLT" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1004 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1034 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1093 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1122 msgid "ErgRes" msgstr "VészLT" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1005 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1094 msgid "StrPipe" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1006 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1036 -msgid "CtrlRes" -msgstr "" - -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1007 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1037 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1095 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1124 msgid "RetValve" msgstr "Visszat" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1008 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1038 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1096 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1125 msgid "TripleValve" msgstr "Kormányszelep" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1013 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1043 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1101 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1130 msgid "BleedOff" msgstr "KieresztőSz" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1035 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1123 msgid "MRPipe" msgstr "FőlégVez" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1061 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1147 msgid "FORCE INFORMATION" msgstr "ERŐINFORMÁCIÓK" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1077 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1164 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1173 msgid "(Advanced adhesion model)" msgstr "(Fejlett csúszási modell)" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1079 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1165 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1190 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1198 +msgid "Loco Adhesion" +msgstr "Mozdony tapadása" + +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1166 +msgid "Wag Adhesion" +msgstr "Vagon tapadása" + +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1167 +msgid "Tang. Force" +msgstr "Kerületi erő" + +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1168 +msgid "Static Force" +msgstr "Statikus erő" + +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1175 msgid "Conditions" msgstr "Csúszási állapot" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1080 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1176 msgid "Axle drive force" msgstr "Tengely hajtóerő" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1082 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1178 msgid "Axle brake force" msgstr "Tengely fékezőerő" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1083 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1179 msgid "Number of substeps" msgstr "Allépések száma" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1084 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1102 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1180 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1197 msgid "Axle out force" msgstr "Tengely eredő erő" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1087 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1183 msgid "Comp Axle out force" msgstr "Kompenzált teng. eredő erő" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1090 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1186 msgid "Wheel Speed" msgstr "Keréksebesség" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1094 -msgid "Wheel ang. pos." -msgstr "" - -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1095 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1103 -msgid "Loco Adhesion" -msgstr "Mozdony tapadása" - -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1096 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1104 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1191 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1199 msgid "Wagon Adhesion" msgstr "Vagon tapadása" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1101 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1196 msgid "(Simple adhesion model)" msgstr "(Egyszerűsített csúszási modell)" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1110 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1205 msgid "Wind Speed:" msgstr "Szélsebesség:" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1111 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1206 msgid "Wind Direction:" msgstr "Szélirány:" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1112 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1207 msgid "Train Direction:" msgstr "Haladási irány:" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1113 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1208 msgid "ResWind:" msgstr "Eredő szélseb:" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1114 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1209 msgid "ResSpeed:" msgstr "Eredő sebesség:" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1120 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1215 msgid "Total" msgstr "Össz" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1121 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1216 msgid "Motive" msgstr "Mozgató" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1122 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1217 msgid "Brake" msgstr "Fékező" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1123 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1218 msgid "Friction" msgstr "Súrlód" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1124 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1219 msgid "Gravity" msgstr "Gravit" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1125 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1133 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1220 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1228 msgid "Curve" msgstr "Ívellenáll" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1126 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1221 msgid "Tunnel" msgstr "Alagút" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1127 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1334 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1222 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1429 msgid "Wind" msgstr "Szél" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1128 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1129 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1223 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1224 msgid "Coupler" msgstr "Vonókész" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1130 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1225 msgid "Slack" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1131 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1226 msgid "Mass" msgstr "Tömeg" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1134 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1229 msgid "Brk Frict." msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1135 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1230 msgid "Brk Slide" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1136 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1231 msgid "Bear Temp" msgstr "Csapágyhőm" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1138 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:126 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1317 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1325 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1340 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1233 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:125 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1286 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1294 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1309 msgid "DerailCoeff" msgstr "Siklási együtth" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1188 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1283 msgid "DISPATCHER INFORMATION : active trains : " msgstr "FORGALOMIRÁNYÍTÁSI INFORMÁCIÓK : aktív vonatok : " -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1191 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1286 msgid "Train" msgstr "Vonat" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1192 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1287 msgid "Travelled" msgstr "MegtettÚt" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1194 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1289 msgid "Max" msgstr "Max" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1195 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1290 msgid "AI mode" msgstr "AI mód" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1196 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1291 msgid "AI data" msgstr "AI adatok" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1197 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1292 msgid "Mode" msgstr "Mód" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1198 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1293 msgid "Auth" msgstr "Engedély" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1200 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1295 msgid "Signal" msgstr "Jelző" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1202 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1297 msgid "Consist" msgstr "Szerelv" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1203 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1298 msgid "Path" msgstr "Útvonal" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1328 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1423 msgid "WEATHER INFORMATION" msgstr "IDŐJÁRÁSI INFORMÁCIÓK" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1330 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1425 msgid "Visibility" msgstr "Látótávolság" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1331 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1426 msgid "Cloud cover" msgstr "Felhőzet" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1332 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1427 msgid "Intensity" msgstr "Csapadékintenzitás" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1333 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1428 msgid "Liquidity" msgstr "Nedvesség" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1335 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1430 msgid "Amb Temp" msgstr "Külső hőmérséklet" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1341 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1436 msgid "DEBUG INFORMATION" msgstr "HIBAKERESÉSI INFORMÁCIÓK" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1343 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1438 msgid "Logging enabled" msgstr "Naplózás" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1344 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1439 msgid "Build" msgstr "Build" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1345 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1440 msgid "CPU" msgstr "CPU" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1346 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1441 msgid "GPU" msgstr "GPU" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1348 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1443 msgid "CPU Memory" msgstr "CPU memória" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1349 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1444 msgid "GPU Memory" msgstr "GPU memória" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1350 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1445 msgid "Adapter" msgstr "Adapter" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1355 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1450 msgid "Shadow maps" msgstr "Árnyéktérképek" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1357 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1452 msgid "Shadow primitives" msgstr "Árnyék primitívek" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1360 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1455 msgid "Render primitives" msgstr "Render primitívek" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1361 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1362 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1363 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1364 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1365 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1456 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1457 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1458 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1459 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1460 msgid "wait" msgstr "várakozás" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1365 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1460 msgid "Total process" msgstr "Összes folyamat" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1366 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1461 msgid "Camera" msgstr "Kamera" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1110 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1114 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1205 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1209 #, csharp-format msgid "{0:N2} mph" msgstr "{0:N2} mf/h" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1111 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1112 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1113 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1206 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1207 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1208 #, csharp-format msgid "{0:N2} Deg" msgstr "{0:N2} fok" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1330 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1425 #, csharp-format msgid "{0:N0} m" msgstr "{0:N0} m" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1331 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1333 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1426 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1428 #, csharp-format msgid "{0:F0} %" msgstr "{0:F0} %" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1332 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1427 #, csharp-format msgid "{0:F4} p/s/m^2" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1334 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1429 #, csharp-format msgid "{0:F1},{1:F1} m/s" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1345 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1440 #, csharp-format msgid "{0:F0}% ({1})" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1346 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1441 #, csharp-format msgid "" "{0:F0} FPS (50th/95th/99th percentiles {1:F1} / {2:F1} / {3:F1} ms, DirectX " "feature level >= {4})" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1347 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1442 #, csharp-format msgid "" "{3}, {4}, {5}, {6} ({7:F0} kB/frame allocated, {0:F0}/{1:F0}/{2:F0} GCs)" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1348 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1443 #, csharp-format msgid "" "{0:F0} MB private, {1:F0} MB working set, {2:F0} MB private working set, " "{3:F0} MB managed, {4:F0} MB virtual" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1349 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1444 #, csharp-format msgid "{0:F0} MB committed, {1:F0} MB dedicated, {2:F0} MB shared" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1350 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1445 #, csharp-format msgid "{0} ({1:F0} MB)" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1353 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1448 #, csharp-format msgid "{0}/{1}" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1354 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1449 #, csharp-format msgid "({0}x{0})" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1357 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1360 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1452 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1455 #, csharp-format msgid "{0:F0}" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1361 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1362 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1363 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1364 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1365 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1456 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1457 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1458 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1459 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1460 #, csharp-format msgid "{0:F0}% ({1:F0}% {2})" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1345 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1440 #, csharp-format msgid "{0} logical processor" msgid_plural "{0} logical processors" @@ -2135,57 +1889,57 @@ msgstr[0] "{0} logikai processzor" msgstr[1] "{0} logikai processzor" #. Context: Cab -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:548 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:576 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:640 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:668 msgctxt "Cab" msgid "R" msgstr "H" #. Context: Cab -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:548 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:576 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:640 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:668 msgctxt "Cab" msgid "F" msgstr "E" #. Context: Cab -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:576 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:668 msgctxt "Cab" msgid "D" msgstr "V" #. Context: Steam -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:614 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:706 msgctxt "Steam" msgid "Reverser" msgstr "Vezérmű" #. Context: NonSteam -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:614 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:706 msgctxt "NonSteam" msgid "Reverser" msgstr "Irányváltó" #. Context: Pantograph -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:684 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:776 msgctxt "Pantograph" msgid "Panto" msgstr "Áramsz" #. Context: Engine -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:685 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:777 msgctxt "Engine" msgid "Eng" msgstr "Motor" #. Context: CircuitBreaker -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:686 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:778 msgctxt "CircuitBreaker" msgid "CB" msgstr "FőMegsz" #. Context: TractionCutOffRelay -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:687 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:779 msgctxt "TractionCutOffRelay" msgid "TCOR" msgstr "VontTiltóR" @@ -2280,12 +2034,12 @@ msgstr "Elegy cseréje az elöl lévő vonattal" msgid "Activity completed." msgstr "Szolgálat teljesítve." -#: ../../RunActivity/Viewer3D/Popups/NoticeWindow.cs:97 +#: ../../RunActivity/Viewer3D/Popups/NoticeWindow.cs:96 #, csharp-format msgid "Odometer {0}" msgstr "Útmérő {0}" -#: ../../RunActivity/Viewer3D/Popups/NoticeWindow.cs:113 +#: ../../RunActivity/Viewer3D/Popups/NoticeWindow.cs:110 #, csharp-format msgid "FOV: {0:F0}°" msgstr "Látószög: {0:F0}°" @@ -2389,9 +2143,9 @@ msgid "Fuel" msgstr "Üzemanyag" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:136 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:134 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:133 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:75 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:98 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:97 msgid "FUEL" msgstr "" @@ -2408,8 +2162,8 @@ msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:138 #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:239 #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:615 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:138 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1136 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:137 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1105 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:77 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:197 msgid "Loco Groups" @@ -2417,7 +2171,7 @@ msgstr "Gépcsoport" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:138 #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:239 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:138 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:137 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:77 msgid "GRUP" msgstr "" @@ -2433,9 +2187,9 @@ msgid "OIL" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:140 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:142 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:140 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:79 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:104 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:103 msgid "POWR" msgstr "" @@ -2455,17 +2209,17 @@ msgid "RPM" msgstr "ford/perc" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:143 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:146 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:144 #: ../../RunActivity/Viewer3D/WebServices/TrackMonitorDisplay.cs:332 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:82 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:108 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:107 msgid "Reverser" msgstr "Irányváltó" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:143 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:146 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:144 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:82 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:108 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:107 msgid "REVR" msgstr "" @@ -2485,16 +2239,16 @@ msgid "TEMP" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:146 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:151 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:148 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:85 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:112 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:111 msgid "THRO" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:147 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:152 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:149 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:86 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:113 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:112 msgid "TIME" msgstr "" @@ -2548,630 +2302,601 @@ msgid "BP" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:52 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:808 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:823 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:832 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:366 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:381 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:390 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:805 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:820 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:829 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:365 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:380 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:389 msgid "EQ" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:53 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:833 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:834 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:846 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:847 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:865 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:866 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:830 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:831 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:843 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:844 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:862 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:863 msgid "V" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:116 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1194 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:82 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:687 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1163 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:81 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:686 msgid "AI Fireman" msgstr "Autofűtő" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:116 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:82 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:81 msgid "AIFR" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:117 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:83 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:82 msgid "AUTO" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:118 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:84 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:83 msgid "Battery switch" msgstr "Akkumulátorkapcsoló" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:118 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:84 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:83 msgid "BATT" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:119 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:993 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1011 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:85 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:538 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:556 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:990 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1008 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:84 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:537 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:555 msgid "Boiler pressure" msgstr "Kazánnyomás" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:119 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:85 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:84 msgid "PRES" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:120 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:86 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:85 msgid "Boiler water glass" msgstr "Kazán vízszintfigyelő" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:120 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:86 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:85 msgid "WATR" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:121 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:87 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:86 msgid "Boiler water level" msgstr "Kazánvízszint" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:121 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:87 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:86 msgid "LEVL" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:122 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1096 -#, fuzzy -#| msgid "Status" -msgid "CCStatus" -msgstr "Állapot" +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:87 +msgid "Circuit breaker" +msgstr "Főmegszakító" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:122 -msgid "CCST" +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:87 +msgid "CIRC" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:123 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:765 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:88 -msgid "Circuit breaker" -msgstr "Főmegszakító" +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:325 +msgid "Cylinder cocks" +msgstr "Hengercsapok" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:123 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:88 -msgid "CIRC" +msgid "CCOK" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:124 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:768 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:89 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:326 -msgid "Cylinder cocks" -msgstr "Hengercsapok" - #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:124 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:89 -msgid "CCOK" +msgid "DIRC" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:125 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:90 -msgid "DIRC" +msgid "DRLC" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:126 -msgid "DRLC" +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:90 +msgid "DOOR" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:127 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:91 -msgid "DOOR" +msgid "BDYN" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:128 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:92 -msgid "BDYN" -msgstr "" - -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:129 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:93 msgid "Electric train supply" msgstr "Villamos fűtés" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:129 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:93 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:128 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:92 msgid "TSUP" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:130 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:94 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:129 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:93 msgid "BLOC" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:131 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1069 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:95 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:615 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:130 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1066 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:94 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:614 msgid "Engine" msgstr "Gép" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:131 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:95 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:130 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:94 msgid "ENGN" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:132 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:96 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:131 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:95 msgid "Fire mass" msgstr "Tűztömeg" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:132 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:96 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:131 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:95 msgid "FIRE" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:133 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:97 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:132 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:96 msgid "Fixed gear" msgstr "Rögzített seb.fokozat" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:133 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:135 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:97 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:99 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:132 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:134 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:96 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:98 msgid "GEAR" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:134 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1016 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:98 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:561 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:133 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1013 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:97 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:560 msgid "Fuel levels" msgstr "Készletszintek" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:135 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1024 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:99 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:569 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:134 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1021 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:98 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:568 msgid "Gear" msgstr "Seb.fokozat" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:136 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:100 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:135 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:99 msgid "GRAD" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:137 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1211 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1225 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:101 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:704 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:718 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:136 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1180 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1194 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:100 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:703 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:717 msgid "Grate limit" msgstr "Rostély korlát" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:137 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:101 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:136 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:100 msgid "GRAT" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:139 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:102 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:138 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:101 msgid "Master key" msgstr "Mesterkulcs" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:139 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:102 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:138 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:101 msgid "MAST" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:140 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1111 -msgid "MaxAccel" -msgstr "" - -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:140 -msgid "MACC" -msgstr "" - -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:141 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1048 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:103 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:593 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:139 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1045 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:102 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:592 msgid "Pantographs" msgstr "Áramszedők" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:141 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:103 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:139 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:102 msgid "PANT" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:143 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:105 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:141 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:104 msgid "REGL" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:144 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:106 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:142 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:105 msgid "RPLY" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:145 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:107 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:143 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:106 msgid "RETN" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:147 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:782 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:792 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:109 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:340 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:350 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:145 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:779 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:789 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:108 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:339 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:349 msgid "Sander" msgstr "Homokoló" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:147 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:109 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:145 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:108 msgid "SAND" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:148 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:110 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:146 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:109 msgid "SPED" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:149 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:111 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:147 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:110 msgid "Steam usage" msgstr "Gőzfelhasználás" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:149 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:111 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:147 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:110 msgid "STEM" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:150 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1104 -msgid "Target" -msgstr "" - -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:150 -msgid "TARG" -msgstr "" - -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:153 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:114 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:113 msgid "Traction cut-off relay" msgstr "Vontatástiltó relé" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:153 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:114 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:150 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:113 msgid "TRAC" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:154 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:115 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:151 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:114 msgid "BTRN" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:155 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1244 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1252 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1260 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1274 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:116 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:736 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:744 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:752 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:766 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:152 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1213 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1221 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1229 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1243 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:115 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:735 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:743 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:751 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:765 msgid "Wheel" msgstr "Tengely" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:155 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:116 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:152 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:115 msgid "WHEL" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:160 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:121 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:157 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:120 msgid "(absolute)" msgstr "(abszolút)" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:160 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:121 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:157 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:120 msgid "(Abs.)" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:161 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:122 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:158 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:121 msgid "apply Service" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:161 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:122 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:158 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:121 msgid "Apply" msgstr "Működtetés" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:162 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:123 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:159 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:122 msgid "Apply Quick" msgstr "Gyorsműködtetés" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:162 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:123 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:159 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:122 msgid "ApplQ" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:163 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:124 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:160 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:123 msgid "Apply Slow" msgstr "Lassú működtetés" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:163 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:124 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:160 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:123 msgid "ApplS" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:164 -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:442 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:125 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:161 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:411 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:124 msgid "coal" msgstr "szén" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:164 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:125 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:161 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:124 msgid "c" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:165 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:162 msgid "Cont. Service" msgstr "Folyamatos üzem" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:165 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:162 msgid "Serv" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:166 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:126 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:163 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:125 msgid "Emergency Braking Push Button" msgstr "Vészfék ütőgomb" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:166 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:126 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:163 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:125 msgid "EmerBPB" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:167 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:127 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:164 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:126 msgid "Lap Self" msgstr "Fokozatos fékezés" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:167 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:127 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:164 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:126 msgid "LapS" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:168 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:128 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:165 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:127 msgid "Minimum Reduction" msgstr "Elsőfokozati nyomáscsökkentés" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:168 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:128 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:165 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:127 msgid "MRedc" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:169 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:129 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:166 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:128 msgid "(safe range)" msgstr "(biztonságos)" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:169 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:129 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:166 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:128 msgid "(safe)" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:170 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1261 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:130 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:753 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:167 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1230 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:129 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:752 msgid "skid" msgstr "csúszás" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:170 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:130 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:167 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:129 msgid "Skid" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:171 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1253 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:131 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:745 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:168 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1222 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:130 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:744 msgid "slip warning" msgstr "kerékmegperdülési figyelmeztetés" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:171 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1326 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:131 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:168 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1295 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:130 msgid "Warning" msgstr "Figyelmeztetés" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:172 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1245 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:132 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:737 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:169 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1214 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:131 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:736 msgid "slip" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:172 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:132 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:169 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:131 msgid "Slip" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:173 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:170 msgid "Vac. Cont. Service" msgstr "Vákuum folyamatos üzem" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:173 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:170 msgid "Vac.Serv" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:174 -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:441 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:133 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:171 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:410 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:132 msgid "water" msgstr "víz" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:174 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:133 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:171 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:132 msgid "w" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:222 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:219 msgid "Train Driving Info" msgstr "Vonatvezetési infó" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:634 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:631 msgid "bar" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:635 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:632 msgid "inHg" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:636 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:633 msgid "kgf/cm²" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:637 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:634 msgid "kPa" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:638 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:635 msgid "psi" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:639 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:636 msgid "lib./pal." msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:640 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:637 msgid "pal.rtuti" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:758 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:316 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:755 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:315 msgid "Open" msgstr "Nyitva" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:763 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1379 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:321 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:804 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:760 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1346 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:320 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:801 msgid "Closed" msgstr "Zárva" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:783 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:341 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:780 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:340 msgid "Blocked" msgstr "Tiltva" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:783 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1158 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1195 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:341 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:651 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:688 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:780 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1127 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1164 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:340 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:650 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:687 msgid "On" msgstr "Be" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:793 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:979 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1158 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1195 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:351 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:524 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:651 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:688 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:790 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:976 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1127 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1164 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:350 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:523 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:650 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:687 msgid "Off" msgstr "Ki" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:836 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:849 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:868 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:912 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:914 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:921 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:939 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:946 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:391 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:400 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:415 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:458 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:460 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:467 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:485 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:492 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:833 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:846 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:865 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:909 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:911 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:918 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:936 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:943 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:390 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:399 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:414 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:457 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:459 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:466 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:484 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:491 msgid "BC" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:843 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:845 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:851 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:856 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:888 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:890 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:896 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1124 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:397 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:399 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:401 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:406 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:434 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:436 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:442 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:840 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:842 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:848 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:853 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:885 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:887 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:893 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1093 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:396 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:398 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:400 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:405 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:433 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:435 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:441 msgid "EOT" msgstr "" +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:874 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:876 #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:877 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:879 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:880 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:887 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:423 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:884 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:422 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:424 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:425 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:426 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:433 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:432 msgid "Lead" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:970 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:516 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:967 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:515 msgid "Setup" msgstr "Beállítás" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1054 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:599 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1051 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:598 msgid "Up" msgstr "Fel" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1195 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:688 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1164 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:687 msgid "Reset" msgstr "Alaphelyzet" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1212 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:705 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1181 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:704 msgid "Exceeded" msgstr "Túllépte" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1318 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1287 msgid "Derailed" msgstr "Kisiklott" @@ -3262,138 +2987,138 @@ msgstr "" "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890 \",.-+|!$%&/" "()=?;:'_[]ÁÍŰŐÜÖÚÓÉáíűőüöúóé" -#: ../../RunActivity/Viewer3D/Processes/GameStateRunActivity.cs:379 +#: ../../RunActivity/Viewer3D/Processes/GameStateRunActivity.cs:367 msgid "Game save is not allowed during container load/unload" msgstr "Játékmentés nem lehetséges konténerrakodás közben" -#: ../../RunActivity/Viewer3D/Processes/GameStateRunActivity.cs:1270 +#: ../../RunActivity/Viewer3D/Processes/GameStateRunActivity.cs:1257 #, csharp-format msgid "Activity Save file '*.save' not found in folder {0}" msgstr "A {0} könyvtár nem tartalmaz '*.save' mentést" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:437 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:406 msgid "freight-grain" msgstr "szemestermény" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:438 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:407 msgid "freight-coal" msgstr "szén" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:439 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:408 msgid "freight-gravel" msgstr "kavics" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:440 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:409 msgid "freight-sand" msgstr "homok" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:443 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:412 msgid "diesel oil" msgstr "dízelolaj" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:444 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:413 msgid "wood" msgstr "fa" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:445 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:414 msgid "sand" msgstr "homok" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:446 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:415 msgid "freight-general" msgstr "vegyesteher" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:447 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:416 msgid "freight-livestock" msgstr "élőállat" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:448 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:417 msgid "freight-fuel" msgstr "olaj" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:449 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:418 msgid "freight-milk" msgstr "tej" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:450 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:419 msgid "mail" msgstr "posta" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:451 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:420 msgid "container" msgstr "konténer" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:599 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:568 msgid "Refill: Immediate refill process selected, refilling immediately." msgstr "Feltöltés: Azonnali feltöltés aktiválva." -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:620 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:589 msgid "Refill: Electric loco and no pickup. Command rejected" msgstr "Feltöltés: Villanymozdony üzemanyag nélkül. Parancs visszautasítva" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:780 -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:799 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:749 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:768 msgid "Incompatible pickup type" msgstr "Nem megfelelő üzemanyag" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:786 -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:804 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:755 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:773 msgid "Starting refill" msgstr "A feltöltés megkezdődött" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:630 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:599 #, csharp-format msgid "Container crane: Distance to {0} supply is {1}." msgstr "Konténerdaru: Távolság a {0}ig {1}." -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:641 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:610 #, csharp-format msgid "Refill: Distance to {0} supply is {1}." msgstr "Feltöltés: A {0} töltőhelyétől való távolság {1}." -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:651 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:620 #, csharp-format msgid "Refill: Loco must be stationary to refill {0}." msgstr "" "Feltöltés: A mozdonynak álló helyzetben kell lennie a {0} feltöltéséhez." -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:657 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:626 #, csharp-format msgid "Refill: Loco speed must exceed {0}." msgstr "Feltöltés: A mozdony sebességének magasabbnak kell lennie {0}-nál." -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:664 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:633 #, csharp-format msgid "Refill: Loco speed must not exceed {0}." msgstr "Feltöltés: A mozdony sebessége nem lehet több {0}-nál." -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:682 -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:703 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:651 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:672 #, csharp-format msgid "Refill: {0} supply now replenished." msgstr "Feltöltés: A {0} feltöltve a vételezési helyen." -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:709 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:678 #, csharp-format msgid "Unload: {0} fuel or freight now unloaded." msgstr "Lerakodás: {0} áru kirakodva." -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:727 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:696 msgid "wag file not equipped for containers" msgstr "A wag fájl nincs felkészítve konténerekre" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:732 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:701 #, csharp-format msgid "{0} now loaded." msgstr "{0} felrakodva." -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:738 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:707 #, csharp-format msgid "{0} now unloaded." msgstr "{0} lerakodva." -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:631 -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:642 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:600 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:611 #, csharp-format msgid "{0} meter" msgid_plural "{0} meters" @@ -3454,18 +3179,6 @@ msgstr "Mérföldkő" msgid "Dist" msgstr "Táv" -#~ msgid "Confirmations visible" -#~ msgstr "Visszajelzések láthatóak" - -#~ msgid "Wag Adhesion" -#~ msgstr "Vagon tapadása" - -#~ msgid "Tang. Force" -#~ msgstr "Kerületi erő" - -#~ msgid "Static Force" -#~ msgstr "Statikus erő" - #~ msgid "Solver" #~ msgstr "Számítóképlet" @@ -3580,6 +3293,12 @@ msgstr "Táv" #~ msgid "Dispatcher does not allow hand throw at this time" #~ msgstr "A forgalomirányító nem engedi a váltó kézi állítását pillanatnyilag" +#~ msgid "main route" +#~ msgstr "fővágány" + +#~ msgid "side route" +#~ msgstr "mellékvágány" + #~ msgid "You are the new dispatcher. Enjoy!" #~ msgstr "Te vagy az új forgalomirányító. Élvezd!" @@ -3607,6 +3326,9 @@ msgstr "Táv" #~ msgstr "" #~ "Mostantól alirányító vagy, képes leszel kezelni a váltókat és jelzőket." +#~ msgid "You are no longer an assistant." +#~ msgstr "Nem vagy többé alirányító" + #~ msgid "Switched, current route is {0}" #~ msgstr "Átváltva, a beállított vágány a {0}" @@ -4205,6 +3927,9 @@ msgstr "Táv" #~ msgid "Steam Usage" #~ msgstr "Gőzfelhasználás" +#~ msgid "Usage:" +#~ msgstr "Felhaszn:" + #~ msgid "Cyl" #~ msgstr "Henger" @@ -4444,6 +4169,10 @@ msgstr "Táv" #~ msgid "Oil" #~ msgstr "Olaj" +#~ msgctxt "Engine" +#~ msgid "Stopped" +#~ msgstr "Leállítva" + #~ msgctxt "Engine" #~ msgid "Starting" #~ msgstr "Indul" @@ -4459,6 +4188,12 @@ msgstr "Táv" #~ msgid "Held for connecting train : " #~ msgstr "Várakoztatás csatlakozó vonat miatt: " +#~ msgid "Left" +#~ msgstr "Bal" + +#~ msgid "Right" +#~ msgstr "Jobb" + #~ msgid "Compound locomotive" #~ msgstr "Kompaund mozdony" diff --git a/Source/Locales/Updater/Updater.pot b/Source/Locales/Updater/Updater.pot index 2b6360cbe1..487f961e53 100644 --- a/Source/Locales/Updater/Updater.pot +++ b/Source/Locales/Updater/Updater.pot @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2023-08-25 09:18:16+0200\n" -"PO-Revision-Date: 2023-08-25 09:18:16+0200\n" +"POT-Creation-Date: 2022-04-12 14:33:18-0300\n" +"PO-Revision-Date: 2022-04-12 14:33:18-0300\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" From f67581cc482a8dec5929f50d75c790f650bc6e77 Mon Sep 17 00:00:00 2001 From: Looky1173 Date: Sun, 27 Aug 2023 12:16:43 +0200 Subject: [PATCH 22/33] Updated themes --- .../Viewer3D/Debugging/DebugViewerBetaForm.cs | 10 +++- .../Viewer3D/Debugging/MapThemeProvider.cs | 55 +++++++++++++++++-- 2 files changed, 57 insertions(+), 8 deletions(-) diff --git a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs index 0b6006ec21..19e513bda5 100644 --- a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs +++ b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs @@ -27,6 +27,7 @@ public partial class DispatchViewerBeta : Form public readonly Simulator simulator; private readonly MapDataProvider MapDataProvider; private readonly MapThemeProvider MapThemeProvider; + private string ThemeName = "light"; private ThemeStyle Theme; /// /// Used to periodically check if we should shift the view when the @@ -140,7 +141,7 @@ void InitializeForm() { MapDataProvider.SetControls(); MapThemeProvider.InitializeThemes(); - Theme = MapThemeProvider.LightTheme; + Theme = MapThemeProvider.GetTheme(ThemeName); float[] dashPattern = { 4, 2 }; ZoomTargetPen.DashPattern = dashPattern; @@ -1714,7 +1715,12 @@ private void DispatchViewerBeta_Resize(object sender, EventArgs e) private void rotateThemesButton_Click(object sender, EventArgs e) { - Theme = Theme == MapThemeProvider.LightTheme ? MapThemeProvider.DarkTheme : MapThemeProvider.LightTheme; + // Cycles through the array of available themes + string[] themes = MapThemeProvider.GetThemes(); + int i = Array.IndexOf(themes, ThemeName); + ThemeName = i >= 0 && i < themes.Length - 1 ? themes[i + 1] : themes[0]; + + Theme = MapThemeProvider.GetTheme(ThemeName); ApplyThemeRecursively(this); MapCanvasColor = Theme.MapCanvasColor; diff --git a/Source/RunActivity/Viewer3D/Debugging/MapThemeProvider.cs b/Source/RunActivity/Viewer3D/Debugging/MapThemeProvider.cs index a338d517f2..76209a87ef 100644 --- a/Source/RunActivity/Viewer3D/Debugging/MapThemeProvider.cs +++ b/Source/RunActivity/Viewer3D/Debugging/MapThemeProvider.cs @@ -1,16 +1,15 @@ -using System.Drawing; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; using System.Windows.Forms; namespace Orts.Viewer3D.Debugging { public class MapThemeProvider { - public ThemeStyle LightTheme; - public ThemeStyle DarkTheme; - public void InitializeThemes() { - LightTheme = new ThemeStyle + ThemeStyle LightTheme = new ThemeStyle { BackColor = Color.Transparent, ForeColor = SystemColors.ControlText, @@ -20,7 +19,7 @@ public void InitializeThemes() TrackColor = Color.FromArgb(46, 64, 83), }; - DarkTheme = new ThemeStyle + ThemeStyle DarkTheme = new ThemeStyle { BackColor = Color.FromArgb(44, 62, 80), ForeColor = Color.FromArgb(247, 249, 249), @@ -29,6 +28,50 @@ public void InitializeThemes() MapCanvasColor = Color.FromArgb(44, 62, 80), TrackColor = Color.FromArgb(234, 236, 238), }; + + // Reference for "solarized" themes: https://github.com/altercation/solarized?tab=readme-ov-file#the-values + ThemeStyle LightSolarizedTheme = new ThemeStyle + { + BackColor = Color.FromArgb(253, 246, 227), + ForeColor = Color.FromArgb(101, 123, 131), + PanelBackColor = Color.FromArgb(238, 232, 213), + FlatStyle = FlatStyle.Flat, + MapCanvasColor = Color.FromArgb(253, 246, 227), + TrackColor = Color.FromArgb(88, 110, 117), + }; + + ThemeStyle DarkSolarizedTheme = new ThemeStyle + { + BackColor = Color.FromArgb(0, 43, 54), + ForeColor = Color.FromArgb(131, 148, 150), + PanelBackColor = Color.FromArgb(28, 40, 51), + FlatStyle = FlatStyle.Flat, + MapCanvasColor = Color.FromArgb(0, 43, 54), + TrackColor = Color.FromArgb(147, 161, 161), + }; + + Themes.Add("light", LightTheme); + Themes.Add("light-solarized", LightSolarizedTheme); + Themes.Add("dark-solarized", DarkSolarizedTheme); + Themes.Add("dark", DarkTheme); + } + + private Dictionary Themes = new Dictionary(); + + public ThemeStyle GetTheme(string themeName) + { + if (Themes.TryGetValue(themeName, out ThemeStyle theme)) + { + return theme; + } + + // Handle the case when the theme doesn't exist + return null; + } + + public string[] GetThemes() + { + return Themes.Keys.ToArray(); } } From 9d8513a00cde0f3413c70aa34589deed5165826e Mon Sep 17 00:00:00 2001 From: Looky1173 Date: Sun, 27 Aug 2023 16:37:41 +0200 Subject: [PATCH 23/33] Fixed static consists not showing up on map --- .../Viewer3D/Debugging/DebugViewerBetaForm.cs | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs index 19e513bda5..75860ec002 100644 --- a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs +++ b/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs @@ -12,6 +12,7 @@ using Orts.Simulation.Physics; using Orts.Simulation.RollingStocks; using Orts.Simulation.Signalling; +using Orts.Simulation.Timetables; using Orts.Viewer3D.Popups; using ORTS.Common; using Color = System.Drawing.Color; @@ -498,18 +499,12 @@ private void DrawTrains(Graphics g, PointF scaledA, PointF scaledB) if (simulator.TimetableMode) { // Add the player's train... - if (simulator.PlayerLocomotive.Train is Simulation.AIs.AITrain) - selectedTrainList.Add(simulator.PlayerLocomotive.Train as Simulation.AIs.AITrain); + if (simulator.PlayerLocomotive.Train is AITrain) + selectedTrainList.Add(simulator.PlayerLocomotive.Train as AITrain); - // ...then all the AI trains... + // ...then all the AI trains, including static consists. foreach (AITrain train in simulator.AI.AITrains) selectedTrainList.Add(train); - - // ...and finally the static consists. - foreach (Train staticConsist in simulator.Trains.Where(c => c.TrainType == Train.TRAINTYPE.STATIC)) - { - selectedTrainList.Add(staticConsist); - } } else { @@ -675,7 +670,7 @@ private void SetTrainColor(Train t, TrainCar locoCar, TrainCar car) trainPen.Color = car is MSTSLocomotive ? Color.FromArgb(153, 128, 0) : Color.FromArgb(0, 153, 0); } - if (t.TrainType == Train.TRAINTYPE.STATIC) + if (t.TrainType == Train.TRAINTYPE.STATIC || (t.TrainType == Train.TRAINTYPE.AI && t.GetAIMovementState() == AITrain.AI_MOVEMENT_STATE.AI_STATIC)) { trainPen.Color = Color.FromArgb(83, 237, 214); } @@ -692,7 +687,7 @@ private void DrawTrainLabels(Graphics g, Train t, string trainName, TrainCar fir scaledTrain.Y = -25 + mapCanvas.Height - (((worldPos.TileZ * 2048) - subY + worldPos.Location.Z) * yScale); if (showActiveTrainsRadio.Checked) { - if (t is Simulation.AIs.AITrain && MapDataProvider.IsActiveTrain(t as Simulation.AIs.AITrain)) + if (t is AITrain && MapDataProvider.IsActiveTrain(t as AITrain)) ShowTrainNameAndState(g, scaledTrain, t, trainName); } else @@ -705,7 +700,7 @@ private void ShowTrainNameAndState(Graphics g, PointF scaledItem, Train t, strin { if (simulator.TimetableMode) { - if (t is Simulation.Timetables.TTTrain tTTrain) + if (t is TTTrain tTTrain) { // Remove name of timetable, e.g.: ":SCE" var lastPos = trainName.LastIndexOf(":"); From 9b0470aff57ee1ddf503200eb73ef8000ecc2048 Mon Sep 17 00:00:00 2001 From: Looky1173 Date: Mon, 28 Aug 2023 15:55:31 +0200 Subject: [PATCH 24/33] Renamed `DebugViewerBeta` to `MapViewer` --- Source/RunActivity/Program.cs | 2 +- .../{Debugging => Map}/MapDataProvider.cs | 25 ++++++++++--------- .../MapForm.Designer.cs} | 2 +- .../DebugViewerBetaForm.cs => Map/MapForm.cs} | 5 ++-- .../MapForm.resx} | 0 .../{Debugging => Map}/MapThemeProvider.cs | 12 ++++----- .../Viewer3D/Processes/GameStateViewer3D.cs | 2 +- 7 files changed, 25 insertions(+), 23 deletions(-) rename Source/RunActivity/Viewer3D/{Debugging => Map}/MapDataProvider.cs (93%) rename Source/RunActivity/Viewer3D/{Debugging/DebugViewerBetaForm.Designer.cs => Map/MapForm.Designer.cs} (99%) rename Source/RunActivity/Viewer3D/{Debugging/DebugViewerBetaForm.cs => Map/MapForm.cs} (99%) rename Source/RunActivity/Viewer3D/{Debugging/DebugViewerBetaForm.resx => Map/MapForm.resx} (100%) rename Source/RunActivity/Viewer3D/{Debugging => Map}/MapThemeProvider.cs (89%) diff --git a/Source/RunActivity/Program.cs b/Source/RunActivity/Program.cs index e6486add32..0781e0b889 100644 --- a/Source/RunActivity/Program.cs +++ b/Source/RunActivity/Program.cs @@ -42,7 +42,7 @@ static class Program public static Simulator Simulator; public static Viewer Viewer; public static DispatchViewer DebugViewer; - public static DispatchViewerBeta DebugViewerBeta; + public static MapViewer DebugViewerBeta; public static SoundDebugForm SoundDebugForm; public static ORTraceListener ORTraceListener; public static string logFileName = ""; // contains path to file diff --git a/Source/RunActivity/Viewer3D/Debugging/MapDataProvider.cs b/Source/RunActivity/Viewer3D/Map/MapDataProvider.cs similarity index 93% rename from Source/RunActivity/Viewer3D/Debugging/MapDataProvider.cs rename to Source/RunActivity/Viewer3D/Map/MapDataProvider.cs index d48a885b53..88fb18c904 100644 --- a/Source/RunActivity/Viewer3D/Debugging/MapDataProvider.cs +++ b/Source/RunActivity/Viewer3D/Map/MapDataProvider.cs @@ -23,14 +23,15 @@ using Orts.MultiPlayer; using Orts.Simulation.Physics; using Orts.Simulation.Signalling; +using Orts.Viewer3D.Debugging; -namespace Orts.Viewer3D.Debugging +namespace Orts.Viewer3D.Map { public class MapDataProvider { - public DispatchViewerBeta F { get; set; } // Shortest possible abbreviation so code is easier to read + public MapViewer F { get; set; } // Shortest possible abbreviation so code is easier to read - public MapDataProvider(DispatchViewerBeta form) + public MapDataProvider(MapViewer form) { F = form; } @@ -92,7 +93,7 @@ public void PopulateItemLists() { var oldSiding = F.sidings[oldSidingIndex]; var oldLocation = oldSiding.Location; - var newLocation = new PointF((item.TileX * 2048) + item.X, (item.TileZ * 2048) + item.Z); + var newLocation = new PointF(item.TileX * 2048 + item.X, item.TileZ * 2048 + item.Z); // Because these are structs, not classes, compiler won't let you overwrite them. // Instead create a single item which replaces the 2 platform items. @@ -117,7 +118,7 @@ public void PopulateItemLists() { var newPlatform = new PlatformWidget(item as PlatformItem) { - Extent1 = new PointF((item.TileX * 2048) + item.X, (item.TileZ * 2048) + item.Z) + Extent1 = new PointF(item.TileX * 2048 + item.X, item.TileZ * 2048 + item.Z) }; F.platforms.Add(newPlatform); } @@ -125,7 +126,7 @@ public void PopulateItemLists() { var oldPlatform = F.platforms[oldPlatformIndex]; var oldLocation = oldPlatform.Location; - var newLocation = new PointF((item.TileX * 2048) + item.X, (item.TileZ * 2048) + item.Z); + var newLocation = new PointF(item.TileX * 2048 + item.X, item.TileZ * 2048 + item.Z); // Because these are structs, not classes, compiler won't let you overwrite them. // Instead create a single item which replaces the 2 platform items. @@ -174,7 +175,7 @@ private PointF GetMidPoint(PointF location1, PointF location2) private PointF GetRightHandPoint(PointF location1, PointF location2) { - return (location1.X > location2.X) ? location1 : location2; + return location1.X > location2.X ? location1 : location2; } public void ShowSimulationTime() @@ -203,9 +204,9 @@ public void FixForBadData(float width, ref PointF scaledA, ref PointF scaledB, P public bool IsActiveTrain(Simulation.AIs.AITrain t) { return t != null -&& ((t.MovementState != Simulation.AIs.AITrain.AI_MOVEMENT_STATE.AI_STATIC +&& (t.MovementState != Simulation.AIs.AITrain.AI_MOVEMENT_STATE.AI_STATIC && !(t.TrainType == Train.TRAINTYPE.AI_INCORPORATED && !t.IncorporatingTrain.IsPathless) - ) + || t.TrainType == Train.TRAINTYPE.PLAYER); } @@ -249,19 +250,19 @@ public float GetUnusedYLocation(float startX, float wantY, string name) const float noFreeSlotFound = -1f; var desiredPositionY = (int)(wantY / DispatchViewer.spacing); // The positionY of the ideal row for the text. - var endX = startX + (name.Length * F.trainFont.Size); + var endX = startX + name.Length * F.trainFont.Size; //out of drawing area if (endX < 0) return noFreeSlotFound; - int positionY = desiredPositionY; + var positionY = desiredPositionY; while (positionY >= 0 && positionY < F.alignedTextY.Length) { //if the line contains no text yet, put it there if (F.alignedTextNum[positionY] == 0) return SaveLabelLocation(startX, endX, positionY); - bool conflict = false; + var conflict = false; //check if it intersects with any labels already in this row for (var col = 0; col < F.alignedTextNum[positionY]; col++) diff --git a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs b/Source/RunActivity/Viewer3D/Map/MapForm.Designer.cs similarity index 99% rename from Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs rename to Source/RunActivity/Viewer3D/Map/MapForm.Designer.cs index ac55b15547..09e6111dd6 100644 --- a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.Designer.cs +++ b/Source/RunActivity/Viewer3D/Map/MapForm.Designer.cs @@ -1,6 +1,6 @@ namespace Orts.Viewer3D.Debugging { - partial class DispatchViewerBeta + partial class MapViewer { /// /// Required designer variable. diff --git a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs b/Source/RunActivity/Viewer3D/Map/MapForm.cs similarity index 99% rename from Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs rename to Source/RunActivity/Viewer3D/Map/MapForm.cs index 75860ec002..fc4d54bfba 100644 --- a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.cs +++ b/Source/RunActivity/Viewer3D/Map/MapForm.cs @@ -13,13 +13,14 @@ using Orts.Simulation.RollingStocks; using Orts.Simulation.Signalling; using Orts.Simulation.Timetables; +using Orts.Viewer3D.Map; using Orts.Viewer3D.Popups; using ORTS.Common; using Color = System.Drawing.Color; namespace Orts.Viewer3D.Debugging { - public partial class DispatchViewerBeta : Form + public partial class MapViewer : Form { #region Variables /// @@ -104,7 +105,7 @@ public partial class DispatchViewerBeta : Form private bool MapCustomizationVisible = false; #endregion - public DispatchViewerBeta(Simulator simulator, Viewer viewer) + public MapViewer(Simulator simulator, Viewer viewer) { InitializeComponent(); diff --git a/Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.resx b/Source/RunActivity/Viewer3D/Map/MapForm.resx similarity index 100% rename from Source/RunActivity/Viewer3D/Debugging/DebugViewerBetaForm.resx rename to Source/RunActivity/Viewer3D/Map/MapForm.resx diff --git a/Source/RunActivity/Viewer3D/Debugging/MapThemeProvider.cs b/Source/RunActivity/Viewer3D/Map/MapThemeProvider.cs similarity index 89% rename from Source/RunActivity/Viewer3D/Debugging/MapThemeProvider.cs rename to Source/RunActivity/Viewer3D/Map/MapThemeProvider.cs index 76209a87ef..a975b28304 100644 --- a/Source/RunActivity/Viewer3D/Debugging/MapThemeProvider.cs +++ b/Source/RunActivity/Viewer3D/Map/MapThemeProvider.cs @@ -3,13 +3,13 @@ using System.Linq; using System.Windows.Forms; -namespace Orts.Viewer3D.Debugging +namespace Orts.Viewer3D.Map { public class MapThemeProvider { public void InitializeThemes() { - ThemeStyle LightTheme = new ThemeStyle + var LightTheme = new ThemeStyle { BackColor = Color.Transparent, ForeColor = SystemColors.ControlText, @@ -19,7 +19,7 @@ public void InitializeThemes() TrackColor = Color.FromArgb(46, 64, 83), }; - ThemeStyle DarkTheme = new ThemeStyle + var DarkTheme = new ThemeStyle { BackColor = Color.FromArgb(44, 62, 80), ForeColor = Color.FromArgb(247, 249, 249), @@ -30,7 +30,7 @@ public void InitializeThemes() }; // Reference for "solarized" themes: https://github.com/altercation/solarized?tab=readme-ov-file#the-values - ThemeStyle LightSolarizedTheme = new ThemeStyle + var LightSolarizedTheme = new ThemeStyle { BackColor = Color.FromArgb(253, 246, 227), ForeColor = Color.FromArgb(101, 123, 131), @@ -40,7 +40,7 @@ public void InitializeThemes() TrackColor = Color.FromArgb(88, 110, 117), }; - ThemeStyle DarkSolarizedTheme = new ThemeStyle + var DarkSolarizedTheme = new ThemeStyle { BackColor = Color.FromArgb(0, 43, 54), ForeColor = Color.FromArgb(131, 148, 150), @@ -60,7 +60,7 @@ public void InitializeThemes() public ThemeStyle GetTheme(string themeName) { - if (Themes.TryGetValue(themeName, out ThemeStyle theme)) + if (Themes.TryGetValue(themeName, out var theme)) { return theme; } diff --git a/Source/RunActivity/Viewer3D/Processes/GameStateViewer3D.cs b/Source/RunActivity/Viewer3D/Processes/GameStateViewer3D.cs index 5ad00ab347..dbe07a6515 100644 --- a/Source/RunActivity/Viewer3D/Processes/GameStateViewer3D.cs +++ b/Source/RunActivity/Viewer3D/Processes/GameStateViewer3D.cs @@ -56,7 +56,7 @@ internal override void BeginRender(RenderFrame frame) Program.DebugViewer.Hide(); Viewer.DebugViewerEnabled = false; - Program.DebugViewerBeta = new DispatchViewerBeta(Viewer.Simulator, Viewer); + Program.DebugViewerBeta = new MapViewer(Viewer.Simulator, Viewer); Program.DebugViewerBeta.Hide(); Viewer.DebugViewerBetaEnabled = false; From 4a5484ed87c7ee91ce5d009fa895353d968c3851 Mon Sep 17 00:00:00 2001 From: Looky1173 Date: Mon, 28 Aug 2023 18:44:46 +0200 Subject: [PATCH 25/33] Fixed static consists without a lead locomotive not appearing in Map window --- Source/RunActivity/Viewer3D/Map/MapForm.cs | 23 +++++++++++----------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/Source/RunActivity/Viewer3D/Map/MapForm.cs b/Source/RunActivity/Viewer3D/Map/MapForm.cs index fc4d54bfba..ea447c3034 100644 --- a/Source/RunActivity/Viewer3D/Map/MapForm.cs +++ b/Source/RunActivity/Viewer3D/Map/MapForm.cs @@ -497,7 +497,7 @@ private void DrawTrains(Graphics g, PointF scaledA, PointF scaledB) selectedTrainList.Clear(); - if (simulator.TimetableMode) + /*if (simulator.TimetableMode) { // Add the player's train... if (simulator.PlayerLocomotive.Train is AITrain) @@ -508,10 +508,10 @@ private void DrawTrains(Graphics g, PointF scaledA, PointF scaledB) selectedTrainList.Add(train); } else - { + {*/ foreach (var train in simulator.Trains) selectedTrainList.Add(train); - } + /*}*/ foreach (var train in selectedTrainList) { @@ -533,7 +533,7 @@ private void DrawTrains(Graphics g, PointF scaledA, PointF scaledB) // Skip trains with no loco if (locoCar == null) - continue; + locoCar = train.Cars[0]; } else continue; @@ -544,8 +544,7 @@ private void DrawTrains(Graphics g, PointF scaledA, PointF scaledB) float y = mapCanvas.Height - (((loc.TileZ * 2048) + loc.Location.Z - subY) * yScale); // If train out of view then skip it. - if (x < -margin2 - || y < -margin2) + if (x < -margin2 || y < -margin2) continue; DrawTrainPath(train, subX, subY, pathPen, g, scaledA, scaledB, pDist, mDist); @@ -574,7 +573,7 @@ private void DrawTrains(Graphics g, PointF scaledA, PointF scaledB) Y = -25 + mapCanvas.Height - (((worldPos.TileZ * 2048) - subY + worldPos.Location.Z) * yScale) }; if (showTrainLabelsCheckbox.Checked) - DrawTrainLabels(g, train, trainName, locoCar, scaledTrain); + DrawTrainLabels(g, train, trainName, scaledTrain); } } @@ -603,7 +602,7 @@ private void DrawCar(Graphics g, Train train, TrainCar car, TrainCar locoCar, fl if (x < -margin || y < -margin) return; - t.Move(-car.CarLengthM + (1 / xScale)); // Move from front of car to rear less 1 pixel to create a visible gap + t.Move(-car.CarLengthM + (2 / xScale)); // Move from front of car to rear less 1 pixel to create a visible gap // TODO: investigate `(1 / xScale)` ==> `(2 / xScale)` car gap consequences scaledTrain.X = x; scaledTrain.Y = y; } else // Draw the train as 2 boxes of fixed size @@ -673,7 +672,7 @@ private void SetTrainColor(Train t, TrainCar locoCar, TrainCar car) if (t.TrainType == Train.TRAINTYPE.STATIC || (t.TrainType == Train.TRAINTYPE.AI && t.GetAIMovementState() == AITrain.AI_MOVEMENT_STATE.AI_STATIC)) { - trainPen.Color = Color.FromArgb(83, 237, 214); + trainPen.Color = car is MSTSLocomotive ? Color.FromArgb(19, 185, 160) : Color.FromArgb(83, 237, 214); } // Draw player train with loco in red @@ -681,11 +680,11 @@ private void SetTrainColor(Train t, TrainCar locoCar, TrainCar car) trainPen.Color = Color.Red; } - private void DrawTrainLabels(Graphics g, Train t, string trainName, TrainCar firstCar, PointF scaledTrain) + private void DrawTrainLabels(Graphics g, Train t, string trainName, PointF scaledTrain) { - WorldPosition worldPos = firstCar.WorldPosition; + /*WorldPosition worldPos = firstCar.WorldPosition; scaledTrain.X = ((worldPos.TileX * 2048) - subX + worldPos.Location.X) * xScale; - scaledTrain.Y = -25 + mapCanvas.Height - (((worldPos.TileZ * 2048) - subY + worldPos.Location.Z) * yScale); + scaledTrain.Y = -25 + mapCanvas.Height - (((worldPos.TileZ * 2048) - subY + worldPos.Location.Z) * yScale);*/ if (showActiveTrainsRadio.Checked) { if (t is AITrain && MapDataProvider.IsActiveTrain(t as AITrain)) From 776d6df1dd86f9c3b5cc679b9e3e244a0f7e134d Mon Sep 17 00:00:00 2001 From: Looky1173 Date: Mon, 28 Aug 2023 19:00:37 +0200 Subject: [PATCH 26/33] Format --- .../Viewer3D/Map/MapDataProvider.cs | 10 +++++----- Source/RunActivity/Viewer3D/Map/MapForm.cs | 19 ++++++------------- .../Viewer3D/Map/MapThemeProvider.cs | 2 +- 3 files changed, 12 insertions(+), 19 deletions(-) diff --git a/Source/RunActivity/Viewer3D/Map/MapDataProvider.cs b/Source/RunActivity/Viewer3D/Map/MapDataProvider.cs index 88fb18c904..19997dbe99 100644 --- a/Source/RunActivity/Viewer3D/Map/MapDataProvider.cs +++ b/Source/RunActivity/Viewer3D/Map/MapDataProvider.cs @@ -93,7 +93,7 @@ public void PopulateItemLists() { var oldSiding = F.sidings[oldSidingIndex]; var oldLocation = oldSiding.Location; - var newLocation = new PointF(item.TileX * 2048 + item.X, item.TileZ * 2048 + item.Z); + var newLocation = new PointF((item.TileX * 2048) + item.X, (item.TileZ * 2048) + item.Z); // Because these are structs, not classes, compiler won't let you overwrite them. // Instead create a single item which replaces the 2 platform items. @@ -118,7 +118,7 @@ public void PopulateItemLists() { var newPlatform = new PlatformWidget(item as PlatformItem) { - Extent1 = new PointF(item.TileX * 2048 + item.X, item.TileZ * 2048 + item.Z) + Extent1 = new PointF((item.TileX * 2048) + item.X, (item.TileZ * 2048) + item.Z) }; F.platforms.Add(newPlatform); } @@ -126,7 +126,7 @@ public void PopulateItemLists() { var oldPlatform = F.platforms[oldPlatformIndex]; var oldLocation = oldPlatform.Location; - var newLocation = new PointF(item.TileX * 2048 + item.X, item.TileZ * 2048 + item.Z); + var newLocation = new PointF((item.TileX * 2048) + item.X, (item.TileZ * 2048) + item.Z); // Because these are structs, not classes, compiler won't let you overwrite them. // Instead create a single item which replaces the 2 platform items. @@ -206,7 +206,7 @@ public bool IsActiveTrain(Simulation.AIs.AITrain t) return t != null && (t.MovementState != Simulation.AIs.AITrain.AI_MOVEMENT_STATE.AI_STATIC && !(t.TrainType == Train.TRAINTYPE.AI_INCORPORATED && !t.IncorporatingTrain.IsPathless) - + || t.TrainType == Train.TRAINTYPE.PLAYER); } @@ -250,7 +250,7 @@ public float GetUnusedYLocation(float startX, float wantY, string name) const float noFreeSlotFound = -1f; var desiredPositionY = (int)(wantY / DispatchViewer.spacing); // The positionY of the ideal row for the text. - var endX = startX + name.Length * F.trainFont.Size; + var endX = startX + (name.Length * F.trainFont.Size); //out of drawing area if (endX < 0) return noFreeSlotFound; diff --git a/Source/RunActivity/Viewer3D/Map/MapForm.cs b/Source/RunActivity/Viewer3D/Map/MapForm.cs index ea447c3034..2d5223f8dc 100644 --- a/Source/RunActivity/Viewer3D/Map/MapForm.cs +++ b/Source/RunActivity/Viewer3D/Map/MapForm.cs @@ -46,8 +46,6 @@ public partial class MapViewer : Form public float xScale = 1; // pixels / metre public float yScale = 1; // pixels / metre - readonly string name = ""; - public List switchItemsDrawn; public List signalItemsDrawn; public SwitchWidget switchPickedItem; @@ -509,8 +507,8 @@ private void DrawTrains(Graphics g, PointF scaledA, PointF scaledB) } else {*/ - foreach (var train in simulator.Trains) - selectedTrainList.Add(train); + foreach (var train in simulator.Trains) + selectedTrainList.Add(train); /*}*/ foreach (var train in selectedTrainList) @@ -659,16 +657,11 @@ private void SetTrainColor(Train t, TrainCar locoCar, TrainCar car) // inactive loco: RGB 153,128,0 // active car: RGB 0,204,0 // inactive car: RGB 0,153,0 - if (MapDataProvider.IsActiveTrain(t as AITrain)) - { - trainPen.Color = car is MSTSLocomotive + trainPen.Color = MapDataProvider.IsActiveTrain(t as AITrain) + ? car is MSTSLocomotive ? (car == locoCar) ? Color.FromArgb(204, 170, 0) : Color.FromArgb(153, 128, 0) - : Color.FromArgb(0, 204, 0); - } - else - { - trainPen.Color = car is MSTSLocomotive ? Color.FromArgb(153, 128, 0) : Color.FromArgb(0, 153, 0); - } + : Color.FromArgb(0, 204, 0) + : car is MSTSLocomotive ? Color.FromArgb(153, 128, 0) : Color.FromArgb(0, 153, 0); if (t.TrainType == Train.TRAINTYPE.STATIC || (t.TrainType == Train.TRAINTYPE.AI && t.GetAIMovementState() == AITrain.AI_MOVEMENT_STATE.AI_STATIC)) { diff --git a/Source/RunActivity/Viewer3D/Map/MapThemeProvider.cs b/Source/RunActivity/Viewer3D/Map/MapThemeProvider.cs index a975b28304..77c4b8602b 100644 --- a/Source/RunActivity/Viewer3D/Map/MapThemeProvider.cs +++ b/Source/RunActivity/Viewer3D/Map/MapThemeProvider.cs @@ -56,7 +56,7 @@ public void InitializeThemes() Themes.Add("dark", DarkTheme); } - private Dictionary Themes = new Dictionary(); + private readonly Dictionary Themes = new Dictionary(); public ThemeStyle GetTheme(string themeName) { From 44ab637c30f603c2977ebebcbd7468fef1b1da8c Mon Sep 17 00:00:00 2001 From: Looky1173 Date: Tue, 24 Oct 2023 12:01:55 +0200 Subject: [PATCH 27/33] Reimplemented player actions and basic messaging --- Source/RunActivity/Program.cs | 2 +- .../Viewer3D/Map/MapForm.Designer.cs | 203 ++++---- Source/RunActivity/Viewer3D/Map/MapForm.cs | 448 ++++++++++++++---- Source/RunActivity/Viewer3D/Map/MapForm.resx | 5 +- .../Viewer3D/Processes/GameStateViewer3D.cs | 4 +- Source/RunActivity/Viewer3D/Viewer.cs | 9 +- 6 files changed, 495 insertions(+), 176 deletions(-) diff --git a/Source/RunActivity/Program.cs b/Source/RunActivity/Program.cs index 0781e0b889..f19a588582 100644 --- a/Source/RunActivity/Program.cs +++ b/Source/RunActivity/Program.cs @@ -42,7 +42,7 @@ static class Program public static Simulator Simulator; public static Viewer Viewer; public static DispatchViewer DebugViewer; - public static MapViewer DebugViewerBeta; + public static MapViewer MapForm; public static SoundDebugForm SoundDebugForm; public static ORTraceListener ORTraceListener; public static string logFileName = ""; // contains path to file diff --git a/Source/RunActivity/Viewer3D/Map/MapForm.Designer.cs b/Source/RunActivity/Viewer3D/Map/MapForm.Designer.cs index 09e6111dd6..c67fcc1463 100644 --- a/Source/RunActivity/Viewer3D/Map/MapForm.Designer.cs +++ b/Source/RunActivity/Viewer3D/Map/MapForm.Designer.cs @@ -42,9 +42,9 @@ private void InitializeComponent() this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel(); this.messagesPanel = new System.Windows.Forms.Panel(); this.messages = new System.Windows.Forms.ListBox(); - this.button2 = new System.Windows.Forms.Button(); - this.button1 = new System.Windows.Forms.Button(); - this.textBox1 = new System.Windows.Forms.TextBox(); + this.messageAllButton = new System.Windows.Forms.Button(); + this.moreReplyOptionsButton = new System.Windows.Forms.Button(); + this.messageInput = new System.Windows.Forms.TextBox(); this.label2 = new System.Windows.Forms.Label(); this.canvasPanel = new System.Windows.Forms.Panel(); this.timeLabel = new System.Windows.Forms.Label(); @@ -70,11 +70,11 @@ private void InitializeComponent() this.multiplayerSettingsPanel = new System.Windows.Forms.Panel(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.penaltyCheckbox = new System.Windows.Forms.CheckBox(); - this.checkBox5 = new System.Windows.Forms.CheckBox(); + this.preferGreenCheckbox = new System.Windows.Forms.CheckBox(); this.allowJoiningCheckbox = new System.Windows.Forms.CheckBox(); this.mapSettingsPanel = new System.Windows.Forms.Panel(); this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.button5 = new System.Windows.Forms.Button(); + this.followMyTrainOnMap = new System.Windows.Forms.Button(); this.centerOnMyTrainButton = new System.Windows.Forms.Button(); this.seeTrainInGameButton = new System.Windows.Forms.Button(); this.label3 = new System.Windows.Forms.Label(); @@ -89,6 +89,7 @@ private void InitializeComponent() this.messageSelectedPlayerMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.replyToSelectedPlayerMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.playerActionsMenu = new System.Windows.Forms.ContextMenuStrip(this.components); + this.playerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.makeThisPlayerAnAssistantToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.jumpToThisPlayerInGameToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.followToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -105,6 +106,9 @@ private void InitializeComponent() this.proceedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.allowCallOnToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.trainActionsMenu = new System.Windows.Forms.ContextMenuStrip(this.components); + this.jumpToThisTrainInGameToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.followThisTrainOnTheMapToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.playerRolePanel.SuspendLayout(); this.tableLayoutPanel1.SuspendLayout(); this.tableLayoutPanel2.SuspendLayout(); @@ -125,6 +129,7 @@ private void InitializeComponent() this.playerActionsMenu.SuspendLayout(); this.setSwitchMenu.SuspendLayout(); this.setSignalMenu.SuspendLayout(); + this.trainActionsMenu.SuspendLayout(); this.SuspendLayout(); // // playerRolePanel @@ -221,9 +226,9 @@ private void InitializeComponent() | System.Windows.Forms.AnchorStyles.Right))); this.messagesPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.messagesPanel.Controls.Add(this.messages); - this.messagesPanel.Controls.Add(this.button2); - this.messagesPanel.Controls.Add(this.button1); - this.messagesPanel.Controls.Add(this.textBox1); + this.messagesPanel.Controls.Add(this.messageAllButton); + this.messagesPanel.Controls.Add(this.moreReplyOptionsButton); + this.messagesPanel.Controls.Add(this.messageInput); this.messagesPanel.Controls.Add(this.label2); this.messagesPanel.Location = new System.Drawing.Point(0, 0); this.messagesPanel.Margin = new System.Windows.Forms.Padding(0); @@ -245,41 +250,42 @@ private void InitializeComponent() this.messages.Size = new System.Drawing.Size(554, 97); this.messages.TabIndex = 5; // - // button2 - // - this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.button2.Enabled = false; - this.button2.Location = new System.Drawing.Point(421, 128); - this.button2.Margin = new System.Windows.Forms.Padding(0); - this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(126, 23); - this.button2.TabIndex = 4; - this.button2.Text = "Message all players"; - this.button2.UseVisualStyleBackColor = true; - // - // button1 - // - this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.button1.AutoSize = true; - this.button1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.button1.Enabled = false; - this.button1.Location = new System.Drawing.Point(547, 128); - this.button1.Margin = new System.Windows.Forms.Padding(0); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(23, 23); - this.button1.TabIndex = 3; - this.button1.Text = ">"; - this.button1.UseVisualStyleBackColor = true; - // - // textBox1 - // - this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + // messageAllButton + // + this.messageAllButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.messageAllButton.Location = new System.Drawing.Point(421, 128); + this.messageAllButton.Margin = new System.Windows.Forms.Padding(0); + this.messageAllButton.Name = "messageAllButton"; + this.messageAllButton.Size = new System.Drawing.Size(126, 23); + this.messageAllButton.TabIndex = 4; + this.messageAllButton.Text = "Message all players"; + this.messageAllButton.UseVisualStyleBackColor = true; + this.messageAllButton.Click += new System.EventHandler(this.messageAllButton_Click); + // + // moreReplyOptionsButton + // + this.moreReplyOptionsButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.moreReplyOptionsButton.AutoSize = true; + this.moreReplyOptionsButton.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.moreReplyOptionsButton.Location = new System.Drawing.Point(547, 128); + this.moreReplyOptionsButton.Margin = new System.Windows.Forms.Padding(0); + this.moreReplyOptionsButton.Name = "moreReplyOptionsButton"; + this.moreReplyOptionsButton.Size = new System.Drawing.Size(23, 23); + this.moreReplyOptionsButton.TabIndex = 3; + this.moreReplyOptionsButton.Text = ">"; + this.moreReplyOptionsButton.UseVisualStyleBackColor = true; + this.moreReplyOptionsButton.Click += new System.EventHandler(this.moreReplyOptionsButton_Click); + // + // messageInput + // + this.messageInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.textBox1.Enabled = false; - this.textBox1.Location = new System.Drawing.Point(16, 130); - this.textBox1.Name = "textBox1"; - this.textBox1.Size = new System.Drawing.Size(402, 20); - this.textBox1.TabIndex = 2; + this.messageInput.Location = new System.Drawing.Point(16, 130); + this.messageInput.Name = "messageInput"; + this.messageInput.Size = new System.Drawing.Size(402, 20); + this.messageInput.TabIndex = 2; + this.messageInput.Enter += new System.EventHandler(this.messageInput_Enter); + this.messageInput.Leave += new System.EventHandler(this.messageInput_Leave); // // label2 // @@ -556,7 +562,7 @@ private void InitializeComponent() // groupBox2 // this.groupBox2.Controls.Add(this.penaltyCheckbox); - this.groupBox2.Controls.Add(this.checkBox5); + this.groupBox2.Controls.Add(this.preferGreenCheckbox); this.groupBox2.Controls.Add(this.allowJoiningCheckbox); this.groupBox2.Location = new System.Drawing.Point(10, 0); this.groupBox2.Name = "groupBox2"; @@ -578,16 +584,18 @@ private void InitializeComponent() this.penaltyCheckbox.UseVisualStyleBackColor = true; this.penaltyCheckbox.CheckedChanged += new System.EventHandler(this.penaltyCheckbox_CheckedChanged); // - // checkBox5 + // preferGreenCheckbox // - this.checkBox5.AutoSize = true; - this.checkBox5.Enabled = false; - this.checkBox5.Location = new System.Drawing.Point(7, 38); - this.checkBox5.Name = "checkBox5"; - this.checkBox5.Size = new System.Drawing.Size(99, 17); - this.checkBox5.TabIndex = 1; - this.checkBox5.Text = "Prefer green (?)"; - this.checkBox5.UseVisualStyleBackColor = true; + this.preferGreenCheckbox.AutoSize = true; + this.preferGreenCheckbox.Checked = true; + this.preferGreenCheckbox.CheckState = System.Windows.Forms.CheckState.Checked; + this.preferGreenCheckbox.Location = new System.Drawing.Point(7, 38); + this.preferGreenCheckbox.Name = "preferGreenCheckbox"; + this.preferGreenCheckbox.Size = new System.Drawing.Size(119, 17); + this.preferGreenCheckbox.TabIndex = 1; + this.preferGreenCheckbox.Text = "Prefer green signals"; + this.preferGreenCheckbox.UseVisualStyleBackColor = true; + this.preferGreenCheckbox.CheckedChanged += new System.EventHandler(this.preferGreenCheckbox_CheckedChanged); // // allowJoiningCheckbox // @@ -615,7 +623,7 @@ private void InitializeComponent() // // groupBox1 // - this.groupBox1.Controls.Add(this.button5); + this.groupBox1.Controls.Add(this.followMyTrainOnMap); this.groupBox1.Controls.Add(this.centerOnMyTrainButton); this.groupBox1.Controls.Add(this.seeTrainInGameButton); this.groupBox1.Controls.Add(this.label3); @@ -630,16 +638,16 @@ private void InitializeComponent() this.groupBox1.TabStop = false; this.groupBox1.Text = "Map settings and controls"; // - // button5 + // followMyTrainOnMap // - this.button5.AutoSize = true; - this.button5.Enabled = false; - this.button5.Location = new System.Drawing.Point(7, 156); - this.button5.Name = "button5"; - this.button5.Size = new System.Drawing.Size(167, 23); - this.button5.TabIndex = 7; - this.button5.Text = "Follow my train on the map"; - this.button5.UseVisualStyleBackColor = true; + this.followMyTrainOnMap.AutoSize = true; + this.followMyTrainOnMap.Location = new System.Drawing.Point(7, 156); + this.followMyTrainOnMap.Name = "followMyTrainOnMap"; + this.followMyTrainOnMap.Size = new System.Drawing.Size(167, 23); + this.followMyTrainOnMap.TabIndex = 7; + this.followMyTrainOnMap.Text = "Follow my train on the map"; + this.followMyTrainOnMap.UseVisualStyleBackColor = true; + this.followMyTrainOnMap.Click += new System.EventHandler(this.followMyTrainOnMap_Click); // // centerOnMyTrainButton // @@ -655,7 +663,6 @@ private void InitializeComponent() // seeTrainInGameButton // this.seeTrainInGameButton.AutoSize = true; - this.seeTrainInGameButton.Enabled = false; this.seeTrainInGameButton.Location = new System.Drawing.Point(7, 98); this.seeTrainInGameButton.Name = "seeTrainInGameButton"; this.seeTrainInGameButton.Size = new System.Drawing.Size(167, 23); @@ -780,7 +787,6 @@ private void InitializeComponent() listViewItem3, listViewItem4}); this.playersView.Location = new System.Drawing.Point(7, 19); - this.playersView.MultiSelect = false; this.playersView.Name = "playersView"; this.playersView.Size = new System.Drawing.Size(167, 202); this.playersView.TabIndex = 1; @@ -790,67 +796,76 @@ private void InitializeComponent() // // messageActionsMenu // - this.messageActionsMenu.Enabled = false; this.messageActionsMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.messageSelectedPlayerMenuItem, this.replyToSelectedPlayerMenuItem}); this.messageActionsMenu.Name = "contextMenuStrip2"; this.messageActionsMenu.ShowImageMargin = false; this.messageActionsMenu.Size = new System.Drawing.Size(197, 48); + this.messageActionsMenu.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.messageActionsMenu_ItemClicked); // // messageSelectedPlayerMenuItem // this.messageSelectedPlayerMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.messageSelectedPlayerMenuItem.Enabled = false; this.messageSelectedPlayerMenuItem.Name = "messageSelectedPlayerMenuItem"; this.messageSelectedPlayerMenuItem.Size = new System.Drawing.Size(196, 22); + this.messageSelectedPlayerMenuItem.Tag = "message"; this.messageSelectedPlayerMenuItem.Text = "Message the selected player"; // // replyToSelectedPlayerMenuItem // this.replyToSelectedPlayerMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.replyToSelectedPlayerMenuItem.Enabled = false; this.replyToSelectedPlayerMenuItem.Name = "replyToSelectedPlayerMenuItem"; this.replyToSelectedPlayerMenuItem.Size = new System.Drawing.Size(196, 22); + this.replyToSelectedPlayerMenuItem.Tag = "reply"; this.replyToSelectedPlayerMenuItem.Text = "Reply to the selected player"; // // playerActionsMenu // - this.playerActionsMenu.Enabled = false; this.playerActionsMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.playerToolStripMenuItem, this.makeThisPlayerAnAssistantToolStripMenuItem, this.jumpToThisPlayerInGameToolStripMenuItem, this.followToolStripMenuItem, this.kickFromMultiplayerSessionToolStripMenuItem}); this.playerActionsMenu.Name = "contextMenuStrip3"; - this.playerActionsMenu.Size = new System.Drawing.Size(230, 92); + this.playerActionsMenu.Size = new System.Drawing.Size(230, 114); + this.playerActionsMenu.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.playerActionsMenu_ItemClicked); + // + // playerToolStripMenuItem + // + this.playerToolStripMenuItem.Enabled = false; + this.playerToolStripMenuItem.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold); + this.playerToolStripMenuItem.Name = "playerToolStripMenuItem"; + this.playerToolStripMenuItem.Size = new System.Drawing.Size(229, 22); + this.playerToolStripMenuItem.Text = "Player"; // // makeThisPlayerAnAssistantToolStripMenuItem // - this.makeThisPlayerAnAssistantToolStripMenuItem.Enabled = false; this.makeThisPlayerAnAssistantToolStripMenuItem.Name = "makeThisPlayerAnAssistantToolStripMenuItem"; this.makeThisPlayerAnAssistantToolStripMenuItem.Size = new System.Drawing.Size(229, 22); + this.makeThisPlayerAnAssistantToolStripMenuItem.Tag = "assistant"; this.makeThisPlayerAnAssistantToolStripMenuItem.Text = "Make this player an assistant"; // // jumpToThisPlayerInGameToolStripMenuItem // - this.jumpToThisPlayerInGameToolStripMenuItem.Enabled = false; this.jumpToThisPlayerInGameToolStripMenuItem.Name = "jumpToThisPlayerInGameToolStripMenuItem"; this.jumpToThisPlayerInGameToolStripMenuItem.Size = new System.Drawing.Size(229, 22); + this.jumpToThisPlayerInGameToolStripMenuItem.Tag = "seeInGame"; this.jumpToThisPlayerInGameToolStripMenuItem.Text = "Jump to this player in game"; // // followToolStripMenuItem // - this.followToolStripMenuItem.Enabled = false; this.followToolStripMenuItem.Name = "followToolStripMenuItem"; this.followToolStripMenuItem.Size = new System.Drawing.Size(229, 22); + this.followToolStripMenuItem.Tag = "followOnMap"; this.followToolStripMenuItem.Text = "Follow on the map"; // // kickFromMultiplayerSessionToolStripMenuItem // - this.kickFromMultiplayerSessionToolStripMenuItem.Enabled = false; this.kickFromMultiplayerSessionToolStripMenuItem.Name = "kickFromMultiplayerSessionToolStripMenuItem"; this.kickFromMultiplayerSessionToolStripMenuItem.Size = new System.Drawing.Size(229, 22); + this.kickFromMultiplayerSessionToolStripMenuItem.Tag = "kick"; this.kickFromMultiplayerSessionToolStripMenuItem.Text = "Kick from multiplayer session"; // // setSwitchMenu @@ -956,14 +971,37 @@ private void InitializeComponent() this.allowCallOnToolStripMenuItem.Tag = "callOn"; this.allowCallOnToolStripMenuItem.Text = "Allow call on"; // - // DispatchViewerBeta + // trainActionsMenu + // + this.trainActionsMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.jumpToThisTrainInGameToolStripMenuItem, + this.followThisTrainOnTheMapToolStripMenuItem}); + this.trainActionsMenu.Name = "trainActionsMenu"; + this.trainActionsMenu.Size = new System.Drawing.Size(223, 48); + this.trainActionsMenu.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.trainActionsMenu_ItemClicked); + // + // jumpToThisTrainInGameToolStripMenuItem + // + this.jumpToThisTrainInGameToolStripMenuItem.Name = "jumpToThisTrainInGameToolStripMenuItem"; + this.jumpToThisTrainInGameToolStripMenuItem.Size = new System.Drawing.Size(222, 22); + this.jumpToThisTrainInGameToolStripMenuItem.Tag = "seeInGame"; + this.jumpToThisTrainInGameToolStripMenuItem.Text = "Jump to this train in game"; + // + // followThisTrainOnTheMapToolStripMenuItem + // + this.followThisTrainOnTheMapToolStripMenuItem.Name = "followThisTrainOnTheMapToolStripMenuItem"; + this.followThisTrainOnTheMapToolStripMenuItem.Size = new System.Drawing.Size(222, 22); + this.followThisTrainOnTheMapToolStripMenuItem.Tag = "followOnMap"; + this.followThisTrainOnTheMapToolStripMenuItem.Text = "Follow this train on the map"; + // + // MapViewer // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(784, 561); this.Controls.Add(this.tableLayoutPanel1); this.MinimumSize = new System.Drawing.Size(600, 400); - this.Name = "DispatchViewerBeta"; + this.Name = "MapViewer"; this.Text = "Map window"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.DispatchViewerBeta_FormClosing); this.Resize += new System.EventHandler(this.DispatchViewerBeta_Resize); @@ -994,6 +1032,7 @@ private void InitializeComponent() this.playerActionsMenu.ResumeLayout(false); this.setSwitchMenu.ResumeLayout(false); this.setSignalMenu.ResumeLayout(false); + this.trainActionsMenu.ResumeLayout(false); this.ResumeLayout(false); } @@ -1008,9 +1047,9 @@ private void InitializeComponent() private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3; public System.Windows.Forms.Panel messagesPanel; private System.Windows.Forms.Label label2; - private System.Windows.Forms.Button button2; - private System.Windows.Forms.Button button1; - private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.Button messageAllButton; + private System.Windows.Forms.Button moreReplyOptionsButton; + private System.Windows.Forms.TextBox messageInput; private System.Windows.Forms.ContextMenuStrip messageActionsMenu; private System.Windows.Forms.ToolStripMenuItem messageSelectedPlayerMenuItem; private System.Windows.Forms.ToolStripMenuItem replyToSelectedPlayerMenuItem; @@ -1023,11 +1062,11 @@ private void InitializeComponent() public System.Windows.Forms.Panel multiplayerSettingsPanel; private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.CheckBox penaltyCheckbox; - private System.Windows.Forms.CheckBox checkBox5; + private System.Windows.Forms.CheckBox preferGreenCheckbox; private System.Windows.Forms.CheckBox allowJoiningCheckbox; private System.Windows.Forms.NumericUpDown mapResolutionUpDown; private System.Windows.Forms.Label label3; - private System.Windows.Forms.Button button5; + private System.Windows.Forms.Button followMyTrainOnMap; private System.Windows.Forms.Button centerOnMyTrainButton; private System.Windows.Forms.Button seeTrainInGameButton; public System.Windows.Forms.Panel playersPanel; @@ -1071,6 +1110,10 @@ private void InitializeComponent() private System.Windows.Forms.ToolStripMenuItem proceedToolStripMenuItem; private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; private System.Windows.Forms.ToolStripMenuItem allowCallOnToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem playerToolStripMenuItem; + private System.Windows.Forms.ContextMenuStrip trainActionsMenu; + private System.Windows.Forms.ToolStripMenuItem jumpToThisTrainInGameToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem followThisTrainOnTheMapToolStripMenuItem; } } diff --git a/Source/RunActivity/Viewer3D/Map/MapForm.cs b/Source/RunActivity/Viewer3D/Map/MapForm.cs index 2d5223f8dc..96b1c3badb 100644 --- a/Source/RunActivity/Viewer3D/Map/MapForm.cs +++ b/Source/RunActivity/Viewer3D/Map/MapForm.cs @@ -3,6 +3,7 @@ using System.Diagnostics; using System.Drawing; using System.Linq; +using System.Text.RegularExpressions; using System.Windows.Forms; using Microsoft.Xna.Framework; using Orts.Formats.Msts; @@ -32,8 +33,7 @@ public partial class MapViewer : Form private string ThemeName = "light"; private ThemeStyle Theme; /// - /// Used to periodically check if we should shift the view when the - /// user is holding down a "shift view" button. + /// Used to periodically check if we should shift the view when the user is holding down a "shift view" button. /// private readonly Timer UITimer; public Viewer Viewer; @@ -50,6 +50,7 @@ public partial class MapViewer : Form public List signalItemsDrawn; public SwitchWidget switchPickedItem; public SignalWidget signalPickedItem; + public TrainWidget trainPickedItem; public bool switchPickedItemHandled; public double switchPickedTime; public bool signalPickedItemHandled; @@ -59,7 +60,7 @@ public partial class MapViewer : Form public List selectedTrainList; /// - /// contains the last position of the mouse + /// Contains the last position of the mouse /// private System.Drawing.Point LastCursorPosition = new System.Drawing.Point(); @@ -84,8 +85,8 @@ public partial class MapViewer : Form public SolidBrush InactiveTrainBrush = new SolidBrush(Color.DarkRed); private Color MapCanvasColor = Color.White; - // the train selected by leftclicking the mouse - public Train PickedTrain; + // The train selected by clicking on it on the map or indirectly via the "follow" or "jump to" train options + public Train PickedTrain = Program.Simulator.PlayerLocomotive.Train; /// /// Defines the area to view, in meters. The left edge is meters from the leftmost extent of the route. /// @@ -120,20 +121,20 @@ public MapViewer(Simulator simulator, Viewer viewer) ViewWindow = new RectangleF(0, 0, 5000f, 5000f); mapResolutionUpDown.Accelerations.Add(new NumericUpDownAcceleration(1, 100)); - /*boxSetSignal.Items.Add("System Controlled"); - boxSetSignal.Items.Add("Stop"); - boxSetSignal.Items.Add("Approach"); - boxSetSignal.Items.Add("Proceed"); - chkAllowUserSwitch.Checked = false;*/ selectedTrainList = new List(); InitializeData(); InitializeImage(); + MPManager.Instance().MessageReceived += (sender, e) => + { + AddNewMessage(e.Time, e.Message); + }; + // Initialise the timer used to handle user input UITimer = new Timer(); UITimer.Interval = 100; - UITimer.Tick += new EventHandler(UITimer_Tick); + UITimer.Tick += new System.EventHandler(UITimer_Tick); UITimer.Start(); } @@ -254,69 +255,76 @@ public void AddPlayer(string name) PlayersList.Add(name); } - // TODO: Colour code players based on their roles - // TODO: FUNCTION NOT WORKING CORRECTLY + int DisconnectedPlayersCount = 0; + int AssistantPlayersCount = 0; public void CheckPlayers() { - if (!MPManager.IsMultiPlayer() || MPManager.OnlineTrains == null || MPManager.OnlineTrains.Players == null) return; + if (Dragging || !MPManager.IsMultiPlayer() || MPManager.OnlineTrains == null || MPManager.OnlineTrains.Players == null) return; var players = MPManager.OnlineTrains.Players; var username = MPManager.GetUserName(); players = players.Concat(MPManager.Instance().lostPlayer).ToDictionary(x => x.Key, x => x.Value); + Trace.TraceInformation("Players: {0}", players); + Trace.TraceInformation("DP: {0}; AP: {1}", MPManager.Instance().lostPlayer.Count, MPManager.Instance().aiderList.Count); + if (playersView.Items.Count == players.Count + 1 && DisconnectedPlayersCount == MPManager.Instance().lostPlayer.Count && AssistantPlayersCount == MPManager.Instance().aiderList.Count) return; + Trace.TraceInformation("Entered function!"); - bool PlayersListChanged = false; - - // Add myself - if (!PlayersList.Contains(username)) - { - AddPlayer(username); - PlayersListChanged = true; - } + DisconnectedPlayersCount = MPManager.Instance().lostPlayer.Count; + AssistantPlayersCount = MPManager.Instance().aiderList.Count; + // Repopuale `PlayersList` + PlayersList.Clear(); + AddPlayer(username); foreach (var p in players) { if (PlayersList.Contains(p.Key)) continue; AddPlayer(p.Key); - PlayersListChanged = true; + Trace.TraceInformation("Added player: {0}", p.Key); } - // Remove players from `PlayersList` if they are no longer on the server - foreach (var p in PlayersList.ToList()) // https://stackoverflow.com/a/604843/ - { - if (players.ContainsKey(p) || p == username) continue; - PlayersList.Remove(p); - PlayersListChanged = true; - } - - // If `PlayersList` hasn't changed since we've last checked, we should not clear/update - // `playersView` to avoid flickering - if (!PlayersListChanged) return; - playersView.Items.Clear(); Console.Beep(); foreach (var p in PlayersList) { + ListViewItem item = new ListViewItem(p); + if (p == username) - playersView.Items.Add(p); + { + item.Text += " [You]"; + item.Font = new Font(item.Font, FontStyle.Bold); + playersView.Items.Add(item); - if (MPManager.Instance().aiderList.Contains(p)) + } + else if (MPManager.Instance().aiderList.Contains(p)) { - playersView.Items.Add(p + " (Helper)"); + item.Text += " [Helper]"; + item.ForeColor = Color.FromArgb(40, 116, 166); + playersView.Items.Add(item); } else if (MPManager.Instance().lostPlayer.ContainsKey(p)) { - playersView.Items.Add(p + " (Disconnected)"); + item.Text += " [Disconnected]"; + item.ForeColor = SystemColors.GrayText; + playersView.Items.Add(item); } else { - playersView.Items.Add(p); + playersView.Items.Add(item); } } } + + static string TrimBracketsFromEnd(string input) + { + string pattern = @"\s\[[^\]]*\]\s*$"; + string result = Regex.Replace(input, pattern, ""); + + return result; + } #endregion #region Draw - public bool firstShow = true; - public bool followTrain; + public bool FirstShow = true; + public bool FollowTrain; public float subX, subY; public float oldWidth; public float oldHeight; @@ -325,7 +333,7 @@ public void CheckPlayers() /// Regenerates the 2D view. At the moment, examines the track network /// each time the view is drawn. Later, the traversal and drawing can be separated. /// - public void GenerateView(bool dragging = false) + public void GenerateView() { if (!Inited) return; @@ -333,29 +341,17 @@ public void GenerateView(bool dragging = false) if (showTimeCheckbox.Checked) MapDataProvider.ShowSimulationTime(); - if (mapCanvas.Image == null || firstShow) InitializeImage(); + if (mapCanvas.Image == null || FirstShow) InitializeImage(); - if (firstShow || followTrain) + if (FirstShow || FollowTrain) { - //see who should I look at: - //if the player is selected in the avatar list, show the player, otherwise, show the one with the lowest index - WorldPosition pos = Program.Simulator.PlayerLocomotive == null ? Program.Simulator.Trains.First().Cars.First().WorldPosition : Program.Simulator.PlayerLocomotive.WorldPosition; - if (playersView.SelectedIndices.Count > 0 && !playersView.SelectedIndices.Contains(0)) - { - int i = playersView.SelectedIndices.Cast().Min(); - string name = (playersView.Items[i].Text ?? "").Split(' ').First().Trim(); - if (MPManager.OnlineTrains.Players.TryGetValue(name, out OnlinePlayer player)) - pos = player?.Train?.Cars?.FirstOrDefault()?.WorldPosition; - else if (MPManager.Instance().lostPlayer.TryGetValue(name, out OnlinePlayer lost)) - pos = lost?.Train?.Cars?.FirstOrDefault()?.WorldPosition; - } - if (pos == null) - pos = PickedTrain?.Cars?.FirstOrDefault()?.WorldPosition; + WorldPosition pos = PickedTrain?.Cars?.FirstOrDefault()?.WorldPosition; + if (pos != null) { var ploc = new PointF((pos.TileX * 2048) + pos.Location.X, (pos.TileZ * 2048) + pos.Location.Z); ViewWindow.X = ploc.X - minX - (ViewWindow.Width / 2); ViewWindow.Y = ploc.Y - minY - (ViewWindow.Width / 2); - firstShow = false; + FirstShow = false; } } @@ -401,27 +397,24 @@ public void GenerateView(bool dragging = false) PointF scaledA, scaledB; DrawTrack(g, p, out scaledA, out scaledB); - if (Dragging == false) - { - // Draw trains and path - DrawTrains(g, scaledA, scaledB); + // Draw trains and path + DrawTrains(g, scaledA, scaledB); - // Keep widgetWidth <= 15 pixels - var widgetWidth = Math.Min(penWidth * 6, 15); + // Keep widgetWidth <= 15 pixels + var widgetWidth = Math.Min(penWidth * 6, 15); - // Draw signals on top of path so they are easier to see. - signalItemsDrawn.Clear(); - ShowSignals(g, scaledB, widgetWidth); + // Draw signals on top of path so they are easier to see. + signalItemsDrawn.Clear(); + ShowSignals(g, scaledB, widgetWidth); - // Draw switches - switchItemsDrawn.Clear(); - ShowSwitches(g, widgetWidth); + // Draw switches + switchItemsDrawn.Clear(); + ShowSwitches(g, widgetWidth); - // Draw labels for sidings and platforms last so they go on top for readability - MapDataProvider.CleanTextCells(); // Empty the listing of labels ready for adding labels again - ShowPlatformLabels(g); // Platforms take priority over sidings and signal states - ShowSidingLabels(g); - } + // Draw labels for sidings and platforms last so they go on top for readability + MapDataProvider.CleanTextCells(); // Empty the listing of labels ready for adding labels again + ShowPlatformLabels(g); // Platforms take priority over sidings and signal states + ShowSidingLabels(g); DrawZoomTarget(g); } @@ -1301,6 +1294,7 @@ private void mapCanvas_MouseDown(object sender, MouseEventArgs e) if (Dragging == false) { Dragging = true; + FollowTrain = false; Cursor.Current = Cursors.NoMove2D; } } @@ -1352,14 +1346,23 @@ private void mapCanvas_MouseUp(object sender, MouseEventArgs e) { switchPickedItem = widget; signalPickedItem = null; + trainPickedItem = null; HandlePickedSwitch(); } if (temp is SignalWidget widget1) { signalPickedItem = widget1; switchPickedItem = null; + trainPickedItem = null; HandlePickedSignal(); } + if (temp is TrainWidget widget2) + { + trainPickedItem = widget2; + signalPickedItem = null; + switchPickedItem = null; + HandlePickedTrain(); + } } else { @@ -1415,6 +1418,18 @@ private void HandlePickedSwitch() return; } + private void HandlePickedTrain() + { + trainActionsMenu.Visible = false; + if (trainPickedItem == null) return; + PickedTrain = trainPickedItem.Train; + trainActionsMenu.Show(Cursor.Position); + trainActionsMenu.Enabled = true; + trainActionsMenu.Focus(); + trainActionsMenu.Visible = true; + return; + } + private void setSignalMenu_ItemClicked(object sender, ToolStripItemClickedEventArgs e) { if (signalPickedItem == null) @@ -1426,8 +1441,8 @@ private void setSignalMenu_ItemClicked(object sender, ToolStripItemClickedEventA var signal = signalPickedItem.Signal; var type = e.ClickedItem.Tag.ToString(); - string[] signalAspects = { "system", "stop", "approach", "proceed" }; - int numericSignalAspect = Array.IndexOf(signalAspects, "stop"); + string[] signalAspects = { "system", "stop", "approach", "proceed", "callOn" }; + int numericSignalAspect = Array.IndexOf(signalAspects, type); if (MPManager.Instance().AmAider) { @@ -1606,6 +1621,48 @@ private ItemWidget findItemFromMouse(int x, int y, int range) return null; } + // TODO: Use this function to show additional data about hovered train + private ItemWidget searchForTrainOnMouseMove(int x, int y, int range) + { + if (range < 5) range = 5; + Train hoveredTrain = null; + TrainCar firstCar; + float tX, tY; + + foreach (var t in Program.Simulator.Trains) + { + firstCar = null; + if (t.LeadLocomotive != null) + { + worldPos = t.LeadLocomotive.WorldPosition; + firstCar = t.LeadLocomotive; + } + else if (t.Cars != null && t.Cars.Count > 0) + { + worldPos = t.Cars[0].WorldPosition; + firstCar = t.Cars[0]; + } + else + { + continue; + } + + worldPos = firstCar.WorldPosition; + tX = ((worldPos.TileX * 2048) - subX + worldPos.Location.X) * xScale; + tY = mapCanvas.Height - (((worldPos.TileZ * 2048) - subY + worldPos.Location.Z) * yScale); + float xSpeedCorr = Math.Abs(t.SpeedMpS) * xScale * 1.5f; + float ySpeedCorr = Math.Abs(t.SpeedMpS) * yScale * 1.5f; + + if (tX < x - range - xSpeedCorr || tX > x + range + xSpeedCorr || tY < y - range - ySpeedCorr || tY > y + range + ySpeedCorr) + continue; + + if (hoveredTrain == null) + hoveredTrain = t; + } + + return hoveredTrain != null ? new TrainWidget(hoveredTrain) : null; + } + private void mapCanvas_MouseMove(object sender, MouseEventArgs e) { if (Dragging && !Zooming) @@ -1666,26 +1723,38 @@ private void mapCustomizationButton_Click(object sender, EventArgs e) private void playersView_MouseClick(object sender, MouseEventArgs e) { - if (e.Button == MouseButtons.Right) + if (e.Button != MouseButtons.Right || playersView.FocusedItem == null || playersView.SelectedItems.Count != 1) return; + + var focusedItem = playersView.FocusedItem; + var player = TrimBracketsFromEnd(focusedItem.Text); + + if (focusedItem.Bounds.Contains(e.Location) && player != MPManager.GetUserName()) { - var focusedItem = playersView.FocusedItem; - if (focusedItem != null && focusedItem.Bounds.Contains(e.Location)) - { - playerActionsMenu.Show(Cursor.Position); - } + makeThisPlayerAnAssistantToolStripMenuItem.Text = MPManager.Instance().aiderList.Contains(player) ? "Demote this player" : "Make this player an assistant"; + var isDisconnected = MPManager.Instance().lostPlayer.ContainsKey(player); + makeThisPlayerAnAssistantToolStripMenuItem.Enabled = !isDisconnected; + jumpToThisPlayerInGameToolStripMenuItem.Enabled = !isDisconnected; + followToolStripMenuItem.Enabled = !isDisconnected; + // TODO: Figure out a way to allow removing disconnected players + + playerActionsMenu.Show(Cursor.Position); + playerToolStripMenuItem.Text = player; } + } public bool ClickedTrain; private void seeTrainInGameButton_Click(object sender, EventArgs e) { - ClickedTrain = PickedTrain != null; + PickedTrain = Program.Simulator.PlayerLocomotive.Train; + ClickedTrain = true; } private void centerOnMyTrainButton_Click(object sender, EventArgs e) { - followTrain = false; - firstShow = true; + PickedTrain = Program.Simulator.PlayerLocomotive.Train; + FollowTrain = false; + FirstShow = true; GenerateView(); } @@ -1716,6 +1785,209 @@ private void rotateThemesButton_Click(object sender, EventArgs e) InitializeImage(); } + private void playerActionsMenu_ItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + var type = e.ClickedItem.Tag.ToString(); + var player = playerToolStripMenuItem.Text; + + switch (type) + { + case "assistant": + if (!MPManager.OnlineTrains.Players.ContainsKey(player)) break; + + if (MPManager.Instance().aiderList.Contains(player)) + { + // Selected player is already an assistant, so the intent is to demote them + MPManager.BroadCast(new MSGAider(player, false).ToString()); + MPManager.Instance().aiderList.Remove(player); + } + else + { + // Promote player to be an assistant + MPManager.BroadCast(new MSGAider(player, true).ToString()); + MPManager.Instance().aiderList.Add(player); + } + + break; + + case "seeInGame": + MPManager.OnlineTrains.Players.TryGetValue(player, out OnlinePlayer p); + PickedTrain = p?.Train; + ClickedTrain = true; + break; + + case "followOnMap": + MPManager.OnlineTrains.Players.TryGetValue(player, out OnlinePlayer p1); + PickedTrain = p1?.Train; + FollowTrain = true; + break; + + case "kick": + if (!MPManager.IsServer() || !MPManager.OnlineTrains.Players.ContainsKey(player)) return; + + MPManager.OnlineTrains.Players[player].status = OnlinePlayer.Status.Removed; + MPManager.BroadCast(new MSGMessage(player, "Error", "Sorry the server has removed you").ToString()); + + break; + } + } + + private void followMyTrainOnMap_Click(object sender, EventArgs e) + { + PickedTrain = Program.Simulator.PlayerLocomotive.Train; + FollowTrain = true; + } + + private void trainActionsMenu_ItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + var type = e.ClickedItem.Tag.ToString(); + + switch (type) + { + case "seeInGame": + ClickedTrain = true; + break; + + case "followOnMap": + FollowTrain = true; + break; + } + } + + private void preferGreenCheckbox_CheckedChanged(object sender, EventArgs e) + { + MPManager.PreferGreen = preferGreenCheckbox.Checked; + } + + public bool AddNewMessage(double _, string msg) + { + if (messages.Items.Count > 30) messages.Items.RemoveAt(0); + + messages.Items.Add(msg); + messages.SelectedIndex = messages.Items.Count - 1; + messages.SelectedIndex = -1; + + return true; + } + + private void messageAllButton_Click(object sender, EventArgs e) + { + if (!MPManager.IsMultiPlayer()) return; + + var message = messageInput.Text; + message = message.Replace("\r", ""); + message = message.Replace("\t", ""); + MPManager.Instance().ComposingText = false; + + if (message == "") return; + + if (MPManager.IsServer()) + { + var users = MPManager.OnlineTrains.Players.Keys + .Select((string u) => $"{u}\r"); + string user = string.Join("", users) + "0END"; + string msgText = new MSGText(MPManager.GetUserName(), user, message).ToString(); + try + { + MPManager.Notify(msgText); + } + catch { } + finally + { + messageInput.Text = ""; + } + } + else + { + var user = "0Server\r+0END"; + MPManager.Notify(new MSGText(MPManager.GetUserName(), user, message).ToString()); + messageInput.Text = ""; + } + } + + private void messageInput_Enter(object sender, EventArgs e) + { + MPManager.Instance().ComposingText = true; + } + + private void messageInput_Leave(object sender, EventArgs e) + { + MPManager.Instance().ComposingText = false; + } + + private void moreReplyOptionsButton_Click(object sender, EventArgs e) + { + messageActionsMenu.Show(Cursor.Position); + messageActionsMenu.Enabled = true; + messageActionsMenu.Focus(); + messageActionsMenu.Visible = true; + } + + private void messageActionsMenu_ItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + var type = e.ClickedItem.Tag.ToString(); + + switch (type) + { + case "message": + if (!MPManager.IsMultiPlayer()) return; + + var message = messageInput.Text; + messageInput.Text = ""; + message = message.Replace("\r", ""); + message = message.Replace("\t", ""); + if (message == "") return; + var users = ""; + + if (playersView.SelectedItems.Count > 0) + { + var chosen = playersView.SelectedItems; + for (var i = 0; i < chosen.Count; i++) + { + var name = TrimBracketsFromEnd(chosen[i].Text); + if (name == MPManager.GetUserName()) + continue; + users += name + "\r"; + } + users += "0END"; + } + else { return; } + + MPManager.Notify(new MSGText(MPManager.GetUserName(), users, message).ToString()); + break; + + case "reply": + if (!MPManager.IsMultiPlayer()) return; + + var message1 = messageInput.Text; + message1 = message1.Replace("\r", ""); + message1 = message1.Replace("\t", ""); + MPManager.Instance().ComposingText = false; + messageInput.Text = ""; + if (message1 == "") return; + var users1 = ""; + + if (messages.SelectedItems.Count > 0) + { + var chosen = messages.SelectedItems; + for (var i = 0; i < chosen.Count; i++) + { + var tmp = (string)chosen[i]; + var index = tmp.IndexOf(':'); + if (index < 0) continue; + tmp = tmp.Substring(0, index) + "\r"; + if (users1.Contains(tmp)) continue; + users1 += tmp; + } + users1 += "0END"; + } + else { return;} + + MPManager.Notify(new MSGText(MPManager.GetUserName(), users1, message1).ToString()); + break; + } + } + private void DispatchViewerBeta_FormClosing(object sender, FormClosingEventArgs e) { // Prevent the window from closing; instead, hide it diff --git a/Source/RunActivity/Viewer3D/Map/MapForm.resx b/Source/RunActivity/Viewer3D/Map/MapForm.resx index 0b1b1d3cce..5bb9c0e51d 100644 --- a/Source/RunActivity/Viewer3D/Map/MapForm.resx +++ b/Source/RunActivity/Viewer3D/Map/MapForm.resx @@ -129,7 +129,10 @@ 486, 16 + + 618, 16 + - 110 + 81 \ No newline at end of file diff --git a/Source/RunActivity/Viewer3D/Processes/GameStateViewer3D.cs b/Source/RunActivity/Viewer3D/Processes/GameStateViewer3D.cs index dbe07a6515..3977eef017 100644 --- a/Source/RunActivity/Viewer3D/Processes/GameStateViewer3D.cs +++ b/Source/RunActivity/Viewer3D/Processes/GameStateViewer3D.cs @@ -56,8 +56,8 @@ internal override void BeginRender(RenderFrame frame) Program.DebugViewer.Hide(); Viewer.DebugViewerEnabled = false; - Program.DebugViewerBeta = new MapViewer(Viewer.Simulator, Viewer); - Program.DebugViewerBeta.Hide(); + Program.MapForm = new MapViewer(Viewer.Simulator, Viewer); + Program.MapForm.Hide(); Viewer.DebugViewerBetaEnabled = false; Program.SoundDebugForm = new SoundDebugForm(Viewer); diff --git a/Source/RunActivity/Viewer3D/Viewer.cs b/Source/RunActivity/Viewer3D/Viewer.cs index 4c5adacdc3..ca080f27eb 100644 --- a/Source/RunActivity/Viewer3D/Viewer.cs +++ b/Source/RunActivity/Viewer3D/Viewer.cs @@ -1308,13 +1308,14 @@ void HandleUserInput(ElapsedTime elapsedTime) //} //in the dispatcher window, when one clicks a train and "See in Game", will jump to see that train - if ((Program.DebugViewer != null && Program.DebugViewer.ClickedTrain == true) || (Program.DebugViewerBeta != null && Program.DebugViewerBeta.ClickedTrain == true)) + // TODO: Remove `DebugViewer` in the future + if ((Program.DebugViewer != null && Program.DebugViewer.ClickedTrain == true) || (Program.MapForm != null && Program.MapForm.ClickedTrain == true)) { Program.DebugViewer.ClickedTrain = false; - Program.DebugViewerBeta.ClickedTrain = false; - if (SelectedTrain != Program.DebugViewer.PickedTrain) + Program.MapForm.ClickedTrain = false; + if (SelectedTrain != Program.DebugViewer.PickedTrain || SelectedTrain != Program.MapForm.PickedTrain) { - SelectedTrain = Program.DebugViewer.PickedTrain; + SelectedTrain = Program.MapForm.PickedTrain; Simulator.AI.aiListChanged = true; if (SelectedTrain.Cars == null || SelectedTrain.Cars.Count == 0) SelectedTrain = PlayerTrain; From 699d060ac6db542486d739031e728c437ff34a39 Mon Sep 17 00:00:00 2001 From: Looky1173 Date: Tue, 24 Oct 2023 12:03:04 +0200 Subject: [PATCH 28/33] Added license information --- Source/RunActivity/Viewer3D/Map/MapForm.cs | 19 ++++++++++++++++++- .../Viewer3D/Map/MapThemeProvider.cs | 19 ++++++++++++++++++- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/Source/RunActivity/Viewer3D/Map/MapForm.cs b/Source/RunActivity/Viewer3D/Map/MapForm.cs index 96b1c3badb..a78db6e17b 100644 --- a/Source/RunActivity/Viewer3D/Map/MapForm.cs +++ b/Source/RunActivity/Viewer3D/Map/MapForm.cs @@ -1,4 +1,21 @@ -using System; +// COPYRIGHT 2023 by the Open Rails project. +// +// This file is part of Open Rails. +// +// Open Rails is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Open Rails is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Open Rails. If not, see . + +using System; using System.Collections.Generic; using System.Diagnostics; using System.Drawing; diff --git a/Source/RunActivity/Viewer3D/Map/MapThemeProvider.cs b/Source/RunActivity/Viewer3D/Map/MapThemeProvider.cs index 77c4b8602b..4dd296a497 100644 --- a/Source/RunActivity/Viewer3D/Map/MapThemeProvider.cs +++ b/Source/RunActivity/Viewer3D/Map/MapThemeProvider.cs @@ -1,4 +1,21 @@ -using System.Collections.Generic; +// COPYRIGHT 2023 by the Open Rails project. +// +// This file is part of Open Rails. +// +// Open Rails is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Open Rails is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Open Rails. If not, see . + +using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Windows.Forms; From 5c0b8894b55e64143c4f6080b85d6616412cf846 Mon Sep 17 00:00:00 2001 From: Looky1173 Date: Tue, 24 Oct 2023 12:11:21 +0200 Subject: [PATCH 29/33] Foundation for translations --- Source/RunActivity/Viewer3D/Map/MapForm.cs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/Source/RunActivity/Viewer3D/Map/MapForm.cs b/Source/RunActivity/Viewer3D/Map/MapForm.cs index a78db6e17b..8d80f15f33 100644 --- a/Source/RunActivity/Viewer3D/Map/MapForm.cs +++ b/Source/RunActivity/Viewer3D/Map/MapForm.cs @@ -22,6 +22,8 @@ using System.Linq; using System.Text.RegularExpressions; using System.Windows.Forms; +using GNU.Gettext; +using GNU.Gettext.WinForms; using Microsoft.Xna.Framework; using Orts.Formats.Msts; using Orts.MultiPlayer; @@ -45,6 +47,7 @@ public partial class MapViewer : Form /// Reference to the main simulator object. /// public readonly Simulator simulator; + private GettextResourceManager catalog = new GettextResourceManager("RunActivity"); private readonly MapDataProvider MapDataProvider; private readonly MapThemeProvider MapThemeProvider; private string ThemeName = "light"; @@ -125,6 +128,8 @@ public MapViewer(Simulator simulator, Viewer viewer) { InitializeComponent(); + Localizer.Localize(this, catalog); + if (simulator == null) throw new ArgumentNullException("simulator", "Simulator object cannot be null."); @@ -169,14 +174,6 @@ void InitializeForm() #region initData private void InitializeData() { - /*if (!loaded) - { - // do this only once - loaded = true; - //trackSections.DataSource = new List(simulator.InterlockingSystem.Tracks.Values).ToArray(); - Localizer.Localize(this, Viewer.Catalog); - }*/ - switchItemsDrawn = new List(); signalItemsDrawn = new List(); switches = new List(); From 67014b77f9a080081b7f51a5c8f09a1d22f683bf Mon Sep 17 00:00:00 2001 From: Looky1173 Date: Tue, 24 Oct 2023 14:57:44 +0200 Subject: [PATCH 30/33] Updated translations (note: they don't work with ContextMenuStrip) --- Source/Locales/Contrib/Contrib.pot | 442 +-- Source/Locales/Menu/Menu.pot | 448 +-- Source/Locales/ORTS.Common/ORTS.Common.pot | 540 ++-- Source/Locales/ORTS.Menu/ORTS.Menu.pot | 4 +- .../Locales/ORTS.Settings/ORTS.Settings.pot | 131 +- .../Orts.Formats.OR/Orts.Formats.OR.pot | 4 +- .../Orts.Simulation/Orts.Simulation.pot | 1747 ++++++------ Source/Locales/RunActivity/RunActivity.pot | 1636 +++++++---- Source/Locales/RunActivity/hu.po | 2502 +++++++++++------ Source/Locales/Updater/Updater.pot | 4 +- .../Viewer3D/Map/MapForm.Designer.cs | 22 +- Source/RunActivity/Viewer3D/Map/MapForm.cs | 15 +- Source/RunActivity/Viewer3D/Weather.cs | 4 +- 13 files changed, 4565 insertions(+), 2934 deletions(-) diff --git a/Source/Locales/Contrib/Contrib.pot b/Source/Locales/Contrib/Contrib.pot index 4f954b0c54..dae17414da 100644 --- a/Source/Locales/Contrib/Contrib.pot +++ b/Source/Locales/Contrib/Contrib.pot @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2023-02-21 17:54:05+0300\n" -"PO-Revision-Date: 2023-02-21 17:54:09+0300\n" +"POT-Creation-Date: 2023-10-24 12:50:03+0200\n" +"PO-Revision-Date: 2023-10-24 12:50:04+0200\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -199,7 +199,7 @@ msgid "menuStrip1" msgstr "" #: ../../Contrib/ActivityEditor/ActivityEditor/Engine/ActEditor.Designer.cs:118 -#: ../../Contrib/ActivityEditor/ActivityEditor/Engine/SimpleTextEd.Designer.cs:62 +#: ../../Contrib/ActivityEditor/ActivityEditor/Engine/SimpleTextEd.Designer.cs:63 msgid "File" msgstr "" @@ -218,7 +218,7 @@ msgid "Traffic" msgstr "" #: ../../Contrib/ActivityEditor/ActivityEditor/Engine/ActEditor.Designer.cs:153 -#: ../../Contrib/ActivityEditor/ActivityEditor/Engine/SimpleTextEd.Designer.cs:68 +#: ../../Contrib/ActivityEditor/ActivityEditor/Engine/SimpleTextEd.Designer.cs:70 msgid "Save" msgstr "" @@ -351,7 +351,7 @@ msgstr "" msgid "Click to Edit Metadata for a specified route" msgstr "" -#: ../../Contrib/ActivityEditor/ActivityEditor/Engine/SimpleTextEd.Designer.cs:85 +#: ../../Contrib/ActivityEditor/ActivityEditor/Engine/SimpleTextEd.Designer.cs:91 msgid "Form1" msgstr "" @@ -636,30 +636,30 @@ msgstr "" msgid "Open Rails Content Manager" msgstr "" -#: ../../Contrib/TrackViewer/TrackViewer.cs:625 +#: ../../Contrib/TrackViewer/TrackViewer.cs:629 msgid "" "The path you are working on has un-saved changes.\n" msgstr "" -#: ../../Contrib/TrackViewer/TrackViewer.cs:627 +#: ../../Contrib/TrackViewer/TrackViewer.cs:631 msgid "Do you really want to Quit?" msgstr "" -#: ../../Contrib/TrackViewer/TrackViewer.cs:730 +#: ../../Contrib/TrackViewer/TrackViewer.cs:734 #, csharp-format msgid "" "Route cannot be loaded.\n" "Extension {0} is not supported" msgstr "" -#: ../../Contrib/TrackViewer/TrackViewer.cs:737 +#: ../../Contrib/TrackViewer/TrackViewer.cs:741 #, csharp-format msgid "" "Route cannot be loaded.\n" "{0} does not exist" msgstr "" -#: ../../Contrib/TrackViewer/TrackViewer.cs:743 +#: ../../Contrib/TrackViewer/TrackViewer.cs:747 #, csharp-format msgid "" "Route cannot be loaded.\n" @@ -667,149 +667,153 @@ msgid "" "install folder but does not contain expected files" msgstr "" -#: ../../Contrib/TrackViewer/TrackViewer.cs:768 +#: ../../Contrib/TrackViewer/TrackViewer.cs:772 #, csharp-format msgid "" "Route cannot be loaded.\n" "{0} somehow could not be translated into a loadable route" msgstr "" -#: ../../Contrib/TrackViewer/TrackViewer.cs:809 +#: ../../Contrib/TrackViewer/TrackViewer.cs:813 msgid "" "Directory is not a valid install directory.\n" "The install directory needs to contain ROUTES, GLOBAL, ..." msgstr "" -#: ../../Contrib/TrackViewer/TrackViewer.cs:883 +#: ../../Contrib/TrackViewer/TrackViewer.cs:887 msgid "Loading route..." msgstr "" -#: ../../Contrib/TrackViewer/TrackViewer.cs:908 +#: ../../Contrib/TrackViewer/TrackViewer.cs:912 msgid "Route cannot be loaded. Sorry" msgstr "" -#: ../../Contrib/TrackViewer/TrackViewer.cs:979 +#: ../../Contrib/TrackViewer/TrackViewer.cs:992 msgid "Loading .pat file ..." msgstr "" -#: ../../Contrib/TrackViewer/TrackViewer.cs:982 +#: ../../Contrib/TrackViewer/TrackViewer.cs:995 msgid "Processing .pat file ..." msgstr "" -#: ../../Contrib/TrackViewer/TrackViewer.cs:1010 +#: ../../Contrib/TrackViewer/TrackViewer.cs:1023 msgid "Path has been modified. Loading a new path will discard changes." msgstr "" -#: ../../Contrib/TrackViewer/TrackViewer.cs:1011 -#: ../../Contrib/TrackViewer/TrackViewer.cs:1092 +#: ../../Contrib/TrackViewer/TrackViewer.cs:1024 +#: ../../Contrib/TrackViewer/TrackViewer.cs:1105 #: ../../Contrib/TrackViewer/Editing/SavePatFile.cs:99 msgid "Do you want to continue?" msgstr "" -#: ../../Contrib/TrackViewer/TrackViewer.cs:1012 -#: ../../Contrib/TrackViewer/TrackViewer.cs:1093 +#: ../../Contrib/TrackViewer/TrackViewer.cs:1025 +#: ../../Contrib/TrackViewer/TrackViewer.cs:1106 #: ../../Contrib/TrackViewer/Editing/SavePatFile.cs:85 #: ../../Contrib/TrackViewer/Editing/SavePatFile.cs:102 msgid "Trackviewer Path Editor" msgstr "" -#: ../../Contrib/TrackViewer/TrackViewer.cs:1089 +#: ../../Contrib/TrackViewer/TrackViewer.cs:1102 msgid "" "This will open every single .pat file for this route, (try to) fix all broken " "nodes, and save the modified path. " msgstr "" -#: ../../Contrib/TrackViewer/TrackViewer.cs:1090 +#: ../../Contrib/TrackViewer/TrackViewer.cs:1103 msgid "Potentially it will therefore change all .pat files on disc." msgstr "" -#: ../../Contrib/TrackViewer/TrackViewer.cs:1091 +#: ../../Contrib/TrackViewer/TrackViewer.cs:1104 msgid "" "This can be useful when a route has been changed and you want all paths to be " "corrected." msgstr "" -#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:81 +#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:82 msgid "Select broken path color" msgstr "" -#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:87 +#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:88 msgid "Select path color (main)" msgstr "" -#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:99 +#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:100 msgid "Select path color (siding)" msgstr "" -#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:139 +#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:140 msgid "Select color for multi-colored straight tracks" msgstr "" -#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:140 +#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:141 msgid "Select color for multi-colored curved tracks" msgstr "" -#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:141 +#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:142 msgid "Select color for mono-colored tracks" msgstr "" -#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:142 +#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:143 msgid "Select color for tracks on terrain" msgstr "" -#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:144 +#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:145 msgid "Select color for multi-colored straight roads" msgstr "" -#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:145 +#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:146 msgid "Select color for multi-colored curved roads" msgstr "" -#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:146 +#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:147 msgid "Select color for mono-colored roads" msgstr "" -#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:147 +#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:148 msgid "Select color for roads on terrain" msgstr "" -#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:155 +#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:156 msgid "Select background color" msgstr "" -#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:170 +#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:171 msgid "Select text color" msgstr "" -#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:182 +#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:183 msgid "Select item text color" msgstr "" -#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:187 +#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:188 msgid "Select junction color" msgstr "" -#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:192 +#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:193 msgid "Select endnode color" msgstr "" -#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:197 +#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:198 msgid "Select siding color" msgstr "" -#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:202 +#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:203 msgid "Select crossing color" msgstr "" -#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:207 +#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:208 msgid "Select road crossing color" msgstr "" -#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:212 +#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:213 msgid "Select speedpost color" msgstr "" -#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:291 +#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:218 +msgid "Select event color" +msgstr "" + +#: ../../Contrib/TrackViewer/Drawing/DrawColors.cs:297 msgid "Select other-paths color" msgstr "" @@ -822,23 +826,23 @@ msgstr "" msgid "Rescaling previously loaded ace-files" msgstr "" -#: ../../Contrib/TrackViewer/Drawing/DrawTrackDB.cs:61 +#: ../../Contrib/TrackViewer/Drawing/DrawTrackDB.cs:65 msgid "Loading trackfile .trk ..." msgstr "" -#: ../../Contrib/TrackViewer/Drawing/DrawTrackDB.cs:65 +#: ../../Contrib/TrackViewer/Drawing/DrawTrackDB.cs:69 msgid "Loading track database .tdb ..." msgstr "" -#: ../../Contrib/TrackViewer/Drawing/DrawTrackDB.cs:69 +#: ../../Contrib/TrackViewer/Drawing/DrawTrackDB.cs:73 msgid "Loading tsection.dat ..." msgstr "" -#: ../../Contrib/TrackViewer/Drawing/DrawTrackDB.cs:83 +#: ../../Contrib/TrackViewer/Drawing/DrawTrackDB.cs:87 msgid "Loading road track database .rdb ..." msgstr "" -#: ../../Contrib/TrackViewer/Drawing/DrawTrackDB.cs:270 +#: ../../Contrib/TrackViewer/Drawing/DrawTrackDB.cs:366 msgid "Finding the angles to draw signals, endnodes, ..." msgstr "" @@ -1056,248 +1060,253 @@ msgstr "" msgid "Please restart TrackViewer in order to load the new language." msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:403 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:465 msgid "" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:432 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:494 msgid "" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:558 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:620 msgid "" "ctrl-R\tReload the route\n" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:559 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:621 msgid "" "Q\tQuit\n" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:561 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:623 msgid "" "=\tZoom-in (and keep zooming)\n" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:562 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:624 msgid "" "shift-=\tZoom-in\n" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:563 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:625 msgid "" "-\tZoom-out (and keep zooming)\n" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:564 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:626 msgid "" "shift--\tZoom-out\n" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:565 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:627 msgid "" "Z\tZoom to tile\n" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:566 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:628 msgid "" "M\tToggle zoom center\n" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:567 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:629 msgid "" "R\tZoom reset\n" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:568 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:630 msgid "" "L\tAdd label\n" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:570 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:632 msgid "" "shift-C\t\tShift center to current mouse location\n" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:571 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:633 msgid "" "left arrow\tShift left\n" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:572 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:634 msgid "" "down arrow\tShift down\n" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:573 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:635 msgid "" "right arrow\tShift right\n" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:574 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:636 msgid "" "up arrow\t\tShift up\n" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:576 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:638 msgid "" "F5\tShow speed-limits\n" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:577 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:639 msgid "" "shift-F5\tShow mileposts\n" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:578 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:640 msgid "" "F6\tShow terrain\n" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:579 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:641 msgid "" "ctrl-F6\tShow DM terrain\n" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:580 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:642 msgid "" "shift-F6\tShow terrain patch lines\n" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:581 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:643 msgid "" "F7\tshow signals\n" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:582 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:644 msgid "" "F8\tShow platforms\n" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:583 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:645 msgid "" "shift-F8\tShow platform-names\n" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:584 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:646 msgid "" "F9\tShow sidings\n" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:585 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:647 msgid "" "shift-F9\tShow siding-names\n" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:586 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:648 msgid "" "F10\tHighlight tracks\n" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:587 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:649 msgid "" "shift-F10\tHighlight items\n" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:588 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:650 msgid "" "F11\tShow path\n" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:589 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:651 msgid "" "shift-F11\tShow raw path\n" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:591 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:653 msgid "" "C\t\tShift to center of current path node\n" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:592 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:654 msgid "" "PgUp\t\tShow more of the path\n" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:593 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:655 msgid "" "PgDn\t\tShow less of the path\n" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:594 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:656 msgid "" "shift-PgUp\tShow the full path\n" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:595 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:657 msgid "" "shift-PgDn\tShow only start point of path\n" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:596 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:658 msgid "" "E\t\tPlace end-point\n" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:597 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:659 msgid "" "W\t\tPlace a wait-point\n" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:598 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:660 msgid "" "ctrl-Z\t\tUndo in path editor\n" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:599 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:661 msgid "" "ctrl-Y\t\tRedo in path editor\n" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:601 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:663 msgid "" "alt-?\t\tVarious keys to open submenus\n" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:602 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:665 +msgid "" +"mouse-right click\tOn event shows event message\n" +msgstr "" + +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:666 msgid "Keyboard shortcuts" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:608 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:672 msgid "This is ORTS TrackViewer, version " msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:611 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:675 msgid "" "It is a 'Contribution' to ORTS, and as such\n" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:612 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:676 msgid "not an integral part of ORTS." msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:620 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:684 msgid "Documentation is available" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:624 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:688 msgid "Right column → Open Rails Trackviewer" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:626 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:690 msgid "Do you want to go to the website?" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:628 -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:174 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml.cs:692 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:179 msgid "Documentation" msgstr "" @@ -1485,427 +1494,440 @@ msgstr "" msgid "Select route" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:13 -msgid "Search by index" +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:12 +msgid "Select activity" msgstr "" #: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:14 -msgid "Search trackNode" +msgid "Search by index" msgstr "" #: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:15 -msgid "Search trackNode for roads" +msgid "Search trackNode" msgstr "" #: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:16 -msgid "Search trackItem" +msgid "Search trackNode for roads" msgstr "" #: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:17 +msgid "Search trackItem" +msgstr "" + +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:18 msgid "Search trackItem for roads" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:20 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:21 msgid "Quit (Q)" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:22 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:23 msgid "_View" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:23 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:24 msgid "Center around station" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:26 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:27 msgid "Center around platform" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:29 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:30 msgid "Center around siding" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:33 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:34 msgid "Paths" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:34 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:35 msgid "Show path (F11)" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:35 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:36 msgid "Show raw path from .pat file (shift-F11)" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:37 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:38 msgid "Track Coloring" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:38 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:39 msgid "Color tracks" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:39 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:40 msgid "Highlight tracks (F10)" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:41 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:42 msgid "Additional views" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:42 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:43 msgid "Show inset" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:43 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:44 msgid "Show world tiles" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:44 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:45 msgid "Show grid lines" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:45 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:46 msgid "Show scale ruler" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:46 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:47 msgid "Show longitude/latitude" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:48 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:49 msgid "Labels" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:49 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:50 msgid "Show labels" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:49 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:50 msgid "For adding a label, press L" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:50 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:51 msgid "Load labels" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:51 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:52 msgid "Save labels" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:54 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:55 msgid "Save current zoom" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:55 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:56 msgid "Restore saved zoom" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:57 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:58 msgid "Zoom in (=)" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:58 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:59 msgid "Zoom out (-)" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:59 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:60 msgid "Zoom to tile (Z)" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:60 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:61 msgid "Zoom reset (R)" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:62 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:63 msgid "Anti aliasing (needs restart)" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:64 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:65 msgid "Track _items" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:65 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:66 msgid "Show all items" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:66 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:67 msgid "Show no items" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:67 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:68 msgid "Highlight items (shift-F10)" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:68 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:69 msgid "Junctions/ends" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:69 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:70 msgid "Show junctions" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:70 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:71 msgid "Show end nodes" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:71 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:72 msgid "Show crossovers" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:73 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:74 msgid "Sidings" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:74 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:75 msgid "Show siding markers (F9)" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:75 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:76 msgid "Show siding names (shift-F9)" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:77 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:78 msgid "Platforms" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:78 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:79 msgid "Show platform markers (F8)" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:79 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:80 msgid "Show platform names (shift-F8)" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:80 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:81 msgid "Show station names (shift-F8)" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:82 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:83 msgid "Interactives" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:83 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:84 msgid "Show signals (F7)" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:84 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:85 msgid "Show also other signals" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:85 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:86 msgid "Show level crossings" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:86 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:87 msgid "Show hazards" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:87 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:88 msgid "Show fuel/pickups" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:88 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:89 msgid "Show sound regions" msgstr "" #: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:90 -msgid "Posts" +msgid "Show events" msgstr "" #: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:91 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:116 +msgid "Show event names" +msgstr "" + +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:93 +msgid "Posts" +msgstr "" + +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:94 msgid "Show speed limits (F5)" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:92 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:95 msgid "Show mileposts (shift-F5)" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:94 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:97 msgid "Roads" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:95 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:98 msgid "Draw roads" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:96 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:99 msgid "Show car spawners" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:97 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:100 msgid "Show road crossings" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:100 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:103 msgid "_Statusbar" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:101 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:104 msgid "Show vector section info" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:103 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:106 msgid "Show PAT file info" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:105 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:108 msgid "Show Path info" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:107 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:110 msgid "Show terrain info" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:109 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:112 msgid "Show signal info" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:111 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:114 msgid "Show platform/station names" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:114 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:119 msgid "_Preferences" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:115 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:120 msgid "Zooming is centered on mouse (M)" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:117 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:122 msgid "Use miles i.s.o. meters" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:118 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:123 msgid "Select language" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:123 -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:150 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:128 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:155 msgid "Highlight last-drawn section" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:124 -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:151 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:129 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:156 msgid "Enable editing" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:125 -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:152 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:130 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:157 msgid "Show current mouse action" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:126 -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:153 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:131 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:158 msgid "Shift-PgUp also extends path" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:129 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:134 msgid "Path-_Editor" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:130 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:135 msgid "==Supporting MSTS paths only==" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:131 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:136 msgid "Load path" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:135 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:140 msgid "Show other paths" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:137 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:142 msgid "Save path" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:138 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:143 msgid "Save visited stations" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:139 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:144 msgid "Show chart" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:141 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:146 msgid "New path" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:143 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:148 msgid "Extend with other path" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:147 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:152 msgid "Edit path metadata" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:148 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:153 msgid "Reverse path" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:155 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:160 msgid "Auto-fix all broken nodes" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:156 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:161 msgid "Auto-fix all broken paths" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:158 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:163 msgid "_Terrain" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:159 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:164 msgid "Show terrain textures (F6)" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:160 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:165 msgid "Show DM terrain textures (ctrl-F6)" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:161 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:166 msgid "Show patch lines (shift-F6)" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:163 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:168 msgid "Memory reduction options" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:164 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:169 msgid "No reduction" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:165 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:170 msgid "Automatic reduction" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:166 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:171 msgid "Reduce by linear factor 2" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:167 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:172 msgid "Reduce by linear factor 4" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:168 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:173 msgid "Reduce by linear factor 8" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:169 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:174 msgid "Reduce by linear factor 16" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:172 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:177 msgid "_Help" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:173 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:178 msgid "Shortcuts" msgstr "" -#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:175 +#: ../../Contrib/TrackViewer/UserInterface/MenuControl.xaml:180 msgid "About" msgstr "" diff --git a/Source/Locales/Menu/Menu.pot b/Source/Locales/Menu/Menu.pot index 1f6fa10857..0b08277784 100644 --- a/Source/Locales/Menu/Menu.pot +++ b/Source/Locales/Menu/Menu.pot @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2023-02-21 17:54:09+0300\n" -"PO-Revision-Date: 2023-02-21 17:54:10+0300\n" +"POT-Creation-Date: 2023-10-24 12:50:07+0200\n" +"PO-Revision-Date: 2023-10-24 12:50:07+0200\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -53,14 +53,17 @@ msgid "Import and export saved games" msgstr "" #: ../../Menu/KeyInputEditControl.Designer.cs:53 +#: ../../Menu/RDButtonInputControl.Designer.cs:48 msgid "✔" msgstr "" #: ../../Menu/KeyInputEditControl.Designer.cs:64 +#: ../../Menu/RDButtonInputControl.Designer.cs:59 msgid "✘" msgstr "" #: ../../Menu/KeyInputEditControl.Designer.cs:86 +#: ../../Menu/RDButtonInputControl.Designer.cs:84 msgid "↺" msgstr "" @@ -69,10 +72,12 @@ msgid "EditKey" msgstr "" #: ../../Menu/KeyInputEditControl.Designer.cs:54 +#: ../../Menu/RDButtonInputControl.Designer.cs:49 msgid "Accept changes" msgstr "" #: ../../Menu/KeyInputEditControl.Designer.cs:65 +#: ../../Menu/RDButtonInputControl.Designer.cs:60 msgid "Cancel changes" msgstr "" @@ -81,6 +86,7 @@ msgid "Press any key" msgstr "" #: ../../Menu/KeyInputEditControl.Designer.cs:87 +#: ../../Menu/RDButtonInputControl.Designer.cs:85 msgid "Reset to default" msgstr "" @@ -113,7 +119,7 @@ msgid "Rain" msgstr "" #: ../../Menu/MainForm.cs:156 -#: ../../Menu/Options.cs:583 +#: ../../Menu/Options.cs:598 msgid "Easy" msgstr "" @@ -122,7 +128,7 @@ msgid "Medium" msgstr "" #: ../../Menu/MainForm.cs:158 -#: ../../Menu/Options.cs:589 +#: ../../Menu/Options.cs:604 msgid "Hard" msgstr "" @@ -255,7 +261,7 @@ msgid "Logging" msgstr "" #: ../../Menu/MainForm.Designer.cs:159 -#: ../../Menu/Options.Designer.cs:2654 +#: ../../Menu/Options.Designer.cs:2830 msgid "Options" msgstr "" @@ -387,7 +393,7 @@ msgid "Timetable set:" msgstr "" #: ../../Menu/MainForm.Designer.cs:872 -#: ../../Menu/Options.cs:264 +#: ../../Menu/Options.cs:265 #: ../../Menu/TestingForm.Designer.cs:314 msgid "Testing" msgstr "" @@ -437,167 +443,181 @@ msgstr "" msgid "kgf/cm²" msgstr "" -#: ../../Menu/Options.cs:196 +#: ../../Menu/Options.cs:197 msgid "comma" msgstr "" -#: ../../Menu/Options.cs:197 +#: ../../Menu/Options.cs:198 msgid "semicolon" msgstr "" -#: ../../Menu/Options.cs:198 +#: ../../Menu/Options.cs:199 msgid "tab" msgstr "" -#: ../../Menu/Options.cs:199 +#: ../../Menu/Options.cs:200 msgid "space" msgstr "" -#: ../../Menu/Options.cs:205 +#: ../../Menu/Options.cs:206 msgid "route" msgstr "" -#: ../../Menu/Options.cs:206 +#: ../../Menu/Options.cs:207 msgid "m/s" msgstr "" -#: ../../Menu/Options.cs:207 +#: ../../Menu/Options.cs:208 msgid "km/h" msgstr "" -#: ../../Menu/Options.cs:208 +#: ../../Menu/Options.cs:209 msgid "mph" msgstr "" -#: ../../Menu/Options.cs:227 +#: ../../Menu/Options.cs:228 #: ../../Menu/ResumeForm.Designer.cs:380 msgid "Time" msgstr "" -#: ../../Menu/Options.cs:228 +#: ../../Menu/Options.cs:229 msgid "Train Speed" msgstr "" -#: ../../Menu/Options.cs:229 +#: ../../Menu/Options.cs:230 msgid "Max. Speed" msgstr "" -#: ../../Menu/Options.cs:230 +#: ../../Menu/Options.cs:231 msgid "Signal State" msgstr "" -#: ../../Menu/Options.cs:231 +#: ../../Menu/Options.cs:232 msgid "Track Elevation" msgstr "" -#: ../../Menu/Options.cs:232 +#: ../../Menu/Options.cs:233 msgid "Direction" msgstr "" -#: ../../Menu/Options.cs:233 +#: ../../Menu/Options.cs:234 msgid "Control Mode" msgstr "" -#: ../../Menu/Options.cs:234 +#: ../../Menu/Options.cs:235 msgid "Distance Travelled" msgstr "" -#: ../../Menu/Options.cs:235 +#: ../../Menu/Options.cs:236 msgid "Throttle %" msgstr "" -#: ../../Menu/Options.cs:236 +#: ../../Menu/Options.cs:237 msgid "Brake Cyl Press" msgstr "" -#: ../../Menu/Options.cs:237 +#: ../../Menu/Options.cs:238 msgid "Dyn Brake %" msgstr "" -#: ../../Menu/Options.cs:238 +#: ../../Menu/Options.cs:239 msgid "Gear Setting" msgstr "" -#: ../../Menu/Options.cs:263 +#: ../../Menu/Options.cs:264 msgid "Stable (recommended)" msgstr "" -#: ../../Menu/Options.cs:265 +#: ../../Menu/Options.cs:266 msgid "Unstable" msgstr "" -#: ../../Menu/Options.cs:266 +#: ../../Menu/Options.cs:267 +#: ../../Menu/Options.cs:312 msgid "None" msgstr "" -#: ../../Menu/Options.cs:269 +#: ../../Menu/Options.cs:270 msgid "" "Infrequent updates to official, hand-picked versions. Recommended for most " "users." msgstr "" -#: ../../Menu/Options.cs:270 +#: ../../Menu/Options.cs:271 msgid "" "Weekly updates which may contain noticable defects. For project supporters." msgstr "" -#: ../../Menu/Options.cs:271 +#: ../../Menu/Options.cs:272 msgid "Daily updates which may contain serious defects. For developers only." msgstr "" -#: ../../Menu/Options.cs:272 +#: ../../Menu/Options.cs:273 msgid "No updates." msgstr "" -#: ../../Menu/Options.cs:396 +#: ../../Menu/Options.cs:313 +msgid "Information" +msgstr "" + +#: ../../Menu/Options.cs:314 +msgid "Warning" +msgstr "" + +#: ../../Menu/Options.cs:315 +msgid "Error" +msgstr "" + +#: ../../Menu/Options.cs:410 msgid "Click to change this key" msgstr "" -#: ../../Menu/Options.cs:412 +#: ../../Menu/Options.cs:426 msgid "" "Continue with conflicting key assignments?\n" "\n" msgstr "" -#: ../../Menu/Options.cs:534 +#: ../../Menu/Options.cs:551 msgid "Remove all custom key assignments?" msgstr "" -#: ../../Menu/Options.cs:545 +#: ../../Menu/Options.cs:562 msgid "" "A listing of all keyboard commands and keys has been placed here:\n" "\n" msgstr "" -#: ../../Menu/Options.cs:554 +#: ../../Menu/Options.cs:571 +#: ../../Menu/OptionsRailDriver.cs:262 msgid "No errors found." msgstr "" -#: ../../Menu/Options.cs:581 +#: ../../Menu/Options.cs:596 msgid "Very easy" msgstr "" -#: ../../Menu/Options.cs:585 +#: ../../Menu/Options.cs:600 msgid "MSTS Compatible" msgstr "" -#: ../../Menu/Options.cs:587 +#: ../../Menu/Options.cs:602 msgid "Normal" msgstr "" -#: ../../Menu/Options.cs:591 +#: ../../Menu/Options.cs:606 msgid "Very Hard" msgstr "" -#: ../../Menu/Options.cs:593 +#: ../../Menu/Options.cs:608 msgid "Good luck!" msgstr "" -#: ../../Menu/Options.cs:688 +#: ../../Menu/Options.cs:703 msgid "Select an installation profile (MSTS folder) to add:" msgstr "" -#: ../../Menu/Options.cs:559 +#: ../../Menu/Options.cs:576 #, csharp-format msgid "" "{0:F0}° vertical FOV is the same as:\n" @@ -605,520 +625,592 @@ msgid "" "{2:F0}° horizontal FOV on 16:9" msgstr "" -#: ../../Menu/Options.cs:603 +#: ../../Menu/Options.cs:618 #, csharp-format msgid "{0}%" msgstr "" -#: ../../Menu/Options.cs:639 +#: ../../Menu/Options.cs:654 #, csharp-format msgid "No detail (-{0}%)" msgstr "" -#: ../../Menu/Options.cs:641 +#: ../../Menu/Options.cs:656 #, csharp-format msgid "Less detail (-{0}%)" msgstr "" -#: ../../Menu/Options.cs:643 +#: ../../Menu/Options.cs:658 #, csharp-format msgid "Default detail (+{0}%)" msgstr "" -#: ../../Menu/Options.cs:645 +#: ../../Menu/Options.cs:660 #, csharp-format msgid "More detail (+{0}%)" msgstr "" -#: ../../Menu/Options.cs:647 +#: ../../Menu/Options.cs:662 #, csharp-format msgid "All detail (+{0}%)" msgstr "" -#: ../../Menu/Options.Designer.cs:292 +#: ../../Menu/Options.Designer.cs:312 msgid "OK" msgstr "" -#: ../../Menu/Options.Designer.cs:326 +#: ../../Menu/Options.Designer.cs:346 msgid "Brake pipe charging rate (PSI/s) " msgstr "" -#: ../../Menu/Options.Designer.cs:337 +#: ../../Menu/Options.Designer.cs:357 msgid "Graduated release air brakes " msgstr "" -#: ../../Menu/Options.Designer.cs:350 +#: ../../Menu/Options.Designer.cs:370 #: ../../Menu/TestingForm.Designer.cs:87 msgid "Cancel" msgstr "" -#: ../../Menu/Options.Designer.cs:360 +#: ../../Menu/Options.Designer.cs:380 msgid "Alerter in cab " msgstr "" -#: ../../Menu/Options.Designer.cs:414 +#: ../../Menu/Options.Designer.cs:435 msgid "General" msgstr "" -#: ../../Menu/Options.Designer.cs:520 +#: ../../Menu/Options.Designer.cs:541 msgid "Overspeed monitor " msgstr "" -#: ../../Menu/Options.Designer.cs:532 +#: ../../Menu/Options.Designer.cs:553 msgid "Use TCS scripts " msgstr "" -#: ../../Menu/Options.Designer.cs:545 +#: ../../Menu/Options.Designer.cs:566 msgid "Other units " msgstr "" -#: ../../Menu/Options.Designer.cs:557 +#: ../../Menu/Options.Designer.cs:578 msgid "Pressure unit " msgstr "" -#: ../../Menu/Options.Designer.cs:587 +#: ../../Menu/Options.Designer.cs:608 msgid "Also in external views " msgstr "" -#: ../../Menu/Options.Designer.cs:597 +#: ../../Menu/Options.Designer.cs:618 msgid "Retainer valve on all cars " msgstr "" -#: ../../Menu/Options.Designer.cs:618 +#: ../../Menu/Options.Designer.cs:639 msgid "Audio" msgstr "" -#: ../../Menu/Options.Designer.cs:684 +#: ../../Menu/Options.Designer.cs:705 msgid "% external sound heard internally" msgstr "" -#: ../../Menu/Options.Designer.cs:720 +#: ../../Menu/Options.Designer.cs:741 msgid "% sound volume" msgstr "" -#: ../../Menu/Options.Designer.cs:731 +#: ../../Menu/Options.Designer.cs:752 msgid "Sound detail level" msgstr "" -#: ../../Menu/Options.Designer.cs:798 +#: ../../Menu/Options.Designer.cs:819 msgid "Video" msgstr "" -#: ../../Menu/Options.Designer.cs:820 +#: ../../Menu/Options.Designer.cs:841 msgid "Default detail (+0%)" msgstr "" -#: ../../Menu/Options.Designer.cs:998 +#: ../../Menu/Options.Designer.cs:1019 msgid "Level of detail bias:" msgstr "" -#: ../../Menu/Options.Designer.cs:1024 +#: ../../Menu/Options.Designer.cs:1045 msgid "Signal light glow" msgstr "" -#: ../../Menu/Options.Designer.cs:1035 +#: ../../Menu/Options.Designer.cs:1056 msgid "Extend object maximum viewing distance to horizon" msgstr "" -#: ../../Menu/Options.Designer.cs:1048 -#: ../../Menu/Options.Designer.cs:1267 +#: ../../Menu/Options.Designer.cs:1069 +#: ../../Menu/Options.Designer.cs:1288 msgid "XXX" msgstr "" -#: ../../Menu/Options.Designer.cs:1058 +#: ../../Menu/Options.Designer.cs:1079 msgid "Anti-aliasing:" msgstr "" -#: ../../Menu/Options.Designer.cs:1087 +#: ../../Menu/Options.Designer.cs:1108 msgid "Shadow for all shapes" msgstr "" -#: ../../Menu/Options.Designer.cs:1098 +#: ../../Menu/Options.Designer.cs:1119 msgid "Double overhead wires" msgstr "" -#: ../../Menu/Options.Designer.cs:1110 +#: ../../Menu/Options.Designer.cs:1131 msgid "Ambient daylight brightness:" msgstr "" -#: ../../Menu/Options.Designer.cs:1121 +#: ../../Menu/Options.Designer.cs:1142 msgid "YYY" msgstr "" -#: ../../Menu/Options.Designer.cs:1130 +#: ../../Menu/Options.Designer.cs:1151 msgid "Model instancing" msgstr "" -#: ../../Menu/Options.Designer.cs:1160 +#: ../../Menu/Options.Designer.cs:1181 msgid "Vertical sync" msgstr "" -#: ../../Menu/Options.Designer.cs:1172 +#: ../../Menu/Options.Designer.cs:1193 msgid "Viewing distance (km)" msgstr "" -#: ../../Menu/Options.Designer.cs:1213 +#: ../../Menu/Options.Designer.cs:1234 msgid "Distant mountains" msgstr "" -#: ../../Menu/Options.Designer.cs:1226 +#: ../../Menu/Options.Designer.cs:1247 msgid "Viewing distance (m)" msgstr "" -#: ../../Menu/Options.Designer.cs:1301 +#: ../../Menu/Options.Designer.cs:1322 msgid "Viewing vertical FOV" msgstr "" -#: ../../Menu/Options.Designer.cs:1312 +#: ../../Menu/Options.Designer.cs:1333 msgid "World object density" msgstr "" -#: ../../Menu/Options.Designer.cs:1336 +#: ../../Menu/Options.Designer.cs:1357 msgid "Dynamic shadows" msgstr "" -#: ../../Menu/Options.Designer.cs:1347 +#: ../../Menu/Options.Designer.cs:1368 msgid "Overhead wire" msgstr "" -#: ../../Menu/Options.Designer.cs:1370 +#: ../../Menu/Options.Designer.cs:1389 msgid "Simulation" msgstr "" -#: ../../Menu/Options.Designer.cs:1383 +#: ../../Menu/Options.Designer.cs:1399 msgid "Electric - power connected" msgstr "" -#: ../../Menu/Options.Designer.cs:1393 +#: ../../Menu/Options.Designer.cs:1409 msgid "At game start, locomotives have:" msgstr "" -#: ../../Menu/Options.Designer.cs:1402 +#: ../../Menu/Options.Designer.cs:1418 msgid "Diesel - engine(s) started" msgstr "" -#: ../../Menu/Options.Designer.cs:1416 +#: ../../Menu/Options.Designer.cs:1432 msgid "Activity Options" msgstr "" -#: ../../Menu/Options.Designer.cs:1426 +#: ../../Menu/Options.Designer.cs:1442 msgid "Location-linked passing path processing" msgstr "" -#: ../../Menu/Options.Designer.cs:1437 +#: ../../Menu/Options.Designer.cs:1453 msgid "Open/close doors in AI trains" msgstr "" -#: ../../Menu/Options.Designer.cs:1448 +#: ../../Menu/Options.Designer.cs:1464 msgid "Forced red at station stops" msgstr "" -#: ../../Menu/Options.Designer.cs:1458 +#: ../../Menu/Options.Designer.cs:1474 msgid "Steam - boiler pre-heated" msgstr "" -#: ../../Menu/Options.Designer.cs:1468 +#: ../../Menu/Options.Designer.cs:1484 msgid "Simple controls and physics" msgstr "" -#: ../../Menu/Options.Designer.cs:1478 +#: ../../Menu/Options.Designer.cs:1494 msgid "Curve dependent speed limit" msgstr "" -#: ../../Menu/Options.Designer.cs:1489 -msgid "Adhesion moving average filter size" -msgstr "" - -#: ../../Menu/Options.Designer.cs:1516 +#: ../../Menu/Options.Designer.cs:1504 msgid "Break couplers" msgstr "" -#: ../../Menu/Options.Designer.cs:1526 +#: ../../Menu/Options.Designer.cs:1514 msgid "Advanced adhesion model" msgstr "" -#: ../../Menu/Options.Designer.cs:1542 +#: ../../Menu/Options.Designer.cs:1529 msgid "Keyboard" msgstr "" -#: ../../Menu/Options.Designer.cs:1552 +#: ../../Menu/Options.Designer.cs:1539 +#: ../../Menu/Options.Designer.cs:2526 msgid "Export" msgstr "" -#: ../../Menu/Options.Designer.cs:1565 +#: ../../Menu/Options.Designer.cs:1552 +#: ../../Menu/Options.Designer.cs:2503 msgid "Defaults" msgstr "" -#: ../../Menu/Options.Designer.cs:1577 +#: ../../Menu/Options.Designer.cs:1564 +#: ../../Menu/Options.Designer.cs:2514 msgid "Check" msgstr "" -#: ../../Menu/Options.Designer.cs:1611 +#: ../../Menu/Options.Designer.cs:1598 msgid "Data logger" msgstr "" -#: ../../Menu/Options.Designer.cs:1642 +#: ../../Menu/Options.Designer.cs:1629 msgid "Speed units" msgstr "" -#: ../../Menu/Options.Designer.cs:1664 +#: ../../Menu/Options.Designer.cs:1651 msgid "Log miscellaneous data" msgstr "" -#: ../../Menu/Options.Designer.cs:1674 +#: ../../Menu/Options.Designer.cs:1661 msgid "Log performance data" msgstr "" -#: ../../Menu/Options.Designer.cs:1684 +#: ../../Menu/Options.Designer.cs:1671 msgid "Start logging with the simulation start" msgstr "" -#: ../../Menu/Options.Designer.cs:1695 +#: ../../Menu/Options.Designer.cs:1682 msgid "Separator" msgstr "" -#: ../../Menu/Options.Designer.cs:1704 +#: ../../Menu/Options.Designer.cs:1691 msgid "Log physics data" msgstr "" -#: ../../Menu/Options.Designer.cs:1714 +#: ../../Menu/Options.Designer.cs:1701 msgid "Log Steam performance data" msgstr "" -#: ../../Menu/Options.Designer.cs:1724 +#: ../../Menu/Options.Designer.cs:1711 msgid "Verbose ENG/WAG configuration messages" msgstr "" -#: ../../Menu/Options.Designer.cs:1739 +#: ../../Menu/Options.Designer.cs:1726 +msgid "RailDriver" +msgstr "" + +#: ../../Menu/Options.Designer.cs:1765 +msgid "Reverse Levers" +msgstr "" + +#: ../../Menu/Options.Designer.cs:1775 +msgid "Reverse Independent Brake Direction" +msgstr "" + +#: ../../Menu/Options.Designer.cs:1786 +msgid "Reverse Auto Brake Direction" +msgstr "" + +#: ../../Menu/Options.Designer.cs:1797 +msgid "Reverse Throttle Direction" +msgstr "" + +#: ../../Menu/Options.Designer.cs:1808 +msgid "Reverse Reverser Direction" +msgstr "" + +#: ../../Menu/Options.Designer.cs:1832 msgid "Evaluation" msgstr "" -#: ../../Menu/Options.Designer.cs:1759 +#: ../../Menu/Options.Designer.cs:1852 msgid "Interval (sec)" msgstr "" -#: ../../Menu/Options.Designer.cs:1768 +#: ../../Menu/Options.Designer.cs:1861 msgid "Log station stops" msgstr "" -#: ../../Menu/Options.Designer.cs:1801 +#: ../../Menu/Options.Designer.cs:1894 msgid "Log train speed" msgstr "" -#: ../../Menu/Options.Designer.cs:1817 +#: ../../Menu/Options.Designer.cs:1910 msgid "Content" msgstr "" -#: ../../Menu/Options.Designer.cs:1840 +#: ../../Menu/Options.Designer.cs:1933 #: ../../Menu/ResumeForm.Designer.cs:150 msgid "Delete" msgstr "" -#: ../../Menu/Options.Designer.cs:1858 +#: ../../Menu/Options.Designer.cs:1951 msgid "Installation profile" msgstr "" -#: ../../Menu/Options.Designer.cs:1867 +#: ../../Menu/Options.Designer.cs:1960 msgid "Change..." msgstr "" -#: ../../Menu/Options.Designer.cs:1888 +#: ../../Menu/Options.Designer.cs:1981 msgid "Name:" msgstr "" -#: ../../Menu/Options.Designer.cs:1897 +#: ../../Menu/Options.Designer.cs:1990 msgid "Path:" msgstr "" -#: ../../Menu/Options.Designer.cs:1916 +#: ../../Menu/Options.Designer.cs:2009 msgid "Add..." msgstr "" -#: ../../Menu/Options.Designer.cs:2023 +#: ../../Menu/Options.Designer.cs:2117 msgid "System" msgstr "" -#: ../../Menu/Options.Designer.cs:2045 +#: ../../Menu/Options.Designer.cs:2139 msgid "Target frame rate" msgstr "" -#: ../../Menu/Options.Designer.cs:2084 +#: ../../Menu/Options.Designer.cs:2178 msgid "Automatically tune settings to keep performance level" msgstr "" -#: ../../Menu/Options.Designer.cs:2108 +#: ../../Menu/Options.Designer.cs:2202 msgid "Web server port" msgstr "" -#: ../../Menu/Options.Designer.cs:2152 -msgid "Show control confirmations " +#: ../../Menu/Options.Designer.cs:2258 +msgid "Messages suppressed " msgstr "" -#: ../../Menu/Options.Designer.cs:2175 +#: ../../Menu/Options.Designer.cs:2280 msgid "Use glass for in-game windows" msgstr "" -#: ../../Menu/Options.Designer.cs:2213 +#: ../../Menu/Options.Designer.cs:2318 msgid "Window size (choose or specify WIDTHxHEIGHT)" msgstr "" -#: ../../Menu/Options.Designer.cs:2235 +#: ../../Menu/Options.Designer.cs:2340 msgid "Windowed" msgstr "" -#: ../../Menu/Options.Designer.cs:2271 +#: ../../Menu/Options.Designer.cs:2376 msgid "Language " msgstr "" -#: ../../Menu/Options.Designer.cs:2293 +#: ../../Menu/Options.Designer.cs:2398 msgid "Update mode:" msgstr "" -#: ../../Menu/Options.Designer.cs:2329 +#: ../../Menu/Options.Designer.cs:2434 msgid "Experimental" msgstr "" -#: ../../Menu/Options.Designer.cs:2340 -#: ../../Menu/Options.Designer.cs:2384 -#: ../../Menu/Options.Designer.cs:2601 +#: ../../Menu/Options.Designer.cs:2445 +#: ../../Menu/Options.Designer.cs:2560 +#: ../../Menu/Options.Designer.cs:2777 msgid "Level" msgstr "" -#: ../../Menu/Options.Designer.cs:2364 +#: ../../Menu/Options.Designer.cs:2469 +msgid "Full Range Throttle" +msgstr "" + +#: ../../Menu/Options.Designer.cs:2479 +msgid "Legend" +msgstr "" + +#: ../../Menu/Options.Designer.cs:2492 +msgid "Calibration" +msgstr "" + +#: ../../Menu/Options.Designer.cs:2540 msgid "Activity weather randomization" msgstr "" -#: ../../Menu/Options.Designer.cs:2374 +#: ../../Menu/Options.Designer.cs:2550 msgid "Activity randomization" msgstr "" -#: ../../Menu/Options.Designer.cs:2407 +#: ../../Menu/Options.Designer.cs:2583 msgid "Correct questionable braking parameters" msgstr "" -#: ../../Menu/Options.Designer.cs:2418 +#: ../../Menu/Options.Designer.cs:2594 msgid "Adhesion factor random change:" msgstr "" -#: ../../Menu/Options.Designer.cs:2428 +#: ../../Menu/Options.Designer.cs:2604 msgid "Adhesion factor correction:" msgstr "" -#: ../../Menu/Options.Designer.cs:2455 +#: ../../Menu/Options.Designer.cs:2631 msgid "Show shape warnings" msgstr "" -#: ../../Menu/Options.Designer.cs:2473 +#: ../../Menu/Options.Designer.cs:2649 msgid "Level:" msgstr "" -#: ../../Menu/Options.Designer.cs:2513 +#: ../../Menu/Options.Designer.cs:2689 msgid "MSTS environments" msgstr "" -#: ../../Menu/Options.Designer.cs:2524 +#: ../../Menu/Options.Designer.cs:2700 msgid "Gauge (mm)" msgstr "" -#: ../../Menu/Options.Designer.cs:2562 +#: ../../Menu/Options.Designer.cs:2738 msgid "Minimum length (m)" msgstr "" -#: ../../Menu/Options.Designer.cs:2613 +#: ../../Menu/Options.Designer.cs:2789 msgid "" "Experimental features that may slow down the game, use at your own risk." msgstr "" -#: ../../Menu/Options.Designer.cs:2637 +#: ../../Menu/Options.Designer.cs:2813 msgid "Super-elevation" msgstr "" -#: ../../Menu/Options.Designer.cs:1654 +#: ../../Menu/Options.Designer.cs:1641 msgid "" "Use data logger to record your simulation data (in-game command: F12).\r\n" "Please remember that the size of the dump file grows with the simulation " "time!" msgstr "" -#: ../../Menu/Options.Designer.cs:1830 +#: ../../Menu/Options.Designer.cs:1923 msgid "" "Installation profiles tell Open Rails where to look for game content. Add " "each full and mini-route MSTS installation." msgstr "" -#: ../../Menu/Options.Designer.cs:1979 +#: ../../Menu/Options.Designer.cs:2072 msgid "Name" msgstr "" -#: ../../Menu/Options.Designer.cs:1987 +#: ../../Menu/Options.Designer.cs:2080 #: ../../Menu/ResumeForm.Designer.cs:372 msgid "Path" msgstr "" -#: ../../Menu/Options.Designer.cs:668 +#: ../../Menu/Options.Designer.cs:689 msgid "" "Min 0 Max 100. Higher: louder sound\r\n" "\r\n" msgstr "" -#: ../../Menu/Options.Designer.cs:704 +#: ../../Menu/Options.Designer.cs:725 msgid "Sound Volume 0-100" msgstr "" -#: ../../Menu/Options.Designer.cs:1014 +#: ../../Menu/Options.Designer.cs:1035 msgid "Default is 0%" msgstr "" -#: ../../Menu/Options.Designer.cs:1075 +#: ../../Menu/Options.Designer.cs:1096 msgid "Default is 2x MSAA" msgstr "" -#: ../../Menu/Options.Designer.cs:1148 +#: ../../Menu/Options.Designer.cs:1169 +#: ../../Menu/Options.Designer.cs:2678 msgid "Default is 100%" msgstr "" -#: ../../Menu/Options.Designer.cs:1198 -#: ../../Menu/Options.Designer.cs:2071 +#: ../../Menu/Options.Designer.cs:1219 +#: ../../Menu/Options.Designer.cs:2165 msgid "Distance to see mountains" msgstr "" -#: ../../Menu/Options.Designer.cs:1566 +#: ../../Menu/Options.Designer.cs:1553 msgid "Load the factory default key assignments." msgstr "" -#: ../../Menu/Options.Designer.cs:1578 +#: ../../Menu/Options.Designer.cs:1565 msgid "Check for incorrect key assignments." msgstr "" -#: ../../Menu/Options.Designer.cs:2354 -#: ../../Menu/Options.Designer.cs:2398 +#: ../../Menu/Options.Designer.cs:2459 +#: ../../Menu/Options.Designer.cs:2574 msgid "" "0: no randomization, 1: moderate, 2: significant; 3: high (may be " "unrealistic)" msgstr "" -#: ../../Menu/Options.Designer.cs:2486 -msgid "Default is 10%" +#: ../../Menu/Options.Designer.cs:2470 +msgid "Use the full range of the Throttle Lever. There will be no Auto Brake!" msgstr "" -#: ../../Menu/Options.Designer.cs:2502 -msgid "Default is 130%" +#: ../../Menu/Options.Designer.cs:2493 +msgid "Calibrate the lever position reading" msgstr "" -#: ../../Menu/Options.Designer.cs:2586 +#: ../../Menu/Options.Designer.cs:2504 +#: ../../Menu/Options.Designer.cs:2515 +msgid "Load the factory default button assignments." +msgstr "" + +#: ../../Menu/Options.Designer.cs:2662 +msgid "Default is 10%" +msgstr "" + +#: ../../Menu/Options.Designer.cs:2762 msgid "Shortest curve to have elevation" msgstr "" -#: ../../Menu/Options.Designer.cs:2627 +#: ../../Menu/Options.Designer.cs:2803 msgid "0: no elevation, 1: 9cm max; 10: 18cm max" msgstr "" -#: ../../Menu/Options.Designer.cs:1553 +#: ../../Menu/Options.Designer.cs:1540 +#: ../../Menu/Options.Designer.cs:2527 msgid "" "Generate a listing of your keyboard assignments. \r\n" "The output is placed on your desktop." msgstr "" +#: ../../Menu/Options.Designer.cs:2480 +msgid "" +"Show a legend of RailDriver board with button and lever description. Press " +"cancel to close again." +msgstr "" + +#: ../../Menu/OptionsRailDriver.cs:186 +msgid "Click to change this button" +msgstr "" + +#: ../../Menu/OptionsRailDriver.cs:244 +msgid "Remove all custom button assignments?" +msgstr "" + +#: ../../Menu/OptionsRailDriver.cs:269 +msgid "" +"A listing of all Raildriver button assignments has been placed here:\n" +"\n" +msgstr "" + +#: ../../Menu/RDButtonInputControl.Designer.cs:71 +msgid "" +"Press any RailDriver button to Assign. Press Backspace to remove an " +"assignment." +msgstr "" + #: ../../Menu/ResumeForm.cs:156 msgid "Explore in Activity Mode" msgstr "" diff --git a/Source/Locales/ORTS.Common/ORTS.Common.pot b/Source/Locales/ORTS.Common/ORTS.Common.pot index b4ba43a429..938cf23fb8 100644 --- a/Source/Locales/ORTS.Common/ORTS.Common.pot +++ b/Source/Locales/ORTS.Common/ORTS.Common.pot @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2023-02-21 17:54:10+0300\n" -"PO-Revision-Date: 2023-02-21 17:54:11+0300\n" +"POT-Creation-Date: 2023-10-24 12:50:11+0200\n" +"PO-Revision-Date: 2023-10-24 12:50:11+0200\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -80,98 +80,110 @@ msgid "kgf/cm²" msgstr "" #: ../../ORTS.Common/Conversions.cs:552 -msgid "kg" +msgid "L/s" msgstr "" #: ../../ORTS.Common/Conversions.cs:553 -msgid "t" +msgid "L/min" msgstr "" #: ../../ORTS.Common/Conversions.cs:554 -msgid "t-uk" +msgid "cfm" msgstr "" #: ../../ORTS.Common/Conversions.cs:555 -msgid "t-us" +msgid "kg" msgstr "" #: ../../ORTS.Common/Conversions.cs:556 -msgid "lb" +msgid "t" msgstr "" #: ../../ORTS.Common/Conversions.cs:557 -msgid "s" +msgid "t-uk" msgstr "" #: ../../ORTS.Common/Conversions.cs:558 -msgid "min" +msgid "t-us" msgstr "" #: ../../ORTS.Common/Conversions.cs:559 -msgid "h" +msgid "lb" msgstr "" #: ../../ORTS.Common/Conversions.cs:560 -msgid "L" +msgid "s" msgstr "" #: ../../ORTS.Common/Conversions.cs:561 -msgid "g-uk" +msgid "min" msgstr "" #: ../../ORTS.Common/Conversions.cs:562 -msgid "g-us" +msgid "h" msgstr "" #: ../../ORTS.Common/Conversions.cs:563 -msgid "rpm" +msgid "L" msgstr "" #: ../../ORTS.Common/Conversions.cs:564 -msgid "kW" +msgid "g-uk" msgstr "" #: ../../ORTS.Common/Conversions.cs:565 -msgid "hp" +msgid "g-us" msgstr "" #: ../../ORTS.Common/Conversions.cs:566 -msgid "bhp" +msgid "rpm" msgstr "" #: ../../ORTS.Common/Conversions.cs:567 -msgid "kJ" +msgid "kW" msgstr "" #: ../../ORTS.Common/Conversions.cs:568 -msgid "MJ" +msgid "hp" msgstr "" #: ../../ORTS.Common/Conversions.cs:569 -msgid "BTU" +msgid "bhp" msgstr "" #: ../../ORTS.Common/Conversions.cs:570 -msgid "°C" +msgid "kJ" msgstr "" #: ../../ORTS.Common/Conversions.cs:571 -msgid "°F" +msgid "MJ" msgstr "" #: ../../ORTS.Common/Conversions.cs:572 -msgid "N" +msgid "BTU" msgstr "" #: ../../ORTS.Common/Conversions.cs:573 -msgid "kN" +msgid "°C" msgstr "" #: ../../ORTS.Common/Conversions.cs:574 -msgid "lbf" +msgid "°F" msgstr "" #: ../../ORTS.Common/Conversions.cs:575 +msgid "N" +msgstr "" + +#: ../../ORTS.Common/Conversions.cs:576 +msgid "kN" +msgstr "" + +#: ../../ORTS.Common/Conversions.cs:577 +msgid "lbf" +msgstr "" + +#: ../../ORTS.Common/Conversions.cs:578 msgid "klbf" msgstr "" @@ -218,874 +230,918 @@ msgid "Game Fullscreen" msgstr "" #: ../../ORTS.Common/Input/UserCommand.cs:17 -msgid "Game Switch Ahead" +msgid "Game External Controller (RailDriver)" msgstr "" #: ../../ORTS.Common/Input/UserCommand.cs:18 -msgid "Game Switch Behind" +msgid "Game Switch Ahead" msgstr "" #: ../../ORTS.Common/Input/UserCommand.cs:19 -msgid "Game Switch Picked" +msgid "Game Switch Behind" msgstr "" #: ../../ORTS.Common/Input/UserCommand.cs:20 -msgid "Game Signal Picked" +msgid "Game Switch Picked" msgstr "" #: ../../ORTS.Common/Input/UserCommand.cs:21 -msgid "Game Switch With Mouse" +msgid "Game Signal Picked" msgstr "" #: ../../ORTS.Common/Input/UserCommand.cs:22 -msgid "Game Uncouple With Mouse" +msgid "Game Switch With Mouse" msgstr "" #: ../../ORTS.Common/Input/UserCommand.cs:23 -msgid "Game Change Cab" +msgid "Game Uncouple With Mouse" msgstr "" #: ../../ORTS.Common/Input/UserCommand.cs:24 -msgid "Game Request Control" +msgid "Game Change Cab" msgstr "" #: ../../ORTS.Common/Input/UserCommand.cs:25 -msgid "Game Multi Player Dispatcher" +msgid "Game Request Control" msgstr "" #: ../../ORTS.Common/Input/UserCommand.cs:26 -msgid "Game Multi Player Texting" +msgid "Game Multi Player Dispatcher" msgstr "" #: ../../ORTS.Common/Input/UserCommand.cs:27 -msgid "Game Switch Manual Mode" +msgid "Game Multi Player Dispatcher Beta" msgstr "" #: ../../ORTS.Common/Input/UserCommand.cs:28 -msgid "Game Reset Out Of Control Mode" +msgid "Game Multi Player Texting" msgstr "" #: ../../ORTS.Common/Input/UserCommand.cs:29 -msgid "Game Clear Signal Forward" +msgid "Game Switch Manual Mode" msgstr "" #: ../../ORTS.Common/Input/UserCommand.cs:30 -msgid "Game Clear Signal Backward" +msgid "Game Reset Out Of Control Mode" msgstr "" #: ../../ORTS.Common/Input/UserCommand.cs:31 -msgid "Game Reset Signal Forward" +msgid "Game Clear Signal Forward" msgstr "" #: ../../ORTS.Common/Input/UserCommand.cs:32 -msgid "Game Reset Signal Backward" +msgid "Game Clear Signal Backward" msgstr "" #: ../../ORTS.Common/Input/UserCommand.cs:33 -msgid "Game Autopilot Mode" +msgid "Game Reset Signal Forward" msgstr "" #: ../../ORTS.Common/Input/UserCommand.cs:34 -msgid "Game Suspend Old Player" +msgid "Game Reset Signal Backward" +msgstr "" + +#: ../../ORTS.Common/Input/UserCommand.cs:35 +msgid "Game Autopilot Mode" msgstr "" #: ../../ORTS.Common/Input/UserCommand.cs:36 +msgid "Game Suspend Old Player" +msgstr "" + +#: ../../ORTS.Common/Input/UserCommand.cs:38 msgid "Display Next Window Tab" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:37 +#: ../../ORTS.Common/Input/UserCommand.cs:39 msgid "Display Help Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:38 +#: ../../ORTS.Common/Input/UserCommand.cs:40 msgid "Display Track Monitor Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:39 +#: ../../ORTS.Common/Input/UserCommand.cs:41 msgid "Display HUD" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:40 +#: ../../ORTS.Common/Input/UserCommand.cs:42 msgid "Display Train Driving Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:41 +#: ../../ORTS.Common/Input/UserCommand.cs:43 msgid "Display Multi Player Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:42 +#: ../../ORTS.Common/Input/UserCommand.cs:44 msgid "Display Car Labels" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:43 +#: ../../ORTS.Common/Input/UserCommand.cs:45 msgid "Display Station Labels" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:44 +#: ../../ORTS.Common/Input/UserCommand.cs:46 msgid "Display Switch Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:45 +#: ../../ORTS.Common/Input/UserCommand.cs:47 msgid "Display Train Operations Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:46 +#: ../../ORTS.Common/Input/UserCommand.cs:48 msgid "Display Train Dpu Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:47 +#: ../../ORTS.Common/Input/UserCommand.cs:49 msgid "Display Next Station Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:48 +#: ../../ORTS.Common/Input/UserCommand.cs:50 msgid "Display Compass Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:49 +#: ../../ORTS.Common/Input/UserCommand.cs:51 msgid "Display Train List Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:50 +#: ../../ORTS.Common/Input/UserCommand.cs:52 msgid "Display EOT List Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:52 +#: ../../ORTS.Common/Input/UserCommand.cs:54 msgid "Debug Speed Up" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:53 +#: ../../ORTS.Common/Input/UserCommand.cs:55 msgid "Debug Speed Down" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:54 +#: ../../ORTS.Common/Input/UserCommand.cs:56 msgid "Debug Speed Reset" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:55 +#: ../../ORTS.Common/Input/UserCommand.cs:57 msgid "Debug Overcast Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:56 +#: ../../ORTS.Common/Input/UserCommand.cs:58 msgid "Debug Overcast Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:57 +#: ../../ORTS.Common/Input/UserCommand.cs:59 msgid "Debug Fog Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:58 +#: ../../ORTS.Common/Input/UserCommand.cs:60 msgid "Debug Fog Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:59 +#: ../../ORTS.Common/Input/UserCommand.cs:61 msgid "Debug Precipitation Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:60 +#: ../../ORTS.Common/Input/UserCommand.cs:62 msgid "Debug Precipitation Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:61 +#: ../../ORTS.Common/Input/UserCommand.cs:63 msgid "Debug Precipitation Liquidity Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:62 +#: ../../ORTS.Common/Input/UserCommand.cs:64 msgid "Debug Precipitation Liquidity Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:63 +#: ../../ORTS.Common/Input/UserCommand.cs:65 +msgid "Debug Daylight Offset Increase" +msgstr "" + +#: ../../ORTS.Common/Input/UserCommand.cs:66 +msgid "Debug Daylight Offset Decrease" +msgstr "" + +#: ../../ORTS.Common/Input/UserCommand.cs:67 msgid "Debug Weather Change" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:64 +#: ../../ORTS.Common/Input/UserCommand.cs:68 msgid "Debug Clock Forwards" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:65 +#: ../../ORTS.Common/Input/UserCommand.cs:69 msgid "Debug Clock Backwards" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:66 +#: ../../ORTS.Common/Input/UserCommand.cs:70 msgid "Debug Logger" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:67 +#: ../../ORTS.Common/Input/UserCommand.cs:71 msgid "Debug Lock Shadows" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:68 +#: ../../ORTS.Common/Input/UserCommand.cs:72 msgid "Debug Dump Keyboard Map" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:69 +#: ../../ORTS.Common/Input/UserCommand.cs:73 msgid "Debug Log Render Frame" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:70 +#: ../../ORTS.Common/Input/UserCommand.cs:74 msgid "Debug Tracks" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:71 +#: ../../ORTS.Common/Input/UserCommand.cs:75 msgid "Debug Signalling" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:72 +#: ../../ORTS.Common/Input/UserCommand.cs:76 msgid "Debug Reset Wheel Slip" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:73 +#: ../../ORTS.Common/Input/UserCommand.cs:77 msgid "Debug Toggle Advanced Adhesion" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:74 +#: ../../ORTS.Common/Input/UserCommand.cs:78 msgid "Debug Sound Form" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:75 +#: ../../ORTS.Common/Input/UserCommand.cs:79 msgid "Debug Physics Form" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:76 +#: ../../ORTS.Common/Input/UserCommand.cs:80 msgid "Debug Toggle Confirmations" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:78 +#: ../../ORTS.Common/Input/UserCommand.cs:82 msgid "Camera Cab" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:79 +#: ../../ORTS.Common/Input/UserCommand.cs:83 msgid "Camera Change Passenger Viewpoint" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:80 +#: ../../ORTS.Common/Input/UserCommand.cs:84 +msgid "Camera Change 3DCab Viewpoint" +msgstr "" + +#: ../../ORTS.Common/Input/UserCommand.cs:85 msgid "Camera Toggle 3D Cab" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:81 +#: ../../ORTS.Common/Input/UserCommand.cs:86 msgid "Camera Toggle Show Cab" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:82 +#: ../../ORTS.Common/Input/UserCommand.cs:87 msgid "Camera Toggle Letterbox Cab" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:83 +#: ../../ORTS.Common/Input/UserCommand.cs:88 msgid "Camera Head Out Forward" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:84 +#: ../../ORTS.Common/Input/UserCommand.cs:89 msgid "Camera Head Out Backward" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:85 +#: ../../ORTS.Common/Input/UserCommand.cs:90 msgid "Camera Outside Front" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:86 +#: ../../ORTS.Common/Input/UserCommand.cs:91 msgid "Camera Outside Rear" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:87 +#: ../../ORTS.Common/Input/UserCommand.cs:92 msgid "Camera Trackside" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:88 +#: ../../ORTS.Common/Input/UserCommand.cs:93 msgid "Camera SpecialTracksidePoint" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:89 +#: ../../ORTS.Common/Input/UserCommand.cs:94 msgid "Camera Passenger" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:90 +#: ../../ORTS.Common/Input/UserCommand.cs:95 msgid "Camera Brakeman" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:91 +#: ../../ORTS.Common/Input/UserCommand.cs:96 msgid "Camera Free" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:92 +#: ../../ORTS.Common/Input/UserCommand.cs:97 msgid "Camera Previous Free" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:93 +#: ../../ORTS.Common/Input/UserCommand.cs:98 msgid "Camera Reset" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:94 +#: ../../ORTS.Common/Input/UserCommand.cs:99 msgid "Camera Move Fast" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:95 +#: ../../ORTS.Common/Input/UserCommand.cs:100 msgid "Camera Move Slow" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:96 +#: ../../ORTS.Common/Input/UserCommand.cs:101 msgid "Camera Pan (Rotate) Left" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:97 +#: ../../ORTS.Common/Input/UserCommand.cs:102 msgid "Camera Pan (Rotate) Right" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:98 +#: ../../ORTS.Common/Input/UserCommand.cs:103 msgid "Camera Pan (Rotate) Up" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:99 +#: ../../ORTS.Common/Input/UserCommand.cs:104 msgid "Camera Pan (Rotate) Down" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:100 +#: ../../ORTS.Common/Input/UserCommand.cs:105 msgid "Camera Zoom In (Move Z)" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:101 +#: ../../ORTS.Common/Input/UserCommand.cs:106 msgid "Camera Zoom Out (Move Z)" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:102 +#: ../../ORTS.Common/Input/UserCommand.cs:107 msgid "Camera Rotate (Pan) Left" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:103 +#: ../../ORTS.Common/Input/UserCommand.cs:108 msgid "Camera Rotate (Pan) Right" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:104 +#: ../../ORTS.Common/Input/UserCommand.cs:109 msgid "Camera Rotate (Pan) Up" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:105 +#: ../../ORTS.Common/Input/UserCommand.cs:110 msgid "Camera Rotate (Pan) Down" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:106 +#: ../../ORTS.Common/Input/UserCommand.cs:111 msgid "Camera Car Next" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:107 +#: ../../ORTS.Common/Input/UserCommand.cs:112 msgid "Camera Car Previous" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:108 +#: ../../ORTS.Common/Input/UserCommand.cs:113 msgid "Camera Car First" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:109 +#: ../../ORTS.Common/Input/UserCommand.cs:114 msgid "Camera Car Last" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:110 +#: ../../ORTS.Common/Input/UserCommand.cs:115 msgid "Camera Jumping Trains" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:111 +#: ../../ORTS.Common/Input/UserCommand.cs:116 msgid "Camera Jump Back Player" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:112 +#: ../../ORTS.Common/Input/UserCommand.cs:117 msgid "Camera Jump See Switch" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:113 +#: ../../ORTS.Common/Input/UserCommand.cs:118 msgid "Camera Vibrate" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:114 +#: ../../ORTS.Common/Input/UserCommand.cs:119 msgid "Camera Scroll Right" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:115 +#: ../../ORTS.Common/Input/UserCommand.cs:120 msgid "Camera Scroll Left" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:116 +#: ../../ORTS.Common/Input/UserCommand.cs:121 msgid "Camera Browse Backwards" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:117 +#: ../../ORTS.Common/Input/UserCommand.cs:122 msgid "Camera Browse Forwards" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:119 +#: ../../ORTS.Common/Input/UserCommand.cs:124 msgid "Control Forwards" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:120 +#: ../../ORTS.Common/Input/UserCommand.cs:125 msgid "Control Backwards" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:121 +#: ../../ORTS.Common/Input/UserCommand.cs:126 msgid "Control Throttle Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:122 +#: ../../ORTS.Common/Input/UserCommand.cs:127 msgid "Control Throttle Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:123 +#: ../../ORTS.Common/Input/UserCommand.cs:128 msgid "Control Throttle Zero" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:124 +#: ../../ORTS.Common/Input/UserCommand.cs:129 msgid "Control Gear Up" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:125 +#: ../../ORTS.Common/Input/UserCommand.cs:130 msgid "Control Gear Down" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:126 +#: ../../ORTS.Common/Input/UserCommand.cs:131 msgid "Control Train Brake Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:127 +#: ../../ORTS.Common/Input/UserCommand.cs:132 msgid "Control Train Brake Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:128 +#: ../../ORTS.Common/Input/UserCommand.cs:133 msgid "Control Train Brake Zero" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:129 +#: ../../ORTS.Common/Input/UserCommand.cs:134 msgid "Control Engine Brake Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:130 +#: ../../ORTS.Common/Input/UserCommand.cs:135 msgid "Control Engine Brake Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:131 +#: ../../ORTS.Common/Input/UserCommand.cs:136 msgid "Control Brakeman Brake Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:132 +#: ../../ORTS.Common/Input/UserCommand.cs:137 msgid "Control Brakeman Brake Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:133 +#: ../../ORTS.Common/Input/UserCommand.cs:138 msgid "Control Dynamic Brake Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:134 +#: ../../ORTS.Common/Input/UserCommand.cs:139 msgid "Control Dynamic Brake Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:135 +#: ../../ORTS.Common/Input/UserCommand.cs:140 msgid "Control Bail Off" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:136 +#: ../../ORTS.Common/Input/UserCommand.cs:141 +msgid "Control Brake Quick Release" +msgstr "" + +#: ../../ORTS.Common/Input/UserCommand.cs:142 +msgid "Control Brake Overcharge" +msgstr "" + +#: ../../ORTS.Common/Input/UserCommand.cs:143 msgid "Control Initialize Brakes" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:137 +#: ../../ORTS.Common/Input/UserCommand.cs:144 msgid "Control Handbrake Full" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:138 +#: ../../ORTS.Common/Input/UserCommand.cs:145 msgid "Control Handbrake None" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:139 +#: ../../ORTS.Common/Input/UserCommand.cs:146 msgid "Control Odometer Show/Hide" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:140 +#: ../../ORTS.Common/Input/UserCommand.cs:147 msgid "Control Odometer Reset" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:141 +#: ../../ORTS.Common/Input/UserCommand.cs:148 msgid "Control Odometer Direction" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:142 +#: ../../ORTS.Common/Input/UserCommand.cs:149 msgid "Control Retainers On" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:143 +#: ../../ORTS.Common/Input/UserCommand.cs:150 msgid "Control Retainers Off" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:144 +#: ../../ORTS.Common/Input/UserCommand.cs:151 msgid "Control Brake Hose Connect" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:145 +#: ../../ORTS.Common/Input/UserCommand.cs:152 msgid "Control Brake Hose Disconnect" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:146 +#: ../../ORTS.Common/Input/UserCommand.cs:153 msgid "Control Alerter" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:147 +#: ../../ORTS.Common/Input/UserCommand.cs:154 msgid "Control Emergency Push Button" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:148 +#: ../../ORTS.Common/Input/UserCommand.cs:155 msgid "Control EOT Emergency Brake" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:149 +#: ../../ORTS.Common/Input/UserCommand.cs:156 msgid "Control Sander" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:150 +#: ../../ORTS.Common/Input/UserCommand.cs:157 msgid "Control Sander Toggle" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:151 +#: ../../ORTS.Common/Input/UserCommand.cs:158 msgid "Control Wiper" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:152 +#: ../../ORTS.Common/Input/UserCommand.cs:159 msgid "Control Horn" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:153 +#: ../../ORTS.Common/Input/UserCommand.cs:160 msgid "Control Bell" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:154 +#: ../../ORTS.Common/Input/UserCommand.cs:161 msgid "Control Bell Toggle" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:155 +#: ../../ORTS.Common/Input/UserCommand.cs:162 msgid "Control Door Left" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:156 +#: ../../ORTS.Common/Input/UserCommand.cs:163 msgid "Control Door Right" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:157 +#: ../../ORTS.Common/Input/UserCommand.cs:164 msgid "Control Mirror" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:158 +#: ../../ORTS.Common/Input/UserCommand.cs:165 msgid "Control Light" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:159 +#: ../../ORTS.Common/Input/UserCommand.cs:166 msgid "Control Pantograph 1" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:160 +#: ../../ORTS.Common/Input/UserCommand.cs:167 msgid "Control Pantograph 2" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:161 +#: ../../ORTS.Common/Input/UserCommand.cs:168 msgid "Control Pantograph 3" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:162 +#: ../../ORTS.Common/Input/UserCommand.cs:169 msgid "Control Pantograph 4" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:163 +#: ../../ORTS.Common/Input/UserCommand.cs:170 +msgid "Control Window Left" +msgstr "" + +#: ../../ORTS.Common/Input/UserCommand.cs:171 +msgid "Control Window Right" +msgstr "" + +#: ../../ORTS.Common/Input/UserCommand.cs:172 msgid "Control Battery Close" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:164 +#: ../../ORTS.Common/Input/UserCommand.cs:173 msgid "Control Battery Open" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:165 +#: ../../ORTS.Common/Input/UserCommand.cs:174 msgid "Control Master Key" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:166 +#: ../../ORTS.Common/Input/UserCommand.cs:175 msgid "Control Service Retention" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:167 +#: ../../ORTS.Common/Input/UserCommand.cs:176 msgid "Control Service Retention Cancellation" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:168 +#: ../../ORTS.Common/Input/UserCommand.cs:177 msgid "Control Circuit Breaker Closing Order" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:169 +#: ../../ORTS.Common/Input/UserCommand.cs:178 msgid "Control Circuit Breaker Opening Order" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:170 +#: ../../ORTS.Common/Input/UserCommand.cs:179 msgid "Control Circuit Breaker Closing Authorization" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:171 +#: ../../ORTS.Common/Input/UserCommand.cs:180 msgid "Control Traction Cut-Off Relay Closing Order" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:172 +#: ../../ORTS.Common/Input/UserCommand.cs:181 msgid "Control Traction Cut-Off Relay Opening Order" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:173 +#: ../../ORTS.Common/Input/UserCommand.cs:182 msgid "Control Traction Cut-Off Relay Closing Authorization" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:174 +#: ../../ORTS.Common/Input/UserCommand.cs:183 msgid "Control Electric Train Supply" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:175 +#: ../../ORTS.Common/Input/UserCommand.cs:184 msgid "Control Diesel Player" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:176 +#: ../../ORTS.Common/Input/UserCommand.cs:185 msgid "Control Diesel Helper" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:177 +#: ../../ORTS.Common/Input/UserCommand.cs:186 msgid "Control Headlight Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:178 +#: ../../ORTS.Common/Input/UserCommand.cs:187 msgid "Control Headlight Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:179 +#: ../../ORTS.Common/Input/UserCommand.cs:188 msgid "Control Injector 1 Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:180 +#: ../../ORTS.Common/Input/UserCommand.cs:189 msgid "Control Injector 1 Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:181 +#: ../../ORTS.Common/Input/UserCommand.cs:190 msgid "Control Injector 1" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:182 +#: ../../ORTS.Common/Input/UserCommand.cs:191 msgid "Control Injector 2 Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:183 +#: ../../ORTS.Common/Input/UserCommand.cs:192 msgid "Control Injector 2 Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:184 +#: ../../ORTS.Common/Input/UserCommand.cs:193 msgid "Control Injector 2" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:185 +#: ../../ORTS.Common/Input/UserCommand.cs:194 msgid "Control Blowdown Valve" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:186 +#: ../../ORTS.Common/Input/UserCommand.cs:195 msgid "Control Blower Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:187 +#: ../../ORTS.Common/Input/UserCommand.cs:196 msgid "Control Blower Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:188 +#: ../../ORTS.Common/Input/UserCommand.cs:197 msgid "Control Steam Heat Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:189 +#: ../../ORTS.Common/Input/UserCommand.cs:198 msgid "Control Steam Heat Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:190 +#: ../../ORTS.Common/Input/UserCommand.cs:199 +msgid "Control Steam Booster Increase" +msgstr "" + +#: ../../ORTS.Common/Input/UserCommand.cs:200 +msgid "Control Steam Booster Decrease" +msgstr "" + +#: ../../ORTS.Common/Input/UserCommand.cs:201 msgid "Control Damper Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:191 +#: ../../ORTS.Common/Input/UserCommand.cs:202 msgid "Control Damper Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:192 +#: ../../ORTS.Common/Input/UserCommand.cs:203 msgid "Control Firebox Open" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:193 +#: ../../ORTS.Common/Input/UserCommand.cs:204 msgid "Control Firebox Close" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:194 +#: ../../ORTS.Common/Input/UserCommand.cs:205 msgid "Control Firing Rate Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:195 +#: ../../ORTS.Common/Input/UserCommand.cs:206 msgid "Control Firing Rate Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:196 +#: ../../ORTS.Common/Input/UserCommand.cs:207 msgid "Control Fire Shovel Full" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:197 +#: ../../ORTS.Common/Input/UserCommand.cs:208 msgid "Control Cylinder Cocks" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:198 +#: ../../ORTS.Common/Input/UserCommand.cs:209 msgid "Control Large Ejector Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:199 +#: ../../ORTS.Common/Input/UserCommand.cs:210 msgid "Control Large Ejector Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:200 +#: ../../ORTS.Common/Input/UserCommand.cs:211 msgid "Control Small Ejector Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:201 +#: ../../ORTS.Common/Input/UserCommand.cs:212 msgid "Control Small Ejector Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:202 +#: ../../ORTS.Common/Input/UserCommand.cs:213 msgid "Control Vacuum Exhauster" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:203 +#: ../../ORTS.Common/Input/UserCommand.cs:214 msgid "Control Cylinder Compound" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:204 +#: ../../ORTS.Common/Input/UserCommand.cs:215 msgid "Control Firing" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:205 +#: ../../ORTS.Common/Input/UserCommand.cs:216 msgid "Control Refill" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:206 +#: ../../ORTS.Common/Input/UserCommand.cs:217 msgid "Control Discrete Unload" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:207 +#: ../../ORTS.Common/Input/UserCommand.cs:218 msgid "Control Water Scoop" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:208 +#: ../../ORTS.Common/Input/UserCommand.cs:219 msgid "Control ImmediateRefill" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:209 +#: ../../ORTS.Common/Input/UserCommand.cs:220 msgid "Control Turntable Clockwise" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:210 +#: ../../ORTS.Common/Input/UserCommand.cs:221 msgid "Control Turntable Counterclockwise" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:211 +#: ../../ORTS.Common/Input/UserCommand.cs:222 msgid "Control Generic Item 1" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:212 +#: ../../ORTS.Common/Input/UserCommand.cs:223 msgid "Control Generic Item 2" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:213 +#: ../../ORTS.Common/Input/UserCommand.cs:224 msgid "Control TCS Generic 1" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:214 +#: ../../ORTS.Common/Input/UserCommand.cs:225 msgid "Control TCS Generic 2" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:215 +#: ../../ORTS.Common/Input/UserCommand.cs:226 msgid "Control Cab Radio" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:216 +#: ../../ORTS.Common/Input/UserCommand.cs:227 msgid "Control AI Fire On" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:217 +#: ../../ORTS.Common/Input/UserCommand.cs:228 msgid "Control AI Fire Off" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:218 +#: ../../ORTS.Common/Input/UserCommand.cs:229 msgid "Control AI Fire Reset" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:221 +#: ../../ORTS.Common/Input/UserCommand.cs:232 msgid "Control Speed Regulator Mode Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:222 +#: ../../ORTS.Common/Input/UserCommand.cs:233 msgid "Control Speed Regulator Mode Descrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:223 +#: ../../ORTS.Common/Input/UserCommand.cs:234 msgid "Control Selected Speed Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:224 +#: ../../ORTS.Common/Input/UserCommand.cs:235 msgid "Control Selected Speed Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:225 +#: ../../ORTS.Common/Input/UserCommand.cs:236 msgid "Control Speed Regulator Max Acceleration Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:226 +#: ../../ORTS.Common/Input/UserCommand.cs:237 msgid "Control Speed Regulator Max Acceleration Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:227 +#: ../../ORTS.Common/Input/UserCommand.cs:238 msgid "Control Number Of Axles Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:228 +#: ../../ORTS.Common/Input/UserCommand.cs:239 msgid "Control Number Of Axles Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:229 +#: ../../ORTS.Common/Input/UserCommand.cs:240 msgid "Control Restricted Speed Zone Active" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:230 +#: ../../ORTS.Common/Input/UserCommand.cs:241 msgid "Control Cruise Control Mode Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:231 +#: ../../ORTS.Common/Input/UserCommand.cs:242 msgid "Control Cruise Control Mode Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:232 +#: ../../ORTS.Common/Input/UserCommand.cs:243 msgid "Control Train Type Change (Passenger/Cargo)" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:233 +#: ../../ORTS.Common/Input/UserCommand.cs:244 msgid "Control Selected Speed To Zero" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:235 +#: ../../ORTS.Common/Input/UserCommand.cs:246 msgid "Control DP Move To Front" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:236 +#: ../../ORTS.Common/Input/UserCommand.cs:247 msgid "Control DP Move To Back" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:237 +#: ../../ORTS.Common/Input/UserCommand.cs:248 msgid "Control DP Traction" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:238 +#: ../../ORTS.Common/Input/UserCommand.cs:249 msgid "Control DP Idle" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:239 +#: ../../ORTS.Common/Input/UserCommand.cs:250 msgid "Control DP Brake" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:240 +#: ../../ORTS.Common/Input/UserCommand.cs:251 msgid "Control DP More" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:241 +#: ../../ORTS.Common/Input/UserCommand.cs:252 msgid "Control DP Less" msgstr "" diff --git a/Source/Locales/ORTS.Menu/ORTS.Menu.pot b/Source/Locales/ORTS.Menu/ORTS.Menu.pot index 5ba53b0cd3..0264d76010 100644 --- a/Source/Locales/ORTS.Menu/ORTS.Menu.pot +++ b/Source/Locales/ORTS.Menu/ORTS.Menu.pot @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2023-02-21 17:54:12+0300\n" -"PO-Revision-Date: 2023-02-21 17:54:12+0300\n" +"POT-Creation-Date: 2023-10-24 12:50:17+0200\n" +"PO-Revision-Date: 2023-10-24 12:50:17+0200\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" diff --git a/Source/Locales/ORTS.Settings/ORTS.Settings.pot b/Source/Locales/ORTS.Settings/ORTS.Settings.pot index 501183c91a..a3ea2da967 100644 --- a/Source/Locales/ORTS.Settings/ORTS.Settings.pot +++ b/Source/Locales/ORTS.Settings/ORTS.Settings.pot @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2023-02-21 17:54:12+0300\n" -"PO-Revision-Date: 2023-02-21 17:54:12+0300\n" +"POT-Creation-Date: 2023-10-24 12:50:20+0200\n" +"PO-Revision-Date: 2023-10-24 12:50:20+0200\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -11,23 +11,142 @@ msgstr "" "X-Generator: MonoDevelop Gettext addin\n" -#: ../../ORTS.Settings/InputSettings.cs:555 +#: ../../ORTS.Settings/InputSettings.cs:567 #, csharp-format msgid "{0} requires and is modified by Shift" msgstr "" -#: ../../ORTS.Settings/InputSettings.cs:557 +#: ../../ORTS.Settings/InputSettings.cs:569 #, csharp-format msgid "{0} requires and is modified by Control" msgstr "" -#: ../../ORTS.Settings/InputSettings.cs:559 +#: ../../ORTS.Settings/InputSettings.cs:571 #, csharp-format msgid "{0} requires and is modified by Alt" msgstr "" -#: ../../ORTS.Settings/InputSettings.cs:590 +#: ../../ORTS.Settings/InputSettings.cs:602 #, csharp-format msgid "{0} and {1} both match {2}" msgstr "" +#: ../../ORTS.Settings/RailDriverSettings.cs:15 +msgid "Reverser Neutral" +msgstr "" + +#: ../../ORTS.Settings/RailDriverSettings.cs:16 +msgid "Reverser Full Reversed" +msgstr "" + +#: ../../ORTS.Settings/RailDriverSettings.cs:17 +msgid "Reverser Full Forward" +msgstr "" + +#: ../../ORTS.Settings/RailDriverSettings.cs:18 +msgid "Throttle Idle" +msgstr "" + +#: ../../ORTS.Settings/RailDriverSettings.cs:19 +msgid "Full Throttle" +msgstr "" + +#: ../../ORTS.Settings/RailDriverSettings.cs:20 +msgid "Dynamic Brake" +msgstr "" + +#: ../../ORTS.Settings/RailDriverSettings.cs:21 +msgid "Dynamic Brake Setup" +msgstr "" + +#: ../../ORTS.Settings/RailDriverSettings.cs:22 +msgid "Auto Brake Released" +msgstr "" + +#: ../../ORTS.Settings/RailDriverSettings.cs:23 +msgid "Full Auto Brake " +msgstr "" + +#: ../../ORTS.Settings/RailDriverSettings.cs:24 +msgid "Emergency Brake" +msgstr "" + +#: ../../ORTS.Settings/RailDriverSettings.cs:25 +msgid "Independent Brake Released" +msgstr "" + +#: ../../ORTS.Settings/RailDriverSettings.cs:26 +msgid "Independent Brake Full" +msgstr "" + +#: ../../ORTS.Settings/RailDriverSettings.cs:27 +msgid "Bail Off Disengaged (in Released position)" +msgstr "" + +#: ../../ORTS.Settings/RailDriverSettings.cs:28 +msgid "Bail Off Engaged (in Released position)" +msgstr "" + +#: ../../ORTS.Settings/RailDriverSettings.cs:29 +msgid "Bail Off Disengaged (in Full position)" +msgstr "" + +#: ../../ORTS.Settings/RailDriverSettings.cs:30 +msgid "Bail Off Engaged (in Full position)" +msgstr "" + +#: ../../ORTS.Settings/RailDriverSettings.cs:31 +msgid "Rotary Switch 1-Position 1(OFF)" +msgstr "" + +#: ../../ORTS.Settings/RailDriverSettings.cs:32 +msgid "Rotary Switch 1-Position 2(SLOW)" +msgstr "" + +#: ../../ORTS.Settings/RailDriverSettings.cs:33 +msgid "Rotary Switch 1-Position 3(FULL)" +msgstr "" + +#: ../../ORTS.Settings/RailDriverSettings.cs:34 +msgid "Rotary Switch 2-Position 1(OFF)" +msgstr "" + +#: ../../ORTS.Settings/RailDriverSettings.cs:35 +msgid "Rotary Switch 2-Position 2(DIM)" +msgstr "" + +#: ../../ORTS.Settings/RailDriverSettings.cs:36 +msgid "Rotary Switch 2-Position 3(FULL)" +msgstr "" + +#: ../../ORTS.Settings/RailDriverSettings.cs:37 +msgid "Reverse Reverser Direction" +msgstr "" + +#: ../../ORTS.Settings/RailDriverSettings.cs:38 +msgid "Reverse Throttle Direction" +msgstr "" + +#: ../../ORTS.Settings/RailDriverSettings.cs:39 +msgid "Reverse Auto Brake Direction" +msgstr "" + +#: ../../ORTS.Settings/RailDriverSettings.cs:40 +msgid "Reverse Independent Brake Direction" +msgstr "" + +#: ../../ORTS.Settings/RailDriverSettings.cs:41 +msgid "Full Range Throttle" +msgstr "" + +#: ../../ORTS.Settings/RailDriverSettings.cs:42 +msgid "Cut Off Delta" +msgstr "" + +#: ../../ORTS.Settings/RailDriverSettings.cs:225 +#, csharp-format +msgid "" +"Button {0} is assigned to \r\n" +"\t" +msgstr "" + diff --git a/Source/Locales/Orts.Formats.OR/Orts.Formats.OR.pot b/Source/Locales/Orts.Formats.OR/Orts.Formats.OR.pot index 688f08e458..a61971d1e7 100644 --- a/Source/Locales/Orts.Formats.OR/Orts.Formats.OR.pot +++ b/Source/Locales/Orts.Formats.OR/Orts.Formats.OR.pot @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2023-02-21 17:54:11+0300\n" -"PO-Revision-Date: 2023-02-21 17:54:12+0300\n" +"POT-Creation-Date: 2023-10-24 12:50:14+0200\n" +"PO-Revision-Date: 2023-10-24 12:50:14+0200\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" diff --git a/Source/Locales/Orts.Simulation/Orts.Simulation.pot b/Source/Locales/Orts.Simulation/Orts.Simulation.pot index e03dcefd65..805192177e 100644 --- a/Source/Locales/Orts.Simulation/Orts.Simulation.pot +++ b/Source/Locales/Orts.Simulation/Orts.Simulation.pot @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2023-02-21 17:54:12+0300\n" -"PO-Revision-Date: 2023-02-21 17:54:18+0300\n" +"POT-Creation-Date: 2023-10-24 12:50:23+0200\n" +"PO-Revision-Date: 2023-10-24 12:50:25+0200\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -11,159 +11,168 @@ msgstr "" "X-Generator: MonoDevelop Gettext addin\n" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:371 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:81 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:377 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:110 msgid "Release" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:372 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:236 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:378 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:240 msgid "Quick Release" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:374 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:380 msgid "Neutral" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:375 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:80 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:381 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:109 msgid "Apply" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:376 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:382 msgid "EPApply" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:377 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:82 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:383 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:111 msgid "Emergency" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:378 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:384 msgid "Self Lap" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:379 -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:380 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:385 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:386 msgid "Service" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:381 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:79 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:387 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:108 msgid "Lap" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:382 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:388 msgid "Suppression" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:383 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:389 msgid "Cont. Service" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:384 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:390 msgid "Full Service" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:385 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:391 msgid "Minimum Reduction" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:386 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:392 msgid "Hold" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:387 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:393 msgid "Str. Brk. Release On:" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:388 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:394 msgid "Str. Brk. Release Off:" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:389 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:395 msgid "Str. Brk. Release:" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:390 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:396 msgid "Str. Brk. Lap:" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:391 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:397 msgid "Str. Brk. Apply:" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:392 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:398 msgid "Str. Brk. Apply All:" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:393 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:399 msgid "Str. Brk. Emerg:" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:394 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:237 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:400 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:241 msgid "Overcharge" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:395 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:401 msgid "Emergency Braking Push Button" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:396 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:402 msgid "TCS Emergency Braking" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:397 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:403 msgid "TCS Full Service Braking" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:398 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:404 msgid "Vac. Cont. Service" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:399 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:405 msgid "Vac. Apply Cont. Service" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:400 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:406 msgid "Manual Braking" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:401 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:407 msgid "Notch" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:402 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:408 msgid "EP Service" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:403 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:409 msgid "EP Full Service" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:404 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:410 msgid "Slow service" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:405 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:411 msgid "SME Service" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:406 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:412 msgid "SME Full Service" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:407 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:413 msgid "SME Self Lap" msgstr "" -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:408 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:414 msgid "SME Release Start" msgstr "" +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:415 +msgid "Hold Engine" +msgstr "" + +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:416 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:235 +msgid "Bail Off" +msgstr "" + #. Context: Brake Controller -#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:373 +#: ../../Orts.Simulation/Common/Scripting/BrakeController.cs:379 msgctxt "Brake Controller" msgid "Running" msgstr "" @@ -414,20 +423,20 @@ msgstr[0] "" msgstr[1] "" #: ../../Orts.Simulation/Simulation/Activity.cs:1004 -#: ../../Orts.Simulation/Simulation/AIs/AITrain.cs:6576 -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10599 +#: ../../Orts.Simulation/Simulation/AIs/AITrain.cs:6443 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10381 msgid "Passenger boarding completed. Waiting for signal ahead to clear." msgstr "" #: ../../Orts.Simulation/Simulation/Activity.cs:1009 -#: ../../Orts.Simulation/Simulation/AIs/AITrain.cs:6581 -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10607 +#: ../../Orts.Simulation/Simulation/AIs/AITrain.cs:6448 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10389 msgid "Passenger boarding completed. You may depart now." msgstr "" #: ../../Orts.Simulation/Simulation/Activity.cs:984 -#: ../../Orts.Simulation/Simulation/AIs/AITrain.cs:6588 -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10614 +#: ../../Orts.Simulation/Simulation/AIs/AITrain.cs:6455 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10396 #, csharp-format msgid "Passenger boarding completes in {0:D2}:{1:D2}" msgstr "" @@ -452,758 +461,778 @@ msgstr "" msgid "MSG" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:183 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:186 msgid "" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:185 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:204 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:188 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:207 msgid "reverse" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:185 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:204 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:188 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:207 msgid "neutral" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:185 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:204 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:188 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:207 msgid "forward" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:185 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:204 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:188 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:207 msgid "locked. Close throttle, stop train then re-try." msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:186 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1210 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1224 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:189 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1229 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1243 msgid "Throttle" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:186 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:194 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:195 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:202 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:189 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:197 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:198 #: ../../Orts.Simulation/Simulation/Confirmer.cs:205 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:206 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:207 #: ../../Orts.Simulation/Simulation/Confirmer.cs:208 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:209 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:210 #: ../../Orts.Simulation/Simulation/Confirmer.cs:211 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:212 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:216 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:217 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:255 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:256 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:214 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:215 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:219 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:221 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:259 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:260 msgid "close" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:186 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:194 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:195 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:202 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:189 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:197 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:198 #: ../../Orts.Simulation/Simulation/Confirmer.cs:205 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:206 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:207 #: ../../Orts.Simulation/Simulation/Confirmer.cs:208 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:209 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:210 #: ../../Orts.Simulation/Simulation/Confirmer.cs:211 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:212 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:216 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:217 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:255 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:256 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:214 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:215 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:219 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:221 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:259 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:260 msgid "open" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:186 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:189 msgid "locked. Release dynamic brake then re-try." msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:187 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:190 msgid "Wheel-slip" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:187 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:190 msgid "over" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:187 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:190 msgid "occurring. Tractive power greatly reduced." msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:187 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:190 msgid "warning" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:189 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:192 msgid "Power" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:189 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:198 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:199 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:206 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:207 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:214 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:229 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:234 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:236 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:237 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:239 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:192 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:201 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:202 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:209 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:210 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:217 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:233 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:238 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:240 #: ../../Orts.Simulation/Simulation/Confirmer.cs:241 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:242 #: ../../Orts.Simulation/Simulation/Confirmer.cs:243 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:244 #: ../../Orts.Simulation/Simulation/Confirmer.cs:245 #: ../../Orts.Simulation/Simulation/Confirmer.cs:246 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:247 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:248 #: ../../Orts.Simulation/Simulation/Confirmer.cs:249 #: ../../Orts.Simulation/Simulation/Confirmer.cs:250 #: ../../Orts.Simulation/Simulation/Confirmer.cs:253 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:271 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:254 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:257 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:277 msgid "off" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:189 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:198 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:199 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:206 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:207 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:214 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:234 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:236 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:237 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:239 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:245 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:246 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:192 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:201 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:202 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:209 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:210 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:217 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:238 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:240 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:241 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:243 #: ../../Orts.Simulation/Simulation/Confirmer.cs:249 #: ../../Orts.Simulation/Simulation/Confirmer.cs:250 #: ../../Orts.Simulation/Simulation/Confirmer.cs:253 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:271 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:254 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:257 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:277 msgid "on" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:190 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:193 msgid "Pantograph 1" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:190 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:191 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:192 #: ../../Orts.Simulation/Simulation/Confirmer.cs:193 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:194 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:195 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:196 msgid "lower" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:190 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:191 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:192 #: ../../Orts.Simulation/Simulation/Confirmer.cs:193 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:194 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:195 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:196 msgid "raise" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:191 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:194 msgid "Pantograph 2" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:192 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:195 msgid "Pantograph 3" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:193 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:196 msgid "Pantograph 4" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:194 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:195 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:355 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:370 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:197 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:198 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:357 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:372 msgid "Circuit breaker" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:196 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:199 msgid "Circuit breaker closing authorization" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:196 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:199 msgid "remove" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:196 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:199 msgid "give" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:198 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:201 msgid "Player Diesel Power" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:198 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:201 msgid "locked. Close throttle then re-try." msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:199 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:202 msgid "Helper Diesel Power" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:200 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:203 msgid "Diesel Tank" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:200 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:201 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:203 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:204 msgid "re-fueled" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:200 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:201 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:203 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:204 msgid "level" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:201 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:204 msgid "Boiler Water Tank" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:202 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:940 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:205 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:959 msgid "Traction cut-off relay" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:205 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:208 msgid "Regulator" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:206 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:209 msgid "Injector 1" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:207 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:210 msgid "Injector 2" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:208 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:211 msgid "Blowdown Valve" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:209 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6354 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6381 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:212 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6335 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6362 msgid "Blower" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:209 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:210 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:212 #: ../../Orts.Simulation/Simulation/Confirmer.cs:213 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:218 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:219 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:229 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:262 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:216 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:220 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:222 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:223 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:233 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:268 msgid "decrease" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:209 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:210 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:212 #: ../../Orts.Simulation/Simulation/Confirmer.cs:213 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:218 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:219 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:229 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:262 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:216 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:220 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:222 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:223 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:233 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:268 msgid "increase" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:210 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:213 msgid "SteamHeat" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:211 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:214 msgid "Damper" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:212 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:215 msgid "Firebox Door" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:213 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:216 msgid "Firing Rate" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:214 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:217 msgid "Manual Firing" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:215 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:218 msgid "Fire" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:215 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:218 msgid "add shovel-full" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:216 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:219 msgid "Cylinder Cocks" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:217 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:220 +msgid "SteamBooster" +msgstr "" + +#: ../../Orts.Simulation/Simulation/Confirmer.cs:221 msgid "Cylinder Compound" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:218 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:222 msgid "LargeEjector" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:219 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:223 msgid "SmallEjector" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:220 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:224 msgid "VacuumExhauster" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:220 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:224 msgid "normal" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:220 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:224 msgid "fast" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:221 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:222 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:225 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:226 msgid "Tender" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:221 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:225 msgid "Coal re-filled" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:221 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:225 msgid "Coal level" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:222 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:226 msgid "Water re-filled" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:222 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:226 msgid "Water level" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:224 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6986 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:228 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6967 msgid "Water Scoop" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:224 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:266 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:228 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:272 msgid "up" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:224 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:266 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:228 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:272 msgid "down" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:226 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:230 msgid "Train Brake" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:226 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:227 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:228 #: ../../Orts.Simulation/Simulation/Confirmer.cs:230 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:231 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:232 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:234 msgid "release" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:226 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:227 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:228 #: ../../Orts.Simulation/Simulation/Confirmer.cs:230 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:231 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:232 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:234 msgid "apply" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:227 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:231 msgid "Engine Brake" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:228 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:232 msgid "Brakeman Brake" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:229 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:233 msgid "Dynamic Brake" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:229 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:233 msgid "setup" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:230 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:234 msgid "Emergency Brake" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:231 -msgid "Bail Off" -msgstr "" - -#: ../../Orts.Simulation/Simulation/Confirmer.cs:231 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:235 msgid "disengage" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:231 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:235 msgid "engage" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:232 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:236 msgid "Brakes" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:232 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:236 msgid "initialize" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:232 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:236 msgid "cannot initialize. Stop train then re-try." msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:233 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:143 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/EPBrakeSystem.cs:84 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:237 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:199 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/EPBrakeSystem.cs:143 #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SingleTransferPipe.cs:92 #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SingleTransferPipe.cs:101 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SMEBrakeSystem.cs:87 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SMEBrakeSystem.cs:103 #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/VacuumSinglePipe.cs:141 msgid "Handbrake" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:233 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:237 msgid "none" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:233 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:237 msgid "full" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:234 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:238 msgid "Retainers" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:234 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/BrakeSystem.cs:102 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:238 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/BrakeSystem.cs:107 msgid "Exhaust" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:234 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/BrakeSystem.cs:103 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:238 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/BrakeSystem.cs:108 msgid "High Pressure" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:234 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/BrakeSystem.cs:104 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:238 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/BrakeSystem.cs:109 msgid "Low Pressure" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:234 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/BrakeSystem.cs:105 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:238 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/BrakeSystem.cs:110 msgid "Slow Direct" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:235 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:239 msgid "Brake Hose" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:235 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:239 msgid "disconnect" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:235 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:239 msgid "connect" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:239 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:243 msgid "Sander" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:240 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:244 msgid "Alerter" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:240 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:244 msgid "acknowledge" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:241 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:245 msgid "Horn" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:242 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:246 msgid "Whistle" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:242 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:246 msgid "blow" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:243 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:247 msgid "Bell" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:243 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:247 msgid "ring" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:244 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:248 msgid "Headlight" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:244 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:248 msgid "dim" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:244 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:248 msgid "bright" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:245 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:249 msgid "Cab Light" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:246 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:250 msgid "Wipers" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:247 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:251 msgid "Cab" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:247 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:251 msgid "changing is not available" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:247 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:251 msgid "" "changing disabled. Close throttle, set reverser to neutral, stop train then " "re-try." msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:248 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:252 msgid "Odometer" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:249 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:253 msgid "Battery" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:250 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:937 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:352 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:254 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:956 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:354 msgid "Master key" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:252 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:256 msgid "Max acceleration" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:253 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:257 msgid "Restricted speed zone" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:255 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:259 msgid "Doors Left" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:256 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:260 msgid "Doors Right" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:257 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:261 msgid "Mirror" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:257 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:261 msgid "retract" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:257 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:261 msgid "extend" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:259 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:262 +msgid "Window Left" +msgstr "" + +#: ../../Orts.Simulation/Simulation/Confirmer.cs:262 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:263 +msgid "closing" +msgstr "" + +#: ../../Orts.Simulation/Simulation/Confirmer.cs:262 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:263 +msgid "opening" +msgstr "" + +#: ../../Orts.Simulation/Simulation/Confirmer.cs:263 +msgid "Window Right" +msgstr "" + +#: ../../Orts.Simulation/Simulation/Confirmer.cs:265 msgid "Switch Ahead" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:259 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:260 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:265 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:266 msgid "locked. Use Control+M to change signals to manual mode then re-try." msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:260 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:266 msgid "Switch Behind" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:262 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:268 msgid "Simulation Speed" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:262 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:268 msgid "reset" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:263 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:269 msgid "Uncouple After" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:264 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:270 msgid "Activity" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:264 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:270 msgid "quit" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:264 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:270 msgid "resume" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:265 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:271 msgid "Replay" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:265 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:271 msgid "Overriding camera replay. Press Escape to resume camera replay." msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:266 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:272 msgid "Gearbox" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:266 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:272 msgid "locked. Use shaft before changing gear." msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:267 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:273 msgid "Signal mode" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:267 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:273 msgid "manual" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:267 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:273 msgid "auto" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:267 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:273 msgid "locked. Stop train, then re-try." msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:269 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:275 msgid "Wagon" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:269 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:275 msgid "Wagon fully unloaded" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:269 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:275 msgid "Wagon fully loaded" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:269 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:275 msgid "Freight load" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:271 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:277 msgid "Cab Radio" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:281 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:290 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:328 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:287 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:296 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:334 #, csharp-format msgid "{0} {1}" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:285 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:291 #, csharp-format msgid "{0}" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:295 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:301 #, csharp-format msgid "{0} to {1:0}%" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:300 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:306 #, csharp-format msgid "{0} {1:0}% {2}" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:305 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:311 #, csharp-format msgid "{0:0}% {1}" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:310 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:316 #, csharp-format msgid "{0:0}%" msgstr "" -#: ../../Orts.Simulation/Simulation/Confirmer.cs:318 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:323 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:324 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:329 #, csharp-format msgid "{0} {1:0}%" msgstr "" #. Context: NonSteam -#: ../../Orts.Simulation/Simulation/Confirmer.cs:185 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1211 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:188 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1230 msgctxt "NonSteam" msgid "Reverser" msgstr "" #. Context: Steam -#: ../../Orts.Simulation/Simulation/Confirmer.cs:204 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:207 msgctxt "Steam" msgid "Reverser" msgstr "" #. Context: Alerter -#: ../../Orts.Simulation/Simulation/Confirmer.cs:240 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:244 msgctxt "Alerter" msgid "sound" msgstr "" #. Context: Horn -#: ../../Orts.Simulation/Simulation/Confirmer.cs:241 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:245 msgctxt "Horn" msgid "sound" msgstr "" #. Context: Cab -#: ../../Orts.Simulation/Simulation/Confirmer.cs:247 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:251 msgctxt "Cab" msgid "change" msgstr "" #. Context: Odometer -#: ../../Orts.Simulation/Simulation/Confirmer.cs:248 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:252 msgctxt "Odometer" msgid "reset" msgstr "" #. Context: Odometer -#: ../../Orts.Simulation/Simulation/Confirmer.cs:248 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:252 msgctxt "Odometer" msgid "counting down" msgstr "" #. Context: Odometer -#: ../../Orts.Simulation/Simulation/Confirmer.cs:248 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:252 msgctxt "Odometer" msgid "counting up" msgstr "" #. Context: Switch -#: ../../Orts.Simulation/Simulation/Confirmer.cs:259 -#: ../../Orts.Simulation/Simulation/Confirmer.cs:260 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:265 +#: ../../Orts.Simulation/Simulation/Confirmer.cs:266 msgctxt "Switch" msgid "change" msgstr "" @@ -1221,16 +1250,16 @@ msgstr "" msgid "Wagon out of range: move wagon towards crane by {0} metres" msgstr "" -#: ../../Orts.Simulation/Simulation/Simulator.cs:1893 +#: ../../Orts.Simulation/Simulation/Simulator.cs:1903 msgid "Train can't be suspended with speed not equal 0" msgstr "" -#: ../../Orts.Simulation/Simulation/Simulator.cs:2015 +#: ../../Orts.Simulation/Simulation/Simulator.cs:2025 msgid "To return to static train speed must be = 0" msgstr "" -#: ../../Orts.Simulation/Simulation/Simulator.cs:940 -#: ../../Orts.Simulation/Simulation/AIs/AITrain.cs:4460 +#: ../../Orts.Simulation/Simulation/Simulator.cs:948 +#: ../../Orts.Simulation/Simulation/AIs/AITrain.cs:4354 #, csharp-format msgid "" "Player train has been included into train {0} service {1}, that automatically " @@ -1238,7 +1267,7 @@ msgid "" msgstr "" #: ../../Orts.Simulation/Simulation/Transfertables.cs:277 -#: ../../Orts.Simulation/Simulation/Turntables.cs:625 +#: ../../Orts.Simulation/Simulation/Turntables.cs:627 msgid "Rotation can't start: check throttle, speed, direction and control mode" msgstr "" @@ -1289,293 +1318,345 @@ msgstr "" msgid "Train rear outside {0}" msgstr "" -#: ../../Orts.Simulation/Simulation/Turntables.cs:644 +#: ../../Orts.Simulation/Simulation/Turntables.cs:649 +msgid "Turntable is at its bound, can't rotate" +msgstr "" + +#: ../../Orts.Simulation/Simulation/Turntables.cs:658 msgid "Train partially on turntable, can't rotate" msgstr "" -#: ../../Orts.Simulation/Simulation/Turntables.cs:656 +#: ../../Orts.Simulation/Simulation/Turntables.cs:670 msgid "Turntable starting rotation with train" msgstr "" -#: ../../Orts.Simulation/Simulation/Turntables.cs:770 -#: ../../Orts.Simulation/Simulation/Turntables.cs:801 +#: ../../Orts.Simulation/Simulation/Turntables.cs:787 +#: ../../Orts.Simulation/Simulation/Turntables.cs:818 msgid "Turntable forward connected" msgstr "" -#: ../../Orts.Simulation/Simulation/Turntables.cs:783 -#: ../../Orts.Simulation/Simulation/Turntables.cs:814 +#: ../../Orts.Simulation/Simulation/Turntables.cs:800 +#: ../../Orts.Simulation/Simulation/Turntables.cs:831 msgid "Turntable backward connected" msgstr "" -#: ../../Orts.Simulation/Simulation/AIs/AITrain.cs:5019 +#: ../../Orts.Simulation/Simulation/AIs/AITrain.cs:4897 #, csharp-format msgid "" "Join success: Train {0} service {1} has been incorporated into train {2} " "service {3}" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:2005 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:2011 msgid "Coupler broken!" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:2008 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:2014 msgid "Coupler overloaded!" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:2437 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:2443 msgid "" "The steam usage has exceeded the capacity of the steam boiler. Steam boiler " "locked out." msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:6896 -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:6901 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:6910 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:6915 msgid "Other train is blocking path" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:7754 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:7768 msgid "Stopped due to errors in route setting" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:8468 -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:9663 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:8482 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:9677 msgid "No signal in train's path" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:8476 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:8490 msgid "Next signal already allocated to other train" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:8537 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:8551 msgid "Request to clear signal cannot be processed" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:8645 -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:9783 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:8659 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:9797 msgid "No switch found" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10137 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10151 msgid "You cannot enter manual mode when autopiloted" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10142 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10156 msgid "You cannot use this command for pathless trains" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10154 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10168 msgid "Train is not back on original route" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10163 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10177 msgid "" "Original route is reverse from present direction, stop train before switching" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10176 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10190 msgid "Cannot change to Manual Mode while in Explorer Mode" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10181 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10195 msgid "" "Cannot change to Manual Mode. Use the Reset Out Of Control Mode command to " "release brakes" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10270 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10284 msgid "Reversal required and rear of train not on required route" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10544 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10558 msgid "Cannot clear signal behind train while in AUTO mode" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10776 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10790 msgid "Out of control mode reset" msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10781 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:10795 msgid "" "You can only reset if you passed a signal at danger or if you passed a " "misaligned switch." msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:16388 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:16400 msgid "Car " msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:16460 -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:16465 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:16472 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:16477 msgid "Locomotive " msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:2385 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:2391 #, csharp-format msgid "Carriage {0} temperature is too cold, the passengers are freezing." msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:2389 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:2395 #, csharp-format msgid "Car {0} temperature is too cold for the freight." msgstr "" -#: ../../Orts.Simulation/Simulation/Physics/Train.cs:11074 +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:11088 #, csharp-format msgid "Train stopped due to problems with other train: train {0} , reason: {1}" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSControlTrailerCar.cs:235 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:930 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:958 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6247 +#. Context: TrainControl +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:306 +msgctxt "TrainControl" +msgid "Auto Signal" +msgstr "" + +#. Context: TrainControl +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:307 +msgctxt "TrainControl" +msgid "Auto Node" +msgstr "" + +#. Context: TrainControl +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:308 +msgctxt "TrainControl" +msgid "Manual" +msgstr "" + +#. Context: TrainControl +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:309 +msgctxt "TrainControl" +msgid "Explorer" +msgstr "" + +#. Context: TrainControl +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:310 +msgctxt "TrainControl" +msgid "Out of Control" +msgstr "" + +#. Context: TrainControl +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:311 +msgctxt "TrainControl" +msgid "Inactive" +msgstr "" + +#. Context: TrainControl +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:312 +msgctxt "TrainControl" +msgid "Turntable" +msgstr "" + +#. Context: TrainControl +#: ../../Orts.Simulation/Simulation/Physics/Train.cs:313 +msgctxt "TrainControl" +msgid "Undefined" +msgstr "" + +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSControlTrailerCar.cs:207 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:949 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:977 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6215 msgid "Gear" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSControlTrailerCar.cs:276 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSControlTrailerCar.cs:308 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:4037 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:4099 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSControlTrailerCar.cs:238 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSControlTrailerCar.cs:269 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:3972 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:4034 msgid "Throttle must be reduced to Idle before gear change can happen." msgstr "" #. Context: Gear -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSControlTrailerCar.cs:236 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:931 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6248 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSControlTrailerCar.cs:208 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:950 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6216 msgctxt "Gear" msgid "N" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:927 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:946 msgid "Engine" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:934 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:349 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:953 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:351 msgid "Battery switch" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:935 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:938 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:944 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:350 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:353 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:359 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6502 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:954 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:957 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:963 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:352 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:355 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:361 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6483 msgid "On" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:935 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:938 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:944 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:350 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:353 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:359 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6502 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:954 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:957 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:963 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:352 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:355 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:361 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6483 msgid "Off" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:943 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:358 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:962 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:360 msgid "Electric train supply" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:958 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:977 msgid "N" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:961 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1213 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:980 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1232 msgid "Fuel" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:970 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:380 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6537 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:989 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:382 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6518 msgid "StHeat:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:971 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:981 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:381 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:391 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6538 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6546 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6933 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6948 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:990 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1000 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:383 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:393 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6519 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6527 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6914 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6929 msgid "Press" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:973 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:383 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6540 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:992 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:385 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6521 msgid "StTemp" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:975 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:385 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6542 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:994 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:387 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6523 msgid "StUse" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:978 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:388 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:997 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:390 msgid "WaterLvl" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:980 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:390 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6545 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:999 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:392 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6526 msgid "Last:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:983 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:393 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6548 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1002 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:395 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6529 msgid "Temp" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:985 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:395 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6550 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1004 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:397 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6531 msgid "OutTemp" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:987 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:397 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6552 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1006 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:399 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6533 msgid "NetHt" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1019 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1063 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1038 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1082 msgid "Setup" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1028 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1047 msgid "(flipped)" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1029 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1134 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1138 -#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2145 -#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2161 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1048 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1153 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1157 +#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2141 +#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2157 msgid "Sync" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1029 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1134 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1138 -#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2145 -#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2161 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1048 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1153 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1157 +#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2141 +#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2157 msgid "Async" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1125 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1226 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:131 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:139 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1144 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1245 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:185 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:194 #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SingleTransferPipe.cs:75 #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SingleTransferPipe.cs:79 #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SingleTransferPipe.cs:97 @@ -1583,111 +1664,120 @@ msgstr "" msgid "BP" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1125 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:141 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1144 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1147 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1246 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:195 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:400 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:447 +msgid "Flow" +msgstr "" + +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1147 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:197 #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SingleTransferPipe.cs:90 #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SingleTransferPipe.cs:99 #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/VacuumSinglePipe.cs:139 msgid "EOT" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1143 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:137 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1162 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:192 #: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/VacuumSinglePipe.cs:129 msgid "EQ" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1143 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1236 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:130 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:138 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/EPBrakeSystem.cs:82 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SMEBrakeSystem.cs:85 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1162 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1256 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:184 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:193 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/EPBrakeSystem.cs:141 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SMEBrakeSystem.cs:101 msgid "BC" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1209 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1223 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1228 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1242 msgid "ID" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1212 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1229 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1234 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1231 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1249 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1254 msgid "Remote" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1214 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1233 msgid "Tractive Effort" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1225 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:405 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:436 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1244 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:398 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:429 msgid "Load" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1235 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1255 msgid "ER" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1237 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1257 msgid "MR" msgstr "" #. Context: PowerSupply -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:947 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:362 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:966 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:364 msgctxt "PowerSupply" msgid "Power" msgstr "" #. Context: Notch -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:999 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1043 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1018 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1062 msgctxt "Notch" msgid "N" msgstr "" #. Context: Notch -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1007 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1015 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1051 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1059 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1026 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1034 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1070 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1078 msgctxt "Notch" msgid "B" msgstr "" #. Context: Notch -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1021 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1065 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1040 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs:1084 msgctxt "Notch" msgid "Idle" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:344 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:346 msgid "Pantographs" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:371 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:373 msgid "TCS" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:371 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:372 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:373 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:374 msgid "OK" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:371 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:372 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:373 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:374 msgid "NOT OK" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:372 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:374 msgid "Driver" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:373 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs:375 msgid "Auxiliary power" msgstr "" @@ -1707,7 +1797,7 @@ msgstr "" msgid "Scoop is not over trough, can't refill" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:3272 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs:3205 msgid "Sand supply has been exhausted" msgstr "" @@ -1724,947 +1814,947 @@ msgstr "" msgid "Refill: Water supply now replenished." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:2712 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:2705 msgid "Tender coal supply is empty. Your loco will fail." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:2809 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:2800 msgid "Tender water supply is empty. Your loco will fail." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:2935 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:2926 msgid "Fire has dropped too far. Your loco will fail." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:3017 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:3008 msgid "" "FireMass is getting low. Your fireman will shovel faster, but don't wear him " "out." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:3029 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:3020 msgid "FireMass is back within limits. Your fireman will shovel as per normal." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:3502 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:3493 msgid "Grate limit exceeded - boiler heat rate cannot increase." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:3510 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:3501 msgid "Grate limit return to normal." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5612 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5577 msgid "Water level dropped too far. Plug has fused and loco has failed." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5619 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5584 msgid "Boiler overfull and priming." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5625 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:5590 msgid "Boiler no longer priming." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6245 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6213 msgid "Fixed gear" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6249 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6217 msgid "Steam usage" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6250 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6218 msgid "Boiler pressure" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6251 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6219 msgid "Boiler water glass" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6251 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6219 msgid "(safe range)" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6255 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6223 msgid "Boiler water level" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6255 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6223 msgid "(absolute)" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6257 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6225 msgid "Fire mass" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6259 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6227 msgid "Fire Heat Loss" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6262 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6230 msgid "Fuel levels" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6262 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6230 msgid "coal" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6262 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6230 msgid "water" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6271 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6247 msgid "Key Inputs" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6273 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6249 msgid "Locomotive Type:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6277 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6253 msgid "Input:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6278 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6254 msgid "Evap" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6279 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6255 msgid "Grate" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6280 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6256 msgid "Boiler" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6281 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6257 msgid "SuperHr" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6282 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6258 msgid "FuelCal" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6290 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6266 msgid "Adj:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6291 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6267 msgid "CylEff" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6293 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6269 msgid "PortOpen" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6297 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6273 msgid "Steam Production" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6302 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6278 msgid "Boiler:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6304 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6280 msgid "Mass" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6305 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6281 msgid "MaxOutp" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6306 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6282 msgid "BoilerEff" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6314 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6290 msgid "Heat:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6315 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6291 msgid "In" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6317 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6964 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6293 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6945 msgid "Out" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6319 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6295 msgid "Rad" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6321 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6297 msgid "Stored" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6323 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6617 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6299 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6598 msgid "Max" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6325 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6495 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6301 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6476 msgid "Safety" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6327 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6303 msgid "Raw" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6332 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6312 msgid "Temp:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6333 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6313 msgid "Flue" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6335 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6658 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6315 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6639 msgid "Water" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6337 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6317 msgid "MaxSupH" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6339 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6319 msgid "CurSupH" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6343 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6324 msgid "Steam Usage" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6351 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6378 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6332 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6359 msgid "Usage:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6352 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6379 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6333 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6360 msgid "Cyl" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6356 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6337 msgid "Comprsr" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6358 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6385 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6339 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6366 msgid "SafetyV" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6360 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6387 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6341 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6368 msgid "CylCock" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6362 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6389 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6343 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6370 msgid "Genertr" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6364 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6391 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6676 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6345 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6372 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6657 msgid "Stoker" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6366 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6393 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6347 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6374 msgid "BlowD" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6368 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6395 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6349 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6376 msgid "MaxSafe" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6383 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6364 msgid "Ejector" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6406 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6387 msgid "CylValve:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6407 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6388 msgid "Travel" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6409 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6427 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6447 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6462 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6482 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6390 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6408 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6428 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6443 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6463 msgid "Cutoff" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6411 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6392 msgid "Lead" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6413 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6394 msgid "ExhLap" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6415 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6396 msgid "StLap" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6417 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6398 msgid "AdvAng" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6426 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6407 msgid "CylEvts:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6429 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6410 msgid "CylExh" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6431 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6412 msgid "CylComp" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6433 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6414 msgid "CyAdmis" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6442 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6423 msgid "PressHP:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6443 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6478 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6424 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6459 msgid "Chest" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6445 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6460 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6480 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6426 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6441 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6461 msgid "Initial" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6449 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6464 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6484 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6430 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6445 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6465 msgid "Rel" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6451 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6466 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6486 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6432 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6447 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6467 msgid "Back" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6453 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6468 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6488 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6434 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6449 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6469 msgid "MEP" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6459 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6440 msgid "PressLP:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6477 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6458 msgid "Press:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6494 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6669 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6475 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6650 msgid "Status:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6496 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:167 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:185 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SingleTransferPipe.cs:141 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/VacuumSinglePipe.cs:162 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/VacuumSinglePipe.cs:181 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6477 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs:219 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SingleTransferPipe.cs:142 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/SMEBrakeSystem.cs:95 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/VacuumSinglePipe.cs:163 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/VacuumSinglePipe.cs:183 msgid "Open" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6496 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6477 msgid "Closed" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6497 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6478 msgid "Plug" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6498 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6500 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6671 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6673 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6675 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6677 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6679 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6681 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6479 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6481 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6652 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6654 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6656 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6658 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6660 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6662 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6664 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6666 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6668 #: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6683 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6685 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6687 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6702 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6717 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6747 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6762 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6796 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6814 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6816 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6818 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6820 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6941 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6956 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6969 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6990 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6992 -#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2144 -#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2159 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6698 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6728 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6743 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6777 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6795 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6797 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6799 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6801 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6922 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6937 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6950 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6971 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6973 +#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2140 +#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2155 msgid "Yes" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6498 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6500 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6671 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6673 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6675 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6677 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6679 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6681 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6479 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6481 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6652 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6654 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6656 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6658 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6660 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6662 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6664 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6666 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6668 #: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6683 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6685 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6687 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6702 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6717 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6747 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6762 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6796 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6814 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6816 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6818 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6820 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6941 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6956 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6969 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6990 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6992 -#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2144 -#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2159 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6698 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6728 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6743 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6777 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6795 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6797 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6799 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6801 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6922 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6937 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6950 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6971 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6973 +#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2140 +#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:2155 msgid "No" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6499 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6480 msgid "Prime" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6501 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6482 msgid "Comp" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6556 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6537 msgid "Fireman" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6558 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6539 msgid "Fire:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6559 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6540 msgid "Ideal" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6561 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6542 msgid "Actual" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6563 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6544 msgid "MaxFireR" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6565 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6546 msgid "FeedRate" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6567 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6548 msgid "BurnRate" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6569 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6550 msgid "Combust" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6573 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6680 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6554 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6661 msgid "GrLimit" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6577 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6558 msgid "MaxBurn" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6616 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6597 msgid "Injector:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6618 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6599 msgid "Inj1" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6619 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6600 msgid "Temp1" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6620 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6601 msgid "Inj2" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6621 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6602 msgid "Temp2" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6634 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6654 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6615 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6635 msgid "Tender:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6635 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6655 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6616 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6636 msgid "Coal" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6638 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6619 msgid "Water(C)" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6641 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6622 msgid "Water(T)" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6643 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6624 msgid "Water(A)" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6645 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6661 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6626 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6642 msgid "Steam" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6647 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6663 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6628 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6644 msgid "TotSteam" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6670 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6651 msgid "CoalOut" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6672 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6653 msgid "WaterOut" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6674 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6655 msgid "FireOut" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6678 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6659 msgid "Boost" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6682 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6663 msgid "FireOn" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6684 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6665 msgid "FireOff" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6686 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6667 msgid "AIOR" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6692 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6737 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6673 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6718 msgid "Performance" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6694 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6739 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6675 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6720 msgid "Power:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6695 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6740 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6676 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6721 msgid "MaxInd" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6697 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6742 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6678 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6723 msgid "Ind" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6699 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6744 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6680 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6725 msgid "Drawbar" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6701 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6746 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6682 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6727 msgid "BlrLmt" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6705 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6750 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6686 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6731 msgid "Force:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6706 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6751 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6687 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6732 msgid "TheorTE" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6708 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6753 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6689 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6734 msgid "StartTE" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6710 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6755 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6691 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6736 msgid "TE" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6712 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6757 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6693 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6738 msgid "Draw" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6714 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6759 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6695 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6740 msgid "CritSpeed" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6716 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6761 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6697 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6742 msgid "SpdLmt" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6720 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6765 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6701 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6746 msgid "Move:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6721 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6766 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6702 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6747 msgid "Piston" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6723 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6768 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6704 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6749 msgid "DrvWhl" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6725 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6770 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6706 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6751 msgid "MF-Gear" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6730 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6775 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6711 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6756 msgid "Max-SpdF" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6784 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6765 msgid "Slip Monitor" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6786 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6767 msgid "Slip:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6787 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6768 msgid "MForceN" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6789 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6878 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6892 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6770 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6859 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6873 msgid "Tang(t)" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6791 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6880 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6894 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6772 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6861 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6875 msgid "Static" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6793 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6774 msgid "Coeff" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6795 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6776 msgid "Slip" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6797 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6778 msgid "WheelM" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6799 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6780 msgid "FoA" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6803 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6784 msgid "Sand:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6804 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6785 msgid "S/Use" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6806 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6787 msgid "S/Box" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6808 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6789 msgid "M/Press" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6812 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6793 msgid "CylE:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6813 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6794 msgid "#1" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6815 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6796 msgid "#2" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6817 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6798 msgid "#3" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6819 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6800 msgid "#4" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6869 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6850 msgid "Slip Debug" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6871 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6852 msgid "Start:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6872 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6886 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6853 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6867 msgid "CyPressL" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6874 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6888 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6855 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6869 msgid "CyPressR" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6876 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6890 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6857 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6871 msgid "Tang(c)" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6885 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6866 msgid "Speed:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6899 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6880 msgid "Wheel:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6900 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6881 msgid "TangSp" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6910 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6891 msgid "Sound Variables" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6912 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6893 msgid "V1:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6914 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6895 msgid "V2:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6916 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6897 msgid "V3:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6927 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6908 msgid "Ejector / Vacuum Pump" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6932 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6913 msgid "Large:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6935 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6950 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6916 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6931 msgid "StCons" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6938 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6953 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6966 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6919 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6934 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6947 msgid "Rate" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6940 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6921 msgid "Lg Ej" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6947 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6928 msgid "Small:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6955 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6936 msgid "Sm Ej" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6963 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6944 msgid "Vac:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6968 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6949 msgid "Pump" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6974 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6955 msgid "Leak:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6976 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6957 msgid "Net:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6988 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6969 msgid "Fill:" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6989 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6970 msgid "ScDwn" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6991 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6972 msgid "ScBrk" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6993 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6974 msgid "Min" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6995 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6976 msgid "WaVel" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6997 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6978 msgid "Drag" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6999 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6980 msgid "WaterU" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:7001 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6982 msgid "Input" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:7003 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6984 msgid "Total" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:7117 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:7195 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:7098 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:7176 msgid "Gears can't be changed unless throttle is at zero." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:7855 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:7900 msgid "AI Fireman has started adding fuel to fire" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:7862 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:7907 msgid "AI Fireman has stopped adding fuel to fire" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:7869 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:7914 msgid "AI Fireman has been reset" msgstr "" #. Context: HUD -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6303 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:404 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:423 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:431 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs:6279 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:397 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:416 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:424 msgctxt "HUD" msgid "Power" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:1978 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:2113 msgid "Starting unload" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:3992 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4103 msgid "Incompatible data" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4007 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4118 msgid "Starting refill" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4016 -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4063 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4127 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4174 msgid "Preparing for unload" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4036 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4147 msgid "Container station busy with preceding mission" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4043 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4154 msgid "No containers to load" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4047 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4158 msgid "Starting load" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4057 +#: ../../Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs:4168 msgid "Container station full, can't unload" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:1939 +#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:1919 msgid "" "You were travelling too fast for this curve, and have snapped a brake hose on " "Car " msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:1627 +#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:1607 #, csharp-format msgid "Car {0} has derailed on the curve." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:1901 +#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:1881 #, csharp-format msgid "" "You are travelling too fast for this curve. Slow down, your freight car {0} " "may be damaged. The recommended speed for this curve is {1}" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:1905 +#: ../../Orts.Simulation/Simulation/RollingStocks/TrainCar.cs:1885 #, csharp-format msgid "" "You are travelling too fast for this curve. Slow down, your passengers in car " @@ -2717,8 +2807,32 @@ msgstr "" msgid "Selected speed changed to {0}" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/ManualBraking.cs:233 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/ManualBraking.cs:240 +#. Context: Door +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Door.cs:28 +msgctxt "Door" +msgid "Closed" +msgstr "" + +#. Context: Door +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Door.cs:29 +msgctxt "Door" +msgid "Closing" +msgstr "" + +#. Context: Door +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Door.cs:30 +msgctxt "Door" +msgid "Opening" +msgstr "" + +#. Context: Door +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Door.cs:31 +msgctxt "Door" +msgid "Open" +msgstr "" + +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/ManualBraking.cs:241 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/ManualBraking.cs:248 msgid "Manual Brake" msgstr "" @@ -2731,93 +2845,88 @@ msgstr "" msgid "Lead BP" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/CircuitBreaker.cs:384 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/CircuitBreaker.cs:382 msgid "Circuit breaker closing not authorized" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:403 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:417 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:396 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:410 msgid "Status" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:406 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:399 msgid "RPM" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:407 -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:454 -msgid "Flow" -msgstr "" - -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:408 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:401 msgid "Temperature" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:409 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:402 msgid "Oil Pressure" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:423 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:416 msgid " " msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:462 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:455 msgid "Oil" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:1271 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:1216 msgid "Diesel Engine has stalled due to underspeed." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:1290 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DieselEngine.cs:1235 msgid "Diesel Engine has stalled due to overspeed." msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/Pantograph.cs:370 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/Pantograph.cs:371 msgid "Pantograph raised even though this route is not electrified" msgstr "" -#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/TractionCutOffRelay.cs:382 +#: ../../Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/TractionCutOffRelay.cs:380 msgid "Traction cut-off relay closing not authorized" msgstr "" -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10409 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10202 msgid "Held for connecting train : " msgstr "" -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10417 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10210 msgid "Waiting for train to attach : " msgstr "" -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10433 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10226 msgid "Waiting for transfer with train : " msgstr "" -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10448 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10241 msgid "Waiting for train to arrive : " msgstr "" -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10503 -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10534 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10296 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10327 msgid ", backward" msgstr "" -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10518 -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10534 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10311 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10327 msgid ", forward" msgstr "" -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10527 -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10535 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10320 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10328 msgid "Train is ready to attach to : " msgstr "" -#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10590 +#: ../../Orts.Simulation/Simulation/Timetables/TTTrain.cs:10372 msgid "Passenger detraining completed. Train terminated." msgstr "" -#: ../../Orts.Simulation/Simulation/Timetables/TTTurntable.cs:1788 -#: ../../Orts.Simulation/Simulation/Timetables/TTTurntable.cs:1829 +#: ../../Orts.Simulation/Simulation/Timetables/TTTurntable.cs:1934 +#: ../../Orts.Simulation/Simulation/Timetables/TTTurntable.cs:1983 #, csharp-format msgid "Turntable is ready for access - allowed speed set to {0}" msgstr "" diff --git a/Source/Locales/RunActivity/RunActivity.pot b/Source/Locales/RunActivity/RunActivity.pot index bda2904703..2c3a4be297 100644 --- a/Source/Locales/RunActivity/RunActivity.pot +++ b/Source/Locales/RunActivity/RunActivity.pot @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2023-05-06 08:50:25+0300\n" -"PO-Revision-Date: 2023-05-06 08:50:29+0300\n" +"POT-Creation-Date: 2023-10-24 12:50:28+0200\n" +"PO-Revision-Date: 2023-10-24 12:50:30+0200\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -15,53 +15,53 @@ msgstr "" msgid "Free" msgstr "" -#: ../../RunActivity/Viewer3D/Cameras.cs:999 +#: ../../RunActivity/Viewer3D/Cameras.cs:1000 msgid "Outside Front" msgstr "" -#: ../../RunActivity/Viewer3D/Cameras.cs:999 +#: ../../RunActivity/Viewer3D/Cameras.cs:1000 msgid "Outside Rear" msgstr "" -#: ../../RunActivity/Viewer3D/Cameras.cs:1517 +#: ../../RunActivity/Viewer3D/Cameras.cs:1518 msgid "Brakeman" msgstr "" -#: ../../RunActivity/Viewer3D/Cameras.cs:1767 +#: ../../RunActivity/Viewer3D/Cameras.cs:1774 msgid "Passenger" msgstr "" -#: ../../RunActivity/Viewer3D/Cameras.cs:1843 +#: ../../RunActivity/Viewer3D/Cameras.cs:1844 msgid "3D Cab" msgstr "" -#: ../../RunActivity/Viewer3D/Cameras.cs:1940 +#: ../../RunActivity/Viewer3D/Cameras.cs:1955 msgid "Head out" msgstr "" -#: ../../RunActivity/Viewer3D/Cameras.cs:1985 +#: ../../RunActivity/Viewer3D/Cameras.cs:2000 msgid "Cab" msgstr "" -#: ../../RunActivity/Viewer3D/Cameras.cs:2238 +#: ../../RunActivity/Viewer3D/Cameras.cs:2253 msgid "Trackside" msgstr "" -#: ../../RunActivity/Viewer3D/Materials.cs:224 +#: ../../RunActivity/Viewer3D/Materials.cs:230 #, csharp-format msgid "{0:F0} texture" msgid_plural "{0:F0} textures" msgstr[0] "" msgstr[1] "" -#: ../../RunActivity/Viewer3D/Materials.cs:461 +#: ../../RunActivity/Viewer3D/Materials.cs:468 #, csharp-format msgid "{0:F0} material" msgid_plural "{0:F0} materials" msgstr[0] "" msgstr[1] "" -#: ../../RunActivity/Viewer3D/Shapes.cs:113 +#: ../../RunActivity/Viewer3D/Shapes.cs:119 #, csharp-format msgid "{0:F0} shape" msgid_plural "{0:F0} shapes" @@ -75,127 +75,138 @@ msgid_plural "{0:F0} tiles" msgstr[0] "" msgstr[1] "" -#: ../../RunActivity/Viewer3D/Viewer.cs:829 -#: ../../RunActivity/Viewer3D/Viewer.cs:1017 +#: ../../RunActivity/Viewer3D/Viewer.cs:832 +#: ../../RunActivity/Viewer3D/Viewer.cs:1027 msgid "Cab view not available" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:914 +#: ../../RunActivity/Viewer3D/Viewer.cs:924 msgid "In MP, use Alt-F4 to quit directly" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:946 +#: ../../RunActivity/Viewer3D/Viewer.cs:956 msgid "Automatic platform and siding labels visible." msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:949 +#: ../../RunActivity/Viewer3D/Viewer.cs:959 msgid "Platform and siding labels visible." msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:952 +#: ../../RunActivity/Viewer3D/Viewer.cs:962 msgid "Platform labels visible." msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:955 +#: ../../RunActivity/Viewer3D/Viewer.cs:965 msgid "Siding labels visible." msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:961 +#: ../../RunActivity/Viewer3D/Viewer.cs:971 msgid "Platform and siding labels hidden." msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:972 +#: ../../RunActivity/Viewer3D/Viewer.cs:982 msgid "Train labels visible." msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:975 +#: ../../RunActivity/Viewer3D/Viewer.cs:985 msgid "Car labels visible." msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:981 +#: ../../RunActivity/Viewer3D/Viewer.cs:991 msgid "Train and car labels hidden." msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1024 +#: ../../RunActivity/Viewer3D/Viewer.cs:1034 msgid "This car doesn't have a 2D cab" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1028 +#: ../../RunActivity/Viewer3D/Viewer.cs:1038 msgid "This car doesn't have a 3D cab" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1073 +#: ../../RunActivity/Viewer3D/Viewer.cs:1083 msgid "messages suppressed" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1077 +#: ../../RunActivity/Viewer3D/Viewer.cs:1087 msgid "All messages visible" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1229 +#: ../../RunActivity/Viewer3D/Viewer.cs:1244 msgid "Switched to player control" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1236 +#: ../../RunActivity/Viewer3D/Viewer.cs:1251 msgid "You can't switch from manual to autopilot mode" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1242 +#: ../../RunActivity/Viewer3D/Viewer.cs:1257 msgid "Switched to autopilot" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1916 +#: ../../RunActivity/Viewer3D/Viewer.cs:1931 msgid "Game saved" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:348 +#: ../../RunActivity/Viewer3D/Viewer.cs:347 #, csharp-format msgid "Allowed speed raised to {0}" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1050 +#: ../../RunActivity/Viewer3D/Viewer.cs:1060 #, csharp-format msgid "Vibrating at level {0}" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1260 +#: ../../RunActivity/Viewer3D/Viewer.cs:1275 #, csharp-format msgid "Keyboard map list saved to '{0}'." msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1264 +#: ../../RunActivity/Viewer3D/Viewer.cs:1279 #, csharp-format msgid "Keyboard map image saved to '{0}'." msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1116 +#: ../../RunActivity/Viewer3D/Viewer.cs:1126 #, csharp-format msgid "{0} viewpoint stored. Use Shift+8 to restore viewpoints." msgid_plural "{0} viewpoints stored. Use Shift+8 to restore viewpoints." msgstr[0] "" msgstr[1] "" -#: ../../RunActivity/Viewer3D/Weather.cs:145 +#: ../../RunActivity/Viewer3D/Weather.cs:143 msgid "" "Restoring wrong weather type : trying to restore dynamic weather but save " "contains user controlled weather" msgstr "" -#: ../../RunActivity/Viewer3D/Weather.cs:1642 +#: ../../RunActivity/Viewer3D/Weather.cs:1632 msgid "" "Restoring wrong weather type : trying to restore user controlled weather but " "save contains dynamic weather" msgstr "" -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.cs:1918 +#: ../../RunActivity/Viewer3D/Weather.cs:492 +#, csharp-format +msgid "Increased daylight offset to {0} h" +msgstr "" + +#: ../../RunActivity/Viewer3D/Weather.cs:497 +#, csharp-format +msgid "Decreased daylight offset to {0} h" +msgstr "" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.cs:1919 +#: ../../RunActivity/Viewer3D/Map/MapForm.cs:1494 msgid "Switching Request Sent to the Server" msgstr "" -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.cs:555 +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.cs:556 msgid "MSG to Server" msgstr "" -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.cs:559 +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.cs:560 #: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:256 msgid "MSG to All" msgstr "" @@ -258,9 +269,9 @@ msgid "Assist" msgstr "" #: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:417 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1226 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1275 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1341 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1247 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1296 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1362 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:719 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:767 msgid "Normal" @@ -295,22 +306,27 @@ msgid "Show:" msgstr "" #: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:517 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:454 msgid "Platform labels" msgstr "" #: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:530 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:444 msgid "Siding labels" msgstr "" #: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:543 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:424 msgid "Signals" msgstr "" #: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:556 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:414 msgid "Signal state" msgstr "" #: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:572 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:404 msgid "Train labels" msgstr "" @@ -335,6 +351,7 @@ msgid "Background color" msgstr "" #: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:673 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:434 msgid "Switches" msgstr "" @@ -372,6 +389,7 @@ msgid "To zoom out of a location, press Alt and click the left mouse." msgstr "" #: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:793 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:464 msgid "Platforms" msgstr "" @@ -423,11 +441,11 @@ msgid "3D" msgstr "" #: ../../RunActivity/Viewer3D/Debugging/SoundDebugForm.Designer.cs:284 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:431 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:629 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1193 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:433 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:631 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1208 #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:148 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:671 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:673 #: ../../RunActivity/Viewer3D/WebServices/TrackMonitorDisplay.cs:291 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:110 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:231 @@ -447,8 +465,8 @@ msgid "Variable 1" msgstr "" #: ../../RunActivity/Viewer3D/Debugging/SoundDebugForm.Designer.cs:351 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1199 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1201 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1214 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1216 #: ../../RunActivity/Viewer3D/Popups/NextStationWindow.cs:78 msgid "Distance" msgstr "" @@ -473,6 +491,210 @@ msgstr "" msgid "View Self" msgstr "" +#: ../../RunActivity/Viewer3D/Map/MapForm.cs:301 +msgid "You" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.cs:308 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:518 +#: ../../RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs:345 +msgid "Helper" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.cs:314 +msgid "Disconnected" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.cs:1721 +msgid "Demote this player" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.cs:1721 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:848 +msgid "Make this player an assistant" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:160 +msgid "Learn more" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:172 +msgid "You are the dispatcher in this multiplayer session" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:261 +msgid "Message all players" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:275 +msgid ">" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:297 +msgid "Messages:" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:324 +msgid "Simulation time" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:337 +msgid "Map customization" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:372 +msgid "All trains" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:384 +msgid "Only active trains" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:394 +msgid "Train state" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:475 +msgid "Map features" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:484 +msgid "Rotate between themes" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:497 +msgid "Show simulation time" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:507 +msgid "Use anti-aliasing" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:572 +msgid "Multiplayer settings" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:583 +msgid "Penalty for speeding && SPAD" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:596 +msgid "Prefer green signals" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:609 +msgid "Allow new players to join" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:639 +msgid "Map settings and controls" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:648 +msgid "Follow my train on the map" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:659 +msgid "Jump to my train on the map" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:670 +msgid "Jump to my train in game" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:681 +msgid "Map resolution (m):" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:722 +msgid "Allow throwing switches" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:734 +msgid "Allow changing signals" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:746 +msgid "Draw next path section" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:773 +msgid "Players" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:813 +msgid "Message the selected player" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:821 +msgid "Reply to the selected player" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:841 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:540 +msgid "Player" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:855 +msgid "Jump to this player in game" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:862 +msgid "Follow on the map" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:869 +msgid "Kick from multiplayer session" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:887 +msgid "Set switch to..." +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:896 +msgid "Main route" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:904 +msgid "Side route" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:926 +msgid "Set signal aspect to..." +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:933 +msgid "System controlled" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:942 +msgid "Stop" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:950 +msgid "Approach" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:959 +msgid "Proceed" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:972 +msgid "Allow call on" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:988 +msgid "Jump to this train in game" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:995 +msgid "Follow this train on the map" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:1005 +msgid "Map window" +msgstr "" + #: ../../RunActivity/Viewer3D/Popups/ActivityWindow.cs:45 msgid "Activity Events" msgstr "" @@ -542,135 +764,188 @@ msgstr "" msgid "Train: {0}" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:41 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:42 msgid "Car Operation Menu" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:51 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:66 msgid "Car ID" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:54 -msgid "Toggle Handbrake" +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:73 +msgid "Unset Handbrake" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:56 -msgid "Toggle Power" +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:75 +msgid "Set Handbrake" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:58 -msgid "Toggle MU Connection" +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:82 +msgid "Power Off" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:60 -msgid "Toggle Battery Switch" +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:84 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:86 +msgid "Power On" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:62 -msgid "Toggle Electric Train Supply Connection" +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:91 +msgid "Disconnect MU Connection" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:64 -msgid "Toggle Brake Hose Connection" +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:93 +msgid "Connect MU Connection" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:66 -msgid "Open/Close Front Angle Cock" +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:98 +msgid "Battery Switch Off" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:100 +msgid "Battery Switch On" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:105 +msgid "Disonnect Electric Train Supply" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:107 +msgid "Connect Electric Train Supply" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:68 -msgid "Open/Close Rear Angle Cock" +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:113 +msgid "Disconnect Front Brake Hose" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:70 -msgid "Open/Close Bleed Off Valve" +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:115 +msgid "Connect Front Brake Hose" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:72 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:122 +msgid "Disconnect Rear Brake Hose" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:124 +msgid "Connect Rear Brake Hose" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:131 +msgid "Close Front Angle Cock" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:133 +msgid "Open Front Angle Cock" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:140 +msgid "Close Rear Angle Cock" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:142 +msgid "Open Rear Angle Cock" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:149 +msgid "Close Bleed Off Valve" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:151 +msgid "Open Bleed Off Valve" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:156 msgid "Close window" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:106 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:235 msgid "Handbrake set" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:108 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:237 msgid "Handbrake off" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:120 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:249 msgid "Power OFF command sent" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:122 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:251 msgid "Power ON command sent" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:125 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:254 msgid "No power command for this type of car!" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:138 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:267 msgid "MU signal connected" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:140 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:269 msgid "MU signal disconnected" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:143 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:272 msgid "No MU command for this type of car!" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:153 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:282 msgid "Switch off battery command sent" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:155 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:284 msgid "Switch on battery command sent" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:167 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:296 msgid "Front ETS cable connected" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:169 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:298 msgid "Front ETS cable disconnected" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:173 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:302 msgid "This car doesn't have an ETS system" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:181 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:310 msgid "Front brake hose connected" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:183 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:312 msgid "Front brake hose disconnected" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:190 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:319 +msgid "Rear brake hose connected" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:321 +msgid "Rear brake hose disconnected" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:328 msgid "Front angle cock opened" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:192 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:330 msgid "Front angle cock closed" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:199 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:337 msgid "Rear angle cock opened" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:201 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:339 msgid "Rear angle cock closed" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:211 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:349 msgid "Bleed off valve opened" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:213 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:351 msgid "Bleed off valve closed" msgstr "" @@ -838,8 +1113,8 @@ msgid "- Missed station stops: " msgstr "" #: ../../RunActivity/Viewer3D/Popups/HelpWindow.cs:416 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:980 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1137 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:986 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1152 msgid " " msgstr "" @@ -918,10 +1193,10 @@ msgid_plural "{0} minutes" msgstr[0] "" msgstr[1] "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:106 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:434 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:615 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:628 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:108 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:436 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:617 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:630 #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:146 #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:151 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:85 @@ -929,108 +1204,108 @@ msgstr[1] "" msgid "Throttle" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:107 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:109 msgid "Power In/Out" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:111 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:113 msgid "Motive force" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:113 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:115 msgid "Num of substeps" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:116 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1347 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:118 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1362 msgid "Memory" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:117 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:119 msgid "GCs" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:118 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:120 msgid "Frame time" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:119 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1361 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:121 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1376 msgid "Render process" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:120 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1362 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:122 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1377 msgid "Updater process" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:121 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1363 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:123 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1378 msgid "Loader process" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:122 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1364 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:124 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1379 msgid "Sound process" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:420 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:422 msgid "Version" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:424 #: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:426 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:428 #: ../../RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs:158 #: ../../RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs:164 #: ../../RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs:332 #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:147 #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:152 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:648 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:650 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:86 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:113 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:208 msgid "Time" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:429 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:431 #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:144 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:655 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:657 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:106 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:215 msgid "Replay" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:432 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1132 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:434 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1147 #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:136 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:689 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:691 #: ../../RunActivity/Viewer3D/WebServices/TrackMonitorDisplay.cs:322 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:100 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:249 msgid "Gradient" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:433 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:613 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:625 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:435 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:615 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:627 #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:125 #: ../../RunActivity/Viewer3D/WebServices/TrackMonitorDisplay.cs:332 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:90 msgid "Direction" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:434 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:615 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:436 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:617 #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:143 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:105 msgid "Regulator" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:438 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:440 #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:154 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:826 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:883 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:917 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:828 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:904 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:938 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:115 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:384 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:429 @@ -1038,274 +1313,265 @@ msgstr "" msgid "Train brake" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:440 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:442 #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:145 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:934 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:955 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:107 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:480 msgid "Retainers" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:442 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:444 #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:130 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:943 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:958 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:964 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:979 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:94 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:489 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:504 msgid "Engine brake" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:444 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:446 msgid "Brakemen brake" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:446 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:616 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:448 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:618 #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:128 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:969 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:978 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:990 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:999 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:92 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:515 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:523 msgid "Dynamic brake" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:462 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:464 msgid "Cruise control status" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:465 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:467 msgid "Speed target" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:466 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:468 msgid "Max acceleration" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:470 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:472 msgid "Multiple Units" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:472 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1147 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:474 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1168 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:640 msgid "FPS" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:476 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:478 #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:117 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1157 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1178 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:83 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:650 msgid "Autopilot" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:479 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1078 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:481 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1083 msgid "Wheel slip" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:481 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:483 msgid "Wheel slip warning" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:484 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:486 msgid "Wheel skid" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:490 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:492 msgid "Sander blocked" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:492 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:494 msgid "Sander on" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:503 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1358 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:505 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1379 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:783 msgid "Left" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:505 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1360 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:507 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1381 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:785 msgid "Right" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:508 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:510 #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:127 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1364 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1378 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1385 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1399 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:91 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:789 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:803 msgid "Doors open" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:514 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:516 msgid "MultiPlayerStatus: " msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:515 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:517 #: ../../RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs:344 msgid "Dispatcher" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:516 -#: ../../RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs:345 -msgid "Helper" -msgstr "" - -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:517 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:519 #: ../../RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs:346 msgid "Client" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:526 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:528 msgid "CONSIST INFORMATION" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:538 -msgid "Player" -msgstr "" - -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:539 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:541 msgid "Tilted" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:540 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:562 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:683 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:918 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:938 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:969 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1000 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1030 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:542 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:564 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:685 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:924 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:944 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:975 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1006 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1036 msgid "Type" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:541 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:563 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:543 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:565 msgid "Length" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:542 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:564 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:544 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:566 msgid "Weight" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:543 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:545 msgid "Tonnage" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:544 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:546 msgid "Control Mode" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:545 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:547 msgid "Out of Control" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:546 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:548 msgid "Cab Aspect" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:549 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:572 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1164 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1343 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:551 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:574 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1179 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1358 #: ../../RunActivity/Viewer3D/RollingStock/SubSystems/ETCS/DataEntry.cs:460 #: ../../RunActivity/Viewer3D/RollingStock/SubSystems/ETCS/DataEntry.cs:485 msgid "Yes" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:549 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:572 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1164 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1343 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:551 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:574 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1179 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1358 msgid "No" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:550 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:573 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:552 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:575 msgid "Freight" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:550 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:573 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:552 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:575 msgid "Pass" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:560 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:917 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:937 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:968 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:999 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1029 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1119 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:562 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:923 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:943 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:974 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1005 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1035 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1134 msgid "Car" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:561 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:626 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1166 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:563 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:628 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1181 msgid "Flipped" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:565 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:567 msgid "Drv/Cabs" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:566 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:568 msgid "Wheels" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:567 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:569 msgid "Temp" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:607 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:609 msgid "LOCOMOTIVE INFORMATION" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:620 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:804 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:813 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:622 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:806 #: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:815 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:819 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:828 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:817 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:821 #: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:830 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:838 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:832 #: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:840 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:875 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:905 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:842 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:877 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:909 msgid "off" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:621 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:802 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:811 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:826 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:836 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:863 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:871 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:623 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:804 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:813 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:828 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:838 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:865 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:873 msgid "PlayerLoco" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:624 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:892 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:899 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:626 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:896 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:903 msgid "Loco" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:627 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:629 msgid "MU'd" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:631 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:695 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:633 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:697 #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:140 #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:142 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:79 @@ -1313,586 +1579,596 @@ msgstr "" msgid "Power" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:632 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:634 msgid "Force" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:642 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:644 msgid "DISTRIBUTED POWER INFORMATION" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:676 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:678 msgid "POWER SUPPLY INFORMATION" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:682 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:684 msgid "Wagon" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:688 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:690 msgid "MainPS" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:689 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:691 msgid "AuxPS" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:690 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:692 msgid "Battery" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:691 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:693 msgid "LowVoltPS" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:692 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:694 msgid "CabPS" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:693 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:695 msgid "ETS" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:694 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:696 msgid "ETSCable" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:721 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:734 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:749 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:758 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:723 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:736 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:751 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:760 msgid "connected" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:721 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:734 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:749 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:758 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:723 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:736 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:751 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:760 msgid "disconnected" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:786 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:788 msgid "BRAKE INFORMATION" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:803 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:805 msgid "Exhauster" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:804 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:813 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:806 #: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:815 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:819 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:828 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:817 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:821 #: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:830 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:838 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:832 #: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:840 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:875 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:905 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:842 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:877 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:909 msgid "on" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:812 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:827 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:837 -msgid "Large Ejector" -msgstr "" - #: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:814 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:829 #: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:839 -msgid "Small Ejector" +msgid "Large Ejector" msgstr "" #: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:816 #: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:841 -msgid "Pressure" +msgid "Small Ejector" msgstr "" #: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:818 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:829 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:843 +msgid "Pressure" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:820 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:831 msgid "Vacuum Pump" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:847 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:849 msgid "Brake Sys Vol" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:848 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:850 msgid "Train Pipe" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:850 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:852 msgid "Brake Cyl" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:852 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:854 msgid "Air Vol" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:864 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:866 msgid "No compressor or reservoir fitted" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:872 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:902 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:874 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:906 msgid "Main reservoir" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:874 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:904 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:876 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:908 msgid "Compressor" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:919 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:939 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1001 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1031 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:878 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:910 +#: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:135 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:846 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:848 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:870 +#: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:74 +msgid "Flow" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:925 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:945 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1007 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1037 msgid "BrkCyl" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:920 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:940 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1032 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:926 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:946 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1038 msgid "BrkPipe" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:928 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:948 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:979 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1010 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1040 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:934 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:954 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:985 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1016 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1046 msgid "Handbrk" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:929 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:949 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1011 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1041 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:935 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:955 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1017 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1047 msgid "Conn" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:930 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:950 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1012 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1042 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:936 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:956 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1018 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1048 msgid "AnglCock" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:941 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:947 msgid "VacRes" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:970 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:976 msgid "Brk" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1002 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1008 msgid "SrvPipe" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1003 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1033 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1009 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1039 msgid "AuxRes" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1004 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1034 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1010 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1040 msgid "ErgRes" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1005 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1011 msgid "StrPipe" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1006 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1036 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1012 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1042 msgid "CtrlRes" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1007 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1037 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1013 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1043 msgid "RetValve" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1008 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1038 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1014 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1044 msgid "TripleValve" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1013 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1043 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1019 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1049 msgid "BleedOff" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1035 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1041 msgid "MRPipe" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1061 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1067 msgid "FORCE INFORMATION" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1077 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1081 msgid "(Advanced adhesion model)" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1079 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1084 msgid "Conditions" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1080 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1085 msgid "Axle drive force" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1082 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1086 msgid "Axle brake force" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1083 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1087 msgid "Number of substeps" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1084 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1102 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1088 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1117 msgid "Axle out force" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1087 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1089 msgid "Comp Axle out force" msgstr "" #: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1090 -msgid "Wheel Speed" +msgid "Wheel speed" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1094 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1109 msgid "Wheel ang. pos." msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1095 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1103 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1110 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1118 msgid "Loco Adhesion" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1096 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1104 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1111 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1119 msgid "Wagon Adhesion" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1101 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1116 msgid "(Simple adhesion model)" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1110 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1125 msgid "Wind Speed:" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1111 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1126 msgid "Wind Direction:" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1112 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1127 msgid "Train Direction:" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1113 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1128 msgid "ResWind:" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1114 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1129 msgid "ResSpeed:" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1120 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1135 msgid "Total" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1121 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1136 msgid "Motive" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1122 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1137 msgid "Brake" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1123 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1138 msgid "Friction" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1124 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1139 msgid "Gravity" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1125 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1133 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1140 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1148 msgid "Curve" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1126 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1141 msgid "Tunnel" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1127 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1334 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1142 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1349 msgid "Wind" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1128 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1129 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1143 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1144 msgid "Coupler" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1130 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1145 msgid "Slack" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1131 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1146 msgid "Mass" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1134 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1149 msgid "Brk Frict." msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1135 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1150 msgid "Brk Slide" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1136 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1151 msgid "Bear Temp" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1138 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1153 #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:126 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1317 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1325 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1340 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1338 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1346 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1361 msgid "DerailCoeff" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1188 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1203 msgid "DISPATCHER INFORMATION : active trains : " msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1191 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1206 msgid "Train" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1192 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1207 msgid "Travelled" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1194 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1209 msgid "Max" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1195 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1210 msgid "AI mode" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1196 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1211 msgid "AI data" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1197 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1212 msgid "Mode" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1198 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1213 msgid "Auth" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1200 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1215 msgid "Signal" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1202 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1217 msgid "Consist" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1203 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1218 msgid "Path" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1328 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1343 msgid "WEATHER INFORMATION" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1330 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1345 msgid "Visibility" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1331 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1346 msgid "Cloud cover" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1332 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1347 msgid "Intensity" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1333 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1348 msgid "Liquidity" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1335 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1350 msgid "Amb Temp" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1341 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1356 msgid "DEBUG INFORMATION" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1343 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1358 msgid "Logging enabled" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1344 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1359 msgid "Build" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1345 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1360 msgid "CPU" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1346 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1361 msgid "GPU" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1348 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1363 msgid "CPU Memory" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1349 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1364 msgid "GPU Memory" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1350 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1365 msgid "Adapter" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1355 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1370 msgid "Shadow maps" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1357 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1372 msgid "Shadow primitives" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1360 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1375 msgid "Render primitives" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1361 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1362 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1363 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1364 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1365 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1376 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1377 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1378 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1379 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1380 msgid "wait" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1365 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1380 msgid "Total process" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1366 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1381 msgid "Camera" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1110 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1114 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1125 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1129 #, csharp-format msgid "{0:N2} mph" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1111 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1112 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1113 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1126 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1127 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1128 #, csharp-format msgid "{0:N2} Deg" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1330 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1345 #, csharp-format msgid "{0:N0} m" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1331 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1333 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1346 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1348 #, csharp-format msgid "{0:F0} %" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1332 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1347 #, csharp-format msgid "{0:F4} p/s/m^2" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1334 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1349 #, csharp-format msgid "{0:F1},{1:F1} m/s" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1345 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1360 #, csharp-format msgid "{0:F0}% ({1})" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1346 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1361 #, csharp-format msgid "" "{0:F0} FPS (50th/95th/99th percentiles {1:F1} / {2:F1} / {3:F1} ms, DirectX " "feature level >= {4})" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1347 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1362 #, csharp-format msgid "" "{3}, {4}, {5}, {6} ({7:F0} kB/frame allocated, {0:F0}/{1:F0}/{2:F0} GCs)" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1348 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1363 #, csharp-format msgid "" "{0:F0} MB private, {1:F0} MB working set, {2:F0} MB private working set, " "{3:F0} MB managed, {4:F0} MB virtual" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1349 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1364 #, csharp-format msgid "{0:F0} MB committed, {1:F0} MB dedicated, {2:F0} MB shared" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1350 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1365 #, csharp-format msgid "{0} ({1:F0} MB)" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1353 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1368 #, csharp-format msgid "{0}/{1}" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1354 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1369 #, csharp-format msgid "({0}x{0})" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1357 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1360 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1372 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1375 #, csharp-format msgid "{0:F0}" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1361 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1362 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1363 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1364 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1365 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1376 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1377 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1378 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1379 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1380 #, csharp-format msgid "{0:F0}% ({1:F0}% {2})" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1345 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1360 #, csharp-format msgid "{0} logical processor" msgid_plural "{0} logical processors" @@ -1900,57 +2176,57 @@ msgstr[0] "" msgstr[1] "" #. Context: Cab -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:548 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:576 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:550 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:578 msgctxt "Cab" msgid "R" msgstr "" #. Context: Cab -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:548 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:576 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:550 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:578 msgctxt "Cab" msgid "F" msgstr "" #. Context: Cab -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:576 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:578 msgctxt "Cab" msgid "D" msgstr "" #. Context: Steam -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:614 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:616 msgctxt "Steam" msgid "Reverser" msgstr "" #. Context: NonSteam -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:614 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:616 msgctxt "NonSteam" msgid "Reverser" msgstr "" #. Context: Pantograph -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:684 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:686 msgctxt "Pantograph" msgid "Panto" msgstr "" #. Context: Engine -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:685 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:687 msgctxt "Engine" msgid "Eng" msgstr "" #. Context: CircuitBreaker -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:686 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:688 msgctxt "CircuitBreaker" msgid "CB" msgstr "" #. Context: TractionCutOffRelay -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:687 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:689 msgctxt "TractionCutOffRelay" msgid "TCOR" msgstr "" @@ -2136,11 +2412,6 @@ msgstr "" msgid " Milepost Limit Dist" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:135 -#: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:74 -msgid "Flow" -msgstr "" - #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:135 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:74 msgid "FLOW" @@ -2172,7 +2443,7 @@ msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:239 #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:615 #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:138 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1136 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1157 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:77 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:197 msgid "Loco Groups" @@ -2311,9 +2582,9 @@ msgid "BP" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:52 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:808 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:823 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:832 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:810 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:825 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:834 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:366 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:381 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:390 @@ -2321,17 +2592,15 @@ msgid "EQ" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:53 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:833 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:834 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:846 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:847 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:865 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:866 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:835 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:836 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:859 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:860 msgid "V" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:116 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1194 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1215 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:82 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:687 msgid "AI Fireman" @@ -2358,8 +2627,8 @@ msgid "BATT" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:119 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:993 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1011 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1014 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1032 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:85 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:538 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:556 @@ -2392,7 +2661,7 @@ msgid "LEVL" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:122 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1096 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1117 msgid "CCStatus" msgstr "" @@ -2411,7 +2680,7 @@ msgid "CIRC" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:124 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:768 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:770 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:89 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:326 msgid "Cylinder cocks" @@ -2457,7 +2726,7 @@ msgid "BLOC" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:131 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1069 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1090 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:95 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:615 msgid "Engine" @@ -2491,14 +2760,14 @@ msgid "GEAR" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:134 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1016 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1037 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:98 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:561 msgid "Fuel levels" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:135 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1024 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1045 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:99 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:569 msgid "Gear" @@ -2510,8 +2779,8 @@ msgid "GRAD" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:137 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1211 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1225 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1232 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1246 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:101 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:704 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:718 @@ -2534,7 +2803,7 @@ msgid "MAST" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:140 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1111 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1132 msgid "MaxAccel" msgstr "" @@ -2543,7 +2812,7 @@ msgid "MACC" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:141 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1048 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1069 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:103 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:593 msgid "Pantographs" @@ -2570,8 +2839,8 @@ msgid "RETN" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:147 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:782 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:792 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:784 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:794 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:109 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:340 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:350 @@ -2599,7 +2868,7 @@ msgid "STEM" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:150 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1104 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1125 msgid "Target" msgstr "" @@ -2623,10 +2892,10 @@ msgid "BTRN" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:155 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1244 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1252 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1260 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1274 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1265 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1273 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1281 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1295 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:116 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:736 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:744 @@ -2681,7 +2950,7 @@ msgid "ApplS" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:164 -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:417 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:449 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:125 msgid "coal" msgstr "" @@ -2740,7 +3009,7 @@ msgid "(safe)" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:170 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1261 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1282 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:130 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:753 msgid "skid" @@ -2752,20 +3021,20 @@ msgid "Skid" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:171 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1253 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1274 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:131 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:745 msgid "slip warning" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:171 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1326 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1347 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:131 msgid "Warning" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:172 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1245 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1266 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:132 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:737 msgid "slip" @@ -2785,7 +3054,7 @@ msgid "Vac.Serv" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:174 -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:416 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:448 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:133 msgid "water" msgstr "" @@ -2820,58 +3089,79 @@ msgid "psi" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:639 -msgid "lib./pal." +msgid "cfm" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:640 +msgid "L/s" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:641 +msgid "lib./pal." +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:642 msgid "pal.rtuti" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:758 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:760 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:316 +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:447 msgid "Open" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:763 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1379 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:765 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1400 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:321 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:804 +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:452 msgid "Closed" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:783 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:785 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:341 msgid "Blocked" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:783 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1158 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1195 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:785 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1179 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1216 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:341 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:651 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:688 +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:126 +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:216 +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:238 +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:261 +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:395 msgid "On" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:793 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:979 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1158 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1195 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:795 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1000 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1179 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1216 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:351 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:524 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:651 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:688 +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:108 +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:126 +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:221 +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:243 +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:266 +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:395 +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:408 msgid "Off" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:836 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:849 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:868 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:912 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:914 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:921 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:939 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:946 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:838 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:862 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:933 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:935 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:942 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:960 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:967 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:391 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:400 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:415 @@ -2883,14 +3173,17 @@ msgstr "" msgid "BC" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:843 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:845 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:851 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:856 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:850 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:852 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:874 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:875 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:886 #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:888 #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:890 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:896 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1124 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:909 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:911 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:917 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1145 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:397 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:399 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:401 @@ -2901,10 +3194,10 @@ msgstr "" msgid "EOT" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:877 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:879 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:880 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:887 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:898 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:900 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:901 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:908 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:423 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:425 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:426 @@ -2912,27 +3205,27 @@ msgstr "" msgid "Lead" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:970 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:991 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:516 msgid "Setup" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1054 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1075 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:599 msgid "Up" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1195 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1216 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:688 msgid "Reset" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1212 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1233 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:705 msgid "Exceeded" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1318 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1339 msgid "Derailed" msgstr "" @@ -3026,128 +3319,128 @@ msgstr "" msgid "Activity Save file '*.save' not found in folder {0}" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:412 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:444 msgid "freight-grain" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:413 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:445 msgid "freight-coal" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:414 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:446 msgid "freight-gravel" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:415 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:447 msgid "freight-sand" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:418 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:450 msgid "diesel oil" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:419 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:451 msgid "wood" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:420 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:452 msgid "sand" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:421 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:453 msgid "freight-general" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:422 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:454 msgid "freight-livestock" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:423 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:455 msgid "freight-fuel" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:424 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:456 msgid "freight-milk" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:425 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:457 msgid "mail" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:426 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:458 msgid "container" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:574 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:606 msgid "Refill: Immediate refill process selected, refilling immediately." msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:595 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:627 msgid "Refill: Electric loco and no pickup. Command rejected" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:755 -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:774 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:787 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:806 msgid "Incompatible pickup type" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:761 -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:779 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:793 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:811 msgid "Starting refill" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:605 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:637 #, csharp-format msgid "Container crane: Distance to {0} supply is {1}." msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:616 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:648 #, csharp-format msgid "Refill: Distance to {0} supply is {1}." msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:626 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:658 #, csharp-format msgid "Refill: Loco must be stationary to refill {0}." msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:632 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:664 #, csharp-format msgid "Refill: Loco speed must exceed {0}." msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:639 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:671 #, csharp-format msgid "Refill: Loco speed must not exceed {0}." msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:657 -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:678 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:689 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:710 #, csharp-format msgid "Refill: {0} supply now replenished." msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:684 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:716 #, csharp-format msgid "Unload: {0} fuel or freight now unloaded." msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:702 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:734 msgid "wag file not equipped for containers" msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:707 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:739 #, csharp-format msgid "{0} now loaded." msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:713 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:745 #, csharp-format msgid "{0} now unloaded." msgstr "" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:606 -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:617 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:638 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:649 #, csharp-format msgid "{0} meter" msgid_plural "{0} meters" @@ -3208,3 +3501,260 @@ msgstr "" msgid "Dist" msgstr "" +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:168 +msgctxt "SwitchPanel" +msgid "Switch Ahead" +msgstr "" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:171 +msgctxt "SwitchPanel" +msgid "Switch Behind" +msgstr "" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:174 +msgctxt "SwitchPanel" +msgid "Change Cab" +msgstr "" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:177 +msgctxt "SwitchPanel" +msgid "Map" +msgstr "" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:180 +msgctxt "SwitchPanel" +msgid "Switch Manual" +msgstr "" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:183 +msgctxt "SwitchPanel" +msgid "Clear Signal Forward" +msgstr "" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:186 +msgctxt "SwitchPanel" +msgid "Autopilot" +msgstr "" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:189 +msgctxt "SwitchPanel" +msgid "Track Monitor" +msgstr "" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:192 +msgctxt "SwitchPanel" +msgid "HUD" +msgstr "" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:195 +msgctxt "SwitchPanel" +msgid "Train Driving" +msgstr "" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:198 +msgctxt "SwitchPanel" +msgid "Switch" +msgstr "" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:201 +msgctxt "SwitchPanel" +msgid "Train Operations" +msgstr "" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:204 +msgctxt "SwitchPanel" +msgid "Train Dpu" +msgstr "" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:207 +msgctxt "SwitchPanel" +msgid "Next Station" +msgstr "" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:210 +msgctxt "SwitchPanel" +msgid "Train List" +msgstr "" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:213 +msgctxt "SwitchPanel" +msgid "EOT List" +msgstr "" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:216 +msgctxt "SwitchPanel" +msgid "Direction" +msgstr "" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:219 +msgctxt "SwitchPanel" +msgid "Gear" +msgstr "" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:222 +msgctxt "SwitchPanel" +msgid "Handbrake" +msgstr "" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:225 +msgctxt "SwitchPanel" +msgid "Brake hose" +msgstr "" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:228 +msgctxt "SwitchPanel" +msgid "Alerter" +msgstr "" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:231 +msgctxt "SwitchPanel" +msgid "Emergency" +msgstr "" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:234 +msgctxt "SwitchPanel" +msgid "Sander" +msgstr "" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:237 +msgctxt "SwitchPanel" +msgid "Wiper" +msgstr "" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:240 +msgctxt "SwitchPanel" +msgid "Door Left" +msgstr "" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:243 +msgctxt "SwitchPanel" +msgid "Door Right" +msgstr "" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:246 +msgctxt "SwitchPanel" +msgid "Light" +msgstr "" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:249 +msgctxt "SwitchPanel" +msgid "Pantograph 1" +msgstr "" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:252 +msgctxt "SwitchPanel" +msgid "Pantograph 2" +msgstr "" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:255 +msgctxt "SwitchPanel" +msgid "Battery Switch" +msgstr "" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:258 +msgctxt "SwitchPanel" +msgid "Master Key" +msgstr "" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:261 +msgctxt "SwitchPanel" +msgid "Circuit Breaker" +msgstr "" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:264 +msgctxt "SwitchPanel" +msgid "Traction Cut-Off" +msgstr "" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:267 +msgctxt "SwitchPanel" +msgid "Diesel Player" +msgstr "" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:270 +msgctxt "SwitchPanel" +msgid "Diesel Helper" +msgstr "" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:273 +msgctxt "SwitchPanel" +msgid "Front light" +msgstr "" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:276 +msgctxt "SwitchPanel" +msgid "Cyl Cocks" +msgstr "" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:279 +msgctxt "SwitchPanel" +msgid "Retainers" +msgstr "" + +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:111 +msgid "Dim" +msgstr "" + +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:115 +msgid "Bright" +msgstr "" + +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:231 +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:254 +msgid "Always On" +msgstr "" + +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:281 +msgid "Automatic" +msgstr "" + +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:310 +msgid "Always on" +msgstr "" + +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:401 +msgid "Full" +msgstr "" + +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:435 +msgid "Connected" +msgstr "" + diff --git a/Source/Locales/RunActivity/hu.po b/Source/Locales/RunActivity/hu.po index c9a4ce0705..dccd14c0da 100644 --- a/Source/Locales/RunActivity/hu.po +++ b/Source/Locales/RunActivity/hu.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: RunActivity\n" -"POT-Creation-Date: 2022-07-26 19:38:43+0200\n" +"POT-Creation-Date: 2023-10-24 12:50:28+0200\n" "PO-Revision-Date: \n" "Last-Translator: Péter Gulyás \n" "Language-Team: Open Rails Dev Team\n" @@ -10,59 +10,59 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 3.1.1\n" +"X-Generator: Poedit 3.3.2\n" #: ../../RunActivity/Viewer3D/Cameras.cs:601 msgid "Free" msgstr "Szabadmozgatású" -#: ../../RunActivity/Viewer3D/Cameras.cs:999 +#: ../../RunActivity/Viewer3D/Cameras.cs:1000 msgid "Outside Front" msgstr "Elülső külső" -#: ../../RunActivity/Viewer3D/Cameras.cs:999 +#: ../../RunActivity/Viewer3D/Cameras.cs:1000 msgid "Outside Rear" msgstr "Hátsó külső" -#: ../../RunActivity/Viewer3D/Cameras.cs:1517 +#: ../../RunActivity/Viewer3D/Cameras.cs:1518 msgid "Brakeman" msgstr "Fékezőállás" -#: ../../RunActivity/Viewer3D/Cameras.cs:1767 +#: ../../RunActivity/Viewer3D/Cameras.cs:1774 msgid "Passenger" msgstr "Utas" -#: ../../RunActivity/Viewer3D/Cameras.cs:1843 +#: ../../RunActivity/Viewer3D/Cameras.cs:1844 msgid "3D Cab" msgstr "3D vezérállás" -#: ../../RunActivity/Viewer3D/Cameras.cs:1940 +#: ../../RunActivity/Viewer3D/Cameras.cs:1955 msgid "Head out" msgstr "Kihajolt" -#: ../../RunActivity/Viewer3D/Cameras.cs:1985 +#: ../../RunActivity/Viewer3D/Cameras.cs:2000 msgid "Cab" msgstr "Vezérállás" -#: ../../RunActivity/Viewer3D/Cameras.cs:2238 +#: ../../RunActivity/Viewer3D/Cameras.cs:2253 msgid "Trackside" msgstr "Pályamenti" -#: ../../RunActivity/Viewer3D/Materials.cs:224 +#: ../../RunActivity/Viewer3D/Materials.cs:230 #, csharp-format msgid "{0:F0} texture" msgid_plural "{0:F0} textures" msgstr[0] "{0: F0} textúra" msgstr[1] "{0: F0} textúra" -#: ../../RunActivity/Viewer3D/Materials.cs:461 +#: ../../RunActivity/Viewer3D/Materials.cs:468 #, csharp-format msgid "{0:F0} material" msgid_plural "{0:F0} materials" msgstr[0] "{0: F0} anyag" msgstr[1] "{0: F0} anyag" -#: ../../RunActivity/Viewer3D/Shapes.cs:113 +#: ../../RunActivity/Viewer3D/Shapes.cs:119 #, csharp-format msgid "{0:F0} shape" msgid_plural "{0:F0} shapes" @@ -76,100 +76,104 @@ msgid_plural "{0:F0} tiles" msgstr[0] "{0:F0} mező" msgstr[1] "{0:F0} mező" -#: ../../RunActivity/Viewer3D/Viewer.cs:829 -#: ../../RunActivity/Viewer3D/Viewer.cs:1017 +#: ../../RunActivity/Viewer3D/Viewer.cs:832 +#: ../../RunActivity/Viewer3D/Viewer.cs:1027 msgid "Cab view not available" msgstr "Vezérállás nem elérhető" -#: ../../RunActivity/Viewer3D/Viewer.cs:914 +#: ../../RunActivity/Viewer3D/Viewer.cs:924 msgid "In MP, use Alt-F4 to quit directly" msgstr "Többrésztvevős módból csak Alt+F4 -gyel lehet kilépni" -#: ../../RunActivity/Viewer3D/Viewer.cs:946 +#: ../../RunActivity/Viewer3D/Viewer.cs:956 msgid "Automatic platform and siding labels visible." msgstr "Automatikus peron- és mellékvágánycímkék láthatók." -#: ../../RunActivity/Viewer3D/Viewer.cs:949 +#: ../../RunActivity/Viewer3D/Viewer.cs:959 msgid "Platform and siding labels visible." msgstr "Peron- és mellékvágánycímkék láthatók." -#: ../../RunActivity/Viewer3D/Viewer.cs:952 +#: ../../RunActivity/Viewer3D/Viewer.cs:962 msgid "Platform labels visible." msgstr "Peroncímkék láthatók." -#: ../../RunActivity/Viewer3D/Viewer.cs:955 +#: ../../RunActivity/Viewer3D/Viewer.cs:965 msgid "Siding labels visible." msgstr "Mellékvágánycímkék láthatók." -#: ../../RunActivity/Viewer3D/Viewer.cs:961 +#: ../../RunActivity/Viewer3D/Viewer.cs:971 msgid "Platform and siding labels hidden." msgstr "Peron- és mellékvágánycímkék elrejtve." -#: ../../RunActivity/Viewer3D/Viewer.cs:972 +#: ../../RunActivity/Viewer3D/Viewer.cs:982 msgid "Train labels visible." msgstr "Vonatcímkék láthatók." -#: ../../RunActivity/Viewer3D/Viewer.cs:975 +#: ../../RunActivity/Viewer3D/Viewer.cs:985 msgid "Car labels visible." msgstr "Kocsicímkék láthatók." -#: ../../RunActivity/Viewer3D/Viewer.cs:981 +#: ../../RunActivity/Viewer3D/Viewer.cs:991 msgid "Train and car labels hidden." msgstr "Vonat- és kocsicímkék elrejtve." -#: ../../RunActivity/Viewer3D/Viewer.cs:1024 +#: ../../RunActivity/Viewer3D/Viewer.cs:1034 msgid "This car doesn't have a 2D cab" msgstr "Ennek a kocsinak nincs 2D vezérállása" -#: ../../RunActivity/Viewer3D/Viewer.cs:1028 +#: ../../RunActivity/Viewer3D/Viewer.cs:1038 msgid "This car doesn't have a 3D cab" msgstr "Ennek a kocsinak nincs 3D vezérállása" -#: ../../RunActivity/Viewer3D/Viewer.cs:1059 -msgid "Confirmations suppressed" +#: ../../RunActivity/Viewer3D/Viewer.cs:1083 +#, fuzzy +#| msgid "Confirmations suppressed" +msgid "messages suppressed" msgstr "Visszajelzések elrejtve" -#: ../../RunActivity/Viewer3D/Viewer.cs:1061 -msgid "Confirmations visible" -msgstr "Visszajelzések láthatóak" +#: ../../RunActivity/Viewer3D/Viewer.cs:1087 +#, fuzzy +#| msgid "Car labels visible." +msgid "All messages visible" +msgstr "Kocsicímkék láthatók." -#: ../../RunActivity/Viewer3D/Viewer.cs:1210 +#: ../../RunActivity/Viewer3D/Viewer.cs:1244 msgid "Switched to player control" msgstr "Robotpilóta kikapcsolva" -#: ../../RunActivity/Viewer3D/Viewer.cs:1217 +#: ../../RunActivity/Viewer3D/Viewer.cs:1251 msgid "You can't switch from manual to autopilot mode" msgstr "Helyi forgalomirányításból nem lehet robotpilótára váltani" -#: ../../RunActivity/Viewer3D/Viewer.cs:1223 +#: ../../RunActivity/Viewer3D/Viewer.cs:1257 msgid "Switched to autopilot" msgstr "Robotpilóta bekapcsolva" -#: ../../RunActivity/Viewer3D/Viewer.cs:1896 +#: ../../RunActivity/Viewer3D/Viewer.cs:1931 msgid "Game saved" msgstr "A játékállás elmentve" -#: ../../RunActivity/Viewer3D/Viewer.cs:348 +#: ../../RunActivity/Viewer3D/Viewer.cs:347 #, csharp-format msgid "Allowed speed raised to {0}" msgstr "A megengedett sebesség {0}-ra emelkedett" -#: ../../RunActivity/Viewer3D/Viewer.cs:1050 +#: ../../RunActivity/Viewer3D/Viewer.cs:1060 #, csharp-format msgid "Vibrating at level {0}" msgstr "Vibrálás szintje: {0}" -#: ../../RunActivity/Viewer3D/Viewer.cs:1241 +#: ../../RunActivity/Viewer3D/Viewer.cs:1275 #, csharp-format msgid "Keyboard map list saved to '{0}'." msgstr "Billentyűzetkiosztási lista mentve: '{0}'." -#: ../../RunActivity/Viewer3D/Viewer.cs:1245 +#: ../../RunActivity/Viewer3D/Viewer.cs:1279 #, csharp-format msgid "Keyboard map image saved to '{0}'." msgstr "Billentyűzetkiosztási ábra mentve: '{0}'." -#: ../../RunActivity/Viewer3D/Viewer.cs:1097 +#: ../../RunActivity/Viewer3D/Viewer.cs:1126 #, csharp-format msgid "{0} viewpoint stored. Use Shift+8 to restore viewpoints." msgid_plural "{0} viewpoints stored. Use Shift+8 to restore viewpoints." @@ -178,7 +182,7 @@ msgstr[0] "" msgstr[1] "" "{0} nézőpont van eltárolva. Használd a Shift+B -t a visszaállításhoz." -#: ../../RunActivity/Viewer3D/Weather.cs:145 +#: ../../RunActivity/Viewer3D/Weather.cs:143 msgid "" "Restoring wrong weather type : trying to restore dynamic weather but save " "contains user controlled weather" @@ -186,7 +190,7 @@ msgstr "" "Rossz időjárástípus betöltése: dinamikus időjárást nem lehet betölteni " "felhasználó által beállított időjárású mentésből" -#: ../../RunActivity/Viewer3D/Weather.cs:1642 +#: ../../RunActivity/Viewer3D/Weather.cs:1632 msgid "" "Restoring wrong weather type : trying to restore user controlled weather but " "save contains dynamic weather" @@ -194,15 +198,26 @@ msgstr "" "Rossz időjárástípus betöltése: felhasználó által beállított időjárást nem " "lehet betölteni dinamikus időjárású mentésből" -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.cs:2004 +#: ../../RunActivity/Viewer3D/Weather.cs:492 +#, csharp-format +msgid "Increased daylight offset to {0} h" +msgstr "Időeltolás növelve {0} órára" + +#: ../../RunActivity/Viewer3D/Weather.cs:497 +#, csharp-format +msgid "Decreased daylight offset to {0} h" +msgstr "Időeltolás csökkentve {0} órára" + +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.cs:1919 +#: ../../RunActivity/Viewer3D/Map/MapForm.cs:1494 msgid "Switching Request Sent to the Server" msgstr "A vágányútállítási kérelem el lett küldve az irányítónak" -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.cs:580 +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.cs:556 msgid "MSG to Server" msgstr "Üzenet a kiszolgálónak" -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.cs:584 +#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.cs:560 #: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:256 msgid "MSG to All" msgstr "Ózenet mindenkinek" @@ -265,11 +280,11 @@ msgid "Assist" msgstr "Segítő" #: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:417 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1195 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1244 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1310 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:718 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:766 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1247 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1296 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1362 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:719 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:767 msgid "Normal" msgstr "Normál" @@ -302,22 +317,27 @@ msgid "Show:" msgstr "Megjelenítés:" #: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:517 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:454 msgid "Platform labels" msgstr "Peroncímkék" #: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:530 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:444 msgid "Siding labels" msgstr "Mellékvágánycímkék" #: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:543 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:424 msgid "Signals" msgstr "Jelzők" #: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:556 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:414 msgid "Signal state" msgstr "Jelzésképek" #: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:572 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:404 msgid "Train labels" msgstr "Vonatcímkék" @@ -342,6 +362,7 @@ msgid "Background color" msgstr "Háttérszín" #: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:673 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:434 msgid "Switches" msgstr "Váltók" @@ -379,6 +400,7 @@ msgid "To zoom out of a location, press Alt and click the left mouse." msgstr "Visszakicsinyítés Alt és bal egérgombbal." #: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:793 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:464 msgid "Platforms" msgstr "Peronok" @@ -430,14 +452,14 @@ msgid "3D" msgstr "3D" #: ../../RunActivity/Viewer3D/Debugging/SoundDebugForm.Designer.cs:284 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:536 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:721 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1288 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:146 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:668 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:433 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:631 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1208 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:148 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:673 #: ../../RunActivity/Viewer3D/WebServices/TrackMonitorDisplay.cs:291 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:109 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:230 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:110 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:231 msgid "Speed" msgstr "Sebesség" @@ -454,8 +476,8 @@ msgid "Variable 1" msgstr "Variable 1" #: ../../RunActivity/Viewer3D/Debugging/SoundDebugForm.Designer.cs:351 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1294 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1296 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1214 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1216 #: ../../RunActivity/Viewer3D/Popups/NextStationWindow.cs:78 msgid "Distance" msgstr "Távolság" @@ -480,6 +502,214 @@ msgstr "Hang hibakeresés" msgid "View Self" msgstr "Saját vonat megtekintése" +#: ../../RunActivity/Viewer3D/Map/MapForm.cs:301 +msgid "You" +msgstr "Te" + +#: ../../RunActivity/Viewer3D/Map/MapForm.cs:308 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:518 +#: ../../RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs:345 +msgid "Helper" +msgstr "Segéd" + +#: ../../RunActivity/Viewer3D/Map/MapForm.cs:314 +#, fuzzy +#| msgid "disconnected" +msgid "Disconnected" +msgstr "nincs cs." + +#: ../../RunActivity/Viewer3D/Map/MapForm.cs:1721 +msgid "Demote this player" +msgstr "Játékos lefokozása" + +#: ../../RunActivity/Viewer3D/Map/MapForm.cs:1721 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:848 +msgid "Make this player an assistant" +msgstr "Játékos legyen asszisztens" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:160 +msgid "Learn more" +msgstr "További információ" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:172 +msgid "You are the dispatcher in this multiplayer session" +msgstr "Te vagy a diszpécser ebben a többjátékos munkamenetben." + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:261 +msgid "Message all players" +msgstr "Üzenet minden játékosnak" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:275 +msgid ">" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:297 +msgid "Messages:" +msgstr "Üzenetek:" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:324 +msgid "Simulation time" +msgstr "Szimulációs idő" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:337 +msgid "Map customization" +msgstr "Térkép testreszabása" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:372 +msgid "All trains" +msgstr "Minden vonat" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:384 +msgid "Only active trains" +msgstr "Csak aktív vonatok" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:394 +msgid "Train state" +msgstr "Vonatállapot" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:475 +msgid "Map features" +msgstr "Térkép jellemzői" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:484 +msgid "Rotate between themes" +msgstr "Témaváltás" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:497 +msgid "Show simulation time" +msgstr "Szimulációs idő megjelenítése" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:507 +msgid "Use anti-aliasing" +msgstr "Anti-aliasing használata" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:572 +msgid "Multiplayer settings" +msgstr "Többjátékos beállítások" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:583 +msgid "Penalty for speeding && SPAD" +msgstr "Büntetés gyorshajtásért && SPAD" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:596 +msgid "Prefer green signals" +msgstr "Zöld jelzők előnyben részesítése" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:609 +msgid "Allow new players to join" +msgstr "Új játékosok csatlakozhatnak" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:639 +msgid "Map settings and controls" +msgstr "Térképbeállítások és funkciók" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:648 +msgid "Follow my train on the map" +msgstr "A vonatom követése a térképen" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:659 +msgid "Jump to my train on the map" +msgstr "Ugrás a vonatomhoz a térképen" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:670 +msgid "Jump to my train in game" +msgstr "Ugrás a vonatomhoz a játékban" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:681 +msgid "Map resolution (m):" +msgstr "Térképfelbontás (m):" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:722 +msgid "Allow throwing switches" +msgstr "A váltók állíthatók" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:734 +msgid "Allow changing signals" +msgstr "A jelzők módosíthatók" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:746 +msgid "Draw next path section" +msgstr "Előrelátható útvonalszakasz rajzolása" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:773 +msgid "Players" +msgstr "Játékosok" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:813 +msgid "Message the selected player" +msgstr "Üzenet a kiválasztott játékosnak" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:821 +msgid "Reply to the selected player" +msgstr "Válasz a kiválasztott játékosnak" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:841 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:540 +msgid "Player" +msgstr "Játékos" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:855 +msgid "Jump to this player in game" +msgstr "Ugrás ehhez a játékoshoz a játékban" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:862 +msgid "Follow on the map" +msgstr "Követés a térképen" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:869 +msgid "Kick from multiplayer session" +msgstr "Kirúgás a többjátékos módból" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:887 +msgid "Set switch to..." +msgstr "Váltóállítás..." + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:896 +#, fuzzy +#| msgid "main route" +msgid "Main route" +msgstr "fővágány" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:904 +msgid "Side route" +msgstr "Mellékvágány" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:926 +msgid "Set signal aspect to..." +msgstr "Jelző aspektus beállítása..." + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:933 +msgid "System controlled" +msgstr "Rendszer által vezérelt" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:942 +msgid "Stop" +msgstr "Megállj" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:950 +msgid "Approach" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:959 +msgid "Proceed" +msgstr "Szabad" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:972 +msgid "Allow call on" +msgstr "Hívás engedélyezése" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:988 +msgid "Jump to this train in game" +msgstr "Ugrás ehhez a vonathoz a játékban" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:995 +msgid "Follow this train on the map" +msgstr "A vonat követése a térképen" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:1005 +msgid "Map window" +msgstr "Térképablak" + #: ../../RunActivity/Viewer3D/Popups/ActivityWindow.cs:45 msgid "Activity Events" msgstr "Szolgálat eseményei" @@ -550,135 +780,226 @@ msgstr "Esemény: {0}" msgid "Train: {0}" msgstr "Vonat: {0}" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:41 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:42 msgid "Car Operation Menu" msgstr "Kocsivizsgálat" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:51 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:66 msgid "Car ID" msgstr "Azonosító" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:54 -msgid "Toggle Handbrake" -msgstr "Kézifék átállítása" +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:73 +#, fuzzy +#| msgid "Handbrake" +msgid "Unset Handbrake" +msgstr "Kézifék" + +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:75 +#, fuzzy +#| msgid "Handbrake" +msgid "Set Handbrake" +msgstr "Kézifék" + +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:82 +#, fuzzy +#| msgid "Power" +msgid "Power Off" +msgstr "Főmegszakító" + +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:84 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:86 +#, fuzzy +#| msgid "Power" +msgid "Power On" +msgstr "Főmegszakító" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:56 -msgid "Toggle Power" -msgstr "Gép indítása/leállítása" +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:91 +#, fuzzy +#| msgid "Toggle MU Connection" +msgid "Disconnect MU Connection" +msgstr "Távvezérlőkábel (szét)csatolása" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:58 -msgid "Toggle MU Connection" +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:93 +#, fuzzy +#| msgid "Toggle MU Connection" +msgid "Connect MU Connection" msgstr "Távvezérlőkábel (szét)csatolása" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:60 -msgid "Toggle Battery Switch" -msgstr "Akkumulátor ki-/bekapcsolása" +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:98 +#, fuzzy +#| msgid "Battery switch" +msgid "Battery Switch Off" +msgstr "Akkumulátorkapcsoló" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:62 -msgid "Toggle Electric Train Supply Connection" -msgstr "Elektromos betáp csatlakoztatása" +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:100 +#, fuzzy +#| msgid "Battery switch" +msgid "Battery Switch On" +msgstr "Akkumulátorkapcsoló" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:64 -msgid "Toggle Brake Hose Connection" -msgstr "Féktömlő (szét)csatolása" +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:105 +#, fuzzy +#| msgid "Electric train supply" +msgid "Disonnect Electric Train Supply" +msgstr "Villamos fűtés" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:66 -msgid "Open/Close Front Angle Cock" +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:107 +#, fuzzy +#| msgid "Electric train supply" +msgid "Connect Electric Train Supply" +msgstr "Villamos fűtés" + +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:113 +msgid "Disconnect Front Brake Hose" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:115 +msgid "Connect Front Brake Hose" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:122 +msgid "Disconnect Rear Brake Hose" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:124 +#, fuzzy +#| msgid "Brake Hose" +msgid "Connect Rear Brake Hose" +msgstr "Légvezetékek" + +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:131 +#, fuzzy +#| msgid "Open/Close Front Angle Cock" +msgid "Close Front Angle Cock" +msgstr "Első végelzárószelep nyit/zár" + +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:133 +#, fuzzy +#| msgid "Open/Close Front Angle Cock" +msgid "Open Front Angle Cock" msgstr "Első végelzárószelep nyit/zár" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:68 -msgid "Open/Close Rear Angle Cock" +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:140 +#, fuzzy +#| msgid "Open/Close Rear Angle Cock" +msgid "Close Rear Angle Cock" +msgstr "Hátsó végelzárószelep nyit/zár" + +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:142 +#, fuzzy +#| msgid "Open/Close Rear Angle Cock" +msgid "Open Rear Angle Cock" msgstr "Hátsó végelzárószelep nyit/zár" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:70 -msgid "Open/Close Bleed Off Valve" +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:149 +#, fuzzy +#| msgid "Open/Close Bleed Off Valve" +msgid "Close Bleed Off Valve" +msgstr "Kieresztőszelep nyit/zár" + +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:151 +#, fuzzy +#| msgid "Open/Close Bleed Off Valve" +msgid "Open Bleed Off Valve" msgstr "Kieresztőszelep nyit/zár" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:72 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:156 msgid "Close window" msgstr "Ablak bezárása" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:106 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:235 msgid "Handbrake set" msgstr "Kézifék: be" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:108 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:237 msgid "Handbrake off" msgstr "Kézifék: ki" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:120 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:249 msgid "Power OFF command sent" msgstr "Leállítási parancs elküldve" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:122 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:251 msgid "Power ON command sent" msgstr "Elindítási parancs elküldve" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:125 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:254 msgid "No power command for this type of car!" msgstr "Ezt a típusú kocsit nem lehet gépként elindítani!" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:138 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:267 msgid "MU signal connected" msgstr "Távvezérlő kábel csatlakoztatva" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:140 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:269 msgid "MU signal disconnected" msgstr "Távvezérlő kábel szétcsatolva" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:143 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:272 msgid "No MU command for this type of car!" msgstr "Távvezérlés nem lehetséges ennél a típusú kocsinál." -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:153 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:282 msgid "Switch off battery command sent" msgstr "Akkumulátor kikapcsolási parancs elküldve" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:155 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:284 msgid "Switch on battery command sent" msgstr "Akkumulátor bekapcsolási parancs elküldve" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:167 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:296 msgid "Front ETS cable connected" msgstr "Első vonatfűtési kábel csatlakoztatva" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:169 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:298 msgid "Front ETS cable disconnected" msgstr "Első vonatfűtési kábel szétcsatlakoztatva" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:173 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:302 msgid "This car doesn't have an ETS system" msgstr "Ez a kocsi nem rendelkezik el. vonatfűtéssel" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:181 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:310 msgid "Front brake hose connected" msgstr "Első féktömlők csatolva" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:183 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:312 msgid "Front brake hose disconnected" msgstr "Első féktömlők szétcsatolva" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:190 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:319 +#, fuzzy +#| msgid "Front brake hose connected" +msgid "Rear brake hose connected" +msgstr "Első féktömlők csatolva" + +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:321 +#, fuzzy +#| msgid "Front brake hose disconnected" +msgid "Rear brake hose disconnected" +msgstr "Első féktömlők szétcsatolva" + +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:328 msgid "Front angle cock opened" msgstr "Első végelzáró kinyitva" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:192 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:330 msgid "Front angle cock closed" msgstr "Első végelzáró lezárva" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:199 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:337 msgid "Rear angle cock opened" msgstr "Hátsó végelzáró kinyitva" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:201 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:339 msgid "Rear angle cock closed" msgstr "Hátsó végelzáró lezárva" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:211 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:349 msgid "Bleed off valve opened" msgstr "Kieresztőszelep nyitva" -#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:213 +#: ../../RunActivity/Viewer3D/Popups/CarOperationsWindow.cs:351 msgid "Bleed off valve closed" msgstr "Kieresztőszelep lezárva" @@ -714,11 +1035,11 @@ msgstr "Könyvtárnév" msgid "Can't attach EOT if player train not stopped" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/EOTListWindow.cs:110 +#: ../../RunActivity/Viewer3D/Popups/EOTListWindow.cs:111 msgid "Player train already has a mounted EOT" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/EOTListWindow.cs:122 +#: ../../RunActivity/Viewer3D/Popups/EOTListWindow.cs:124 msgid "Can't mount an EOT if another one is mounted" msgstr "" @@ -846,8 +1167,8 @@ msgid "- Missed station stops: " msgstr "- Elszalasztott állomási megállások: " #: ../../RunActivity/Viewer3D/Popups/HelpWindow.cs:416 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1069 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1232 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:986 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1152 msgid " " msgstr " " @@ -926,962 +1247,984 @@ msgid_plural "{0} minutes" msgstr[0] "{0} perc" msgstr[1] "{0} perc" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:204 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:539 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:707 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:720 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:108 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:436 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:617 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:630 #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:146 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:148 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:151 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:85 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:111 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:112 msgid "Throttle" msgstr "Menetszabályzó" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:205 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:109 msgid "Power In/Out" msgstr "Teljesítmény Be/Ki" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:209 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:113 msgid "Motive force" msgstr "Mozgatóerő" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:211 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:115 msgid "Num of substeps" msgstr "Allépések száma" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:214 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1442 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:118 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1362 msgid "Memory" msgstr "Memória" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:215 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:119 msgid "GCs" msgstr "GC-k" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:216 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:120 msgid "Frame time" msgstr "Frame idő" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:217 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1456 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:121 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1376 msgid "Render process" msgstr "Render folyamat" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:218 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1457 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:122 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1377 msgid "Updater process" msgstr "Updater folyamat" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:219 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1458 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:123 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1378 msgid "Loader process" msgstr "Loader folyamat" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:220 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1459 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:124 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1379 msgid "Sound process" msgstr "Sound folyamat" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:525 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:422 msgid "Version" msgstr "Verzió" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:529 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:531 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:426 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:428 #: ../../RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs:158 #: ../../RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs:164 #: ../../RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs:332 #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:147 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:149 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:645 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:152 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:650 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:86 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:112 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:207 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:113 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:208 msgid "Time" msgstr "Idő" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:534 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:142 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:652 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:105 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:214 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:431 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:144 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:657 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:106 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:215 msgid "Replay" msgstr "Visszajátszás" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:537 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1227 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:135 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:686 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:434 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1147 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:136 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:691 #: ../../RunActivity/Viewer3D/WebServices/TrackMonitorDisplay.cs:322 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:99 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:248 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:100 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:249 msgid "Gradient" msgstr "Pályaemelkedés" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:538 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:705 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:717 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:124 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:435 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:615 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:627 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:125 #: ../../RunActivity/Viewer3D/WebServices/TrackMonitorDisplay.cs:332 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:89 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:90 msgid "Direction" msgstr "Irány" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:539 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:707 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:141 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:104 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:436 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:617 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:143 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:105 msgid "Regulator" msgstr "Töltésszabályzó" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:543 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:151 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:823 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:880 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:914 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:114 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:383 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:428 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:462 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:440 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:154 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:828 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:904 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:938 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:115 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:384 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:429 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:463 msgid "Train brake" msgstr "Vonatfék" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:545 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:143 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:931 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:106 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:479 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:442 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:145 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:955 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:107 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:480 msgid "Retainers" msgstr "Visszatartó szelepek" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:547 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:129 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:940 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:955 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:93 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:488 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:503 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:444 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:130 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:964 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:979 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:94 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:489 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:504 msgid "Engine brake" msgstr "Mozdonyfék" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:549 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:446 msgid "Brakemen brake" msgstr "Fékezőszemélyzet" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:551 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:708 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:127 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:966 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:975 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:91 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:514 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:522 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:448 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:618 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:128 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:990 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:999 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:92 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:515 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:523 msgid "Dynamic brake" msgstr "Dinamikus fék" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:565 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:464 +msgid "Cruise control status" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:467 +msgid "Speed target" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:468 +msgid "Max acceleration" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:472 msgid "Multiple Units" msgstr "Mozdonycsoport" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:567 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1116 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:639 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:474 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1168 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:640 msgid "FPS" msgstr "FPS" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:571 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:478 #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:117 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1126 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:82 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:649 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1178 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:83 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:650 msgid "Autopilot" msgstr "Robotpilóta" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:574 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1174 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:481 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1083 msgid "Wheel slip" msgstr "Kerékmegperdülés" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:576 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:483 msgid "Wheel slip warning" msgstr "Kerékmegperdülési figyelmeztetés" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:579 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:486 msgid "Wheel skid" msgstr "Kerékmegcsúszás" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:585 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:492 msgid "Sander blocked" msgstr "Homokoló letiltva" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:587 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:494 msgid "Sander on" msgstr "Homokoló üzemben" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:600 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:126 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1331 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1345 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:90 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:786 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:800 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:505 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1379 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:783 +msgid "Left" +msgstr "Bal" + +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:507 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1381 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:785 +msgid "Right" +msgstr "Jobb" + +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:510 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:127 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1385 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1399 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:91 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:789 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:803 msgid "Doors open" msgstr "Ajtók nyitva" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:606 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:516 msgid "MultiPlayerStatus: " msgstr "MultiPlayer Állapot: " -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:607 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:517 #: ../../RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs:344 msgid "Dispatcher" msgstr "Irányító" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:608 -#: ../../RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs:345 -msgid "Helper" -msgstr "Segéd" - -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:609 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:519 #: ../../RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs:346 msgid "Client" msgstr "Résztvevő" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:618 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:528 msgid "CONSIST INFORMATION" msgstr "SZERELVÉNY INFORMÁCIÓI" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:630 -msgid "Player" -msgstr "Játékos" - -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:631 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:541 msgid "Tilted" msgstr "Dönthető" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:632 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:654 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:775 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1010 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1029 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1059 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1089 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1118 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:542 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:564 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:685 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:924 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:944 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:975 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1006 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1036 msgid "Type" msgstr "Típus" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:633 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:655 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:543 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:565 msgid "Length" msgstr "Hossz" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:634 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:656 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:544 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:566 msgid "Weight" msgstr "Tömeg" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:635 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:545 msgid "Tonnage" msgstr "Tonna" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:636 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:546 msgid "Control Mode" msgstr "Irányítási mód" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:637 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:547 msgid "Out of Control" msgstr "Irányítás nélkül" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:638 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:548 msgid "Cab Aspect" msgstr "Jelzéskép" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:641 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:664 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1259 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1438 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:551 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:574 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1179 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1358 #: ../../RunActivity/Viewer3D/RollingStock/SubSystems/ETCS/DataEntry.cs:460 #: ../../RunActivity/Viewer3D/RollingStock/SubSystems/ETCS/DataEntry.cs:485 msgid "Yes" msgstr "Igen" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:641 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:664 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1259 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1438 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:551 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:574 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1179 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1358 msgid "No" msgstr "Nem" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:642 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:665 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:552 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:575 msgid "Freight" msgstr "Teher" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:642 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:665 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:552 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:575 msgid "Pass" msgstr "Személy" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:652 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1009 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1028 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1058 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1088 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1117 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1214 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:562 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:923 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:943 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:974 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1005 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1035 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1134 msgid "Car" msgstr "Kocsi" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:653 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:718 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1261 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:563 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:628 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1181 msgid "Flipped" msgstr "Fordított" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:657 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:567 msgid "Drv/Cabs" msgstr "Vezethető" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:658 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:568 msgid "Wheels" msgstr "Tengelyek" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:659 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:569 msgid "Temp" msgstr "Hőm" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:699 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:609 msgid "LOCOMOTIVE INFORMATION" msgstr "MOZDONY INFORMÁCIÓI" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:712 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:896 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:905 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:907 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:911 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:920 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:922 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:930 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:932 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:967 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:997 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:622 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:806 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:815 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:817 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:821 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:830 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:832 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:840 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:842 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:877 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:909 msgid "off" msgstr "ki" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:713 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:894 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:903 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:918 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:928 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:955 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:963 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:623 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:804 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:813 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:828 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:838 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:865 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:873 msgid "PlayerLoco" msgstr "VezetettGép" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:716 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:984 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:991 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:626 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:896 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:903 msgid "Loco" msgstr "Mozdony" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:719 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:629 msgid "MU'd" msgstr "Távvez" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:723 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:787 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:633 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:697 #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:140 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:140 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:142 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:79 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:103 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:104 msgid "Power" msgstr "Főmegszakító" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:724 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:634 msgid "Force" msgstr "Erők" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:734 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:644 msgid "DISTRIBUTED POWER INFORMATION" msgstr "GÉPCSOPORT-INFORMÁCIÓK" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:768 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:678 msgid "POWER SUPPLY INFORMATION" msgstr "ENERGIAELLÁTÁSI INFORMÁCIÓK" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:774 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:684 msgid "Wagon" msgstr "Vagon" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:780 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:690 msgid "MainPS" msgstr "Főüzem" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:781 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:691 msgid "AuxPS" msgstr "Segédüz." -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:782 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:692 msgid "Battery" msgstr "Akku" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:783 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:693 msgid "LowVoltPS" msgstr "KisFeszE" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:784 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:694 msgid "CabPS" msgstr "VezÁllE" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:785 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:695 msgid "ETS" msgstr "El. fűtés" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:786 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:696 msgid "ETSCable" msgstr "Fűtéskábel" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:813 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:826 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:841 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:850 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:723 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:736 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:751 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:760 msgid "connected" msgstr "csatl." -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:813 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:826 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:841 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:850 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:723 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:736 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:751 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:760 msgid "disconnected" msgstr "nincs cs." -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:878 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:788 msgid "BRAKE INFORMATION" msgstr "FÉKINFORMÁCIÓK" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:895 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:805 msgid "Exhauster" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:896 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:905 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:907 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:911 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:920 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:922 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:930 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:932 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:967 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:997 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:806 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:815 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:817 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:821 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:830 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:832 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:840 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:842 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:877 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:909 msgid "on" msgstr "be" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:904 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:919 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:929 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:814 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:829 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:839 msgid "Large Ejector" msgstr "Nagy légsűrítő" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:906 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:931 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:816 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:841 msgid "Small Ejector" msgstr "Kis légsűrítő" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:908 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:933 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:818 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:843 msgid "Pressure" msgstr "Nyomás" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:910 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:921 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:820 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:831 msgid "Vacuum Pump" msgstr "Vákuumszivattyú" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:939 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:849 msgid "Brake Sys Vol" msgstr "Fékr Térf" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:940 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:850 msgid "Train Pipe" msgstr "Átmenőfék" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:942 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:852 msgid "Brake Cyl" msgstr "Féktartály" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:944 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:854 msgid "Air Vol" msgstr "Levegőtérfogat" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:956 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:866 msgid "No compressor or reservoir fitted" msgstr "Nincs kompresszor és tartály" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:964 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:994 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:874 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:906 msgid "Main reservoir" msgstr "Főlégtartály" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:966 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:996 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:876 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:908 msgid "Compressor" msgstr "Légsűrítő" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1011 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1030 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1090 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1119 -msgid "BrkCyl" -msgstr "Fékheng" - -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1012 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1031 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1120 -msgid "BrkPipe" -msgstr "Fővez" - -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1019 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:878 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:910 +#: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:135 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:846 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:848 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:870 +#: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:74 +msgid "Flow" +msgstr "Fogyaszt." + +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:925 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:945 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1007 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1037 +msgid "BrkCyl" +msgstr "Fékheng" + +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:926 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:946 #: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1038 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1068 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1098 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1127 +msgid "BrkPipe" +msgstr "Fővez" + +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:934 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:954 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:985 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1016 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1046 msgid "Handbrk" msgstr "Kézifék" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1020 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1039 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1099 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1128 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:935 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:955 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1017 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1047 msgid "Conn" msgstr "Csatlás" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1021 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1040 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1100 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1129 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:936 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:956 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1018 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1048 msgid "AnglCock" msgstr "Végelzáró" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1032 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:947 msgid "VacRes" msgstr "VákTart" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1060 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:976 msgid "Brk" msgstr "Fék" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1091 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1008 msgid "SrvPipe" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1092 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1121 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1009 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1039 msgid "AuxRes" msgstr "KészlLT" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1093 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1122 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1010 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1040 msgid "ErgRes" msgstr "VészLT" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1094 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1011 msgid "StrPipe" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1095 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1124 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1012 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1042 +msgid "CtrlRes" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1013 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1043 msgid "RetValve" msgstr "Visszat" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1096 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1125 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1014 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1044 msgid "TripleValve" msgstr "Kormányszelep" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1101 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1130 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1019 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1049 msgid "BleedOff" msgstr "KieresztőSz" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1123 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1041 msgid "MRPipe" msgstr "FőlégVez" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1147 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1067 msgid "FORCE INFORMATION" msgstr "ERŐINFORMÁCIÓK" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1164 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1173 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1081 msgid "(Advanced adhesion model)" msgstr "(Fejlett csúszási modell)" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1165 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1190 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1198 -msgid "Loco Adhesion" -msgstr "Mozdony tapadása" - -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1166 -msgid "Wag Adhesion" -msgstr "Vagon tapadása" - -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1167 -msgid "Tang. Force" -msgstr "Kerületi erő" - -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1168 -msgid "Static Force" -msgstr "Statikus erő" - -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1175 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1084 msgid "Conditions" msgstr "Csúszási állapot" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1176 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1085 msgid "Axle drive force" msgstr "Tengely hajtóerő" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1178 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1086 msgid "Axle brake force" msgstr "Tengely fékezőerő" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1179 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1087 msgid "Number of substeps" msgstr "Allépések száma" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1180 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1197 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1088 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1117 msgid "Axle out force" msgstr "Tengely eredő erő" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1183 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1089 msgid "Comp Axle out force" msgstr "Kompenzált teng. eredő erő" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1186 -msgid "Wheel Speed" +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1090 +#, fuzzy +#| msgid "Wheel Speed" +msgid "Wheel speed" msgstr "Keréksebesség" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1191 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1199 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1109 +msgid "Wheel ang. pos." +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1110 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1118 +msgid "Loco Adhesion" +msgstr "Mozdony tapadása" + +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1111 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1119 msgid "Wagon Adhesion" msgstr "Vagon tapadása" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1196 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1116 msgid "(Simple adhesion model)" msgstr "(Egyszerűsített csúszási modell)" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1205 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1125 msgid "Wind Speed:" msgstr "Szélsebesség:" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1206 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1126 msgid "Wind Direction:" msgstr "Szélirány:" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1207 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1127 msgid "Train Direction:" msgstr "Haladási irány:" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1208 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1128 msgid "ResWind:" msgstr "Eredő szélseb:" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1209 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1129 msgid "ResSpeed:" msgstr "Eredő sebesség:" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1215 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1135 msgid "Total" msgstr "Össz" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1216 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1136 msgid "Motive" msgstr "Mozgató" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1217 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1137 msgid "Brake" msgstr "Fékező" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1218 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1138 msgid "Friction" msgstr "Súrlód" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1219 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1139 msgid "Gravity" msgstr "Gravit" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1220 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1228 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1140 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1148 msgid "Curve" msgstr "Ívellenáll" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1221 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1141 msgid "Tunnel" msgstr "Alagút" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1222 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1429 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1142 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1349 msgid "Wind" msgstr "Szél" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1223 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1224 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1143 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1144 msgid "Coupler" msgstr "Vonókész" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1225 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1145 msgid "Slack" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1226 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1146 msgid "Mass" msgstr "Tömeg" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1229 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1149 msgid "Brk Frict." msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1230 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1150 msgid "Brk Slide" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1231 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1151 msgid "Bear Temp" msgstr "Csapágyhőm" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1233 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:125 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1286 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1294 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1309 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1153 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:126 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1338 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1346 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1361 msgid "DerailCoeff" msgstr "Siklási együtth" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1283 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1203 msgid "DISPATCHER INFORMATION : active trains : " msgstr "FORGALOMIRÁNYÍTÁSI INFORMÁCIÓK : aktív vonatok : " -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1286 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1206 msgid "Train" msgstr "Vonat" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1287 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1207 msgid "Travelled" msgstr "MegtettÚt" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1289 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1209 msgid "Max" msgstr "Max" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1290 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1210 msgid "AI mode" msgstr "AI mód" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1291 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1211 msgid "AI data" msgstr "AI adatok" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1292 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1212 msgid "Mode" msgstr "Mód" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1293 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1213 msgid "Auth" msgstr "Engedély" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1295 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1215 msgid "Signal" msgstr "Jelző" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1297 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1217 msgid "Consist" msgstr "Szerelv" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1298 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1218 msgid "Path" msgstr "Útvonal" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1423 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1343 msgid "WEATHER INFORMATION" msgstr "IDŐJÁRÁSI INFORMÁCIÓK" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1425 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1345 msgid "Visibility" msgstr "Látótávolság" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1426 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1346 msgid "Cloud cover" msgstr "Felhőzet" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1427 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1347 msgid "Intensity" msgstr "Csapadékintenzitás" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1428 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1348 msgid "Liquidity" msgstr "Nedvesség" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1430 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1350 msgid "Amb Temp" msgstr "Külső hőmérséklet" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1436 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1356 msgid "DEBUG INFORMATION" msgstr "HIBAKERESÉSI INFORMÁCIÓK" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1438 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1358 msgid "Logging enabled" msgstr "Naplózás" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1439 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1359 msgid "Build" msgstr "Build" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1440 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1360 msgid "CPU" msgstr "CPU" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1441 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1361 msgid "GPU" msgstr "GPU" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1443 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1363 msgid "CPU Memory" msgstr "CPU memória" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1444 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1364 msgid "GPU Memory" msgstr "GPU memória" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1445 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1365 msgid "Adapter" msgstr "Adapter" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1450 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1370 msgid "Shadow maps" msgstr "Árnyéktérképek" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1452 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1372 msgid "Shadow primitives" msgstr "Árnyék primitívek" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1455 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1375 msgid "Render primitives" msgstr "Render primitívek" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1456 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1457 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1458 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1459 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1460 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1376 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1377 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1378 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1379 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1380 msgid "wait" msgstr "várakozás" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1460 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1380 msgid "Total process" msgstr "Összes folyamat" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1461 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1381 msgid "Camera" msgstr "Kamera" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1205 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1209 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1125 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1129 #, csharp-format msgid "{0:N2} mph" msgstr "{0:N2} mf/h" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1206 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1207 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1208 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1126 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1127 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1128 #, csharp-format msgid "{0:N2} Deg" msgstr "{0:N2} fok" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1425 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1345 #, csharp-format msgid "{0:N0} m" msgstr "{0:N0} m" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1426 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1428 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1346 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1348 #, csharp-format msgid "{0:F0} %" msgstr "{0:F0} %" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1427 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1347 #, csharp-format msgid "{0:F4} p/s/m^2" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1429 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1349 #, csharp-format msgid "{0:F1},{1:F1} m/s" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1440 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1360 #, csharp-format msgid "{0:F0}% ({1})" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1441 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1361 #, csharp-format msgid "" "{0:F0} FPS (50th/95th/99th percentiles {1:F1} / {2:F1} / {3:F1} ms, DirectX " "feature level >= {4})" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1442 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1362 #, csharp-format msgid "" "{3}, {4}, {5}, {6} ({7:F0} kB/frame allocated, {0:F0}/{1:F0}/{2:F0} GCs)" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1443 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1363 #, csharp-format msgid "" "{0:F0} MB private, {1:F0} MB working set, {2:F0} MB private working set, " "{3:F0} MB managed, {4:F0} MB virtual" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1444 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1364 #, csharp-format msgid "{0:F0} MB committed, {1:F0} MB dedicated, {2:F0} MB shared" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1445 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1365 #, csharp-format msgid "{0} ({1:F0} MB)" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1448 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1368 #, csharp-format msgid "{0}/{1}" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1449 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1369 #, csharp-format msgid "({0}x{0})" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1452 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1455 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1372 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1375 #, csharp-format msgid "{0:F0}" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1456 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1457 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1458 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1459 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1460 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1376 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1377 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1378 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1379 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1380 #, csharp-format msgid "{0:F0}% ({1:F0}% {2})" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1440 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:1360 #, csharp-format msgid "{0} logical processor" msgid_plural "{0} logical processors" @@ -1889,57 +2232,57 @@ msgstr[0] "{0} logikai processzor" msgstr[1] "{0} logikai processzor" #. Context: Cab -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:640 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:668 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:550 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:578 msgctxt "Cab" msgid "R" msgstr "H" #. Context: Cab -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:640 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:668 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:550 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:578 msgctxt "Cab" msgid "F" msgstr "E" #. Context: Cab -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:668 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:578 msgctxt "Cab" msgid "D" msgstr "V" #. Context: Steam -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:706 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:616 msgctxt "Steam" msgid "Reverser" msgstr "Vezérmű" #. Context: NonSteam -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:706 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:616 msgctxt "NonSteam" msgid "Reverser" msgstr "Irányváltó" #. Context: Pantograph -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:776 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:686 msgctxt "Pantograph" msgid "Panto" msgstr "Áramsz" #. Context: Engine -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:777 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:687 msgctxt "Engine" msgid "Eng" msgstr "Motor" #. Context: CircuitBreaker -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:778 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:688 msgctxt "CircuitBreaker" msgid "CB" msgstr "FőMegsz" #. Context: TractionCutOffRelay -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:779 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:689 msgctxt "TractionCutOffRelay" msgid "TCOR" msgstr "VontTiltóR" @@ -2034,12 +2377,12 @@ msgstr "Elegy cseréje az elöl lévő vonattal" msgid "Activity completed." msgstr "Szolgálat teljesítve." -#: ../../RunActivity/Viewer3D/Popups/NoticeWindow.cs:96 +#: ../../RunActivity/Viewer3D/Popups/NoticeWindow.cs:97 #, csharp-format msgid "Odometer {0}" msgstr "Útmérő {0}" -#: ../../RunActivity/Viewer3D/Popups/NoticeWindow.cs:110 +#: ../../RunActivity/Viewer3D/Popups/NoticeWindow.cs:113 #, csharp-format msgid "FOV: {0:F0}°" msgstr "Látószög: {0:F0}°" @@ -2127,11 +2470,6 @@ msgstr "Megengedett:" msgid " Milepost Limit Dist" msgstr "Szelvény Lassúmenet Táv" -#: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:135 -#: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:74 -msgid "Flow" -msgstr "Fogyaszt." - #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:135 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:74 msgid "FLOW" @@ -2143,9 +2481,9 @@ msgid "Fuel" msgstr "Üzemanyag" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:136 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:133 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:134 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:75 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:97 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:98 msgid "FUEL" msgstr "" @@ -2162,8 +2500,8 @@ msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:138 #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:239 #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:615 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:137 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1105 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:138 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1157 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:77 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:197 msgid "Loco Groups" @@ -2171,7 +2509,7 @@ msgstr "Gépcsoport" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:138 #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:239 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:137 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:138 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:77 msgid "GRUP" msgstr "" @@ -2187,9 +2525,9 @@ msgid "OIL" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:140 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:140 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:142 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:79 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:103 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:104 msgid "POWR" msgstr "" @@ -2209,17 +2547,17 @@ msgid "RPM" msgstr "ford/perc" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:143 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:144 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:146 #: ../../RunActivity/Viewer3D/WebServices/TrackMonitorDisplay.cs:332 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:82 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:107 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:108 msgid "Reverser" msgstr "Irányváltó" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:143 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:144 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:146 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:82 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:107 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:108 msgid "REVR" msgstr "" @@ -2239,16 +2577,16 @@ msgid "TEMP" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:146 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:148 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:151 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:85 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:111 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:112 msgid "THRO" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDPUWindow.cs:147 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:149 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:152 #: ../../RunActivity/Viewer3D/WebServices/TrainDpuDisplay.cs:86 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:112 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:113 msgid "TIME" msgstr "" @@ -2302,601 +2640,652 @@ msgid "BP" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:52 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:805 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:820 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:829 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:365 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:380 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:389 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:810 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:825 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:834 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:366 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:381 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:390 msgid "EQ" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:53 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:830 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:831 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:843 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:844 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:862 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:863 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:835 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:836 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:859 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:860 msgid "V" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:116 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1163 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:81 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:686 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1215 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:82 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:687 msgid "AI Fireman" msgstr "Autofűtő" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:116 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:81 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:82 msgid "AIFR" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:117 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:82 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:83 msgid "AUTO" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:118 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:83 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:84 msgid "Battery switch" msgstr "Akkumulátorkapcsoló" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:118 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:83 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:84 msgid "BATT" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:119 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:990 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1008 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:84 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:537 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:555 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1014 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1032 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:85 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:538 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:556 msgid "Boiler pressure" msgstr "Kazánnyomás" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:119 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:84 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:85 msgid "PRES" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:120 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:85 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:86 msgid "Boiler water glass" msgstr "Kazán vízszintfigyelő" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:120 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:85 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:86 msgid "WATR" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:121 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:86 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:87 msgid "Boiler water level" msgstr "Kazánvízszint" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:121 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:86 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:87 msgid "LEVL" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:122 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:87 -msgid "Circuit breaker" -msgstr "Főmegszakító" +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1117 +#, fuzzy +#| msgid "Status" +msgid "CCStatus" +msgstr "Állapot" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:122 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:87 -msgid "CIRC" +msgid "CCST" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:123 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:765 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:88 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:325 -msgid "Cylinder cocks" -msgstr "Hengercsapok" +msgid "Circuit breaker" +msgstr "Főmegszakító" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:123 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:88 -msgid "CCOK" +msgid "CIRC" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:124 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:770 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:89 -msgid "DIRC" +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:326 +msgid "Cylinder cocks" +msgstr "Hengercsapok" + +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:124 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:89 +msgid "CCOK" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:125 -msgid "DRLC" +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:90 +msgid "DIRC" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:126 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:90 -msgid "DOOR" +msgid "DRLC" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:127 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:91 -msgid "BDYN" +msgid "DOOR" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:128 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:92 +msgid "BDYN" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:129 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:93 msgid "Electric train supply" msgstr "Villamos fűtés" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:128 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:92 -msgid "TSUP" -msgstr "" - #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:129 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:93 -msgid "BLOC" +msgid "TSUP" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:130 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1066 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:94 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:614 -msgid "Engine" -msgstr "Gép" - -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:130 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:94 -msgid "ENGN" +msgid "BLOC" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:131 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1090 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:95 -msgid "Fire mass" -msgstr "Tűztömeg" +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:615 +msgid "Engine" +msgstr "Gép" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:131 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:95 -msgid "FIRE" +msgid "ENGN" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:132 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:96 -msgid "Fixed gear" -msgstr "Rögzített seb.fokozat" +msgid "Fire mass" +msgstr "Tűztömeg" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:132 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:134 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:96 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:98 -msgid "GEAR" +msgid "FIRE" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:133 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1013 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:97 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:560 -msgid "Fuel levels" -msgstr "Készletszintek" +msgid "Fixed gear" +msgstr "Rögzített seb.fokozat" + +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:133 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:135 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:97 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:99 +msgid "GEAR" +msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:134 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1021 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1037 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:98 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:568 -msgid "Gear" -msgstr "Seb.fokozat" +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:561 +msgid "Fuel levels" +msgstr "Készletszintek" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:135 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1045 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:99 -msgid "GRAD" -msgstr "" +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:569 +msgid "Gear" +msgstr "Seb.fokozat" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:136 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1180 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1194 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:100 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:703 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:717 +msgid "GRAD" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:137 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1232 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1246 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:101 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:704 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:718 msgid "Grate limit" msgstr "Rostély korlát" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:136 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:100 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:137 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:101 msgid "GRAT" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:138 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:101 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:139 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:102 msgid "Master key" msgstr "Mesterkulcs" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:138 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:101 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:139 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:102 msgid "MAST" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:139 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1045 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:102 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:592 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:140 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1132 +msgid "MaxAccel" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:140 +msgid "MACC" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:141 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1069 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:103 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:593 msgid "Pantographs" msgstr "Áramszedők" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:139 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:102 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:141 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:103 msgid "PANT" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:141 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:104 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:143 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:105 msgid "REGL" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:142 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:105 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:144 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:106 msgid "RPLY" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:143 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:106 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:145 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:107 msgid "RETN" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:145 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:779 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:789 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:108 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:339 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:349 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:147 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:784 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:794 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:109 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:340 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:350 msgid "Sander" msgstr "Homokoló" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:145 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:108 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:147 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:109 msgid "SAND" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:146 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:109 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:148 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:110 msgid "SPED" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:147 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:110 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:149 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:111 msgid "Steam usage" msgstr "Gőzfelhasználás" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:147 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:110 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:149 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:111 msgid "STEM" msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:150 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:113 -msgid "Traction cut-off relay" -msgstr "Vontatástiltó relé" +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1125 +msgid "Target" +msgstr "" #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:150 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:113 -msgid "TRAC" +msgid "TARG" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:151 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:153 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:114 -msgid "BTRN" +msgid "Traction cut-off relay" +msgstr "Vontatástiltó relé" + +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:153 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:114 +msgid "TRAC" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:152 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1213 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1221 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1229 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1243 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:154 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:115 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:735 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:743 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:751 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:765 +msgid "BTRN" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:155 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1265 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1273 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1281 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1295 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:116 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:736 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:744 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:752 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:766 msgid "Wheel" msgstr "Tengely" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:152 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:115 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:155 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:116 msgid "WHEL" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:157 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:120 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:160 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:121 msgid "(absolute)" msgstr "(abszolút)" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:157 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:120 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:160 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:121 msgid "(Abs.)" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:158 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:121 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:161 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:122 msgid "apply Service" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:158 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:121 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:161 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:122 msgid "Apply" msgstr "Működtetés" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:159 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:122 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:162 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:123 msgid "Apply Quick" msgstr "Gyorsműködtetés" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:159 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:122 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:162 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:123 msgid "ApplQ" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:160 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:123 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:163 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:124 msgid "Apply Slow" msgstr "Lassú működtetés" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:160 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:123 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:163 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:124 msgid "ApplS" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:161 -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:411 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:124 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:164 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:449 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:125 msgid "coal" msgstr "szén" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:161 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:124 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:164 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:125 msgid "c" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:162 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:165 msgid "Cont. Service" msgstr "Folyamatos üzem" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:162 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:165 msgid "Serv" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:163 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:125 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:166 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:126 msgid "Emergency Braking Push Button" msgstr "Vészfék ütőgomb" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:163 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:125 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:166 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:126 msgid "EmerBPB" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:164 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:126 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:167 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:127 msgid "Lap Self" msgstr "Fokozatos fékezés" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:164 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:126 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:167 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:127 msgid "LapS" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:165 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:127 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:168 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:128 msgid "Minimum Reduction" msgstr "Elsőfokozati nyomáscsökkentés" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:165 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:127 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:168 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:128 msgid "MRedc" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:166 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:128 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:169 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:129 msgid "(safe range)" msgstr "(biztonságos)" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:166 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:128 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:169 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:129 msgid "(safe)" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:167 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1230 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:129 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:752 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:170 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1282 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:130 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:753 msgid "skid" msgstr "csúszás" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:167 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:129 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:170 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:130 msgid "Skid" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:168 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1222 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:130 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:744 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:171 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1274 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:131 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:745 msgid "slip warning" msgstr "kerékmegperdülési figyelmeztetés" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:168 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1295 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:130 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:171 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1347 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:131 msgid "Warning" msgstr "Figyelmeztetés" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:169 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1214 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:131 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:736 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:172 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1266 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:132 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:737 msgid "slip" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:169 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:131 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:172 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:132 msgid "Slip" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:170 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:173 msgid "Vac. Cont. Service" msgstr "Vákuum folyamatos üzem" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:170 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:173 msgid "Vac.Serv" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:171 -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:410 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:132 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:174 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:448 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:133 msgid "water" msgstr "víz" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:171 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:132 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:174 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:133 msgid "w" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:219 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:222 msgid "Train Driving Info" msgstr "Vonatvezetési infó" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:631 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:634 msgid "bar" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:632 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:635 msgid "inHg" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:633 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:636 msgid "kgf/cm²" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:634 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:637 msgid "kPa" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:635 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:638 msgid "psi" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:636 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:639 +msgid "cfm" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:640 +msgid "L/s" +msgstr "" + +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:641 msgid "lib./pal." msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:637 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:642 msgid "pal.rtuti" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:755 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:315 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:760 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:316 +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:447 msgid "Open" msgstr "Nyitva" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:760 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1346 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:320 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:801 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:765 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1400 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:321 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:804 +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:452 msgid "Closed" msgstr "Zárva" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:780 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:340 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:785 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:341 msgid "Blocked" msgstr "Tiltva" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:780 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1127 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1164 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:340 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:650 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:687 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:785 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1179 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1216 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:341 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:651 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:688 +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:126 +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:216 +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:238 +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:261 +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:395 msgid "On" msgstr "Be" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:790 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:976 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1127 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1164 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:350 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:523 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:650 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:687 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:795 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1000 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1179 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1216 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:351 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:524 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:651 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:688 +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:108 +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:126 +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:221 +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:243 +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:266 +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:395 +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:408 msgid "Off" msgstr "Ki" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:833 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:846 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:865 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:909 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:911 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:918 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:936 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:943 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:390 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:399 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:414 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:457 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:459 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:466 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:484 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:491 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:838 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:862 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:933 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:935 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:942 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:960 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:967 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:391 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:400 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:415 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:458 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:460 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:467 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:485 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:492 msgid "BC" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:840 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:842 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:848 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:853 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:885 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:887 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:893 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1093 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:396 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:398 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:400 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:405 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:433 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:435 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:441 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:850 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:852 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:874 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:875 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:886 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:888 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:890 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:909 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:911 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:917 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1145 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:397 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:399 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:401 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:406 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:434 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:436 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:442 msgid "EOT" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:874 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:876 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:877 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:884 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:422 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:424 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:898 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:900 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:901 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:908 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:423 #: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:425 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:432 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:426 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:433 msgid "Lead" msgstr "" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:967 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:515 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:991 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:516 msgid "Setup" msgstr "Beállítás" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1051 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:598 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1075 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:599 msgid "Up" msgstr "Fel" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1164 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:687 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1216 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:688 msgid "Reset" msgstr "Alaphelyzet" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1181 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:704 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1233 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:705 msgid "Exceeded" msgstr "Túllépte" -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1287 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1339 msgid "Derailed" msgstr "Kisiklott" @@ -2987,138 +3376,138 @@ msgstr "" "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890 \",.-+|!$%&/" "()=?;:'_[]ÁÍŰŐÜÖÚÓÉáíűőüöúóé" -#: ../../RunActivity/Viewer3D/Processes/GameStateRunActivity.cs:367 +#: ../../RunActivity/Viewer3D/Processes/GameStateRunActivity.cs:379 msgid "Game save is not allowed during container load/unload" msgstr "Játékmentés nem lehetséges konténerrakodás közben" -#: ../../RunActivity/Viewer3D/Processes/GameStateRunActivity.cs:1257 +#: ../../RunActivity/Viewer3D/Processes/GameStateRunActivity.cs:1270 #, csharp-format msgid "Activity Save file '*.save' not found in folder {0}" msgstr "A {0} könyvtár nem tartalmaz '*.save' mentést" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:406 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:444 msgid "freight-grain" msgstr "szemestermény" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:407 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:445 msgid "freight-coal" msgstr "szén" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:408 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:446 msgid "freight-gravel" msgstr "kavics" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:409 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:447 msgid "freight-sand" msgstr "homok" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:412 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:450 msgid "diesel oil" msgstr "dízelolaj" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:413 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:451 msgid "wood" msgstr "fa" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:414 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:452 msgid "sand" msgstr "homok" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:415 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:453 msgid "freight-general" msgstr "vegyesteher" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:416 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:454 msgid "freight-livestock" msgstr "élőállat" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:417 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:455 msgid "freight-fuel" msgstr "olaj" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:418 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:456 msgid "freight-milk" msgstr "tej" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:419 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:457 msgid "mail" msgstr "posta" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:420 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:458 msgid "container" msgstr "konténer" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:568 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:606 msgid "Refill: Immediate refill process selected, refilling immediately." msgstr "Feltöltés: Azonnali feltöltés aktiválva." -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:589 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:627 msgid "Refill: Electric loco and no pickup. Command rejected" msgstr "Feltöltés: Villanymozdony üzemanyag nélkül. Parancs visszautasítva" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:749 -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:768 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:787 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:806 msgid "Incompatible pickup type" msgstr "Nem megfelelő üzemanyag" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:755 -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:773 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:793 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:811 msgid "Starting refill" msgstr "A feltöltés megkezdődött" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:599 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:637 #, csharp-format msgid "Container crane: Distance to {0} supply is {1}." msgstr "Konténerdaru: Távolság a {0}ig {1}." -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:610 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:648 #, csharp-format msgid "Refill: Distance to {0} supply is {1}." msgstr "Feltöltés: A {0} töltőhelyétől való távolság {1}." -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:620 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:658 #, csharp-format msgid "Refill: Loco must be stationary to refill {0}." msgstr "" "Feltöltés: A mozdonynak álló helyzetben kell lennie a {0} feltöltéséhez." -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:626 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:664 #, csharp-format msgid "Refill: Loco speed must exceed {0}." msgstr "Feltöltés: A mozdony sebességének magasabbnak kell lennie {0}-nál." -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:633 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:671 #, csharp-format msgid "Refill: Loco speed must not exceed {0}." msgstr "Feltöltés: A mozdony sebessége nem lehet több {0}-nál." -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:651 -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:672 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:689 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:710 #, csharp-format msgid "Refill: {0} supply now replenished." msgstr "Feltöltés: A {0} feltöltve a vételezési helyen." -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:678 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:716 #, csharp-format msgid "Unload: {0} fuel or freight now unloaded." msgstr "Lerakodás: {0} áru kirakodva." -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:696 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:734 msgid "wag file not equipped for containers" msgstr "A wag fájl nincs felkészítve konténerekre" -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:701 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:739 #, csharp-format msgid "{0} now loaded." msgstr "{0} felrakodva." -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:707 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:745 #, csharp-format msgid "{0} now unloaded." msgstr "{0} lerakodva." -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:600 -#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:611 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:638 +#: ../../RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs:649 #, csharp-format msgid "{0} meter" msgid_plural "{0} meters" @@ -3179,6 +3568,371 @@ msgstr "Mérföldkő" msgid "Dist" msgstr "Táv" +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:168 +#, fuzzy +#| msgid "Switch Ahead" +msgctxt "SwitchPanel" +msgid "Switch Ahead" +msgstr "Vágányútállítás a vonat előtt" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:171 +#, fuzzy +#| msgid "Switch Behind" +msgctxt "SwitchPanel" +msgid "Switch Behind" +msgstr "Vágányútállítás a vonat mögött" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:174 +#, fuzzy +#| msgctxt "Cab" +#| msgid "change" +msgctxt "SwitchPanel" +msgid "Change Cab" +msgstr "váltás megtörtént" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:177 +#, fuzzy +#| msgid "Max" +msgctxt "SwitchPanel" +msgid "Map" +msgstr "Max" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:180 +#, fuzzy +#| msgid "Switch Ahead" +msgctxt "SwitchPanel" +msgid "Switch Manual" +msgstr "Vágányútállítás a vonat előtt" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:183 +msgctxt "SwitchPanel" +msgid "Clear Signal Forward" +msgstr "" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:186 +#, fuzzy +#| msgid "Autopilot" +msgctxt "SwitchPanel" +msgid "Autopilot" +msgstr "Robotpilóta" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:189 +#, fuzzy +#| msgid "Track Monitor" +msgctxt "SwitchPanel" +msgid "Track Monitor" +msgstr "Pályafigyelő" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:192 +msgctxt "SwitchPanel" +msgid "HUD" +msgstr "" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:195 +#, fuzzy +#| msgid "Train Driving Info" +msgctxt "SwitchPanel" +msgid "Train Driving" +msgstr "Vonatvezetési infó" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:198 +#, fuzzy +#| msgid "Switch" +msgctxt "SwitchPanel" +msgid "Switch" +msgstr "Váltó" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:201 +#, fuzzy +#| msgid "Train Operations" +msgctxt "SwitchPanel" +msgid "Train Operations" +msgstr "Vonatvizsgálat" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:204 +#, fuzzy +#| msgid "Train Dpu Info" +msgctxt "SwitchPanel" +msgid "Train Dpu" +msgstr "Gépcsoport infó" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:207 +#, fuzzy +#| msgid "Next Station" +msgctxt "SwitchPanel" +msgid "Next Station" +msgstr "Menetrend" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:210 +#, fuzzy +#| msgid "Train List" +msgctxt "SwitchPanel" +msgid "Train List" +msgstr "Vonatok listája" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:213 +#, fuzzy +#| msgid "EOT List" +msgctxt "SwitchPanel" +msgid "EOT List" +msgstr "Vonatvégvezérlők" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:216 +#, fuzzy +#| msgid "Direction" +msgctxt "SwitchPanel" +msgid "Direction" +msgstr "Irány" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:219 +#, fuzzy +#| msgid "Gear" +msgctxt "SwitchPanel" +msgid "Gear" +msgstr "Seb.fokozat" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:222 +#, fuzzy +#| msgid "Handbrake" +msgctxt "SwitchPanel" +msgid "Handbrake" +msgstr "Kézifék" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:225 +#, fuzzy +#| msgid "Brake Hose" +msgctxt "SwitchPanel" +msgid "Brake hose" +msgstr "Légvezetékek" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:228 +#, fuzzy +#| msgid "Alerter" +msgctxt "SwitchPanel" +msgid "Alerter" +msgstr "Éberségjelzés" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:231 +#, fuzzy +#| msgid "Emergency" +msgctxt "SwitchPanel" +msgid "Emergency" +msgstr "Gyorsfék" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:234 +#, fuzzy +#| msgid "Sander" +msgctxt "SwitchPanel" +msgid "Sander" +msgstr "Homokoló" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:237 +#, fuzzy +#| msgid "Wipers" +msgctxt "SwitchPanel" +msgid "Wiper" +msgstr "Ablaktörlő" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:240 +#, fuzzy +#| msgid "Doors Left" +msgctxt "SwitchPanel" +msgid "Door Left" +msgstr "Baloldali ajtók" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:243 +#, fuzzy +#| msgid "Doors Right" +msgctxt "SwitchPanel" +msgid "Door Right" +msgstr "Jobboldali ajtók" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:246 +#, fuzzy +#| msgid "Right" +msgctxt "SwitchPanel" +msgid "Light" +msgstr "Jobb" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:249 +#, fuzzy +#| msgid "Pantograph 1" +msgctxt "SwitchPanel" +msgid "Pantograph 1" +msgstr "1-es áramszedő" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:252 +#, fuzzy +#| msgid "Pantograph 2" +msgctxt "SwitchPanel" +msgid "Pantograph 2" +msgstr "2-es áramszedő" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:255 +#, fuzzy +#| msgid "Battery switch" +msgctxt "SwitchPanel" +msgid "Battery Switch" +msgstr "Akkumulátorkapcsoló" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:258 +#, fuzzy +#| msgid "Master key" +msgctxt "SwitchPanel" +msgid "Master Key" +msgstr "Mesterkulcs" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:261 +#, fuzzy +#| msgid "Circuit breaker" +msgctxt "SwitchPanel" +msgid "Circuit Breaker" +msgstr "Főmegszakító" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:264 +#, fuzzy +#| msgid "Traction cut-off relay" +msgctxt "SwitchPanel" +msgid "Traction Cut-Off" +msgstr "Vontatástiltó relé" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:267 +#, fuzzy +#| msgid "Player" +msgctxt "SwitchPanel" +msgid "Diesel Player" +msgstr "Játékos" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:270 +#, fuzzy +#| msgid "Helper" +msgctxt "SwitchPanel" +msgid "Diesel Helper" +msgstr "Segéd" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:273 +#, fuzzy +#| msgid "Freight" +msgctxt "SwitchPanel" +msgid "Front light" +msgstr "Teher" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:276 +#, fuzzy +#| msgid "CylCock" +msgctxt "SwitchPanel" +msgid "Cyl Cocks" +msgstr "HCsap" + +#. Context: SwitchPanel +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs:279 +#, fuzzy +#| msgid "Retainers" +msgctxt "SwitchPanel" +msgid "Retainers" +msgstr "Visszatartó szelepek" + +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:111 +#, fuzzy +#| msgid "dim" +msgid "Dim" +msgstr "tompított" + +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:115 +#, fuzzy +#| msgid "bright" +msgid "Bright" +msgstr "távolsági" + +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:231 +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:254 +msgid "Always On" +msgstr "" + +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:281 +#, fuzzy +#| msgid "Auto Switch" +msgid "Automatic" +msgstr "Auto váltás" + +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:310 +msgid "Always on" +msgstr "" + +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:401 +msgid "Full" +msgstr "" + +#: ../../RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs:435 +#, fuzzy +#| msgid "connected" +msgid "Connected" +msgstr "csatl." + +#~ msgid "Confirmations visible" +#~ msgstr "Visszajelzések láthatóak" + +#~ msgid "Toggle Handbrake" +#~ msgstr "Kézifék átállítása" + +#~ msgid "Toggle Power" +#~ msgstr "Gép indítása/leállítása" + +#~ msgid "Toggle Battery Switch" +#~ msgstr "Akkumulátor ki-/bekapcsolása" + +#~ msgid "Toggle Electric Train Supply Connection" +#~ msgstr "Elektromos betáp csatlakoztatása" + +#~ msgid "Toggle Brake Hose Connection" +#~ msgstr "Féktömlő (szét)csatolása" + +#~ msgid "Wag Adhesion" +#~ msgstr "Vagon tapadása" + +#~ msgid "Tang. Force" +#~ msgstr "Kerületi erő" + +#~ msgid "Static Force" +#~ msgstr "Statikus erő" + #~ msgid "Solver" #~ msgstr "Számítóképlet" @@ -3233,9 +3987,6 @@ msgstr "Táv" #~ msgid "EPApply" #~ msgstr "EP alkalmazása" -#~ msgid "Emergency" -#~ msgstr "Gyorsfék" - #~ msgid "Lap" #~ msgstr "Fékhatárolás" @@ -3293,12 +4044,6 @@ msgstr "Táv" #~ msgid "Dispatcher does not allow hand throw at this time" #~ msgstr "A forgalomirányító nem engedi a váltó kézi állítását pillanatnyilag" -#~ msgid "main route" -#~ msgstr "fővágány" - -#~ msgid "side route" -#~ msgstr "mellékvágány" - #~ msgid "You are the new dispatcher. Enjoy!" #~ msgstr "Te vagy az új forgalomirányító. Élvezd!" @@ -3326,9 +4071,6 @@ msgstr "Táv" #~ msgstr "" #~ "Mostantól alirányító vagy, képes leszel kezelni a váltókat és jelzőket." -#~ msgid "You are no longer an assistant." -#~ msgstr "Nem vagy többé alirányító" - #~ msgid "Switched, current route is {0}" #~ msgstr "Átváltva, a beállított vágány a {0}" @@ -3413,18 +4155,12 @@ msgstr "Táv" #~ msgid "warning" #~ msgstr "figyelmeztetőjel" -#~ msgid "Pantograph 1" -#~ msgstr "1-es áramszedő" - #~ msgid "lower" #~ msgstr "le" #~ msgid "raise" #~ msgstr "fel" -#~ msgid "Pantograph 2" -#~ msgstr "2-es áramszedő" - #~ msgid "Player Diesel Power" #~ msgstr "Vonógép dízelmotor" @@ -3524,9 +4260,6 @@ msgstr "Táv" #~ msgid "cannot initialize. Stop train then re-try." #~ msgstr "nem üzembehelyezhetők. Előbb állítsd meg a vonatot." -#~ msgid "Handbrake" -#~ msgstr "Kézifék" - #~ msgid "none" #~ msgstr "ki" @@ -3536,12 +4269,6 @@ msgstr "Táv" #~ msgid "Slow Direct" #~ msgstr "Elnyújtott kiömlés" -#~ msgid "Brake Hose" -#~ msgstr "Légvezetékek" - -#~ msgid "Alerter" -#~ msgstr "Éberségjelzés" - #~ msgid "Horn" #~ msgstr "Kürt" @@ -3560,18 +4287,9 @@ msgstr "Táv" #~ msgid "Headlight" #~ msgstr "Homlokfény" -#~ msgid "dim" -#~ msgstr "tompított" - -#~ msgid "bright" -#~ msgstr "távolsági" - #~ msgid "Cab Light" #~ msgstr "Vezérállás világítása" -#~ msgid "Wipers" -#~ msgstr "Ablaktörlő" - #~ msgid "changing is not available" #~ msgstr "váltás nem lehetséges" @@ -3585,12 +4303,6 @@ msgstr "Táv" #~ msgid "Odometer" #~ msgstr "Útmérő" -#~ msgid "Doors Left" -#~ msgstr "Baloldali ajtók" - -#~ msgid "Doors Right" -#~ msgstr "Jobboldali ajtók" - #~ msgid "Mirror" #~ msgstr "Tükrök" @@ -3600,16 +4312,10 @@ msgstr "Táv" #~ msgid "extend" #~ msgstr "kihajtás" -#~ msgid "Switch Ahead" -#~ msgstr "Vágányútállítás a vonat előtt" - #~ msgid "locked. Use Control+M to change signals to manual mode then re-try." #~ msgstr "" #~ "letiltva. Előbb nyomj -et a kézi forgalomirányításra váltáshoz." -#~ msgid "Switch Behind" -#~ msgstr "Vágányútállítás a vonat mögött" - #~ msgid "Uncouple After" #~ msgstr "Szétcsatolás hátul" @@ -3686,10 +4392,6 @@ msgstr "Táv" #~ msgid "sound" #~ msgstr "meszólaltatás" -#~ msgctxt "Cab" -#~ msgid "change" -#~ msgstr "váltás megtörtént" - #~ msgctxt "Odometer" #~ msgid "reset" #~ msgstr "nullázva" @@ -3927,9 +4629,6 @@ msgstr "Táv" #~ msgid "Steam Usage" #~ msgstr "Gőzfelhasználás" -#~ msgid "Usage:" -#~ msgstr "Felhaszn:" - #~ msgid "Cyl" #~ msgstr "Henger" @@ -3939,9 +4638,6 @@ msgstr "Táv" #~ msgid "SafetyV" #~ msgstr "BiztSz" -#~ msgid "CylCock" -#~ msgstr "HCsap" - #~ msgid "Genertr" #~ msgstr "Genertr" @@ -4169,10 +4865,6 @@ msgstr "Táv" #~ msgid "Oil" #~ msgstr "Olaj" -#~ msgctxt "Engine" -#~ msgid "Stopped" -#~ msgstr "Leállítva" - #~ msgctxt "Engine" #~ msgid "Starting" #~ msgstr "Indul" @@ -4188,12 +4880,6 @@ msgstr "Táv" #~ msgid "Held for connecting train : " #~ msgstr "Várakoztatás csatlakozó vonat miatt: " -#~ msgid "Left" -#~ msgstr "Bal" - -#~ msgid "Right" -#~ msgstr "Jobb" - #~ msgid "Compound locomotive" #~ msgstr "Kompaund mozdony" diff --git a/Source/Locales/Updater/Updater.pot b/Source/Locales/Updater/Updater.pot index d30dabe9bc..ff0d5af861 100644 --- a/Source/Locales/Updater/Updater.pot +++ b/Source/Locales/Updater/Updater.pot @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2023-02-21 17:54:21+0300\n" -"PO-Revision-Date: 2023-02-21 17:54:21+0300\n" +"POT-Creation-Date: 2023-10-24 12:50:33+0200\n" +"PO-Revision-Date: 2023-10-24 12:50:33+0200\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" diff --git a/Source/RunActivity/Viewer3D/Map/MapForm.Designer.cs b/Source/RunActivity/Viewer3D/Map/MapForm.Designer.cs index c67fcc1463..b0c29fcc4a 100644 --- a/Source/RunActivity/Viewer3D/Map/MapForm.Designer.cs +++ b/Source/RunActivity/Viewer3D/Map/MapForm.Designer.cs @@ -29,11 +29,11 @@ protected override void Dispose(bool disposing) private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.Windows.Forms.ListViewItem listViewItem1 = new System.Windows.Forms.ListViewItem(new string[] { + System.Windows.Forms.ListViewItem listViewItem17 = new System.Windows.Forms.ListViewItem(new string[] { "Player1 (you)"}, -1, System.Drawing.Color.Empty, System.Drawing.Color.Empty, new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)))); - System.Windows.Forms.ListViewItem listViewItem2 = new System.Windows.Forms.ListViewItem("Player2"); - System.Windows.Forms.ListViewItem listViewItem3 = new System.Windows.Forms.ListViewItem("Player3"); - System.Windows.Forms.ListViewItem listViewItem4 = new System.Windows.Forms.ListViewItem("..."); + System.Windows.Forms.ListViewItem listViewItem18 = new System.Windows.Forms.ListViewItem("Player2"); + System.Windows.Forms.ListViewItem listViewItem19 = new System.Windows.Forms.ListViewItem("Player3"); + System.Windows.Forms.ListViewItem listViewItem20 = new System.Windows.Forms.ListViewItem("..."); this.playerRolePanel = new System.Windows.Forms.Panel(); this.playerRoleLink = new System.Windows.Forms.LinkLabel(); this.playerRoleExplanation = new System.Windows.Forms.Label(); @@ -149,10 +149,10 @@ private void InitializeComponent() // playerRoleLink // this.playerRoleLink.ActiveLinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(79)))), ((int)(((byte)(114))))); - this.playerRoleLink.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.playerRoleLink.Anchor = System.Windows.Forms.AnchorStyles.Right; this.playerRoleLink.AutoSize = true; this.playerRoleLink.LinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(116)))), ((int)(((byte)(166))))); - this.playerRoleLink.Location = new System.Drawing.Point(717, 9); + this.playerRoleLink.Location = new System.Drawing.Point(714, 9); this.playerRoleLink.Name = "playerRoleLink"; this.playerRoleLink.Size = new System.Drawing.Size(60, 13); this.playerRoleLink.TabIndex = 1; @@ -253,6 +253,7 @@ private void InitializeComponent() // messageAllButton // this.messageAllButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.messageAllButton.AutoEllipsis = true; this.messageAllButton.Location = new System.Drawing.Point(421, 128); this.messageAllButton.Margin = new System.Windows.Forms.Padding(0); this.messageAllButton.Name = "messageAllButton"; @@ -736,6 +737,7 @@ private void InitializeComponent() // // drawPathCheckbox // + this.drawPathCheckbox.AutoEllipsis = true; this.drawPathCheckbox.AutoSize = true; this.drawPathCheckbox.Checked = true; this.drawPathCheckbox.CheckState = System.Windows.Forms.CheckState.Checked; @@ -782,10 +784,10 @@ private void InitializeComponent() this.playersView.HideSelection = false; this.playersView.HoverSelection = true; this.playersView.Items.AddRange(new System.Windows.Forms.ListViewItem[] { - listViewItem1, - listViewItem2, - listViewItem3, - listViewItem4}); + listViewItem17, + listViewItem18, + listViewItem19, + listViewItem20}); this.playersView.Location = new System.Drawing.Point(7, 19); this.playersView.Name = "playersView"; this.playersView.Size = new System.Drawing.Size(167, 202); diff --git a/Source/RunActivity/Viewer3D/Map/MapForm.cs b/Source/RunActivity/Viewer3D/Map/MapForm.cs index 8d80f15f33..6c0bc129fd 100644 --- a/Source/RunActivity/Viewer3D/Map/MapForm.cs +++ b/Source/RunActivity/Viewer3D/Map/MapForm.cs @@ -277,10 +277,7 @@ public void CheckPlayers() var players = MPManager.OnlineTrains.Players; var username = MPManager.GetUserName(); players = players.Concat(MPManager.Instance().lostPlayer).ToDictionary(x => x.Key, x => x.Value); - Trace.TraceInformation("Players: {0}", players); - Trace.TraceInformation("DP: {0}; AP: {1}", MPManager.Instance().lostPlayer.Count, MPManager.Instance().aiderList.Count); if (playersView.Items.Count == players.Count + 1 && DisconnectedPlayersCount == MPManager.Instance().lostPlayer.Count && AssistantPlayersCount == MPManager.Instance().aiderList.Count) return; - Trace.TraceInformation("Entered function!"); DisconnectedPlayersCount = MPManager.Instance().lostPlayer.Count; AssistantPlayersCount = MPManager.Instance().aiderList.Count; @@ -292,31 +289,29 @@ public void CheckPlayers() { if (PlayersList.Contains(p.Key)) continue; AddPlayer(p.Key); - Trace.TraceInformation("Added player: {0}", p.Key); } playersView.Items.Clear(); - Console.Beep(); foreach (var p in PlayersList) { ListViewItem item = new ListViewItem(p); if (p == username) { - item.Text += " [You]"; + item.Text += " [" + Viewer.Catalog.GetString("You") + "]"; item.Font = new Font(item.Font, FontStyle.Bold); playersView.Items.Add(item); } else if (MPManager.Instance().aiderList.Contains(p)) { - item.Text += " [Helper]"; + item.Text += " [" + Viewer.Catalog.GetString("Helper") + "]"; item.ForeColor = Color.FromArgb(40, 116, 166); playersView.Items.Add(item); } else if (MPManager.Instance().lostPlayer.ContainsKey(p)) { - item.Text += " [Disconnected]"; + item.Text += " [" + Viewer.Catalog.GetString("Disconnected") + "]"; item.ForeColor = SystemColors.GrayText; playersView.Items.Add(item); } @@ -1744,7 +1739,7 @@ private void playersView_MouseClick(object sender, MouseEventArgs e) if (focusedItem.Bounds.Contains(e.Location) && player != MPManager.GetUserName()) { - makeThisPlayerAnAssistantToolStripMenuItem.Text = MPManager.Instance().aiderList.Contains(player) ? "Demote this player" : "Make this player an assistant"; + makeThisPlayerAnAssistantToolStripMenuItem.Text = MPManager.Instance().aiderList.Contains(player) ? Viewer.Catalog.GetString("Demote this player") : Viewer.Catalog.GetString("Make this player an assistant"); var isDisconnected = MPManager.Instance().lostPlayer.ContainsKey(player); makeThisPlayerAnAssistantToolStripMenuItem.Enabled = !isDisconnected; jumpToThisPlayerInGameToolStripMenuItem.Enabled = !isDisconnected; @@ -1995,7 +1990,7 @@ private void messageActionsMenu_ItemClicked(object sender, ToolStripItemClickedE } users1 += "0END"; } - else { return;} + else { return; } MPManager.Notify(new MSGText(MPManager.GetUserName(), users1, message1).ToString()); break; diff --git a/Source/RunActivity/Viewer3D/Weather.cs b/Source/RunActivity/Viewer3D/Weather.cs index 710281c4f0..293350a7d8 100644 --- a/Source/RunActivity/Viewer3D/Weather.cs +++ b/Source/RunActivity/Viewer3D/Weather.cs @@ -489,12 +489,12 @@ public virtual void Update(ElapsedTime elapsedTime) if (UserInput.IsPressed(UserCommand.DebugDaylightOffsetIncrease) && Weather.DaylightOffset < 12) { Weather.DaylightOffset += 1; - Viewer.Simulator.Confirmer.Message(ConfirmLevel.None, Simulator.Catalog.GetStringFmt("Increased daylight offset to {0} h", FormatDaylightOffsetHour(Weather.DaylightOffset))); + Viewer.Simulator.Confirmer.Message(ConfirmLevel.None, Viewer.Catalog.GetStringFmt("Increased daylight offset to {0} h", FormatDaylightOffsetHour(Weather.DaylightOffset))); } if (UserInput.IsPressed(UserCommand.DebugDaylightOffsetDecrease) && Weather.DaylightOffset > -12) { Weather.DaylightOffset -= 1; - Viewer.Simulator.Confirmer.Message(ConfirmLevel.None, Simulator.Catalog.GetStringFmt("Decreased daylight offset to {0} h", FormatDaylightOffsetHour(Weather.DaylightOffset))); + Viewer.Simulator.Confirmer.Message(ConfirmLevel.None, Viewer.Catalog.GetStringFmt("Decreased daylight offset to {0} h", FormatDaylightOffsetHour(Weather.DaylightOffset))); } UpdateWind(elapsedTime); From ccd1d82b2bb1a15175251e0e07fe449000fa751a Mon Sep 17 00:00:00 2001 From: Looky1173 <60521810+Looky1173@users.noreply.github.com> Date: Sun, 3 Dec 2023 14:49:37 +0100 Subject: [PATCH 31/33] Replaced the legacy `DispatchViewer` with `MapViewer` --- Source/ORTS.Common/Input/UserCommand.cs | 1 - Source/ORTS.Settings/InputSettings.cs | 1 - Source/RunActivity/Program.cs | 1 - .../Debugging/DebugViewerForm.Designer.cs | 920 ------ .../Viewer3D/Debugging/DebugViewerForm.cs | 2455 ----------------- .../Viewer3D/Debugging/DebugViewerForm.resx | 123 - .../Viewer3D/Debugging/TimetableWindow.cs | 959 ------- .../Viewer3D/Map/MapDataProvider.cs | 14 +- .../Viewer3D/Map/MapForm.Designer.cs | 21 +- Source/RunActivity/Viewer3D/Map/MapForm.cs | 18 +- .../Processes/GameStateRunActivity.cs | 2 +- .../Viewer3D/Processes/GameStateViewer3D.cs | 11 +- .../RunActivity/Viewer3D/SkyInterpolation.cs | 2 +- Source/RunActivity/Viewer3D/Viewer.cs | 20 +- 14 files changed, 39 insertions(+), 4509 deletions(-) delete mode 100644 Source/RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs delete mode 100644 Source/RunActivity/Viewer3D/Debugging/DebugViewerForm.cs delete mode 100644 Source/RunActivity/Viewer3D/Debugging/DebugViewerForm.resx delete mode 100644 Source/RunActivity/Viewer3D/Debugging/TimetableWindow.cs diff --git a/Source/ORTS.Common/Input/UserCommand.cs b/Source/ORTS.Common/Input/UserCommand.cs index ede4219cb4..7c2e5deab2 100644 --- a/Source/ORTS.Common/Input/UserCommand.cs +++ b/Source/ORTS.Common/Input/UserCommand.cs @@ -24,7 +24,6 @@ public enum UserCommand [GetString("Game Change Cab")] GameChangeCab, [GetString("Game Request Control")] GameRequestControl, [GetString("Game Multi Player Dispatcher")] GameMultiPlayerDispatcher, - [GetString("Game Multi Player Dispatcher Beta")] GameMultiPlayerDispatcherBeta, [GetString("Game Multi Player Texting")] GameMultiPlayerTexting, [GetString("Game Switch Manual Mode")] GameSwitchManualMode, [GetString("Game Reset Out Of Control Mode")] GameResetOutOfControlMode, diff --git a/Source/ORTS.Settings/InputSettings.cs b/Source/ORTS.Settings/InputSettings.cs index d2ea54f6c8..3ba97f5c74 100644 --- a/Source/ORTS.Settings/InputSettings.cs +++ b/Source/ORTS.Settings/InputSettings.cs @@ -522,7 +522,6 @@ static void InitializeCommands(UserCommandInput[] Commands) Commands[(int)UserCommand.GameExternalCabController] = new UserCommandKeyInput(0x29); Commands[(int)UserCommand.GameFullscreen] = new UserCommandKeyInput(0x1C, KeyModifiers.Alt); Commands[(int)UserCommand.GameMultiPlayerDispatcher] = new UserCommandKeyInput(0x0A, KeyModifiers.Control); - Commands[(int)UserCommand.GameMultiPlayerDispatcherBeta] = new UserCommandKeyInput(0x0A, KeyModifiers.Control | KeyModifiers.Shift); Commands[(int)UserCommand.GameMultiPlayerTexting] = new UserCommandKeyInput(0x14, KeyModifiers.Alt); Commands[(int)UserCommand.GamePause] = new UserCommandKeyInput(Keys.Pause); Commands[(int)UserCommand.GamePauseMenu] = new UserCommandKeyInput(0x01); diff --git a/Source/RunActivity/Program.cs b/Source/RunActivity/Program.cs index f19a588582..de5ca04f9b 100644 --- a/Source/RunActivity/Program.cs +++ b/Source/RunActivity/Program.cs @@ -41,7 +41,6 @@ static class Program { public static Simulator Simulator; public static Viewer Viewer; - public static DispatchViewer DebugViewer; public static MapViewer MapForm; public static SoundDebugForm SoundDebugForm; public static ORTraceListener ORTraceListener; diff --git a/Source/RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs b/Source/RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs deleted file mode 100644 index 1ce3a0ff36..0000000000 --- a/Source/RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs +++ /dev/null @@ -1,920 +0,0 @@ -namespace Orts.Viewer3D.Debugging -{ - partial class DispatchViewer - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - grayPen.Dispose(); - greenPen.Dispose(); - orangePen.Dispose(); - redPen.Dispose(); - pathPen.Dispose(); - trainPen.Dispose(); - trainBrush.Dispose(); - trainFont.Dispose(); - sidingBrush.Dispose(); - sidingFont.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.pbCanvas = new System.Windows.Forms.PictureBox(); - this.refreshButton = new System.Windows.Forms.Button(); - this.windowSizeUpDown = new System.Windows.Forms.NumericUpDown(); - this.resLabel = new System.Windows.Forms.Label(); - this.AvatarView = new System.Windows.Forms.ListView(); - this.rmvButton = new System.Windows.Forms.Button(); - this.chkAllowUserSwitch = new System.Windows.Forms.CheckBox(); - this.chkShowAvatars = new System.Windows.Forms.CheckBox(); - this.MSG = new System.Windows.Forms.TextBox(); - this.msgSelected = new System.Windows.Forms.Button(); - this.msgAll = new System.Windows.Forms.Button(); - this.composeMSG = new System.Windows.Forms.Button(); - this.label1 = new System.Windows.Forms.Label(); - this.reply2Selected = new System.Windows.Forms.Button(); - this.chkDrawPath = new System.Windows.Forms.CheckBox(); - this.boxSetSignal = new System.Windows.Forms.ListBox(); - this.boxSetSwitch = new System.Windows.Forms.ListBox(); - this.chkPickSignals = new System.Windows.Forms.CheckBox(); - this.chkPickSwitches = new System.Windows.Forms.CheckBox(); - this.chkAllowNew = new System.Windows.Forms.CheckBox(); - this.messages = new System.Windows.Forms.ListBox(); - this.btnAssist = new System.Windows.Forms.Button(); - this.btnNormal = new System.Windows.Forms.Button(); - this.btnFollow = new System.Windows.Forms.Button(); - this.chkBoxPenalty = new System.Windows.Forms.CheckBox(); - this.chkPreferGreen = new System.Windows.Forms.CheckBox(); - this.btnSeeInGame = new System.Windows.Forms.Button(); - this.lblSimulationTimeText = new System.Windows.Forms.Label(); - this.lblSimulationTime = new System.Windows.Forms.Label(); - this.lblShow = new System.Windows.Forms.Label(); - this.cbShowPlatformLabels = new System.Windows.Forms.CheckBox(); - this.cbShowSidings = new System.Windows.Forms.CheckBox(); - this.cbShowSignals = new System.Windows.Forms.CheckBox(); - this.cbShowSignalState = new System.Windows.Forms.CheckBox(); - this.gbTrainLabels = new System.Windows.Forms.GroupBox(); - this.bTrainKey = new System.Windows.Forms.Button(); - this.rbShowActiveTrainLabels = new System.Windows.Forms.RadioButton(); - this.rbShowAllTrainLabels = new System.Windows.Forms.RadioButton(); - this.nudDaylightOffsetHrs = new System.Windows.Forms.NumericUpDown(); - this.lblDayLightOffsetHrs = new System.Windows.Forms.Label(); - this.cdBackground = new System.Windows.Forms.ColorDialog(); - this.bBackgroundColor = new System.Windows.Forms.Button(); - this.cbShowSwitches = new System.Windows.Forms.CheckBox(); - this.lblInstruction1 = new System.Windows.Forms.Label(); - this.cbShowTrainLabels = new System.Windows.Forms.CheckBox(); - this.tWindow = new System.Windows.Forms.TabControl(); - this.tDispatch = new System.Windows.Forms.TabPage(); - this.tTimetable = new System.Windows.Forms.TabPage(); - this.cbShowTrainState = new System.Windows.Forms.CheckBox(); - this.lblInstruction2 = new System.Windows.Forms.Label(); - this.lblInstruction3 = new System.Windows.Forms.Label(); - this.lblInstruction4 = new System.Windows.Forms.Label(); - this.cbShowPlatforms = new System.Windows.Forms.CheckBox(); - ((System.ComponentModel.ISupportInitialize)(this.pbCanvas)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.windowSizeUpDown)).BeginInit(); - this.gbTrainLabels.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudDaylightOffsetHrs)).BeginInit(); - this.tWindow.SuspendLayout(); - this.SuspendLayout(); - // - // pbCanvas - // - this.pbCanvas.Location = new System.Drawing.Point(5, 131); - this.pbCanvas.Name = "pbCanvas"; - this.pbCanvas.Size = new System.Drawing.Size(754, 626); - this.pbCanvas.TabIndex = 0; - this.pbCanvas.TabStop = false; - this.pbCanvas.SizeChanged += new System.EventHandler(this.pbCanvas_SizeChanged); - this.pbCanvas.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pictureBoxMouseDown); - this.pbCanvas.MouseMove += new System.Windows.Forms.MouseEventHandler(this.pictureBoxMouseMove); - this.pbCanvas.MouseUp += new System.Windows.Forms.MouseEventHandler(this.pictureBoxMouseUp); - // - // refreshButton - // - this.refreshButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.refreshButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.refreshButton.Location = new System.Drawing.Point(820, 137); - this.refreshButton.Name = "refreshButton"; - this.refreshButton.Size = new System.Drawing.Size(93, 23); - this.refreshButton.TabIndex = 1; - this.refreshButton.Text = "View Train"; - this.refreshButton.UseVisualStyleBackColor = true; - this.refreshButton.Click += new System.EventHandler(this.refreshButton_Click); - // - // windowSizeUpDown - // - this.windowSizeUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.windowSizeUpDown.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.windowSizeUpDown.Increment = new decimal(new int[] { - 50, - 0, - 0, - 0}); - this.windowSizeUpDown.Location = new System.Drawing.Point(802, 31); - this.windowSizeUpDown.Maximum = new decimal(new int[] { - 200000, - 0, - 0, - 0}); - this.windowSizeUpDown.Minimum = new decimal(new int[] { - 80, - 0, - 0, - 0}); - this.windowSizeUpDown.Name = "windowSizeUpDown"; - this.windowSizeUpDown.Size = new System.Drawing.Size(79, 23); - this.windowSizeUpDown.TabIndex = 6; - this.windowSizeUpDown.Value = new decimal(new int[] { - 5000, - 0, - 0, - 0}); - this.windowSizeUpDown.ValueChanged += new System.EventHandler(this.windowSizeUpDown_ValueChanged); - // - // resLabel - // - this.resLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.resLabel.AutoSize = true; - this.resLabel.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.resLabel.Location = new System.Drawing.Point(887, 35); - this.resLabel.Name = "resLabel"; - this.resLabel.Size = new System.Drawing.Size(18, 16); - this.resLabel.TabIndex = 8; - this.resLabel.Text = "m"; - // - // AvatarView - // - this.AvatarView.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.AvatarView.HideSelection = false; - this.AvatarView.Location = new System.Drawing.Point(779, 200); - this.AvatarView.Name = "AvatarView"; - this.AvatarView.Size = new System.Drawing.Size(121, 556); - this.AvatarView.TabIndex = 14; - this.AvatarView.UseCompatibleStateImageBehavior = false; - this.AvatarView.SelectedIndexChanged += new System.EventHandler(this.AvatarView_SelectedIndexChanged); - // - // rmvButton - // - this.rmvButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.rmvButton.Location = new System.Drawing.Point(773, 164); - this.rmvButton.Margin = new System.Windows.Forms.Padding(2); - this.rmvButton.Name = "rmvButton"; - this.rmvButton.Size = new System.Drawing.Size(72, 24); - this.rmvButton.TabIndex = 15; - this.rmvButton.Text = "Remove"; - this.rmvButton.UseVisualStyleBackColor = true; - this.rmvButton.Click += new System.EventHandler(this.rmvButton_Click); - // - // chkAllowUserSwitch - // - this.chkAllowUserSwitch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.chkAllowUserSwitch.AutoSize = true; - this.chkAllowUserSwitch.Checked = true; - this.chkAllowUserSwitch.CheckState = System.Windows.Forms.CheckState.Checked; - this.chkAllowUserSwitch.Location = new System.Drawing.Point(681, 71); - this.chkAllowUserSwitch.Name = "chkAllowUserSwitch"; - this.chkAllowUserSwitch.Size = new System.Drawing.Size(83, 17); - this.chkAllowUserSwitch.TabIndex = 16; - this.chkAllowUserSwitch.Text = "Auto Switch"; - this.chkAllowUserSwitch.UseVisualStyleBackColor = true; - this.chkAllowUserSwitch.CheckedChanged += new System.EventHandler(this.chkAllowUserSwitch_CheckedChanged); - // - // chkShowAvatars - // - this.chkShowAvatars.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.chkShowAvatars.AutoSize = true; - this.chkShowAvatars.Checked = true; - this.chkShowAvatars.CheckState = System.Windows.Forms.CheckState.Checked; - this.chkShowAvatars.Location = new System.Drawing.Point(681, 53); - this.chkShowAvatars.Name = "chkShowAvatars"; - this.chkShowAvatars.Size = new System.Drawing.Size(92, 17); - this.chkShowAvatars.TabIndex = 17; - this.chkShowAvatars.Text = "Show Avatars"; - this.chkShowAvatars.UseVisualStyleBackColor = true; - this.chkShowAvatars.CheckedChanged += new System.EventHandler(this.chkShowAvatars_CheckedChanged); - // - // MSG - // - this.MSG.Enabled = false; - this.MSG.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.MSG.Location = new System.Drawing.Point(1, 38); - this.MSG.Name = "MSG"; - this.MSG.Size = new System.Drawing.Size(560, 26); - this.MSG.TabIndex = 18; - this.MSG.WordWrap = false; - this.MSG.Enter += new System.EventHandler(this.MSGEnter); - this.MSG.Leave += new System.EventHandler(this.MSGLeave); - this.MSG.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.checkKeys); - // - // msgSelected - // - this.msgSelected.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.msgSelected.Enabled = false; - this.msgSelected.Location = new System.Drawing.Point(569, 78); - this.msgSelected.Margin = new System.Windows.Forms.Padding(2); - this.msgSelected.MaximumSize = new System.Drawing.Size(200, 24); - this.msgSelected.MinimumSize = new System.Drawing.Size(104, 24); - this.msgSelected.Name = "msgSelected"; - this.msgSelected.Size = new System.Drawing.Size(104, 24); - this.msgSelected.TabIndex = 19; - this.msgSelected.Text = "MSG to Selected"; - this.msgSelected.UseVisualStyleBackColor = true; - this.msgSelected.Click += new System.EventHandler(this.msgSelected_Click); - // - // msgAll - // - this.msgAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.msgAll.Enabled = false; - this.msgAll.Location = new System.Drawing.Point(569, 53); - this.msgAll.Margin = new System.Windows.Forms.Padding(2); - this.msgAll.MaximumSize = new System.Drawing.Size(200, 24); - this.msgAll.MinimumSize = new System.Drawing.Size(104, 24); - this.msgAll.Name = "msgAll"; - this.msgAll.Size = new System.Drawing.Size(104, 24); - this.msgAll.TabIndex = 20; - this.msgAll.Text = "MSG to All"; - this.msgAll.UseVisualStyleBackColor = true; - this.msgAll.Click += new System.EventHandler(this.msgAll_Click); - // - // composeMSG - // - this.composeMSG.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.composeMSG.Location = new System.Drawing.Point(569, 28); - this.composeMSG.Margin = new System.Windows.Forms.Padding(2); - this.composeMSG.MaximumSize = new System.Drawing.Size(200, 24); - this.composeMSG.MinimumSize = new System.Drawing.Size(104, 24); - this.composeMSG.Name = "composeMSG"; - this.composeMSG.Size = new System.Drawing.Size(104, 24); - this.composeMSG.TabIndex = 21; - this.composeMSG.Text = "Compose MSG"; - this.composeMSG.UseVisualStyleBackColor = true; - this.composeMSG.Click += new System.EventHandler(this.composeMSG_Click); - // - // label1 - // - this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(770, 35); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(26, 13); - this.label1.TabIndex = 7; - this.label1.Text = "Res"; - // - // reply2Selected - // - this.reply2Selected.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.reply2Selected.Enabled = false; - this.reply2Selected.Location = new System.Drawing.Point(569, 103); - this.reply2Selected.Margin = new System.Windows.Forms.Padding(2); - this.reply2Selected.MaximumSize = new System.Drawing.Size(200, 24); - this.reply2Selected.MinimumSize = new System.Drawing.Size(104, 24); - this.reply2Selected.Name = "reply2Selected"; - this.reply2Selected.Size = new System.Drawing.Size(104, 24); - this.reply2Selected.TabIndex = 23; - this.reply2Selected.Text = "Reply to Selected"; - this.reply2Selected.UseVisualStyleBackColor = true; - this.reply2Selected.Click += new System.EventHandler(this.replySelected); - // - // chkDrawPath - // - this.chkDrawPath.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.chkDrawPath.AutoSize = true; - this.chkDrawPath.Checked = true; - this.chkDrawPath.CheckState = System.Windows.Forms.CheckState.Checked; - this.chkDrawPath.Location = new System.Drawing.Point(803, 58); - this.chkDrawPath.Name = "chkDrawPath"; - this.chkDrawPath.Size = new System.Drawing.Size(76, 17); - this.chkDrawPath.TabIndex = 24; - this.chkDrawPath.Text = "Draw Path"; - this.chkDrawPath.UseVisualStyleBackColor = true; - this.chkDrawPath.CheckedChanged += new System.EventHandler(this.chkDrawPathChanged); - // - // boxSetSignal - // - this.boxSetSignal.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.boxSetSignal.Enabled = false; - this.boxSetSignal.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.boxSetSignal.FormattingEnabled = true; - this.boxSetSignal.ItemHeight = 20; - this.boxSetSignal.Location = new System.Drawing.Point(209, 205); - this.boxSetSignal.MinimumSize = new System.Drawing.Size(160, 100); - this.boxSetSignal.Name = "boxSetSignal"; - this.boxSetSignal.Size = new System.Drawing.Size(164, 100); - this.boxSetSignal.TabIndex = 25; - this.boxSetSignal.Visible = false; - this.boxSetSignal.SelectedIndexChanged += new System.EventHandler(this.boxSetSignalChosen); - // - // boxSetSwitch - // - this.boxSetSwitch.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.boxSetSwitch.Enabled = false; - this.boxSetSwitch.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.boxSetSwitch.FormattingEnabled = true; - this.boxSetSwitch.ItemHeight = 20; - this.boxSetSwitch.Items.AddRange(new object[] { - "To Main Route", - "To Side Route"}); - this.boxSetSwitch.Location = new System.Drawing.Point(398, 205); - this.boxSetSwitch.MinimumSize = new System.Drawing.Size(120, 50); - this.boxSetSwitch.Name = "boxSetSwitch"; - this.boxSetSwitch.Size = new System.Drawing.Size(125, 40); - this.boxSetSwitch.TabIndex = 26; - this.boxSetSwitch.Visible = false; - this.boxSetSwitch.SelectedIndexChanged += new System.EventHandler(this.boxSetSwitchChosen); - // - // chkPickSignals - // - this.chkPickSignals.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.chkPickSignals.AutoSize = true; - this.chkPickSignals.Checked = true; - this.chkPickSignals.CheckState = System.Windows.Forms.CheckState.Checked; - this.chkPickSignals.Location = new System.Drawing.Point(803, 75); - this.chkPickSignals.Name = "chkPickSignals"; - this.chkPickSignals.Size = new System.Drawing.Size(84, 17); - this.chkPickSignals.TabIndex = 27; - this.chkPickSignals.Text = "Pick Signals"; - this.chkPickSignals.UseVisualStyleBackColor = true; - // - // chkPickSwitches - // - this.chkPickSwitches.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.chkPickSwitches.AutoSize = true; - this.chkPickSwitches.Checked = true; - this.chkPickSwitches.CheckState = System.Windows.Forms.CheckState.Checked; - this.chkPickSwitches.Location = new System.Drawing.Point(803, 92); - this.chkPickSwitches.Name = "chkPickSwitches"; - this.chkPickSwitches.Size = new System.Drawing.Size(93, 17); - this.chkPickSwitches.TabIndex = 28; - this.chkPickSwitches.Text = "Pick Switches"; - this.chkPickSwitches.UseVisualStyleBackColor = true; - // - // chkAllowNew - // - this.chkAllowNew.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.chkAllowNew.AutoSize = true; - this.chkAllowNew.Checked = true; - this.chkAllowNew.CheckState = System.Windows.Forms.CheckState.Checked; - this.chkAllowNew.Location = new System.Drawing.Point(681, 34); - this.chkAllowNew.Name = "chkAllowNew"; - this.chkAllowNew.Size = new System.Drawing.Size(67, 17); - this.chkAllowNew.TabIndex = 29; - this.chkAllowNew.Text = "Can Join"; - this.chkAllowNew.UseVisualStyleBackColor = true; - this.chkAllowNew.CheckedChanged += new System.EventHandler(this.chkAllowNewCheck); - // - // messages - // - this.messages.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.messages.FormattingEnabled = true; - this.messages.ItemHeight = 18; - this.messages.Location = new System.Drawing.Point(1, 68); - this.messages.Name = "messages"; - this.messages.Size = new System.Drawing.Size(560, 58); - this.messages.TabIndex = 22; - this.messages.SelectedIndexChanged += new System.EventHandler(this.msgSelectedChanged); - // - // btnAssist - // - this.btnAssist.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnAssist.Location = new System.Drawing.Point(762, 111); - this.btnAssist.Margin = new System.Windows.Forms.Padding(2); - this.btnAssist.Name = "btnAssist"; - this.btnAssist.Size = new System.Drawing.Size(48, 24); - this.btnAssist.TabIndex = 30; - this.btnAssist.Text = "Assist"; - this.btnAssist.UseVisualStyleBackColor = true; - this.btnAssist.Click += new System.EventHandler(this.AssistClick); - // - // btnNormal - // - this.btnNormal.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnNormal.Location = new System.Drawing.Point(762, 136); - this.btnNormal.Margin = new System.Windows.Forms.Padding(2); - this.btnNormal.Name = "btnNormal"; - this.btnNormal.Size = new System.Drawing.Size(58, 24); - this.btnNormal.TabIndex = 31; - this.btnNormal.Text = "Normal"; - this.btnNormal.UseVisualStyleBackColor = true; - this.btnNormal.Click += new System.EventHandler(this.btnNormalClick); - // - // btnFollow - // - this.btnFollow.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnFollow.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnFollow.Location = new System.Drawing.Point(847, 165); - this.btnFollow.Name = "btnFollow"; - this.btnFollow.Size = new System.Drawing.Size(60, 23); - this.btnFollow.TabIndex = 32; - this.btnFollow.Text = "Follow"; - this.btnFollow.UseVisualStyleBackColor = true; - this.btnFollow.Click += new System.EventHandler(this.btnFollowClick); - // - // chkBoxPenalty - // - this.chkBoxPenalty.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.chkBoxPenalty.AutoSize = true; - this.chkBoxPenalty.Checked = true; - this.chkBoxPenalty.CheckState = System.Windows.Forms.CheckState.Checked; - this.chkBoxPenalty.Location = new System.Drawing.Point(681, 107); - this.chkBoxPenalty.Name = "chkBoxPenalty"; - this.chkBoxPenalty.Size = new System.Drawing.Size(61, 17); - this.chkBoxPenalty.TabIndex = 33; - this.chkBoxPenalty.Text = "Penalty"; - this.chkBoxPenalty.UseVisualStyleBackColor = true; - this.chkBoxPenalty.CheckedChanged += new System.EventHandler(this.chkOPenaltyHandle); - // - // chkPreferGreen - // - this.chkPreferGreen.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.chkPreferGreen.AutoSize = true; - this.chkPreferGreen.Checked = true; - this.chkPreferGreen.CheckState = System.Windows.Forms.CheckState.Checked; - this.chkPreferGreen.Location = new System.Drawing.Point(681, 89); - this.chkPreferGreen.Name = "chkPreferGreen"; - this.chkPreferGreen.Size = new System.Drawing.Size(86, 17); - this.chkPreferGreen.TabIndex = 34; - this.chkPreferGreen.Text = "Prefer Green"; - this.chkPreferGreen.UseVisualStyleBackColor = true; - this.chkPreferGreen.Visible = false; - this.chkPreferGreen.CheckedChanged += new System.EventHandler(this.chkPreferGreenHandle); - // - // btnSeeInGame - // - this.btnSeeInGame.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnSeeInGame.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnSeeInGame.Location = new System.Drawing.Point(820, 113); - this.btnSeeInGame.Name = "btnSeeInGame"; - this.btnSeeInGame.Size = new System.Drawing.Size(93, 23); - this.btnSeeInGame.TabIndex = 35; - this.btnSeeInGame.Text = "See in Game"; - this.btnSeeInGame.UseVisualStyleBackColor = true; - this.btnSeeInGame.Click += new System.EventHandler(this.btnSeeInGameClick); - // - // lblSimulationTimeText - // - this.lblSimulationTimeText.AutoSize = true; - this.lblSimulationTimeText.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblSimulationTimeText.Location = new System.Drawing.Point(5, 34); - this.lblSimulationTimeText.Name = "lblSimulationTimeText"; - this.lblSimulationTimeText.Size = new System.Drawing.Size(103, 16); - this.lblSimulationTimeText.TabIndex = 36; - this.lblSimulationTimeText.Text = "Simulation Time"; - this.lblSimulationTimeText.Visible = false; - // - // lblSimulationTime - // - this.lblSimulationTime.AutoSize = true; - this.lblSimulationTime.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblSimulationTime.Location = new System.Drawing.Point(115, 34); - this.lblSimulationTime.Name = "lblSimulationTime"; - this.lblSimulationTime.Size = new System.Drawing.Size(100, 16); - this.lblSimulationTime.TabIndex = 37; - this.lblSimulationTime.Text = "SimulationTime"; - this.lblSimulationTime.Visible = false; - // - // lblShow - // - this.lblShow.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.lblShow.AutoSize = true; - this.lblShow.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblShow.Location = new System.Drawing.Point(780, 180); - this.lblShow.Name = "lblShow"; - this.lblShow.Size = new System.Drawing.Size(41, 15); - this.lblShow.TabIndex = 38; - this.lblShow.Text = "Show:"; - this.lblShow.Visible = false; - // - // cbShowPlatformLabels - // - this.cbShowPlatformLabels.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.cbShowPlatformLabels.AutoSize = true; - this.cbShowPlatformLabels.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cbShowPlatformLabels.Location = new System.Drawing.Point(780, 220); - this.cbShowPlatformLabels.Name = "cbShowPlatformLabels"; - this.cbShowPlatformLabels.Size = new System.Drawing.Size(108, 19); - this.cbShowPlatformLabels.TabIndex = 39; - this.cbShowPlatformLabels.Text = "Platform labels"; - this.cbShowPlatformLabels.UseVisualStyleBackColor = true; - this.cbShowPlatformLabels.Visible = false; - // - // cbShowSidings - // - this.cbShowSidings.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.cbShowSidings.AutoSize = true; - this.cbShowSidings.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cbShowSidings.Location = new System.Drawing.Point(780, 240); - this.cbShowSidings.Name = "cbShowSidings"; - this.cbShowSidings.Size = new System.Drawing.Size(97, 19); - this.cbShowSidings.TabIndex = 40; - this.cbShowSidings.Text = "Siding labels"; - this.cbShowSidings.UseVisualStyleBackColor = true; - this.cbShowSidings.Visible = false; - // - // cbShowSignals - // - this.cbShowSignals.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.cbShowSignals.AutoSize = true; - this.cbShowSignals.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cbShowSignals.Location = new System.Drawing.Point(780, 280); - this.cbShowSignals.Name = "cbShowSignals"; - this.cbShowSignals.Size = new System.Drawing.Size(67, 19); - this.cbShowSignals.TabIndex = 41; - this.cbShowSignals.Text = "Signals"; - this.cbShowSignals.UseVisualStyleBackColor = true; - this.cbShowSignals.Visible = false; - // - // cbShowSignalState - // - this.cbShowSignalState.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.cbShowSignalState.AutoSize = true; - this.cbShowSignalState.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cbShowSignalState.Location = new System.Drawing.Point(802, 300); - this.cbShowSignalState.Name = "cbShowSignalState"; - this.cbShowSignalState.Size = new System.Drawing.Size(90, 19); - this.cbShowSignalState.TabIndex = 42; - this.cbShowSignalState.Text = "Signal state"; - this.cbShowSignalState.UseVisualStyleBackColor = true; - this.cbShowSignalState.Visible = false; - // - // gbTrainLabels - // - this.gbTrainLabels.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.gbTrainLabels.Controls.Add(this.bTrainKey); - this.gbTrainLabels.Controls.Add(this.rbShowActiveTrainLabels); - this.gbTrainLabels.Controls.Add(this.rbShowAllTrainLabels); - this.gbTrainLabels.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.gbTrainLabels.Location = new System.Drawing.Point(779, 323); - this.gbTrainLabels.Name = "gbTrainLabels"; - this.gbTrainLabels.Size = new System.Drawing.Size(120, 129); - this.gbTrainLabels.TabIndex = 43; - this.gbTrainLabels.TabStop = false; - this.gbTrainLabels.Text = "Train labels"; - this.gbTrainLabels.Visible = false; - // - // bTrainKey - // - this.bTrainKey.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.bTrainKey.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.bTrainKey.Location = new System.Drawing.Point(77, 89); - this.bTrainKey.Name = "bTrainKey"; - this.bTrainKey.Size = new System.Drawing.Size(40, 23); - this.bTrainKey.TabIndex = 57; - this.bTrainKey.Text = "Key"; - this.bTrainKey.UseVisualStyleBackColor = true; - this.bTrainKey.Visible = false; - this.bTrainKey.Click += new System.EventHandler(this.bTrainKey_Click); - // - // rbShowActiveTrainLabels - // - this.rbShowActiveTrainLabels.AutoSize = true; - this.rbShowActiveTrainLabels.Checked = true; - this.rbShowActiveTrainLabels.Location = new System.Drawing.Point(13, 22); - this.rbShowActiveTrainLabels.Name = "rbShowActiveTrainLabels"; - this.rbShowActiveTrainLabels.Size = new System.Drawing.Size(81, 19); - this.rbShowActiveTrainLabels.TabIndex = 1; - this.rbShowActiveTrainLabels.TabStop = true; - this.rbShowActiveTrainLabels.Text = "Active only"; - this.rbShowActiveTrainLabels.UseVisualStyleBackColor = true; - this.rbShowActiveTrainLabels.Visible = false; - // - // rbShowAllTrainLabels - // - this.rbShowAllTrainLabels.AutoSize = true; - this.rbShowAllTrainLabels.Location = new System.Drawing.Point(13, 44); - this.rbShowAllTrainLabels.Name = "rbShowAllTrainLabels"; - this.rbShowAllTrainLabels.Size = new System.Drawing.Size(38, 19); - this.rbShowAllTrainLabels.TabIndex = 0; - this.rbShowAllTrainLabels.Text = "All"; - this.rbShowAllTrainLabels.UseVisualStyleBackColor = true; - this.rbShowAllTrainLabels.Visible = false; - // - // nudDaylightOffsetHrs - // - this.nudDaylightOffsetHrs.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.nudDaylightOffsetHrs.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.nudDaylightOffsetHrs.Location = new System.Drawing.Point(817, 556); - this.nudDaylightOffsetHrs.Maximum = new decimal(new int[] { - 12, - 0, - 0, - 0}); - this.nudDaylightOffsetHrs.Minimum = new decimal(new int[] { - 12, - 0, - 0, - -2147483648}); - this.nudDaylightOffsetHrs.Name = "nudDaylightOffsetHrs"; - this.nudDaylightOffsetHrs.Size = new System.Drawing.Size(40, 21); - this.nudDaylightOffsetHrs.TabIndex = 44; - this.nudDaylightOffsetHrs.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; - this.nudDaylightOffsetHrs.Visible = false; - this.nudDaylightOffsetHrs.ValueChanged += new System.EventHandler(this.nudDaylightOffsetHrs_ValueChanged); - // - // lblDayLightOffsetHrs - // - this.lblDayLightOffsetHrs.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.lblDayLightOffsetHrs.AutoSize = true; - this.lblDayLightOffsetHrs.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblDayLightOffsetHrs.Location = new System.Drawing.Point(779, 534); - this.lblDayLightOffsetHrs.Name = "lblDayLightOffsetHrs"; - this.lblDayLightOffsetHrs.Size = new System.Drawing.Size(111, 15); - this.lblDayLightOffsetHrs.TabIndex = 45; - this.lblDayLightOffsetHrs.Text = "Daylight offset (hrs)"; - this.lblDayLightOffsetHrs.Visible = false; - // - // cdBackground - // - this.cdBackground.AnyColor = true; - this.cdBackground.ShowHelp = true; - // - // bBackgroundColor - // - this.bBackgroundColor.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.bBackgroundColor.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.bBackgroundColor.Location = new System.Drawing.Point(779, 590); - this.bBackgroundColor.Name = "bBackgroundColor"; - this.bBackgroundColor.Size = new System.Drawing.Size(131, 23); - this.bBackgroundColor.TabIndex = 46; - this.bBackgroundColor.Text = "Background color"; - this.bBackgroundColor.UseVisualStyleBackColor = true; - this.bBackgroundColor.Visible = false; - this.bBackgroundColor.Click += new System.EventHandler(this.bBackgroundColor_Click); - // - // cbShowSwitches - // - this.cbShowSwitches.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.cbShowSwitches.AutoSize = true; - this.cbShowSwitches.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cbShowSwitches.Location = new System.Drawing.Point(780, 260); - this.cbShowSwitches.Name = "cbShowSwitches"; - this.cbShowSwitches.Size = new System.Drawing.Size(75, 19); - this.cbShowSwitches.TabIndex = 47; - this.cbShowSwitches.Text = "Switches"; - this.cbShowSwitches.UseVisualStyleBackColor = true; - this.cbShowSwitches.Visible = false; - // - // lblInstruction1 - // - this.lblInstruction1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.lblInstruction1.Location = new System.Drawing.Point(8, 717); - this.lblInstruction1.Name = "lblInstruction1"; - this.lblInstruction1.Padding = new System.Windows.Forms.Padding(3); - this.lblInstruction1.Size = new System.Drawing.Size(327, 22); - this.lblInstruction1.TabIndex = 48; - this.lblInstruction1.Text = "To pan, drag with left mouse."; - this.lblInstruction1.Visible = false; - // - // cbShowTrainLabels - // - this.cbShowTrainLabels.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.cbShowTrainLabels.AutoSize = true; - this.cbShowTrainLabels.Checked = true; - this.cbShowTrainLabels.CheckState = System.Windows.Forms.CheckState.Checked; - this.cbShowTrainLabels.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cbShowTrainLabels.Location = new System.Drawing.Point(790, 395); - this.cbShowTrainLabels.Name = "cbShowTrainLabels"; - this.cbShowTrainLabels.Size = new System.Drawing.Size(60, 19); - this.cbShowTrainLabels.TabIndex = 50; - this.cbShowTrainLabels.Text = "Name"; - this.cbShowTrainLabels.UseVisualStyleBackColor = true; - this.cbShowTrainLabels.Visible = false; - // - // tWindow - // - this.tWindow.Controls.Add(this.tDispatch); - this.tWindow.Controls.Add(this.tTimetable); - this.tWindow.Location = new System.Drawing.Point(0, 0); - this.tWindow.Name = "tWindow"; - this.tWindow.SelectedIndex = 0; - this.tWindow.Size = new System.Drawing.Size(923, 32); - this.tWindow.TabIndex = 51; - this.tWindow.SelectedIndexChanged += new System.EventHandler(this.tWindow_SelectedIndexChanged); - // - // tDispatch - // - this.tDispatch.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.tDispatch.Location = new System.Drawing.Point(4, 22); - this.tDispatch.Name = "tDispatch"; - this.tDispatch.Padding = new System.Windows.Forms.Padding(3); - this.tDispatch.Size = new System.Drawing.Size(915, 6); - this.tDispatch.TabIndex = 0; - this.tDispatch.Text = "Dispatch"; - this.tDispatch.UseVisualStyleBackColor = true; - // - // tTimetable - // - this.tTimetable.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.tTimetable.Location = new System.Drawing.Point(4, 22); - this.tTimetable.Name = "tTimetable"; - this.tTimetable.Padding = new System.Windows.Forms.Padding(3); - this.tTimetable.Size = new System.Drawing.Size(915, 6); - this.tTimetable.TabIndex = 1; - this.tTimetable.Text = "Timetable"; - this.tTimetable.UseVisualStyleBackColor = true; - // - // cbShowTrainState - // - this.cbShowTrainState.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.cbShowTrainState.AutoSize = true; - this.cbShowTrainState.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cbShowTrainState.Location = new System.Drawing.Point(802, 415); - this.cbShowTrainState.Name = "cbShowTrainState"; - this.cbShowTrainState.Size = new System.Drawing.Size(54, 19); - this.cbShowTrainState.TabIndex = 52; - this.cbShowTrainState.Text = "State"; - this.cbShowTrainState.UseVisualStyleBackColor = true; - this.cbShowTrainState.Visible = false; - // - // lblInstruction2 - // - this.lblInstruction2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.lblInstruction2.Location = new System.Drawing.Point(8, 738); - this.lblInstruction2.Name = "lblInstruction2"; - this.lblInstruction2.Padding = new System.Windows.Forms.Padding(3); - this.lblInstruction2.Size = new System.Drawing.Size(327, 21); - this.lblInstruction2.TabIndex = 53; - this.lblInstruction2.Text = "To zoom, drag with left and right mouse or scroll mouse wheel."; - this.lblInstruction2.Visible = false; - // - // lblInstruction3 - // - this.lblInstruction3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.lblInstruction3.Location = new System.Drawing.Point(8, 759); - this.lblInstruction3.Name = "lblInstruction3"; - this.lblInstruction3.Padding = new System.Windows.Forms.Padding(3); - this.lblInstruction3.Size = new System.Drawing.Size(327, 21); - this.lblInstruction3.TabIndex = 54; - this.lblInstruction3.Text = "To zoom in to a location, press Shift and click the left mouse."; - this.lblInstruction3.Visible = false; - // - // lblInstruction4 - // - this.lblInstruction4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.lblInstruction4.Location = new System.Drawing.Point(8, 780); - this.lblInstruction4.Name = "lblInstruction4"; - this.lblInstruction4.Padding = new System.Windows.Forms.Padding(3); - this.lblInstruction4.Size = new System.Drawing.Size(327, 21); - this.lblInstruction4.TabIndex = 55; - this.lblInstruction4.Text = "To zoom out of a location, press Alt and click the left mouse."; - this.lblInstruction4.Visible = false; - // - // cbShowPlatforms - // - this.cbShowPlatforms.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.cbShowPlatforms.AutoSize = true; - this.cbShowPlatforms.Checked = true; - this.cbShowPlatforms.CheckState = System.Windows.Forms.CheckState.Checked; - this.cbShowPlatforms.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cbShowPlatforms.Location = new System.Drawing.Point(780, 200); - this.cbShowPlatforms.Name = "cbShowPlatforms"; - this.cbShowPlatforms.Size = new System.Drawing.Size(78, 19); - this.cbShowPlatforms.TabIndex = 56; - this.cbShowPlatforms.Text = "Platforms"; - this.cbShowPlatforms.UseVisualStyleBackColor = true; - this.cbShowPlatforms.Visible = false; - // - // DispatchViewer - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.AutoScroll = true; - this.ClientSize = new System.Drawing.Size(923, 749); - this.Controls.Add(this.cbShowPlatforms); - this.Controls.Add(this.lblInstruction4); - this.Controls.Add(this.lblInstruction3); - this.Controls.Add(this.lblInstruction2); - this.Controls.Add(this.cbShowTrainState); - this.Controls.Add(this.cbShowTrainLabels); - this.Controls.Add(this.lblInstruction1); - this.Controls.Add(this.cbShowSwitches); - this.Controls.Add(this.bBackgroundColor); - this.Controls.Add(this.lblDayLightOffsetHrs); - this.Controls.Add(this.nudDaylightOffsetHrs); - this.Controls.Add(this.gbTrainLabels); - this.Controls.Add(this.cbShowSignalState); - this.Controls.Add(this.cbShowSignals); - this.Controls.Add(this.cbShowSidings); - this.Controls.Add(this.cbShowPlatformLabels); - this.Controls.Add(this.lblShow); - this.Controls.Add(this.lblSimulationTime); - this.Controls.Add(this.lblSimulationTimeText); - this.Controls.Add(this.btnSeeInGame); - this.Controls.Add(this.chkPreferGreen); - this.Controls.Add(this.chkBoxPenalty); - this.Controls.Add(this.btnFollow); - this.Controls.Add(this.btnNormal); - this.Controls.Add(this.btnAssist); - this.Controls.Add(this.chkAllowNew); - this.Controls.Add(this.chkPickSwitches); - this.Controls.Add(this.chkPickSignals); - this.Controls.Add(this.boxSetSwitch); - this.Controls.Add(this.boxSetSignal); - this.Controls.Add(this.chkDrawPath); - this.Controls.Add(this.reply2Selected); - this.Controls.Add(this.messages); - this.Controls.Add(this.composeMSG); - this.Controls.Add(this.msgAll); - this.Controls.Add(this.msgSelected); - this.Controls.Add(this.MSG); - this.Controls.Add(this.chkShowAvatars); - this.Controls.Add(this.chkAllowUserSwitch); - this.Controls.Add(this.rmvButton); - this.Controls.Add(this.AvatarView); - this.Controls.Add(this.resLabel); - this.Controls.Add(this.label1); - this.Controls.Add(this.windowSizeUpDown); - this.Controls.Add(this.refreshButton); - this.Controls.Add(this.pbCanvas); - this.Controls.Add(this.tWindow); - this.Name = "DispatchViewer"; - this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Show; - this.Text = "Map Window"; - this.Leave += new System.EventHandler(this.DispatcherLeave); - ((System.ComponentModel.ISupportInitialize)(this.pbCanvas)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.windowSizeUpDown)).EndInit(); - this.gbTrainLabels.ResumeLayout(false); - this.gbTrainLabels.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudDaylightOffsetHrs)).EndInit(); - this.tWindow.ResumeLayout(false); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - private System.Windows.Forms.ListBox boxSetSignal; - private System.Windows.Forms.ListBox boxSetSwitch; - private System.Windows.Forms.ColorDialog cdBackground; - private System.Windows.Forms.Label lblInstruction1; - private System.Windows.Forms.TabPage tDispatch; - private System.Windows.Forms.TabPage tTimetable; - public System.Windows.Forms.Button refreshButton; - public System.Windows.Forms.NumericUpDown windowSizeUpDown; - public System.Windows.Forms.Label resLabel; - public System.Windows.Forms.ListView AvatarView; - public System.Windows.Forms.Button rmvButton; - public System.Windows.Forms.CheckBox chkAllowUserSwitch; - public System.Windows.Forms.CheckBox chkShowAvatars; - public System.Windows.Forms.TextBox MSG; - public System.Windows.Forms.Button msgSelected; - public System.Windows.Forms.Button msgAll; - public System.Windows.Forms.Button composeMSG; - public System.Windows.Forms.Label label1; - public System.Windows.Forms.Button reply2Selected; - public System.Windows.Forms.CheckBox chkDrawPath; - public System.Windows.Forms.CheckBox chkPickSignals; - public System.Windows.Forms.CheckBox chkPickSwitches; - public System.Windows.Forms.CheckBox chkAllowNew; - public System.Windows.Forms.ListBox messages; - public System.Windows.Forms.Button btnAssist; - public System.Windows.Forms.Button btnNormal; - public System.Windows.Forms.Button btnFollow; - public System.Windows.Forms.CheckBox chkBoxPenalty; - public System.Windows.Forms.CheckBox chkPreferGreen; - public System.Windows.Forms.Button btnSeeInGame; - public System.Windows.Forms.Label lblSimulationTimeText; - public System.Windows.Forms.Label lblSimulationTime; - public System.Windows.Forms.Label lblShow; - public System.Windows.Forms.CheckBox cbShowPlatformLabels; - public System.Windows.Forms.CheckBox cbShowSidings; - public System.Windows.Forms.CheckBox cbShowSignals; - public System.Windows.Forms.CheckBox cbShowSignalState; - public System.Windows.Forms.GroupBox gbTrainLabels; - public System.Windows.Forms.RadioButton rbShowActiveTrainLabels; - public System.Windows.Forms.RadioButton rbShowAllTrainLabels; - public System.Windows.Forms.NumericUpDown nudDaylightOffsetHrs; - public System.Windows.Forms.Label lblDayLightOffsetHrs; - public System.Windows.Forms.Button bBackgroundColor; - public System.Windows.Forms.CheckBox cbShowSwitches; - public System.Windows.Forms.CheckBox cbShowTrainLabels; - public System.Windows.Forms.PictureBox pbCanvas; - public System.Windows.Forms.TabControl tWindow; - public System.Windows.Forms.CheckBox cbShowTrainState; - private System.Windows.Forms.Label lblInstruction2; - private System.Windows.Forms.Label lblInstruction3; - private System.Windows.Forms.Label lblInstruction4; - public System.Windows.Forms.CheckBox cbShowPlatforms; - public System.Windows.Forms.Button bTrainKey; - } -} diff --git a/Source/RunActivity/Viewer3D/Debugging/DebugViewerForm.cs b/Source/RunActivity/Viewer3D/Debugging/DebugViewerForm.cs deleted file mode 100644 index b1110fc075..0000000000 --- a/Source/RunActivity/Viewer3D/Debugging/DebugViewerForm.cs +++ /dev/null @@ -1,2455 +0,0 @@ -// COPYRIGHT 2010, 2011, 2012, 2013, 2014, 2015 by the Open Rails project. -// -// This file is part of Open Rails. -// -// Open Rails is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Open Rails is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Open Rails. If not, see . - -// Principal Author: -// Author: Charlie Salts / Signalsoft Rail Consultancy Ltd. -// Contributor: -// Richard Plokhaar / Signalsoft Rail Consultancy Ltd. -// - -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Drawing; -using System.IO; -using System.Linq; -using System.Net; -using System.Windows.Forms; -using GNU.Gettext.WinForms; -using Microsoft.Xna.Framework; -using Orts.Formats.Msts; -using Orts.MultiPlayer; -using Orts.Simulation; -using Orts.Simulation.Physics; -using Orts.Simulation.RollingStocks; -using Orts.Simulation.Signalling; -using Orts.Viewer3D.Popups; -using ORTS.Common; -using Color = System.Drawing.Color; -using Image = System.Drawing.Image; - -namespace Orts.Viewer3D.Debugging -{ - /// - /// Defines an external window for use as a debugging viewer - /// when using Open Rails - /// - public partial class DispatchViewer : Form - { - /// - /// Reference to the main simulator object. - /// - public readonly Simulator simulator; - private TimetableWindow TimetableWindow; - - private int IM_Width = 720; - private int IM_Height = 720; - - /// - /// True when the user is dragging the route view - /// - public bool Dragging; - private WorldPosition worldPos; - public float xScale = 1; // pixels / metre - public float yScale = 1; // pixels / metre - - string name = ""; - public List switchItemsDrawn; - public List signalItemsDrawn; - - public SwitchWidget switchPickedItem; - public SignalWidget signalPickedItem; - public bool switchPickedItemHandled; - public double switchPickedTime; - public bool signalPickedItemHandled; - public double signalPickedTime; - public bool DrawPath = true; //draw train path - ImageList imageList1; - public List selectedTrainList; - /// - /// contains the last position of the mouse - /// - private System.Drawing.Point LastCursorPosition = new System.Drawing.Point(); - public Pen redPen = new Pen(Color.Red); - public Pen greenPen = new Pen(Color.Green); - public Pen orangePen = new Pen(Color.Orange); - public Pen trainPen = new Pen(Color.DarkGreen); - public Pen pathPen = new Pen(Color.DeepPink); - public Pen grayPen = new Pen(Color.Gray); - public Pen PlatformPen = new Pen(Color.Blue); - - //the train selected by leftclicking the mouse - public Train PickedTrain; - - // Note +ve pixels draw down from top, but +ve metres draw up from the bottom - // - // |-------- subX ---------->| ViewWindow - // +--------------------------------+ - // | | - // | | - // | | - // | | - // ========== | ----- - // ===========\ Track Extent | ^ - // ==================================================== | - // | \ | | - // | ================== ---- | - // | | ^ | - // | | | - // | | | maxY - // +--------------------------------+ - // minY | - // |----- minX --->|<- VW.X->|<------------ VW.Width -------->| | - // | | - // |------------------------------ maxX ------------------------------->| | | - // | | - // + 0,0 World origin ---------- - - /// - /// Defines the area to view, in meters. The left edge is meters from the leftmost extent of the route. - /// - public RectangleF ViewWindow; - - /// - /// Used to periodically check if we should shift the view when the - /// user is holding down a "shift view" button. - /// - private Timer UITimer; - - bool loaded; - TrackNode[] nodes; - - // Extents of the route in meters measured from the World origin - public float minX = float.MaxValue; - public float minY = float.MaxValue; - public float maxX = float.MinValue; - public float maxY = float.MinValue; - - public Viewer Viewer; - /// - /// Creates a new DebugViewerForm. - /// - /// - /// /// - public DispatchViewer(Simulator simulator, Viewer viewer) - { - InitializeComponent(); - - if (simulator == null) - throw new ArgumentNullException("simulator", "Simulator object cannot be null."); - - this.simulator = simulator; - Viewer = viewer; - TimetableWindow = new TimetableWindow(this); - - nodes = simulator.TDB.TrackDB.TrackNodes; - if (MultiPlayer.MPManager.IsMultiPlayer()) { MultiPlayer.MPManager.AllowedManualSwitch = false; } - - // initialise the timer used to handle user input - UITimer = new Timer(); - UITimer.Interval = 100; - UITimer.Tick += new EventHandler(UITimer_Tick); - UITimer.Start(); - } - - public int RedrawCount; - public Font trainFont; - public Font sidingFont; - public Font PlatformFont; - public Font SignalFont; - public SolidBrush trainBrush; - public SolidBrush sidingBrush; - public SolidBrush PlatformBrush; - public SolidBrush SignalBrush; - public SolidBrush InactiveTrainBrush; - - private double lastUpdateTime; - - /// - /// When the user holds down the "L", "R", "U", "D" buttons, - /// shift the view. Avoids the case when the user has to click - /// buttons like crazy. - /// - /// - /// - void UITimer_Tick(object sender, EventArgs e) - { - if (Viewer.DebugViewerEnabled == false) // Ctrl+9 sets this true to initialise the window and make it visible - { - Visible = false; - firstShow = true; - return; - } - - if (firstShow) - { - InitializeWindow(); - } - Visible = true; - - if (Program.Simulator.GameTime - lastUpdateTime < 1) - return; - - lastUpdateTime = Program.Simulator.GameTime; - - GenerateView(); - } - - private void InitializeWindow() - { - ViewWindow = new RectangleF(0, 0, 5000f, 5000f); - windowSizeUpDown.Accelerations.Add(new NumericUpDownAcceleration(1, 100)); - boxSetSignal.Items.Clear(); - boxSetSignal.Items.Add("System Controlled"); - boxSetSignal.Items.Add("Stop"); - boxSetSignal.Items.Add("Approach"); - boxSetSignal.Items.Add("Proceed"); - chkAllowUserSwitch.Checked = false; - selectedTrainList = new List(); - - InitData(); - InitImage(); - - MPManager.Instance().ServerChanged += (sender, e) => - { - firstShow = true; - }; - - MPManager.Instance().AvatarUpdated += (sender, e) => - { - AddAvatar(e.User, e.URL); - }; - - MPManager.Instance().MessageReceived += (sender, e) => - { - AddNewMessage(e.Time, e.Message); - }; - - tWindow.SelectedIndex = MPManager.IsMultiPlayer() ? 0 : 1; - TimetableWindow.SetControls(); - } - - #region initData - private void InitData() - { - if (!loaded) - { - // do this only once - loaded = true; - //trackSections.DataSource = new List(simulator.InterlockingSystem.Tracks.Values).ToArray(); - Localizer.Localize(this, Viewer.Catalog); - } - - switchItemsDrawn = new List(); - signalItemsDrawn = new List(); - switches = new List(); - for (int i = 0; i < nodes.Length; i++) - { - TrackNode currNode = nodes[i]; - - if (currNode != null) - { - - if (currNode.TrEndNode) - { - //buffers.Add(new PointF(currNode.UiD.TileX * 2048 + currNode.UiD.X, currNode.UiD.TileZ * 2048 + currNode.UiD.Z)); - } - else if (currNode.TrVectorNode != null) - { - - if (currNode.TrVectorNode.TrVectorSections.Length > 1) - { - AddSegments(segments, currNode, currNode.TrVectorNode.TrVectorSections, ref minX, ref minY, ref maxX, ref maxY, simulator); - } - else - { - TrVectorSection s = currNode.TrVectorNode.TrVectorSections[0]; - - foreach (TrPin pin in currNode.TrPins) - { - - TrackNode connectedNode = nodes[pin.Link]; - - dVector A = new dVector(s.TileX, s.X, s.TileZ, +s.Z); - dVector B = new dVector(connectedNode.UiD.TileX, connectedNode.UiD.X, connectedNode.UiD.TileZ, connectedNode.UiD.Z); - segments.Add(new LineSegment(A, B, /*s.InterlockingTrack.IsOccupied*/ false, null)); - } - - - } - } - else if (currNode.TrJunctionNode != null) - { - foreach (TrPin pin in currNode.TrPins) - { - var vectorSections = nodes[pin.Link]?.TrVectorNode?.TrVectorSections; - if (vectorSections == null || vectorSections.Length < 1) - continue; - TrVectorSection item = pin.Direction == 1 ? vectorSections.First() : vectorSections.Last(); - dVector A = new dVector(currNode.UiD.TileX, currNode.UiD.X, currNode.UiD.TileZ, +currNode.UiD.Z); - dVector B = new dVector(item.TileX, +item.X, item.TileZ, +item.Z); - var x = dVector.DistanceSqr(A, B); - if (x < 0.1) continue; - segments.Add(new LineSegment(B, A, /*s.InterlockingTrack.IsOccupied*/ false, item)); - } - switches.Add(new SwitchWidget(currNode)); - } - } - } - - var maxsize = maxX - minX > maxY - minY ? maxX - minX : maxY - minY; - // Take up to next 100 - maxsize = (int)(maxsize / 100 + 1) * 100; - windowSizeUpDown.Maximum = (decimal)maxsize; - Inited = true; - - if (simulator.TDB == null || simulator.TDB.TrackDB == null || simulator.TDB.TrackDB.TrItemTable == null) - return; - - TimetableWindow.PopulateItemLists(); - } - - bool Inited; - public List segments = new List(); - public List switches; - public List signals = new List(); - public List sidings = new List(); - public List platforms = new List(); - - /// - /// Initialises the picturebox and the image it contains. - /// - public void InitImage() - { - pbCanvas.Width = IM_Width; - pbCanvas.Height = IM_Height; - - if (pbCanvas.Image != null) - { - pbCanvas.Image.Dispose(); - } - - pbCanvas.Image = new Bitmap(pbCanvas.Width, pbCanvas.Height); - imageList1 = new ImageList(); - AvatarView.View = View.LargeIcon; - imageList1.ImageSize = new Size(64, 64); - AvatarView.LargeImageList = imageList1; - } - #endregion - - #region avatar - Dictionary avatarList; - public void AddAvatar(string name, string url) - { - if (avatarList == null) avatarList = new Dictionary(); - bool FindDefault = false; - try - { - if (Program.Simulator.Settings.ShowAvatar == false) throw new Exception(); - FindDefault = true; - var request = WebRequest.Create(url); - using (var response = request.GetResponse()) - using (var stream = response.GetResponseStream()) - { - Image newImage = Image.FromStream(stream);//Image.FromFile("C:\\test1.png");// - avatarList[name] = newImage; - } - } - catch - { - if (FindDefault) - { - byte[] imageBytes = Convert.FromBase64String(imagestring); - MemoryStream ms = new MemoryStream(imageBytes, 0, - imageBytes.Length); - - // Convert byte[] to Image - ms.Write(imageBytes, 0, imageBytes.Length); - Image newImage = Image.FromStream(ms, true); - avatarList[name] = newImage; - } - else - { - avatarList[name] = null; - } - } - } - - int LostCount = 0;//how many players in the lost list (quit) - public void CheckAvatar() - { - if (!MPManager.IsMultiPlayer() || MPManager.OnlineTrains == null || MPManager.OnlineTrains.Players == null) return; - var player = MPManager.OnlineTrains.Players; - var username = MPManager.GetUserName(); - player = player.Concat(MPManager.Instance().lostPlayer).ToDictionary(x => x.Key, x => x.Value); - if (avatarList == null) avatarList = new Dictionary(); - if (avatarList.Count == player.Count + 1 && LostCount == MPManager.Instance().lostPlayer.Count) return; - - LostCount = MPManager.Instance().lostPlayer.Count; - //add myself - if (!avatarList.ContainsKey(username)) - { - AddAvatar(username, Program.Simulator.Settings.AvatarURL); - } - - foreach (var p in player) - { - if (avatarList.ContainsKey(p.Key)) continue; - AddAvatar(p.Key, p.Value.url); - } - - Dictionary tmplist = null; - foreach (var a in avatarList) - { - if (player.ContainsKey(a.Key) || a.Key == username) continue; - if (tmplist == null) tmplist = new Dictionary(); - tmplist.Add(a.Key, a.Value); - } - - if (tmplist != null) - { - foreach (var t in tmplist) avatarList.Remove(t.Key); - } - imageList1.Images.Clear(); - AvatarView.Items.Clear(); - var i = 0; - if (!Program.Simulator.Settings.ShowAvatar) - { - AvatarView.View = View.List; - foreach (var pair in avatarList) - { - if (pair.Key != username) continue; - AvatarView.Items.Add(pair.Key); - } - i = 1; - foreach (var pair in avatarList) - { - if (pair.Key == username) - continue; - - if (MPManager.Instance().aiderList.Contains(pair.Key)) - { - AvatarView.Items.Add(pair.Key + " (H)"); - } - else if (MPManager.Instance().lostPlayer.ContainsKey(pair.Key)) - { - AvatarView.Items.Add(pair.Key + " (Q)"); - } - else - { - AvatarView.Items.Add(pair.Key); - } - - i++; - } - } - else - { - AvatarView.View = View.LargeIcon; - AvatarView.LargeImageList = imageList1; - foreach (var pair in avatarList) - { - if (pair.Key != username) continue; - - if (pair.Value == null) AvatarView.Items.Add(pair.Key).ImageIndex = -1; - else - { - AvatarView.Items.Add(pair.Key).ImageIndex = 0; - imageList1.Images.Add(pair.Value); - } - } - - i = 1; - foreach (var pair in avatarList) - { - if (pair.Key == username) continue; - var text = pair.Key; - if (MPManager.Instance().aiderList.Contains(pair.Key)) text = pair.Key + " (H)"; - - if (pair.Value == null) AvatarView.Items.Add(name).ImageIndex = -1; - else - { - AvatarView.Items.Add(text).ImageIndex = i; - imageList1.Images.Add(pair.Value); - i++; - } - } - } - } - #endregion - - #region Draw - public bool firstShow = true; - public bool followTrain; - public float subX, subY; - public float oldWidth; - public float oldHeight; - - //determine locations of buttons and boxes - void DetermineLocations() - { - if (Height < 600 || Width < 800) return; - if (oldHeight != Height || oldWidth != label1.Left)//use the label "Res" as anchor point to determine the picture size - { - oldWidth = label1.Left; oldHeight = Height; - IM_Width = label1.Left - 20; - IM_Height = Height - pbCanvas.Top; - pbCanvas.Width = IM_Width; - pbCanvas.Height = Height - pbCanvas.Top - 40; - if (pbCanvas.Image != null) - { - pbCanvas.Image.Dispose(); - } - - pbCanvas.Image = new Bitmap(pbCanvas.Width, pbCanvas.Height); - - if (btnAssist.Left - 10 < composeMSG.Right) - { - var size = composeMSG.Width; - composeMSG.Left = msgAll.Left = msgSelected.Left = reply2Selected.Left = btnAssist.Left - 10 - size; - MSG.Width = messages.Width = composeMSG.Left - 20; - } - firstShow = true; - } - } - - /// - /// Regenerates the 2D view. At the moment, examines the track network - /// each time the view is drawn. Later, the traversal and drawing can be separated. - /// - public void GenerateView(bool dragging = false) - { - if (!Inited) return; - - if (tWindow.SelectedIndex == 1) - { - TimetableWindow.GenerateTimetableView(dragging); - return; - } - - if (pbCanvas.Image == null) InitImage(); - DetermineLocations(); - - if (firstShow) - { - if (!MPManager.IsServer()) - { - chkAllowUserSwitch.Visible = false; - chkAllowUserSwitch.Checked = false; - rmvButton.Visible = false; - btnAssist.Visible = false; - btnNormal.Visible = false; - msgAll.Text = "MSG to Server"; - } - else - { - msgAll.Text = "MSG to All"; - } - if (MPManager.IsServer()) - { - rmvButton.Visible = true; - chkAllowNew.Visible = true; - chkAllowUserSwitch.Visible = true; - } - else - { - rmvButton.Visible = false; - chkAllowNew.Visible = false; - chkAllowUserSwitch.Visible = false; - chkBoxPenalty.Visible = false; - chkPreferGreen.Visible = false; - } - } - if (firstShow || followTrain) - { - //see who should I look at: - //if the player is selected in the avatar list, show the player, otherwise, show the one with the lowest index - WorldPosition pos = Program.Simulator.PlayerLocomotive == null ? Program.Simulator.Trains.First().Cars.First().WorldPosition : Program.Simulator.PlayerLocomotive.WorldPosition; - if (AvatarView.SelectedIndices.Count > 0 && !AvatarView.SelectedIndices.Contains(0)) - { - int i = AvatarView.SelectedIndices.Cast().Min(); - string name = (AvatarView.Items[i].Text ?? "").Split(' ').First().Trim(); - if (MPManager.OnlineTrains.Players.TryGetValue(name, out OnlinePlayer player)) - pos = player?.Train?.Cars?.FirstOrDefault()?.WorldPosition; - else if (MPManager.Instance().lostPlayer.TryGetValue(name, out OnlinePlayer lost)) - pos = lost?.Train?.Cars?.FirstOrDefault()?.WorldPosition; - } - if (pos == null) - pos = PickedTrain?.Cars?.FirstOrDefault()?.WorldPosition; - if (pos != null) - { - var ploc = new PointF(pos.TileX * 2048 + pos.Location.X, pos.TileZ * 2048 + pos.Location.Z); - ViewWindow.X = ploc.X - minX - ViewWindow.Width / 2; ViewWindow.Y = ploc.Y - minY - ViewWindow.Width / 2; - firstShow = false; - } - } - - try - { - CheckAvatar(); - } - catch { } //errors for avatar, just ignore - using (Graphics g = Graphics.FromImage(pbCanvas.Image)) - { - subX = minX + ViewWindow.X; subY = minY + ViewWindow.Y; - g.Clear(Color.White); - - xScale = pbCanvas.Width / ViewWindow.Width; - yScale = pbCanvas.Height / ViewWindow.Height; - - PointF[] points = new PointF[3]; - Pen p = grayPen; - - p.Width = MathHelper.Clamp(xScale, 1, 3); - greenPen.Width = orangePen.Width = redPen.Width = p.Width; pathPen.Width = 2 * p.Width; - trainPen.Width = p.Width * 6; - var forwardDist = 100 / xScale; if (forwardDist < 5) forwardDist = 5; - - PointF scaledA = new PointF(0, 0); - PointF scaledB = new PointF(0, 0); - PointF scaledC = new PointF(0, 0); - - foreach (var line in segments) - { - - scaledA.X = (line.A.TileX * 2048 - subX + (float)line.A.X) * xScale; scaledA.Y = pbCanvas.Height - (line.A.TileZ * 2048 - subY + (float)line.A.Z) * yScale; - scaledB.X = (line.B.TileX * 2048 - subX + (float)line.B.X) * xScale; scaledB.Y = pbCanvas.Height - (line.B.TileZ * 2048 - subY + (float)line.B.Z) * yScale; - - if ((scaledA.X < 0 && scaledB.X < 0) || (scaledA.X > IM_Width && scaledB.X > IM_Width) || (scaledA.Y > IM_Height && scaledB.Y > IM_Height) || (scaledA.Y < 0 && scaledB.Y < 0)) - continue; - - if (line.isCurved == true) - { - scaledC.X = ((float)line.C.X - subX) * xScale; scaledC.Y = pbCanvas.Height - ((float)line.C.Z - subY) * yScale; - points[0] = scaledA; points[1] = scaledC; points[2] = scaledB; - g.DrawCurve(p, points); - } - else - { - g.DrawLine(p, scaledA, scaledB); - } - } - - switchItemsDrawn.Clear(); - signalItemsDrawn.Clear(); - float x, y; - PointF scaledItem = new PointF(0f, 0f); - var width = 6f * p.Width; if (width > 15) width = 15;//not to make it too large - for (var i = 0; i < switches.Count; i++) - { - SwitchWidget sw = switches[i]; - - x = (sw.Location.X - subX) * xScale; y = pbCanvas.Height - (sw.Location.Y - subY) * yScale; - - if (x < 0 || x > IM_Width || y > IM_Height || y < 0) continue; - - scaledItem.X = x; scaledItem.Y = y; - - - if (sw.Item.TrJunctionNode.SelectedRoute == sw.main) g.FillEllipse(Brushes.Black, GetRect(scaledItem, width)); - else g.FillEllipse(Brushes.Gray, GetRect(scaledItem, width)); - - sw.Location2D.X = scaledItem.X; sw.Location2D.Y = scaledItem.Y; - switchItemsDrawn.Add(sw); - } - - foreach (var s in signals) - { - if (float.IsNaN(s.Location.X) || float.IsNaN(s.Location.Y)) continue; - x = (s.Location.X - subX) * xScale; y = pbCanvas.Height - (s.Location.Y - subY) * yScale; - if (x < 0 || x > IM_Width || y > IM_Height || y < 0) continue; - scaledItem.X = x; scaledItem.Y = y; - s.Location2D.X = scaledItem.X; s.Location2D.Y = scaledItem.Y; - if (s.Signal.isSignalNormal())//only show nor - { - var color = Brushes.Green; - var pen = greenPen; - if (s.IsProceed == 0) - { - } - else if (s.IsProceed == 1) - { - color = Brushes.Orange; - pen = orangePen; - } - else - { - color = Brushes.Red; - pen = redPen; - } - g.FillEllipse(color, GetRect(scaledItem, width)); - signalItemsDrawn.Add(s); - if (s.hasDir) - { - scaledB.X = (s.Dir.X - subX) * xScale; scaledB.Y = pbCanvas.Height - (s.Dir.Y - subY) * yScale; - g.DrawLine(pen, scaledItem, scaledB); - } - } - } - - if (true/*showPlayerTrain.Checked*/) - { - CleanVerticalCells();//clean the drawing area for text of sidings and platforms - foreach (var sw in sidings) - scaledItem = DrawSiding(g, scaledItem, sw); - foreach (var pw in platforms) - scaledItem = DrawPlatform(g, scaledItem, pw); - - var margin = 30 * xScale;//margins to determine if we want to draw a train - var margin2 = 5000 * xScale; - - //variable for drawing train path - var mDist = 5000f; var pDist = 50; //segment length when draw path - - selectedTrainList.Clear(); - foreach (var t in simulator.Trains) selectedTrainList.Add(t); - - var redTrain = selectedTrainList.Count; - - //choosen trains will be drawn later using blue, so it will overlap on the red lines - var chosen = AvatarView.SelectedItems; - if (chosen.Count > 0) - { - for (var i = 0; i < chosen.Count; i++) - { - var name = chosen[i].Text.Split(' ')[0].Trim(); //filter out (H) in the text - var train = MPManager.OnlineTrains.findTrain(name); - if (train != null) { selectedTrainList.Remove(train); selectedTrainList.Add(train); redTrain--; } - //if selected include myself, will show it as blue - if (MPManager.GetUserName() == name && Program.Simulator.PlayerLocomotive != null) - { - selectedTrainList.Remove(Program.Simulator.PlayerLocomotive.Train); selectedTrainList.Add(Program.Simulator.PlayerLocomotive.Train); - redTrain--; - } - - } - } - - //trains selected in the avatar view list will be drawn in blue, others will be drawn in red - pathPen.Color = Color.Red; - var drawRed = 0; - int ValidTrain = selectedTrainList.Count(); - //add trains quit into the end, will draw them in gray - var quitTrains = MPManager.Instance().lostPlayer.Values - .Select((OnlinePlayer lost) => lost?.Train) - .Where((Train t) => t != null) - .Where((Train t) => !selectedTrainList.Contains(t)); - selectedTrainList.AddRange(quitTrains); - foreach (Train t in selectedTrainList) - { - drawRed++;//how many red has been drawn - if (drawRed > redTrain) pathPen.Color = Color.Blue; //more than the red should be drawn, thus draw in blue - - name = ""; - TrainCar firstCar = null; - if (t.LeadLocomotive != null) - { - worldPos = t.LeadLocomotive.WorldPosition; - name = t.GetTrainName(t.LeadLocomotive.CarID); - firstCar = t.LeadLocomotive; - } - else if (t.Cars != null && t.Cars.Count > 0) - { - worldPos = t.Cars[0].WorldPosition; - name = t.GetTrainName(t.Cars[0].CarID); - if (t.TrainType == Train.TRAINTYPE.AI) - name = t.Number.ToString() + ":" + t.Name; - firstCar = t.Cars[0]; - } - else continue; - - if (xScale < 0.3 || t.FrontTDBTraveller == null || t.RearTDBTraveller == null) - { - worldPos = firstCar.WorldPosition; - scaledItem.X = (worldPos.TileX * 2048 - subX + worldPos.Location.X) * xScale; - scaledItem.Y = pbCanvas.Height - (worldPos.TileZ * 2048 - subY + worldPos.Location.Z) * yScale; - if (scaledItem.X < -margin2 || scaledItem.X > IM_Width + margin2 || scaledItem.Y > IM_Height + margin2 || scaledItem.Y < -margin2) continue; - if (drawRed > ValidTrain) g.FillRectangle(Brushes.Gray, GetRect(scaledItem, 15f)); - else - { - if (t == PickedTrain) g.FillRectangle(Brushes.Red, GetRect(scaledItem, 15f)); - else g.FillRectangle(Brushes.DarkGreen, GetRect(scaledItem, 15f)); - scaledItem.Y -= 25; - DrawTrainPath(t, subX, subY, pathPen, g, scaledA, scaledB, pDist, mDist); - } - g.DrawString(name, trainFont, trainBrush, scaledItem); - continue; - } - var loc = t.FrontTDBTraveller.WorldLocation; - x = (loc.TileX * 2048 + loc.Location.X - subX) * xScale; y = pbCanvas.Height - (loc.TileZ * 2048 + loc.Location.Z - subY) * yScale; - if (x < -margin2 || x > IM_Width + margin2 || y > IM_Height + margin2 || y < -margin2) continue; - - //train quit will not draw path, others will draw it - if (drawRed <= ValidTrain) DrawTrainPath(t, subX, subY, pathPen, g, scaledA, scaledB, pDist, mDist); - - trainPen.Color = Color.DarkGreen; - foreach (var car in t.Cars) - { - Traveller t1 = new Traveller(t.RearTDBTraveller); - worldPos = car.WorldPosition; - var dist = t1.DistanceTo(worldPos.WorldLocation.TileX, worldPos.WorldLocation.TileZ, worldPos.WorldLocation.Location.X, worldPos.WorldLocation.Location.Y, worldPos.WorldLocation.Location.Z); - if (dist > 0) - { - t1.Move(dist - 1 + car.CarLengthM / 2); - x = (t1.TileX * 2048 + t1.Location.X - subX) * xScale; y = pbCanvas.Height - (t1.TileZ * 2048 + t1.Location.Z - subY) * yScale; - //x = (worldPos.TileX * 2048 + worldPos.Location.X - minX - ViewWindow.X) * xScale; y = pictureBox1.Height - (worldPos.TileZ * 2048 + worldPos.Location.Z - minY - ViewWindow.Y) * yScale; - if (x < -margin || x > IM_Width + margin || y > IM_Height + margin || y < -margin) continue; - - scaledItem.X = x; scaledItem.Y = y; - - t1.Move(-car.CarLengthM); - x = (t1.TileX * 2048 + t1.Location.X - subX) * xScale; y = pbCanvas.Height - (t1.TileZ * 2048 + t1.Location.Z - subY) * yScale; - if (x < -margin || x > IM_Width + margin || y > IM_Height + margin || y < -margin) continue; - - scaledA.X = x; scaledA.Y = y; - - //if the train has quit, will draw in gray, if the train is selected by left click of the mouse, will draw it in red - if (drawRed > ValidTrain) trainPen.Color = Color.Gray; - else if (t == PickedTrain) trainPen.Color = Color.Red; - g.DrawLine(trainPen, scaledA, scaledItem); - } - } - worldPos = firstCar.WorldPosition; - scaledItem.X = (worldPos.TileX * 2048 - subX + worldPos.Location.X) * xScale; - scaledItem.Y = -25 + pbCanvas.Height - (worldPos.TileZ * 2048 - subY + worldPos.Location.Z) * yScale; - - g.DrawString(name, trainFont, trainBrush, scaledItem); - - } - if (switchPickedItemHandled) - switchPickedItem = null; - if (signalPickedItemHandled) - signalPickedItem = null; - } - } - - pbCanvas.Invalidate(); - } - - private PointF DrawSiding(Graphics g, PointF scaledItem, SidingWidget s) - { - scaledItem.X = (s.Location.X - subX) * xScale; - scaledItem.Y = DetermineSidingLocation(scaledItem.X, pbCanvas.Height - (s.Location.Y - subY) * yScale, s.Name); - if (scaledItem.Y >= 0f) //if we need to draw the siding names - { - g.DrawString(s.Name, sidingFont, sidingBrush, scaledItem); - } - return scaledItem; - } - - private PointF DrawPlatform(Graphics g, PointF scaledItem, PlatformWidget s) - { - scaledItem.X = (s.Location.X - subX) * xScale; - scaledItem.Y = DetermineSidingLocation(scaledItem.X, pbCanvas.Height - (s.Location.Y - subY) * yScale, s.Name); - if (scaledItem.Y >= 0f) //if we need to draw the siding names - { - g.DrawString(s.Name, sidingFont, sidingBrush, scaledItem); - } - return scaledItem; - } - - public Vector2[][] alignedTextY; - public int[] alignedTextNum; - public const int spacing = 12; - private void CleanVerticalCells() - { - if (alignedTextY == null || alignedTextY.Length != IM_Height / spacing) //first time to put text, or the text height has changed - { - alignedTextY = new Vector2[IM_Height / spacing][]; - alignedTextNum = new int[IM_Height / spacing]; - for (var i = 0; i < IM_Height / spacing; i++) - alignedTextY[i] = new Vector2[4]; //each line has at most 4 sidings - } - for (var i = 0; i < IM_Height / spacing; i++) - { - alignedTextNum[i] = 0; - } - } - - private float DetermineSidingLocation(float startX, float wantY, string name) - { - //out of drawing area - if (startX < -64 || startX > IM_Width || wantY < -spacing || wantY > IM_Height) return -1f; - - int position = (int)(wantY / spacing);//the cell of the text it wants in - if (position > alignedTextY.Length) return wantY;//position is larger than the number of cells - var endX = startX + name.Length * trainFont.Size; - int desiredPosition = position; - while (position < alignedTextY.Length && position >= 0) - { - //if the line contains no text yet, put it there - if (alignedTextNum[position] == 0) - { - alignedTextY[position][alignedTextNum[position]].X = startX; - alignedTextY[position][alignedTextNum[position]].Y = endX;//add info for the text (i.e. start and end location) - alignedTextNum[position]++; - return position * spacing; - } - - bool conflict = false; - //check if it is intersect any one in the cell - foreach (Vector2 v in alignedTextY[position]) - { - //check conflict with a text, v.x is the start of the text, v.y is the end of the text - if ((startX > v.X && startX < v.Y) || (endX > v.X && endX < v.Y) || (v.X > startX && v.X < endX) || (v.Y > startX && v.Y < endX)) - { - conflict = true; - break; - } - } - if (conflict == false) //no conflict - { - if (alignedTextNum[position] >= alignedTextY[position].Length) return -1f; - alignedTextY[position][alignedTextNum[position]].X = startX; - alignedTextY[position][alignedTextNum[position]].Y = endX;//add info for the text (i.e. start and end location) - alignedTextNum[position]++; - return position * spacing; - } - position--; - //cannot move up, then try to move it down - if (position - desiredPosition < -1) - { - position = desiredPosition + 2; - } - //could not find any position up or down, just return negative - if (position == desiredPosition) return -1f; - } - return position * spacing; - } - - const float SignalErrorDistance = 100; - const float SignalWarningDistance = 500; - const float DisplayDistance = 1000; - const float DisplaySegmentLength = 10; - const float MaximumSectionDistance = 10000; - - Dictionary Cache = new Dictionary(); - SignallingDebugWindow.TrackSectionCacheEntry GetCacheEntry(Traveller position) - { - SignallingDebugWindow.TrackSectionCacheEntry rv; - if (Cache.TryGetValue(position.TrackNodeIndex, out rv) && (rv.Direction == position.Direction)) - return rv; - Cache[position.TrackNodeIndex] = rv = new SignallingDebugWindow.TrackSectionCacheEntry() - { - Direction = position.Direction, - Length = 0, - Objects = new List(), - }; - var nodeIndex = position.TrackNodeIndex; - var trackNode = new Traveller(position); - while (true) - { - rv.Length += MaximumSectionDistance - trackNode.MoveInSection(MaximumSectionDistance); - if (!trackNode.NextSection()) - break; - if (trackNode.IsEnd) - rv.Objects.Add(new SignallingDebugWindow.TrackSectionEndOfLine() { Distance = rv.Length }); - else if (trackNode.IsJunction) - rv.Objects.Add(new SignallingDebugWindow.TrackSectionSwitch() { Distance = rv.Length, TrackNode = trackNode.TN, NodeIndex = nodeIndex }); - else - rv.Objects.Add(new SignallingDebugWindow.TrackSectionObject() { Distance = rv.Length }); // Always have an object at the end. - if (trackNode.TrackNodeIndex != nodeIndex) - break; - } - trackNode = new Traveller(position); - - rv.Objects = rv.Objects.OrderBy(tso => tso.Distance).ToList(); - return rv; - } - - //draw the train path if it is within the window - public void DrawTrainPath(Train train, float subX, float subY, Pen pathPen, Graphics g, PointF scaledA, PointF scaledB, float stepDist, float MaximumSectionDistance) - { - if (DrawPath != true) return; - bool ok = false; - if (train == Program.Simulator.PlayerLocomotive.Train) ok = true; - if (MPManager.IsMultiPlayer()) - { - if (MPManager.OnlineTrains.findTrain(train)) - ok = true; - } - if (train.FirstCar != null & train.FirstCar.CarID.Contains("AI")) // AI train - ok = true; - if (Math.Abs(train.SpeedMpS) > 0.001) - ok = true; - - if (ok == false) return; - - var DisplayDistance = MaximumSectionDistance; - var position = train.MUDirection != Direction.Reverse ? new Traveller(train.FrontTDBTraveller) : new Traveller(train.RearTDBTraveller, Traveller.TravellerDirection.Backward); - var caches = new List(); - // Work backwards until we end up on a different track section. - var cacheNode = new Traveller(position); - cacheNode.ReverseDirection(); - var initialNodeOffsetCount = 0; - while (cacheNode.TrackNodeIndex == position.TrackNodeIndex && cacheNode.NextSection()) - initialNodeOffsetCount++; - // Now do it again, but don't go the last track section (because it is from a different track node). - cacheNode = new Traveller(position); - cacheNode.ReverseDirection(); - for (var i = 1; i < initialNodeOffsetCount; i++) - cacheNode.NextSection(); - // Push the location right up to the end of the section. - cacheNode.MoveInSection(MaximumSectionDistance); - // Now back facing the right way, calculate the distance to the train location. - cacheNode.ReverseDirection(); - var initialNodeOffset = cacheNode.DistanceTo(position.TileX, position.TileZ, position.X, position.Y, position.Z); - // Go and collect all the cache entries for the visible range of vector nodes (straights, curves). - var totalDistance = 0f; - while (!cacheNode.IsEnd && totalDistance - initialNodeOffset < DisplayDistance) - { - if (cacheNode.IsTrack) - { - var cache = GetCacheEntry(cacheNode); - cache.Age = 0; - caches.Add(cache); - totalDistance += cache.Length; - } - var nodeIndex = cacheNode.TrackNodeIndex; - while (cacheNode.TrackNodeIndex == nodeIndex && cacheNode.NextSection()) ; - } - - var switchErrorDistance = initialNodeOffset + DisplayDistance + SignalWarningDistance; - var signalErrorDistance = initialNodeOffset + DisplayDistance + SignalWarningDistance; - var currentDistance = 0f; - foreach (var cache in caches) - { - foreach (var obj in cache.Objects) - { - var objDistance = currentDistance + obj.Distance; - if (objDistance < initialNodeOffset) - continue; - - var switchObj = obj as SignallingDebugWindow.TrackSectionSwitch; - if (switchObj != null) - { - for (var pin = switchObj.TrackNode.Inpins; pin < switchObj.TrackNode.Inpins + switchObj.TrackNode.Outpins; pin++) - { - if (switchObj.TrackNode.TrPins[pin].Link == switchObj.NodeIndex) - { - if (pin - switchObj.TrackNode.Inpins != switchObj.TrackNode.TrJunctionNode.SelectedRoute) - switchErrorDistance = objDistance; - break; - } - } - if (switchErrorDistance < DisplayDistance) - break; - } - - } - if (switchErrorDistance < DisplayDistance || signalErrorDistance < DisplayDistance) - break; - currentDistance += cache.Length; - } - - var currentPosition = new Traveller(position); - currentPosition.Move(-initialNodeOffset); - currentDistance = 0; - - foreach (var cache in caches) - { - var lastObjDistance = 0f; - foreach (var obj in cache.Objects) - { - var objDistance = currentDistance + obj.Distance; - - for (var step = lastObjDistance; step < obj.Distance; step += DisplaySegmentLength) - { - var stepDistance = currentDistance + step; - var stepLength = DisplaySegmentLength > obj.Distance - step ? obj.Distance - step : DisplaySegmentLength; - var previousLocation = currentPosition.WorldLocation; - currentPosition.Move(stepLength); - if (stepDistance + stepLength >= initialNodeOffset && stepDistance <= initialNodeOffset + DisplayDistance) - { - var currentLocation = currentPosition.WorldLocation; - scaledA.X = (float)((previousLocation.TileX * WorldLocation.TileSize + previousLocation.Location.X - subX) * xScale); - scaledA.Y = (float)(pbCanvas.Height - (previousLocation.TileZ * WorldLocation.TileSize + previousLocation.Location.Z - subY) * yScale); - scaledB.X = (float)((currentLocation.TileX * WorldLocation.TileSize + currentLocation.Location.X - subX) * xScale); - scaledB.Y = (float)(pbCanvas.Height - (currentPosition.TileZ * WorldLocation.TileSize + currentPosition.Location.Z - subY) * yScale); g.DrawLine(pathPen, scaledA, scaledB); - } - } - lastObjDistance = obj.Distance; - - if (objDistance >= switchErrorDistance) - break; - } - currentDistance += cache.Length; - if (currentDistance >= switchErrorDistance) - break; - - } - - currentPosition = new Traveller(position); - currentPosition.Move(-initialNodeOffset); - currentDistance = 0; - foreach (var cache in caches) - { - var lastObjDistance = 0f; - foreach (var obj in cache.Objects) - { - currentPosition.Move(obj.Distance - lastObjDistance); - lastObjDistance = obj.Distance; - - var objDistance = currentDistance + obj.Distance; - if (objDistance < initialNodeOffset || objDistance > initialNodeOffset + DisplayDistance) - continue; - - var switchObj = obj as SignallingDebugWindow.TrackSectionSwitch; - if (switchObj != null) - { - for (var pin = switchObj.TrackNode.Inpins; pin < switchObj.TrackNode.Inpins + switchObj.TrackNode.Outpins; pin++) - { - if (switchObj.TrackNode.TrPins[pin].Link == switchObj.NodeIndex && pin - switchObj.TrackNode.Inpins != switchObj.TrackNode.TrJunctionNode.SelectedRoute) - { - foreach (var sw in switchItemsDrawn) - { - if (sw.Item.TrJunctionNode == switchObj.TrackNode.TrJunctionNode) - { - var r = 6 * greenPen.Width; - g.DrawLine(pathPen, new PointF(sw.Location2D.X - r, sw.Location2D.Y - r), new PointF(sw.Location2D.X + r, sw.Location2D.Y + r)); - g.DrawLine(pathPen, new PointF(sw.Location2D.X - r, sw.Location2D.Y + r), new PointF(sw.Location2D.X + r, sw.Location2D.Y - r)); - break; - } - } - } - } - } - - if (objDistance >= switchErrorDistance) - break; - } - currentDistance += cache.Length; - if (currentDistance >= switchErrorDistance) - break; - } - // Clean up any cache entries who haven't been using for 30 seconds. - var oldCaches = Cache.Where(kvp => kvp.Value.Age > 30 * 4).ToArray(); - foreach (var oldCache in oldCaches) - Cache.Remove(oldCache.Key); - - } - #endregion - - /// - /// Generates a rectangle representing a dot being drawn. - /// - /// Center point of the dot, in pixels. - /// Size of the dot's diameter, in pixels - /// - static public RectangleF GetRect(PointF p, float size) - { - return new RectangleF(p.X - size / 2f, p.Y - size / 2f, size, size); - } - - /// - /// Generates line segments from an array of TrVectorSection. Also computes - /// the bounds of the entire route being drawn. - /// - /// - /// - /// - /// - /// - /// - /// - private static void AddSegments(List segments, TrackNode node, TrVectorSection[] items, ref float minX, ref float minY, ref float maxX, ref float maxY, Simulator simulator) - { - - bool occupied = false; - - double tempX1, tempX2, tempZ1, tempZ2; - - for (int i = 0; i < items.Length - 1; i++) - { - dVector A = new dVector(items[i].TileX, items[i].X, items[i].TileZ, items[i].Z); - dVector B = new dVector(items[i + 1].TileX, items[i + 1].X, items[i + 1].TileZ, items[i + 1].Z); - - tempX1 = A.TileX * 2048 + A.X; tempX2 = B.TileX * 2048 + B.X; - tempZ1 = A.TileZ * 2048 + A.Z; tempZ2 = B.TileZ * 2048 + B.Z; - CalcBounds(ref maxX, tempX1, true); - CalcBounds(ref maxY, tempZ1, true); - CalcBounds(ref maxX, tempX2, true); - CalcBounds(ref maxY, tempZ2, true); - - CalcBounds(ref minX, tempX1, false); - CalcBounds(ref minY, tempZ1, false); - CalcBounds(ref minX, tempX2, false); - CalcBounds(ref minY, tempZ2, false); - - segments.Add(new LineSegment(A, B, occupied, items[i])); - } - } - - /// - /// Given a value representing a limit, evaluate if the given value exceeds the current limit. - /// If so, expand the limit. - /// - /// The current limit. - /// The value to compare the limit to. - /// True when comparison is greater-than. False if less-than. - private static void CalcBounds(ref float limit, double v, bool gt) - { - float value = (float)v; - if (gt) - { - if (value > limit) - { - limit = value; - } - } - else - { - if (value < limit) - { - limit = value; - } - } - } - - private float ScrollSpeedX - { - get - { - return ViewWindow.Width * 0.10f; - } - } - - private float ScrollSpeedY - { - get - { - return ViewWindow.Width * 0.10f; - } - } - - private void refreshButton_Click(object sender, EventArgs e) - { - followTrain = false; - firstShow = true; - GenerateView(); - } - - private void ShiftViewUp() - { - ViewWindow.Offset(0, -ScrollSpeedY); - - GenerateView(); - } - private void ShiftViewDown() - { - ViewWindow.Offset(0, ScrollSpeedY); - - GenerateView(); - } - - private void ShiftViewRight() - { - ViewWindow.Offset(ScrollSpeedX, 0); - - GenerateView(); - } - - - private void ShiftViewLeft() - { - ViewWindow.Offset(-ScrollSpeedX, 0); - - GenerateView(); - } - - private void rmvButton_Click(object sender, EventArgs e) - { - if (!MPManager.IsServer()) return; - AvatarView.SelectedIndices.Remove(0);//remove myself is not possible. - var chosen = AvatarView.SelectedItems; - if (chosen.Count > 0) - { - for (var i = 0; i < chosen.Count; i++) - { - var tmp = chosen[i]; - var name = tmp.Text.Split(' ')[0];//the name may have (H) in it, need to filter that out - if (MPManager.OnlineTrains.Players.ContainsKey(name)) - { - MPManager.OnlineTrains.Players[name].status = OnlinePlayer.Status.Removed; - MPManager.BroadCast(new MSGMessage(name, "Error", "Sorry the server has removed you").ToString()); - } - } - } - } - - - private void windowSizeUpDown_ValueChanged(object sender, EventArgs e) - { - // this is the center, before increasing the size - PointF center = new PointF(ViewWindow.X + ViewWindow.Width / 2f, ViewWindow.Y + ViewWindow.Height / 2f); - - float newSizeH = (float)windowSizeUpDown.Value; - float verticalByHorizontal = ViewWindow.Height / ViewWindow.Width; - float newSizeV = newSizeH * verticalByHorizontal; - - ViewWindow = new RectangleF(center.X - newSizeH / 2f, center.Y - newSizeV / 2f, newSizeH, newSizeV); - - GenerateView(); - } - - - protected override void OnMouseWheel(MouseEventArgs e) - { - decimal tempValue = windowSizeUpDown.Value; - if (e.Delta < 0) tempValue /= 0.95m; - else if (e.Delta > 0) tempValue *= 0.95m; - else return; - - if (tempValue < windowSizeUpDown.Minimum) tempValue = windowSizeUpDown.Minimum; - if (tempValue > windowSizeUpDown.Maximum) tempValue = windowSizeUpDown.Maximum; - windowSizeUpDown.Value = tempValue; - } - - private bool Zooming; - private bool LeftClick; - private bool RightClick; - - private void pictureBoxMouseDown(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) LeftClick = true; - if (e.Button == MouseButtons.Right) RightClick = true; - - if (LeftClick == true && RightClick == false) - { - if (Dragging == false) - { - Dragging = true; - } - } - else if (LeftClick == true && RightClick == true) - { - if (Zooming == false) Zooming = true; - } - LastCursorPosition.X = e.X; - LastCursorPosition.Y = e.Y; - MPManager.Instance().ComposingText = false; - lblInstruction1.Visible = true; - lblInstruction2.Visible = true; - lblInstruction3.Visible = true; - lblInstruction4.Visible = true; - } - - private void pictureBoxMouseUp(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) LeftClick = false; - if (e.Button == MouseButtons.Right) RightClick = false; - - if (LeftClick == false) - { - Dragging = false; - Zooming = false; - } - - if ((ModifierKeys & Keys.Shift) == Keys.Shift) - { - PictureMoveAndZoomInOut(e.X, e.Y, 1200); - } - else if ((ModifierKeys & Keys.Alt) == Keys.Alt) - { - PictureMoveAndZoomInOut(e.X, e.Y, 30000); - } - else if ((ModifierKeys & Keys.Control) == Keys.Control) - { - PictureMoveAndZoomInOut(e.X, e.Y, windowSizeUpDown.Maximum); - } - else if (LeftClick == false) - { - if (LastCursorPosition.X == e.X && LastCursorPosition.Y == e.Y) - { - var range = 5 * (int)xScale; if (range > 10) range = 10; - var temp = findItemFromMouse(e.X, e.Y, range); - if (temp != null) - { - if (temp is SwitchWidget) - { - switchPickedItem = (SwitchWidget)temp; - signalPickedItem = null; - HandlePickedSwitch(); - } - if (temp is SignalWidget) - { - signalPickedItem = (SignalWidget)temp; - switchPickedItem = null; - HandlePickedSignal(); - } - } - else - { - switchPickedItem = null; - signalPickedItem = null; - UnHandleItemPick(); - PickedTrain = null; - } - } - - } - lblInstruction1.Visible = false; - lblInstruction2.Visible = false; - lblInstruction3.Visible = false; - lblInstruction4.Visible = false; - - } - - private void UnHandleItemPick() - { - boxSetSignal.Visible = false; - boxSetSwitch.Visible = false; - } - - private void HandlePickedSignal() - { - if (MPManager.IsClient() && !MPManager.Instance().AmAider) // normal client not server or aider - return; - boxSetSwitch.Visible = false; - if (signalPickedItem == null) return; - var y = LastCursorPosition.Y; - if (LastCursorPosition.Y < 100) y = 100; - if (LastCursorPosition.Y > pbCanvas.Size.Height - 100) y = pbCanvas.Size.Height - 100; - - if (boxSetSignal.Items.Count == 5) - boxSetSignal.Items.RemoveAt(4); - - if (signalPickedItem.Signal.enabledTrain != null && signalPickedItem.Signal.CallOnEnabled) - { - if (!signalPickedItem.Signal.CallOnManuallyAllowed) - boxSetSignal.Items.Add("Allow call on"); - } - - boxSetSignal.Location = new System.Drawing.Point(LastCursorPosition.X + 2, y); - boxSetSignal.Enabled = true; - boxSetSignal.Focus(); - boxSetSignal.SelectedIndex = -1; - boxSetSignal.Visible = true; - return; - } - - private void HandlePickedSwitch() - { - if (MPManager.IsClient() && !MPManager.Instance().AmAider) - return;//normal client not server - - boxSetSignal.Visible = false; - if (switchPickedItem == null) return; - var y = LastCursorPosition.Y + 100; - if (y < 140) y = 140; - if (y > pbCanvas.Size.Height + 100) y = pbCanvas.Size.Height + 100; - boxSetSwitch.Location = new System.Drawing.Point(LastCursorPosition.X + 2, y); - boxSetSwitch.Enabled = true; - boxSetSwitch.Focus(); - boxSetSwitch.SelectedIndex = -1; - boxSetSwitch.Visible = true; - return; - } - - private ItemWidget findItemFromMouse(int x, int y, int range) - { - if (range < 5) range = 5; - double closest = float.NaN; - ItemWidget closestItem = null; - if (chkPickSwitches.Checked == true) - { - foreach (var item in switchItemsDrawn) - { - //if out of range, continue - if (item.Location2D.X < x - range || item.Location2D.X > x + range - || item.Location2D.Y < y - range || item.Location2D.Y > y + range) - continue; - - if (closestItem != null) - { - var dist = Math.Pow(item.Location2D.X - closestItem.Location2D.X, 2) + Math.Pow(item.Location2D.Y - closestItem.Location2D.Y, 2); - if (dist < closest) - { - closest = dist; closestItem = item; - } - } - else closestItem = item; - } - if (closestItem != null) - { - switchPickedTime = simulator.GameTime; - return closestItem; - } - } - if (chkPickSignals.Checked == true) - { - foreach (var item in signalItemsDrawn) - { - //if out of range, continue - if (item.Location2D.X < x - range || item.Location2D.X > x + range - || item.Location2D.Y < y - range || item.Location2D.Y > y + range) - continue; - - if (closestItem != null) - { - var dist = Math.Pow(item.Location2D.X - closestItem.Location2D.X, 2) + Math.Pow(item.Location2D.Y - closestItem.Location2D.Y, 2); - if (dist < closest) - { - closest = dist; closestItem = item; - } - } - else closestItem = item; - } - if (closestItem != null) - { - switchPickedTime = simulator.GameTime; - return closestItem; - } - } - - //now check for trains (first car only) - TrainCar firstCar; - PickedTrain = null; float tX, tY; - closest = 100f; - - foreach (var t in Program.Simulator.Trains) - { - firstCar = null; - if (t.LeadLocomotive != null) - { - worldPos = t.LeadLocomotive.WorldPosition; - firstCar = t.LeadLocomotive; - } - else if (t.Cars != null && t.Cars.Count > 0) - { - worldPos = t.Cars[0].WorldPosition; - firstCar = t.Cars[0]; - - } - else - continue; - - worldPos = firstCar.WorldPosition; - tX = (worldPos.TileX * 2048 - subX + worldPos.Location.X) * xScale; - tY = pbCanvas.Height - (worldPos.TileZ * 2048 - subY + worldPos.Location.Z) * yScale; - float xSpeedCorr = Math.Abs(t.SpeedMpS) * xScale * 1.5f; - float ySpeedCorr = Math.Abs(t.SpeedMpS) * yScale * 1.5f; - - if (tX < x - range - xSpeedCorr || tX > x + range + xSpeedCorr || tY < y - range - ySpeedCorr || tY > y + range + ySpeedCorr) - continue; - if (PickedTrain == null) - PickedTrain = t; - } - //if a train is picked, will clear the avatar list selection - if (PickedTrain != null) - { - AvatarView.SelectedItems.Clear(); - return new TrainWidget(PickedTrain); - } - return null; - } - - private void pictureBoxMouseMove(object sender, MouseEventArgs e) - { - if (tWindow.SelectedIndex == 1) - TimetableDrag(sender, e); - else - { - if (Dragging && !Zooming) - { - int diffX = LastCursorPosition.X - e.X; - int diffY = LastCursorPosition.Y - e.Y; - - ViewWindow.Offset(diffX * ScrollSpeedX / 10, -diffY * ScrollSpeedX / 10); - GenerateView(); - } - else if (Zooming) - { - decimal tempValue = windowSizeUpDown.Value; - if (LastCursorPosition.Y - e.Y < 0) tempValue /= 0.95m; - else if (LastCursorPosition.Y - e.Y > 0) tempValue *= 0.95m; - - if (tempValue < windowSizeUpDown.Minimum) tempValue = windowSizeUpDown.Minimum; - if (tempValue > windowSizeUpDown.Maximum) tempValue = windowSizeUpDown.Maximum; - windowSizeUpDown.Value = tempValue; - GenerateView(); - } - LastCursorPosition.X = e.X; - LastCursorPosition.Y = e.Y; - } - } - - public bool AddNewMessage(double _, string msg) - { - if (messages.Items.Count > 10) - messages.Items.RemoveAt(0); - messages.Items.Add(msg); - messages.SelectedIndex = messages.Items.Count - 1; - messages.SelectedIndex = -1; - return true; - } - - private void chkAllowUserSwitch_CheckedChanged(object sender, EventArgs e) - { - MPManager.AllowedManualSwitch = chkAllowUserSwitch.Checked; - if (chkAllowUserSwitch.Checked == true) { MPManager.BroadCast(new MSGMessage("All", "SwitchOK", "OK to switch").ToString()); } - else { MPManager.BroadCast(new MSGMessage("All", "SwitchWarning", "Cannot switch").ToString()); } - } - - private void chkShowAvatars_CheckedChanged(object sender, EventArgs e) - { - Program.Simulator.Settings.ShowAvatar = chkShowAvatars.Checked; - AvatarView.Items.Clear(); - - if (avatarList != null) - avatarList.Clear(); - - if (chkShowAvatars.Checked) - AvatarView.Font = new Font(FontFamily.GenericSansSerif, 12); - else - AvatarView.Font = new Font(FontFamily.GenericSansSerif, 16); - - try - { - CheckAvatar(); - } - catch { } - } - - private const int CP_NOCLOSE_BUTTON = 0x200; - protected override CreateParams CreateParams - { - get - { - CreateParams myCp = base.CreateParams; - myCp.ClassStyle = myCp.ClassStyle | CP_NOCLOSE_BUTTON; - return myCp; - } - } - string imagestring = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAACpJREFUOE9jYBjs4D/QgSBMNhg1ABKAFAUi2aFPNY0Ue4FiA6jmlUFsEABfyg/x8/L8/gAAAABJRU5ErkJggg=="; - - private void composeMSG_Click(object sender, EventArgs e) - { - MSG.Enabled = true; - MSG.Focus(); - MPManager.Instance().ComposingText = true; - msgAll.Enabled = true; - if (messages.SelectedItems.Count > 0) msgSelected.Enabled = true; - if (AvatarView.SelectedItems.Count > 0) reply2Selected.Enabled = true; - } - - private void msgAll_Click(object sender, EventArgs e) - { - msgDefault(); - } - - private void msgDefault() - { - msgAll.Enabled = false; - msgSelected.Enabled = false; - reply2Selected.Enabled = false; - if (!MPManager.IsMultiPlayer()) - return; - var msg = MSG.Text; - msg = msg.Replace("\r", ""); - msg = msg.Replace("\t", ""); - MPManager.Instance().ComposingText = false; - MSG.Enabled = false; - - if (msg != "") - { - if (MPManager.IsServer()) - { - var users = MPManager.OnlineTrains.Players.Keys - .Select((string u) => $"{u}\r"); - string user = string.Join("", users) + "0END"; - string msgText = new MSGText(MPManager.GetUserName(), user, msg).ToString(); - try - { - MPManager.Notify(msgText); - } - catch { } - finally - { - MSG.Text = ""; - } - } - else - { - var user = "0Server\r+0END"; - MPManager.Notify(new MSGText(MPManager.GetUserName(), user, msg).ToString()); - MSG.Text = ""; - } - } - } - private void replySelected(object sender, EventArgs e) - { - msgAll.Enabled = false; - msgSelected.Enabled = false; - reply2Selected.Enabled = false; - - if (!MPManager.IsMultiPlayer()) - return; - - var msg = MSG.Text; - msg = msg.Replace("\r", ""); - msg = msg.Replace("\t", ""); - MPManager.Instance().ComposingText = false; - MSG.Text = ""; - MSG.Enabled = false; - if (msg == "") return; - var user = ""; - if (messages.SelectedItems.Count > 0) - { - var chosen = messages.SelectedItems; - for (var i = 0; i < chosen.Count; i++) - { - var tmp = (string)chosen[i]; - var index = tmp.IndexOf(':'); - if (index < 0) continue; - tmp = tmp.Substring(0, index) + "\r"; - if (user.Contains(tmp)) continue; - user += tmp; - } - user += "0END"; - } - else - return; - - MPManager.Notify(new MSGText(MPManager.GetUserName(), user, msg).ToString()); - } - - private void MSGLeave(object sender, EventArgs e) - { - //MultiPlayer.MPManager.Instance().ComposingText = false; - } - - private void MSGEnter(object sender, EventArgs e) - { - //MultiPlayer.MPManager.Instance().ComposingText = true; - } - - private void DispatcherLeave(object sender, EventArgs e) - { - //MultiPlayer.MPManager.Instance().ComposingText = false; - } - - private void checkKeys(object sender, PreviewKeyDownEventArgs e) - { - if (e.KeyValue == 13) - { - if (e.KeyValue == 13) - { - var msg = MSG.Text; - msg = msg.Replace("\r", ""); - msg = msg.Replace("\t", ""); - msg = msg.Replace("\n", ""); - MPManager.Instance().ComposingText = false; - MSG.Enabled = false; - MSG.Text = ""; - if (msg == "") return; - var user = ""; - - if (MPManager.IsServer()) - { - var users = MPManager.OnlineTrains.Players.Keys - .Select((string u) => $"{u}\r"); - user += string.Join("", users) + "0END"; - string msgText = new MSGText(MPManager.GetUserName(), user, msg).ToString(); - try - { - MPManager.Notify(msgText); - } - catch { } - finally - { - MSG.Text = ""; - } - } - else - { - user = "0Server\r+0END"; - MPManager.Notify(new MSGText(MPManager.GetUserName(), user, msg).ToString()); - MSG.Text = ""; - } - } - } - } - - private void msgSelected_Click(object sender, EventArgs e) - { - msgAll.Enabled = false; - msgSelected.Enabled = false; - reply2Selected.Enabled = false; - MPManager.Instance().ComposingText = false; - MSG.Enabled = false; - - if (!MPManager.IsMultiPlayer()) return; - var msg = MSG.Text; - MSG.Text = ""; - msg = msg.Replace("\r", ""); - msg = msg.Replace("\t", ""); - if (msg == "") return; - var user = ""; - if (AvatarView.SelectedItems.Count > 0) - { - var chosen = AvatarView.SelectedItems; - for (var i = 0; i < chosen.Count; i++) - { - var name = chosen[i].Text.Split(' ')[0]; //text may have (H) in it, so need to filter out - if (name == MPManager.GetUserName()) - continue; - user += name + "\r"; - } - user += "0END"; - } - else - return; - - MPManager.Notify(new MSGText(MPManager.GetUserName(), user, msg).ToString()); - - } - - private void msgSelectedChanged(object sender, EventArgs e) - { - AvatarView.SelectedItems.Clear(); - msgSelected.Enabled = false; - if (MSG.Enabled == true) reply2Selected.Enabled = true; - } - - private void AvatarView_SelectedIndexChanged(object sender, EventArgs e) - { - messages.SelectedItems.Clear(); - reply2Selected.Enabled = false; - if (MSG.Enabled == true) msgSelected.Enabled = true; - if (AvatarView.SelectedItems.Count <= 0) return; - var name = AvatarView.SelectedItems[0].Text.Split(' ')[0].Trim(); - if (name == MPManager.GetUserName()) - { - if (Program.Simulator.PlayerLocomotive != null) PickedTrain = Program.Simulator.PlayerLocomotive.Train; - else if (Program.Simulator.Trains.Count > 0) PickedTrain = Program.Simulator.Trains[0]; - } - else PickedTrain = MPManager.OnlineTrains.findTrain(name); - - } - - private void chkDrawPathChanged(object sender, EventArgs e) - { - DrawPath = chkDrawPath.Checked; - } - - private void boxSetSignalChosen(object sender, EventArgs e) - { - if (signalPickedItem == null) - { - UnHandleItemPick(); - return; - } - - var signal = signalPickedItem.Signal; - var type = boxSetSignal.SelectedIndex; - if (MPManager.Instance().AmAider) - { - MPManager.Notify(new MSGSignalChange(signal, type).ToString()); - UnHandleItemPick(); - return; - } - - switch (type) - { - case 0: - signal.ClearHoldSignalDispatcher(); - break; - - case 1: - signal.RequestHoldSignalDispatcher(true); - break; - - case 2: - signal.RequestApproachAspect(); - break; - - case 3: - signal.RequestLeastRestrictiveAspect(); - break; - - case 4: - signal.SetManualCallOn(true); - break; - } - - UnHandleItemPick(); - } - - private void boxSetSwitchChosen(object sender, EventArgs e) - { - if (switchPickedItem == null) - { - UnHandleItemPick(); return; - } - var sw = switchPickedItem.Item.TrJunctionNode; - var type = boxSetSwitch.SelectedIndex; - - //aider can send message to the server for a switch - if (MPManager.IsMultiPlayer() && MPManager.Instance().AmAider) - { - var nextSwitchTrack = sw; - var Selected = 0; - switch (type) - { - case 0: - Selected = (int)switchPickedItem.main; - break; - case 1: - Selected = 1 - (int)switchPickedItem.main; - break; - } - //aider selects and throws the switch, but need to confirm by the dispatcher - MPManager.Notify(new MSGSwitch(MPManager.GetUserName(), - nextSwitchTrack.TN.UiD.WorldTileX, nextSwitchTrack.TN.UiD.WorldTileZ, nextSwitchTrack.TN.UiD.WorldId, Selected, true).ToString()); - Program.Simulator.Confirmer.Information(Viewer.Catalog.GetString("Switching Request Sent to the Server")); - - } - //server throws the switch immediately - else - { - switch (type) - { - case 0: - Program.Simulator.Signals.RequestSetSwitch(sw.TN, (int)switchPickedItem.main); - //sw.SelectedRoute = (int)switchPickedItem.main; - break; - case 1: - Program.Simulator.Signals.RequestSetSwitch(sw.TN, 1 - (int)switchPickedItem.main); - //sw.SelectedRoute = 1 - (int)switchPickedItem.main; - break; - } - } - UnHandleItemPick(); - - } - - private void chkAllowNewCheck(object sender, EventArgs e) - { - MPManager.Instance().AllowNewPlayer = chkAllowNew.Checked; - } - - private void AssistClick(object sender, EventArgs e) - { - AvatarView.SelectedIndices.Remove(0); - if (AvatarView.SelectedIndices.Count > 0) - { - var tmp = AvatarView.SelectedItems[0].Text.Split(' '); - var name = tmp[0].Trim(); - if (MPManager.Instance().aiderList.Contains(name)) return; - if (MPManager.OnlineTrains.Players.ContainsKey(name)) - { - MPManager.BroadCast(new MSGAider(name, true).ToString()); - MPManager.Instance().aiderList.Add(name); - } - AvatarView.Items.Clear(); - if (avatarList != null) avatarList.Clear(); - } - } - - private void btnNormalClick(object sender, EventArgs e) - { - if (AvatarView.SelectedIndices.Count > 0) - { - var tmp = AvatarView.SelectedItems[0].Text.Split(' '); - var name = tmp[0].Trim(); - if (MPManager.OnlineTrains.Players.ContainsKey(name)) - { - MPManager.BroadCast(new MSGAider(name, false).ToString()); - MPManager.Instance().aiderList.Remove(name); - } - AvatarView.Items.Clear(); - if (avatarList != null) avatarList.Clear(); - } - - } - - private void btnFollowClick(object sender, EventArgs e) - { - followTrain = true; - } - - private void chkOPenaltyHandle(object sender, EventArgs e) - { - MPManager.Instance().CheckSpad = chkBoxPenalty.Checked; - if (chkBoxPenalty.Checked == false) { MPManager.BroadCast(new MSGMessage("All", "OverSpeedOK", "OK to go overspeed and pass stop light").ToString()); } - else { MPManager.BroadCast(new MSGMessage("All", "NoOverSpeed", "Penalty for overspeed and passing stop light").ToString()); } - - } - - private void chkPreferGreenHandle(object sender, EventArgs e) - { - MPManager.PreferGreen = chkBoxPenalty.Checked; - - } - - public bool ClickedTrain; - private void btnSeeInGameClick(object sender, EventArgs e) - { - if (PickedTrain != null) ClickedTrain = true; - else ClickedTrain = false; - } - - private void bBackgroundColor_Click(object sender, EventArgs e) - { - if (pbCanvas.BackColor == Color.White) - pbCanvas.BackColor = Color.FromArgb(64, 128, 128); - else if (pbCanvas.BackColor == Color.FromArgb(64, 128, 128)) - pbCanvas.BackColor = Color.FromArgb(250, 234, 209); - else if (pbCanvas.BackColor == Color.FromArgb(250, 234, 209)) - pbCanvas.BackColor = Color.FromArgb(250, 240, 230); - else if (pbCanvas.BackColor == Color.FromArgb(250, 240, 230)) // Windows color "linen" - pbCanvas.BackColor = Color.White; - } - - private void PictureMoveAndZoomInOut(int x, int y, decimal scale) - { - int diffX = x - pbCanvas.Width / 2; - int diffY = y - pbCanvas.Height / 2; - ViewWindow.Offset(diffX / xScale, -diffY / yScale); - if (scale < windowSizeUpDown.Minimum) scale = windowSizeUpDown.Minimum; - if (scale > windowSizeUpDown.Maximum) scale = windowSizeUpDown.Maximum; - windowSizeUpDown.Value = scale; - GenerateView(); - } - - #region Timetable - public int DaylightOffsetHrs { get; set; } = 0; - - private void TimetableDrag(object sender, MouseEventArgs e) - { - if (Dragging && !Zooming) - { - int diffX = e.X - LastCursorPosition.X; - int diffY = e.Y - LastCursorPosition.Y; - - ClipDrag(diffX, diffY); - GenerateView(true); - } - else if (Zooming) - { - decimal tempValue = windowSizeUpDown.Value; - if (LastCursorPosition.Y - e.Y < 0) tempValue /= 0.95m; - else if (LastCursorPosition.Y - e.Y > 0) tempValue *= 0.95m; - - if (tempValue < windowSizeUpDown.Minimum) tempValue = windowSizeUpDown.Minimum; - if (tempValue > windowSizeUpDown.Maximum) tempValue = windowSizeUpDown.Maximum; - windowSizeUpDown.Value = tempValue; - GenerateView(true); - } - LastCursorPosition.X = e.X; - LastCursorPosition.Y = e.Y; - } - - private void pbCanvas_SizeChanged(object sender, EventArgs e) - { - var oldSizePxX = ViewWindow.Width * xScale; - var oldSizePxY = ViewWindow.Height * yScale; - var newSizePxX = pbCanvas.Width; - var newSizePxY = pbCanvas.Height; - var sizeIncreaseX = newSizePxX / oldSizePxX; - var sizeIncreaseY = newSizePxY / oldSizePxY; - - // Could be clever and keep all the previous view still in view and centred at the same point. - // Instead use the simplest solution: - ViewWindow.Width *= sizeIncreaseX; - ViewWindow.Height *= sizeIncreaseY; - } - - /// - /// Add or subtract hours of daylight to more easily observe activity during the night. - /// - /// - /// - private void nudDaylightOffsetHrs_ValueChanged(object sender, EventArgs e) - { - DaylightOffsetHrs = (int)nudDaylightOffsetHrs.Value; - } - - private void tWindow_SelectedIndexChanged(object sender, EventArgs e) - { - TimetableWindow.SetControls(); - } - - /// - /// Loads a relevant page from the manual maintained by James Ross's automatic build - /// - /// - /// - private void bTrainKey_Click(object sender, EventArgs e) - { - // This method is also compatible with .NET Core 3 - var psi = new ProcessStartInfo - { - FileName = "https://open-rails.readthedocs.io/en/latest/driving.html#extended-hud-for-dispatcher-information" - , - UseShellExecute = true - }; - Process.Start(psi); - } - - /// - /// Provides a clip zone to stop user from pushing track fully out of window - /// - /// - /// - private void ClipDrag(int diffX, int diffY) - { - // Moving the mouse right means moving the ViewWindow left. - var changeXm = -(float)(diffX / xScale); - // Moving the mouse up means moving the ViewWindow up. - var changeYm = +(float)(diffY / yScale); - - - const int clipPixels = 100; - var viewWindowLeftM = minX + ViewWindow.X; - var viewWindowRightM = minX + ViewWindow.X + ViewWindow.Width; - var bufferXm = clipPixels / xScale; - var viewWindowTopM = minY + ViewWindow.Y; - var viewWindowBottomM = minY + ViewWindow.Y + ViewWindow.Height; - var bufferYm = clipPixels / yScale; - - if (viewWindowRightM + changeXm < minX + bufferXm) // drag right => -ve changeX - changeXm = +(minX + bufferXm - viewWindowRightM); - else if (viewWindowLeftM + changeXm > maxX - bufferXm) - changeXm = +(maxX - bufferXm - viewWindowLeftM); - - if (viewWindowBottomM + changeYm < minY + bufferYm) - changeYm = minY + bufferYm - viewWindowBottomM; - else if (viewWindowTopM + changeYm > maxY - bufferYm) - changeYm = maxY - bufferYm - viewWindowTopM; - - ViewWindow.Offset(changeXm, changeYm); - } - #endregion - } - - - /* NOTE: Commented out to avoid duplication in namespace; copied to `DebugViewerBetaForm.cs` */ - /* - #region SignalWidget - /// - /// Defines a signal being drawn in a 2D view. - /// - public class SignalWidget : ItemWidget - { - public TrItem Item; - /// - /// The underlying signal object as referenced by the TrItem. - /// - public SignalObject Signal; - - public PointF Dir; - public bool hasDir; - /// - /// For now, returns true if any of the signal heads shows any "clear" aspect. - /// This obviously needs some refinement. - /// - public int IsProceed - { - get - { - int returnValue = 2; - - foreach (var head in Signal.SignalHeads.Where(x => x.Function == SignalFunction.NORMAL)) - { - if (head.state == MstsSignalAspect.CLEAR_1 - || head.state == MstsSignalAspect.CLEAR_2) - { - returnValue = 0; - } - if (head.state == MstsSignalAspect.APPROACH_1 - || head.state == MstsSignalAspect.APPROACH_2 - || head.state == MstsSignalAspect.APPROACH_3) - { - returnValue = 1; - } - } - - return returnValue; - } - } - - /// - /// - /// - /// - /// - public SignalWidget(SignalItem item, SignalObject signal) - { - Item = item; - Signal = signal; - hasDir = false; - Location.X = item.TileX * 2048 + item.X; - Location.Y = item.TileZ * 2048 + item.Z; - var node = Program.Simulator.TDB.TrackDB.TrackNodes?[signal.trackNode]; - Vector2 v2; - if (node?.TrVectorNode != null) - { - var ts = node.TrVectorNode.TrVectorSections?.FirstOrDefault(); - if (ts == null) - return; - v2 = new Vector2(ts.TileX * 2048 + ts.X, ts.TileZ * 2048 + ts.Z); - } - else if (node?.TrJunctionNode != null) - { - var ts = node?.UiD; - if (ts == null) - return; - v2 = new Vector2(ts.TileX * 2048 + ts.X, ts.TileZ * 2048 + ts.Z); - } - else - { - return; - } - var v1 = new Vector2(Location.X, Location.Y); - var v3 = v1 - v2; - v3.Normalize(); - void copyTo(Vector2 input, ref PointF output) - { - output.X = input.X; - output.Y = input.Y; - } - copyTo(v1 - Vector2.Multiply(v3, signal.direction == 0 ? 12f : -12f), ref Dir); - //shift signal along the dir for 2m, so signals will not be overlapped - copyTo(v1 - Vector2.Multiply(v3, signal.direction == 0 ? 1.5f : -1.5f), ref Location); - hasDir = true; - } - } - #endregion - - #region SwitchWidget - /// - /// Defines a signal being drawn in a 2D view. - /// - public class SwitchWidget : ItemWidget - { - public TrackNode Item; - public uint main; - - /// - /// - /// - /// - /// - public SwitchWidget(TrackNode item) - { - Item = item; - var TS = Program.Simulator.TSectionDat.TrackShapes.Get(item.TrJunctionNode.ShapeIndex); // TSECTION.DAT tells us which is the main route - - if (TS != null) - { - main = TS.MainRoute; - } - else - { - main = 0; - } - - Location.X = Item.UiD.TileX * 2048 + Item.UiD.X; Location.Y = Item.UiD.TileZ * 2048 + Item.UiD.Z; - } - } - - #endregion - - #region BufferWidget - public class BufferWidget : ItemWidget - { - public TrackNode Item; - - /// - /// - /// - /// - /// - public BufferWidget(TrackNode item) - { - Item = item; - - Location.X = Item.UiD.TileX * 2048 + Item.UiD.X; Location.Y = Item.UiD.TileZ * 2048 + Item.UiD.Z; - } - } - #endregion - - #region ItemWidget - public class ItemWidget - { - public PointF Location; - public PointF Location2D; - - /// - /// - /// - /// - public ItemWidget() - { - - Location = new PointF(float.NegativeInfinity, float.NegativeInfinity); - Location2D = new PointF(float.NegativeInfinity, float.NegativeInfinity); - } - } - #endregion - - #region TrainWidget - public class TrainWidget : ItemWidget - { - public Train Train; - - /// - /// - /// - /// - public TrainWidget(Train t) - { - Train = t; - } - } - #endregion - - #region LineSegment - /// - /// Defines a geometric line segment. - /// - public class LineSegment - { - public dVector A; - public dVector B; - public dVector C; - //public float radius; - public bool isCurved; - - public float angle1, angle2; - - public LineSegment(dVector A, dVector B, bool Occupied, TrVectorSection Section) - { - this.A = A; - this.B = B; - - isCurved = false; - if (Section == null) return; - //MySection = Section; - uint k = Section.SectionIndex; - TrackSection ts = Program.Simulator.TSectionDat.TrackSections.Get(k); - if (ts != null) - { - if (ts.SectionCurve != null) - { - float diff = (float)(ts.SectionCurve.Radius * (1 - Math.Cos(ts.SectionCurve.Angle * 3.14f / 360))); - if (diff < 3) return; //not need to worry, curve too small - //curve = ts.SectionCurve; - Vector3 v = new Vector3((float)((B.TileX - A.TileX) * 2048 + B.X - A.X), 0, (float)((B.TileZ - A.TileZ) * 2048 + B.Z - A.Z)); - isCurved = true; - Vector3 v2 = Vector3.Cross(Vector3.Up, v); v2.Normalize(); - v = v / 2; v.X += A.TileX * 2048 + (float)A.X; v.Z += A.TileZ * 2048 + (float)A.Z; - if (ts.SectionCurve.Angle > 0) - { - v = v2 * -diff + v; - } - else v = v2 * diff + v; - C = new dVector(0, v.X, 0, v.Z); - } - } - } - } - #endregion - - #region SidingWidget - - /// - /// Defines a siding name being drawn in a 2D view. - /// - public struct SidingWidget - { - public uint Id; - public PointF Location; - public string Name; - public uint LinkId; - - /// - /// The underlying track item. - /// - public SidingItem Item; - - /// - /// - /// - /// - /// - public SidingWidget(SidingItem item) - { - Id = item.TrItemId; - LinkId = item.LinkedSidingId; - Item = item; - Name = item.ItemName; - Location = new PointF(item.TileX * 2048 + item.X, item.TileZ * 2048 + item.Z); - } - } - #endregion - - public struct PlatformWidget - { - public uint Id; - public PointF Location; - public string Name; - public PointF Extent1; - public PointF Extent2; - public uint LinkId; - public string Station; - - /// - /// The underlying track item. - /// - public PlatformItem Item; - - /// - /// - /// - /// - /// - public PlatformWidget(PlatformItem item) - { - Id = item.TrItemId; - LinkId = item.LinkedPlatformItemId; - Item = item; - Name = item.ItemName; - Station = item.Station; - Location = new PointF(item.TileX * 2048 + item.X, item.TileZ * 2048 + item.Z); - Extent1 = default; - Extent2 = default; - } - } - - public class dVector - { - public int TileX, TileZ; - public double X, Z; - - public dVector(int tilex1, double x1, int tilez1, double z1) - { - TileX = tilex1; - TileZ = tilez1; - X = x1; - Z = z1; - } - - static public double DistanceSqr(dVector v1, dVector v2) - { - return Math.Pow((v1.TileX - v2.TileX) * 2048 + v1.X - v2.X, 2) - + Math.Pow((v1.TileZ - v2.TileZ) * 2048 + v1.Z - v2.Z, 2); - } - }*/ -} diff --git a/Source/RunActivity/Viewer3D/Debugging/DebugViewerForm.resx b/Source/RunActivity/Viewer3D/Debugging/DebugViewerForm.resx deleted file mode 100644 index 6b977da3bb..0000000000 --- a/Source/RunActivity/Viewer3D/Debugging/DebugViewerForm.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - \ No newline at end of file diff --git a/Source/RunActivity/Viewer3D/Debugging/TimetableWindow.cs b/Source/RunActivity/Viewer3D/Debugging/TimetableWindow.cs deleted file mode 100644 index 006a6fc05a..0000000000 --- a/Source/RunActivity/Viewer3D/Debugging/TimetableWindow.cs +++ /dev/null @@ -1,959 +0,0 @@ -// COPYRIGHT 2010 - 2020 by the Open Rails project. -// -// This file is part of Open Rails. -// -// Open Rails is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Open Rails is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Open Rails. If not, see . - -using System; -using System.Diagnostics; -using System.Drawing; -using System.Linq; -using Microsoft.Xna.Framework; -using Orts.Formats.Msts; -using Orts.MultiPlayer; -using Orts.Simulation; -using Orts.Simulation.Physics; -using Orts.Simulation.RollingStocks; -using Orts.Simulation.Signalling; -using ORTS.Common; -using Color = System.Drawing.Color; - -namespace Orts.Viewer3D.Debugging -{ - public class TimetableWindow - { - public DispatchViewer F { get; set; } // Shortest possible abbreviation so code is easier to read. - - public TimetableWindow(DispatchViewer form) - { - F = form; - } - - public void SetControls() - { - // Default is Timetable Tab, unless in Multi-Player mode - if (F.tWindow.SelectedIndex == 1) // 0 for Dispatch Window, 1 for Timetable Window - { - // Default is All Trains, unless in Timetable mode - F.rbShowActiveTrainLabels.Checked = F.simulator.TimetableMode; - F.rbShowAllTrainLabels.Checked = !(F.rbShowActiveTrainLabels.Checked); - - ShowTimetableControls(true); - ShowDispatchControls(false); - SetTimetableMedia(); - } - else - { - ShowTimetableControls(false); - ShowDispatchControls(true); - SetDispatchMedia(); - } - } - - private void ShowDispatchControls(bool dispatchView) - { - var multiPlayer = MPManager.IsMultiPlayer() && dispatchView; - F.msgAll.Visible = multiPlayer; - F.msgSelected.Visible = multiPlayer; - F.composeMSG.Visible = multiPlayer; - F.MSG.Visible = multiPlayer; - F.messages.Visible = multiPlayer; - F.AvatarView.Visible = multiPlayer; - F.composeMSG.Visible = multiPlayer; - F.reply2Selected.Visible = multiPlayer; - F.chkShowAvatars.Visible = multiPlayer; - F.chkAllowUserSwitch.Visible = multiPlayer; - F.chkAllowNew.Visible = multiPlayer; - F.chkBoxPenalty.Visible = multiPlayer; - F.chkPreferGreen.Visible = multiPlayer; - F.btnAssist.Visible = multiPlayer; - F.btnNormal.Visible = multiPlayer; - F.rmvButton.Visible = multiPlayer; - - if (multiPlayer) - { - F.chkShowAvatars.Checked = Program.Simulator.Settings.ShowAvatar; - F.pbCanvas.Location = new System.Drawing.Point(F.pbCanvas.Location.X, F.label1.Location.Y + 18); - F.refreshButton.Text = "View Self"; - } - - F.chkDrawPath.Visible = dispatchView; - F.chkPickSignals.Visible = dispatchView; - F.chkPickSwitches.Visible = dispatchView; - F.btnSeeInGame.Visible = dispatchView; - F.btnFollow.Visible = dispatchView; - F.windowSizeUpDown.Visible = dispatchView; - F.label1.Visible = dispatchView; - F.resLabel.Visible = dispatchView; - F.refreshButton.Visible = dispatchView; - } - - private void SetDispatchMedia() - { - F.trainFont = new Font("Arial", 14, FontStyle.Bold); - F.sidingFont = new Font("Arial", 12, FontStyle.Bold); - F.trainBrush = new SolidBrush(Color.Red); - F.sidingBrush = new SolidBrush(Color.Blue); - F.pbCanvas.BackColor = Color.White; - } - - private void ShowTimetableControls(bool timetableView) - { - F.lblSimulationTimeText.Visible = timetableView; - F.lblSimulationTime.Visible = timetableView; - F.lblShow.Visible = timetableView; - F.cbShowPlatforms.Visible = timetableView; - F.cbShowPlatformLabels.Visible = timetableView; - F.cbShowSidings.Visible = timetableView; - F.cbShowSwitches.Visible = timetableView; - F.cbShowSignals.Visible = timetableView; - F.cbShowSignalState.Visible = timetableView; - F.cbShowTrainLabels.Visible = timetableView; - F.cbShowTrainState.Visible = timetableView; - F.bTrainKey.Visible = timetableView; - F.gbTrainLabels.Visible = timetableView; - F.rbShowActiveTrainLabels.Visible = timetableView; - F.rbShowAllTrainLabels.Visible = timetableView; - F.lblDayLightOffsetHrs.Visible = timetableView; - F.nudDaylightOffsetHrs.Visible = timetableView; - F.bBackgroundColor.Visible = timetableView; - } - - private void SetTimetableMedia() - { - F.Name = "Timetable Window"; - F.trainFont = new Font("Segoe UI Semibold", 10, FontStyle.Regular); - F.sidingFont = new Font("Segoe UI Semibold", 10, FontStyle.Regular); - F.PlatformFont = new Font("Segoe UI Semibold", 10, FontStyle.Regular); - F.SignalFont = new Font("Segoe UI Semibold", 10, FontStyle.Regular); - F.trainBrush = new SolidBrush(Color.Red); - F.InactiveTrainBrush = new SolidBrush(Color.DarkRed); - F.sidingBrush = new SolidBrush(Color.Blue); - F.PlatformBrush = new SolidBrush(Color.DarkBlue); - F.SignalBrush = new SolidBrush(Color.DarkRed); - F.pbCanvas.BackColor = Color.FromArgb(250, 240, 230); - } - - private void AdjustControlLocations() - { - if (F.Height < 600 || F.Width < 800) return; - - if (F.oldHeight != F.Height || F.oldWidth != F.Width) //use the label "Res" as anchor point to determine the picture size - { - F.oldWidth = F.Width; F.oldHeight = F.Height; - - F.pbCanvas.Top = 50; - F.pbCanvas.Width = F.label1.Left - 25; // 25 pixels found by trial and error - F.pbCanvas.Height = F.Height - F.pbCanvas.Top - 45; // 45 pixels found by trial and error - - if (F.pbCanvas.Image != null) - F.pbCanvas.Image.Dispose(); - F.pbCanvas.Image = new Bitmap(F.pbCanvas.Width, F.pbCanvas.Height); - } - if (F.firstShow) - { - // Center the view on the player's locomotive - var pos = Program.Simulator.PlayerLocomotive.WorldPosition; - var ploc = new PointF(pos.TileX * 2048 + pos.Location.X, pos.TileZ * 2048 + pos.Location.Z); -#pragma warning disable CS1690 // Accessing a member on a field of a marshal-by-reference class may cause a runtime exception - F.ViewWindow.X = ploc.X - F.minX - F.ViewWindow.Width / 2; - F.ViewWindow.Y = ploc.Y - F.minY - F.ViewWindow.Width / 2; -#pragma warning restore CS1690 // Accessing a member on a field of a marshal-by-reference class may cause a runtime exception - F.firstShow = false; - } - - // Sufficient to accommodate the whole route plus 50% - var xRange = F.maxX - F.minX; - var yRange = F.maxY - F.minY; - var maxSize = (int)(((xRange > yRange) ? xRange : yRange) * 1.5); - F.windowSizeUpDown.Maximum = (decimal)maxSize; - } - - public void PopulateItemLists() - { - foreach (var item in F.simulator.TDB.TrackDB.TrItemTable) - { - switch (item.ItemType) - { - case TrItem.trItemType.trSIGNAL: - if (item is SignalItem si) - { - if (si.SigObj >= 0 && si.SigObj < F.simulator.Signals.SignalObjects.Length) - { - var s = F.simulator.Signals.SignalObjects[si.SigObj]; - if (s != null && s.Type == SignalObjectType.Signal && s.isSignalNormal()) - F.signals.Add(new SignalWidget(si, s)); - } - } - break; - - case TrItem.trItemType.trSIDING: - // Sidings have 2 ends but are not always listed in pairs in the *.tdb file - // Neither are their names unique (e.g. Bernina Bahn). - // Find whether this siding is a new one or the other end of an old one. - // If other end, then find the right-hand one as the location for a single label. - // Note: Find() within a foreach() loop is O(n^2) but is only done at start. - var oldSidingIndex = F.sidings.FindIndex(r => r.LinkId == item.TrItemId && r.Name == item.ItemName); - if (oldSidingIndex < 0) - { - var newSiding = new SidingWidget(item as SidingItem); - F.sidings.Add(newSiding); - } - else - { - var oldSiding = F.sidings[oldSidingIndex]; - var oldLocation = oldSiding.Location; - var newLocation = new PointF(item.TileX * 2048 + item.X, item.TileZ * 2048 + item.Z); - - // Because these are structs, not classes, compiler won't let you overwrite them. - // Instead create a single item which replaces the 2 platform items. - var replacement = new SidingWidget(item as SidingItem) - { - Location = GetMidPoint(oldLocation, newLocation) - }; - - // Replace the old siding item with the replacement - F.sidings.RemoveAt(oldSidingIndex); - F.sidings.Add(replacement); - } - break; - - case TrItem.trItemType.trPLATFORM: - // Platforms have 2 ends but are not always listed in pairs in the *.tdb file - // Neither are their names unique (e.g. Bernina Bahn). - // Find whether this platform is a new one or the other end of an old one. - // If other end, then find the right-hand one as the location for a single label. - var oldPlatformIndex = F.platforms.FindIndex(r => r.LinkId == item.TrItemId && r.Name == item.ItemName); - if (oldPlatformIndex < 0) - { - var newPlatform = new PlatformWidget(item as PlatformItem) - { - Extent1 = new PointF(item.TileX * 2048 + item.X, item.TileZ * 2048 + item.Z) - }; - F.platforms.Add(newPlatform); - } - else - { - var oldPlatform = F.platforms[oldPlatformIndex]; - var oldLocation = oldPlatform.Location; - var newLocation = new PointF(item.TileX * 2048 + item.X, item.TileZ * 2048 + item.Z); - - // Because these are structs, not classes, compiler won't let you overwrite them. - // Instead create a single item which replaces the 2 platform items. - var replacement = new PlatformWidget(item as PlatformItem) - { - Extent1 = oldLocation - , - Extent2 = newLocation - // Give it the right-hand location - , - Location = GetRightHandPoint(oldLocation, newLocation) - }; - - // Replace the old platform item with the replacement - F.platforms.RemoveAt(oldPlatformIndex); - F.platforms.Add(replacement); - } - break; - - default: - break; - } - } - - foreach (var p in F.platforms) - if (p.Extent1.IsEmpty || p.Extent2.IsEmpty) - Trace.TraceWarning("Platform '{0}' is incomplete as the two ends do not match. It will not show in full in the Timetable Tab of the Map Window", p.Name); - } - - /// - /// Returns the mid-point between two locations - /// - /// - /// - /// - /// - private PointF GetMidPoint(PointF location1, PointF location2) - { - return new PointF() - { - X = (location1.X + location2.X) / 2 - , - Y = (location1.Y + location2.Y) / 2 - }; - } - - private PointF GetRightHandPoint(PointF location1, PointF location2) - { - return (location1.X > location2.X) ? location1 : location2; - } - - public void GenerateTimetableView(bool dragging = false) - { - AdjustControlLocations(); - ShowSimulationTime(); - - if (F.pbCanvas.Image == null) - F.InitImage(); - - using (Graphics g = Graphics.FromImage(F.pbCanvas.Image)) - { - g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; - g.Clear(F.pbCanvas.BackColor); - -#pragma warning disable CS1690 // Accessing a member on a field of a marshal-by-reference class may cause a runtime exception - // Set scales. subX & subY give top-left location in meters from world origin. - F.subX = F.minX + F.ViewWindow.X; - F.subY = F.minY + F.ViewWindow.Y; - - // Get scale in pixels/meter - F.xScale = F.pbCanvas.Width / F.ViewWindow.Width; - F.yScale = F.pbCanvas.Height / F.ViewWindow.Height; - // Make X and Y scales the same to maintain correct angles. - F.xScale = F.yScale = Math.Max(F.xScale, F.yScale); -#pragma warning restore CS1690 // Accessing a member on a field of a marshal-by-reference class may cause a runtime exception - - // Set the default pen to represent 1 meter. - var scale = (float)Math.Round((double)F.xScale); // Round to nearest pixels/meter - var penWidth = (int)MathHelper.Clamp(scale, 1, 4); // Keep 1 <= width <= 4 pixels - - // Choose pens - Pen p = F.grayPen; - F.grayPen.Width = F.greenPen.Width = F.orangePen.Width = F.redPen.Width = penWidth; - F.pathPen.Width = penWidth * 2; - - // First so track is drawn over the thicker platform line - DrawPlatforms(g, penWidth); - - // Draw track - PointF scaledA, scaledB; - DrawTrack(g, p, out scaledA, out scaledB); - - if (dragging == false) - { - // Draw trains and path - DrawTrains(g, scaledA, scaledB); - - // Keep widgetWidth <= 15 pixels - var widgetWidth = Math.Min(penWidth * 6, 15); - - // Draw signals on top of path so they are easier to see. - F.signalItemsDrawn.Clear(); - ShowSignals(g, scaledB, widgetWidth); - - // Draw switches - F.switchItemsDrawn.Clear(); - ShowSwitches(g, widgetWidth); - - // Draw labels for sidings and platforms last so they go on top for readability - CleanTextCells(); // Empty the listing of labels ready for adding labels again - ShowPlatformLabels(g); // Platforms take priority over sidings and signal states - ShowSidingLabels(g); - } - DrawZoomTarget(g); - } - F.pbCanvas.Invalidate(); // Triggers a re-paint - } - - /// - /// Indicates the location around which the image is zoomed. - /// If user drags an item of interest into this target box and zooms in, the item will remain in view. - /// - /// - private void DrawZoomTarget(Graphics g) - { - if (F.Dragging) - { - const int size = 24; - var top = F.pbCanvas.Height / 2 - size / 2; - var left = (int)(F.pbCanvas.Width / 2 - size / 2); - g.DrawRectangle(F.grayPen, left, top, size, size); - } - } - - private void ShowSimulationTime() - { - var ct = TimeSpan.FromSeconds(Program.Simulator.ClockTime); - F.lblSimulationTime.Text = $"{ct:hh}:{ct:mm}:{ct:ss}"; - } - - private void DrawPlatforms(Graphics g, int penWidth) - { - if (F.cbShowPlatforms.Checked) - { - // Platforms can be obtrusive, so draw in solid blue only when zoomed in and fade them as we zoom out - switch (penWidth) - { - case 1: - F.PlatformPen.Color = Color.FromArgb(0, 0, 255); break; - case 2: - F.PlatformPen.Color = Color.FromArgb(150, 150, 255); break; - default: - F.PlatformPen.Color = Color.FromArgb(200, 200, 255); break; - } - - var width = F.grayPen.Width * 3; - F.PlatformPen.Width = width; - foreach (var p in F.platforms) - { - var scaledA = new PointF((p.Extent1.X - F.subX) * F.xScale, F.pbCanvas.Height - (p.Extent1.Y - F.subY) * F.yScale); - var scaledB = new PointF((p.Extent2.X - F.subX) * F.xScale, F.pbCanvas.Height - (p.Extent2.Y - F.subY) * F.yScale); - - FixForBadData(width, ref scaledA, ref scaledB, p.Extent1, p.Extent2); - g.DrawLine(F.PlatformPen, scaledA, scaledB); - } - } - } - - /// - /// In case of missing X,Y values, just draw a blob at the non-zero end. - /// - private void FixForBadData(float width, ref PointF scaledA, ref PointF scaledB, PointF Extent1, PointF Extent2) - { - if (Extent1.X == 0 || Extent1.Y == 0) - { - scaledA.X = scaledB.X + width; - scaledA.Y = scaledB.Y + width; - } - else if (Extent2.X == 0 || Extent2.Y == 0) - { - scaledB.X = scaledA.X + width; - scaledB.Y = scaledA.Y + width; - } - } - - private void DrawTrack(Graphics g, Pen p, out PointF scaledA, out PointF scaledB) - { - PointF[] points = new PointF[3]; - scaledA = new PointF(0, 0); - scaledB = new PointF(0, 0); - PointF scaledC = new PointF(0, 0); - foreach (var line in F.segments) - { - scaledA.X = (line.A.TileX * 2048 - F.subX + (float)line.A.X) * F.xScale; - scaledA.Y = F.pbCanvas.Height - (line.A.TileZ * 2048 - F.subY + (float)line.A.Z) * F.yScale; - scaledB.X = (line.B.TileX * 2048 - F.subX + (float)line.B.X) * F.xScale; - scaledB.Y = F.pbCanvas.Height - (line.B.TileZ * 2048 - F.subY + (float)line.B.Z) * F.yScale; - - if ((scaledA.X < 0 && scaledB.X < 0) - || (scaledA.Y < 0 && scaledB.Y < 0)) - continue; - - if (line.isCurved == true) - { - scaledC.X = ((float)line.C.X - F.subX) * F.xScale; scaledC.Y = F.pbCanvas.Height - ((float)line.C.Z - F.subY) * F.yScale; - points[0] = scaledA; points[1] = scaledC; points[2] = scaledB; - g.DrawCurve(p, points); - } - else g.DrawLine(p, scaledA, scaledB); - } - } - - private void ShowSwitches(Graphics g, float width) - { - if (F.cbShowSwitches.Checked) - for (var i = 0; i < F.switches.Count; i++) - { - SwitchWidget sw = F.switches[i]; - - var x = (sw.Location.X - F.subX) * F.xScale; - var y = F.pbCanvas.Height - (sw.Location.Y - F.subY) * F.yScale; - if (x < 0 || y < 0) - continue; - - var scaledItem = new PointF() { X = x, Y = y }; - - if (sw.Item.TrJunctionNode.SelectedRoute == sw.main) - g.FillEllipse(Brushes.Black, DispatchViewer.GetRect(scaledItem, width)); - else - g.FillEllipse(Brushes.Gray, DispatchViewer.GetRect(scaledItem, width)); - - sw.Location2D.X = scaledItem.X; sw.Location2D.Y = scaledItem.Y; - F.switchItemsDrawn.Add(sw); - } - } - - private void ShowSignals(Graphics g, PointF scaledB, float width) - { - if (F.cbShowSignals.Checked) - foreach (var s in F.signals) - { - if (float.IsNaN(s.Location.X) || float.IsNaN(s.Location.Y)) - continue; - var x = (s.Location.X - F.subX) * F.xScale; - var y = F.pbCanvas.Height - (s.Location.Y - F.subY) * F.yScale; - if (x < 0 || y < 0) - continue; - - var scaledItem = new PointF() { X = x, Y = y }; - s.Location2D.X = scaledItem.X; s.Location2D.Y = scaledItem.Y; - if (s.Signal.isSignalNormal()) - { - var color = Brushes.Lime; // bright colour for readability - var pen = F.greenPen; - if (s.IsProceed == 0) - { - } - else if (s.IsProceed == 1) - { - color = Brushes.Yellow; // bright colour for readbility - pen = F.orangePen; - } - else - { - color = Brushes.Red; - pen = F.redPen; - } - g.FillEllipse(color, DispatchViewer.GetRect(scaledItem, width)); - F.signalItemsDrawn.Add(s); - if (s.hasDir) - { - scaledB.X = (s.Dir.X - F.subX) * F.xScale; scaledB.Y = F.pbCanvas.Height - (s.Dir.Y - F.subY) * F.yScale; - g.DrawLine(pen, scaledItem, scaledB); - } - ShowSignalState(g, scaledItem, s); - } - } - } - - private void ShowSignalState(Graphics g, PointF scaledItem, SignalWidget sw) - { - if (F.cbShowSignalState.Checked) - { - var item = sw.Item as SignalItem; - var trainNumber = sw.Signal?.enabledTrain?.Train?.Number; - var trainString = (trainNumber == null) ? "" : $" train: {trainNumber}"; - var offset = 0; - var position = scaledItem; - foreach (var signalHead in sw.Signal.SignalHeads) - { - offset++; - position.X += offset * 10; - position.Y += offset * 15; - var text = $" {item?.SigObj} {signalHead.SignalTypeName} {signalHead.state} {trainString}"; - scaledItem.Y = GetUnusedYLocation(scaledItem.X, F.pbCanvas.Height - (sw.Location.Y - F.subY) * F.yScale, text); - if (scaledItem.Y >= 0f) // -1 indicates no free slot to draw label - g.DrawString(text, F.SignalFont, F.SignalBrush, scaledItem); - } - } - } - - private void ShowSidingLabels(Graphics g) - { - if (F.cbShowSidings.CheckState == System.Windows.Forms.CheckState.Checked) - foreach (var s in F.sidings) - { - var scaledItem = new PointF(); - - scaledItem.X = (s.Location.X - F.subX) * F.xScale; - scaledItem.Y = GetUnusedYLocation(scaledItem.X, F.pbCanvas.Height - (s.Location.Y - F.subY) * F.yScale, s.Name); - if (scaledItem.Y >= 0f) // -1 indicates no free slot to draw label - g.DrawString(s.Name, F.sidingFont, F.sidingBrush, scaledItem); - } - } - - private void ShowPlatformLabels(Graphics g) - { - var platformMarginPxX = 5; - - if (F.cbShowPlatformLabels.CheckState == System.Windows.Forms.CheckState.Checked) - foreach (var p in F.platforms) - { - var scaledItem = new PointF(); - scaledItem.X = (p.Location.X - F.subX) * F.xScale + platformMarginPxX; - var yPixels = F.pbCanvas.Height - (p.Location.Y - F.subY) * F.yScale; - - // If track is close to horizontal, then start label search 1 row down to minimise overwriting platform line. - if (p.Extent1.X != p.Extent2.X - && Math.Abs((p.Extent1.Y - p.Extent2.Y) / (p.Extent1.X - p.Extent2.X)) < 0.1) - yPixels += DispatchViewer.spacing; - - scaledItem.Y = GetUnusedYLocation(scaledItem.X, F.pbCanvas.Height - (p.Location.Y - F.subY) * F.yScale, p.Name); - if (scaledItem.Y >= 0f) // -1 indicates no free slot to draw label - g.DrawString(p.Name, F.PlatformFont, F.PlatformBrush, scaledItem); - } - } - - private void DrawTrains(Graphics g, PointF scaledA, PointF scaledB) - { - var margin = 30 * F.xScale; //margins to determine if we want to draw a train - var margin2 = 5000 * F.xScale; - - //variable for drawing train path - var mDist = 5000f; var pDist = 50; //segment length when drawing path - - F.selectedTrainList.Clear(); - - if (F.simulator.TimetableMode) - { - // Add the player's train - if (F.simulator.PlayerLocomotive.Train is Orts.Simulation.AIs.AITrain) - F.selectedTrainList.Add(F.simulator.PlayerLocomotive.Train as Orts.Simulation.AIs.AITrain); - - // and all the other trains - foreach (var train in F.simulator.AI.AITrains) - F.selectedTrainList.Add(train); - } - else - { - foreach (var train in F.simulator.Trains) - F.selectedTrainList.Add(train); - } - - foreach (var train in F.selectedTrainList) - { - string trainName; - WorldPosition worldPos; - TrainCar locoCar = null; - if (train.LeadLocomotive != null) - { - trainName = train.GetTrainName(train.LeadLocomotive.CarID); - locoCar = train.LeadLocomotive; - } - else if (train.Cars != null && train.Cars.Count > 0) - { - trainName = train.GetTrainName(train.Cars[0].CarID); - if (train.TrainType == Train.TRAINTYPE.AI) - trainName = train.Number.ToString() + ":" + train.Name; - - locoCar = train.Cars.Where(r => r is MSTSLocomotive).FirstOrDefault(); - - // Skip trains with no loco - if (locoCar == null) - continue; - } - else - continue; - - // Draw the path, then each car of the train, then maybe the name - var loc = train.FrontTDBTraveller.WorldLocation; - float x = (loc.TileX * 2048 + loc.Location.X - F.subX) * F.xScale; - float y = F.pbCanvas.Height - (loc.TileZ * 2048 + loc.Location.Z - F.subY) * F.yScale; - - // If train out of view then skip it. - if (x < -margin2 - || y < -margin2) - continue; - - F.DrawTrainPath(train, F.subX, F.subY, F.pathPen, g, scaledA, scaledB, pDist, mDist); - - // If zoomed out, so train occupies less than 2 * minTrainPx pixels, then - // draw the train as 2 squares of combined length minTrainPx. - const int minTrainPx = 24; - - // pen | train | Values for a good presentation - // 1 10 - // 2 12 - // 3 14 - // 4 16 - F.trainPen.Width = F.grayPen.Width * 6; - - var minTrainLengthM = minTrainPx / F.xScale; // Calculate length equivalent to a set number of pixels - bool drawEveryCar = IsDrawEveryCar(train, minTrainLengthM); - - foreach (var car in train.Cars) - DrawCar(g, train, car, locoCar, margin, minTrainPx, drawEveryCar); - - worldPos = locoCar.WorldPosition; - var scaledTrain = new PointF(); - scaledTrain.X = (worldPos.TileX * 2048 - F.subX + worldPos.Location.X) * F.xScale; - scaledTrain.Y = -25 + F.pbCanvas.Height - (worldPos.TileZ * 2048 - F.subY + worldPos.Location.Z) * F.yScale; - if (F.cbShowTrainLabels.Checked) - DrawTrainLabels(g, train, trainName, locoCar, scaledTrain); - } - } - - private void DrawCar(Graphics g, Train train, TrainCar car, TrainCar locoCar, float margin, int minTrainPx, bool drawEveryCar) - { - if (drawEveryCar == false) - // Skip the intermediate cars - if (car != train.Cars.First() && car != train.Cars.Last()) - return; - - var t = new Traveller(train.RearTDBTraveller); - var worldPos = car.WorldPosition; - var dist = t.DistanceTo(worldPos.WorldLocation.TileX, worldPos.WorldLocation.TileZ, worldPos.WorldLocation.Location.X, worldPos.WorldLocation.Location.Y, worldPos.WorldLocation.Location.Z); - if (dist > -1) - { - var scaledTrain = new PointF(); - float x; - float y; - if (drawEveryCar) - { - t.Move(dist + car.CarLengthM / 2); // Move along from centre of car to front of car - x = (t.TileX * 2048 + t.Location.X - F.subX) * F.xScale; - y = F.pbCanvas.Height - (t.TileZ * 2048 + t.Location.Z - F.subY) * F.yScale; - - // If car out of view then skip it. - if (x < -margin || y < -margin) - return; - - t.Move(-car.CarLengthM + (1 / F.xScale)); // Move from front of car to rear less 1 pixel to create a visible gap - scaledTrain.X = x; scaledTrain.Y = y; - } - else // Draw the train as 2 boxes of fixed size - { - F.trainPen.Width = minTrainPx / 2; - if (car == train.Cars.First()) - { - // Draw first half a train back from the front of the first car as abox - t.Move(dist + car.CarLengthM / 2); - x = (t.TileX * 2048 + t.Location.X - F.subX) * F.xScale; - y = F.pbCanvas.Height - (t.TileZ * 2048 + t.Location.Z - F.subY) * F.yScale; - - // If car out of view then skip it. - if (x < -margin || y < -margin) - return; - - t.Move(-(minTrainPx - 2) / F.xScale / 2); // Move from front of car to rear less 1 pixel to create a visible gap - } - else // car == t.Cars.Last() - { - // Draw half a train back from the rear of the first box - worldPos = train.Cars.First().WorldPosition; - dist = t.DistanceTo(worldPos.WorldLocation.TileX, worldPos.WorldLocation.TileZ, worldPos.WorldLocation.Location.X, worldPos.WorldLocation.Location.Y, worldPos.WorldLocation.Location.Z); - t.Move(dist + train.Cars.First().CarLengthM / 2 - minTrainPx / F.xScale / 2); - x = (t.TileX * 2048 + t.Location.X - F.subX) * F.xScale; - y = F.pbCanvas.Height - (t.TileZ * 2048 + t.Location.Z - F.subY) * F.yScale; - if (x < -margin || y < -margin) - return; - t.Move(-minTrainPx / F.xScale / 2); - } - scaledTrain.X = x; scaledTrain.Y = y; - } - x = (t.TileX * 2048 + t.Location.X - F.subX) * F.xScale; - y = F.pbCanvas.Height - (t.TileZ * 2048 + t.Location.Z - F.subY) * F.yScale; - - // If car out of view then skip it. - if (x < -margin || y < -margin) - return; - - SetTrainColor(train, locoCar, car); - g.DrawLine(F.trainPen, new PointF(x, y), scaledTrain); - } - } - - private void SetTrainColor(Train t, TrainCar locoCar, TrainCar car) - { - // Draw train in green with locos in brown - // HSL values - // Saturation: 100/100 - // Hue: if loco then H=50/360 else H=120/360 - // Lightness: if active then L=40/100 else L=30/100 - // RGB values - // active loco: RGB 204,170,0 - // inactive loco: RGB 153,128,0 - // active car: RGB 0,204,0 - // inactive car: RGB 0,153,0 - if (IsActiveTrain(t as Simulation.AIs.AITrain)) - if (car is MSTSLocomotive) - F.trainPen.Color = (car == locoCar) ? Color.FromArgb(204, 170, 0) : Color.FromArgb(153, 128, 0); - else - F.trainPen.Color = Color.FromArgb(0, 204, 0); - else - if (car is MSTSLocomotive) - F.trainPen.Color = Color.FromArgb(153, 128, 0); - else - F.trainPen.Color = Color.FromArgb(0, 153, 0); - - // Draw player train with loco in red - if (t.TrainType == Train.TRAINTYPE.PLAYER && car == locoCar) - F.trainPen.Color = Color.Red; - } - - /// - /// If the train is long enough then draw every car else just draw it as one or two blocks - /// - /// - /// - /// - private bool IsDrawEveryCar(Train train, float minTrainLengthM) - { - float trainLengthM = 0f; - foreach (var car in train.Cars) - { - trainLengthM += car.CarLengthM; - if (trainLengthM > minTrainLengthM) - { - return true; - } - } - return false; - } - - private void DrawTrainLabels(Graphics g, Train t, string trainName, TrainCar firstCar, PointF scaledTrain) - { - WorldPosition worldPos = firstCar.WorldPosition; - scaledTrain.X = (worldPos.TileX * 2048 - F.subX + worldPos.Location.X) * F.xScale; - scaledTrain.Y = -25 + F.pbCanvas.Height - (worldPos.TileZ * 2048 - F.subY + worldPos.Location.Z) * F.yScale; - if (F.rbShowActiveTrainLabels.Checked) - { - if (t is Simulation.AIs.AITrain && IsActiveTrain(t as Simulation.AIs.AITrain)) - ShowTrainNameAndState(g, scaledTrain, t, trainName); - } - else - { - ShowTrainNameAndState(g, scaledTrain, t, trainName); - } - } - - private bool IsActiveTrain(Simulation.AIs.AITrain t) - { - if (t == null) - return false; - return (t.MovementState != Simulation.AIs.AITrain.AI_MOVEMENT_STATE.AI_STATIC - && !(t.TrainType == Train.TRAINTYPE.AI_INCORPORATED && !t.IncorporatingTrain.IsPathless) - ) - || t.TrainType == Train.TRAINTYPE.PLAYER; - } - - private void ShowTrainNameAndState(Graphics g, PointF scaledItem, Train t, string trainName) - { - if (F.simulator.TimetableMode) - { - var tTTrain = t as Orts.Simulation.Timetables.TTTrain; - if (tTTrain != null) - { - // Remove name of timetable, e.g.: ":SCE" - var lastPos = trainName.LastIndexOf(":"); - var shortName = (lastPos > 0) ? trainName.Substring(0, lastPos) : trainName; - - if (IsActiveTrain(tTTrain)) - { - if (F.cbShowTrainState.Checked) - { - // 4:AI mode, 6:Mode, 7:Auth, 9:Signal, 12:Path - var status = tTTrain.GetStatus(F.Viewer.MilepostUnitsMetric); - - // Add in fields 4 and 7 - status = tTTrain.AddMovementState(status, F.Viewer.MilepostUnitsMetric); - - var statuses = $"{status[4]} {status[6]} {status[7]} {status[9]}"; - - // Add path if it contains any deadlock information - if (ContainsDeadlockIndicators(status[12])) - statuses += status[12]; - - g.DrawString($"{shortName} {statuses}", F.trainFont, F.trainBrush, scaledItem); - } - else - g.DrawString(shortName, F.trainFont, F.trainBrush, scaledItem); - } - else - g.DrawString(shortName, F.trainFont, F.InactiveTrainBrush, scaledItem); - } - } - else - g.DrawString(trainName, F.trainFont, F.trainBrush, scaledItem); - } - - /* - * # section is claimed by a train which is waiting for a signal. - * & section is occupied by more than one train. - * deadlock info (always linked to a switch node): - * · * possible deadlock location - start of a single track section shared with a train running in opposite direction. - * · ^ active deadlock - train from opposite direction is occupying or has reserved at least part of the common - * single track section. Train will be stopped at this location – generally at the last signal ahead of this node. - * · ~ active deadlock at that location for other train - can be significant as this other train can block this - * train’s path. - */ - private static readonly char[] DeadlockIndicators = "#&*^~".ToCharArray(); - - public static bool ContainsDeadlockIndicators(string text) - { - return text.IndexOfAny(DeadlockIndicators) >= 0; - } - - // The canvas is split into equally pitched rows. - // Each row has an array of 4 slots with StartX, EndX positions and a count of how many slots have been filled. - // Arrays are used instead of lists to avoid delays for memory management. - private void CleanTextCells() - { - if (F.alignedTextY == null || F.alignedTextY.Length != F.pbCanvas.Height / DispatchViewer.spacing) //first time to put text, or the text height has changed - { - F.alignedTextY = new Vector2[F.pbCanvas.Height / DispatchViewer.spacing][]; - F.alignedTextNum = new int[F.pbCanvas.Height / DispatchViewer.spacing]; - for (var i = 0; i < F.pbCanvas.Height / DispatchViewer.spacing; i++) - F.alignedTextY[i] = new Vector2[5]; //each line has at most 5 slots - } - for (var i = 0; i < F.pbCanvas.Height / DispatchViewer.spacing; i++) - F.alignedTextNum[i] = 0; - } - - // Returns a vertical position for the text that doesn't clash or returns -1 - // If the preferred space for text is occupied, then the slot above (-ve Y) is tested, then 2 sltos above, then 1 below. - private float GetUnusedYLocation(float startX, float wantY, string name) - { - const float noFreeSlotFound = -1f; - - var desiredPositionY = (int)(wantY / DispatchViewer.spacing); // The positionY of the ideal row for the text. - var endX = startX + name.Length * F.trainFont.Size; - //out of drawing area - if (endX < 0) - return noFreeSlotFound; - - int positionY = desiredPositionY; - while (positionY >= 0 && positionY < F.alignedTextY.Length) - { - //if the line contains no text yet, put it there - if (F.alignedTextNum[positionY] == 0) - return SaveLabelLocation(startX, endX, positionY); - - bool conflict = false; - - //check if it intersects with any labels already in this row - for (var col = 0; col < F.alignedTextNum[positionY]; col++) - { - var v = F.alignedTextY[positionY][col]; - //check conflict with a text, v.X is the start of the text, v.Y is the end of the text - if ((endX >= v.X && startX <= v.Y)) - { - conflict = true; - break; - } - } - - if (conflict) - { - positionY--; // Try a different row: -1, -2, +2, +1 - - if (positionY - desiredPositionY <= -2) // Cannot move up (-ve Y), so try to move it down (+ve Y) - positionY = desiredPositionY + 2; // Try +2 then +1 - - if (positionY == desiredPositionY) // Back to original position again - return noFreeSlotFound; - } - else - { - // Check that row has an unused column in its fixed size array - if (F.alignedTextNum[positionY] >= F.alignedTextY[positionY].Length) - return noFreeSlotFound; - - return SaveLabelLocation(startX, endX, positionY); - } - } - return noFreeSlotFound; - } - - private float SaveLabelLocation(float startX, float endX, int positionY) - { - // add start and end location for the new label - F.alignedTextY[positionY][F.alignedTextNum[positionY]] = new Vector2 { X = startX, Y = endX }; - - F.alignedTextNum[positionY]++; - - return positionY * DispatchViewer.spacing; - } - } -} diff --git a/Source/RunActivity/Viewer3D/Map/MapDataProvider.cs b/Source/RunActivity/Viewer3D/Map/MapDataProvider.cs index 19997dbe99..9fe70a6afd 100644 --- a/Source/RunActivity/Viewer3D/Map/MapDataProvider.cs +++ b/Source/RunActivity/Viewer3D/Map/MapDataProvider.cs @@ -232,14 +232,14 @@ public static bool ContainsDeadlockIndicators(string text) // Arrays are used instead of lists to avoid delays for memory management. public void CleanTextCells() { - if (F.alignedTextY == null || F.alignedTextY.Length != F.mapCanvas.Height / DispatchViewer.spacing) //first time to put text, or the text height has changed + if (F.alignedTextY == null || F.alignedTextY.Length != F.mapCanvas.Height / MapViewer.spacing) //first time to put text, or the text height has changed { - F.alignedTextY = new Vector2[F.mapCanvas.Height / DispatchViewer.spacing][]; - F.alignedTextNum = new int[F.mapCanvas.Height / DispatchViewer.spacing]; - for (var i = 0; i < F.mapCanvas.Height / DispatchViewer.spacing; i++) + F.alignedTextY = new Vector2[F.mapCanvas.Height / MapViewer.spacing][]; + F.alignedTextNum = new int[F.mapCanvas.Height / MapViewer.spacing]; + for (var i = 0; i < F.mapCanvas.Height / MapViewer.spacing; i++) F.alignedTextY[i] = new Vector2[5]; //each line has at most 5 slots } - for (var i = 0; i < F.mapCanvas.Height / DispatchViewer.spacing; i++) + for (var i = 0; i < F.mapCanvas.Height / MapViewer.spacing; i++) F.alignedTextNum[i] = 0; } @@ -249,7 +249,7 @@ public float GetUnusedYLocation(float startX, float wantY, string name) { const float noFreeSlotFound = -1f; - var desiredPositionY = (int)(wantY / DispatchViewer.spacing); // The positionY of the ideal row for the text. + var desiredPositionY = (int)(wantY / MapViewer.spacing); // The positionY of the ideal row for the text. var endX = startX + (name.Length * F.trainFont.Size); //out of drawing area if (endX < 0) @@ -302,7 +302,7 @@ private float SaveLabelLocation(float startX, float endX, int positionY) F.alignedTextNum[positionY]++; - return positionY * DispatchViewer.spacing; + return positionY * MapViewer.spacing; } } } diff --git a/Source/RunActivity/Viewer3D/Map/MapForm.Designer.cs b/Source/RunActivity/Viewer3D/Map/MapForm.Designer.cs index b0c29fcc4a..5ee0bd065d 100644 --- a/Source/RunActivity/Viewer3D/Map/MapForm.Designer.cs +++ b/Source/RunActivity/Viewer3D/Map/MapForm.Designer.cs @@ -29,11 +29,11 @@ protected override void Dispose(bool disposing) private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.Windows.Forms.ListViewItem listViewItem17 = new System.Windows.Forms.ListViewItem(new string[] { + System.Windows.Forms.ListViewItem listViewItem1 = new System.Windows.Forms.ListViewItem(new string[] { "Player1 (you)"}, -1, System.Drawing.Color.Empty, System.Drawing.Color.Empty, new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)))); - System.Windows.Forms.ListViewItem listViewItem18 = new System.Windows.Forms.ListViewItem("Player2"); - System.Windows.Forms.ListViewItem listViewItem19 = new System.Windows.Forms.ListViewItem("Player3"); - System.Windows.Forms.ListViewItem listViewItem20 = new System.Windows.Forms.ListViewItem("..."); + System.Windows.Forms.ListViewItem listViewItem2 = new System.Windows.Forms.ListViewItem("Player2"); + System.Windows.Forms.ListViewItem listViewItem3 = new System.Windows.Forms.ListViewItem("Player3"); + System.Windows.Forms.ListViewItem listViewItem4 = new System.Windows.Forms.ListViewItem("..."); this.playerRolePanel = new System.Windows.Forms.Panel(); this.playerRoleLink = new System.Windows.Forms.LinkLabel(); this.playerRoleExplanation = new System.Windows.Forms.Label(); @@ -737,7 +737,6 @@ private void InitializeComponent() // // drawPathCheckbox // - this.drawPathCheckbox.AutoEllipsis = true; this.drawPathCheckbox.AutoSize = true; this.drawPathCheckbox.Checked = true; this.drawPathCheckbox.CheckState = System.Windows.Forms.CheckState.Checked; @@ -784,10 +783,10 @@ private void InitializeComponent() this.playersView.HideSelection = false; this.playersView.HoverSelection = true; this.playersView.Items.AddRange(new System.Windows.Forms.ListViewItem[] { - listViewItem17, - listViewItem18, - listViewItem19, - listViewItem20}); + listViewItem1, + listViewItem2, + listViewItem3, + listViewItem4}); this.playersView.Location = new System.Drawing.Point(7, 19); this.playersView.Name = "playersView"; this.playersView.Size = new System.Drawing.Size(167, 202); @@ -1005,8 +1004,8 @@ private void InitializeComponent() this.MinimumSize = new System.Drawing.Size(600, 400); this.Name = "MapViewer"; this.Text = "Map window"; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.DispatchViewerBeta_FormClosing); - this.Resize += new System.EventHandler(this.DispatchViewerBeta_Resize); + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MapViewer_FormClosing); + this.Resize += new System.EventHandler(this.MapViewer_Resize); this.playerRolePanel.ResumeLayout(false); this.playerRolePanel.PerformLayout(); this.tableLayoutPanel1.ResumeLayout(false); diff --git a/Source/RunActivity/Viewer3D/Map/MapForm.cs b/Source/RunActivity/Viewer3D/Map/MapForm.cs index 6c0bc129fd..8a799cd8bc 100644 --- a/Source/RunActivity/Viewer3D/Map/MapForm.cs +++ b/Source/RunActivity/Viewer3D/Map/MapForm.cs @@ -747,9 +747,9 @@ private void ShowSwitches(Graphics g, float width) var scaledItem = new PointF() { X = x, Y = y }; if (sw.Item.TrJunctionNode.SelectedRoute == sw.main) - g.FillEllipse(new SolidBrush(Color.FromArgb(93, 64, 55)), DispatchViewer.GetRect(scaledItem, width)); + g.FillEllipse(new SolidBrush(Color.FromArgb(93, 64, 55)), GetRect(scaledItem, width)); else - g.FillEllipse(new SolidBrush(Color.FromArgb(161, 136, 127)), DispatchViewer.GetRect(scaledItem, width)); + g.FillEllipse(new SolidBrush(Color.FromArgb(161, 136, 127)), GetRect(scaledItem, width)); sw.Location2D.X = scaledItem.X; sw.Location2D.Y = scaledItem.Y; switchItemsDrawn.Add(sw); @@ -789,7 +789,7 @@ private void ShowSignals(Graphics g, PointF scaledB, float width) color = new SolidBrush(Color.FromArgb(244, 67, 54)); pen = redPen; } - g.FillEllipse(color, DispatchViewer.GetRect(scaledItem, width)); + g.FillEllipse(color, GetRect(scaledItem, width)); signalItemsDrawn.Add(s); if (s.hasDir) { @@ -856,7 +856,7 @@ private void ShowPlatformLabels(Graphics g) // If track is close to horizontal, then start label search 1 row down to minimise overwriting platform line. if (p.Extent1.X != p.Extent2.X && Math.Abs((p.Extent1.Y - p.Extent2.Y) / (p.Extent1.X - p.Extent2.X)) < 0.1) - yPixels += DispatchViewer.spacing; + yPixels += spacing; scaledItem.Y = MapDataProvider.GetUnusedYLocation(scaledItem.X, mapCanvas.Height - ((p.Location.Y - subY) * yScale), p.Name); if (scaledItem.Y >= 0f) // -1 indicates no free slot to draw label @@ -903,7 +903,7 @@ private void DrawZoomTarget(Graphics g) public Vector2[][] alignedTextY; public int[] alignedTextNum; - public const int spacing = 12; + public const int spacing = 12; // TODO: Rename to clarify the meaning of this variable const float SignalErrorDistance = 100; const float SignalWarningDistance = 500; @@ -1222,7 +1222,7 @@ private static void CalcBounds(ref float limit, double v, bool gt) void UITimer_Tick(object sender, EventArgs e) { - if (Viewer.DebugViewerBetaEnabled == false) // Ctrl+9 sets this true to initialise the window and make it visible + if (Viewer.MapViewerEnabled == false) // Ctrl+9 sets this true to initialise the window and make it visible { Visible = false; return; @@ -1774,7 +1774,7 @@ private void penaltyCheckbox_CheckedChanged(object sender, EventArgs e) else { MPManager.BroadCast(new MSGMessage("All", "NoOverSpeed", "Penalty for overspeed and passing stop light").ToString()); } } - private void DispatchViewerBeta_Resize(object sender, EventArgs e) + private void MapViewer_Resize(object sender, EventArgs e) { InitializeImage(); } @@ -1997,11 +1997,11 @@ private void messageActionsMenu_ItemClicked(object sender, ToolStripItemClickedE } } - private void DispatchViewerBeta_FormClosing(object sender, FormClosingEventArgs e) + private void MapViewer_FormClosing(object sender, FormClosingEventArgs e) { // Prevent the window from closing; instead, hide it e.Cancel = true; - Viewer.DebugViewerBetaEnabled = false; + Viewer.MapViewerEnabled = false; } } diff --git a/Source/RunActivity/Viewer3D/Processes/GameStateRunActivity.cs b/Source/RunActivity/Viewer3D/Processes/GameStateRunActivity.cs index ea6d7352e0..c3972e29d9 100644 --- a/Source/RunActivity/Viewer3D/Processes/GameStateRunActivity.cs +++ b/Source/RunActivity/Viewer3D/Processes/GameStateRunActivity.cs @@ -95,7 +95,7 @@ struct savedValues public string acttype; } - static DispatchViewer DebugViewer { get { return Program.DebugViewer; } set { Program.DebugViewer = value; } } + static MapViewer MapForm { get { return Program.MapForm; } set { Program.MapForm = value; } } static SoundDebugForm SoundDebugForm { get { return Program.SoundDebugForm; } set { Program.SoundDebugForm = value; } } LoadingPrimitive Loading; diff --git a/Source/RunActivity/Viewer3D/Processes/GameStateViewer3D.cs b/Source/RunActivity/Viewer3D/Processes/GameStateViewer3D.cs index 3977eef017..dd21cad50f 100644 --- a/Source/RunActivity/Viewer3D/Processes/GameStateViewer3D.cs +++ b/Source/RunActivity/Viewer3D/Processes/GameStateViewer3D.cs @@ -51,14 +51,9 @@ internal override void BeginRender(RenderFrame frame) Game.InactiveSleepTime = TimeSpan.Zero; // We must create these forms on the main thread (Render) or they won't pump events correctly. - - Program.DebugViewer = new DispatchViewer(Viewer.Simulator, Viewer); - Program.DebugViewer.Hide(); - Viewer.DebugViewerEnabled = false; - Program.MapForm = new MapViewer(Viewer.Simulator, Viewer); Program.MapForm.Hide(); - Viewer.DebugViewerBetaEnabled = false; + Viewer.MapViewerEnabled = false; Program.SoundDebugForm = new SoundDebugForm(Viewer); Program.SoundDebugForm.Hide(); @@ -137,8 +132,8 @@ internal override void Dispose() MPManager.Client.Stop(); if (Program.Simulator != null) Program.Simulator.Stop(); - if (Program.DebugViewer != null) - Program.DebugViewer.Dispose(); + if (Program.MapForm != null) + Program.MapForm.Dispose(); if (Program.SoundDebugForm != null) Program.SoundDebugForm.Dispose(); base.Dispose(); diff --git a/Source/RunActivity/Viewer3D/SkyInterpolation.cs b/Source/RunActivity/Viewer3D/SkyInterpolation.cs index a247eb27c3..d495a55cd5 100644 --- a/Source/RunActivity/Viewer3D/SkyInterpolation.cs +++ b/Source/RunActivity/Viewer3D/SkyInterpolation.cs @@ -82,7 +82,7 @@ public void SetSunAndMoonDirection(ref Vector3 solarDirection, ref Vector3 lunar /// /// Returns the advance of time in units of 20 mins (1200 seconds). - /// Allows for an offset in hours from a control in the DispatchViewer. + /// Allows for an offset in hours that can be set with the corresponding in-game keybinds. /// This is a user convenience to reveal in daylight what might be hard to see at night. /// /// The advance of time in units of 20 mins (1200 seconds). diff --git a/Source/RunActivity/Viewer3D/Viewer.cs b/Source/RunActivity/Viewer3D/Viewer.cs index ca080f27eb..c83959bbf2 100644 --- a/Source/RunActivity/Viewer3D/Viewer.cs +++ b/Source/RunActivity/Viewer3D/Viewer.cs @@ -191,8 +191,7 @@ void CameraActivate() public Vector3 NearPoint { get; private set; } public Vector3 FarPoint { get; private set; } - public bool DebugViewerEnabled { get; set; } - public bool DebugViewerBetaEnabled { get; set; } + public bool MapViewerEnabled { get; set; } public bool SoundDebugFormEnabled { get; set; } public TRPFile TRP; // Track profile file @@ -1170,23 +1169,22 @@ void HandleUserInput(ElapsedTime elapsedTime) if (UserInput.IsPressed(UserCommand.GameSwitchManualMode)) PlayerTrain.RequestToggleManualMode(); if (UserInput.IsPressed(UserCommand.GameResetOutOfControlMode)) new ResetOutOfControlModeCommand(Log); - if (UserInput.IsPressed(UserCommand.GameMultiPlayerDispatcher)) { DebugViewerEnabled = !DebugViewerEnabled; return; } - if (UserInput.IsPressed(UserCommand.GameMultiPlayerDispatcherBeta)) { DebugViewerBetaEnabled = !DebugViewerBetaEnabled; return; } + if (UserInput.IsPressed(UserCommand.GameMultiPlayerDispatcher)) { MapViewerEnabled = !MapViewerEnabled; return; } if (UserInput.IsPressed(UserCommand.DebugSoundForm)) { SoundDebugFormEnabled = !SoundDebugFormEnabled; return; } if (UserInput.IsPressed(UserCommand.CameraJumpSeeSwitch)) { - if (Program.DebugViewer != null && Program.DebugViewer.Enabled && (Program.DebugViewer.switchPickedItem != null || Program.DebugViewer.signalPickedItem != null)) + if (Program.MapForm != null && Program.MapForm.Enabled && (Program.MapForm.switchPickedItem != null || Program.MapForm.signalPickedItem != null)) { WorldLocation wos; - TrJunctionNode nextSwitchTrack = Program.DebugViewer.switchPickedItem?.Item?.TrJunctionNode; + TrJunctionNode nextSwitchTrack = Program.MapForm.switchPickedItem?.Item?.TrJunctionNode; if (nextSwitchTrack != null) { wos = new WorldLocation(nextSwitchTrack.TN.UiD.TileX, nextSwitchTrack.TN.UiD.TileZ, nextSwitchTrack.TN.UiD.X, nextSwitchTrack.TN.UiD.Y + 8, nextSwitchTrack.TN.UiD.Z); } else { - var s = Program.DebugViewer.signalPickedItem.Item; + var s = Program.MapForm.signalPickedItem.Item; wos = new WorldLocation(s.TileX, s.TileZ, s.X, s.Y + 8, s.Z); } if (FreeRoamCameraList.Count == 0) @@ -1307,13 +1305,11 @@ void HandleUserInput(ElapsedTime elapsedTime) // } //} - //in the dispatcher window, when one clicks a train and "See in Game", will jump to see that train - // TODO: Remove `DebugViewer` in the future - if ((Program.DebugViewer != null && Program.DebugViewer.ClickedTrain == true) || (Program.MapForm != null && Program.MapForm.ClickedTrain == true)) + // Map window: jump to the selected train in-game + if (Program.MapForm != null && Program.MapForm.ClickedTrain == true) { - Program.DebugViewer.ClickedTrain = false; Program.MapForm.ClickedTrain = false; - if (SelectedTrain != Program.DebugViewer.PickedTrain || SelectedTrain != Program.MapForm.PickedTrain) + if (SelectedTrain != Program.MapForm.PickedTrain) { SelectedTrain = Program.MapForm.PickedTrain; Simulator.AI.aiListChanged = true; From c39984c5113133494016bdabb61605e93e3427a6 Mon Sep 17 00:00:00 2001 From: Looky1173 <60521810+Looky1173@users.noreply.github.com> Date: Sun, 3 Dec 2023 14:56:53 +0100 Subject: [PATCH 32/33] Small cleanup --- .../Viewer3D/Map/MapDataProvider.cs | 25 ++++----- Source/RunActivity/Viewer3D/Map/MapForm.cs | 55 +++++-------------- 2 files changed, 24 insertions(+), 56 deletions(-) diff --git a/Source/RunActivity/Viewer3D/Map/MapDataProvider.cs b/Source/RunActivity/Viewer3D/Map/MapDataProvider.cs index 9fe70a6afd..6a526458dc 100644 --- a/Source/RunActivity/Viewer3D/Map/MapDataProvider.cs +++ b/Source/RunActivity/Viewer3D/Map/MapDataProvider.cs @@ -132,12 +132,9 @@ public void PopulateItemLists() // Instead create a single item which replaces the 2 platform items. var replacement = new PlatformWidget(item as PlatformItem) { - Extent1 = oldLocation - , - Extent2 = newLocation - // Give it the right-hand location - , - Location = GetRightHandPoint(oldLocation, newLocation) + Extent1 = oldLocation, + Extent2 = newLocation, + Location = GetRightHandPoint(oldLocation, newLocation) // Give it the right-hand location }; // Replace the old platform item with the replacement @@ -204,8 +201,8 @@ public void FixForBadData(float width, ref PointF scaledA, ref PointF scaledB, P public bool IsActiveTrain(Simulation.AIs.AITrain t) { return t != null -&& (t.MovementState != Simulation.AIs.AITrain.AI_MOVEMENT_STATE.AI_STATIC - && !(t.TrainType == Train.TRAINTYPE.AI_INCORPORATED && !t.IncorporatingTrain.IsPathless) +&& ((t.MovementState != Simulation.AIs.AITrain.AI_MOVEMENT_STATE.AI_STATIC + && !(t.TrainType == Train.TRAINTYPE.AI_INCORPORATED && !t.IncorporatingTrain.IsPathless)) || t.TrainType == Train.TRAINTYPE.PLAYER); } @@ -232,7 +229,7 @@ public static bool ContainsDeadlockIndicators(string text) // Arrays are used instead of lists to avoid delays for memory management. public void CleanTextCells() { - if (F.alignedTextY == null || F.alignedTextY.Length != F.mapCanvas.Height / MapViewer.spacing) //first time to put text, or the text height has changed + if (F.alignedTextY == null || F.alignedTextY.Length != F.mapCanvas.Height / MapViewer.spacing) // First time to put text, or the text height has changed { F.alignedTextY = new Vector2[F.mapCanvas.Height / MapViewer.spacing][]; F.alignedTextNum = new int[F.mapCanvas.Height / MapViewer.spacing]; @@ -251,20 +248,20 @@ public float GetUnusedYLocation(float startX, float wantY, string name) var desiredPositionY = (int)(wantY / MapViewer.spacing); // The positionY of the ideal row for the text. var endX = startX + (name.Length * F.trainFont.Size); - //out of drawing area - if (endX < 0) + + if (endX < 0) // Out of drawing area return noFreeSlotFound; var positionY = desiredPositionY; while (positionY >= 0 && positionY < F.alignedTextY.Length) { - //if the line contains no text yet, put it there + // If the line contains no text yet, put it there if (F.alignedTextNum[positionY] == 0) return SaveLabelLocation(startX, endX, positionY); var conflict = false; - //check if it intersects with any labels already in this row + // Check if it intersects with any labels already in this row for (var col = 0; col < F.alignedTextNum[positionY]; col++) { var v = F.alignedTextY[positionY][col]; @@ -297,7 +294,7 @@ public float GetUnusedYLocation(float startX, float wantY, string name) private float SaveLabelLocation(float startX, float endX, int positionY) { - // add start and end location for the new label + // Add start and end location for the new label F.alignedTextY[positionY][F.alignedTextNum[positionY]] = new Vector2 { X = startX, Y = endX }; F.alignedTextNum[positionY]++; diff --git a/Source/RunActivity/Viewer3D/Map/MapForm.cs b/Source/RunActivity/Viewer3D/Map/MapForm.cs index 8a799cd8bc..97ceb37fa4 100644 --- a/Source/RunActivity/Viewer3D/Map/MapForm.cs +++ b/Source/RunActivity/Viewer3D/Map/MapForm.cs @@ -75,7 +75,7 @@ public partial class MapViewer : Form public double switchPickedTime; public bool signalPickedItemHandled; public double signalPickedTime; - public bool DrawPath = true; //draw train path + public bool DrawPath = true; // Whether the train path should be drawn readonly TrackNode[] nodes; public List selectedTrainList; @@ -380,8 +380,8 @@ public void GenerateView() xScale = yScale = Math.Max(xScale, yScale); // Make X and Y scales the same to maintain correct angles // Set the default pen to represent 1 meter - var scale = (float)Math.Round(xScale); // Round to nearest pixels/meter - var penWidth = (int)MathHelper.Clamp(scale, 1, 4); // Keep 1 <= width <= 4 pixels + var scale = (float)Math.Round(xScale); // Round to nearest pixels/meter + var penWidth = (int)MathHelper.Clamp(scale, 1, 4); // Keep 1 <= width <= 4 pixels PointF[] points = new PointF[3]; Pen p = grayPen; @@ -396,10 +396,6 @@ public void GenerateView() var forwardDist = 100 / xScale; if (forwardDist < 5) forwardDist = 5; - /*PointF scaledA = new PointF(0, 0); - PointF scaledB = new PointF(0, 0); - PointF scaledC = new PointF(0, 0);*/ - // Draw platforms first because track is drawn over the thicker platform line DrawPlatforms(g, penWidth); @@ -421,7 +417,7 @@ public void GenerateView() ShowSwitches(g, widgetWidth); // Draw labels for sidings and platforms last so they go on top for readability - MapDataProvider.CleanTextCells(); // Empty the listing of labels ready for adding labels again + MapDataProvider.CleanTextCells(); // Empty the listing of labels ready for adding labels again ShowPlatformLabels(g); // Platforms take priority over sidings and signal states ShowSidingLabels(g); @@ -497,21 +493,8 @@ private void DrawTrains(Graphics g, PointF scaledA, PointF scaledB) selectedTrainList.Clear(); - /*if (simulator.TimetableMode) - { - // Add the player's train... - if (simulator.PlayerLocomotive.Train is AITrain) - selectedTrainList.Add(simulator.PlayerLocomotive.Train as AITrain); - - // ...then all the AI trains, including static consists. - foreach (AITrain train in simulator.AI.AITrains) - selectedTrainList.Add(train); - } - else - {*/ foreach (var train in simulator.Trains) selectedTrainList.Add(train); - /*}*/ foreach (var train in selectedTrainList) { @@ -677,9 +660,6 @@ private void SetTrainColor(Train t, TrainCar locoCar, TrainCar car) private void DrawTrainLabels(Graphics g, Train t, string trainName, PointF scaledTrain) { - /*WorldPosition worldPos = firstCar.WorldPosition; - scaledTrain.X = ((worldPos.TileX * 2048) - subX + worldPos.Location.X) * xScale; - scaledTrain.Y = -25 + mapCanvas.Height - (((worldPos.TileZ * 2048) - subY + worldPos.Location.Z) * yScale);*/ if (showActiveTrainsRadio.Checked) { if (t is AITrain && MapDataProvider.IsActiveTrain(t as AITrain)) @@ -945,7 +925,7 @@ SignallingDebugWindow.TrackSectionCacheEntry GetCacheEntry(Traveller position) return rv; } - //draw the train path if it is within the window + // Draw the train path if it is within the window public void DrawTrainPath(Train train, float subX, float subY, Pen pathPen, Graphics g, PointF scaledA, PointF scaledB, float stepDist, float MaximumSectionDistance) { if (DrawPath != true) return; @@ -1314,10 +1294,6 @@ private void mapCanvas_MouseDown(object sender, MouseEventArgs e) LastCursorPosition.X = e.X; LastCursorPosition.Y = e.Y; MPManager.Instance().ComposingText = false; - /*lblInstruction1.Visible = true; - lblInstruction2.Visible = true; - lblInstruction3.Visible = true; - lblInstruction4.Visible = true;*/ } private void mapCanvas_MouseUp(object sender, MouseEventArgs e) @@ -1383,10 +1359,6 @@ private void mapCanvas_MouseUp(object sender, MouseEventArgs e) } } - /*lblInstruction1.Visible = false; - lblInstruction2.Visible = false; - lblInstruction3.Visible = false; - lblInstruction4.Visible = false;*/ } private void UnHandleItemPick() @@ -1397,8 +1369,9 @@ private void UnHandleItemPick() private void HandlePickedSignal() { - if (MPManager.IsClient() && !MPManager.Instance().AmAider) // normal client not server or aider + if (MPManager.IsClient() && !MPManager.Instance().AmAider) // Normal client (not server nor aider) return; + setSwitchMenu.Visible = false; if (signalPickedItem == null) return; @@ -1415,8 +1388,8 @@ private void HandlePickedSignal() private void HandlePickedSwitch() { - if (MPManager.IsClient() && !MPManager.Instance().AmAider) - return;//normal client not server + if (MPManager.IsClient() && !MPManager.Instance().AmAider) // Normal client (not server nor aider) + return; setSignalMenu.Visible = false; if (switchPickedItem == null) return; @@ -1521,11 +1494,9 @@ private void setSwitchMenu_ItemClicked(object sender, ToolStripItemClickedEventA { case "mainRoute": Program.Simulator.Signals.RequestSetSwitch(sw.TN, (int)switchPickedItem.main); - //sw.SelectedRoute = (int)switchPickedItem.main; break; case "sideRoute": Program.Simulator.Signals.RequestSetSwitch(sw.TN, 1 - (int)switchPickedItem.main); - //sw.SelectedRoute = 1 - (int)switchPickedItem.main; break; } } @@ -1541,7 +1512,7 @@ private ItemWidget findItemFromMouse(int x, int y, int range) { foreach (var item in switchItemsDrawn) { - //if out of range, continue + // If out of range, continue if (item.Location2D.X < x - range || item.Location2D.X > x + range || item.Location2D.Y < y - range || item.Location2D.Y > y + range) continue; @@ -1566,7 +1537,7 @@ private ItemWidget findItemFromMouse(int x, int y, int range) { foreach (var item in signalItemsDrawn) { - //if out of range, continue + // If out of range, continue if (item.Location2D.X < x - range || item.Location2D.X > x + range || item.Location2D.Y < y - range || item.Location2D.Y > y + range) continue; @@ -1588,7 +1559,7 @@ private ItemWidget findItemFromMouse(int x, int y, int range) } } - //now check for trains (first car only) + // Now check for trains (first car only) TrainCar firstCar; PickedTrain = null; float tX, tY; closest = 100f; @@ -1621,7 +1592,7 @@ private ItemWidget findItemFromMouse(int x, int y, int range) if (PickedTrain == null) PickedTrain = t; } - //if a train is picked, will clear the avatar list selection + // If a train is picked, will clear the player list selection if (PickedTrain != null) { //AvatarView.SelectedItems.Clear(); From 3b5a2fe3bf8766a8dd2f5be1e6f900d43c6c2c18 Mon Sep 17 00:00:00 2001 From: Looky1173 <60521810+Looky1173@users.noreply.github.com> Date: Sun, 3 Dec 2023 15:21:06 +0100 Subject: [PATCH 33/33] Apply translations to dropdown menus manually (https://github.com/openrails/openrails/pull/865#issuecomment-1793471838) --- Source/Locales/Contrib/Contrib.pot | 4 +- Source/Locales/Menu/Menu.pot | 4 +- Source/Locales/ORTS.Common/ORTS.Common.pot | 442 ++++++++------- Source/Locales/ORTS.Menu/ORTS.Menu.pot | 4 +- .../Locales/ORTS.Settings/ORTS.Settings.pot | 12 +- .../Orts.Formats.OR/Orts.Formats.OR.pot | 4 +- .../Orts.Simulation/Orts.Simulation.pot | 4 +- Source/Locales/RunActivity/RunActivity.pot | 517 +++++++----------- Source/Locales/Updater/Updater.pot | 4 +- .../Viewer3D/Map/MapForm.Designer.cs | 56 +- Source/RunActivity/Viewer3D/Map/MapForm.cs | 24 + 11 files changed, 478 insertions(+), 597 deletions(-) diff --git a/Source/Locales/Contrib/Contrib.pot b/Source/Locales/Contrib/Contrib.pot index dae17414da..db4593970a 100644 --- a/Source/Locales/Contrib/Contrib.pot +++ b/Source/Locales/Contrib/Contrib.pot @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2023-10-24 12:50:03+0200\n" -"PO-Revision-Date: 2023-10-24 12:50:04+0200\n" +"POT-Creation-Date: 2023-12-03 15:16:32+0100\n" +"PO-Revision-Date: 2023-12-03 15:16:33+0100\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" diff --git a/Source/Locales/Menu/Menu.pot b/Source/Locales/Menu/Menu.pot index 0b08277784..0b07ebcb24 100644 --- a/Source/Locales/Menu/Menu.pot +++ b/Source/Locales/Menu/Menu.pot @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2023-10-24 12:50:07+0200\n" -"PO-Revision-Date: 2023-10-24 12:50:07+0200\n" +"POT-Creation-Date: 2023-12-03 15:16:36+0100\n" +"PO-Revision-Date: 2023-12-03 15:16:36+0100\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" diff --git a/Source/Locales/ORTS.Common/ORTS.Common.pot b/Source/Locales/ORTS.Common/ORTS.Common.pot index 938cf23fb8..2b3b02f637 100644 --- a/Source/Locales/ORTS.Common/ORTS.Common.pot +++ b/Source/Locales/ORTS.Common/ORTS.Common.pot @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2023-10-24 12:50:11+0200\n" -"PO-Revision-Date: 2023-10-24 12:50:11+0200\n" +"POT-Creation-Date: 2023-12-03 15:16:39+0100\n" +"PO-Revision-Date: 2023-12-03 15:16:40+0100\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -270,878 +270,874 @@ msgid "Game Multi Player Dispatcher" msgstr "" #: ../../ORTS.Common/Input/UserCommand.cs:27 -msgid "Game Multi Player Dispatcher Beta" -msgstr "" - -#: ../../ORTS.Common/Input/UserCommand.cs:28 msgid "Game Multi Player Texting" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:29 +#: ../../ORTS.Common/Input/UserCommand.cs:28 msgid "Game Switch Manual Mode" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:30 +#: ../../ORTS.Common/Input/UserCommand.cs:29 msgid "Game Reset Out Of Control Mode" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:31 +#: ../../ORTS.Common/Input/UserCommand.cs:30 msgid "Game Clear Signal Forward" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:32 +#: ../../ORTS.Common/Input/UserCommand.cs:31 msgid "Game Clear Signal Backward" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:33 +#: ../../ORTS.Common/Input/UserCommand.cs:32 msgid "Game Reset Signal Forward" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:34 +#: ../../ORTS.Common/Input/UserCommand.cs:33 msgid "Game Reset Signal Backward" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:35 +#: ../../ORTS.Common/Input/UserCommand.cs:34 msgid "Game Autopilot Mode" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:36 +#: ../../ORTS.Common/Input/UserCommand.cs:35 msgid "Game Suspend Old Player" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:38 +#: ../../ORTS.Common/Input/UserCommand.cs:37 msgid "Display Next Window Tab" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:39 +#: ../../ORTS.Common/Input/UserCommand.cs:38 msgid "Display Help Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:40 +#: ../../ORTS.Common/Input/UserCommand.cs:39 msgid "Display Track Monitor Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:41 +#: ../../ORTS.Common/Input/UserCommand.cs:40 msgid "Display HUD" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:42 +#: ../../ORTS.Common/Input/UserCommand.cs:41 msgid "Display Train Driving Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:43 +#: ../../ORTS.Common/Input/UserCommand.cs:42 msgid "Display Multi Player Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:44 +#: ../../ORTS.Common/Input/UserCommand.cs:43 msgid "Display Car Labels" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:45 +#: ../../ORTS.Common/Input/UserCommand.cs:44 msgid "Display Station Labels" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:46 +#: ../../ORTS.Common/Input/UserCommand.cs:45 msgid "Display Switch Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:47 +#: ../../ORTS.Common/Input/UserCommand.cs:46 msgid "Display Train Operations Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:48 +#: ../../ORTS.Common/Input/UserCommand.cs:47 msgid "Display Train Dpu Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:49 +#: ../../ORTS.Common/Input/UserCommand.cs:48 msgid "Display Next Station Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:50 +#: ../../ORTS.Common/Input/UserCommand.cs:49 msgid "Display Compass Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:51 +#: ../../ORTS.Common/Input/UserCommand.cs:50 msgid "Display Train List Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:52 +#: ../../ORTS.Common/Input/UserCommand.cs:51 msgid "Display EOT List Window" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:54 +#: ../../ORTS.Common/Input/UserCommand.cs:53 msgid "Debug Speed Up" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:55 +#: ../../ORTS.Common/Input/UserCommand.cs:54 msgid "Debug Speed Down" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:56 +#: ../../ORTS.Common/Input/UserCommand.cs:55 msgid "Debug Speed Reset" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:57 +#: ../../ORTS.Common/Input/UserCommand.cs:56 msgid "Debug Overcast Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:58 +#: ../../ORTS.Common/Input/UserCommand.cs:57 msgid "Debug Overcast Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:59 +#: ../../ORTS.Common/Input/UserCommand.cs:58 msgid "Debug Fog Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:60 +#: ../../ORTS.Common/Input/UserCommand.cs:59 msgid "Debug Fog Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:61 +#: ../../ORTS.Common/Input/UserCommand.cs:60 msgid "Debug Precipitation Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:62 +#: ../../ORTS.Common/Input/UserCommand.cs:61 msgid "Debug Precipitation Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:63 +#: ../../ORTS.Common/Input/UserCommand.cs:62 msgid "Debug Precipitation Liquidity Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:64 +#: ../../ORTS.Common/Input/UserCommand.cs:63 msgid "Debug Precipitation Liquidity Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:65 +#: ../../ORTS.Common/Input/UserCommand.cs:64 msgid "Debug Daylight Offset Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:66 +#: ../../ORTS.Common/Input/UserCommand.cs:65 msgid "Debug Daylight Offset Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:67 +#: ../../ORTS.Common/Input/UserCommand.cs:66 msgid "Debug Weather Change" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:68 +#: ../../ORTS.Common/Input/UserCommand.cs:67 msgid "Debug Clock Forwards" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:69 +#: ../../ORTS.Common/Input/UserCommand.cs:68 msgid "Debug Clock Backwards" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:70 +#: ../../ORTS.Common/Input/UserCommand.cs:69 msgid "Debug Logger" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:71 +#: ../../ORTS.Common/Input/UserCommand.cs:70 msgid "Debug Lock Shadows" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:72 +#: ../../ORTS.Common/Input/UserCommand.cs:71 msgid "Debug Dump Keyboard Map" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:73 +#: ../../ORTS.Common/Input/UserCommand.cs:72 msgid "Debug Log Render Frame" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:74 +#: ../../ORTS.Common/Input/UserCommand.cs:73 msgid "Debug Tracks" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:75 +#: ../../ORTS.Common/Input/UserCommand.cs:74 msgid "Debug Signalling" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:76 +#: ../../ORTS.Common/Input/UserCommand.cs:75 msgid "Debug Reset Wheel Slip" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:77 +#: ../../ORTS.Common/Input/UserCommand.cs:76 msgid "Debug Toggle Advanced Adhesion" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:78 +#: ../../ORTS.Common/Input/UserCommand.cs:77 msgid "Debug Sound Form" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:79 +#: ../../ORTS.Common/Input/UserCommand.cs:78 msgid "Debug Physics Form" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:80 +#: ../../ORTS.Common/Input/UserCommand.cs:79 msgid "Debug Toggle Confirmations" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:82 +#: ../../ORTS.Common/Input/UserCommand.cs:81 msgid "Camera Cab" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:83 +#: ../../ORTS.Common/Input/UserCommand.cs:82 msgid "Camera Change Passenger Viewpoint" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:84 +#: ../../ORTS.Common/Input/UserCommand.cs:83 msgid "Camera Change 3DCab Viewpoint" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:85 +#: ../../ORTS.Common/Input/UserCommand.cs:84 msgid "Camera Toggle 3D Cab" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:86 +#: ../../ORTS.Common/Input/UserCommand.cs:85 msgid "Camera Toggle Show Cab" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:87 +#: ../../ORTS.Common/Input/UserCommand.cs:86 msgid "Camera Toggle Letterbox Cab" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:88 +#: ../../ORTS.Common/Input/UserCommand.cs:87 msgid "Camera Head Out Forward" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:89 +#: ../../ORTS.Common/Input/UserCommand.cs:88 msgid "Camera Head Out Backward" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:90 +#: ../../ORTS.Common/Input/UserCommand.cs:89 msgid "Camera Outside Front" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:91 +#: ../../ORTS.Common/Input/UserCommand.cs:90 msgid "Camera Outside Rear" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:92 +#: ../../ORTS.Common/Input/UserCommand.cs:91 msgid "Camera Trackside" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:93 +#: ../../ORTS.Common/Input/UserCommand.cs:92 msgid "Camera SpecialTracksidePoint" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:94 +#: ../../ORTS.Common/Input/UserCommand.cs:93 msgid "Camera Passenger" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:95 +#: ../../ORTS.Common/Input/UserCommand.cs:94 msgid "Camera Brakeman" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:96 +#: ../../ORTS.Common/Input/UserCommand.cs:95 msgid "Camera Free" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:97 +#: ../../ORTS.Common/Input/UserCommand.cs:96 msgid "Camera Previous Free" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:98 +#: ../../ORTS.Common/Input/UserCommand.cs:97 msgid "Camera Reset" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:99 +#: ../../ORTS.Common/Input/UserCommand.cs:98 msgid "Camera Move Fast" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:100 +#: ../../ORTS.Common/Input/UserCommand.cs:99 msgid "Camera Move Slow" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:101 +#: ../../ORTS.Common/Input/UserCommand.cs:100 msgid "Camera Pan (Rotate) Left" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:102 +#: ../../ORTS.Common/Input/UserCommand.cs:101 msgid "Camera Pan (Rotate) Right" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:103 +#: ../../ORTS.Common/Input/UserCommand.cs:102 msgid "Camera Pan (Rotate) Up" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:104 +#: ../../ORTS.Common/Input/UserCommand.cs:103 msgid "Camera Pan (Rotate) Down" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:105 +#: ../../ORTS.Common/Input/UserCommand.cs:104 msgid "Camera Zoom In (Move Z)" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:106 +#: ../../ORTS.Common/Input/UserCommand.cs:105 msgid "Camera Zoom Out (Move Z)" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:107 +#: ../../ORTS.Common/Input/UserCommand.cs:106 msgid "Camera Rotate (Pan) Left" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:108 +#: ../../ORTS.Common/Input/UserCommand.cs:107 msgid "Camera Rotate (Pan) Right" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:109 +#: ../../ORTS.Common/Input/UserCommand.cs:108 msgid "Camera Rotate (Pan) Up" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:110 +#: ../../ORTS.Common/Input/UserCommand.cs:109 msgid "Camera Rotate (Pan) Down" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:111 +#: ../../ORTS.Common/Input/UserCommand.cs:110 msgid "Camera Car Next" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:112 +#: ../../ORTS.Common/Input/UserCommand.cs:111 msgid "Camera Car Previous" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:113 +#: ../../ORTS.Common/Input/UserCommand.cs:112 msgid "Camera Car First" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:114 +#: ../../ORTS.Common/Input/UserCommand.cs:113 msgid "Camera Car Last" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:115 +#: ../../ORTS.Common/Input/UserCommand.cs:114 msgid "Camera Jumping Trains" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:116 +#: ../../ORTS.Common/Input/UserCommand.cs:115 msgid "Camera Jump Back Player" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:117 +#: ../../ORTS.Common/Input/UserCommand.cs:116 msgid "Camera Jump See Switch" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:118 +#: ../../ORTS.Common/Input/UserCommand.cs:117 msgid "Camera Vibrate" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:119 +#: ../../ORTS.Common/Input/UserCommand.cs:118 msgid "Camera Scroll Right" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:120 +#: ../../ORTS.Common/Input/UserCommand.cs:119 msgid "Camera Scroll Left" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:121 +#: ../../ORTS.Common/Input/UserCommand.cs:120 msgid "Camera Browse Backwards" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:122 +#: ../../ORTS.Common/Input/UserCommand.cs:121 msgid "Camera Browse Forwards" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:124 +#: ../../ORTS.Common/Input/UserCommand.cs:123 msgid "Control Forwards" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:125 +#: ../../ORTS.Common/Input/UserCommand.cs:124 msgid "Control Backwards" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:126 +#: ../../ORTS.Common/Input/UserCommand.cs:125 msgid "Control Throttle Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:127 +#: ../../ORTS.Common/Input/UserCommand.cs:126 msgid "Control Throttle Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:128 +#: ../../ORTS.Common/Input/UserCommand.cs:127 msgid "Control Throttle Zero" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:129 +#: ../../ORTS.Common/Input/UserCommand.cs:128 msgid "Control Gear Up" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:130 +#: ../../ORTS.Common/Input/UserCommand.cs:129 msgid "Control Gear Down" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:131 +#: ../../ORTS.Common/Input/UserCommand.cs:130 msgid "Control Train Brake Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:132 +#: ../../ORTS.Common/Input/UserCommand.cs:131 msgid "Control Train Brake Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:133 +#: ../../ORTS.Common/Input/UserCommand.cs:132 msgid "Control Train Brake Zero" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:134 +#: ../../ORTS.Common/Input/UserCommand.cs:133 msgid "Control Engine Brake Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:135 +#: ../../ORTS.Common/Input/UserCommand.cs:134 msgid "Control Engine Brake Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:136 +#: ../../ORTS.Common/Input/UserCommand.cs:135 msgid "Control Brakeman Brake Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:137 +#: ../../ORTS.Common/Input/UserCommand.cs:136 msgid "Control Brakeman Brake Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:138 +#: ../../ORTS.Common/Input/UserCommand.cs:137 msgid "Control Dynamic Brake Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:139 +#: ../../ORTS.Common/Input/UserCommand.cs:138 msgid "Control Dynamic Brake Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:140 +#: ../../ORTS.Common/Input/UserCommand.cs:139 msgid "Control Bail Off" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:141 +#: ../../ORTS.Common/Input/UserCommand.cs:140 msgid "Control Brake Quick Release" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:142 +#: ../../ORTS.Common/Input/UserCommand.cs:141 msgid "Control Brake Overcharge" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:143 +#: ../../ORTS.Common/Input/UserCommand.cs:142 msgid "Control Initialize Brakes" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:144 +#: ../../ORTS.Common/Input/UserCommand.cs:143 msgid "Control Handbrake Full" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:145 +#: ../../ORTS.Common/Input/UserCommand.cs:144 msgid "Control Handbrake None" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:146 +#: ../../ORTS.Common/Input/UserCommand.cs:145 msgid "Control Odometer Show/Hide" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:147 +#: ../../ORTS.Common/Input/UserCommand.cs:146 msgid "Control Odometer Reset" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:148 +#: ../../ORTS.Common/Input/UserCommand.cs:147 msgid "Control Odometer Direction" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:149 +#: ../../ORTS.Common/Input/UserCommand.cs:148 msgid "Control Retainers On" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:150 +#: ../../ORTS.Common/Input/UserCommand.cs:149 msgid "Control Retainers Off" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:151 +#: ../../ORTS.Common/Input/UserCommand.cs:150 msgid "Control Brake Hose Connect" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:152 +#: ../../ORTS.Common/Input/UserCommand.cs:151 msgid "Control Brake Hose Disconnect" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:153 +#: ../../ORTS.Common/Input/UserCommand.cs:152 msgid "Control Alerter" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:154 +#: ../../ORTS.Common/Input/UserCommand.cs:153 msgid "Control Emergency Push Button" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:155 +#: ../../ORTS.Common/Input/UserCommand.cs:154 msgid "Control EOT Emergency Brake" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:156 +#: ../../ORTS.Common/Input/UserCommand.cs:155 msgid "Control Sander" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:157 +#: ../../ORTS.Common/Input/UserCommand.cs:156 msgid "Control Sander Toggle" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:158 +#: ../../ORTS.Common/Input/UserCommand.cs:157 msgid "Control Wiper" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:159 +#: ../../ORTS.Common/Input/UserCommand.cs:158 msgid "Control Horn" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:160 +#: ../../ORTS.Common/Input/UserCommand.cs:159 msgid "Control Bell" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:161 +#: ../../ORTS.Common/Input/UserCommand.cs:160 msgid "Control Bell Toggle" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:162 +#: ../../ORTS.Common/Input/UserCommand.cs:161 msgid "Control Door Left" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:163 +#: ../../ORTS.Common/Input/UserCommand.cs:162 msgid "Control Door Right" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:164 +#: ../../ORTS.Common/Input/UserCommand.cs:163 msgid "Control Mirror" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:165 +#: ../../ORTS.Common/Input/UserCommand.cs:164 msgid "Control Light" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:166 +#: ../../ORTS.Common/Input/UserCommand.cs:165 msgid "Control Pantograph 1" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:167 +#: ../../ORTS.Common/Input/UserCommand.cs:166 msgid "Control Pantograph 2" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:168 +#: ../../ORTS.Common/Input/UserCommand.cs:167 msgid "Control Pantograph 3" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:169 +#: ../../ORTS.Common/Input/UserCommand.cs:168 msgid "Control Pantograph 4" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:170 +#: ../../ORTS.Common/Input/UserCommand.cs:169 msgid "Control Window Left" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:171 +#: ../../ORTS.Common/Input/UserCommand.cs:170 msgid "Control Window Right" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:172 +#: ../../ORTS.Common/Input/UserCommand.cs:171 msgid "Control Battery Close" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:173 +#: ../../ORTS.Common/Input/UserCommand.cs:172 msgid "Control Battery Open" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:174 +#: ../../ORTS.Common/Input/UserCommand.cs:173 msgid "Control Master Key" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:175 +#: ../../ORTS.Common/Input/UserCommand.cs:174 msgid "Control Service Retention" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:176 +#: ../../ORTS.Common/Input/UserCommand.cs:175 msgid "Control Service Retention Cancellation" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:177 +#: ../../ORTS.Common/Input/UserCommand.cs:176 msgid "Control Circuit Breaker Closing Order" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:178 +#: ../../ORTS.Common/Input/UserCommand.cs:177 msgid "Control Circuit Breaker Opening Order" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:179 +#: ../../ORTS.Common/Input/UserCommand.cs:178 msgid "Control Circuit Breaker Closing Authorization" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:180 +#: ../../ORTS.Common/Input/UserCommand.cs:179 msgid "Control Traction Cut-Off Relay Closing Order" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:181 +#: ../../ORTS.Common/Input/UserCommand.cs:180 msgid "Control Traction Cut-Off Relay Opening Order" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:182 +#: ../../ORTS.Common/Input/UserCommand.cs:181 msgid "Control Traction Cut-Off Relay Closing Authorization" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:183 +#: ../../ORTS.Common/Input/UserCommand.cs:182 msgid "Control Electric Train Supply" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:184 +#: ../../ORTS.Common/Input/UserCommand.cs:183 msgid "Control Diesel Player" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:185 +#: ../../ORTS.Common/Input/UserCommand.cs:184 msgid "Control Diesel Helper" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:186 +#: ../../ORTS.Common/Input/UserCommand.cs:185 msgid "Control Headlight Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:187 +#: ../../ORTS.Common/Input/UserCommand.cs:186 msgid "Control Headlight Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:188 +#: ../../ORTS.Common/Input/UserCommand.cs:187 msgid "Control Injector 1 Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:189 +#: ../../ORTS.Common/Input/UserCommand.cs:188 msgid "Control Injector 1 Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:190 +#: ../../ORTS.Common/Input/UserCommand.cs:189 msgid "Control Injector 1" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:191 +#: ../../ORTS.Common/Input/UserCommand.cs:190 msgid "Control Injector 2 Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:192 +#: ../../ORTS.Common/Input/UserCommand.cs:191 msgid "Control Injector 2 Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:193 +#: ../../ORTS.Common/Input/UserCommand.cs:192 msgid "Control Injector 2" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:194 +#: ../../ORTS.Common/Input/UserCommand.cs:193 msgid "Control Blowdown Valve" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:195 +#: ../../ORTS.Common/Input/UserCommand.cs:194 msgid "Control Blower Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:196 +#: ../../ORTS.Common/Input/UserCommand.cs:195 msgid "Control Blower Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:197 +#: ../../ORTS.Common/Input/UserCommand.cs:196 msgid "Control Steam Heat Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:198 +#: ../../ORTS.Common/Input/UserCommand.cs:197 msgid "Control Steam Heat Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:199 +#: ../../ORTS.Common/Input/UserCommand.cs:198 msgid "Control Steam Booster Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:200 +#: ../../ORTS.Common/Input/UserCommand.cs:199 msgid "Control Steam Booster Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:201 +#: ../../ORTS.Common/Input/UserCommand.cs:200 msgid "Control Damper Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:202 +#: ../../ORTS.Common/Input/UserCommand.cs:201 msgid "Control Damper Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:203 +#: ../../ORTS.Common/Input/UserCommand.cs:202 msgid "Control Firebox Open" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:204 +#: ../../ORTS.Common/Input/UserCommand.cs:203 msgid "Control Firebox Close" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:205 +#: ../../ORTS.Common/Input/UserCommand.cs:204 msgid "Control Firing Rate Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:206 +#: ../../ORTS.Common/Input/UserCommand.cs:205 msgid "Control Firing Rate Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:207 +#: ../../ORTS.Common/Input/UserCommand.cs:206 msgid "Control Fire Shovel Full" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:208 +#: ../../ORTS.Common/Input/UserCommand.cs:207 msgid "Control Cylinder Cocks" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:209 +#: ../../ORTS.Common/Input/UserCommand.cs:208 msgid "Control Large Ejector Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:210 +#: ../../ORTS.Common/Input/UserCommand.cs:209 msgid "Control Large Ejector Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:211 +#: ../../ORTS.Common/Input/UserCommand.cs:210 msgid "Control Small Ejector Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:212 +#: ../../ORTS.Common/Input/UserCommand.cs:211 msgid "Control Small Ejector Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:213 +#: ../../ORTS.Common/Input/UserCommand.cs:212 msgid "Control Vacuum Exhauster" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:214 +#: ../../ORTS.Common/Input/UserCommand.cs:213 msgid "Control Cylinder Compound" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:215 +#: ../../ORTS.Common/Input/UserCommand.cs:214 msgid "Control Firing" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:216 +#: ../../ORTS.Common/Input/UserCommand.cs:215 msgid "Control Refill" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:217 +#: ../../ORTS.Common/Input/UserCommand.cs:216 msgid "Control Discrete Unload" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:218 +#: ../../ORTS.Common/Input/UserCommand.cs:217 msgid "Control Water Scoop" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:219 +#: ../../ORTS.Common/Input/UserCommand.cs:218 msgid "Control ImmediateRefill" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:220 +#: ../../ORTS.Common/Input/UserCommand.cs:219 msgid "Control Turntable Clockwise" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:221 +#: ../../ORTS.Common/Input/UserCommand.cs:220 msgid "Control Turntable Counterclockwise" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:222 +#: ../../ORTS.Common/Input/UserCommand.cs:221 msgid "Control Generic Item 1" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:223 +#: ../../ORTS.Common/Input/UserCommand.cs:222 msgid "Control Generic Item 2" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:224 +#: ../../ORTS.Common/Input/UserCommand.cs:223 msgid "Control TCS Generic 1" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:225 +#: ../../ORTS.Common/Input/UserCommand.cs:224 msgid "Control TCS Generic 2" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:226 +#: ../../ORTS.Common/Input/UserCommand.cs:225 msgid "Control Cab Radio" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:227 +#: ../../ORTS.Common/Input/UserCommand.cs:226 msgid "Control AI Fire On" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:228 +#: ../../ORTS.Common/Input/UserCommand.cs:227 msgid "Control AI Fire Off" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:229 +#: ../../ORTS.Common/Input/UserCommand.cs:228 msgid "Control AI Fire Reset" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:232 +#: ../../ORTS.Common/Input/UserCommand.cs:231 msgid "Control Speed Regulator Mode Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:233 +#: ../../ORTS.Common/Input/UserCommand.cs:232 msgid "Control Speed Regulator Mode Descrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:234 +#: ../../ORTS.Common/Input/UserCommand.cs:233 msgid "Control Selected Speed Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:235 +#: ../../ORTS.Common/Input/UserCommand.cs:234 msgid "Control Selected Speed Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:236 +#: ../../ORTS.Common/Input/UserCommand.cs:235 msgid "Control Speed Regulator Max Acceleration Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:237 +#: ../../ORTS.Common/Input/UserCommand.cs:236 msgid "Control Speed Regulator Max Acceleration Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:238 +#: ../../ORTS.Common/Input/UserCommand.cs:237 msgid "Control Number Of Axles Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:239 +#: ../../ORTS.Common/Input/UserCommand.cs:238 msgid "Control Number Of Axles Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:240 +#: ../../ORTS.Common/Input/UserCommand.cs:239 msgid "Control Restricted Speed Zone Active" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:241 +#: ../../ORTS.Common/Input/UserCommand.cs:240 msgid "Control Cruise Control Mode Increase" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:242 +#: ../../ORTS.Common/Input/UserCommand.cs:241 msgid "Control Cruise Control Mode Decrease" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:243 +#: ../../ORTS.Common/Input/UserCommand.cs:242 msgid "Control Train Type Change (Passenger/Cargo)" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:244 +#: ../../ORTS.Common/Input/UserCommand.cs:243 msgid "Control Selected Speed To Zero" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:246 +#: ../../ORTS.Common/Input/UserCommand.cs:245 msgid "Control DP Move To Front" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:247 +#: ../../ORTS.Common/Input/UserCommand.cs:246 msgid "Control DP Move To Back" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:248 +#: ../../ORTS.Common/Input/UserCommand.cs:247 msgid "Control DP Traction" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:249 +#: ../../ORTS.Common/Input/UserCommand.cs:248 msgid "Control DP Idle" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:250 +#: ../../ORTS.Common/Input/UserCommand.cs:249 msgid "Control DP Brake" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:251 +#: ../../ORTS.Common/Input/UserCommand.cs:250 msgid "Control DP More" msgstr "" -#: ../../ORTS.Common/Input/UserCommand.cs:252 +#: ../../ORTS.Common/Input/UserCommand.cs:251 msgid "Control DP Less" msgstr "" diff --git a/Source/Locales/ORTS.Menu/ORTS.Menu.pot b/Source/Locales/ORTS.Menu/ORTS.Menu.pot index 0264d76010..4b94e1abf8 100644 --- a/Source/Locales/ORTS.Menu/ORTS.Menu.pot +++ b/Source/Locales/ORTS.Menu/ORTS.Menu.pot @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2023-10-24 12:50:17+0200\n" -"PO-Revision-Date: 2023-10-24 12:50:17+0200\n" +"POT-Creation-Date: 2023-12-03 15:16:45+0100\n" +"PO-Revision-Date: 2023-12-03 15:16:45+0100\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" diff --git a/Source/Locales/ORTS.Settings/ORTS.Settings.pot b/Source/Locales/ORTS.Settings/ORTS.Settings.pot index a3ea2da967..ce00c13f50 100644 --- a/Source/Locales/ORTS.Settings/ORTS.Settings.pot +++ b/Source/Locales/ORTS.Settings/ORTS.Settings.pot @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2023-10-24 12:50:20+0200\n" -"PO-Revision-Date: 2023-10-24 12:50:20+0200\n" +"POT-Creation-Date: 2023-12-03 15:16:49+0100\n" +"PO-Revision-Date: 2023-12-03 15:16:49+0100\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -11,22 +11,22 @@ msgstr "" "X-Generator: MonoDevelop Gettext addin\n" -#: ../../ORTS.Settings/InputSettings.cs:567 +#: ../../ORTS.Settings/InputSettings.cs:566 #, csharp-format msgid "{0} requires and is modified by Shift" msgstr "" -#: ../../ORTS.Settings/InputSettings.cs:569 +#: ../../ORTS.Settings/InputSettings.cs:568 #, csharp-format msgid "{0} requires and is modified by Control" msgstr "" -#: ../../ORTS.Settings/InputSettings.cs:571 +#: ../../ORTS.Settings/InputSettings.cs:570 #, csharp-format msgid "{0} requires and is modified by Alt" msgstr "" -#: ../../ORTS.Settings/InputSettings.cs:602 +#: ../../ORTS.Settings/InputSettings.cs:601 #, csharp-format msgid "{0} and {1} both match {2}" msgstr "" diff --git a/Source/Locales/Orts.Formats.OR/Orts.Formats.OR.pot b/Source/Locales/Orts.Formats.OR/Orts.Formats.OR.pot index a61971d1e7..132016403b 100644 --- a/Source/Locales/Orts.Formats.OR/Orts.Formats.OR.pot +++ b/Source/Locales/Orts.Formats.OR/Orts.Formats.OR.pot @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2023-10-24 12:50:14+0200\n" -"PO-Revision-Date: 2023-10-24 12:50:14+0200\n" +"POT-Creation-Date: 2023-12-03 15:16:42+0100\n" +"PO-Revision-Date: 2023-12-03 15:16:42+0100\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" diff --git a/Source/Locales/Orts.Simulation/Orts.Simulation.pot b/Source/Locales/Orts.Simulation/Orts.Simulation.pot index 805192177e..0248a1ba21 100644 --- a/Source/Locales/Orts.Simulation/Orts.Simulation.pot +++ b/Source/Locales/Orts.Simulation/Orts.Simulation.pot @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2023-10-24 12:50:23+0200\n" -"PO-Revision-Date: 2023-10-24 12:50:25+0200\n" +"POT-Creation-Date: 2023-12-03 15:16:52+0100\n" +"PO-Revision-Date: 2023-12-03 15:16:54+0100\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" diff --git a/Source/Locales/RunActivity/RunActivity.pot b/Source/Locales/RunActivity/RunActivity.pot index 2c3a4be297..d77d48c7d8 100644 --- a/Source/Locales/RunActivity/RunActivity.pot +++ b/Source/Locales/RunActivity/RunActivity.pot @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2023-10-24 12:50:28+0200\n" -"PO-Revision-Date: 2023-10-24 12:50:30+0200\n" +"POT-Creation-Date: 2023-12-03 15:16:57+0100\n" +"PO-Revision-Date: 2023-12-03 15:16:58+0100\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -75,100 +75,100 @@ msgid_plural "{0:F0} tiles" msgstr[0] "" msgstr[1] "" -#: ../../RunActivity/Viewer3D/Viewer.cs:832 -#: ../../RunActivity/Viewer3D/Viewer.cs:1027 +#: ../../RunActivity/Viewer3D/Viewer.cs:831 +#: ../../RunActivity/Viewer3D/Viewer.cs:1026 msgid "Cab view not available" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:924 +#: ../../RunActivity/Viewer3D/Viewer.cs:923 msgid "In MP, use Alt-F4 to quit directly" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:956 +#: ../../RunActivity/Viewer3D/Viewer.cs:955 msgid "Automatic platform and siding labels visible." msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:959 +#: ../../RunActivity/Viewer3D/Viewer.cs:958 msgid "Platform and siding labels visible." msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:962 +#: ../../RunActivity/Viewer3D/Viewer.cs:961 msgid "Platform labels visible." msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:965 +#: ../../RunActivity/Viewer3D/Viewer.cs:964 msgid "Siding labels visible." msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:971 +#: ../../RunActivity/Viewer3D/Viewer.cs:970 msgid "Platform and siding labels hidden." msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:982 +#: ../../RunActivity/Viewer3D/Viewer.cs:981 msgid "Train labels visible." msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:985 +#: ../../RunActivity/Viewer3D/Viewer.cs:984 msgid "Car labels visible." msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:991 +#: ../../RunActivity/Viewer3D/Viewer.cs:990 msgid "Train and car labels hidden." msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1034 +#: ../../RunActivity/Viewer3D/Viewer.cs:1033 msgid "This car doesn't have a 2D cab" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1038 +#: ../../RunActivity/Viewer3D/Viewer.cs:1037 msgid "This car doesn't have a 3D cab" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1083 +#: ../../RunActivity/Viewer3D/Viewer.cs:1082 msgid "messages suppressed" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1087 +#: ../../RunActivity/Viewer3D/Viewer.cs:1086 msgid "All messages visible" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1244 +#: ../../RunActivity/Viewer3D/Viewer.cs:1242 msgid "Switched to player control" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1251 +#: ../../RunActivity/Viewer3D/Viewer.cs:1249 msgid "You can't switch from manual to autopilot mode" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1257 +#: ../../RunActivity/Viewer3D/Viewer.cs:1255 msgid "Switched to autopilot" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1931 +#: ../../RunActivity/Viewer3D/Viewer.cs:1927 msgid "Game saved" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:347 +#: ../../RunActivity/Viewer3D/Viewer.cs:346 #, csharp-format msgid "Allowed speed raised to {0}" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1060 +#: ../../RunActivity/Viewer3D/Viewer.cs:1059 #, csharp-format msgid "Vibrating at level {0}" msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1275 +#: ../../RunActivity/Viewer3D/Viewer.cs:1273 #, csharp-format msgid "Keyboard map list saved to '{0}'." msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1279 +#: ../../RunActivity/Viewer3D/Viewer.cs:1277 #, csharp-format msgid "Keyboard map image saved to '{0}'." msgstr "" -#: ../../RunActivity/Viewer3D/Viewer.cs:1126 +#: ../../RunActivity/Viewer3D/Viewer.cs:1125 #, csharp-format msgid "{0} viewpoint stored. Use Shift+8 to restore viewpoints." msgid_plural "{0} viewpoints stored. Use Shift+8 to restore viewpoints." @@ -197,206 +197,6 @@ msgstr "" msgid "Decreased daylight offset to {0} h" msgstr "" -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.cs:1919 -#: ../../RunActivity/Viewer3D/Map/MapForm.cs:1494 -msgid "Switching Request Sent to the Server" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.cs:556 -msgid "MSG to Server" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.cs:560 -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:256 -msgid "MSG to All" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:121 -msgid "View Train" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:164 -msgid "m" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:185 -msgid "Remove" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:199 -msgid "Auto Switch" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:213 -msgid "Show Avatars" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:241 -msgid "MSG to Selected" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:270 -#: ../../RunActivity/Viewer3D/Debugging/MessageViewer.Designer.cs:88 -msgid "Compose MSG" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:282 -msgid "Res" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:295 -msgid "Reply to Selected" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:309 -msgid "Draw Path" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:356 -msgid "Pick Signals" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:369 -msgid "Pick Switches" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:382 -msgid "Can Join" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:405 -msgid "Assist" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:417 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1247 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1296 -#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1362 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:719 -#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:767 -msgid "Normal" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:429 -msgid "Follow" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:443 -msgid "Penalty" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:457 -msgid "Prefer Green" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:470 -msgid "See in Game" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:482 -msgid "Simulation Time" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:493 -msgid "SimulationTime" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:505 -msgid "Show:" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:517 -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:454 -msgid "Platform labels" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:530 -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:444 -msgid "Siding labels" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:543 -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:424 -msgid "Signals" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:556 -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:414 -msgid "Signal state" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:572 -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:404 -msgid "Train labels" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:583 -msgid "Key" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:597 -msgid "Active only" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:608 -msgid "All" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:643 -msgid "Daylight offset (hrs)" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:659 -msgid "Background color" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:673 -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:434 -msgid "Switches" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:685 -msgid "To pan, drag with left mouse." -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:699 -msgid "Name" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:722 -msgid "Dispatch" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:733 -#: ../../RunActivity/Viewer3D/Popups/HelpWindow.cs:117 -msgid "Timetable" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:745 -msgid "State" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:757 -msgid "To zoom, drag with left and right mouse or scroll mouse wheel." -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:768 -msgid "To zoom in to a location, press Shift and click the left mouse." -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:779 -msgid "To zoom out of a location, press Alt and click the left mouse." -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:793 -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:464 -msgid "Platforms" -msgstr "" - -#: ../../RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs:852 -msgid "Map Window" -msgstr "" - #: ../../RunActivity/Viewer3D/Debugging/MessageViewer.Designer.cs:46 msgid "Clear All" msgstr "" @@ -405,6 +205,10 @@ msgstr "" msgid "Reply Selected" msgstr "" +#: ../../RunActivity/Viewer3D/Debugging/MessageViewer.Designer.cs:88 +msgid "Compose MSG" +msgstr "" + #: ../../RunActivity/Viewer3D/Debugging/MessageViewer.Designer.cs:102 msgid "MessageViewer" msgstr "" @@ -487,31 +291,113 @@ msgstr "" msgid "Sound Debug" msgstr "" -#: ../../RunActivity/Viewer3D/Debugging/TimetableWindow.cs:88 -msgid "View Self" +#: ../../RunActivity/Viewer3D/Map/MapForm.cs:171 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:814 +msgid "Message the selected player" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.cs:172 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:822 +msgid "Reply to the selected player" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.cs:174 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:842 +#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:540 +msgid "Player" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.cs:175 +#: ../../RunActivity/Viewer3D/Map/MapForm.cs:1737 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:849 +msgid "Make this player an assistant" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.cs:176 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:856 +msgid "Jump to this player in game" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.cs:177 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:863 +msgid "Follow on the map" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.cs:178 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:870 +msgid "Kick from multiplayer session" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.cs:180 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:888 +msgid "Set switch to..." +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.cs:181 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:897 +msgid "Main route" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.cs:182 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:905 +msgid "Side route" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.cs:184 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:927 +msgid "Set signal aspect to..." +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.cs:185 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:934 +msgid "System controlled" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.cs:186 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:943 +msgid "Stop" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.cs:187 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:951 +msgid "Approach" msgstr "" -#: ../../RunActivity/Viewer3D/Map/MapForm.cs:301 +#: ../../RunActivity/Viewer3D/Map/MapForm.cs:188 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:960 +msgid "Proceed" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.cs:190 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:989 +msgid "Jump to this train in game" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.cs:191 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:996 +msgid "Follow this train on the map" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.cs:325 msgid "You" msgstr "" -#: ../../RunActivity/Viewer3D/Map/MapForm.cs:308 +#: ../../RunActivity/Viewer3D/Map/MapForm.cs:332 #: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:518 #: ../../RunActivity/Viewer3D/Popups/MultiPlayerWindow.cs:345 msgid "Helper" msgstr "" -#: ../../RunActivity/Viewer3D/Map/MapForm.cs:314 +#: ../../RunActivity/Viewer3D/Map/MapForm.cs:338 msgid "Disconnected" msgstr "" -#: ../../RunActivity/Viewer3D/Map/MapForm.cs:1721 -msgid "Demote this player" +#: ../../RunActivity/Viewer3D/Map/MapForm.cs:1512 +msgid "Switching Request Sent to the Server" msgstr "" -#: ../../RunActivity/Viewer3D/Map/MapForm.cs:1721 -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:848 -msgid "Make this player an assistant" +#: ../../RunActivity/Viewer3D/Map/MapForm.cs:1737 +msgid "Demote this player" msgstr "" #: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:160 @@ -522,176 +408,139 @@ msgstr "" msgid "You are the dispatcher in this multiplayer session" msgstr "" -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:261 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:262 msgid "Message all players" msgstr "" -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:275 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:276 msgid ">" msgstr "" -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:297 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:298 msgid "Messages:" msgstr "" -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:324 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:325 msgid "Simulation time" msgstr "" -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:337 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:338 msgid "Map customization" msgstr "" -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:372 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:373 msgid "All trains" msgstr "" -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:384 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:385 msgid "Only active trains" msgstr "" -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:394 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:395 msgid "Train state" msgstr "" -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:475 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:405 +msgid "Train labels" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:415 +msgid "Signal state" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:425 +msgid "Signals" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:435 +msgid "Switches" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:445 +msgid "Siding labels" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:455 +msgid "Platform labels" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:465 +msgid "Platforms" +msgstr "" + +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:476 msgid "Map features" msgstr "" -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:484 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:485 msgid "Rotate between themes" msgstr "" -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:497 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:498 msgid "Show simulation time" msgstr "" -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:507 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:508 msgid "Use anti-aliasing" msgstr "" -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:572 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:573 msgid "Multiplayer settings" msgstr "" -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:583 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:584 msgid "Penalty for speeding && SPAD" msgstr "" -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:596 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:597 msgid "Prefer green signals" msgstr "" -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:609 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:610 msgid "Allow new players to join" msgstr "" -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:639 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:640 msgid "Map settings and controls" msgstr "" -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:648 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:649 msgid "Follow my train on the map" msgstr "" -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:659 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:660 msgid "Jump to my train on the map" msgstr "" -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:670 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:671 msgid "Jump to my train in game" msgstr "" -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:681 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:682 msgid "Map resolution (m):" msgstr "" -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:722 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:723 msgid "Allow throwing switches" msgstr "" -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:734 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:735 msgid "Allow changing signals" msgstr "" -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:746 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:747 msgid "Draw next path section" msgstr "" -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:773 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:774 msgid "Players" msgstr "" -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:813 -msgid "Message the selected player" -msgstr "" - -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:821 -msgid "Reply to the selected player" -msgstr "" - -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:841 -#: ../../RunActivity/Viewer3D/Popups/HUDWindow.cs:540 -msgid "Player" -msgstr "" - -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:855 -msgid "Jump to this player in game" -msgstr "" - -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:862 -msgid "Follow on the map" -msgstr "" - -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:869 -msgid "Kick from multiplayer session" -msgstr "" - -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:887 -msgid "Set switch to..." -msgstr "" - -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:896 -msgid "Main route" -msgstr "" - -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:904 -msgid "Side route" -msgstr "" - -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:926 -msgid "Set signal aspect to..." -msgstr "" - -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:933 -msgid "System controlled" -msgstr "" - -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:942 -msgid "Stop" -msgstr "" - -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:950 -msgid "Approach" -msgstr "" - -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:959 -msgid "Proceed" -msgstr "" - -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:972 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:973 msgid "Allow call on" msgstr "" -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:988 -msgid "Jump to this train in game" -msgstr "" - -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:995 -msgid "Follow this train on the map" -msgstr "" - -#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:1005 +#: ../../RunActivity/Viewer3D/Map/MapForm.Designer.cs:1006 msgid "Map window" msgstr "" @@ -1002,6 +851,10 @@ msgstr "" msgid "Briefing" msgstr "" +#: ../../RunActivity/Viewer3D/Popups/HelpWindow.cs:117 +msgid "Timetable" +msgstr "" + #: ../../RunActivity/Viewer3D/Popups/HelpWindow.cs:122 #: ../../RunActivity/Viewer3D/Popups/HelpWindow.cs:408 #: ../../RunActivity/Viewer3D/Popups/NextStationWindow.cs:77 @@ -3225,6 +3078,14 @@ msgstr "" msgid "Exceeded" msgstr "" +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1247 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1296 +#: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1362 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:719 +#: ../../RunActivity/Viewer3D/WebServices/TrainDrivingDisplay.cs:767 +msgid "Normal" +msgstr "" + #: ../../RunActivity/Viewer3D/Popups/TrainDrivingWindow.cs:1339 msgid "Derailed" msgstr "" diff --git a/Source/Locales/Updater/Updater.pot b/Source/Locales/Updater/Updater.pot index ff0d5af861..bf3c9c8bf3 100644 --- a/Source/Locales/Updater/Updater.pot +++ b/Source/Locales/Updater/Updater.pot @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2023-10-24 12:50:33+0200\n" -"PO-Revision-Date: 2023-10-24 12:50:33+0200\n" +"POT-Creation-Date: 2023-12-03 15:17:01+0100\n" +"PO-Revision-Date: 2023-12-03 15:17:01+0100\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" diff --git a/Source/RunActivity/Viewer3D/Map/MapForm.Designer.cs b/Source/RunActivity/Viewer3D/Map/MapForm.Designer.cs index 5ee0bd065d..3946c6fa2d 100644 --- a/Source/RunActivity/Viewer3D/Map/MapForm.Designer.cs +++ b/Source/RunActivity/Viewer3D/Map/MapForm.Designer.cs @@ -99,9 +99,9 @@ private void InitializeComponent() this.mainRouteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.sideRouteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.setSignalMenu = new System.Windows.Forms.ContextMenuStrip(this.components); - this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem(); + this.setSignalAspectToToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.systemControlledToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.stopToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.approachToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.proceedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); @@ -907,40 +907,40 @@ private void InitializeComponent() // setSignalMenu // this.setSignalMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.toolStripMenuItem1, - this.toolStripMenuItem2, - this.toolStripMenuItem3, + this.setSignalAspectToToolStripMenuItem, + this.systemControlledToolStripMenuItem, + this.stopToolStripMenuItem, this.approachToolStripMenuItem, this.proceedToolStripMenuItem, this.toolStripSeparator1, this.allowCallOnToolStripMenuItem}); this.setSignalMenu.Name = "contextMenuStrip1"; - this.setSignalMenu.Size = new System.Drawing.Size(191, 142); + this.setSignalMenu.Size = new System.Drawing.Size(191, 164); this.setSignalMenu.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.setSignalMenu_ItemClicked); // - // toolStripMenuItem1 + // setSignalAspectToToolStripMenuItem // - this.toolStripMenuItem1.Enabled = false; - this.toolStripMenuItem1.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold); - this.toolStripMenuItem1.Name = "toolStripMenuItem1"; - this.toolStripMenuItem1.Size = new System.Drawing.Size(190, 22); - this.toolStripMenuItem1.Text = "Set signal aspect to..."; + this.setSignalAspectToToolStripMenuItem.Enabled = false; + this.setSignalAspectToToolStripMenuItem.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold); + this.setSignalAspectToToolStripMenuItem.Name = "setSignalAspectToToolStripMenuItem"; + this.setSignalAspectToToolStripMenuItem.Size = new System.Drawing.Size(190, 22); + this.setSignalAspectToToolStripMenuItem.Text = "Set signal aspect to..."; // - // toolStripMenuItem2 + // systemControlledToolStripMenuItem // - this.toolStripMenuItem2.Name = "toolStripMenuItem2"; - this.toolStripMenuItem2.Size = new System.Drawing.Size(190, 22); - this.toolStripMenuItem2.Tag = "system"; - this.toolStripMenuItem2.Text = "System controlled"; + this.systemControlledToolStripMenuItem.Name = "systemControlledToolStripMenuItem"; + this.systemControlledToolStripMenuItem.Size = new System.Drawing.Size(190, 22); + this.systemControlledToolStripMenuItem.Tag = "system"; + this.systemControlledToolStripMenuItem.Text = "System controlled"; // - // toolStripMenuItem3 + // stopToolStripMenuItem // - this.toolStripMenuItem3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(67)))), ((int)(((byte)(53))))); - this.toolStripMenuItem3.ForeColor = System.Drawing.Color.White; - this.toolStripMenuItem3.Name = "toolStripMenuItem3"; - this.toolStripMenuItem3.Size = new System.Drawing.Size(190, 22); - this.toolStripMenuItem3.Tag = "stop"; - this.toolStripMenuItem3.Text = "Stop"; + this.stopToolStripMenuItem.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(67)))), ((int)(((byte)(53))))); + this.stopToolStripMenuItem.ForeColor = System.Drawing.Color.White; + this.stopToolStripMenuItem.Name = "stopToolStripMenuItem"; + this.stopToolStripMenuItem.Size = new System.Drawing.Size(190, 22); + this.stopToolStripMenuItem.Tag = "stop"; + this.stopToolStripMenuItem.Text = "Stop"; // // approachToolStripMenuItem // @@ -1104,9 +1104,9 @@ private void InitializeComponent() private System.Windows.Forms.ToolStripMenuItem mainRouteToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem sideRouteToolStripMenuItem; private System.Windows.Forms.ContextMenuStrip setSignalMenu; - private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1; - private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2; - private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem3; + private System.Windows.Forms.ToolStripMenuItem setSignalAspectToToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem systemControlledToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem stopToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem approachToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem proceedToolStripMenuItem; private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; diff --git a/Source/RunActivity/Viewer3D/Map/MapForm.cs b/Source/RunActivity/Viewer3D/Map/MapForm.cs index 97ceb37fa4..f5d8c08cc3 100644 --- a/Source/RunActivity/Viewer3D/Map/MapForm.cs +++ b/Source/RunActivity/Viewer3D/Map/MapForm.cs @@ -166,6 +166,30 @@ void InitializeForm() MapThemeProvider.InitializeThemes(); Theme = MapThemeProvider.GetTheme(ThemeName); + // It appears that `GNU.gettext` fails to apply translations to dropdown menus (ContextMenuStrip). + // Therefore, we must use `Viewer.Catalog.GetString()` to manually apply them for now. + messageSelectedPlayerMenuItem.Text = Viewer.Catalog.GetString("Message the selected player"); + replyToSelectedPlayerMenuItem.Text = Viewer.Catalog.GetString("Reply to the selected player"); + + playerToolStripMenuItem.Text = Viewer.Catalog.GetString("Player"); + makeThisPlayerAnAssistantToolStripMenuItem.Text = Viewer.Catalog.GetString("Make this player an assistant"); + jumpToThisPlayerInGameToolStripMenuItem.Text = Viewer.Catalog.GetString("Jump to this player in game"); + followToolStripMenuItem.Text = Viewer.Catalog.GetString("Follow on the map"); + kickFromMultiplayerSessionToolStripMenuItem.Text = Viewer.Catalog.GetString("Kick from multiplayer session"); + + setSwitchToToolStripMenuItem.Text = Viewer.Catalog.GetString("Set switch to..."); + mainRouteToolStripMenuItem.Text = Viewer.Catalog.GetString("Main route"); + sideRouteToolStripMenuItem.Text = Viewer.Catalog.GetString("Side route"); + + setSignalAspectToToolStripMenuItem.Text = Viewer.Catalog.GetString("Set signal aspect to..."); + systemControlledToolStripMenuItem.Text = Viewer.Catalog.GetString("System controlled"); + stopToolStripMenuItem.Text = Viewer.Catalog.GetString("Stop"); + approachToolStripMenuItem.Text = Viewer.Catalog.GetString("Approach"); + proceedToolStripMenuItem.Text = Viewer.Catalog.GetString("Proceed"); + + jumpToThisTrainInGameToolStripMenuItem.Text = Viewer.Catalog.GetString("Jump to this train in game"); + followThisTrainOnTheMapToolStripMenuItem.Text = Viewer.Catalog.GetString("Follow this train on the map"); + float[] dashPattern = { 4, 2 }; ZoomTargetPen.DashPattern = dashPattern; pathPen.DashPattern = dashPattern;