diff options
-rw-r--r-- | client/game.gd | 14 | ||||
-rw-r--r-- | client/game.tscn | 21 | ||||
-rw-r--r-- | client/map/items/bread.gd | 13 | ||||
-rw-r--r-- | client/map/items/steam.tscn | 1 | ||||
-rw-r--r-- | client/map/progress.gdshader | 26 | ||||
-rw-r--r-- | client/map/tiles/conveyor_direction.gdshader | 14 | ||||
-rw-r--r-- | client/menu/blur_mix.gdshader | 4 | ||||
-rw-r--r-- | client/menu/game.gd | 10 | ||||
-rw-r--r-- | client/menu/game.tscn | 20 | ||||
-rw-r--r-- | client/menu/grayscale.gdshader | 8 | ||||
-rw-r--r-- | client/menu/lobby.gd | 1 | ||||
-rw-r--r-- | client/menu/menu_background.gdshader | 20 | ||||
-rw-r--r-- | client/menu/popup_message.gd | 5 | ||||
-rw-r--r-- | client/menu/popup_message.tscn | 4 | ||||
-rw-r--r-- | client/menu/setup.tscn | 2 | ||||
-rw-r--r-- | client/player/interact_marker.gdshader | 36 | ||||
-rw-r--r-- | client/po/de.po | 103 |
17 files changed, 194 insertions, 108 deletions
diff --git a/client/game.gd b/client/game.gd index ccc72e11..c18f8d67 100644 --- a/client/game.gd +++ b/client/game.gd @@ -42,11 +42,10 @@ var players := {} @onready var camera: FollowCamera = $FollowCamera @onready var mp: Multiplayer = $Multiplayer @onready var map: Map = $Map -@onready var environment = $WorldEnvironment -@onready var debug_label = $Debug -@onready var overlay = $Overlay -@onready var lobby = $"../Lobby" -@onready var popup_message: PopupMessage = $PopupMessage +@onready var environment: WorldEnvironment = $WorldEnvironment +@onready var lobby: Lobby = $"../Lobby" +@onready var overlay: Overlay = $"../Overlay" +@onready var popup_message: PopupMessage = $"../PopupMessage" func _ready(): if !Global.on_vulkan(): @@ -256,11 +255,6 @@ func _process(delta): if is_replay and mp != null: mp.send_replay_tick(delta) - if Global.get_setting("debug_info"): - debug_label.show() - debug_label.text = "%d FPS" % Engine.get_frames_per_second() - else: debug_label.hide() - func get_tile_collision(pos: Vector2i) -> bool: var t = map.get_tile_name(pos) if t == null: return true diff --git a/client/game.tscn b/client/game.tscn index 82fef27a..345a35b8 100644 --- a/client/game.tscn +++ b/client/game.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=12 format=3 uid="uid://c6krh36hoqfg8"] +[gd_scene load_steps=10 format=3 uid="uid://c6krh36hoqfg8"] [ext_resource type="Script" path="res://game.gd" id="1_sftfn"] [ext_resource type="PackedScene" uid="uid://b31mlnao6ybt8" path="res://player/follow_camera.tscn" id="2_s8y6o"] @@ -6,8 +6,6 @@ [ext_resource type="Script" path="res://map/auto_setup/light_setup.gd" id="5_6fpff"] [ext_resource type="Script" path="res://multiplayer.gd" id="6_fbxu8"] [ext_resource type="PackedScene" uid="uid://b4gone8fu53r7" path="res://map/map.tscn" id="6_prg6t"] -[ext_resource type="PackedScene" uid="uid://bpikve6wlsjfl" path="res://menu/overlay.tscn" id="7_7xrr6"] -[ext_resource type="PackedScene" uid="uid://b21nrnkygiyjt" path="res://menu/popup_message.tscn" id="9_l5d71"] [sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_py7px"] ground_bottom_color = Color(0.0826605, 0.065772, 0.0461518, 1) @@ -47,20 +45,3 @@ script = ExtResource("5_6fpff") [node name="Map" parent="." instance=ExtResource("6_prg6t")] [node name="Center" type="Node3D" parent="."] - -[node name="Overlay" parent="." instance=ExtResource("7_7xrr6")] -offset_left = -280.0 -offset_bottom = 102.0 - -[node name="Debug" type="RichTextLabel" parent="."] -visible = false -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 -mouse_filter = 2 -theme_override_colors/font_outline_color = Color(0, 0, 0, 1) -theme_override_constants/outline_size = 5 - -[node name="PopupMessage" parent="." instance=ExtResource("9_l5d71")] diff --git a/client/map/items/bread.gd b/client/map/items/bread.gd index b049b450..b5143c53 100644 --- a/client/map/items/bread.gd +++ b/client/map/items/bread.gd @@ -16,6 +16,19 @@ class_name Bread extends Item +var steam: CPUParticles3D = preload("res://map/items/steam.tscn").instantiate() + func _init(owned_by_: Node3D): super(owned_by_) base.add_child(load("res://map/items/bread.tscn").instantiate()) + steam.position.y += .1 + steam.color = Color(.6, .6, .6, .4) + base.add_child(steam) + +func progress(p: float, warn: bool): + super(p, warn) + steam.emitting = warn + +func finish(warn: bool): + super(warn) + steam.emitting = false diff --git a/client/map/items/steam.tscn b/client/map/items/steam.tscn index 4a112278..a6114124 100644 --- a/client/map/items/steam.tscn +++ b/client/map/items/steam.tscn @@ -1,6 +1,7 @@ [gd_scene load_steps=4 format=3 uid="uid://g1wsqgb56o1o"] [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_e1q7j"] +transparency = 1 vertex_color_use_as_albedo = true [sub_resource type="SphereMesh" id="SphereMesh_mk24m"] diff --git a/client/map/progress.gdshader b/client/map/progress.gdshader index 2ce33dd6..a5ebf575 100644 --- a/client/map/progress.gdshader +++ b/client/map/progress.gdshader @@ -1,6 +1,6 @@ /* Hurry Curry! - a game about cooking - Copyright 2024 metamuffin + Copyright 2024 nokoe Copyright 2024 tpart This program is free software: you can redistribute it and/or modify @@ -23,18 +23,18 @@ uniform float progress = 0.; uniform bool bad = false; void fragment() { - vec3 color = vec3(0., .5, 0.); - float alpha_fac = 1.; - if (bad) { - color = vec3(1., 0., 0.); - alpha_fac = sin(TIME * 15.) * .5 + 1.; - } - if (UV.x > progress) { - ALPHA = 1.; - color = vec3(0.1, 0.1, 0.1); - } - ALPHA *= alpha_fac; - ALBEDO = color; + vec3 color = vec3(0., .5, 0.); + float alpha_fac = 1.; + if (bad) { + color = vec3(progress, 1. - progress, 0.); + alpha_fac = (sin(TIME * 15.) + 1.) * .5; + } + if (UV.x > progress) { + ALPHA = 1.; + color = vec3(0.1, 0.1, 0.1); + } + ALPHA *= alpha_fac; + ALBEDO = color; } void vertex() { diff --git a/client/map/tiles/conveyor_direction.gdshader b/client/map/tiles/conveyor_direction.gdshader index 7b3565e6..f2bf8154 100644 --- a/client/map/tiles/conveyor_direction.gdshader +++ b/client/map/tiles/conveyor_direction.gdshader @@ -24,11 +24,11 @@ uniform float speed = 1.; uniform float alpha_fac = 1.; void fragment() { - ALBEDO = vec3(1., 1., 0.); - vec2 uv = UV.xy; - uv.x = abs(2. * uv.x - 1.); - float alpha = step( - mod(uv.y - TIME * speed + angle * uv.x, frequency), width - ); - ALPHA = alpha * alpha_fac; + ALBEDO = vec3(1., 1., 0.); + vec2 uv = UV.xy; + uv.x = abs(2. * uv.x - 1.); + float alpha = step( + mod(uv.y - TIME * speed + angle * uv.x, frequency), width + ); + ALPHA = alpha * alpha_fac; } diff --git a/client/menu/blur_mix.gdshader b/client/menu/blur_mix.gdshader index 668ef57d..706903d5 100644 --- a/client/menu/blur_mix.gdshader +++ b/client/menu/blur_mix.gdshader @@ -23,6 +23,6 @@ uniform vec4 color_over: source_color; uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear_mipmap; void fragment() { - vec4 blurred = textureLod(SCREEN_TEXTURE, SCREEN_UV, blur_amount); - COLOR = mix(blurred, color_over, mix_amount); + vec4 blurred = textureLod(SCREEN_TEXTURE, SCREEN_UV, blur_amount); + COLOR = mix(blurred, color_over, mix_amount); }
\ No newline at end of file diff --git a/client/menu/game.gd b/client/menu/game.gd index 362bf169..78c01c42 100644 --- a/client/menu/game.gd +++ b/client/menu/game.gd @@ -16,6 +16,10 @@ # extends Menu +@onready var debug_label = $Debug +@onready var overlay = $Overlay +@onready var popup_message: PopupMessage = $PopupMessage + func _ready(): get_tree().get_root().connect("go_back_requested", open_ingame_menu) super() @@ -24,6 +28,12 @@ func _input(_event): if Input.is_action_just_pressed("ui_menu"): open_ingame_menu() +func _process(delta): + if Global.get_setting("debug_info"): + debug_label.show() + debug_label.text = "%d FPS" % Engine.get_frames_per_second() + else: debug_label.hide() + func open_ingame_menu(): if popup != null: return Sound.play_click() diff --git a/client/menu/game.tscn b/client/menu/game.tscn index af7f22a8..417aaf96 100644 --- a/client/menu/game.tscn +++ b/client/menu/game.tscn @@ -1,8 +1,10 @@ -[gd_scene load_steps=4 format=3 uid="uid://bbjwoxs71fnsk"] +[gd_scene load_steps=6 format=3 uid="uid://bbjwoxs71fnsk"] [ext_resource type="Script" path="res://menu/game.gd" id="1_cdpsh"] [ext_resource type="PackedScene" uid="uid://c6krh36hoqfg8" path="res://game.tscn" id="2_uojcy"] +[ext_resource type="PackedScene" uid="uid://bpikve6wlsjfl" path="res://menu/overlay.tscn" id="3_i0ytb"] [ext_resource type="PackedScene" uid="uid://bc50la65ntifb" path="res://menu/lobby.tscn" id="3_udxby"] +[ext_resource type="PackedScene" uid="uid://b21nrnkygiyjt" path="res://menu/popup_message.tscn" id="5_n1wy0"] [node name="GameMenu" type="Control"] layout_mode = 3 @@ -16,5 +18,21 @@ auto_anim = false [node name="Game" parent="." instance=ExtResource("2_uojcy")] +[node name="Overlay" parent="." instance=ExtResource("3_i0ytb")] +layout_mode = 1 + [node name="Lobby" parent="." instance=ExtResource("3_udxby")] layout_mode = 1 + +[node name="Debug" type="RichTextLabel" parent="."] +visible = false +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +mouse_filter = 1 + +[node name="PopupMessage" parent="." instance=ExtResource("5_n1wy0")] +layout_mode = 1 diff --git a/client/menu/grayscale.gdshader b/client/menu/grayscale.gdshader index 7c11b777..cc132c54 100644 --- a/client/menu/grayscale.gdshader +++ b/client/menu/grayscale.gdshader @@ -18,8 +18,8 @@ shader_type canvas_item; void fragment() { - float brightness = 0.2126 * COLOR.r + 0.7152 * COLOR.g + 0.0722 * COLOR.b; - brightness = (brightness - .5) * 2.; - COLOR.rgb = vec3(brightness); - COLOR.a *= 1. - brightness; + float brightness = 0.2126 * COLOR.r + 0.7152 * COLOR.g + 0.0722 * COLOR.b; + brightness = (brightness - .5) * 2.; + COLOR.rgb = vec3(brightness); + COLOR.a *= 1. - brightness; } diff --git a/client/menu/lobby.gd b/client/menu/lobby.gd index ae7548b7..3c4a6f58 100644 --- a/client/menu/lobby.gd +++ b/client/menu/lobby.gd @@ -15,6 +15,7 @@ # along with this program. If not, see <https://www.gnu.org/licenses/>. # extends Control +class_name Lobby const PLAYER = preload("res://menu/lobby/player.tscn") diff --git a/client/menu/menu_background.gdshader b/client/menu/menu_background.gdshader index 763c7b42..e6365dfa 100644 --- a/client/menu/menu_background.gdshader +++ b/client/menu/menu_background.gdshader @@ -22,14 +22,14 @@ uniform vec3 ccloud : source_color; uniform vec3 csky : source_color; void fragment() { - vec2 uv = UV * 0.9; - uv += TIME * vec2(0.001,0.002); - - float f = texture(noise, uv).x; - f = 1. - f; - f = pow(f, 1.5); - f = floor(f*5.)/5.; - f = pow(f, 2.); - - ALBEDO = mix(csky, ccloud, f); + vec2 uv = UV * 0.9; + uv += TIME * vec2(0.001,0.002); + + float f = texture(noise, uv).x; + f = 1. - f; + f = pow(f, 1.5); + f = floor(f*5.)/5.; + f = pow(f, 2.); + + ALBEDO = mix(csky, ccloud, f); } diff --git a/client/menu/popup_message.gd b/client/menu/popup_message.gd index 1748f59a..2d707289 100644 --- a/client/menu/popup_message.gd +++ b/client/menu/popup_message.gd @@ -32,7 +32,7 @@ var is_joined := false @onready var reset_timer = $Reset -@onready var game: Game = get_parent() +@onready var game: Game = $"../Game" func _ready(): game.joined.connect( @@ -112,7 +112,8 @@ func _on_move_timeout(): func _on_interact_timeout(): if not Global.get_hint("has_interacted") and not Global.get_setting("touch_controls"): - display_hint_msg(tr("Press %s to pick up items and interact with tools") % display_keybind(tr("SPACE"), "A")) + var keybind = display_keybind(tr("SPACE"), "A") + display_hint_msg(tr("Press %s to pick up items and hold %s to interact with tools") % [keybind, keybind]) func _on_reset_timeout(): if not Global.get_hint("has_reset") and not Global.get_setting("touch_controls"): diff --git a/client/menu/popup_message.tscn b/client/menu/popup_message.tscn index fd98285d..b83d15a0 100644 --- a/client/menu/popup_message.tscn +++ b/client/menu/popup_message.tscn @@ -111,7 +111,7 @@ one_shot = true [node name="AutoHintTimers" type="Node" parent="."] [node name="Move" type="Timer" parent="AutoHintTimers"] -wait_time = 5.0 +wait_time = 2.0 one_shot = true [node name="Boost" type="Timer" parent="AutoHintTimers"] @@ -119,7 +119,7 @@ wait_time = 90.0 one_shot = true [node name="Interact" type="Timer" parent="AutoHintTimers"] -wait_time = 20.0 +wait_time = 15.0 one_shot = true [node name="RotateCamera" type="Timer" parent="AutoHintTimers"] diff --git a/client/menu/setup.tscn b/client/menu/setup.tscn index 5ef6a260..04064966 100644 --- a/client/menu/setup.tscn +++ b/client/menu/setup.tscn @@ -91,6 +91,8 @@ layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 +offset_right = 1152.0 +offset_bottom = 648.0 grow_horizontal = 2 grow_vertical = 2 follow_focus = true diff --git a/client/player/interact_marker.gdshader b/client/player/interact_marker.gdshader index 1a1b9c63..eee76270 100644 --- a/client/player/interact_marker.gdshader +++ b/client/player/interact_marker.gdshader @@ -23,22 +23,22 @@ uniform float pulse_speed = 4.; uniform bool interactive = false; void fragment() { - if (interactive) { - ALBEDO = vec3(15., 0., 0.); - } else { - ALBEDO = vec3(.1, .1, .1); - } - vec2 uv = abs(2. * UV.xy - 1.); - float m_length = marker_length / max_width; - float anim; - if (interactive) { - anim = sin(TIME * pulse_speed) * .5 + 1.; - } else { - anim = .5; - } - float alpha = step( - 1. - max_width * anim, max(uv.x, uv.y)) - * step(1. - max_width * m_length, min(uv.x, uv.y) - ); - ALPHA = alpha; + if (interactive) { + ALBEDO = vec3(15., 0., 0.); + } else { + ALBEDO = vec3(.1, .1, .1); + } + vec2 uv = abs(2. * UV.xy - 1.); + float m_length = marker_length / max_width; + float anim; + if (interactive) { + anim = sin(TIME * pulse_speed) * .5 + 1.; + } else { + anim = .5; + } + float alpha = step( + 1. - max_width * anim, max(uv.x, uv.y)) + * step(1. - max_width * m_length, min(uv.x, uv.y) + ); + ALPHA = alpha; } diff --git a/client/po/de.po b/client/po/de.po index 20cfbd3c..cf541e05 100644 --- a/client/po/de.po +++ b/client/po/de.po @@ -122,6 +122,12 @@ msgstr "" "Neueinrichten)" #: global.gd +msgid "Tutorial started. (Uncheck and restart to replay)" +msgstr "" +"Anleitung abgeschlossen. (Deaktivieren und Spiel neu starten zum erneuten " +"Spielen)" + +#: global.gd msgid "Always extend boost to maximum duration" msgstr "Schub immer bis zum Anschlag verlängern" @@ -155,6 +161,10 @@ msgid "1. [b]Name of the Employee[/b]" msgstr "1. [b]Name der angestellten Person[/b]" #: menu/setup.tscn +msgid "Other players can see your name when playing on a server" +msgstr "Andere Spieler auf öffentlichen Servern können diesen Namen sehen" + +#: menu/setup.tscn msgid "2. [b]Employment Position[/b]" msgstr "2. [b]Arbeitsstelle[/b]" @@ -167,18 +177,6 @@ msgstr "" "tragen." #: menu/setup.tscn -msgid "Hairstyle 1" -msgstr "Frisur 1" - -#: menu/setup.tscn -msgid "Hairstyle 2" -msgstr "Frisur 2" - -#: menu/setup.tscn -msgid "Hairstyle 3" -msgstr "Frisur 3" - -#: menu/setup.tscn msgid "" "4. [b]Duties.[/b] It is your duty to serve customers the meal or item that " "they request.\n" @@ -459,18 +457,85 @@ msgid "Hint" msgstr "Tipp" #: menu/popup_message.gd -msgid "Press SHIFT/Controller B to boost" -msgstr "Drücke UMSCHALTEN bzw. Controller B für Schub" +msgid "Press %s to boost" +msgstr "Drücke %s für Schub" + +#: menu/popup_message.gd +msgid "SHIFT" +msgstr "UMSCHALTEN" + +#: menu/popup_message.gd +msgid "Use %s to move" +msgstr "Nutze %s zum Bewegen" + +#: menu/popup_message.gd +msgid "left stick" +msgstr "linken Stick" + +#: menu/popup_message.gd +msgid "SPACE" +msgstr "LEERTASTE" + +#: menu/popup_message.gd +msgid "Press %s to pick up items and hold %s to interact with tools" +msgstr "" +"Drücke %s, um Gegenstände aufzuheben und halte %s gedrückt, um mit " +"Utensilien zu interagieren" + +#: menu/popup_message.gd +msgid "Press %s to reset the camera view" +msgstr "Drücke %s, um die Kameradrehung zurückzusetzen" + +#: menu/popup_message.gd +msgid "Use %s to zoom in/out" +msgstr "Nutze %s zum Zoomen" + +#: menu/popup_message.gd +msgid "PageUp/PageDown" +msgstr "BildHoch/BildRunter" + +#: menu/popup_message.gd +msgid "Use %s to reset the camera view" +msgstr "Nutze %s, um die Kameraansicht zurückzusetzen" #: menu/popup_message.gd -msgid "Use WASD/Controller left stick to move" -msgstr "Nutze WASD/Controller linker stick zum Bewegen" +msgid "arrow keys" +msgstr "Pfeiltasten" #: menu/popup_message.gd -msgid "Press SPACE/Controller A to pick up items and interact with tools" +msgid "right stick" +msgstr "rechten Stick" + +#: menu/popup_message.gd +msgid "Username tags can be enabled/disabled in the settings" +msgstr "" +"Die Anzeige von Nutzernamen kann in den Einstellungen ein- und ausgeschaltet " +"werden" + +#: multiplayer.gd +msgid "WebSocket closed with code: %d, reason %s. Clean: %s" +msgstr "Web-Socket wurde geschlossen mit Code: %d, Grund %s. Sauber: %s" + +#: multiplayer.gd +msgid "" +"Server and client versions do not match. Server: %d.%d, Client: %d.%d.\n" +"Are you sure the game is up to date?" msgstr "" -"Drücke LEERTASTE/Controller A um Gegenstände aufzuheben und mit Utensilien " -"zu interagieren" +"Server und Client Versionen stimmen nicht überein. Server: %d.%d, Client: %d." +"%d.\n" +"Ist das Spiel auf der neusten Version?" + +#~ msgid "Hairstyle 1" +#~ msgstr "Frisur 1" + +#~ msgid "Hairstyle 2" +#~ msgstr "Frisur 2" + +#~ msgid "Hairstyle 3" +#~ msgstr "Frisur 3" + +#~ msgid "Use WASD/Controller left stick to move" +#~ msgstr "Nutze WASD/Controller linker stick zum Bewegen" #~ msgid "Map" #~ msgstr "Karte" |