aboutsummaryrefslogtreecommitdiff
path: root/client/global.gd
diff options
context:
space:
mode:
Diffstat (limited to 'client/global.gd')
-rw-r--r--client/global.gd17
1 files changed, 16 insertions, 1 deletions
diff --git a/client/global.gd b/client/global.gd
index d2773f14..97f7d0e8 100644
--- a/client/global.gd
+++ b/client/global.gd
@@ -26,7 +26,7 @@ var default_profile := {
"username": "Giovanni",
"character": 0,
"last_server_url": "",
- "tutorials_played": [],
+ "tutorial_ingredients_played": [],
"hints": {
"has_moved": false,
"has_boosted": false,
@@ -230,3 +230,18 @@ func add_missing_keys(dict: Dictionary, reference: Dictionary):
else:
if dict[k] is Dictionary:
add_missing_keys(dict[k], reference[k])
+
+func array_has_all(parent: Array, children: Array) -> bool:
+ for i in children:
+ if not i in parent:
+ return false
+ return true
+
+class ParsedItem:
+ var name: String
+ var contents: Array
+
+ func _init(full_name: String):
+ var c = Array(full_name.split(":"))
+ name = c[0]
+ contents = c[1].split(",") if c.size() > 1 else []