PyLibMS 4.3.0__tar.gz → 4.3.2__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.
Files changed (83) hide show
  1. {pylibms-4.3.0 → pylibms-4.3.2}/PKG-INFO +7 -7
  2. {pylibms-4.3.0 → pylibms-4.3.2}/PyLibMS.egg-info/PKG-INFO +7 -7
  3. {pylibms-4.3.0 → pylibms-4.3.2}/README.md +6 -6
  4. {pylibms-4.3.0 → pylibms-4.3.2}/lms/flowchart/definitions/flowchart.py +2 -5
  5. {pylibms-4.3.0 → pylibms-4.3.2}/lms/flowchart/definitions/node_type.py +1 -1
  6. {pylibms-4.3.0 → pylibms-4.3.2}/lms/flowchart/msbf.py +6 -8
  7. {pylibms-4.3.0 → pylibms-4.3.2}/pyproject.toml +1 -1
  8. {pylibms-4.3.0 → pylibms-4.3.2}/LICENSE +0 -0
  9. {pylibms-4.3.0 → pylibms-4.3.2}/MANIFEST.in +0 -0
  10. {pylibms-4.3.0 → pylibms-4.3.2}/PyLibMS.egg-info/SOURCES.txt +0 -0
  11. {pylibms-4.3.0 → pylibms-4.3.2}/PyLibMS.egg-info/dependency_links.txt +0 -0
  12. {pylibms-4.3.0 → pylibms-4.3.2}/PyLibMS.egg-info/requires.txt +0 -0
  13. {pylibms-4.3.0 → pylibms-4.3.2}/PyLibMS.egg-info/top_level.txt +0 -0
  14. {pylibms-4.3.0 → pylibms-4.3.2}/lms/__init__.py +0 -0
  15. {pylibms-4.3.0 → pylibms-4.3.2}/lms/common/__init__.py +0 -0
  16. {pylibms-4.3.0 → pylibms-4.3.2}/lms/common/field/__init__.py +0 -0
  17. {pylibms-4.3.0 → pylibms-4.3.2}/lms/common/field/io.py +0 -0
  18. {pylibms-4.3.0 → pylibms-4.3.2}/lms/common/field/lms_datatype.py +0 -0
  19. {pylibms-4.3.0 → pylibms-4.3.2}/lms/common/field/lms_field.py +0 -0
  20. {pylibms-4.3.0 → pylibms-4.3.2}/lms/common/lms_constants.py +0 -0
  21. {pylibms-4.3.0 → pylibms-4.3.2}/lms/common/lms_exceptions.py +0 -0
  22. {pylibms-4.3.0 → pylibms-4.3.2}/lms/common/lms_fileinfo.py +0 -0
  23. {pylibms-4.3.0 → pylibms-4.3.2}/lms/common/stream/fileinfo.py +0 -0
  24. {pylibms-4.3.0 → pylibms-4.3.2}/lms/common/stream/hashtable.py +0 -0
  25. {pylibms-4.3.0 → pylibms-4.3.2}/lms/common/stream/section.py +0 -0
  26. {pylibms-4.3.0 → pylibms-4.3.2}/lms/fileio/encoding.py +0 -0
  27. {pylibms-4.3.0 → pylibms-4.3.2}/lms/fileio/io.py +0 -0
  28. {pylibms-4.3.0 → pylibms-4.3.2}/lms/flowchart/__init__.py +0 -0
  29. {pylibms-4.3.0 → pylibms-4.3.2}/lms/flowchart/definitions/__init__.py +0 -0
  30. {pylibms-4.3.0 → pylibms-4.3.2}/lms/flowchart/definitions/lms_nodeexceptions.py +0 -0
  31. {pylibms-4.3.0 → pylibms-4.3.2}/lms/flowchart/definitions/node.py +0 -0
  32. {pylibms-4.3.0 → pylibms-4.3.2}/lms/flowchart/flw3.py +0 -0
  33. {pylibms-4.3.0 → pylibms-4.3.2}/lms/flowchart/msbfio.py +0 -0
  34. {pylibms-4.3.0 → pylibms-4.3.2}/lms/message/__init__.py +0 -0
  35. {pylibms-4.3.0 → pylibms-4.3.2}/lms/message/definitions/__init__.py +0 -0
  36. {pylibms-4.3.0 → pylibms-4.3.2}/lms/message/definitions/field/__init__.py +0 -0
  37. {pylibms-4.3.0 → pylibms-4.3.2}/lms/message/lms_messagetext.py +0 -0
  38. {pylibms-4.3.0 → pylibms-4.3.2}/lms/message/msbt.py +0 -0
  39. {pylibms-4.3.0 → pylibms-4.3.2}/lms/message/msbtentry.py +0 -0
  40. {pylibms-4.3.0 → pylibms-4.3.2}/lms/message/msbtio.py +0 -0
  41. {pylibms-4.3.0 → pylibms-4.3.2}/lms/message/section/__init__.py +0 -0
  42. {pylibms-4.3.0 → pylibms-4.3.2}/lms/message/section/atr1.py +0 -0
  43. {pylibms-4.3.0 → pylibms-4.3.2}/lms/message/section/nli1.py +0 -0
  44. {pylibms-4.3.0 → pylibms-4.3.2}/lms/message/section/tsy1.py +0 -0
  45. {pylibms-4.3.0 → pylibms-4.3.2}/lms/message/section/txt2.py +0 -0
  46. {pylibms-4.3.0 → pylibms-4.3.2}/lms/message/tag/__init__.py +0 -0
  47. {pylibms-4.3.0 → pylibms-4.3.2}/lms/message/tag/io/param_io.py +0 -0
  48. {pylibms-4.3.0 → pylibms-4.3.2}/lms/message/tag/io/tag_io.py +0 -0
  49. {pylibms-4.3.0 → pylibms-4.3.2}/lms/message/tag/lms_tag.py +0 -0
  50. {pylibms-4.3.0 → pylibms-4.3.2}/lms/message/tag/lms_tagexceptions.py +0 -0
  51. {pylibms-4.3.0 → pylibms-4.3.2}/lms/project/__init__.py +0 -0
  52. {pylibms-4.3.0 → pylibms-4.3.2}/lms/project/definitions/__init__.py +0 -0
  53. {pylibms-4.3.0 → pylibms-4.3.2}/lms/project/definitions/attribute.py +0 -0
  54. {pylibms-4.3.0 → pylibms-4.3.2}/lms/project/definitions/color.py +0 -0
  55. {pylibms-4.3.0 → pylibms-4.3.2}/lms/project/definitions/style.py +0 -0
  56. {pylibms-4.3.0 → pylibms-4.3.2}/lms/project/definitions/tag.py +0 -0
  57. {pylibms-4.3.0 → pylibms-4.3.2}/lms/project/msbp.py +0 -0
  58. {pylibms-4.3.0 → pylibms-4.3.2}/lms/project/msbpread.py +0 -0
  59. {pylibms-4.3.0 → pylibms-4.3.2}/lms/project/section/ali2.py +0 -0
  60. {pylibms-4.3.0 → pylibms-4.3.2}/lms/project/section/ati2.py +0 -0
  61. {pylibms-4.3.0 → pylibms-4.3.2}/lms/project/section/clr1.py +0 -0
  62. {pylibms-4.3.0 → pylibms-4.3.2}/lms/project/section/string.py +0 -0
  63. {pylibms-4.3.0 → pylibms-4.3.2}/lms/project/section/syl3.py +0 -0
  64. {pylibms-4.3.0 → pylibms-4.3.2}/lms/project/section/tag2.py +0 -0
  65. {pylibms-4.3.0 → pylibms-4.3.2}/lms/project/section/tgg2.py +0 -0
  66. {pylibms-4.3.0 → pylibms-4.3.2}/lms/project/section/tgp2.py +0 -0
  67. {pylibms-4.3.0 → pylibms-4.3.2}/lms/titleconfig/__init__.py +0 -0
  68. {pylibms-4.3.0 → pylibms-4.3.2}/lms/titleconfig/config.py +0 -0
  69. {pylibms-4.3.0 → pylibms-4.3.2}/lms/titleconfig/definitions/__init__.py +0 -0
  70. {pylibms-4.3.0 → pylibms-4.3.2}/lms/titleconfig/definitions/attribute.py +0 -0
  71. {pylibms-4.3.0 → pylibms-4.3.2}/lms/titleconfig/definitions/nodes.py +0 -0
  72. {pylibms-4.3.0 → pylibms-4.3.2}/lms/titleconfig/definitions/tags.py +0 -0
  73. {pylibms-4.3.0 → pylibms-4.3.2}/lms/titleconfig/definitions/value.py +0 -0
  74. {pylibms-4.3.0 → pylibms-4.3.2}/lms/titleconfig/presets/Badge Arcade.yaml +0 -0
  75. {pylibms-4.3.0 → pylibms-4.3.2}/lms/titleconfig/presets/Brain Age Concentration Training.yaml +0 -0
  76. {pylibms-4.3.0 → pylibms-4.3.2}/lms/titleconfig/presets/Kirby Planet Robobot.yaml +0 -0
  77. {pylibms-4.3.0 → pylibms-4.3.2}/lms/titleconfig/presets/Super Mario 3D Land.yaml +0 -0
  78. {pylibms-4.3.0 → pylibms-4.3.2}/lms/titleconfig/presets/Super Mario 3D World + Bowsers Fury.yaml +0 -0
  79. {pylibms-4.3.0 → pylibms-4.3.2}/lms/titleconfig/presets/Super Mario Odyssey.yaml +0 -0
  80. {pylibms-4.3.0 → pylibms-4.3.2}/lms/titleconfig/presets/The Legend of Zelda Echos of Wisdom.yaml +0 -0
  81. {pylibms-4.3.0 → pylibms-4.3.2}/lms/titleconfig/presets/The Legend of Zelda a Link Between Worlds.yaml +0 -0
  82. {pylibms-4.3.0 → pylibms-4.3.2}/lms/titleconfig/presets/Tomodachi Life Living The Dream.yaml +0 -0
  83. {pylibms-4.3.0 → pylibms-4.3.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyLibMS
3
- Version: 4.3.0
3
+ Version: 4.3.2
4
4
  Summary: Python library built for the libMessageStudio (LMS) proprietary file formats from Nintendo. Supports MSBT, MSBP, and MSBF.
5
5
  Author: AbdyyEee
6
6
  License-Expression: MIT
@@ -28,13 +28,13 @@ Dynamic: license-file
28
28
  PyLibMS is a library built in Python 3.10 and above for reading and writing of libMessageStudio (LMS) proprietary file
29
29
  formats from Nintendo.
30
30
 
31
- The following is supported
32
- | Format | Read | Write | Configuration Support |
33
- |-------------|------|-------|-------------------------------------------------------------------------------------------|
34
- | `MSBT` | ✅ | ✅ | Support for full attribute (`ATR1`) decoding. Tag decoding 1:1 with the official Nintendo `.mstxt` file format. |
35
- | `MSBF` | ✅ | ✅ | Support for custom node definitions, attaching names and descriptions to nodes. Altering parameter datatypes for flexibility between games. |
36
- | `MSBP` | ✅ | ❌ | Generating configuration files for use with `MSBT` files. |
31
+ The following is supported:
37
32
 
33
+ | Format | Read | Write | Configuration Support |
34
+ |--------|------|-------|---------------------------------------------------------------------------------------------------------------------------------------------|
35
+ | `MSBT` | ✅ | ✅ | Support for full attribute (`ATR1`) decoding. Tag decoding 1:1 matching with official Nintendo `.mstxt` file format. |
36
+ | `MSBF` | ✅ | ✅ | Support for custom node definitions, attaching names and descriptions to nodes. Altering parameter datatypes for flexibility between games. |
37
+ | `MSBP` | ✅ | ❌ | Generating configuration files for use with `MSBT` files. |
38
38
 
39
39
  This library is designed to support LMS revision >=3.0. These include files generated for late **Wii** titles,
40
40
  **Nintendo 3DS**, **Wii U**, **Mobile**, **Nintendo Switch** and **Nintendo Switch 2** games.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyLibMS
3
- Version: 4.3.0
3
+ Version: 4.3.2
4
4
  Summary: Python library built for the libMessageStudio (LMS) proprietary file formats from Nintendo. Supports MSBT, MSBP, and MSBF.
5
5
  Author: AbdyyEee
6
6
  License-Expression: MIT
@@ -28,13 +28,13 @@ Dynamic: license-file
28
28
  PyLibMS is a library built in Python 3.10 and above for reading and writing of libMessageStudio (LMS) proprietary file
29
29
  formats from Nintendo.
30
30
 
31
- The following is supported
32
- | Format | Read | Write | Configuration Support |
33
- |-------------|------|-------|-------------------------------------------------------------------------------------------|
34
- | `MSBT` | ✅ | ✅ | Support for full attribute (`ATR1`) decoding. Tag decoding 1:1 with the official Nintendo `.mstxt` file format. |
35
- | `MSBF` | ✅ | ✅ | Support for custom node definitions, attaching names and descriptions to nodes. Altering parameter datatypes for flexibility between games. |
36
- | `MSBP` | ✅ | ❌ | Generating configuration files for use with `MSBT` files. |
31
+ The following is supported:
37
32
 
33
+ | Format | Read | Write | Configuration Support |
34
+ |--------|------|-------|---------------------------------------------------------------------------------------------------------------------------------------------|
35
+ | `MSBT` | ✅ | ✅ | Support for full attribute (`ATR1`) decoding. Tag decoding 1:1 matching with official Nintendo `.mstxt` file format. |
36
+ | `MSBF` | ✅ | ✅ | Support for custom node definitions, attaching names and descriptions to nodes. Altering parameter datatypes for flexibility between games. |
37
+ | `MSBP` | ✅ | ❌ | Generating configuration files for use with `MSBT` files. |
38
38
 
39
39
  This library is designed to support LMS revision >=3.0. These include files generated for late **Wii** titles,
40
40
  **Nintendo 3DS**, **Wii U**, **Mobile**, **Nintendo Switch** and **Nintendo Switch 2** games.
@@ -7,13 +7,13 @@
7
7
  PyLibMS is a library built in Python 3.10 and above for reading and writing of libMessageStudio (LMS) proprietary file
8
8
  formats from Nintendo.
9
9
 
10
- The following is supported
11
- | Format | Read | Write | Configuration Support |
12
- |-------------|------|-------|-------------------------------------------------------------------------------------------|
13
- | `MSBT` | ✅ | ✅ | Support for full attribute (`ATR1`) decoding. Tag decoding 1:1 with the official Nintendo `.mstxt` file format. |
14
- | `MSBF` | ✅ | ✅ | Support for custom node definitions, attaching names and descriptions to nodes. Altering parameter datatypes for flexibility between games. |
15
- | `MSBP` | ✅ | ❌ | Generating configuration files for use with `MSBT` files. |
10
+ The following is supported:
16
11
 
12
+ | Format | Read | Write | Configuration Support |
13
+ |--------|------|-------|---------------------------------------------------------------------------------------------------------------------------------------------|
14
+ | `MSBT` | ✅ | ✅ | Support for full attribute (`ATR1`) decoding. Tag decoding 1:1 matching with official Nintendo `.mstxt` file format. |
15
+ | `MSBF` | ✅ | ✅ | Support for custom node definitions, attaching names and descriptions to nodes. Altering parameter datatypes for flexibility between games. |
16
+ | `MSBP` | ✅ | ❌ | Generating configuration files for use with `MSBT` files. |
17
17
 
18
18
  This library is designed to support LMS revision >=3.0. These include files generated for late **Wii** titles,
19
19
  **Nintendo 3DS**, **Wii U**, **Mobile**, **Nintendo Switch** and **Nintendo Switch 2** games.
@@ -1,5 +1,5 @@
1
1
  from types import MappingProxyType
2
- from typing import Callable, Iterator
2
+ from typing import Iterator
3
3
 
4
4
  from lms.flowchart.definitions.node import LMS_EntryNode, LMS_BranchNode, LMS_BaseNode
5
5
 
@@ -7,12 +7,9 @@ from lms.flowchart.definitions.node import LMS_EntryNode, LMS_BranchNode, LMS_Ba
7
7
  class LMS_Flowchart:
8
8
  """Class that represents a flowchart in a MSBF file."""
9
9
 
10
- def __init__(
11
- self, entry_point: LMS_EntryNode, id_generator: Callable[[], int]
12
- ) -> None:
10
+ def __init__(self, entry_point: LMS_EntryNode) -> None:
13
11
  self._entry_node = entry_point
14
12
  self._nodes: dict[int, LMS_BaseNode] = {}
15
- self._id_generator = id_generator
16
13
 
17
14
  if entry_point is not None:
18
15
  for node in entry_point.get_descendents():
@@ -51,7 +51,7 @@ class LMS_NodeParameterType(IntEnum):
51
51
  PARAM_8_8_8_8 = 0x4
52
52
  STRING = 0x5
53
53
  PARAM_32_1 = 0x6
54
- NONE = 0xFFFF
54
+ NONE = 0xFF
55
55
 
56
56
  @property
57
57
  def sliced_datatype(self) -> tuple[LMS_DataType, ...]:
@@ -69,11 +69,6 @@ class MSBF:
69
69
  """Global node map for the file."""
70
70
  return MappingProxyType(self._nodes)
71
71
 
72
- @property
73
- def shared_references(self) -> MappingProxyType[int, LMS_BaseNode]:
74
- """Shared references of nodes between flowcharts."""
75
- return self._shared_references
76
-
77
72
  @property
78
73
  def flowcharts(self) -> MappingProxyType[str, LMS_Flowchart]:
79
74
  """The flowcharts of the MSBF instance."""
@@ -81,6 +76,10 @@ class MSBF:
81
76
  {flowchart.name: flowchart for flowchart in self._flowcharts}
82
77
  )
83
78
 
79
+ def get_flowchart_references(self, node_id: int) -> set[LMS_Flowchart]:
80
+ """References of nodes between flowcharts."""
81
+ return {flowchart for flowchart in self._flowcharts if node_id in flowchart.nodes}
82
+
84
83
  def register_node(self, node: LMS_BaseNode, flowchart: LMS_Flowchart = None) -> None:
85
84
  """
86
85
  Registers a node to the MSBF instance.
@@ -98,7 +97,7 @@ class MSBF:
98
97
  f"Node of ID '{node.id}' is already registered to this flowchart!"
99
98
  )
100
99
 
101
- node.id = self._id_generator()
100
+ node.id = self._generate_next_id()
102
101
  self._nodes[node.id] = node
103
102
 
104
103
  if flowchart is not None:
@@ -143,12 +142,11 @@ class MSBF:
143
142
  if entry_point is None:
144
143
  entry_point = LMS_EntryNode(self._generate_next_id(), flowchart_name)
145
144
 
146
- flowchart = LMS_Flowchart(entry_point, self._generate_next_id)
145
+ flowchart = LMS_Flowchart(entry_point)
147
146
  self._flowcharts.append(flowchart)
148
147
 
149
148
  for flowchart in self._flowcharts:
150
149
  for node_id, node in flowchart.nodes.items():
151
- self._shared_references.setdefault(node.id, set()).add(flowchart)
152
150
  self._nodes[node_id] = node
153
151
 
154
152
  self._nodes = dict(sorted(self._nodes.items()))
@@ -7,7 +7,7 @@ include = ["lms*"]
7
7
 
8
8
  [project]
9
9
  name = "PyLibMS"
10
- version = "4.3.0"
10
+ version = "4.3.2"
11
11
  requires-python = ">=3.10"
12
12
  description = "Python library built for the libMessageStudio (LMS) proprietary file formats from Nintendo. Supports MSBT, MSBP, and MSBF."
13
13
  readme = "README.md"
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes