beet-observer 0.3.0__tar.gz → 0.4.0__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {beet_observer-0.3.0 → beet_observer-0.4.0}/PKG-INFO +1 -1
- {beet_observer-0.3.0 → beet_observer-0.4.0}/beet_observer/__init__.py +1 -1
- {beet_observer-0.3.0 → beet_observer-0.4.0}/beet_observer/data_pack.py +64 -4
- {beet_observer-0.3.0 → beet_observer-0.4.0}/pyproject.toml +1 -1
- {beet_observer-0.3.0 → beet_observer-0.4.0}/LICENSE +0 -0
- {beet_observer-0.3.0 → beet_observer-0.4.0}/README.md +0 -0
- {beet_observer-0.3.0 → beet_observer-0.4.0}/beet_observer/plugin.py +0 -0
- {beet_observer-0.3.0 → beet_observer-0.4.0}/beet_observer/resource_pack.py +0 -0
@@ -1,5 +1,6 @@
|
|
1
1
|
from typing import Any
|
2
2
|
|
3
|
+
import beet.contrib.worldgen as wg
|
3
4
|
from beet import Context, NamespaceProxy
|
4
5
|
|
5
6
|
|
@@ -48,6 +49,60 @@ def gen_dp_overlays(ctx: Context, ctx_overlay: Context, overlay_dir: str) -> Non
|
|
48
49
|
ctx.data.point_of_interest_type_tags,
|
49
50
|
ctx_overlay.data.point_of_interest_type_tags,
|
50
51
|
),
|
52
|
+
(ctx.data[wg.Dimension], ctx_overlay.data[wg.Dimension]),
|
53
|
+
(ctx.data[wg.DimensionType], ctx_overlay.data[wg.DimensionType]),
|
54
|
+
(ctx.data[wg.WorldgenBiome], ctx_overlay.data[wg.WorldgenBiome]),
|
55
|
+
(
|
56
|
+
ctx.data[wg.WorldgenConfiguredCarver],
|
57
|
+
ctx_overlay.data[wg.WorldgenConfiguredCarver],
|
58
|
+
),
|
59
|
+
(
|
60
|
+
ctx.data[wg.WorldgenConfiguredFeature],
|
61
|
+
ctx_overlay.data[wg.WorldgenConfiguredFeature],
|
62
|
+
),
|
63
|
+
(
|
64
|
+
ctx.data[wg.WorldgenDensityFunction],
|
65
|
+
ctx_overlay.data[wg.WorldgenDensityFunction],
|
66
|
+
),
|
67
|
+
(ctx.data[wg.WorldgenNoise], ctx_overlay.data[wg.WorldgenNoise]),
|
68
|
+
(
|
69
|
+
ctx.data[wg.WorldgenNoiseSettings],
|
70
|
+
ctx_overlay.data[wg.WorldgenNoiseSettings],
|
71
|
+
),
|
72
|
+
(
|
73
|
+
ctx.data[wg.WorldgenPlacedFeature],
|
74
|
+
ctx_overlay.data[wg.WorldgenPlacedFeature],
|
75
|
+
),
|
76
|
+
(
|
77
|
+
ctx.data[wg.WorldgenProcessorList],
|
78
|
+
ctx_overlay.data[wg.WorldgenProcessorList],
|
79
|
+
),
|
80
|
+
(ctx.data[wg.WorldgenStructure], ctx_overlay.data[wg.WorldgenStructure]),
|
81
|
+
(ctx.data[wg.WorldgenStructureSet], ctx_overlay.data[wg.WorldgenStructureSet]),
|
82
|
+
(
|
83
|
+
ctx.data[wg.WorldgenConfiguredSurfaceBuilder],
|
84
|
+
ctx_overlay.data[wg.WorldgenConfiguredSurfaceBuilder],
|
85
|
+
),
|
86
|
+
(ctx.data[wg.WorldgenTemplatePool], ctx_overlay.data[wg.WorldgenTemplatePool]),
|
87
|
+
(ctx.data[wg.WorldgenWorldPreset], ctx_overlay.data[wg.WorldgenWorldPreset]),
|
88
|
+
(
|
89
|
+
ctx.data[wg.WorldgenFlatLevelGeneratorPreset],
|
90
|
+
ctx_overlay.data[wg.WorldgenFlatLevelGeneratorPreset],
|
91
|
+
),
|
92
|
+
(ctx.data[wg.WorldgenBiomeTag], ctx_overlay.data[wg.WorldgenBiomeTag]),
|
93
|
+
(
|
94
|
+
ctx.data[wg.WorldgenStructureSetTag],
|
95
|
+
ctx_overlay.data[wg.WorldgenStructureSetTag],
|
96
|
+
),
|
97
|
+
(ctx.data[wg.WorldgenStructureTag], ctx_overlay.data[wg.WorldgenStructureTag]),
|
98
|
+
(
|
99
|
+
ctx.data[wg.WorldgenConfiguredCarverTag],
|
100
|
+
ctx_overlay.data[wg.WorldgenConfiguredCarverTag],
|
101
|
+
),
|
102
|
+
(
|
103
|
+
ctx.data[wg.WorldgenPlacedFeatureTag],
|
104
|
+
ctx_overlay.data[wg.WorldgenPlacedFeatureTag],
|
105
|
+
),
|
51
106
|
]
|
52
107
|
# for each file type, check for required overlays
|
53
108
|
for registry, registry_overlay in file_types:
|
@@ -155,13 +210,18 @@ def gen_registry_overlay(
|
|
155
210
|
ctx.data.overlays[default_dir][name] = registry[name]
|
156
211
|
del registry[name]
|
157
212
|
elif type == "addition":
|
158
|
-
# move
|
213
|
+
# move file from overlay pack to overlay in build pack
|
159
214
|
ctx.data.overlays[overlay_dir][name] = registry_overlay[name]
|
160
215
|
else:
|
161
216
|
# check if files are exactly the same
|
162
|
-
|
163
|
-
|
164
|
-
|
217
|
+
try:
|
218
|
+
if registry[name].data != registry_overlay[name].data:
|
219
|
+
# move file from overlay pack to overlay in build pack
|
220
|
+
ctx.data.overlays[overlay_dir][name] = registry_overlay[name]
|
221
|
+
except AttributeError:
|
222
|
+
if registry[name] != registry_overlay[name]:
|
223
|
+
# move file from overlay pack to overlay in build pack
|
224
|
+
ctx.data.overlays[overlay_dir][name] = registry_overlay[name]
|
165
225
|
|
166
226
|
# remove file from overlay pack
|
167
227
|
if name in registry_overlay:
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|