Bug fixes

* Fixed layering issue when more than one layer contains a zorder modifier
This commit is contained in:
LoafyLemon 2023-07-26 18:54:30 +01:00
parent 4658a97b4a
commit a343610eb3
6 changed files with 7 additions and 7 deletions

View File

@ -55,7 +55,7 @@ init 1 python:
zorder_mod = modifiers.get(lmodifier)
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:
layers.setdefault(ltype, [f, zorder])

View File

@ -126,7 +126,7 @@ init python:
zorder_mod = modifiers.get(lmodifier)
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:
layers.setdefault(ltype, [f, zorder])
@ -152,7 +152,7 @@ init python:
sprites = []
for identifier, (file, zorder) in layers.items():
if ((n := identifier.rsplit("_", 1)[0]).isdigit()):
if ((n := identifier.split("_", 1)[0]).isdigit()):
processor = processors["colored"]
else:
processor = processors.get(identifier, processors["default"])

View File

@ -136,7 +136,7 @@ init python:
zorder_mod = modifiers.get(lmodifier)
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:
layers.setdefault(ltype, [f, zorder])

View File

@ -106,7 +106,7 @@ init python:
zorder_mod = modifiers.get(lmodifier)
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:
layers.setdefault(" ".join([part, name, ltype]), [f, zorder])

View File

@ -66,7 +66,7 @@ init python:
zorder_mod = modifiers.get(lmodifier)
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:
layers.setdefault(" ".join([part, name, ltype]), [f, zorder])

View File

@ -54,7 +54,7 @@ init python:
zorder_mod = modifiers.get(lmodifier)
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:
layers.setdefault(ltype, [f, zorder])