forked from SilverStudioGames/WTS
Bug fixes
* Fixed layering issue when more than one layer contains a zorder modifier
This commit is contained in:
parent
4658a97b4a
commit
a343610eb3
@ -55,7 +55,7 @@ init 1 python:
|
|||||||
|
|
||||||
zorder_mod = modifiers.get(lmodifier)
|
zorder_mod = modifiers.get(lmodifier)
|
||||||
zorder = (zorder + int(zorder_mod)) if lmodifier != "zorder" else int(tails[-1])
|
zorder = (zorder + int(zorder_mod)) if lmodifier != "zorder" else int(tails[-1])
|
||||||
layers.setdefault("_".join([ltype, lmodifier]), [f, zorder])
|
layers.setdefault("_".join([ltype, lmodifier, str(zorder)]), [f, zorder])
|
||||||
else:
|
else:
|
||||||
layers.setdefault(ltype, [f, zorder])
|
layers.setdefault(ltype, [f, zorder])
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ init python:
|
|||||||
|
|
||||||
zorder_mod = modifiers.get(lmodifier)
|
zorder_mod = modifiers.get(lmodifier)
|
||||||
zorder = (zorder + int(zorder_mod)) if lmodifier != "zorder" else int(tails[-1])
|
zorder = (zorder + int(zorder_mod)) if lmodifier != "zorder" else int(tails[-1])
|
||||||
layers.setdefault("_".join([ltype, lmodifier]), [f, zorder])
|
layers.setdefault("_".join([ltype, lmodifier, str(zorder)]), [f, zorder])
|
||||||
else:
|
else:
|
||||||
layers.setdefault(ltype, [f, zorder])
|
layers.setdefault(ltype, [f, zorder])
|
||||||
|
|
||||||
@ -152,7 +152,7 @@ init python:
|
|||||||
sprites = []
|
sprites = []
|
||||||
for identifier, (file, zorder) in layers.items():
|
for identifier, (file, zorder) in layers.items():
|
||||||
|
|
||||||
if ((n := identifier.rsplit("_", 1)[0]).isdigit()):
|
if ((n := identifier.split("_", 1)[0]).isdigit()):
|
||||||
processor = processors["colored"]
|
processor = processors["colored"]
|
||||||
else:
|
else:
|
||||||
processor = processors.get(identifier, processors["default"])
|
processor = processors.get(identifier, processors["default"])
|
||||||
|
@ -136,7 +136,7 @@ init python:
|
|||||||
|
|
||||||
zorder_mod = modifiers.get(lmodifier)
|
zorder_mod = modifiers.get(lmodifier)
|
||||||
zorder = (zorder + int(zorder_mod)) if lmodifier != "zorder" else int(tails[-1])
|
zorder = (zorder + int(zorder_mod)) if lmodifier != "zorder" else int(tails[-1])
|
||||||
layers.setdefault("_".join([ltype, lmodifier]), [f, zorder])
|
layers.setdefault("_".join([ltype, lmodifier, str(zorder)]), [f, zorder])
|
||||||
else:
|
else:
|
||||||
layers.setdefault(ltype, [f, zorder])
|
layers.setdefault(ltype, [f, zorder])
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ init python:
|
|||||||
|
|
||||||
zorder_mod = modifiers.get(lmodifier)
|
zorder_mod = modifiers.get(lmodifier)
|
||||||
zorder = (zorder + int(zorder_mod)) if lmodifier != "zorder" else int(tails[-1])
|
zorder = (zorder + int(zorder_mod)) if lmodifier != "zorder" else int(tails[-1])
|
||||||
layers.setdefault(" ".join([part, name, ltype, lmodifier]), [f, zorder])
|
layers.setdefault(" ".join([part, name, ltype, lmodifier, str(zorder)]), [f, zorder])
|
||||||
else:
|
else:
|
||||||
layers.setdefault(" ".join([part, name, ltype]), [f, zorder])
|
layers.setdefault(" ".join([part, name, ltype]), [f, zorder])
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ init python:
|
|||||||
|
|
||||||
zorder_mod = modifiers.get(lmodifier)
|
zorder_mod = modifiers.get(lmodifier)
|
||||||
zorder = (zorder + int(zorder_mod)) if lmodifier != "zorder" else int(tails[-1])
|
zorder = (zorder + int(zorder_mod)) if lmodifier != "zorder" else int(tails[-1])
|
||||||
layers.setdefault(" ".join([part, name, ltype, lmodifier]), [f, zorder])
|
layers.setdefault(" ".join([part, name, ltype, lmodifier, str(zorder)]), [f, zorder])
|
||||||
else:
|
else:
|
||||||
layers.setdefault(" ".join([part, name, ltype]), [f, zorder])
|
layers.setdefault(" ".join([part, name, ltype]), [f, zorder])
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ init python:
|
|||||||
|
|
||||||
zorder_mod = modifiers.get(lmodifier)
|
zorder_mod = modifiers.get(lmodifier)
|
||||||
zorder = (zorder + int(zorder_mod)) if lmodifier != "zorder" else int(tails[-1])
|
zorder = (zorder + int(zorder_mod)) if lmodifier != "zorder" else int(tails[-1])
|
||||||
layers.setdefault("_".join([ltype, lmodifier]), [f, zorder])
|
layers.setdefault("_".join([ltype, lmodifier, str(zorder)]), [f, zorder])
|
||||||
else:
|
else:
|
||||||
layers.setdefault(ltype, [f, zorder])
|
layers.setdefault(ltype, [f, zorder])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user