Allow skipping of terrain graphics rotations with a magic value "skip"

This commit is contained in:
ln-zookeeper 2016-11-01 00:26:10 +02:00
parent 3d18393902
commit 4b4135ae8b
2 changed files with 7 additions and 0 deletions

View file

@ -150,6 +150,8 @@ Version 1.13.5+dev:
* [set_variable] now supports abs= (absolute value), power= (raise to
power) and root= (extracts root, 'square' is the only value currently
supported) keys
* Individual [terrain_graphics] rotations can now be skipped entirely by
using "skip" in the rotations= list.
* Lua API:
* Upgrade to Lua 5.3.3+
Consult http://www.lua.org/ for a full change list and updated documenation.

View file

@ -869,6 +869,11 @@ void terrain_builder::add_rotated_rules(building_ruleset &rules, building_rule &
and remove it if invalid. But since the ratio is so
low, the speedup is not worth the extra multiset
manipulations. */
if (rot.at(angle) == "skip") {
continue;
}
building_rule rule = tpl;
rotate_rule(rule, angle, rot);
add_rule(rules, rule);