PyLibMS 4.2.2__py3-none-any.whl → 4.2.4__py3-none-any.whl
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.
- lms/common/field/lms_field.py +14 -8
- lms/flowchart/definitions/node.py +6 -6
- lms/titleconfig/definitions/nodes.py +4 -4
- lms/titleconfig/presets/Tomodachi Life NA-EU.yaml +56 -6
- {pylibms-4.2.2.dist-info → pylibms-4.2.4.dist-info}/METADATA +1 -1
- {pylibms-4.2.2.dist-info → pylibms-4.2.4.dist-info}/RECORD +9 -9
- {pylibms-4.2.2.dist-info → pylibms-4.2.4.dist-info}/WHEEL +0 -0
- {pylibms-4.2.2.dist-info → pylibms-4.2.4.dist-info}/licenses/LICENSE +0 -0
- {pylibms-4.2.2.dist-info → pylibms-4.2.4.dist-info}/top_level.txt +0 -0
lms/common/field/lms_field.py
CHANGED
|
@@ -36,20 +36,26 @@ class LMS_FieldMap:
|
|
|
36
36
|
"""Converts the field map to a regular dictionary."""
|
|
37
37
|
return {field.name: field.value for field in self.fields.values()}
|
|
38
38
|
|
|
39
|
-
@
|
|
40
|
-
def
|
|
41
|
-
|
|
39
|
+
@staticmethod
|
|
40
|
+
def create_default_dict_map(definitions: list[ValueDefinition]) -> dict[str, FieldValue]:
|
|
41
|
+
map = {}
|
|
42
42
|
for definition in definitions:
|
|
43
43
|
match definition.datatype:
|
|
44
|
+
case LMS_DataType.STRING:
|
|
45
|
+
map[definition.name] = ""
|
|
44
46
|
case LMS_DataType.LIST:
|
|
45
|
-
|
|
47
|
+
map[definition.name] = definition.list_items[0]
|
|
46
48
|
case LMS_DataType.BOOL:
|
|
47
|
-
|
|
49
|
+
map[definition.name] = False
|
|
48
50
|
case LMS_DataType.FLOAT32:
|
|
49
|
-
|
|
51
|
+
map[definition.name] = 0.0
|
|
50
52
|
case _:
|
|
51
|
-
|
|
52
|
-
return
|
|
53
|
+
map[definition.name] = 0
|
|
54
|
+
return map
|
|
55
|
+
|
|
56
|
+
@classmethod
|
|
57
|
+
def create_default_map(cls, definitions: list[ValueDefinition]):
|
|
58
|
+
return cls.from_dict(LMS_FieldMap.create_default_map(definitions), definitions)
|
|
53
59
|
|
|
54
60
|
@classmethod
|
|
55
61
|
def from_dict(cls, data: dict[str, FieldValue], definitions: list[ValueDefinition]):
|
|
@@ -157,7 +157,7 @@ class LMS_MessageNode(LMS_BaseNode):
|
|
|
157
157
|
:param file_index: index of the MSBT file in a folder/archive.
|
|
158
158
|
:param label_index: index of the label entry in that MSBT file.
|
|
159
159
|
"""
|
|
160
|
-
return cls(None,
|
|
160
|
+
return cls(None, file_index, label_index)
|
|
161
161
|
|
|
162
162
|
@classmethod
|
|
163
163
|
def new_msbt(cls, file_index: int, entry: MSBTEntry, msbt: MSBT):
|
|
@@ -168,7 +168,7 @@ class LMS_MessageNode(LMS_BaseNode):
|
|
|
168
168
|
:param entry: the MSBTEntry object to reference.
|
|
169
169
|
:param msbt: the MSBT file.
|
|
170
170
|
"""
|
|
171
|
-
return cls(None,
|
|
171
|
+
return cls(None, file_index, msbt.entries.index(entry), msbt)
|
|
172
172
|
|
|
173
173
|
@property
|
|
174
174
|
def msbt(self) -> MSBT | None:
|
|
@@ -315,7 +315,7 @@ class LMS_BranchNode(LMS_BaseNode):
|
|
|
315
315
|
else:
|
|
316
316
|
for case, branch in self._branches.items():
|
|
317
317
|
case_message = f"Case {case}"
|
|
318
|
-
result.append((case,), case_message, branch)
|
|
318
|
+
result.append(((case,), case_message, branch))
|
|
319
319
|
|
|
320
320
|
return result
|
|
321
321
|
|
|
@@ -401,7 +401,7 @@ class LMS_EventNode(LMS_BaseNode):
|
|
|
401
401
|
id: int,
|
|
402
402
|
parameter_type: LMS_NodeParameterType,
|
|
403
403
|
parameter_value: LMS_FieldMap | int | str | tuple[int, ...],
|
|
404
|
-
|
|
404
|
+
event_id: int,
|
|
405
405
|
definition: NodeDefinition | None = None,
|
|
406
406
|
):
|
|
407
407
|
super().__init__(
|
|
@@ -410,7 +410,7 @@ class LMS_EventNode(LMS_BaseNode):
|
|
|
410
410
|
parameter_type,
|
|
411
411
|
parameter_value)
|
|
412
412
|
|
|
413
|
-
self._event_id =
|
|
413
|
+
self._event_id = event_id
|
|
414
414
|
self._definition = definition
|
|
415
415
|
|
|
416
416
|
def __repr__(self):
|
|
@@ -505,7 +505,7 @@ class LMS_JumpNode(LMS_BaseNode):
|
|
|
505
505
|
:param next_entry_point: the next entry point.
|
|
506
506
|
:param unknown_short0a: unknown short value. -1 if there is no value.
|
|
507
507
|
"""
|
|
508
|
-
node = cls(None,
|
|
508
|
+
node = cls(None, unknown_short0a)
|
|
509
509
|
node.next_flowchart = next_entry_point
|
|
510
510
|
return node
|
|
511
511
|
|
|
@@ -14,7 +14,7 @@ class NodeConfig:
|
|
|
14
14
|
"""
|
|
15
15
|
|
|
16
16
|
branch_definitions: dict[int, NodeDefinition | tuple[NodeDefinition, ...]]
|
|
17
|
-
event_definitions: dict[int, NodeDefinition
|
|
17
|
+
event_definitions: dict[int, NodeDefinition | tuple[NodeDefinition, ...]]
|
|
18
18
|
|
|
19
19
|
def get_definition(self, id: int,
|
|
20
20
|
node_type: LMS_NodeType.BRANCH | LMS_NodeType.EVENT,
|
|
@@ -99,10 +99,10 @@ class NodeDefinition:
|
|
|
99
99
|
if "case_format" in data and "case_options" in data:
|
|
100
100
|
raise ValueError("There may only be one of case_format and options in the definition.")
|
|
101
101
|
|
|
102
|
-
if (
|
|
102
|
+
if (case_options := data.get("case_options", None)) is not None and node_type == LMS_NodeType.EVENT:
|
|
103
103
|
raise ValueError("There may only be options for branch nodes!")
|
|
104
104
|
|
|
105
|
-
if (case_format := data.get("case_format", None)) is not None and
|
|
105
|
+
if (case_format := data.get("case_format", None)) is not None and node_type == LMS_NodeType.EVENT:
|
|
106
106
|
raise ValueError("There may only be case_format for branch nodes!")
|
|
107
107
|
|
|
108
108
|
return NodeDefinition(
|
|
@@ -113,6 +113,6 @@ class NodeDefinition:
|
|
|
113
113
|
parameter_type=parameter_type,
|
|
114
114
|
parameter_definitions=converted_parameters,
|
|
115
115
|
case_format=case_format,
|
|
116
|
-
case_options=
|
|
116
|
+
case_options=case_options,
|
|
117
117
|
next_node_dependency=data.get("next_node_dependency", False)
|
|
118
118
|
)
|
|
@@ -4,36 +4,81 @@ node_definitions:
|
|
|
4
4
|
- id: 0
|
|
5
5
|
name: EvaluateExpression
|
|
6
6
|
parameter_type: string
|
|
7
|
+
case_options:
|
|
8
|
+
0: "true"
|
|
9
|
+
1: "false"
|
|
7
10
|
parameters:
|
|
8
11
|
- name: exp
|
|
9
12
|
- id: 1
|
|
10
13
|
name: SwitchVariable
|
|
11
|
-
case_format: "var == $case"
|
|
12
14
|
parameter_type: string
|
|
15
|
+
case_format: "$var == $case"
|
|
13
16
|
parameters:
|
|
14
17
|
- name: var
|
|
18
|
+
- id: 16
|
|
19
|
+
name: MiiHasPhraseSet
|
|
20
|
+
parameter_type: p32_1
|
|
21
|
+
case_options:
|
|
22
|
+
0: "true"
|
|
23
|
+
1: "false"
|
|
24
|
+
parameters:
|
|
25
|
+
- name: Parameter
|
|
26
|
+
datatype: list
|
|
27
|
+
list_items:
|
|
28
|
+
- Worried_Phrase
|
|
29
|
+
- Good_Phrase
|
|
30
|
+
- Nervous_Phrase
|
|
31
|
+
- Despond_Phase
|
|
32
|
+
- id: 16
|
|
33
|
+
name: EvaluateLayoutResult
|
|
34
|
+
parameter_type: string
|
|
35
|
+
case_format: "button $case clicked"
|
|
36
|
+
parameters:
|
|
37
|
+
- name: layout
|
|
38
|
+
- id: 30
|
|
39
|
+
name: EvaluateMiiRelationshipScore
|
|
40
|
+
parameter_type: p32_1
|
|
41
|
+
case_options:
|
|
42
|
+
0: "Status.BEST (80+)"
|
|
43
|
+
1: "Status.GOOD (60-79)"
|
|
44
|
+
2: "Status.AVERAGE (40-59)"
|
|
45
|
+
3: "Status.POOR (20-39)"
|
|
46
|
+
4: "Status.TERRIBLE (0-19)"
|
|
47
|
+
parameters:
|
|
48
|
+
- name: Parameter
|
|
15
49
|
event:
|
|
16
50
|
- id: 3
|
|
17
51
|
name: SetVariable
|
|
18
52
|
parameter_type: string
|
|
19
53
|
parameters:
|
|
20
54
|
- name: expression
|
|
55
|
+
- id: 39
|
|
56
|
+
name: SelectMii
|
|
57
|
+
parameter_type: string
|
|
58
|
+
parameters:
|
|
59
|
+
- name: mii
|
|
21
60
|
- id: 43
|
|
22
61
|
name: SetMiiPosition
|
|
23
62
|
parameter_type: string
|
|
24
63
|
parameters:
|
|
25
64
|
- name: pos
|
|
65
|
+
- id: 44
|
|
66
|
+
name: PlayMiiAnimation
|
|
67
|
+
parameter_type: string
|
|
68
|
+
parameters:
|
|
69
|
+
- name: anim
|
|
70
|
+
- id: 48
|
|
71
|
+
name: SetupMessage
|
|
72
|
+
parameter_type: p16_16
|
|
73
|
+
parameters:
|
|
74
|
+
- name: "Parameter 1"
|
|
75
|
+
- name: "Parameter 2"
|
|
26
76
|
- id: 58
|
|
27
77
|
name: SetupButtonPrompt
|
|
28
78
|
next_node_dependency: true
|
|
29
79
|
parameter_type: string
|
|
30
80
|
parameters:
|
|
31
81
|
- name: var
|
|
32
|
-
- id: 82
|
|
33
|
-
name: SetFlag
|
|
34
|
-
parameter_type: p32_1
|
|
35
|
-
parameters:
|
|
36
|
-
- name: flag
|
|
37
82
|
- id: 90
|
|
38
83
|
name: LoadSEGroup
|
|
39
84
|
parameter_type: string
|
|
@@ -44,6 +89,11 @@ node_definitions:
|
|
|
44
89
|
parameter_type: string
|
|
45
90
|
parameters:
|
|
46
91
|
- name: name
|
|
92
|
+
- id: 106
|
|
93
|
+
name: SetLayoutVisibility
|
|
94
|
+
parameter_type: string
|
|
95
|
+
parameters:
|
|
96
|
+
- name: "layout,visibility"
|
|
47
97
|
tag_definitions:
|
|
48
98
|
groups:
|
|
49
99
|
0: System
|
|
@@ -6,7 +6,7 @@ lms/common/lms_fileinfo.py,sha256=pTabx6x3DuE0bMGmjXOcXVQDWF30G_0VnWrzRRf36IU,25
|
|
|
6
6
|
lms/common/field/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
lms/common/field/io.py,sha256=djisZnZIKt-qhfkrCPsqAuoBUf0m0bDkSE1Ccp6On5Q,3173
|
|
8
8
|
lms/common/field/lms_datatype.py,sha256=tCbIlFlo8UlFOD0WKccLghaTi9_d69yI5ZKEtZM4qZg,4698
|
|
9
|
-
lms/common/field/lms_field.py,sha256=
|
|
9
|
+
lms/common/field/lms_field.py,sha256=7WTDyOA-YQrQA5aTeR70gn9_ZLnIiW5nvsXpdLU0kqs,6255
|
|
10
10
|
lms/common/stream/fileinfo.py,sha256=sojHDJFvB1fCBS3H9Z_kZwKtSP0E5XvF97OJxs7o9n4,2308
|
|
11
11
|
lms/common/stream/hashtable.py,sha256=ljPOCaJs9S6a0zvljnWLNZQ7myzqntaRf6HPsiylGk0,2565
|
|
12
12
|
lms/common/stream/section.py,sha256=WAqqj4FlUS8puB0iAnjzwNRtJ0YdHVK_DSrj051TZwU,1639
|
|
@@ -19,7 +19,7 @@ lms/flowchart/msbfio.py,sha256=KrR5rUZ_3NK6UfwfPhbrFFFg9LeGuXGE6CRVqlXB75o,4366
|
|
|
19
19
|
lms/flowchart/definitions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
20
20
|
lms/flowchart/definitions/flowchart.py,sha256=H0DZSLboWvPvDHf7J-G_2Krnv-sE7eQ0ZIJOpGZYJs4,3555
|
|
21
21
|
lms/flowchart/definitions/lms_nodeexceptions.py,sha256=hlcqW6ERMVyAf2nqxaiSyFdXDfwthFADK79ggS_B3GU,181
|
|
22
|
-
lms/flowchart/definitions/node.py,sha256=
|
|
22
|
+
lms/flowchart/definitions/node.py,sha256=S_9DSmeh03UWSbvsoEiGB_ocFFHYvSPpQsE4r7Y4FlI,19864
|
|
23
23
|
lms/flowchart/definitions/node_type.py,sha256=W6_whMPwTxC11YxV8x8YMAxHT9Psq8_XOITiUPwRCRg,4113
|
|
24
24
|
lms/message/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
25
25
|
lms/message/lms_messagetext.py,sha256=A6iXkumfhD_r55BnJAdWEWmYKiM-2iJre0v7oU3JcZs,5971
|
|
@@ -58,7 +58,7 @@ lms/titleconfig/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
58
58
|
lms/titleconfig/config.py,sha256=SDryeNLLRKDEaDL6ffqmHE_Q0EB3g7jznKP8FGM9sEk,12107
|
|
59
59
|
lms/titleconfig/definitions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
60
60
|
lms/titleconfig/definitions/attribute.py,sha256=1Wcnn9FFicUHVWRtnx1S7LP-hmtE2MxIvtgncpsWX5c,299
|
|
61
|
-
lms/titleconfig/definitions/nodes.py,sha256=
|
|
61
|
+
lms/titleconfig/definitions/nodes.py,sha256=SphCfl0b0SjdSbeobKjBb4nZM_Rpq5W9UfuvVszPyk0,5126
|
|
62
62
|
lms/titleconfig/definitions/tags.py,sha256=84aM-QgPFxonllkzRwTvPR76CvV_LJpypFv4ABNsJ7o,2916
|
|
63
63
|
lms/titleconfig/definitions/value.py,sha256=_Py26KzhQ93v83k7k6_ywO0U1WTWFUzyodtQdWjBxSI,576
|
|
64
64
|
lms/titleconfig/presets/Badge Arcade.yaml,sha256=OotJblQ210dNPiwBpdAI1qwbEYCRQn4jDI7boUSrCao,11854
|
|
@@ -70,9 +70,9 @@ lms/titleconfig/presets/Super Mario Odyssey.yaml,sha256=mV4BsLPzupEPy2RmPUxXlz0U
|
|
|
70
70
|
lms/titleconfig/presets/The Legend of Zelda Echos of Wisdom.yaml,sha256=6AoSNRNORjMzMBp2ais_ujRdLLeOe7FB0YlozZJNvHg,2878
|
|
71
71
|
lms/titleconfig/presets/The Legend of Zelda a Link Between Worlds.yaml,sha256=IY8wPIWMA4ElnN_dtV455beBucntxEBeeJXxUUIrnuw,9785
|
|
72
72
|
lms/titleconfig/presets/Tomodachi Life Living The Dream.yaml,sha256=hJNb0_KdUAZrztyphaTeaZJl_os7HpmdglLgly_eerU,82382
|
|
73
|
-
lms/titleconfig/presets/Tomodachi Life NA-EU.yaml,sha256=
|
|
74
|
-
pylibms-4.2.
|
|
75
|
-
pylibms-4.2.
|
|
76
|
-
pylibms-4.2.
|
|
77
|
-
pylibms-4.2.
|
|
78
|
-
pylibms-4.2.
|
|
73
|
+
lms/titleconfig/presets/Tomodachi Life NA-EU.yaml,sha256=DCPc9_wQc9ZqyTRbfRY4ukmlNGV9AM5D0iWZhbuPm9k,189657
|
|
74
|
+
pylibms-4.2.4.dist-info/licenses/LICENSE,sha256=IGTA9rMb-XpTMPJOzC6z0rRxSzysj3DlV5IQyDd06Xo,1061
|
|
75
|
+
pylibms-4.2.4.dist-info/METADATA,sha256=uKkt5ycip2iXf9OtV5CNkcicY4smCzst5TzOltIE64k,4208
|
|
76
|
+
pylibms-4.2.4.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
77
|
+
pylibms-4.2.4.dist-info/top_level.txt,sha256=SWQqb3sjP5r5Ls1Ol4E_PIbsv1sggK4DCkkLEzXNRTU,4
|
|
78
|
+
pylibms-4.2.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|