scale 1 87;
-vehicle \39230
+vehicle "39230"
{
name "BR 23";
locomotive true;
};
};
-vehicle \29820-02
+vehicle "29820-02"
{
name "BR 50";
locomotive true;
};
};
-vehicle \29530-01
+vehicle "29530-01"
{
name "BR 86";
locomotive true;
};
};
-vehicle \36850
+vehicle "36850"
{
name "BR 185";
locomotive true;
};
};
-vehicle \37225-02
+vehicle "37225-02"
{
name "BR 194";
locomotive true;
};
};
-vehicle \39410
+vehicle "39410"
{
name "BR E 41";
locomotive true;
};
};
-vehicle \37574-01
+vehicle "37574-01"
{
name "BR E 03";
locomotive true;
};
};
-vehicle \37504
+vehicle "37504"
{
// XXX The power car is really in the middle, but that configuration isn't supported yet
name "BR 420 S-bahn";
};
};
-vehicle \37851
+vehicle "37851"
{
name "BR 150";
locomotive true;
};
};
-vehicle \37968
+vehicle "37968"
{
name "BR 96";
locomotive true;
src.add_directory(".");
src.add_directory("data");
add_source(src);
-
- catalogue.signal_object_added.connect(sigc::mem_fun(this, &Catalogue3D::object_added));
-
- const Catalogue::ObjectMap &objs = catalogue.get_all();
- for(Catalogue::ObjectMap::const_iterator i=objs.begin(); i!=objs.end(); ++i)
- object_added(*i->second);
}
Catalogue3D::~Catalogue3D()
delete i->second;
}
-void Catalogue3D::object_added(const ObjectType &ot)
+const ObjectType3D &Catalogue3D::get_3d(const ObjectType &ot)
{
+ ObjectMap::iterator i = objects.find(&ot);
+ if(i!=objects.end())
+ return *i->second;
+
+ ObjectType3D *ot3d = 0;
if(const TrackType *tt = dynamic_cast<const TrackType *>(&ot))
- {
- objects[&ot] = new TrackType3D(*this, *tt);
- const TrackAppearance &appearance = tt->get_appearance();
- if(!endpoint_meshes.count(&appearance))
- build_endpoint_mesh(appearance);
- }
+ ot3d = new TrackType3D(*this, *tt);
else if(const SignalType *st = dynamic_cast<const SignalType *>(&ot))
- objects[&ot] = new SignalType3D(*this, *st);
+ ot3d = new SignalType3D(*this, *st);
else if(const VehicleType *vt = dynamic_cast<const VehicleType *>(&ot))
- objects[&ot] = new VehicleType3D(*this, *vt);
+ ot3d = new VehicleType3D(*this, *vt);
+ else
+ throw key_error(&ot);
+
+ objects[&ot] = ot3d;
+ return *ot3d;
}
const ObjectType3D &Catalogue3D::get_3d(const ObjectType &ot) const
return *get_item(objects, &ot);
}
-void Catalogue3D::build_endpoint_mesh(const TrackAppearance &appearance)
+const GL::Mesh &Catalogue3D::get_endpoint_mesh(const TrackAppearance &appearance)
{
+ EndpointMap::iterator i = endpoint_meshes.find(&appearance);
+ if(i!=endpoint_meshes.end())
+ return *i->second;
+
const Profile &ballast_profile = appearance.get_ballast_profile();
const Vector &ballast_min = ballast_profile.get_min_coords();
const Vector &ballast_max = ballast_profile.get_max_coords();
bld.end();
endpoint_meshes[&appearance] = mesh;
+ return *mesh;
}
const GL::Mesh &Catalogue3D::get_endpoint_mesh(const TrackAppearance &appearance) const
class Catalogue3D: public Msp::GL::Resources
{
private:
+ typedef std::map<const ObjectType *, ObjectType3D *> ObjectMap;
+ typedef std::map<const TrackAppearance *, Msp::GL::Mesh *> EndpointMap;
+
Catalogue &catalogue;
Msp::DataFile::DirectorySource src;
- std::map<const ObjectType *, ObjectType3D *> objects;
- std::map<const TrackAppearance *, Msp::GL::Mesh *> endpoint_meshes;
+ ObjectMap objects;
+ EndpointMap endpoint_meshes;
public:
Catalogue3D(Catalogue &);
~Catalogue3D();
const Catalogue &get_catalogue() const { return catalogue; }
-private:
- void object_added(const ObjectType &);
-public:
+
+ const ObjectType3D &get_3d(const ObjectType &);
const ObjectType3D &get_3d(const ObjectType &) const;
template<typename T>
const typename TypeMap3D<T>::Type3D &get_3d(const T &ot) const
{ return dynamic_cast<const typename TypeMap3D<T>::Type3D &>(get_3d(static_cast<const ObjectType &>(ot))); }
+ template<typename T>
+ const typename TypeMap3D<T>::Type3D &get_3d(const T &ot)
+ { return dynamic_cast<const typename TypeMap3D<T>::Type3D &>(get_3d(static_cast<const ObjectType &>(ot))); }
+
private:
void build_endpoint_mesh(const TrackAppearance &);
public:
+ const Msp::GL::Mesh &get_endpoint_mesh(const TrackAppearance &);
const Msp::GL::Mesh &get_endpoint_mesh(const TrackAppearance &) const;
};
set_done(false);
}
- const Catalogue::ObjectMap &object_types = designer.get_catalogue().get_all();
- for(Catalogue::ObjectMap::const_iterator i=object_types.begin(); i!=object_types.end(); ++i)
- if(const TrackType *tt = dynamic_cast<const TrackType *>(i->second))
- {
- const vector<TrackPart> &parts = tt->get_parts();
- if(parts.size()!=1)
- continue;
- if(parts.front().is_curved() || parts.front().is_dead_end())
- continue;
+ list<TrackType *> track_types = designer.get_catalogue().get_list<TrackType>();
+ for(list<TrackType *>::iterator i=track_types.begin(); i!=track_types.end(); ++i)
+ {
+ const vector<TrackPart> &parts = (*i)->get_parts();
+ if(parts.size()!=1)
+ continue;
+ if(parts.front().is_curved() || parts.front().is_dead_end())
+ continue;
- types_by_length[parts.front().get_length()] = tt;
- max_preference = max(max_preference, tt->get_autofit_preference());
- }
+ types_by_length[parts.front().get_length()] = *i;
+ max_preference = max(max_preference, (*i)->get_autofit_preference());
+ }
}
ExtendTool::~ExtendTool()
drp_protocol->set_selected_index(0);
- const Catalogue::ObjectMap &obj_types = engineer.get_layout().get_catalogue().get_all();
- for(Catalogue::ObjectMap::const_iterator i=obj_types.begin(); i!=obj_types.end(); ++i)
- if(const VehicleType *vt = dynamic_cast<const VehicleType *>(i->second))
- if(vt->is_locomotive())
- loco_types.append(vt);
+ list<VehicleType *> veh_types = engineer.get_layout().get_catalogue().get_list<VehicleType>();
+ for(list<VehicleType *>::iterator i=veh_types.begin(); i!=veh_types.end(); ++i)
+ if((*i)->is_locomotive())
+ loco_types.append(*i);
}
void NewTrainDialog::prefill(const Driver::DetectedLocomotive &loco)
dynamic_cast<GLtk::Button *>(get_item(widgets, "btn_add"))->signal_clicked.connect(sigc::mem_fun(this, &NewVehicleDialog::add_clicked));
- const Catalogue::ObjectMap &obj_types = train.get_layout().get_catalogue().get_all();
- for(Catalogue::ObjectMap::const_iterator i=obj_types.begin(); i!=obj_types.end(); ++i)
- if(const VehicleType *vt = dynamic_cast<const VehicleType *>(i->second))
- {
- if(vt->is_locomotive())
- loco_types.append(vt);
- else
- wagon_types.append(vt);
- }
+ list<VehicleType *> veh_types = train.get_layout().get_catalogue().get_list<VehicleType>();
+ for(list<VehicleType *>::iterator i=veh_types.begin(); i!=veh_types.end(); ++i)
+ {
+ if((*i)->is_locomotive())
+ loco_types.append(*i);
+ else
+ wagon_types.append(*i);
+ }
}
void NewVehicleDialog::toggle_list(bool show, GLtk::List *lst)
Catalogue::Catalogue():
scale(1),
layout(*this)
-{ }
-
-Catalogue::~Catalogue()
-{
- for(ObjectMap::iterator i=objects.begin(); i!=objects.end(); ++i)
- delete i->second;
-}
-
-void Catalogue::add(ObjectType &object)
{
- insert_unique(objects, object.get_article_number(), &object);
- signal_object_added.emit(object);
-}
-
-const ObjectType &Catalogue::get(const ArticleNumber &art_nr) const
-{
- return *get_item(objects, art_nr);
+ add_type<TrackType>();
+ add_type<SignalType>();
+ add_type<VehicleType>();
+ add_type<TerrainType>();
}
Catalogue::Loader::Loader(Catalogue &c):
- DataFile::ObjectLoader<Catalogue>(c)
+ Collection::Loader(c),
+ cat(c)
{
add("layout", &Loader::layout);
add("scale", &Loader::scale);
void Catalogue::Loader::layout()
{
- load_sub(obj.layout);
+ load_sub(cat.layout);
}
void Catalogue::Loader::scale(float n, float d)
{
- obj.scale = n/d;
+ cat.scale = n/d;
}
-void Catalogue::Loader::signal(ArticleNumber art_nr)
+void Catalogue::Loader::signal(const string &n)
{
- if(obj.objects.count(art_nr))
- throw key_error(art_nr);
-
- RefPtr<SignalType> sig = new SignalType(art_nr);
+ RefPtr<SignalType> sig = new SignalType(n);
load_sub(*sig);
- obj.add(*sig.release());
+ cat.add(n, sig.get());
+ sig.release();
}
-void Catalogue::Loader::terrain(ArticleNumber art_nr)
+void Catalogue::Loader::terrain(const string &n)
{
- if(obj.objects.count(art_nr))
- throw key_error(art_nr);
-
- RefPtr<TerrainType> ter = new TerrainType(art_nr);
+ RefPtr<TerrainType> ter = new TerrainType(n);
load_sub(*ter);
- obj.add(*ter.release());
+ cat.add(n, ter.get());
+ ter.release();
}
-void Catalogue::Loader::track(ArticleNumber art_nr)
+void Catalogue::Loader::track(const string &n)
{
- if(obj.objects.count(art_nr))
- throw key_error(art_nr);
-
- RefPtr<TrackType> trk = new TrackType(art_nr, obj.appearance);
+ RefPtr<TrackType> trk = new TrackType(n, &cat.appearance);
load_sub(*trk);
- obj.add(*trk.release());
+ cat.add(n, trk.get());
+ trk.release();
}
void Catalogue::Loader::track_appearance()
{
- load_sub(obj.appearance);
+ load_sub(cat.appearance);
}
-void Catalogue::Loader::vehicle(ArticleNumber art_nr)
+void Catalogue::Loader::vehicle(const string &n)
{
- if(obj.objects.count(art_nr))
- throw key_error(art_nr);
-
- RefPtr<VehicleType> veh = new VehicleType(art_nr);
+ RefPtr<VehicleType> veh = new VehicleType(n);
load_sub(*veh);
- obj.add(*veh.release());
+ cat.add(n, veh.get());
+ veh.release();
}
} // namespace R2C2
#define LIBR2C2_CATALOGUE_H_
#include <map>
-#include <msp/datafile/objectloader.h>
+#include <msp/datafile/collection.h>
#include "articlenumber.h"
#include "layout.h"
#include "trackappearance.h"
class ObjectType;
-class Catalogue
+class Catalogue: public Msp::DataFile::Collection
{
public:
- class Loader: public Msp::DataFile::ObjectLoader<Catalogue>
+ class Loader: public Msp::DataFile::Collection::Loader
{
+ private:
+ Catalogue &cat;
+
public:
Loader(Catalogue &);
private:
void layout();
void scale(float, float);
- void signal(ArticleNumber);
- void terrain(ArticleNumber);
- void track(ArticleNumber);
+ void signal(const std::string &);
+ void terrain(const std::string &);
+ void track(const std::string &);
void track_appearance();
- void vehicle(ArticleNumber);
+ void vehicle(const std::string &);
};
- typedef std::map<ArticleNumber, ObjectType *> ObjectMap;
-
- sigc::signal<void, const ObjectType &> signal_object_added;
-
private:
float scale;
TrackAppearance appearance;
- ObjectMap objects;
Layout layout;
public:
Catalogue();
- ~Catalogue();
float get_scale() const { return scale; }
-
- void add(ObjectType &);
- const ObjectType &get(const ArticleNumber &) const;
- const ObjectMap &get_all() const { return objects; }
-
- template<typename T>
- const T &get(const ArticleNumber &an) const
- { return dynamic_cast<const T &>(get(an)); }
-
Layout &get_layout() { return layout; }
};
for(set<Track *>::const_iterator i=tracks.begin(); i!=tracks.end(); ++i)
{
DataFile::Statement st("track");
- st.append((*i)->get_type().get_article_number());
+ st.append(catalogue.get_name(&(*i)->get_type()));
(*i)->save(st.sub);
writer.write(st);
}
for(set<Signal *>::const_iterator i=signals.begin(); i!=signals.end(); ++i)
{
DataFile::Statement st("signal");
- st.append((*i)->get_type().get_article_number());
+ st.append(catalogue.get_name(&(*i)->get_type()));
(*i)->save(st.sub);
writer.write(st);
}
for(set<Terrain *>::const_iterator i=terrains.begin(); i!=terrains.end(); ++i)
{
DataFile::Statement st("terrain");
- st.append((*i)->get_type().get_article_number());
+ st.append(catalogue.get_name(&(*i)->get_type()));
(*i)->save(st.sub);
writer.write(st);
}
for(map<unsigned, Train *>::const_iterator i=trains.begin(); i!=trains.end(); ++i)
{
DataFile::Statement st("train");
- st.append(i->second->get_locomotive_type().get_article_number());
+ st.append(catalogue.get_name(&i->second->get_locomotive_type()));
st.append(i->second->get_address());
st.append(i->second->get_protocol());
i->second->save(st.sub);
load_sub(*rte);
}
-void Layout::Loader::signal(ArticleNumber art_nr)
+void Layout::Loader::signal(const string &n)
{
- Signal *sig = new Signal(obj, obj.catalogue.get<SignalType>(art_nr));
+ Signal *sig = new Signal(obj, obj.catalogue.get<SignalType>(n));
load_sub(*sig);
}
-void Layout::Loader::terrain(ArticleNumber art_nr)
+void Layout::Loader::terrain(const string &n)
{
- Terrain *ter = new Terrain(obj, obj.catalogue.get<TerrainType>(art_nr));
+ Terrain *ter = new Terrain(obj, obj.catalogue.get<TerrainType>(n));
load_sub(*ter);
}
-void Layout::Loader::track(ArticleNumber art_nr)
+void Layout::Loader::track(const string &n)
{
- Track *trk = new Track(obj, obj.catalogue.get<TrackType>(art_nr));
+ Track *trk = new Track(obj, obj.catalogue.get<TrackType>(n));
load_sub(*trk);
const set<Track *> &tracks = obj.objects.get<Track>();
for(set<Track *>::const_iterator i=tracks.begin(); i!=tracks.end(); ++i)
trk->link_to(**i);
}
-void Layout::Loader::train(ArticleNumber art_nr, unsigned addr, const std::string &proto)
+void Layout::Loader::train(const string &n, unsigned addr, const std::string &proto)
{
- Train *trn = new Train(obj, obj.catalogue.get<VehicleType>(art_nr), addr, proto);
+ Train *trn = new Train(obj, obj.catalogue.get<VehicleType>(n), addr, proto);
load_sub(*trn);
}
void beamgate();
void clock();
void route();
- void signal(ArticleNumber);
- void terrain(ArticleNumber);
- void track(ArticleNumber);
- void train(ArticleNumber, unsigned, const std::string &);
+ void signal(const std::string &);
+ void terrain(const std::string &);
+ void track(const std::string &);
+ void train(const std::string &, unsigned, const std::string &);
void turnout(unsigned, unsigned);
void zone();
};
std::string object;
public:
- SignalType(const ArticleNumber &);
+ SignalType(const ArticleNumber & = ArticleNumber());
const IndicationList &get_indications() const { return indications; }
const std::string &get_object() const { return object; }
float elevation_granularity;
public:
- TerrainType(const ArticleNumber &);
+ TerrainType(const ArticleNumber & = ArticleNumber());
unsigned get_n_surface_types() const { return surface_types.size(); }
const SurfaceType &get_surface_type(unsigned) const;
namespace R2C2 {
-TrackType::TrackType(const ArticleNumber &an, const TrackAppearance &ta):
+TrackType::TrackType(const ArticleNumber &an, const TrackAppearance *ta):
ObjectType(an),
appearance(ta),
state_bits(0),
autofit_preference(1)
{ }
+const TrackAppearance &TrackType::get_appearance() const
+{
+ if(!appearance)
+ throw logic_error("no appearance");
+ return *appearance;
+}
+
float TrackType::get_gauge() const
{
- return appearance.get_gauge();
+ return get_appearance().get_gauge();
}
float TrackType::get_total_length() const
};
private:
- const TrackAppearance &appearance;
+ const TrackAppearance *appearance;
std::vector<TrackPart> parts;
std::vector<Endpoint> endpoints;
unsigned state_bits;
std::string object;
public:
- TrackType(const ArticleNumber &, const TrackAppearance &);
+ TrackType(const ArticleNumber & = ArticleNumber(), const TrackAppearance * = 0);
- const TrackAppearance &get_appearance() const { return appearance; }
+ const TrackAppearance &get_appearance() const;
float get_gauge() const;
float get_total_length() const;
float get_path_length(int) const;
{
st.push_back((DataFile::Statement("name"), name));
+ const Catalogue &cat = layout.get_catalogue();
for(vector<Vehicle *>::const_iterator i=vehicles.begin(); i!=vehicles.end(); ++i)
if(i!=vehicles.begin())
- st.push_back((DataFile::Statement("vehicle"), (*i)->get_type().get_article_number()));
+ st.push_back((DataFile::Statement("vehicle"), cat.get_name(&(*i)->get_type())));
if(speed_quantizer)
{
load_sub(*ttbl, obj.layout);
}
-void Train::Loader::vehicle(ArticleNumber art_nr)
+void Train::Loader::vehicle(const string &n)
{
- const VehicleType &vtype = obj.layout.get_catalogue().get<VehicleType>(art_nr);
+ const VehicleType &vtype = obj.layout.get_catalogue().get<VehicleType>(n);
Vehicle *veh = new Vehicle(obj.layout, vtype);
obj.vehicles.back()->attach_back(*veh);
obj.vehicles.push_back(veh);
void quantized_speed();
void router();
void timetable();
- void vehicle(ArticleNumber);
+ void vehicle(const std::string &);
};
sigc::signal<void, const std::string &> signal_name_changed;
float max_speed;
public:
- VehicleType(const ArticleNumber &);
+ VehicleType(const ArticleNumber & = ArticleNumber());
bool is_locomotive() const { return locomotive; }
unsigned get_max_function() const;
#include <msp/core/refptr.h>
#include <msp/net/inet.h>
#include <msp/net/resolve.h>
+#include "libr2c2/catalogue.h"
#include "libr2c2/driver.h"
#include "libr2c2/route.h"
#include "libr2c2/train.h"
TrainInfoPacket pkt;
pkt.address = train.get_address();
- pkt.loco_type = train.get_locomotive_type().get_article_number().str();
+ pkt.loco_type = layout.get_catalogue().get_name(&train.get_locomotive_type());
pkt.name = train.get_name();
send(pkt);
comm.send(pkt);
}
+ const Catalogue &cat = server.layout.get_catalogue();
const map<unsigned, Train *> &trains = server.layout.get_trains();
for(map<unsigned, Train *>::const_iterator i=trains.begin(); i!=trains.end(); ++i)
{
{
TrainInfoPacket pkt;
pkt.address = train.get_address();
- pkt.loco_type = train.get_locomotive_type().get_article_number().str();
+ pkt.loco_type = cat.get_name(&train.get_locomotive_type());
pkt.name = train.get_name();
comm.send(pkt);
}
#include <msp/datafile/loader.h>
#include <msp/datafile/parser.h>
#include <msp/io/print.h>
-#include "libr2c2/articlenumber.h"
using namespace std;
using namespace Msp;
-using namespace R2C2;
class ShoppingList: public RegisteredApplication<ShoppingList>
{
private:
ShoppingList &sl;
- void track(ArticleNumber, int);
+ void track(const string &, int);
};
class LayoutLoader: public DataFile::Loader
private:
ShoppingList &sl;
- void track(ArticleNumber);
+ void track(const string &);
};
- map<ArticleNumber, unsigned> inventory;
- map<ArticleNumber, unsigned> layout;
+ map<string, unsigned> inventory;
+ map<string, unsigned> layout;
public:
ShoppingList(int, char **);
int ShoppingList::main()
{
IO::print("// Need to get:\n");
- for(map<ArticleNumber, unsigned>::iterator i=layout.begin(); i!=layout.end(); ++i)
+ for(map<string, unsigned>::iterator i=layout.begin(); i!=layout.end(); ++i)
{
- map<ArticleNumber, unsigned>::iterator j=inventory.find(i->first);
+ map<string, unsigned>::iterator j=inventory.find(i->first);
if(j!=inventory.end())
{
if(j->second<i->second)
- IO::print("track \\%d %d;\n", i->first, i->second-j->second);
+ IO::print("track \"%s\" %d;\n", i->first, i->second-j->second);
}
else
- IO::print("track \\%d %d;\n", i->first, i->second);
+ IO::print("track \"%s\" %d;\n", i->first, i->second);
}
IO::print("// Pre-existing:\n");
- for(map<ArticleNumber, unsigned>::iterator i=layout.begin(); i!=layout.end(); ++i)
+ for(map<string, unsigned>::iterator i=layout.begin(); i!=layout.end(); ++i)
{
- map<ArticleNumber, unsigned>::iterator j=inventory.find(i->first);
+ map<string, unsigned>::iterator j=inventory.find(i->first);
if(j!=inventory.end())
- IO::print("track \\%d %d;\n", i->first, min(i->second, j->second));
+ IO::print("track \"%s\" %d;\n", i->first, min(i->second, j->second));
}
IO::print("// Unused:\n");
- for(map<ArticleNumber, unsigned>::iterator i=inventory.begin(); i!=inventory.end(); ++i)
+ for(map<string, unsigned>::iterator i=inventory.begin(); i!=inventory.end(); ++i)
{
- map<ArticleNumber, unsigned>::iterator j=layout.find(i->first);
+ map<string, unsigned>::iterator j=layout.find(i->first);
if(j!=layout.end())
{
if(j->second<i->second)
- IO::print("track \\%d %d;\n", i->first, i->second-j->second);
+ IO::print("track \"%s\" %d;\n", i->first, i->second-j->second);
}
else
- IO::print("track \\%d %d;\n", i->first, i->second);
+ IO::print("track \"%s\" %d;\n", i->first, i->second);
}
return 0;
add("track", &InventoryLoader::track);
}
-void ShoppingList::InventoryLoader::track(ArticleNumber art_nr, int count)
+void ShoppingList::InventoryLoader::track(const string &n, int count)
{
- sl.inventory[art_nr] += count;
+ sl.inventory[n] += count;
}
add("zone");
}
-void ShoppingList::LayoutLoader::track(ArticleNumber art_nr)
+void ShoppingList::LayoutLoader::track(const string &n)
{
- ++sl.layout[art_nr];
+ ++sl.layout[n];
}
-terrain \100001
+terrain "100001"
{
surface
{
layout
{
- terrain \100001
+ terrain "100001"
{
position 0.1519720 0.2448861 0.000000;
rotation 0.000000;
// Straight
-track \24064
+track "24064"
{
description "Straight, 64.3mm (R3-R4-R5)";
part
};
};
-track \24071
+track "24071"
{
description "Straight, 70.8mm (for slim turnouts)";
part
autofit_preference 0;
};
-track \24077
+track "24077"
{
description "Straight, 77.5mm (R1-R2-R3)";
part
autofit_preference 2;
};
-track \24094
+track "24094"
{
description "Straight, 94.2mm";
part
autofit_preference 2;
};
-track \24172
+track "24172"
{
description "Straight, 171.7mm";
part
autofit_preference 2;
};
-track \24188
+track "24188"
{
description "Straight, 188.3mm (turnout length)";
part
autofit_preference 2;
};
-track \24229
+track "24229"
{
description "Straight, 229.3mm";
part
};
};
-track \24236
+track "24236"
{
description "Straight, 236.1mm (slim turnout length)";
part
};
};
-track \24360
+track "24360"
{
description "Straight, 360mm";
part
// Curves, R1
-track \24107
+track "24107"
{
description "Curve, R1 = 360mm, 7.5°";
part
};
};
-track \24115
+track "24115"
{
description "Curve, R1 = 360mm, 15°";
part
};
};
-track \24130
+track "24130"
{
description "Curve, R1 = 360mm, 30°";
part
// Curves, R2
-track \24206
+track "24206"
{
description "Curve, R2 = 437.5mm, 5.7° (turnout to 30°)";
part
};
};
-track \24207
+track "24207"
{
description "Curve, R2 = 437.5mm, 7.5°";
part
};
};
-track \24215
+track "24215"
{
description "Curve, R2 = 437.5mm, 15°";
part
};
};
-track \24224
+track "24224"
{
description "Curve, R2 = 437.5mm, 24.3° (turnout)";
part
};
};
-track \24230
+track "24230"
{
description "Curve, R2 = 437.5mm, 30°";
part
// Curves, R3
-track \24330
+track "24330"
{
description "Curve, R3 = 515mm, 30°";
part
// Curves, R4
-track \24430
+track "24430"
{
description "Curve, R4 = 579.3mm, 30°";
part
// Curves, R5
-track \24530
+track "24530"
{
description "Curve, R5 = 643.6mm, 30°";
part
// Curves, slim turnout
-track \24912
+track "24912"
{
description "Curve, R = 1114.6mm, 12.1° (slim turnout)";
part
// Curved turnouts, R1
-track \24671
+track "24671"
{
description "Curved turnout, left";
part
};
};
-track \24672
+track "24672"
{
description "Curved turnout, right";
part
// Turnouts, R2
-track \24611
+track "24611"
{
description "Turnout, left";
part
};
};
-track \24612
+track "24612"
{
description "Turnout, right";
part
};
};
-track \24630
+track "24630"
{
description "Turnout, 3-way";
part
};
};
-track \24624
+track "24624"
{
description "Turnout, double slip";
state_bits 1;
// Slim turnouts
-track \24711
+track "24711"
{
description "Slim turnout, left";
part
};
};
-track \24712
+track "24712"
{
description "Slim turnout, right";
part
// Crossings
-track \24640
+track "24640"
{
description "Crossing, 24.3°";
part
};
};
-track \24649
+track "24649"
{
description "Crossing, 48.6°";
part
};
};
-track \24740
+track "24740"
{
description "Slim crossing, 12.1°";
part
// Specials
-track \24977
+track "24977"
{
description "Bumper";
object "bumper.object";
// Signals
-signal \7039
+signal "7039"
{
indication "Hp1"
{
position -0.3876098 0.3496740 0.000000;
rotation 1.570800;
};
- track \24115
+ track "24115"
{
position 0.0806517 0.139002 0;
rotation 2.22529;
};
- track \24612
+ track "24612"
{
position -0.310086 -0.38055 0;
rotation 1.5708;
};
- track \24172
+ track "24172"
{
position -0.232565 -0.0797749 0;
rotation 1.5708;
};
- track \24611
+ track "24611"
{
position -0.387608 -0.380475 0;
rotation 1.5708;
};
- track \24130
+ track "24130"
{
position 0.155044 -0.08015 0;
rotation 1.5708;
};
- track \24230
+ track "24230"
{
position 0.232566 -0.0802249 0;
rotation 1.5708;
};
- track \24107
+ track "24107"
{
position -0.0249545 0.231617 0;
rotation 2.61799;
};
- track \24224
+ track "24224"
{
position -0.465131 -0.38055 0;
rotation 1.5708;
};
- track \24330
+ track "24330"
{
position 0.310088 -0.0803 0;
rotation 1.5708;
};
- track \24215
+ track "24215"
{
position 0.142158 0.186105 0;
rotation 2.2253;
};
- track \24207
+ track "24207"
{
position 0.0138165 0.298658 0;
rotation 2.61799;
};
- track \24711
+ track "24711"
{
position 0.374455 -0.381008 0;
rotation 1.5708;
};
- track \24530
+ track "24530"
{
position 0.438821 -0.0809179 0;
rotation 1.5708;
};
- track \24430
+ track "24430"
{
position 0.374455 -0.080609 0;
rotation 1.5708;
};
- track \24630
+ track "24630"
{
position -0.19005 -0.380551 0;
rotation 1.5708;
};
- track \24712
+ track "24712"
{
position 0.438821 -0.381316 0;
rotation 1.5708;
};
- track \24624
+ track "24624"
{
position -0.0775215 -0.380625 0;
rotation 1.5708;
};
- track \24640
+ track "24640"
{
position -0.232565 0.185972 0;
rotation 1.5708;
};
- track \24671
+ track "24671"
{
position 0.0775225 -0.380624 0;
rotation 1.5708;
};
- track \24977
+ track "24977"
{
position -0.465131 0.186196 0;
rotation 1.5708;
};
- track \24672
+ track "24672"
{
position 0.155044 -0.380699 0;
rotation 1.5708;
};
- track \24649
+ track "24649"
{
position -0.348827 0.194312 0;
rotation 1.99491;
};
- track \24064
+ track "24064"
{
position 0.0775223 -0.080075 0;
rotation 1.5708;
};
- track \24077
+ track "24077"
{
position -0.0775215 -0.079925 0;
rotation 1.5708;
};
- track \24229
+ track "24229"
{
position -0.387609 -0.079626 0;
rotation 1.5708;
};
- track \24071
+ track "24071"
{
position 2.56295e-07 -0.0799999 0;
rotation 1.5708;
};
- track \24094
+ track "24094"
{
position -0.155042 -0.07985 0;
rotation 1.5708;
};
- track \24188
+ track "24188"
{
position -0.310087 -0.0797 0;
rotation 1.5708;
};
- track \24236
+ track "24236"
{
position -0.465131 -0.0795509 0;
rotation 1.5708;
};
- track \24912
+ track "24912"
{
position 0.310088 -0.380699 0;
rotation 1.5708;
};
- track \24206
+ track "24206"
{
position -0.446223 -0.161726 0;
rotation 2.0944;
};
- track \24740
+ track "24740"
{
position -0.112537 0.138174 0;
rotation 1.5708;
};
- track \24360
+ track "24360"
{
position -0.542646 -0.0794758 0;
rotation 1.5708;
};
- signal \7039
+ signal "7039"
{
position -0.5020055 0.3153508 0.000000;
rotation 1.570800;
scale 1 87;
-vehicle \46274
+vehicle "46274"
{
name "Saar Railroad Gmhs 54";
axle { position -31; wheel_diameter 10; };
};
-vehicle \29820-02b
+vehicle "29820-02b"
{
name "BR 50 tender";
};
};
-vehicle \4442
+vehicle "4442"
{
name "Z";
axle { position -31; wheel_diameter 10; };
};
-vehicle \29859b
+vehicle "29859b"
{
name "Zas";
};
};
-vehicle \100004
+vehicle "100004"
{
name "Omm 52";
axle { position -31; wheel_diameter 10; };
};
-vehicle \47001
+vehicle "47001"
{
name "Rs 684";
};
};
-vehicle \48943
+vehicle "48943"
{
name "BTr 10";
axle { position -23; wheel_diameter 10; };
};
-vehicle \43222
+vehicle "43222"
{
name "B4üw 38 \"Schürzenwagen\"";
};
};
-vehicle \39230b
+vehicle "39230b"
{
name "BR 23 tender";
};
};
-vehicle \43800
+vehicle "43800"
{
name "B4nzb 64 \"Silberling\"";
};
};
-vehicle \47072
+vehicle "47072"
{
name "Sgns 691";
};
};
-vehicle \4624
+vehicle "4624"
{
name "Fals-u 176";
};
};
-vehicle \4423
+vehicle "4423"
{
name "Kklm 505";
axle { position -31; wheel_diameter 10; };
};
-vehicle \4410
+vehicle "4410"
{
name "Gs 210";
axle { position -31; wheel_diameter 10; };
};
-vehicle \46977
+vehicle "46977"
{
name "Rlmmso 56";
axle { position -46; wheel_diameter 10; };
};
-vehicle \4699
+vehicle "4699"
{
name "Pwg 14";
axle { position -25; wheel_diameter 10; };
};
-vehicle \46717
+vehicle "46717"
{
name "Railway crane";
axle { position -21.5; wheel_diameter 10; };
};
-vehicle \4690
+vehicle "4690"
{
name "Eaos 106";
};
};
-vehicle \37504b
+vehicle "37504b"
{
// XXX The power car is really in the middle, but that configuration isn't supported yet
name "BR 421 S-bahn";
};
};
-vehicle \37504c
+vehicle "37504c"
{
// XXX Better solution would be to allow flipping of vehicles
name "BR 420 S-bahn";