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') 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