summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-06-26 23:08:32 +0200
committermetamuffin <metamuffin@disroot.org>2024-06-26 23:08:32 +0200
commit8784d1a619f4224a4fe659750c91561fcc733100 (patch)
tree61f1671fe536d743f657404c73f87387094acac8
parent211e3d619e82aeb73dc6c52868991384682869f5 (diff)
parent3bccabee977e51ebae977731413cb6f93299b9a9 (diff)
downloadhurrycurry-8784d1a619f4224a4fe659750c91561fcc733100.tar
hurrycurry-8784d1a619f4224a4fe659750c91561fcc733100.tar.bz2
hurrycurry-8784d1a619f4224a4fe659750c91561fcc733100.tar.zst
Merge branch 'master' of codeberg.org:metamuffin/undercooked
-rw-r--r--client/game.gd6
-rw-r--r--client/global.gd10
-rw-r--r--client/menu/credits_menu.gd4
-rw-r--r--client/menu/credits_menu.tscn21
-rw-r--r--client/menu/ingame_menu.tscn1
-rw-r--r--client/menu/main_menu.tscn16
-rw-r--r--client/menu/menu_background.gd5
-rw-r--r--client/menu/menu_background.tscn5
-rw-r--r--client/menu/settings_menu.tscn8
-rw-r--r--client/menu/theme/dark_blur_material.tres9
-rw-r--r--client/menu/theme/theme.tres14
-rw-r--r--client/project.godot4
12 files changed, 70 insertions, 33 deletions
diff --git a/client/game.gd b/client/game.gd
index ab2cdfbd..76ea21f0 100644
--- a/client/game.gd
+++ b/client/game.gd
@@ -32,7 +32,13 @@ var item_idx_from_name: Dictionary = {}
var tile_by_pos: Dictionary = {}
var players := {}
+
+@onready var environment = $WorldEnvironment
+
func _ready():
+ if !Global.on_vulkan():
+ environment.environment.tonemap_exposure = 0.5
+
mp.connection_closed.connect(func(reason: String):
Global.error_message = reason;
$SceneTransition.instant_to("res://menu/error_menu.tscn")
diff --git a/client/global.gd b/client/global.gd
index ee1e3e96..42a5eac2 100644
--- a/client/global.gd
+++ b/client/global.gd
@@ -72,6 +72,16 @@ func load_dict(path: String, default: Dictionary) -> Dictionary:
print("Loaded dict: ", res)
return res
+func on_vulkan() -> bool:
+ if OS.has_feature("web"):
+ return false
+ elif OS.has_feature("pc"):
+ return true
+ elif OS.has_feature("mobile"):
+ return false
+ push_error("Unknown platform, assuming vulkan")
+ return true
+
func focus_first_button(node: Node) -> bool:
if node is Button:
node.grab_focus()
diff --git a/client/menu/credits_menu.gd b/client/menu/credits_menu.gd
index a713abc5..c7afe95a 100644
--- a/client/menu/credits_menu.gd
+++ b/client/menu/credits_menu.gd
@@ -22,12 +22,12 @@ var cc_by_3 := {
}
@onready var menu_manager: MenuManager = get_parent()
-@onready var label = $Panel/MarginContainer/VBoxContainer/RichTextLabel
+@onready var label = $MarginContainer/Panel/MarginContainer/VBoxContainer/RichTextLabel
func prepare():
contributors.shuffle()
label.text = "[center][b]"
- label.text += tr("undercooked - a game about cooking")
+ label.text += tr("undercookUSed - a game about cooking")
label.text += "[/b]\n\n"
label.text += tr("developed by")
label.text += "\n\n[b]"
diff --git a/client/menu/credits_menu.tscn b/client/menu/credits_menu.tscn
index 74d5cbc9..04797e0d 100644
--- a/client/menu/credits_menu.tscn
+++ b/client/menu/credits_menu.tscn
@@ -2,9 +2,7 @@
[ext_resource type="Theme" uid="uid://b0qmvo504e457" path="res://menu/theme/theme.tres" id="1_emk5o"]
[ext_resource type="Script" path="res://menu/credits_menu.gd" id="1_igs63"]
-
-[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_p2qmw"]
-bg_color = Color(0, 0, 0, 0.878431)
+[ext_resource type="Material" uid="uid://beea1pc5nt67r" path="res://menu/theme/dark_blur_material.tres" id="3_d30oq"]
[node name="CreditsMenu" type="Control"]
layout_mode = 3
@@ -16,16 +14,19 @@ grow_vertical = 2
theme = ExtResource("1_emk5o")
script = ExtResource("1_igs63")
-[node name="Panel" type="Panel" parent="."]
+[node name="MarginContainer" type="MarginContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
-theme_override_styles/panel = SubResource("StyleBoxFlat_p2qmw")
-[node name="MarginContainer" type="MarginContainer" parent="Panel"]
+[node name="Panel" type="Panel" parent="MarginContainer"]
+material = ExtResource("3_d30oq")
+layout_mode = 2
+
+[node name="MarginContainer" type="MarginContainer" parent="MarginContainer/Panel"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
@@ -37,10 +38,10 @@ theme_override_constants/margin_top = 50
theme_override_constants/margin_right = 50
theme_override_constants/margin_bottom = 50
-[node name="VBoxContainer" type="VBoxContainer" parent="Panel/MarginContainer"]
+[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/Panel/MarginContainer"]
layout_mode = 2
-[node name="RichTextLabel" type="RichTextLabel" parent="Panel/MarginContainer/VBoxContainer"]
+[node name="RichTextLabel" type="RichTextLabel" parent="MarginContainer/Panel/MarginContainer/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
theme_override_font_sizes/normal_font_size = 22
@@ -50,8 +51,8 @@ theme_override_font_sizes/bold_italics_font_size = 22
theme_override_font_sizes/mono_font_size = 22
bbcode_enabled = true
-[node name="back" type="Button" parent="Panel/MarginContainer/VBoxContainer"]
+[node name="back" type="Button" parent="MarginContainer/Panel/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "Back"
-[connection signal="pressed" from="Panel/MarginContainer/VBoxContainer/back" to="." method="_on_back_pressed"]
+[connection signal="pressed" from="MarginContainer/Panel/MarginContainer/VBoxContainer/back" to="." method="_on_back_pressed"]
diff --git a/client/menu/ingame_menu.tscn b/client/menu/ingame_menu.tscn
index 725735ea..ee537720 100644
--- a/client/menu/ingame_menu.tscn
+++ b/client/menu/ingame_menu.tscn
@@ -72,7 +72,6 @@ anchors_preset = 9
anchor_bottom = 1.0
offset_left = -400.0
offset_right = -90.0
-offset_bottom = 3888.0
grow_vertical = 2
[node name="Margin" type="MarginContainer" parent="Side"]
diff --git a/client/menu/main_menu.tscn b/client/menu/main_menu.tscn
index 76b55a1a..361be363 100644
--- a/client/menu/main_menu.tscn
+++ b/client/menu/main_menu.tscn
@@ -1,17 +1,11 @@
-[gd_scene load_steps=8 format=3 uid="uid://dbj8508whxgwv"]
+[gd_scene load_steps=7 format=3 uid="uid://dbj8508whxgwv"]
[ext_resource type="Theme" uid="uid://b0qmvo504e457" path="res://menu/theme/theme.tres" id="1_nlcpo"]
[ext_resource type="Script" path="res://menu/main_menu.gd" id="2_qot2j"]
-[ext_resource type="Shader" path="res://menu/blur_mix.gdshader" id="4_050xu"]
+[ext_resource type="Material" uid="uid://beea1pc5nt67r" path="res://menu/theme/dark_blur_material.tres" id="3_k58q5"]
[ext_resource type="FontFile" uid="uid://bo4vh5xkpvrh1" path="res://menu/theme/font-sansita-swashed.woff2" id="4_mfs30"]
-[sub_resource type="ShaderMaterial" id="ShaderMaterial_irdo3"]
-shader = ExtResource("4_050xu")
-shader_parameter/blur_amount = 3.5
-shader_parameter/mix_amount = 0.3
-shader_parameter/color_over = null
-
-[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_cm1nk"]
+[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ukani"]
[sub_resource type="FontVariation" id="FontVariation_htgmg"]
base_font = ExtResource("4_mfs30")
@@ -28,13 +22,13 @@ theme = ExtResource("1_nlcpo")
script = ExtResource("2_qot2j")
[node name="side" type="PanelContainer" parent="."]
-material = SubResource("ShaderMaterial_irdo3")
+material = ExtResource("3_k58q5")
layout_mode = 1
anchors_preset = 9
anchor_bottom = 1.0
offset_right = 340.0
grow_vertical = 2
-theme_override_styles/panel = SubResource("StyleBoxFlat_cm1nk")
+theme_override_styles/panel = SubResource("StyleBoxFlat_ukani")
[node name="margin" type="MarginContainer" parent="side"]
layout_mode = 2
diff --git a/client/menu/menu_background.gd b/client/menu/menu_background.gd
index 62c38baa..1d9322f3 100644
--- a/client/menu/menu_background.gd
+++ b/client/menu/menu_background.gd
@@ -19,7 +19,12 @@ extends Node3D
const NULLS = [null,null,null,null]
const BUCKETS = [[], ["floor","floor","floor","floor","tomato-crate", "raw-steak-crate"], ["table", "chair", "counter"], ["sink", "stove"]]
+@onready var environment: WorldEnvironment = $Environment
+
func _ready():
+ if !Global.on_vulkan():
+ environment.environment.tonemap_exposure = 0.25
+
for x in range(-10,11):
for y in range(-10,11):
var w = exp(-sqrt(x*x+y*y) * 0.15)
diff --git a/client/menu/menu_background.tscn b/client/menu/menu_background.tscn
index 5c29e4ac..dbc7010a 100644
--- a/client/menu/menu_background.tscn
+++ b/client/menu/menu_background.tscn
@@ -13,6 +13,9 @@ sky_material = SubResource("ProceduralSkyMaterial_uw50b")
background_mode = 1
background_color = Color(0.517035, 0.49506, 0.878906, 1)
sky = SubResource("Sky_utrtx")
+tonemap_mode = 2
+tonemap_exposure = 0.6
+tonemap_white = 0.9
ssao_enabled = true
[sub_resource type="QuadMesh" id="QuadMesh_fvp2p"]
@@ -53,7 +56,7 @@ transform = Transform3D(0.290334, 0.904946, -0.311092, 0.336606, 0.207739, 0.918
light_energy = 1.25
shadow_enabled = true
-[node name="env" type="WorldEnvironment" parent="."]
+[node name="Environment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_slkjl")
[node name="the-sky-tm" type="MeshInstance3D" parent="."]
diff --git a/client/menu/settings_menu.tscn b/client/menu/settings_menu.tscn
index 6ead9b8b..84da46f3 100644
--- a/client/menu/settings_menu.tscn
+++ b/client/menu/settings_menu.tscn
@@ -1,7 +1,8 @@
-[gd_scene load_steps=3 format=3 uid="uid://8ic77jmadadj"]
+[gd_scene load_steps=4 format=3 uid="uid://8ic77jmadadj"]
[ext_resource type="Theme" uid="uid://b0qmvo504e457" path="res://menu/theme/theme.tres" id="1_foq3a"]
[ext_resource type="Script" path="res://menu/settings_menu.gd" id="2_3hgm8"]
+[ext_resource type="Material" uid="uid://beea1pc5nt67r" path="res://menu/theme/dark_blur_material.tres" id="3_8nykw"]
[node name="SettingsMenu" type="Control"]
layout_mode = 3
@@ -20,12 +21,9 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
-theme_override_constants/margin_left = 40
-theme_override_constants/margin_top = 40
-theme_override_constants/margin_right = 40
-theme_override_constants/margin_bottom = 40
[node name="panel" type="Panel" parent="outer_gap"]
+material = ExtResource("3_8nykw")
layout_mode = 2
[node name="inner_gap" type="MarginContainer" parent="outer_gap/panel"]
diff --git a/client/menu/theme/dark_blur_material.tres b/client/menu/theme/dark_blur_material.tres
new file mode 100644
index 00000000..7adbd0e4
--- /dev/null
+++ b/client/menu/theme/dark_blur_material.tres
@@ -0,0 +1,9 @@
+[gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://beea1pc5nt67r"]
+
+[ext_resource type="Shader" path="res://menu/blur_mix.gdshader" id="1_cynu0"]
+
+[resource]
+shader = ExtResource("1_cynu0")
+shader_parameter/blur_amount = 3.5
+shader_parameter/mix_amount = 0.3
+shader_parameter/color_over = null
diff --git a/client/menu/theme/theme.tres b/client/menu/theme/theme.tres
index 96cdbb19..467aa6d9 100644
--- a/client/menu/theme/theme.tres
+++ b/client/menu/theme/theme.tres
@@ -1,4 +1,4 @@
-[gd_resource type="Theme" load_steps=9 format=3 uid="uid://b0qmvo504e457"]
+[gd_resource type="Theme" load_steps=10 format=3 uid="uid://b0qmvo504e457"]
[ext_resource type="FontFile" uid="uid://5ixo6b3bd3km" path="res://menu/theme/font-josefin-sans.woff2" id="1_f8qb0"]
[ext_resource type="StyleBox" uid="uid://b86kbd3pfkd5w" path="res://menu/theme/focus_style.tres" id="2_brg2c"]
@@ -39,6 +39,13 @@ grow_begin = 0.0
grow_end = 0.0
thickness = 3
+[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_sjrhv"]
+bg_color = Color(0, 0, 0, 0.6)
+corner_radius_top_left = 8
+corner_radius_top_right = 8
+corner_radius_bottom_right = 8
+corner_radius_bottom_left = 8
+
[sub_resource type="FontVariation" id="FontVariation_ff4nr"]
base_font = ExtResource("3_8u6ww")
variation_embolden = 0.7
@@ -57,6 +64,11 @@ Label/fonts/font = ExtResource("3_8u6ww")
LineEdit/styles/focus = ExtResource("2_brg2c")
LineEdit/styles/normal = SubResource("StyleBoxFlat_25x32")
LineEdit/styles/read_only = SubResource("StyleBoxFlat_25x32")
+MarginContainer/constants/margin_bottom = 32
+MarginContainer/constants/margin_left = 32
+MarginContainer/constants/margin_right = 32
+MarginContainer/constants/margin_top = 32
+Panel/styles/panel = SubResource("StyleBoxFlat_sjrhv")
RichTextLabel/fonts/bold_font = SubResource("FontVariation_ff4nr")
RichTextLabel/fonts/bold_italics_font = null
RichTextLabel/fonts/italics_font = null
diff --git a/client/project.godot b/client/project.godot
index e4198843..23b423fe 100644
--- a/client/project.godot
+++ b/client/project.godot
@@ -76,13 +76,13 @@ rotate_right={
rotate_up={
"deadzone": 0.1,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194320,"key_label":0,"unicode":0,"echo":false,"script":null)
-, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":3,"axis_value":-1.0,"script":null)
+, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":3,"axis_value":1.0,"script":null)
]
}
rotate_down={
"deadzone": 0.1,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194322,"key_label":0,"unicode":0,"echo":false,"script":null)
-, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":3,"axis_value":1.0,"script":null)
+, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":3,"axis_value":-1.0,"script":null)
]
}
interact={