summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-08-25 10:40:34 +0200
committerGitHub <noreply@github.com>2018-08-25 10:40:34 +0200
commitdb0a2563c11b7a6c10618d4f719f1a5f879e4330 (patch)
tree6718efdf1d65d0c6cfe5fec65d90c8ecbe2922e7 /scene
parentf72f74486d3f07b2be0c6480c6c0d34edd47794f (diff)
parent01d509b165eeea16fffe24d64f643505a7b3c260 (diff)
Merge pull request #21392 from MarianoGnu/tileset_editor
Backward compatibility for autotile setup from Godot 3.0.X
Diffstat (limited to 'scene')
-rw-r--r--scene/resources/tile_set.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/scene/resources/tile_set.cpp b/scene/resources/tile_set.cpp
index 3d2b6c36de..c85f672ebf 100644
--- a/scene/resources/tile_set.cpp
+++ b/scene/resources/tile_set.cpp
@@ -59,7 +59,13 @@ bool TileSet::_set(const StringName &p_name, const Variant &p_value) {
tile_set_region(id, p_value);
else if (what == "tile_mode")
tile_set_tile_mode(id, (TileMode)((int)p_value));
- else if (what.left(9) == "autotile/") {
+ else if (what == "is_autotile") {
+ // backward compatibility for Godot 3.0.x
+ // autotile used to be a bool, it's now an enum
+ bool is_autotile = p_value;
+ if (is_autotile)
+ tile_set_tile_mode(id, AUTO_TILE);
+ } else if (what.left(9) == "autotile/") {
what = what.right(9);
if (what == "bitmask_mode")
autotile_set_bitmask_mode(id, (BitmaskMode)((int)p_value));