st.push_back(ss);
}
+ const VehicleType::FunctionMap &func_map = loco_type.get_functions();
+ for(VehicleType::FunctionMap::const_iterator i=func_map.begin(); i!=func_map.end(); ++i)
+ st.push_back((DataFile::Statement("function"), i->first, static_cast<bool>(functions&(1<<i->first))));
+
// XXX Need more generic way of saving AI state
for(list<TrainAI *>::const_iterator i=ais.begin(); i!=ais.end(); ++i)
{
blocks_valid(true)
{
add("blocks", &Loader::blocks);
+ add("function", &Loader::function);
add("name", &Loader::name);
add("quantized_speed", &Loader::quantized_speed);
add("router", &Loader::router);
load_sub(obj.allocator);
}
+void Train::Loader::function(unsigned f, bool s)
+{
+ obj.set_function(f, s);
+}
+
void Train::Loader::name(const string &n)
{
obj.set_name(n);