aboutsummaryrefslogtreecommitdiff
path: root/client/menu
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-08-31 12:51:00 +0200
committermetamuffin <metamuffin@disroot.org>2025-08-31 12:51:00 +0200
commit96938c7350d70d1f4a695be2117ad0d50df6b51f (patch)
tree7ccd6024f84ba33adf966c4b82c09684ac443e75 /client/menu
parent531a607d04d6b46a44fe1661390dfc9d49eb1ec0 (diff)
downloadhurrycurry-96938c7350d70d1f4a695be2117ad0d50df6b51f.tar
hurrycurry-96938c7350d70d1f4a695be2117ad0d50df6b51f.tar.bz2
hurrycurry-96938c7350d70d1f4a695be2117ad0d50df6b51f.tar.zst
remove duplicates from legal_text about menu
Diffstat (limited to 'client/menu')
-rw-r--r--client/menu/about.gd16
1 files changed, 11 insertions, 5 deletions
diff --git a/client/menu/about.gd b/client/menu/about.gd
index d5a688fd..8cbbc49b 100644
--- a/client/menu/about.gd
+++ b/client/menu/about.gd
@@ -114,17 +114,18 @@ func credits_text() -> String:
func legal_text() -> String:
var all: Array[String] = []
- authors.shuffle()
- contributors.shuffle()
- all.append_array(authors)
- all.append_array(contributors)
var translators: Array[String] = []
for c in credits[2][1].values():
translators.append_array(c)
translators.shuffle()
+ authors.shuffle()
+ contributors.shuffle()
+ all.append_array(authors)
+ all.append_array(contributors)
all.append_array(translators)
+
var text := "Hurry Curry! - a game about cooking\n"
- text += "[code]Copyright 2024, 2025 %s\n\n" % ", ".join(all)
+ text += "[code]Copyright 2024, 2025 %s\n\n" % ", ".join(dedup_array(all))
text += "%s[/code]\n\n" % AGPL_NOTICE
text += tr("c.legal.using_godot")
text += "\n\n[code]%s[/code]" % Engine.get_license_text()
@@ -161,3 +162,8 @@ func _on_back_pressed() -> void:
func _on_source_pressed() -> void:
OS.shell_open(SOURCE_CODE)
+
+func dedup_array(a: Array) -> Array:
+ var b = []
+ for x in a: if not b.has(x): b.append(x)
+ return b