mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-17 08:39:19 +02:00
Add vehicle graph core: .vhg loader, logic and cab blocks, -graph-run and -graph-catalog
This commit is contained in:
17
EU07.cpp
17
EU07.cpp
@@ -20,6 +20,7 @@ Stele, firleju, szociu, hunter, ZiomalCl, OLI_EU and others
|
||||
|
||||
#include "application/application.h"
|
||||
#include "utilities/Logs.h"
|
||||
#include "vehicle/graph/graph_standalone.h"
|
||||
#include <cstdlib>
|
||||
#ifdef WITHDUMPGEN
|
||||
#ifdef _WIN32
|
||||
@@ -130,6 +131,22 @@ int main(int argc, char *argv[])
|
||||
fflush(stderr);
|
||||
std::_Exit(result);
|
||||
}
|
||||
// standalone check and run of a vehicle graph: -graph-run <file.vhg> [-script <events>] [-o <results.csv>] [-dt <step>] [-t <duration>] [-every <steps>]
|
||||
else if (argc >= 2 && std::string(argv[1]) == "-graph-run")
|
||||
{
|
||||
auto const result{vgraph::graph_run_standalone(argc, argv)};
|
||||
fflush(stdout);
|
||||
fflush(stderr);
|
||||
std::_Exit(result);
|
||||
}
|
||||
// export of the vehicle graph block catalog for the external editor: -graph-catalog [-o <file.json>]
|
||||
else if (argc >= 2 && std::string(argv[1]) == "-graph-catalog")
|
||||
{
|
||||
auto const result{vgraph::graph_catalog_standalone(argc >= 4 && std::string(argv[2]) == "-o" ? argv[3] : "")};
|
||||
fflush(stdout);
|
||||
fflush(stderr);
|
||||
std::_Exit(result);
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user