dfpyre 0.7.7__tar.gz → 0.7.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of dfpyre might be problematic. Click here for more details.
- {dfpyre-0.7.7 → dfpyre-0.7.9}/PKG-INFO +2 -2
- {dfpyre-0.7.7 → dfpyre-0.7.9}/dfpyre/scriptgen.py +12 -1
- {dfpyre-0.7.7 → dfpyre-0.7.9}/pyproject.toml +2 -2
- {dfpyre-0.7.7 → dfpyre-0.7.9}/LICENSE +0 -0
- {dfpyre-0.7.7 → dfpyre-0.7.9}/README.md +0 -0
- {dfpyre-0.7.7 → dfpyre-0.7.9}/dfpyre/__init__.py +0 -0
- {dfpyre-0.7.7 → dfpyre-0.7.9}/dfpyre/actiondump.py +0 -0
- {dfpyre-0.7.7 → dfpyre-0.7.9}/dfpyre/data/actiondump_min.json +0 -0
- {dfpyre-0.7.7 → dfpyre-0.7.9}/dfpyre/items.py +0 -0
- {dfpyre-0.7.7 → dfpyre-0.7.9}/dfpyre/pyre.py +0 -0
- {dfpyre-0.7.7 → dfpyre-0.7.9}/dfpyre/style.py +0 -0
- {dfpyre-0.7.7 → dfpyre-0.7.9}/dfpyre/util.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: dfpyre
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.9
|
|
4
4
|
Summary: A package for creating and modifying code templates for the DiamondFire Minecraft server.
|
|
5
5
|
Home-page: https://github.com/Amp63/pyre
|
|
6
6
|
License: MIT
|
|
@@ -12,7 +12,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.10
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.11
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
-
Requires-Dist: mcitemlib (>=0.3.
|
|
15
|
+
Requires-Dist: mcitemlib (>=0.3.3,<0.4.0)
|
|
16
16
|
Project-URL: Repository, https://github.com/Amp63/pyre
|
|
17
17
|
Description-Content-Type: text/markdown
|
|
18
18
|
|
|
@@ -4,6 +4,7 @@ from dfpyre.items import *
|
|
|
4
4
|
from dfpyre.actiondump import get_default_tags
|
|
5
5
|
|
|
6
6
|
SCRIPT_START = '''from dfpyre import *
|
|
7
|
+
|
|
7
8
|
t = DFTemplate()
|
|
8
9
|
'''
|
|
9
10
|
|
|
@@ -39,10 +40,20 @@ class GeneratorFlags:
|
|
|
39
40
|
var_shorthand: bool
|
|
40
41
|
|
|
41
42
|
|
|
43
|
+
def item_to_string(class_name: str, i: item):
|
|
44
|
+
i.nbt.data.pop('~DF_NBT', None)
|
|
45
|
+
stripped_id = i.get_id().replace('minecraft:', '')
|
|
46
|
+
if i.nbt.key_set() == {'~id', '~count'}:
|
|
47
|
+
if i.get_count() == 1:
|
|
48
|
+
return f'{class_name}("{stripped_id}")'
|
|
49
|
+
return f'{class_name}("{stripped_id}", {i.get_count()})'
|
|
50
|
+
return f'{class_name}.from_nbt("""{i.get_nbt()}""")'
|
|
51
|
+
|
|
52
|
+
|
|
42
53
|
def argument_item_to_string(flags: GeneratorFlags, arg_item: object) -> str:
|
|
43
54
|
class_name = arg_item.__class__.__name__
|
|
44
55
|
if isinstance(arg_item, item):
|
|
45
|
-
return
|
|
56
|
+
return item_to_string(class_name, arg_item)
|
|
46
57
|
|
|
47
58
|
if isinstance(arg_item, string):
|
|
48
59
|
value = arg_item.value.replace('\n', '\\n')
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "dfpyre"
|
|
3
|
-
version = "0.7.
|
|
3
|
+
version = "0.7.9"
|
|
4
4
|
description = "A package for creating and modifying code templates for the DiamondFire Minecraft server."
|
|
5
5
|
authors = ["Amp"]
|
|
6
6
|
readme = "README.md"
|
|
@@ -12,7 +12,7 @@ exclude = ['examples']
|
|
|
12
12
|
|
|
13
13
|
[tool.poetry.dependencies]
|
|
14
14
|
python = "^3.10"
|
|
15
|
-
mcitemlib = "^0.3.
|
|
15
|
+
mcitemlib = "^0.3.3"
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
[build-system]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|