From 993644b0a48dd213b6fdd21cc0bf054c2e1baab6 Mon Sep 17 00:00:00 2001 From: tpart Date: Sun, 6 Oct 2024 17:50:06 +0200 Subject: Organize theme files --- client/menu/theme/blur_material.tres | 11 --- client/menu/theme/dark_blur_material.tres | 11 --- client/menu/theme/font-azaret-mono.woff2 | Bin 46132 -> 0 bytes client/menu/theme/font-azaret-mono.woff2.import | 34 ------- client/menu/theme/font-josefin-sans.woff2 | Bin 47448 -> 0 bytes client/menu/theme/font-josefin-sans.woff2.import | 34 ------- client/menu/theme/font-sansita-swashed.woff2 | Bin 92808 -> 0 bytes .../menu/theme/font-sansita-swashed.woff2.import | 34 ------- client/menu/theme/fonts/font-azaret-mono.woff2 | Bin 0 -> 46132 bytes .../menu/theme/fonts/font-azaret-mono.woff2.import | 34 +++++++ client/menu/theme/fonts/font-josefin-sans.woff2 | Bin 0 -> 47448 bytes .../theme/fonts/font-josefin-sans.woff2.import | 34 +++++++ client/menu/theme/fonts/font-sansita-swashed.woff2 | Bin 0 -> 92808 bytes .../theme/fonts/font-sansita-swashed.woff2.import | 34 +++++++ client/menu/theme/materials/blur_material.tres | 11 +++ .../menu/theme/materials/dark_blur_material.tres | 11 +++ .../menu/theme/materials/grayscale_material.tres | 6 ++ client/menu/theme/paper.tres | 108 --------------------- client/menu/theme/paper_panel_style.tres | 6 -- client/menu/theme/paper_texture.tres | 14 --- client/menu/theme/shaders/blur_mix.gdshader | 34 +++++++ client/menu/theme/shaders/grayscale.gdshader | 25 +++++ client/menu/theme/style/paper_panel_style.tres | 6 ++ client/menu/theme/theme.tres | 67 ------------- client/menu/theme/theme/paper.tres | 108 +++++++++++++++++++++ client/menu/theme/theme/theme.tres | 67 +++++++++++++ 26 files changed, 370 insertions(+), 319 deletions(-) delete mode 100644 client/menu/theme/blur_material.tres delete mode 100644 client/menu/theme/dark_blur_material.tres delete mode 100644 client/menu/theme/font-azaret-mono.woff2 delete mode 100644 client/menu/theme/font-azaret-mono.woff2.import delete mode 100644 client/menu/theme/font-josefin-sans.woff2 delete mode 100644 client/menu/theme/font-josefin-sans.woff2.import delete mode 100644 client/menu/theme/font-sansita-swashed.woff2 delete mode 100644 client/menu/theme/font-sansita-swashed.woff2.import create mode 100644 client/menu/theme/fonts/font-azaret-mono.woff2 create mode 100644 client/menu/theme/fonts/font-azaret-mono.woff2.import create mode 100644 client/menu/theme/fonts/font-josefin-sans.woff2 create mode 100644 client/menu/theme/fonts/font-josefin-sans.woff2.import create mode 100644 client/menu/theme/fonts/font-sansita-swashed.woff2 create mode 100644 client/menu/theme/fonts/font-sansita-swashed.woff2.import create mode 100644 client/menu/theme/materials/blur_material.tres create mode 100644 client/menu/theme/materials/dark_blur_material.tres create mode 100644 client/menu/theme/materials/grayscale_material.tres delete mode 100644 client/menu/theme/paper.tres delete mode 100644 client/menu/theme/paper_panel_style.tres delete mode 100644 client/menu/theme/paper_texture.tres create mode 100644 client/menu/theme/shaders/blur_mix.gdshader create mode 100644 client/menu/theme/shaders/grayscale.gdshader create mode 100644 client/menu/theme/style/paper_panel_style.tres delete mode 100644 client/menu/theme/theme.tres create mode 100644 client/menu/theme/theme/paper.tres create mode 100644 client/menu/theme/theme/theme.tres (limited to 'client/menu/theme') diff --git a/client/menu/theme/blur_material.tres b/client/menu/theme/blur_material.tres deleted file mode 100644 index c035d230..00000000 --- a/client/menu/theme/blur_material.tres +++ /dev/null @@ -1,11 +0,0 @@ -[gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://2j8a0c0a2ta5"] - -[ext_resource type="Shader" path="res://menu/blur_mix.gdshader" id="1_d16rd"] - -[resource] -shader = ExtResource("1_d16rd") -shader_parameter/blur_amount = 3.5 -shader_parameter/mix_amount = 0.3 -shader_parameter/mix_amount_no_blur = 0.5 -shader_parameter/color_over = null -shader_parameter/enable_blur = false diff --git a/client/menu/theme/dark_blur_material.tres b/client/menu/theme/dark_blur_material.tres deleted file mode 100644 index daf74099..00000000 --- a/client/menu/theme/dark_blur_material.tres +++ /dev/null @@ -1,11 +0,0 @@ -[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.5 -shader_parameter/mix_amount_no_blur = 0.7 -shader_parameter/color_over = null -shader_parameter/enable_blur = null diff --git a/client/menu/theme/font-azaret-mono.woff2 b/client/menu/theme/font-azaret-mono.woff2 deleted file mode 100644 index c413b182..00000000 Binary files a/client/menu/theme/font-azaret-mono.woff2 and /dev/null differ diff --git a/client/menu/theme/font-azaret-mono.woff2.import b/client/menu/theme/font-azaret-mono.woff2.import deleted file mode 100644 index cafe1fbd..00000000 --- a/client/menu/theme/font-azaret-mono.woff2.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="font_data_dynamic" -type="FontFile" -uid="uid://bk704sc5gkrb3" -path="res://.godot/imported/font-azaret-mono.woff2-38a6d727215392526b2e0e5bff930be6.fontdata" - -[deps] - -source_file="res://menu/theme/font-azaret-mono.woff2" -dest_files=["res://.godot/imported/font-azaret-mono.woff2-38a6d727215392526b2e0e5bff930be6.fontdata"] - -[params] - -Rendering=null -antialiasing=1 -generate_mipmaps=false -disable_embedded_bitmaps=true -multichannel_signed_distance_field=false -msdf_pixel_range=8 -msdf_size=48 -allow_system_fallback=true -force_autohinter=false -hinting=1 -subpixel_positioning=1 -oversampling=0.0 -Fallbacks=null -fallbacks=[] -Compress=null -compress=true -preload=[] -language_support={} -script_support={} -opentype_features={} diff --git a/client/menu/theme/font-josefin-sans.woff2 b/client/menu/theme/font-josefin-sans.woff2 deleted file mode 100644 index dce2708f..00000000 Binary files a/client/menu/theme/font-josefin-sans.woff2 and /dev/null differ diff --git a/client/menu/theme/font-josefin-sans.woff2.import b/client/menu/theme/font-josefin-sans.woff2.import deleted file mode 100644 index 03e086da..00000000 --- a/client/menu/theme/font-josefin-sans.woff2.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="font_data_dynamic" -type="FontFile" -uid="uid://5ixo6b3bd3km" -path="res://.godot/imported/font-josefin-sans.woff2-e2c3f263d98e1132cfe6af3f4f0a3454.fontdata" - -[deps] - -source_file="res://menu/theme/font-josefin-sans.woff2" -dest_files=["res://.godot/imported/font-josefin-sans.woff2-e2c3f263d98e1132cfe6af3f4f0a3454.fontdata"] - -[params] - -Rendering=null -antialiasing=1 -generate_mipmaps=false -disable_embedded_bitmaps=true -multichannel_signed_distance_field=false -msdf_pixel_range=8 -msdf_size=48 -allow_system_fallback=true -force_autohinter=false -hinting=1 -subpixel_positioning=1 -oversampling=0.0 -Fallbacks=null -fallbacks=[] -Compress=null -compress=true -preload=[] -language_support={} -script_support={} -opentype_features={} diff --git a/client/menu/theme/font-sansita-swashed.woff2 b/client/menu/theme/font-sansita-swashed.woff2 deleted file mode 100644 index 5c665fb0..00000000 Binary files a/client/menu/theme/font-sansita-swashed.woff2 and /dev/null differ diff --git a/client/menu/theme/font-sansita-swashed.woff2.import b/client/menu/theme/font-sansita-swashed.woff2.import deleted file mode 100644 index 2d38716d..00000000 --- a/client/menu/theme/font-sansita-swashed.woff2.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="font_data_dynamic" -type="FontFile" -uid="uid://bo4vh5xkpvrh1" -path="res://.godot/imported/font-sansita-swashed.woff2-323b4a2ee0671aba6e17a6f073f706f3.fontdata" - -[deps] - -source_file="res://menu/theme/font-sansita-swashed.woff2" -dest_files=["res://.godot/imported/font-sansita-swashed.woff2-323b4a2ee0671aba6e17a6f073f706f3.fontdata"] - -[params] - -Rendering=null -antialiasing=1 -generate_mipmaps=false -disable_embedded_bitmaps=true -multichannel_signed_distance_field=false -msdf_pixel_range=8 -msdf_size=48 -allow_system_fallback=true -force_autohinter=false -hinting=1 -subpixel_positioning=1 -oversampling=0.0 -Fallbacks=null -fallbacks=[] -Compress=null -compress=true -preload=[] -language_support={} -script_support={} -opentype_features={} diff --git a/client/menu/theme/fonts/font-azaret-mono.woff2 b/client/menu/theme/fonts/font-azaret-mono.woff2 new file mode 100644 index 00000000..c413b182 Binary files /dev/null and b/client/menu/theme/fonts/font-azaret-mono.woff2 differ diff --git a/client/menu/theme/fonts/font-azaret-mono.woff2.import b/client/menu/theme/fonts/font-azaret-mono.woff2.import new file mode 100644 index 00000000..20a14c40 --- /dev/null +++ b/client/menu/theme/fonts/font-azaret-mono.woff2.import @@ -0,0 +1,34 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://bk704sc5gkrb3" +path="res://.godot/imported/font-azaret-mono.woff2-e51d1e7d25611225022685bd0a3a496f.fontdata" + +[deps] + +source_file="res://menu/theme/fonts/font-azaret-mono.woff2" +dest_files=["res://.godot/imported/font-azaret-mono.woff2-e51d1e7d25611225022685bd0a3a496f.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=1 +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/client/menu/theme/fonts/font-josefin-sans.woff2 b/client/menu/theme/fonts/font-josefin-sans.woff2 new file mode 100644 index 00000000..dce2708f Binary files /dev/null and b/client/menu/theme/fonts/font-josefin-sans.woff2 differ diff --git a/client/menu/theme/fonts/font-josefin-sans.woff2.import b/client/menu/theme/fonts/font-josefin-sans.woff2.import new file mode 100644 index 00000000..8334a70e --- /dev/null +++ b/client/menu/theme/fonts/font-josefin-sans.woff2.import @@ -0,0 +1,34 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://5ixo6b3bd3km" +path="res://.godot/imported/font-josefin-sans.woff2-3826b0a93d8b3bea37b981fd829e8139.fontdata" + +[deps] + +source_file="res://menu/theme/fonts/font-josefin-sans.woff2" +dest_files=["res://.godot/imported/font-josefin-sans.woff2-3826b0a93d8b3bea37b981fd829e8139.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=1 +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/client/menu/theme/fonts/font-sansita-swashed.woff2 b/client/menu/theme/fonts/font-sansita-swashed.woff2 new file mode 100644 index 00000000..5c665fb0 Binary files /dev/null and b/client/menu/theme/fonts/font-sansita-swashed.woff2 differ diff --git a/client/menu/theme/fonts/font-sansita-swashed.woff2.import b/client/menu/theme/fonts/font-sansita-swashed.woff2.import new file mode 100644 index 00000000..d35f5ae1 --- /dev/null +++ b/client/menu/theme/fonts/font-sansita-swashed.woff2.import @@ -0,0 +1,34 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://bo4vh5xkpvrh1" +path="res://.godot/imported/font-sansita-swashed.woff2-02fc401b56679ae18723df7cf0e77bd6.fontdata" + +[deps] + +source_file="res://menu/theme/fonts/font-sansita-swashed.woff2" +dest_files=["res://.godot/imported/font-sansita-swashed.woff2-02fc401b56679ae18723df7cf0e77bd6.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=1 +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/client/menu/theme/materials/blur_material.tres b/client/menu/theme/materials/blur_material.tres new file mode 100644 index 00000000..035351c5 --- /dev/null +++ b/client/menu/theme/materials/blur_material.tres @@ -0,0 +1,11 @@ +[gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://2j8a0c0a2ta5"] + +[ext_resource type="Shader" path="res://menu/theme/shaders/blur_mix.gdshader" id="1_d16rd"] + +[resource] +shader = ExtResource("1_d16rd") +shader_parameter/blur_amount = 3.5 +shader_parameter/mix_amount = 0.3 +shader_parameter/mix_amount_no_blur = 0.5 +shader_parameter/color_over = null +shader_parameter/enable_blur = false diff --git a/client/menu/theme/materials/dark_blur_material.tres b/client/menu/theme/materials/dark_blur_material.tres new file mode 100644 index 00000000..cee1aeca --- /dev/null +++ b/client/menu/theme/materials/dark_blur_material.tres @@ -0,0 +1,11 @@ +[gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://beea1pc5nt67r"] + +[ext_resource type="Shader" path="res://menu/theme/shaders/blur_mix.gdshader" id="1_cynu0"] + +[resource] +shader = ExtResource("1_cynu0") +shader_parameter/blur_amount = 3.5 +shader_parameter/mix_amount = 0.5 +shader_parameter/mix_amount_no_blur = 0.7 +shader_parameter/color_over = null +shader_parameter/enable_blur = null diff --git a/client/menu/theme/materials/grayscale_material.tres b/client/menu/theme/materials/grayscale_material.tres new file mode 100644 index 00000000..065356e5 --- /dev/null +++ b/client/menu/theme/materials/grayscale_material.tres @@ -0,0 +1,6 @@ +[gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://bplhkekj6rebp"] + +[ext_resource type="Shader" path="res://menu/theme/shaders/grayscale.gdshader" id="1_u0c2c"] + +[resource] +shader = ExtResource("1_u0c2c") diff --git a/client/menu/theme/paper.tres b/client/menu/theme/paper.tres deleted file mode 100644 index acf6699a..00000000 --- a/client/menu/theme/paper.tres +++ /dev/null @@ -1,108 +0,0 @@ -[gd_resource type="Theme" load_steps=17 format=3 uid="uid://ci2qajdoa1an1"] - -[ext_resource type="FontFile" uid="uid://bo4vh5xkpvrh1" path="res://menu/theme/font-sansita-swashed.woff2" id="1_koj1m"] -[ext_resource type="FontFile" uid="uid://5ixo6b3bd3km" path="res://menu/theme/font-josefin-sans.woff2" id="1_tc8bk"] - -[sub_resource type="FontVariation" id="FontVariation_pirkj"] -base_font = ExtResource("1_tc8bk") -variation_embolden = 0.5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_l5fao"] -bg_color = Color(0, 0, 0, 0.305882) -border_width_left = 2 -border_width_top = 2 -border_width_right = 2 -border_width_bottom = 2 -border_color = Color(0.819608, 0.92549, 1, 1) - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_3p3im"] -bg_color = Color(0, 0, 0, 0.145098) - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_xxmhf"] -bg_color = Color(0, 0, 0, 0.305882) - -[sub_resource type="SystemFont" id="SystemFont_3j83h"] - -[sub_resource type="FontVariation" id="FontVariation_8qr07"] -base_font = SubResource("SystemFont_3j83h") -variation_embolden = -0.44 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_rq65v"] -content_margin_left = 10.0 -bg_color = Color(1, 1, 1, 0) - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_st08c"] -content_margin_left = 10.0 -bg_color = Color(0, 0, 0, 0) -border_width_left = 1 -border_width_top = 1 -border_width_right = 1 -border_width_bottom = 1 -border_color = Color(0.300781, 0.300781, 0.300781, 1) -corner_radius_top_left = 5 -corner_radius_top_right = 5 -corner_radius_bottom_right = 5 -corner_radius_bottom_left = 5 - -[sub_resource type="StyleBoxLine" id="StyleBoxLine_8q7ob"] -thickness = 3 - -[sub_resource type="FontVariation" id="FontVariation_cx2xx"] -base_font = ExtResource("1_koj1m") - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_huhkg"] -content_margin_left = 10.0 -bg_color = Color(0.6, 0.6, 0.6, 0) -border_width_bottom = 2 -border_color = Color(0, 0, 0, 1) - -[sub_resource type="SystemFont" id="SystemFont_c2823"] - -[sub_resource type="FontVariation" id="FontVariation_c3ws0"] -base_font = SubResource("SystemFont_c2823") -variation_embolden = 0.53 - -[sub_resource type="FontVariation" id="FontVariation_ex8wc"] -base_font = SubResource("SystemFont_3j83h") -variation_embolden = -0.44 - -[resource] -Button/colors/font_color = Color(0.21875, 0.21875, 0.21875, 1) -Button/fonts/font = SubResource("FontVariation_pirkj") -Button/styles/focus = SubResource("StyleBoxFlat_l5fao") -Button/styles/hover = SubResource("StyleBoxFlat_3p3im") -Button/styles/normal = SubResource("StyleBoxFlat_xxmhf") -Button/styles/pressed = SubResource("StyleBoxFlat_xxmhf") -CheckBox/colors/font_color = Color(0, 0, 0, 1) -CheckBox/colors/font_disabled_color = Color(0, 0, 0, 1) -CheckBox/colors/font_focus_color = Color(0, 0, 0, 1) -CheckBox/colors/font_hover_color = Color(0, 0, 0, 1) -CheckBox/colors/font_hover_pressed_color = Color(0, 0, 0, 1) -CheckBox/colors/font_pressed_color = Color(0, 0, 0, 1) -CheckBox/constants/h_separation = 4 -CheckBox/fonts/font = SubResource("FontVariation_8qr07") -CheckBox/styles/disabled = SubResource("StyleBoxFlat_rq65v") -CheckBox/styles/focus = SubResource("StyleBoxFlat_st08c") -CheckBox/styles/hover = SubResource("StyleBoxFlat_rq65v") -CheckBox/styles/hover_pressed = SubResource("StyleBoxFlat_rq65v") -CheckBox/styles/normal = SubResource("StyleBoxFlat_rq65v") -CheckBox/styles/pressed = SubResource("StyleBoxFlat_rq65v") -HSeparator/constants/separation = 6 -HSeparator/styles/separator = SubResource("StyleBoxLine_8q7ob") -Label/colors/font_color = Color(0, 0, 0, 1) -LineEdit/colors/caret_color = Color(0, 0.0209808, 0.414062, 1) -LineEdit/colors/font_color = Color(0, 0.0196078, 0.415686, 1) -LineEdit/fonts/font = SubResource("FontVariation_cx2xx") -LineEdit/styles/focus = SubResource("StyleBoxFlat_huhkg") -LineEdit/styles/normal = SubResource("StyleBoxFlat_huhkg") -LineEdit/styles/read_only = SubResource("StyleBoxFlat_huhkg") -MarginContainer/constants/margin_bottom = 30 -MarginContainer/constants/margin_left = 70 -MarginContainer/constants/margin_right = 30 -MarginContainer/constants/margin_top = 30 -RichTextLabel/colors/default_color = Color(0, 0, 0, 1) -RichTextLabel/fonts/bold_font = SubResource("FontVariation_c3ws0") -RichTextLabel/fonts/bold_italics_font = null -RichTextLabel/fonts/italics_font = null -RichTextLabel/fonts/mono_font = null -RichTextLabel/fonts/normal_font = SubResource("FontVariation_ex8wc") diff --git a/client/menu/theme/paper_panel_style.tres b/client/menu/theme/paper_panel_style.tres deleted file mode 100644 index 5a8a4a78..00000000 --- a/client/menu/theme/paper_panel_style.tres +++ /dev/null @@ -1,6 +0,0 @@ -[gd_resource type="StyleBoxTexture" load_steps=2 format=3 uid="uid://bqhs5wtdp2oax"] - -[ext_resource type="Texture2D" uid="uid://chxkwohi56cxx" path="res://menu/theme/paper_texture.tres" id="1_u1kqj"] - -[resource] -texture = ExtResource("1_u1kqj") diff --git a/client/menu/theme/paper_texture.tres b/client/menu/theme/paper_texture.tres deleted file mode 100644 index 2c681244..00000000 --- a/client/menu/theme/paper_texture.tres +++ /dev/null @@ -1,14 +0,0 @@ -[gd_resource type="NoiseTexture2D" load_steps=3 format=3 uid="uid://chxkwohi56cxx"] - -[sub_resource type="Gradient" id="Gradient_pkrjd"] -colors = PackedColorArray(0.917969, 0.866454, 0.770122, 1, 0.832031, 0.781817, 0.666307, 1) - -[sub_resource type="FastNoiseLite" id="FastNoiseLite_k7p6k"] -noise_type = 0 -frequency = 0.0084 -domain_warp_enabled = true -domain_warp_frequency = -1.465 - -[resource] -color_ramp = SubResource("Gradient_pkrjd") -noise = SubResource("FastNoiseLite_k7p6k") diff --git a/client/menu/theme/shaders/blur_mix.gdshader b/client/menu/theme/shaders/blur_mix.gdshader new file mode 100644 index 00000000..7e95224d --- /dev/null +++ b/client/menu/theme/shaders/blur_mix.gdshader @@ -0,0 +1,34 @@ +/* + Hurry Curry! - a game about cooking + Copyright 2024 tpart + + 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 . + +*/ +shader_type canvas_item; + +uniform float blur_amount : hint_range(-2.0, 10.0); +uniform float mix_amount : hint_range(0.0, 1.0); +uniform float mix_amount_no_blur : hint_range(0.0, 1.0); +uniform vec4 color_over: source_color; +uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear_mipmap; +uniform bool enable_blur; + +void fragment() { + if (enable_blur) { + vec4 blurred = textureLod(SCREEN_TEXTURE, SCREEN_UV, blur_amount); + COLOR = mix(blurred, color_over, mix_amount); + } else { + COLOR = mix(texture(SCREEN_TEXTURE, SCREEN_UV), color_over, mix_amount_no_blur); + } +} \ No newline at end of file diff --git a/client/menu/theme/shaders/grayscale.gdshader b/client/menu/theme/shaders/grayscale.gdshader new file mode 100644 index 00000000..cc132c54 --- /dev/null +++ b/client/menu/theme/shaders/grayscale.gdshader @@ -0,0 +1,25 @@ +/* + 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 . + +*/ +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; +} diff --git a/client/menu/theme/style/paper_panel_style.tres b/client/menu/theme/style/paper_panel_style.tres new file mode 100644 index 00000000..bd49eea4 --- /dev/null +++ b/client/menu/theme/style/paper_panel_style.tres @@ -0,0 +1,6 @@ +[gd_resource type="StyleBoxTexture" load_steps=2 format=3 uid="uid://bqhs5wtdp2oax"] + +[ext_resource type="Texture2D" uid="uid://chxkwohi56cxx" path="res://menu/textures/paper_texture.tres" id="1_u1kqj"] + +[resource] +texture = ExtResource("1_u1kqj") diff --git a/client/menu/theme/theme.tres b/client/menu/theme/theme.tres deleted file mode 100644 index fff223c0..00000000 --- a/client/menu/theme/theme.tres +++ /dev/null @@ -1,67 +0,0 @@ -[gd_resource type="Theme" load_steps=11 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/style/focus_style.tres" id="1_x88rs"] -[ext_resource type="StyleBox" uid="uid://pi5uhe0lrgka" path="res://menu/theme/style/normal_style.tres" id="2_8fwoi"] -[ext_resource type="StyleBox" uid="uid://dua4jqje3704w" path="res://menu/theme/style/hover_style.tres" id="2_ye28t"] -[ext_resource type="FontFile" uid="uid://bo4vh5xkpvrh1" path="res://menu/theme/font-sansita-swashed.woff2" id="3_8u6ww"] -[ext_resource type="StyleBox" uid="uid://bcd4xcvtv7tws" path="res://menu/theme/style/panel_style.tres" id="4_42dlp"] - -[sub_resource type="StyleBoxLine" id="StyleBoxLine_emtvk"] -content_margin_top = 5.0 -content_margin_bottom = 5.0 -color = Color(1, 1, 1, 1) -grow_begin = 0.0 -grow_end = 0.0 -thickness = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_25x32"] -content_margin_left = 10.0 -content_margin_top = 10.0 -content_margin_right = 10.0 -content_margin_bottom = 10.0 -bg_color = Color(1, 1, 1, 0.0352941) -corner_radius_top_left = 5 -corner_radius_top_right = 5 -corner_radius_bottom_right = 5 -corner_radius_bottom_left = 5 - -[sub_resource type="FontVariation" id="FontVariation_ff4nr"] -base_font = ExtResource("3_8u6ww") -variation_embolden = 0.7 - -[sub_resource type="FontVariation" id="FontVariation_lyo8w"] -base_font = ExtResource("1_f8qb0") -variation_embolden = 1.25 -spacing_top = 5 - -[resource] -default_font = SubResource("FontVariation_lyo8w") -Button/font_sizes/font_size = 18 -Button/styles/disabled = ExtResource("2_8fwoi") -Button/styles/focus = ExtResource("1_x88rs") -Button/styles/hover = ExtResource("2_ye28t") -Button/styles/normal = ExtResource("2_8fwoi") -Button/styles/pressed = ExtResource("2_8fwoi") -CheckButton/font_sizes/font_size = 18 -CheckButton/styles/disabled = ExtResource("2_8fwoi") -CheckButton/styles/focus = ExtResource("1_x88rs") -CheckButton/styles/hover = ExtResource("2_ye28t") -CheckButton/styles/hover_pressed = ExtResource("2_ye28t") -CheckButton/styles/normal = ExtResource("2_8fwoi") -CheckButton/styles/pressed = ExtResource("2_8fwoi") -HSeparator/styles/separator = SubResource("StyleBoxLine_emtvk") -Label/font_sizes/font_size = 16 -LineEdit/styles/focus = ExtResource("1_x88rs") -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 = ExtResource("4_42dlp") -PanelContainer/styles/panel = ExtResource("4_42dlp") -RichTextLabel/fonts/bold_font = SubResource("FontVariation_ff4nr") -RichTextLabel/fonts/bold_italics_font = SubResource("FontVariation_lyo8w") -RichTextLabel/fonts/italics_font = SubResource("FontVariation_lyo8w") -RichTextLabel/fonts/mono_font = SubResource("FontVariation_lyo8w") diff --git a/client/menu/theme/theme/paper.tres b/client/menu/theme/theme/paper.tres new file mode 100644 index 00000000..6ff3bd10 --- /dev/null +++ b/client/menu/theme/theme/paper.tres @@ -0,0 +1,108 @@ +[gd_resource type="Theme" load_steps=17 format=3 uid="uid://ci2qajdoa1an1"] + +[ext_resource type="FontFile" uid="uid://bo4vh5xkpvrh1" path="res://menu/theme/fonts/font-sansita-swashed.woff2" id="1_koj1m"] +[ext_resource type="FontFile" uid="uid://5ixo6b3bd3km" path="res://menu/theme/fonts/font-josefin-sans.woff2" id="1_tc8bk"] + +[sub_resource type="FontVariation" id="FontVariation_pirkj"] +base_font = ExtResource("1_tc8bk") +variation_embolden = 0.5 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_l5fao"] +bg_color = Color(0, 0, 0, 0.305882) +border_width_left = 2 +border_width_top = 2 +border_width_right = 2 +border_width_bottom = 2 +border_color = Color(0.819608, 0.92549, 1, 1) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_3p3im"] +bg_color = Color(0, 0, 0, 0.145098) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_xxmhf"] +bg_color = Color(0, 0, 0, 0.305882) + +[sub_resource type="SystemFont" id="SystemFont_3j83h"] + +[sub_resource type="FontVariation" id="FontVariation_8qr07"] +base_font = SubResource("SystemFont_3j83h") +variation_embolden = -0.44 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_rq65v"] +content_margin_left = 10.0 +bg_color = Color(1, 1, 1, 0) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_st08c"] +content_margin_left = 10.0 +bg_color = Color(0, 0, 0, 0) +border_width_left = 1 +border_width_top = 1 +border_width_right = 1 +border_width_bottom = 1 +border_color = Color(0.300781, 0.300781, 0.300781, 1) +corner_radius_top_left = 5 +corner_radius_top_right = 5 +corner_radius_bottom_right = 5 +corner_radius_bottom_left = 5 + +[sub_resource type="StyleBoxLine" id="StyleBoxLine_8q7ob"] +thickness = 3 + +[sub_resource type="FontVariation" id="FontVariation_cx2xx"] +base_font = ExtResource("1_koj1m") + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_huhkg"] +content_margin_left = 10.0 +bg_color = Color(0.6, 0.6, 0.6, 0) +border_width_bottom = 2 +border_color = Color(0, 0, 0, 1) + +[sub_resource type="SystemFont" id="SystemFont_c2823"] + +[sub_resource type="FontVariation" id="FontVariation_c3ws0"] +base_font = SubResource("SystemFont_c2823") +variation_embolden = 0.53 + +[sub_resource type="FontVariation" id="FontVariation_ex8wc"] +base_font = SubResource("SystemFont_3j83h") +variation_embolden = -0.44 + +[resource] +Button/colors/font_color = Color(0.21875, 0.21875, 0.21875, 1) +Button/fonts/font = SubResource("FontVariation_pirkj") +Button/styles/focus = SubResource("StyleBoxFlat_l5fao") +Button/styles/hover = SubResource("StyleBoxFlat_3p3im") +Button/styles/normal = SubResource("StyleBoxFlat_xxmhf") +Button/styles/pressed = SubResource("StyleBoxFlat_xxmhf") +CheckBox/colors/font_color = Color(0, 0, 0, 1) +CheckBox/colors/font_disabled_color = Color(0, 0, 0, 1) +CheckBox/colors/font_focus_color = Color(0, 0, 0, 1) +CheckBox/colors/font_hover_color = Color(0, 0, 0, 1) +CheckBox/colors/font_hover_pressed_color = Color(0, 0, 0, 1) +CheckBox/colors/font_pressed_color = Color(0, 0, 0, 1) +CheckBox/constants/h_separation = 4 +CheckBox/fonts/font = SubResource("FontVariation_8qr07") +CheckBox/styles/disabled = SubResource("StyleBoxFlat_rq65v") +CheckBox/styles/focus = SubResource("StyleBoxFlat_st08c") +CheckBox/styles/hover = SubResource("StyleBoxFlat_rq65v") +CheckBox/styles/hover_pressed = SubResource("StyleBoxFlat_rq65v") +CheckBox/styles/normal = SubResource("StyleBoxFlat_rq65v") +CheckBox/styles/pressed = SubResource("StyleBoxFlat_rq65v") +HSeparator/constants/separation = 6 +HSeparator/styles/separator = SubResource("StyleBoxLine_8q7ob") +Label/colors/font_color = Color(0, 0, 0, 1) +LineEdit/colors/caret_color = Color(0, 0.0209808, 0.414062, 1) +LineEdit/colors/font_color = Color(0, 0.0196078, 0.415686, 1) +LineEdit/fonts/font = SubResource("FontVariation_cx2xx") +LineEdit/styles/focus = SubResource("StyleBoxFlat_huhkg") +LineEdit/styles/normal = SubResource("StyleBoxFlat_huhkg") +LineEdit/styles/read_only = SubResource("StyleBoxFlat_huhkg") +MarginContainer/constants/margin_bottom = 30 +MarginContainer/constants/margin_left = 70 +MarginContainer/constants/margin_right = 30 +MarginContainer/constants/margin_top = 30 +RichTextLabel/colors/default_color = Color(0, 0, 0, 1) +RichTextLabel/fonts/bold_font = SubResource("FontVariation_c3ws0") +RichTextLabel/fonts/bold_italics_font = null +RichTextLabel/fonts/italics_font = null +RichTextLabel/fonts/mono_font = null +RichTextLabel/fonts/normal_font = SubResource("FontVariation_ex8wc") diff --git a/client/menu/theme/theme/theme.tres b/client/menu/theme/theme/theme.tres new file mode 100644 index 00000000..9e2c4ac6 --- /dev/null +++ b/client/menu/theme/theme/theme.tres @@ -0,0 +1,67 @@ +[gd_resource type="Theme" load_steps=11 format=3 uid="uid://b0qmvo504e457"] + +[ext_resource type="FontFile" uid="uid://5ixo6b3bd3km" path="res://menu/theme/fonts/font-josefin-sans.woff2" id="1_f8qb0"] +[ext_resource type="StyleBox" uid="uid://b86kbd3pfkd5w" path="res://menu/theme/style/focus_style.tres" id="1_x88rs"] +[ext_resource type="StyleBox" uid="uid://pi5uhe0lrgka" path="res://menu/theme/style/normal_style.tres" id="2_8fwoi"] +[ext_resource type="StyleBox" uid="uid://dua4jqje3704w" path="res://menu/theme/style/hover_style.tres" id="2_ye28t"] +[ext_resource type="FontFile" uid="uid://bo4vh5xkpvrh1" path="res://menu/theme/fonts/font-sansita-swashed.woff2" id="3_8u6ww"] +[ext_resource type="StyleBox" uid="uid://bcd4xcvtv7tws" path="res://menu/theme/style/panel_style.tres" id="4_42dlp"] + +[sub_resource type="StyleBoxLine" id="StyleBoxLine_emtvk"] +content_margin_top = 5.0 +content_margin_bottom = 5.0 +color = Color(1, 1, 1, 1) +grow_begin = 0.0 +grow_end = 0.0 +thickness = 3 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_25x32"] +content_margin_left = 10.0 +content_margin_top = 10.0 +content_margin_right = 10.0 +content_margin_bottom = 10.0 +bg_color = Color(1, 1, 1, 0.0352941) +corner_radius_top_left = 5 +corner_radius_top_right = 5 +corner_radius_bottom_right = 5 +corner_radius_bottom_left = 5 + +[sub_resource type="FontVariation" id="FontVariation_ff4nr"] +base_font = ExtResource("3_8u6ww") +variation_embolden = 0.7 + +[sub_resource type="FontVariation" id="FontVariation_lyo8w"] +base_font = ExtResource("1_f8qb0") +variation_embolden = 1.25 +spacing_top = 5 + +[resource] +default_font = SubResource("FontVariation_lyo8w") +Button/font_sizes/font_size = 18 +Button/styles/disabled = ExtResource("2_8fwoi") +Button/styles/focus = ExtResource("1_x88rs") +Button/styles/hover = ExtResource("2_ye28t") +Button/styles/normal = ExtResource("2_8fwoi") +Button/styles/pressed = ExtResource("2_8fwoi") +CheckButton/font_sizes/font_size = 18 +CheckButton/styles/disabled = ExtResource("2_8fwoi") +CheckButton/styles/focus = ExtResource("1_x88rs") +CheckButton/styles/hover = ExtResource("2_ye28t") +CheckButton/styles/hover_pressed = ExtResource("2_ye28t") +CheckButton/styles/normal = ExtResource("2_8fwoi") +CheckButton/styles/pressed = ExtResource("2_8fwoi") +HSeparator/styles/separator = SubResource("StyleBoxLine_emtvk") +Label/font_sizes/font_size = 16 +LineEdit/styles/focus = ExtResource("1_x88rs") +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 = ExtResource("4_42dlp") +PanelContainer/styles/panel = ExtResource("4_42dlp") +RichTextLabel/fonts/bold_font = SubResource("FontVariation_ff4nr") +RichTextLabel/fonts/bold_italics_font = SubResource("FontVariation_lyo8w") +RichTextLabel/fonts/italics_font = SubResource("FontVariation_lyo8w") +RichTextLabel/fonts/mono_font = SubResource("FontVariation_lyo8w") -- cgit v1.2.3-70-g09d2 From 4ee632304449b77689bf075d3dbcd2466210e118 Mon Sep 17 00:00:00 2001 From: tpart Date: Sun, 6 Oct 2024 21:17:52 +0200 Subject: Reorganize map files; Fix location of some theme files --- client/map/items/item.gd | 2 +- client/map/palette.png | Bin 38079 -> 0 bytes client/map/palette.png.import | 36 ---------------- client/map/progress.gd | 24 ----------- client/map/progress.gdshader | 48 --------------------- client/map/progress.tscn | 19 -------- client/map/progress/progress.gd | 24 +++++++++++ client/map/progress/progress.gdshader | 48 +++++++++++++++++++++ client/map/progress/progress.tscn | 19 ++++++++ client/map/textures/palette.png | Bin 0 -> 38079 bytes client/map/textures/palette.png.import | 36 ++++++++++++++++ client/map/tiles/grass_side.res.depren | Bin 1430 -> 0 bytes client/menu/communicate/item/item_message.gd | 2 +- client/menu/menu_background.gdshader | 36 ---------------- client/menu/menu_background.tscn | 2 +- client/menu/printed.gdshader | 22 ---------- client/menu/printed_material.tres | 6 --- client/menu/rating/rating.tscn | 2 +- client/menu/theme/materials/printed_material.tres | 6 +++ client/menu/theme/shaders/menu_background.gdshader | 36 ++++++++++++++++ client/menu/theme/shaders/printed.gdshader | 22 ++++++++++ client/player/angry.tscn | 2 +- client/player/angry.webp | Bin 5022 -> 0 bytes client/player/angry.webp.import | 36 ---------------- client/player/effect.gd | 45 ------------------- client/player/effect.tscn | 36 ---------------- client/player/particles/angry/angry.webp | Bin 0 -> 5022 bytes client/player/particles/angry/angry.webp.import | 36 ++++++++++++++++ client/player/particles/effect.gd | 45 +++++++++++++++++++ client/player/particles/effect.tscn | 36 ++++++++++++++++ client/player/particles/satisfied/star.webp | Bin 0 -> 5818 bytes client/player/particles/satisfied/star.webp.import | 36 ++++++++++++++++ client/player/particles/satisfied/stars.tscn | 37 ++++++++++++++++ client/player/player.gd | 2 +- client/player/star.webp | Bin 5818 -> 0 bytes client/player/star.webp.import | 36 ---------------- client/player/stars.tscn | 37 ---------------- 37 files changed, 387 insertions(+), 387 deletions(-) delete mode 100644 client/map/palette.png delete mode 100644 client/map/palette.png.import delete mode 100644 client/map/progress.gd delete mode 100644 client/map/progress.gdshader delete mode 100644 client/map/progress.tscn create mode 100644 client/map/progress/progress.gd create mode 100644 client/map/progress/progress.gdshader create mode 100644 client/map/progress/progress.tscn create mode 100644 client/map/textures/palette.png create mode 100644 client/map/textures/palette.png.import delete mode 100644 client/map/tiles/grass_side.res.depren delete mode 100644 client/menu/menu_background.gdshader delete mode 100644 client/menu/printed.gdshader delete mode 100644 client/menu/printed_material.tres create mode 100644 client/menu/theme/materials/printed_material.tres create mode 100644 client/menu/theme/shaders/menu_background.gdshader create mode 100644 client/menu/theme/shaders/printed.gdshader delete mode 100644 client/player/angry.webp delete mode 100644 client/player/angry.webp.import delete mode 100644 client/player/effect.gd delete mode 100644 client/player/effect.tscn create mode 100644 client/player/particles/angry/angry.webp create mode 100644 client/player/particles/angry/angry.webp.import create mode 100644 client/player/particles/effect.gd create mode 100644 client/player/particles/effect.tscn create mode 100644 client/player/particles/satisfied/star.webp create mode 100644 client/player/particles/satisfied/star.webp.import create mode 100644 client/player/particles/satisfied/stars.tscn delete mode 100644 client/player/star.webp delete mode 100644 client/player/star.webp.import delete mode 100644 client/player/stars.tscn (limited to 'client/menu/theme') diff --git a/client/map/items/item.gd b/client/map/items/item.gd index 80aa4d6d..f7592d87 100644 --- a/client/map/items/item.gd +++ b/client/map/items/item.gd @@ -21,7 +21,7 @@ extends Node3D var owned_by: Node3D var base: Node3D = Node3D.new() -var progress_instance: ProgressBar3D = preload("res://map/progress.tscn").instantiate() +var progress_instance: ProgressBar3D = preload("res://map/progress/progress.tscn").instantiate() var take_sound: PlayRandom = preload("res://audio/play_random.tscn").instantiate() var put_sound: PlayRandom = preload("res://audio/play_random.tscn").instantiate() var ding_sound := AudioStreamPlayer3D.new() diff --git a/client/map/palette.png b/client/map/palette.png deleted file mode 100644 index e184fe5b..00000000 Binary files a/client/map/palette.png and /dev/null differ diff --git a/client/map/palette.png.import b/client/map/palette.png.import deleted file mode 100644 index 92840fcf..00000000 --- a/client/map/palette.png.import +++ /dev/null @@ -1,36 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://dgcs4wkxsxe6a" -path.s3tc="res://.godot/imported/palette.png-3a59900c2345cc4f645d84b8df0a18e7.s3tc.ctex" -path.etc2="res://.godot/imported/palette.png-3a59900c2345cc4f645d84b8df0a18e7.etc2.ctex" -metadata={ -"imported_formats": ["s3tc_bptc", "etc2_astc"], -"vram_texture": true -} - -[deps] - -source_file="res://map/palette.png" -dest_files=["res://.godot/imported/palette.png-3a59900c2345cc4f645d84b8df0a18e7.s3tc.ctex", "res://.godot/imported/palette.png-3a59900c2345cc4f645d84b8df0a18e7.etc2.ctex"] - -[params] - -compress/mode=2 -compress/high_quality=false -compress/lossy_quality=0.7 -compress/hdr_compression=1 -compress/normal_map=0 -compress/channel_pack=0 -mipmaps/generate=true -mipmaps/limit=-1 -roughness/mode=0 -roughness/src_normal="" -process/fix_alpha_border=true -process/premult_alpha=false -process/normal_map_invert_y=false -process/hdr_as_srgb=false -process/hdr_clamp_exposure=false -process/size_limit=0 -detect_3d/compress_to=0 diff --git a/client/map/progress.gd b/client/map/progress.gd deleted file mode 100644 index fc31408c..00000000 --- a/client/map/progress.gd +++ /dev/null @@ -1,24 +0,0 @@ -# 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 -# 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 . -# -class_name ProgressBar3D -extends MeshInstance3D - -func update(new_position: float, new_warn: bool): - var mat: ShaderMaterial = get_active_material(0) - mat.set_shader_parameter("progress", new_position) - mat.set_shader_parameter("bad", new_warn) diff --git a/client/map/progress.gdshader b/client/map/progress.gdshader deleted file mode 100644 index a5ebf575..00000000 --- a/client/map/progress.gdshader +++ /dev/null @@ -1,48 +0,0 @@ -/* - Hurry Curry! - a game about cooking - Copyright 2024 nokoe - Copyright 2024 tpart - - 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 . - -*/ -shader_type spatial; -render_mode unshaded; - -uniform float progress = 0.; -uniform bool bad = false; - -void fragment() { - 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() { - mat4 modified_model_view = VIEW_MATRIX * mat4( - INV_VIEW_MATRIX[0], - INV_VIEW_MATRIX[1], - INV_VIEW_MATRIX[2], - MODEL_MATRIX[3] - ); - MODELVIEW_MATRIX = modified_model_view; -} diff --git a/client/map/progress.tscn b/client/map/progress.tscn deleted file mode 100644 index 7a0629a1..00000000 --- a/client/map/progress.tscn +++ /dev/null @@ -1,19 +0,0 @@ -[gd_scene load_steps=5 format=3 uid="uid://4ewufm6tqhpb"] - -[ext_resource type="Shader" path="res://map/progress.gdshader" id="1_6f2a0"] -[ext_resource type="Script" path="res://map/progress.gd" id="2_bb3u3"] - -[sub_resource type="QuadMesh" id="QuadMesh_m0itj"] -size = Vector2(0.75, 0.1) - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_4k6cy"] -resource_local_to_scene = true -render_priority = 0 -shader = ExtResource("1_6f2a0") -shader_parameter/progress = 0.0 -shader_parameter/bad = false - -[node name="Progress" type="MeshInstance3D"] -mesh = SubResource("QuadMesh_m0itj") -surface_material_override/0 = SubResource("ShaderMaterial_4k6cy") -script = ExtResource("2_bb3u3") diff --git a/client/map/progress/progress.gd b/client/map/progress/progress.gd new file mode 100644 index 00000000..fc31408c --- /dev/null +++ b/client/map/progress/progress.gd @@ -0,0 +1,24 @@ +# 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 +# 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 . +# +class_name ProgressBar3D +extends MeshInstance3D + +func update(new_position: float, new_warn: bool): + var mat: ShaderMaterial = get_active_material(0) + mat.set_shader_parameter("progress", new_position) + mat.set_shader_parameter("bad", new_warn) diff --git a/client/map/progress/progress.gdshader b/client/map/progress/progress.gdshader new file mode 100644 index 00000000..a5ebf575 --- /dev/null +++ b/client/map/progress/progress.gdshader @@ -0,0 +1,48 @@ +/* + Hurry Curry! - a game about cooking + Copyright 2024 nokoe + Copyright 2024 tpart + + 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 . + +*/ +shader_type spatial; +render_mode unshaded; + +uniform float progress = 0.; +uniform bool bad = false; + +void fragment() { + 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() { + mat4 modified_model_view = VIEW_MATRIX * mat4( + INV_VIEW_MATRIX[0], + INV_VIEW_MATRIX[1], + INV_VIEW_MATRIX[2], + MODEL_MATRIX[3] + ); + MODELVIEW_MATRIX = modified_model_view; +} diff --git a/client/map/progress/progress.tscn b/client/map/progress/progress.tscn new file mode 100644 index 00000000..7f2ec175 --- /dev/null +++ b/client/map/progress/progress.tscn @@ -0,0 +1,19 @@ +[gd_scene load_steps=5 format=3 uid="uid://4ewufm6tqhpb"] + +[ext_resource type="Shader" path="res://map/progress/progress.gdshader" id="1_6f2a0"] +[ext_resource type="Script" path="res://map/progress/progress.gd" id="2_bb3u3"] + +[sub_resource type="QuadMesh" id="QuadMesh_m0itj"] +size = Vector2(0.75, 0.1) + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_4k6cy"] +resource_local_to_scene = true +render_priority = 0 +shader = ExtResource("1_6f2a0") +shader_parameter/progress = 0.0 +shader_parameter/bad = false + +[node name="Progress" type="MeshInstance3D"] +mesh = SubResource("QuadMesh_m0itj") +surface_material_override/0 = SubResource("ShaderMaterial_4k6cy") +script = ExtResource("2_bb3u3") diff --git a/client/map/textures/palette.png b/client/map/textures/palette.png new file mode 100644 index 00000000..e184fe5b Binary files /dev/null and b/client/map/textures/palette.png differ diff --git a/client/map/textures/palette.png.import b/client/map/textures/palette.png.import new file mode 100644 index 00000000..97dc821b --- /dev/null +++ b/client/map/textures/palette.png.import @@ -0,0 +1,36 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dgcs4wkxsxe6a" +path.s3tc="res://.godot/imported/palette.png-7d1d158ba6a12563fba40a96786b0940.s3tc.ctex" +path.etc2="res://.godot/imported/palette.png-7d1d158ba6a12563fba40a96786b0940.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://map/textures/palette.png" +dest_files=["res://.godot/imported/palette.png-7d1d158ba6a12563fba40a96786b0940.s3tc.ctex", "res://.godot/imported/palette.png-7d1d158ba6a12563fba40a96786b0940.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=true +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/client/map/tiles/grass_side.res.depren b/client/map/tiles/grass_side.res.depren deleted file mode 100644 index 3116171f..00000000 Binary files a/client/map/tiles/grass_side.res.depren and /dev/null differ diff --git a/client/menu/communicate/item/item_message.gd b/client/menu/communicate/item/item_message.gd index 17d2a629..dfbaf232 100644 --- a/client/menu/communicate/item/item_message.gd +++ b/client/menu/communicate/item/item_message.gd @@ -17,7 +17,7 @@ class_name ItemMessage extends Control -const PRINTED_MAT := preload("res://menu/printed_material.tres") +const PRINTED_MAT := preload("res://menu/theme/materials/printed_material.tres") @export var enable_rotation := true @export var enable_grayscale := false diff --git a/client/menu/menu_background.gdshader b/client/menu/menu_background.gdshader deleted file mode 100644 index 91b94601..00000000 --- a/client/menu/menu_background.gdshader +++ /dev/null @@ -1,36 +0,0 @@ -/* - Hurry Curry! - a game about cooking - Copyright 2024 metamuffin - - 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 . - -*/ -shader_type spatial; -render_mode unshaded; - -uniform sampler2D noise : source_color; -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); -} diff --git a/client/menu/menu_background.tscn b/client/menu/menu_background.tscn index 19f0d506..c8cd7c53 100644 --- a/client/menu/menu_background.tscn +++ b/client/menu/menu_background.tscn @@ -2,7 +2,7 @@ [ext_resource type="Script" path="res://menu/menu_background.gd" id="1_ijsg0"] [ext_resource type="Script" path="res://map/auto_setup/environment_setup.gd" id="2_rkilw"] -[ext_resource type="Shader" path="res://menu/menu_background.gdshader" id="3_5mp8y"] +[ext_resource type="Shader" path="res://menu/theme/shaders/menu_background.gdshader" id="3_5mp8y"] [ext_resource type="PackedScene" uid="uid://b4gone8fu53r7" path="res://map/map.tscn" id="3_p80a7"] [sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_uw50b"] diff --git a/client/menu/printed.gdshader b/client/menu/printed.gdshader deleted file mode 100644 index 3b35faa8..00000000 --- a/client/menu/printed.gdshader +++ /dev/null @@ -1,22 +0,0 @@ -/* - Hurry Curry! - a game about cooking - Copyright 2024 metamuffin - - 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 . - -*/ -shader_type canvas_item; - -void fragment() { - COLOR = floor(COLOR*5.)/5.; -} diff --git a/client/menu/printed_material.tres b/client/menu/printed_material.tres deleted file mode 100644 index 595248fd..00000000 --- a/client/menu/printed_material.tres +++ /dev/null @@ -1,6 +0,0 @@ -[gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://dogdyoqrmy6ft"] - -[ext_resource type="Shader" path="res://menu/printed.gdshader" id="1_v4ily"] - -[resource] -shader = ExtResource("1_v4ily") diff --git a/client/menu/rating/rating.tscn b/client/menu/rating/rating.tscn index dc4ed714..a1f48c64 100644 --- a/client/menu/rating/rating.tscn +++ b/client/menu/rating/rating.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=12 format=3 uid="uid://buu3cdpigs8qq"] -[ext_resource type="Texture2D" uid="uid://b10goh4dsa3b0" path="res://player/star.webp" id="1_7qv7r"] +[ext_resource type="Texture2D" uid="uid://b10goh4dsa3b0" path="res://player/particles/satisfied/star.webp" id="1_7qv7r"] [ext_resource type="Shader" path="res://menu/rating/desaturate.gdshader" id="1_pddsm"] [ext_resource type="Theme" uid="uid://b0qmvo504e457" path="res://menu/theme/theme/theme.tres" id="1_uwajf"] [ext_resource type="Script" path="res://menu/rating/rating.gd" id="2_cq0se"] diff --git a/client/menu/theme/materials/printed_material.tres b/client/menu/theme/materials/printed_material.tres new file mode 100644 index 00000000..5695d5a5 --- /dev/null +++ b/client/menu/theme/materials/printed_material.tres @@ -0,0 +1,6 @@ +[gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://dogdyoqrmy6ft"] + +[ext_resource type="Shader" path="res://menu/theme/shaders/printed.gdshader" id="1_sevww"] + +[resource] +shader = ExtResource("1_sevww") diff --git a/client/menu/theme/shaders/menu_background.gdshader b/client/menu/theme/shaders/menu_background.gdshader new file mode 100644 index 00000000..91b94601 --- /dev/null +++ b/client/menu/theme/shaders/menu_background.gdshader @@ -0,0 +1,36 @@ +/* + Hurry Curry! - a game about cooking + Copyright 2024 metamuffin + + 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 . + +*/ +shader_type spatial; +render_mode unshaded; + +uniform sampler2D noise : source_color; +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); +} diff --git a/client/menu/theme/shaders/printed.gdshader b/client/menu/theme/shaders/printed.gdshader new file mode 100644 index 00000000..3b35faa8 --- /dev/null +++ b/client/menu/theme/shaders/printed.gdshader @@ -0,0 +1,22 @@ +/* + Hurry Curry! - a game about cooking + Copyright 2024 metamuffin + + 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 . + +*/ +shader_type canvas_item; + +void fragment() { + COLOR = floor(COLOR*5.)/5.; +} diff --git a/client/player/angry.tscn b/client/player/angry.tscn index 56fa4d05..c8f82ab6 100644 --- a/client/player/angry.tscn +++ b/client/player/angry.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=6 format=3 uid="uid://cvty1rwt52anq"] -[ext_resource type="Texture2D" uid="uid://unjbxplj845n" path="res://player/angry.webp" id="1_5op6v"] +[ext_resource type="Texture2D" uid="uid://unjbxplj845n" path="res://player/particles/angry/angry.webp" id="1_5op6v"] [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ysmnk"] transparency = 1 diff --git a/client/player/angry.webp b/client/player/angry.webp deleted file mode 100644 index 866ba92c..00000000 Binary files a/client/player/angry.webp and /dev/null differ diff --git a/client/player/angry.webp.import b/client/player/angry.webp.import deleted file mode 100644 index 2d622e73..00000000 --- a/client/player/angry.webp.import +++ /dev/null @@ -1,36 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://unjbxplj845n" -path.s3tc="res://.godot/imported/angry.webp-0f7d45c1cfc32a18650521cc19587d16.s3tc.ctex" -path.etc2="res://.godot/imported/angry.webp-0f7d45c1cfc32a18650521cc19587d16.etc2.ctex" -metadata={ -"imported_formats": ["s3tc_bptc", "etc2_astc"], -"vram_texture": true -} - -[deps] - -source_file="res://player/angry.webp" -dest_files=["res://.godot/imported/angry.webp-0f7d45c1cfc32a18650521cc19587d16.s3tc.ctex", "res://.godot/imported/angry.webp-0f7d45c1cfc32a18650521cc19587d16.etc2.ctex"] - -[params] - -compress/mode=2 -compress/high_quality=false -compress/lossy_quality=0.7 -compress/hdr_compression=1 -compress/normal_map=0 -compress/channel_pack=0 -mipmaps/generate=true -mipmaps/limit=-1 -roughness/mode=0 -roughness/src_normal="" -process/fix_alpha_border=true -process/premult_alpha=false -process/normal_map_invert_y=false -process/hdr_as_srgb=false -process/hdr_clamp_exposure=false -process/size_limit=0 -detect_3d/compress_to=0 diff --git a/client/player/effect.gd b/client/player/effect.gd deleted file mode 100644 index 00c95441..00000000 --- a/client/player/effect.gd +++ /dev/null @@ -1,45 +0,0 @@ -# Hurry Curry! - a game about cooking -# Copyright 2024 tpart -# 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 . -# -class_name Effect -extends Node3D - -@onready var success = $Success -@onready var failure = $Failure -@onready var angry_grunt: PlayRandom = $AngryGrunt -@onready var stars = $Stars -@onready var angry = $Angry - - -func set_effect(e: String): - clear_effect() - match e: - "satisfied": - stars.emitting = true - success.play() - "angry": - angry.emitting = true - angry_grunt.play_random() - failure.play() - _: - push_warning("effect %s unknown" % e) - -func clear_effect(): - stars.emitting = false - success.stop() - angry.emitting = false - angry_grunt.stop_all() - failure.stop() diff --git a/client/player/effect.tscn b/client/player/effect.tscn deleted file mode 100644 index a360d1a8..00000000 --- a/client/player/effect.tscn +++ /dev/null @@ -1,36 +0,0 @@ -[gd_scene load_steps=9 format=3 uid="uid://dn2ne30t81ame"] - -[ext_resource type="Script" path="res://player/effect.gd" id="1_aqsk6"] -[ext_resource type="PackedScene" uid="uid://yaed1vnhd0aa" path="res://player/stars.tscn" id="2_shb5l"] -[ext_resource type="AudioStream" uid="uid://camy77x26mmpv" path="res://menu/sounds/success.ogg" id="3_favyn"] -[ext_resource type="AudioStream" uid="uid://cv4isy6po6pqd" path="res://menu/sounds/failure.ogg" id="4_j38qf"] -[ext_resource type="PackedScene" uid="uid://cvty1rwt52anq" path="res://player/angry.tscn" id="4_uxxex"] -[ext_resource type="Script" path="res://audio/play_random.gd" id="5_t2upj"] -[ext_resource type="AudioStream" uid="uid://c3gatgrsb0npf" path="res://player/sounds/angry1.ogg" id="6_ou7uy"] -[ext_resource type="AudioStream" uid="uid://cty282m6ckt62" path="res://player/sounds/angry2.ogg" id="7_r21iy"] - -[node name="Effect" type="Node3D"] -script = ExtResource("1_aqsk6") - -[node name="Stars" parent="." instance=ExtResource("2_shb5l")] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0) - -[node name="Success" type="AudioStreamPlayer" parent="."] -stream = ExtResource("3_favyn") - -[node name="Failure" type="AudioStreamPlayer" parent="."] -stream = ExtResource("4_j38qf") -volume_db = -8.0 - -[node name="Angry" parent="." instance=ExtResource("4_uxxex")] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0) - -[node name="AngryGrunt" type="Node3D" parent="."] -script = ExtResource("5_t2upj") -volume_db = -8.0 - -[node name="Angry1" type="AudioStreamPlayer3D" parent="AngryGrunt"] -stream = ExtResource("6_ou7uy") - -[node name="Angry2" type="AudioStreamPlayer3D" parent="AngryGrunt"] -stream = ExtResource("7_r21iy") diff --git a/client/player/particles/angry/angry.webp b/client/player/particles/angry/angry.webp new file mode 100644 index 00000000..866ba92c Binary files /dev/null and b/client/player/particles/angry/angry.webp differ diff --git a/client/player/particles/angry/angry.webp.import b/client/player/particles/angry/angry.webp.import new file mode 100644 index 00000000..3deee645 --- /dev/null +++ b/client/player/particles/angry/angry.webp.import @@ -0,0 +1,36 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://unjbxplj845n" +path.s3tc="res://.godot/imported/angry.webp-f649f66bf6a009b3b61480c4e451c61b.s3tc.ctex" +path.etc2="res://.godot/imported/angry.webp-f649f66bf6a009b3b61480c4e451c61b.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://player/particles/angry/angry.webp" +dest_files=["res://.godot/imported/angry.webp-f649f66bf6a009b3b61480c4e451c61b.s3tc.ctex", "res://.godot/imported/angry.webp-f649f66bf6a009b3b61480c4e451c61b.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=true +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/client/player/particles/effect.gd b/client/player/particles/effect.gd new file mode 100644 index 00000000..00c95441 --- /dev/null +++ b/client/player/particles/effect.gd @@ -0,0 +1,45 @@ +# Hurry Curry! - a game about cooking +# Copyright 2024 tpart +# 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 . +# +class_name Effect +extends Node3D + +@onready var success = $Success +@onready var failure = $Failure +@onready var angry_grunt: PlayRandom = $AngryGrunt +@onready var stars = $Stars +@onready var angry = $Angry + + +func set_effect(e: String): + clear_effect() + match e: + "satisfied": + stars.emitting = true + success.play() + "angry": + angry.emitting = true + angry_grunt.play_random() + failure.play() + _: + push_warning("effect %s unknown" % e) + +func clear_effect(): + stars.emitting = false + success.stop() + angry.emitting = false + angry_grunt.stop_all() + failure.stop() diff --git a/client/player/particles/effect.tscn b/client/player/particles/effect.tscn new file mode 100644 index 00000000..13423874 --- /dev/null +++ b/client/player/particles/effect.tscn @@ -0,0 +1,36 @@ +[gd_scene load_steps=9 format=3 uid="uid://dn2ne30t81ame"] + +[ext_resource type="Script" path="res://player/particles/effect.gd" id="1_aqsk6"] +[ext_resource type="PackedScene" uid="uid://yaed1vnhd0aa" path="res://player/particles/satisfied/stars.tscn" id="2_shb5l"] +[ext_resource type="AudioStream" uid="uid://camy77x26mmpv" path="res://menu/sounds/success.ogg" id="3_favyn"] +[ext_resource type="AudioStream" uid="uid://cv4isy6po6pqd" path="res://menu/sounds/failure.ogg" id="4_j38qf"] +[ext_resource type="PackedScene" uid="uid://cvty1rwt52anq" path="res://player/angry.tscn" id="4_uxxex"] +[ext_resource type="Script" path="res://audio/play_random.gd" id="5_t2upj"] +[ext_resource type="AudioStream" uid="uid://c3gatgrsb0npf" path="res://player/sounds/angry1.ogg" id="6_ou7uy"] +[ext_resource type="AudioStream" uid="uid://cty282m6ckt62" path="res://player/sounds/angry2.ogg" id="7_r21iy"] + +[node name="Effect" type="Node3D"] +script = ExtResource("1_aqsk6") + +[node name="Stars" parent="." instance=ExtResource("2_shb5l")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0) + +[node name="Success" type="AudioStreamPlayer" parent="."] +stream = ExtResource("3_favyn") + +[node name="Failure" type="AudioStreamPlayer" parent="."] +stream = ExtResource("4_j38qf") +volume_db = -8.0 + +[node name="Angry" parent="." instance=ExtResource("4_uxxex")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0) + +[node name="AngryGrunt" type="Node3D" parent="."] +script = ExtResource("5_t2upj") +volume_db = -8.0 + +[node name="Angry1" type="AudioStreamPlayer3D" parent="AngryGrunt"] +stream = ExtResource("6_ou7uy") + +[node name="Angry2" type="AudioStreamPlayer3D" parent="AngryGrunt"] +stream = ExtResource("7_r21iy") diff --git a/client/player/particles/satisfied/star.webp b/client/player/particles/satisfied/star.webp new file mode 100644 index 00000000..c1d2e8ff Binary files /dev/null and b/client/player/particles/satisfied/star.webp differ diff --git a/client/player/particles/satisfied/star.webp.import b/client/player/particles/satisfied/star.webp.import new file mode 100644 index 00000000..11d15c58 --- /dev/null +++ b/client/player/particles/satisfied/star.webp.import @@ -0,0 +1,36 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b10goh4dsa3b0" +path.s3tc="res://.godot/imported/star.webp-4edd9a951e46ba686b105839f622c981.s3tc.ctex" +path.etc2="res://.godot/imported/star.webp-4edd9a951e46ba686b105839f622c981.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://player/particles/satisfied/star.webp" +dest_files=["res://.godot/imported/star.webp-4edd9a951e46ba686b105839f622c981.s3tc.ctex", "res://.godot/imported/star.webp-4edd9a951e46ba686b105839f622c981.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=true +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/client/player/particles/satisfied/stars.tscn b/client/player/particles/satisfied/stars.tscn new file mode 100644 index 00000000..2bfaaec0 --- /dev/null +++ b/client/player/particles/satisfied/stars.tscn @@ -0,0 +1,37 @@ +[gd_scene load_steps=6 format=3 uid="uid://yaed1vnhd0aa"] + +[ext_resource type="Texture2D" uid="uid://b10goh4dsa3b0" path="res://player/particles/satisfied/star.webp" id="1_v8q3r"] + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_d8uy0"] +transparency = 1 +shading_mode = 0 +vertex_color_use_as_albedo = true +albedo_texture = ExtResource("1_v8q3r") +billboard_mode = 2 +billboard_keep_scale = true + +[sub_resource type="QuadMesh" id="QuadMesh_d0lru"] +material = SubResource("StandardMaterial3D_d8uy0") + +[sub_resource type="Curve" id="Curve_0rju1"] +_data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(0.51927, 1), 0.0, 0.0, 0, 0] +point_count = 2 + +[sub_resource type="Gradient" id="Gradient_lmymu"] +offsets = PackedFloat32Array(0, 0.711828, 1) +colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0) + +[node name="Stars" type="CPUParticles3D"] +emitting = false +amount = 5 +lifetime = 2.0 +one_shot = true +explosiveness = 1.0 +mesh = SubResource("QuadMesh_d0lru") +direction = Vector3(0, 1, 0) +spread = 30.0 +gravity = Vector3(0, 0, 0) +initial_velocity_min = 1.0 +initial_velocity_max = 1.5 +scale_amount_curve = SubResource("Curve_0rju1") +color_ramp = SubResource("Gradient_lmymu") diff --git a/client/player/player.gd b/client/player/player.gd index f90b2b1b..1d7541fe 100644 --- a/client/player/player.gd +++ b/client/player/player.gd @@ -35,7 +35,7 @@ var movement_base: Node3D = Node3D.new() var character: Character = preload("res://player/character/character.tscn").instantiate() var chat_bubble: ChatBubble = preload("res://player/chat_bubble.tscn").instantiate() var item_bubble: ItemBubble = preload("res://player/item_bubble.tscn").instantiate() -var effect: Effect = preload("res://player/effect.tscn").instantiate() +var effect: Effect = preload("res://player/particles/effect.tscn").instantiate() var marker: Marker = preload("res://player/marker.tscn").instantiate() var marker_target = Vector3(0, 0, 0) diff --git a/client/player/star.webp b/client/player/star.webp deleted file mode 100644 index c1d2e8ff..00000000 Binary files a/client/player/star.webp and /dev/null differ diff --git a/client/player/star.webp.import b/client/player/star.webp.import deleted file mode 100644 index ff84dd75..00000000 --- a/client/player/star.webp.import +++ /dev/null @@ -1,36 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://b10goh4dsa3b0" -path.s3tc="res://.godot/imported/star.webp-4786407830caaa0c9666a30a1d4a05f7.s3tc.ctex" -path.etc2="res://.godot/imported/star.webp-4786407830caaa0c9666a30a1d4a05f7.etc2.ctex" -metadata={ -"imported_formats": ["s3tc_bptc", "etc2_astc"], -"vram_texture": true -} - -[deps] - -source_file="res://player/star.webp" -dest_files=["res://.godot/imported/star.webp-4786407830caaa0c9666a30a1d4a05f7.s3tc.ctex", "res://.godot/imported/star.webp-4786407830caaa0c9666a30a1d4a05f7.etc2.ctex"] - -[params] - -compress/mode=2 -compress/high_quality=false -compress/lossy_quality=0.7 -compress/hdr_compression=1 -compress/normal_map=0 -compress/channel_pack=0 -mipmaps/generate=true -mipmaps/limit=-1 -roughness/mode=0 -roughness/src_normal="" -process/fix_alpha_border=true -process/premult_alpha=false -process/normal_map_invert_y=false -process/hdr_as_srgb=false -process/hdr_clamp_exposure=false -process/size_limit=0 -detect_3d/compress_to=0 diff --git a/client/player/stars.tscn b/client/player/stars.tscn deleted file mode 100644 index 5c96c291..00000000 --- a/client/player/stars.tscn +++ /dev/null @@ -1,37 +0,0 @@ -[gd_scene load_steps=6 format=3 uid="uid://yaed1vnhd0aa"] - -[ext_resource type="Texture2D" uid="uid://b10goh4dsa3b0" path="res://player/star.webp" id="1_v8q3r"] - -[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_d8uy0"] -transparency = 1 -shading_mode = 0 -vertex_color_use_as_albedo = true -albedo_texture = ExtResource("1_v8q3r") -billboard_mode = 2 -billboard_keep_scale = true - -[sub_resource type="QuadMesh" id="QuadMesh_d0lru"] -material = SubResource("StandardMaterial3D_d8uy0") - -[sub_resource type="Curve" id="Curve_0rju1"] -_data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(0.51927, 1), 0.0, 0.0, 0, 0] -point_count = 2 - -[sub_resource type="Gradient" id="Gradient_lmymu"] -offsets = PackedFloat32Array(0, 0.711828, 1) -colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0) - -[node name="Stars" type="CPUParticles3D"] -emitting = false -amount = 5 -lifetime = 2.0 -one_shot = true -explosiveness = 1.0 -mesh = SubResource("QuadMesh_d0lru") -direction = Vector3(0, 1, 0) -spread = 30.0 -gravity = Vector3(0, 0, 0) -initial_velocity_min = 1.0 -initial_velocity_max = 1.5 -scale_amount_curve = SubResource("Curve_0rju1") -color_ramp = SubResource("Gradient_lmymu") -- cgit v1.2.3-70-g09d2 From f0d6634e0786106969730b78d5d177e12cd3808d Mon Sep 17 00:00:00 2001 From: tpart Date: Thu, 10 Oct 2024 17:08:26 +0200 Subject: Remove tab container panel background (Fixes #163) --- client/menu/theme/theme/theme.tres | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'client/menu/theme') diff --git a/client/menu/theme/theme/theme.tres b/client/menu/theme/theme/theme.tres index 9e2c4ac6..b10c230a 100644 --- a/client/menu/theme/theme/theme.tres +++ b/client/menu/theme/theme/theme.tres @@ -1,4 +1,4 @@ -[gd_resource type="Theme" load_steps=11 format=3 uid="uid://b0qmvo504e457"] +[gd_resource type="Theme" load_steps=12 format=3 uid="uid://b0qmvo504e457"] [ext_resource type="FontFile" uid="uid://5ixo6b3bd3km" path="res://menu/theme/fonts/font-josefin-sans.woff2" id="1_f8qb0"] [ext_resource type="StyleBox" uid="uid://b86kbd3pfkd5w" path="res://menu/theme/style/focus_style.tres" id="1_x88rs"] @@ -35,6 +35,8 @@ base_font = ExtResource("1_f8qb0") variation_embolden = 1.25 spacing_top = 5 +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_or5ri"] + [resource] default_font = SubResource("FontVariation_lyo8w") Button/font_sizes/font_size = 18 @@ -65,3 +67,4 @@ RichTextLabel/fonts/bold_font = SubResource("FontVariation_ff4nr") RichTextLabel/fonts/bold_italics_font = SubResource("FontVariation_lyo8w") RichTextLabel/fonts/italics_font = SubResource("FontVariation_lyo8w") RichTextLabel/fonts/mono_font = SubResource("FontVariation_lyo8w") +TabContainer/styles/panel = SubResource("StyleBoxEmpty_or5ri") -- cgit v1.2.3-70-g09d2