aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/global.gd1
-rw-r--r--client/makefile6
-rw-r--r--client/menu/play.gd12
-rw-r--r--client/menu/popup.gd31
-rw-r--r--client/menu/popup.tscn (renamed from client/menu/warning_popup.tscn)23
-rw-r--r--client/menu/rating/rating.tscn2
-rw-r--r--client/menu/setup.gd7
-rw-r--r--client/menu/warning_popup.gd8
-rw-r--r--client/player/character/character.gd21
-rw-r--r--client/player/character/robot/body.resbin30064 -> 0 bytes
-rw-r--r--locale/ar.ini2
-rw-r--r--locale/de.ini2
-rw-r--r--locale/en.ini4
-rw-r--r--locale/es.ini2
-rw-r--r--locale/eu.ini2
-rw-r--r--locale/fi.ini2
-rw-r--r--locale/fr.ini2
-rw-r--r--locale/he.ini2
-rw-r--r--locale/it.ini5
-rw-r--r--locale/ja.ini2
-rw-r--r--locale/nl.ini2
-rw-r--r--locale/pl.ini2
-rw-r--r--locale/pt.ini2
-rw-r--r--locale/tools/src/main.rs7
-rw-r--r--locale/tr.ini2
-rw-r--r--locale/zh_Hans.ini2
-rw-r--r--locale/zh_Hant.ini2
-rw-r--r--readme.md10
28 files changed, 99 insertions, 66 deletions
diff --git a/client/global.gd b/client/global.gd
index 1d6fb630..6ea4f7dc 100644
--- a/client/global.gd
+++ b/client/global.gd
@@ -29,6 +29,7 @@ var default_profile := {
"character": 0,
"last_server_url": "",
"tutorial_ingredients_played": [],
+ "registry_asked": false,
"hints": {
"has_moved": false,
"has_boosted": false,
diff --git a/client/makefile b/client/makefile
index b7524ff0..bde22f11 100644
--- a/client/makefile
+++ b/client/makefile
@@ -14,7 +14,7 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
.PHONY: assets clean all locales
-all: assets locales icons/adaptive-background.png icons/adaptive-foreground.png
+all: .godot/import-finished assets locales icons/adaptive-background.png icons/adaptive-foreground.png
assets: menu/book/book_01.webp
locales: $(patsubst ../locale/%.ini,po/%.po,$(wildcard ../locale/*.ini))
@@ -24,6 +24,10 @@ clean:
rm -f menu/book/book_*.webp
rm -f icons/adaptive-foreground.png icons/adaptive-background.png
+.godot/import-finished:
+ godot --headless --import project.godot
+ touch $@
+
menu/book/book_01.webp:
@echo Downloading recipe book...
@mkdir -p menu/book
diff --git a/client/menu/play.gd b/client/menu/play.gd
index 1abd0bbc..9cf1bbaa 100644
--- a/client/menu/play.gd
+++ b/client/menu/play.gd
@@ -39,6 +39,18 @@ func _ready():
update_server_list_loading(ServerList.loading)
super()
+ if not Global.get_profile("registry_asked"):
+ var data := MenuPopup.Data.new()
+ data.text = tr("c.play.allow_query_registry")
+ var allow_button := Button.new()
+ allow_button.text = tr("c.menu.accept")
+ var deny_button := Button.new()
+ deny_button.text = tr("c.menu.deny")
+ allow_button.pressed.connect(func(): Global.set_setting("online.use_registry", true))
+ deny_button.pressed.connect(func(): Global.set_setting("online.use_registry", false))
+ data.buttons = [deny_button, allow_button]
+ await submenu("res://menu/popup.tscn", data)
+ Global.set_profile("registry_asked", true)
ServerList.start()
func update_server_list(lists: Array[Array]):
diff --git a/client/menu/popup.gd b/client/menu/popup.gd
new file mode 100644
index 00000000..5b3a60ac
--- /dev/null
+++ b/client/menu/popup.gd
@@ -0,0 +1,31 @@
+# Hurry Curry! - a game about cooking
+# Copyright 2024 nokoe
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, version 3 of the License only.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+#
+extends Menu
+class_name MenuPopup
+
+@onready var message := $CenterContainer/Panel/MarginContainer/VBoxContainer/Message
+@onready var button_container := $CenterContainer/Panel/MarginContainer/VBoxContainer/HBoxContainer
+
+class Data:
+ var buttons: Array[Button]
+ var text: String
+
+func _ready():
+ var setup: Data = self.data
+ for i in setup.buttons:
+ button_container.add_child(i)
+ i.pressed.connect(exit)
+ message.text = setup.text
diff --git a/client/menu/warning_popup.tscn b/client/menu/popup.tscn
index 4fd2fbba..85db4897 100644
--- a/client/menu/warning_popup.tscn
+++ b/client/menu/popup.tscn
@@ -1,18 +1,18 @@
-[gd_scene load_steps=4 format=3 uid="uid://0v2olkwpm150"]
+[gd_scene load_steps=4 format=3 uid="uid://lwtym0pbc17g"]
-[ext_resource type="Theme" uid="uid://b0qmvo504e457" path="res://menu/theme/theme.tres" id="1_yk5xc"]
-[ext_resource type="Script" path="res://menu/warning_popup.gd" id="2_2vobb"]
-[ext_resource type="Material" uid="uid://beea1pc5nt67r" path="res://menu/theme/dark_blur_material.tres" id="3_5wavk"]
+[ext_resource type="Theme" uid="uid://b0qmvo504e457" path="res://menu/theme/theme.tres" id="1_m0d0r"]
+[ext_resource type="Script" path="res://menu/popup.gd" id="2_1h10j"]
+[ext_resource type="Material" uid="uid://beea1pc5nt67r" path="res://menu/theme/dark_blur_material.tres" id="3_iouvy"]
-[node name="WarningPopup" type="Control"]
+[node name="Popup" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
-theme = ExtResource("1_yk5xc")
-script = ExtResource("2_2vobb")
+theme = ExtResource("1_m0d0r")
+script = ExtResource("2_1h10j")
support_anim = false
[node name="CenterContainer" type="CenterContainer" parent="."]
@@ -24,7 +24,7 @@ grow_horizontal = 2
grow_vertical = 2
[node name="Panel" type="PanelContainer" parent="CenterContainer"]
-material = ExtResource("3_5wavk")
+material = ExtResource("3_iouvy")
layout_mode = 2
[node name="MarginContainer" type="MarginContainer" parent="CenterContainer/Panel"]
@@ -42,10 +42,3 @@ horizontal_alignment = 1
[node name="HBoxContainer" type="HBoxContainer" parent="CenterContainer/Panel/MarginContainer/VBoxContainer"]
layout_mode = 2
alignment = 1
-
-[node name="Accept" type="Button" parent="CenterContainer/Panel/MarginContainer/VBoxContainer/HBoxContainer"]
-layout_mode = 2
-theme_override_font_sizes/font_size = 16
-text = "Accept"
-
-[connection signal="pressed" from="CenterContainer/Panel/MarginContainer/VBoxContainer/HBoxContainer/Accept" to="." method="_on_accept_pressed"]
diff --git a/client/menu/rating/rating.tscn b/client/menu/rating/rating.tscn
index 69edba88..780cf261 100644
--- a/client/menu/rating/rating.tscn
+++ b/client/menu/rating/rating.tscn
@@ -120,7 +120,7 @@ alignment = 1
[node name="Close" type="Button" parent="MarginContainer/PanelContainer/VBoxContainer/HBoxContainer"]
layout_mode = 2
-text = "c.menu.rating.accept"
+text = "c.menu.accept"
[node name="StarTimer" type="Timer" parent="."]
wait_time = 0.5
diff --git a/client/menu/setup.gd b/client/menu/setup.gd
index fbf0bfce..580902da 100644
--- a/client/menu/setup.gd
+++ b/client/menu/setup.gd
@@ -60,7 +60,12 @@ func check():
func _on_sign_pressed():
if check() != null: # TODO show error message
- await submenu("res://menu/warning_popup.tscn", check())
+ var data := MenuPopup.Data.new()
+ data.text = check()
+ var accept_button := Button.new()
+ accept_button.text = tr("c.menu.accept")
+ data.buttons = [accept_button]
+ await submenu("res://menu/popup.tscn", data)
return
sign_button.disabled = true
diff --git a/client/menu/warning_popup.gd b/client/menu/warning_popup.gd
deleted file mode 100644
index fd23a30a..00000000
--- a/client/menu/warning_popup.gd
+++ /dev/null
@@ -1,8 +0,0 @@
-extends Menu
-class_name WarningPopup
-
-func _ready():
- $CenterContainer/Panel/MarginContainer/VBoxContainer/Message.text = self.data
-
-func _on_accept_pressed():
- exit()
diff --git a/client/player/character/character.gd b/client/player/character/character.gd
index 65275549..cd41e7ff 100644
--- a/client/player/character/character.gd
+++ b/client/player/character/character.gd
@@ -19,7 +19,6 @@ class_name Character
const DEFAULT_MAIN_MESH = preload("res://player/character/default/main.res")
const CUSTOMER_MAIN_MESH = preload("res://player/character/customer_body.res")
-const ROBOT_MAIN_MESH = preload("res://player/character/robot/body.res")
const WALK_ANIM_STRENGTH := 0.05
const WALK_ANIM_SPEED:= 15.0
@@ -105,22 +104,14 @@ func _process(delta):
func set_style(id: int):
var p = ParsedStyle.new(id)
- set_customer(p.customer)
- set_robot(p.robot)
+ main.mesh = CUSTOMER_MAIN_MESH if p.customer else DEFAULT_MAIN_MESH
+ if p.customer:
+ tie.queue_free()
+ head_robot.visible = p.robot
+ head_default.visible = not p.robot
for h in hairstyles: h.hide()
hairstyles[p.hair].show()
- $Main.get_active_material(0).albedo_color = colors[p.color]
-
-func set_customer(b: bool):
- if b:
- main.mesh = CUSTOMER_MAIN_MESH
- tie.queue_free()
- else: pass # TODO
-
-func set_robot(b: bool):
- head_robot.visible = b
- head_default.visible = not b
- main.mesh = ROBOT_MAIN_MESH if b else DEFAULT_MAIN_MESH
+ $Main.get_active_material(0).albedo_color = Color(0.349, 0.349, 0.349) if p.robot else colors[p.color]
func play_animation(name_: String):
current_animation = name_
diff --git a/client/player/character/robot/body.res b/client/player/character/robot/body.res
deleted file mode 100644
index b82147d3..00000000
--- a/client/player/character/robot/body.res
+++ /dev/null
Binary files differ
diff --git a/locale/ar.ini b/locale/ar.ini
index 101cc36b..ca2124e3 100644
--- a/locale/ar.ini
+++ b/locale/ar.ini
@@ -155,7 +155,7 @@ c.credits.models=النماذج
c.credits.sounds=الاصوات
c.settings.gameplay.setup_completed=تم الانتهاء من الإعداد الأولي. (إزيلوا علامة الإختيار وأعدوا التشغيل لإعادة الدخول)
unknown622=يجب عليكم ملء جميع الحقول.
-c.menu.rating.accept=حسنا
+c.menu.accept=حسنا
c.settings.gameplay.hints_started=بدأ البرنامج التعليمي
unknown732=
unknown736=
diff --git a/locale/de.ini b/locale/de.ini
index 2cd9b8df..db26b3b1 100644
--- a/locale/de.ini
+++ b/locale/de.ini
@@ -156,7 +156,7 @@ unknown538=Menü-Knopf
unknown551=Nicht verfügbar
c.setup.uniform.value=Frisur {0}
unknown622=Sie müssen alle verlangten Felder ausfüllen.
-c.menu.rating.accept=Akzeptieren
+c.menu.accept=Akzeptieren
unknown732=Zurück
unknown736=Nächstes
unknown740=Beitreten / Zuschauen
diff --git a/locale/en.ini b/locale/en.ini
index 985d5215..a5c3ee6a 100644
--- a/locale/en.ini
+++ b/locale/en.ini
@@ -31,8 +31,10 @@ c.map.difficulty.3=Unplayable
c.map.difficulty.4=Very hard
c.map.difficulty=Difficulty
c.map.players_recommended={0} players recommended
+c.menu.accept=Accept
c.menu.back=Back
c.menu.credits=Credits
+c.menu.deny=Deny
c.menu.ingame.cancel=Cancel game
c.menu.ingame.join=Join game
c.menu.ingame.leave=Leave game
@@ -61,8 +63,8 @@ c.menu.play.server_unavailable=Server (unavailable)
c.menu.play.server=Server
c.menu.play=Play
c.menu.quit=Quit
-c.menu.rating.accept=Accept
c.menu.settings=Settings
+c.play.allow_query_registry=Do you want to query the global registry for public servers?
c.score.acceptable=Acceptable service
c.score.completed=Completed
c.score.excellent=Excellent service
diff --git a/locale/es.ini b/locale/es.ini
index 63e00217..c8abb32c 100644
--- a/locale/es.ini
+++ b/locale/es.ini
@@ -156,7 +156,7 @@ unknown538=Botón de menú
unknown551=Servidor (No disponible)
c.setup.uniform.value=Peinado {0}
unknown622=Debes completar todos los requisitos.
-c.menu.rating.accept=Aceptar
+c.menu.accept=Aceptar
unknown732=
unknown736=
unknown740=Observar
diff --git a/locale/eu.ini b/locale/eu.ini
index a5067320..b002c7c5 100644
--- a/locale/eu.ini
+++ b/locale/eu.ini
@@ -155,7 +155,7 @@ c.credits.models=Modeloak
c.credits.sounds=Soinuak
c.settings.gameplay.setup_completed=Hasierako konfigurazioa osatuta. (Marka kendu eta berrabiarazi berriz sartzeko)
unknown622=Eskatutako eremu guztiak bete behar dituzu.
-c.menu.rating.accept=Onartu
+c.menu.accept=Onartu
c.settings.gameplay.hints_started=Tutoriala hasi da
unknown732=Aurrekoa
unknown736=Hurrengoa
diff --git a/locale/fi.ini b/locale/fi.ini
index 46106fa4..8b297268 100644
--- a/locale/fi.ini
+++ b/locale/fi.ini
@@ -155,7 +155,7 @@ c.credits.models=
c.credits.sounds=
c.settings.gameplay.setup_completed=
unknown622=
-c.menu.rating.accept=
+c.menu.accept=
c.settings.gameplay.hints_started=
unknown732=
unknown736=
diff --git a/locale/fr.ini b/locale/fr.ini
index 60d33420..02959be8 100644
--- a/locale/fr.ini
+++ b/locale/fr.ini
@@ -155,7 +155,7 @@ c.credits.models=Modèles
c.credits.sounds=Sons
c.settings.gameplay.setup_completed=Configuration initiale terminée. (Décochez et recommencer pour entrer à nouveau)
unknown622=Vous devez remplir tous les champs requis.
-c.menu.rating.accept=Accepter
+c.menu.accept=Accepter
c.settings.gameplay.hints_started=Tutoriel commencé
unknown732=
unknown736=
diff --git a/locale/he.ini b/locale/he.ini
index 65ac6192..be39b81d 100644
--- a/locale/he.ini
+++ b/locale/he.ini
@@ -155,7 +155,7 @@ c.credits.models=מודלים
c.credits.sounds=
c.settings.gameplay.setup_completed=אתחול ראשוני נגמר. (הורד סימון והדלק מחדש על מנת להכנס מחדש)
unknown622=אנא מלאו את כל השדות הנדרשים.
-c.menu.rating.accept=אשר
+c.menu.accept=אשר
c.settings.gameplay.hints_started=הדרכה התחילה
unknown732=
unknown736=
diff --git a/locale/it.ini b/locale/it.ini
index 22a7991d..a49e9f7e 100644
--- a/locale/it.ini
+++ b/locale/it.ini
@@ -1,6 +1,3 @@
-
-
-
[hurrycurry]
c.setup.additional_terms = [b]Termini Aggiuntivi.[/b]Non duplicare i piatti. (Ciò [u]NON[/u] è possibile!)%n
c.credits.developed_by = sviluppato da
@@ -56,4 +53,4 @@ c.settings.audio.sfx_volume = Volume effetti
c.settings.graphics.aa.disabled = Disabilitato
s.tutorial.active = Interagisci qui per {0}s
s.tutorial.take = Prendi {0} da qui
-c.settings.graphics.preset.high = Alte \ No newline at end of file
+c.settings.graphics.preset.high = Alte
diff --git a/locale/ja.ini b/locale/ja.ini
index 1513517a..0fa1d787 100644
--- a/locale/ja.ini
+++ b/locale/ja.ini
@@ -155,7 +155,7 @@ c.credits.models=モデル
c.credits.sounds=サウンド
c.settings.gameplay.setup_completed=初期設定完了。(チェックを外して再起動して)
unknown622=要求されたフィールドをすべて入力する必要があります。
-c.menu.rating.accept=アクセプト
+c.menu.accept=アクセプト
c.settings.gameplay.hints_started=チュートリアルを開始
unknown732=
unknown736=
diff --git a/locale/nl.ini b/locale/nl.ini
index 31f4e408..0c79233a 100644
--- a/locale/nl.ini
+++ b/locale/nl.ini
@@ -160,7 +160,7 @@ unknown538 = Menuknop
unknown551 = niet beschikbaar
unknown568 = Haarstijl: {0}
unknown622 = Vul alle vereiste velden in.
-c.menu.rating.accept = Accepteren
+c.menu.accept = Accepteren
unknown732 = Vorige
unknown736 = Volgende
unknown740 = Deelnemen/Toeschouwen
diff --git a/locale/pl.ini b/locale/pl.ini
index 9c4eeb03..38e787a6 100644
--- a/locale/pl.ini
+++ b/locale/pl.ini
@@ -155,7 +155,7 @@ c.credits.models=Modele
c.credits.sounds=Oprawa dźwiękowa
c.settings.gameplay.setup_completed=Konfiguracja wstępna ukończona. (Odznacz i zrestartuj aby wykonać ponownie)
unknown622=Musisz wypełnić wymagane pola.
-c.menu.rating.accept=Zatwierdź
+c.menu.accept=Zatwierdź
c.settings.gameplay.hints_started=Samouczek rozpoczęty
unknown732=
unknown736=
diff --git a/locale/pt.ini b/locale/pt.ini
index 46106fa4..8b297268 100644
--- a/locale/pt.ini
+++ b/locale/pt.ini
@@ -155,7 +155,7 @@ c.credits.models=
c.credits.sounds=
c.settings.gameplay.setup_completed=
unknown622=
-c.menu.rating.accept=
+c.menu.accept=
c.settings.gameplay.hints_started=
unknown732=
unknown736=
diff --git a/locale/tools/src/main.rs b/locale/tools/src/main.rs
index 7675b4d6..5e97993b 100644
--- a/locale/tools/src/main.rs
+++ b/locale/tools/src/main.rs
@@ -64,14 +64,19 @@ static NATIVE_LANGUAGE_NAMES: &[(&str, &str)] = &[
fn export_load(input: &Path, fallback: Option<PathBuf>) -> Result<BTreeMap<String, String>> {
let mut ini = load_ini(&input)?;
if let Some(fallback) = fallback {
+ let mut missing = 0;
let f = load_ini(&fallback)?;
for (k, v) in f {
#[allow(clippy::map_entry)]
if !ini.contains_key(&k) {
- eprintln!("fallback: key {k:?} is missing");
+ if option_env!("SHOW_MISSING").is_some() {
+ eprintln!("fallback: key {k:?} is missing");
+ }
+ missing += 1;
ini.insert(k, v);
}
}
+ eprintln!("-- {missing} missing keys were substituted from fallback language")
}
for &(code, name) in NATIVE_LANGUAGE_NAMES {
ini.insert(format!("c.settings.ui.language.{code}"), name.to_owned());
diff --git a/locale/tr.ini b/locale/tr.ini
index 46106fa4..8b297268 100644
--- a/locale/tr.ini
+++ b/locale/tr.ini
@@ -155,7 +155,7 @@ c.credits.models=
c.credits.sounds=
c.settings.gameplay.setup_completed=
unknown622=
-c.menu.rating.accept=
+c.menu.accept=
c.settings.gameplay.hints_started=
unknown732=
unknown736=
diff --git a/locale/zh_Hans.ini b/locale/zh_Hans.ini
index f118ceee..b9de93fe 100644
--- a/locale/zh_Hans.ini
+++ b/locale/zh_Hans.ini
@@ -156,7 +156,7 @@ unknown538=菜单按钮
unknown551=不可用
c.setup.uniform.value=发型 {0}
unknown622=您必须填写所有要求的字段。
-c.menu.rating.accept=接受
+c.menu.accept=接受
unknown732=上一个
unknown736=下一个
unknown740=加入/旁观
diff --git a/locale/zh_Hant.ini b/locale/zh_Hant.ini
index 2d88f417..b465f09b 100644
--- a/locale/zh_Hant.ini
+++ b/locale/zh_Hant.ini
@@ -157,7 +157,7 @@ c.settings.gameplay.setup_completed=初始設定完成。(取消勾選並重
unknown622=你必須填寫所有要求的欄位。
unknown732=上一個
unknown736=下一個
-c.menu.rating.accept=接受
+c.menu.accept=接受
c.settings.gameplay.hints_started=教程已啟動
unknown740=旁觀
unknown752=向下滾動
diff --git a/readme.md b/readme.md
index 70084b0d..8b304883 100644
--- a/readme.md
+++ b/readme.md
@@ -25,7 +25,7 @@ The protocol is documented in [protocol.md](protocol.md).
### Building
- Requirements:
- - Godot 4.2
+ - Godot 4.3
- cURL (only if book is required)
- Nightly rust toolchain (only if locales are required)
@@ -44,17 +44,17 @@ godot --import client/project.godot
- Requirements:
- Nightly rust toolchain
- - Deno
+ - Deno (or Node.js in which case you need to pass `JSR=node` to make)
```
-make test-client
+make data server
```
### Usage
- Ensure the `data` directory is available **contained within** (not is) either
the process working directory of the server or in /usr/share/hurrycurry (or
- similar). Running the server in the source folder should work.
+ similar). Running the server in the repository root should work.
- Run the server: `./target/release/hurrycurry-server`
## Pixel Client
@@ -63,7 +63,7 @@ make test-client
- Requirements:
- Nightly rust toolchain
- - SDL2 development libraries
+ - SDL2 development libraries (including gfx, ttf and mixer extensions)
```
make pixel-client