move split_edges to global properties

This commit is contained in:
Michael Krasnyk
2017-03-29 23:48:57 +02:00
parent 57d3f71bf9
commit 2cd4ba9a0a
8 changed files with 14 additions and 12 deletions
+4 -5
View File
@@ -247,7 +247,9 @@ void Sol2ScriptingEnvironment::InitContext(LuaScriptingContext &context)
"weight_name",
sol::property(&ProfileProperties::SetWeightName, &ProfileProperties::GetWeightName),
"max_turn_weight",
sol::property(&ProfileProperties::GetMaxTurnWeight));
sol::property(&ProfileProperties::GetMaxTurnWeight),
"force_split_edges",
&ProfileProperties::force_split_edges);
context.state.new_usertype<std::vector<std::string>>(
"vector",
@@ -356,10 +358,7 @@ void Sol2ScriptingEnvironment::InitContext(LuaScriptingContext &context)
[](ExtractionWay &way, bool flag) { way.forward_restricted = flag; }),
"backward_restricted",
sol::property([](const ExtractionWay &way) { return way.backward_restricted; },
[](ExtractionWay &way, bool flag) { way.backward_restricted = flag; }),
"split_edges",
sol::property([](const ExtractionWay &way) { return way.split_edges; },
[](ExtractionWay &way, bool flag) { way.split_edges = flag; }));
[](ExtractionWay &way, bool flag) { way.backward_restricted = flag; }));
context.state.new_usertype<ExtractionSegment>("ExtractionSegment",
"source",