beet-observer 0.6.1__py3-none-any.whl → 0.7.0__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
beet_observer/__init__.py CHANGED
@@ -1,3 +1,3 @@
1
- __version__ = "0.6.1"
1
+ __version__ = "0.7.0"
2
2
 
3
3
  from .plugin import *
@@ -1,7 +1,7 @@
1
1
  from typing import Any
2
2
 
3
3
  import beet.contrib.worldgen as wg
4
- from beet import Context, NamespaceProxy
4
+ from beet import Context, NamespaceProxy, Structure
5
5
 
6
6
 
7
7
  def gen_dp_overlays(
@@ -110,6 +110,9 @@ def gen_dp_overlays(
110
110
  for registry, registry_overlay in file_types:
111
111
  check_registry(ctx, ctx_overlay, overlay_dir, registry, registry_overlay)
112
112
 
113
+ # add current overlays to pack
114
+ ctx.data.overlays.merge(ctx_overlay.data.overlays)
115
+
113
116
  # get pack.mcmeta overlay entries
114
117
  mcmeta: dict[str, dict[str, list[dict[str, Any]]]] = ctx.data.mcmeta.data.copy()
115
118
  if "overlays" not in mcmeta:
@@ -214,6 +217,10 @@ def gen_registry_overlay(
214
217
  else:
215
218
  # check if files are exactly the same
216
219
  try:
220
+ if isinstance(registry[name], Structure):
221
+ registry_overlay[name].data["DataVersion"] = registry[name].data[
222
+ "DataVersion"
223
+ ]
217
224
  if registry[name].data != registry_overlay[name].data:
218
225
  # move file from overlay pack to overlay in build pack
219
226
  ctx.data.overlays[overlay_dir][name] = registry_overlay[name]
@@ -38,6 +38,9 @@ def gen_rp_overlays(
38
38
  for registry, registry_overlay in file_types:
39
39
  check_registry(ctx, ctx_overlay, overlay_dir, registry, registry_overlay)
40
40
 
41
+ # add current overlays to pack
42
+ ctx.assets.overlays.merge(ctx_overlay.assets.overlays)
43
+
41
44
  # get pack.mcmeta overlay entries
42
45
  mcmeta: dict[str, dict[str, list[dict[str, Any]]]] = ctx.assets.mcmeta.data.copy()
43
46
  if "overlays" not in mcmeta:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: beet-observer
3
- Version: 0.6.1
3
+ Version: 0.7.0
4
4
  Summary: A beet plugin to automatically generate overlays from previous datapacks
5
5
  License: MIT
6
6
  Author: BPR02
@@ -0,0 +1,8 @@
1
+ beet_observer/__init__.py,sha256=Y1gc4glC_mLy4ZYlXwD5eO0bATwzqnv2s7PuK_Rwnxc,45
2
+ beet_observer/data_pack.py,sha256=oTq2jRNer7bE9lGgva98ubZ5TTIF65cSkOUSBQNWIac,9845
3
+ beet_observer/plugin.py,sha256=mtGBtJNCiUHkSGiAoRl7li0oIlZBQ-cuDS91bubDaPs,2835
4
+ beet_observer/resource_pack.py,sha256=BtVu0sGO20vUwOOnBrQdXvVATv2iV3ubEc0LCB8DqfQ,6079
5
+ beet_observer-0.7.0.dist-info/LICENSE,sha256=oBbP6j7sgG9darFSRZxV7iO8yPR1aZiDspSK3mcLpXI,1062
6
+ beet_observer-0.7.0.dist-info/METADATA,sha256=p2qCjgtHHomeWkbvnQw0ZbGhKlPQdkERq6e8Ycai94c,674
7
+ beet_observer-0.7.0.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
8
+ beet_observer-0.7.0.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- beet_observer/__init__.py,sha256=L6JbkcXu2b4CMzeLNR5y21RMc46RINFYzzWYK5vgJNc,45
2
- beet_observer/data_pack.py,sha256=JonYeQgjQGP5j6QWH0rTHRckrKAmEqnp1ajiOr1K9BY,9555
3
- beet_observer/plugin.py,sha256=mtGBtJNCiUHkSGiAoRl7li0oIlZBQ-cuDS91bubDaPs,2835
4
- beet_observer/resource_pack.py,sha256=ZO6Ye-_17IAx5rvsht6Gd3IY10ZtevoOX20mZwxzWnk,5984
5
- beet_observer-0.6.1.dist-info/LICENSE,sha256=oBbP6j7sgG9darFSRZxV7iO8yPR1aZiDspSK3mcLpXI,1062
6
- beet_observer-0.6.1.dist-info/METADATA,sha256=CZ-tu7EjlToxxmbi0loJZt8t-g2ViZRXr1eRx5wLY4g,674
7
- beet_observer-0.6.1.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
8
- beet_observer-0.6.1.dist-info/RECORD,,