From 1d4948e5b44f7460323a06223ba5ac9a3be008f9 Mon Sep 17 00:00:00 2001 From: Gabriel Kaszewski Date: Thu, 21 Aug 2025 20:05:26 +0200 Subject: [PATCH] Update resource paths and refactor properties for consistency --- Mr. Brick Adventures.csproj | 136 ------------------ objects/entities/brick_player.tscn | 7 +- resources/collectables/big_coin.tres | 2 +- resources/collectables/big_treasure.tres | 2 +- resources/collectables/child.tres | 2 +- resources/collectables/coin.tres | 2 +- .../collectables/small_health_potion.tres | 2 +- resources/collectables/treasure.tres | 2 +- resources/skills/brick_throw.tres | 31 ++-- scenes/main_menu.tscn | 2 +- scripts/Resources/CollectableResource.cs | 2 +- 11 files changed, 28 insertions(+), 162 deletions(-) diff --git a/Mr. Brick Adventures.csproj b/Mr. Brick Adventures.csproj index 91104ef..8d43770 100644 --- a/Mr. Brick Adventures.csproj +++ b/Mr. Brick Adventures.csproj @@ -4,140 +4,4 @@ true Mr.BrickAdventures - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/objects/entities/brick_player.tscn b/objects/entities/brick_player.tscn index 78ba0b4..8b12c99 100644 --- a/objects/entities/brick_player.tscn +++ b/objects/entities/brick_player.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=48 format=3 uid="uid://bqi5s710xb1ju"] +[gd_scene load_steps=49 format=3 uid="uid://bqi5s710xb1ju"] [ext_resource type="Script" uid="uid://csel4s0e4g5uf" path="res://scripts/components/PlayerController.cs" id="1_yysbb"] [ext_resource type="Shader" uid="uid://bs4xvm4qkurpr" path="res://shaders/hit_flash.tres" id="2_lgb3u"] @@ -35,6 +35,7 @@ [ext_resource type="PackedScene" uid="uid://b12tppjkkqpt4" path="res://objects/fxs/hit_particles.tscn" id="28_jh5m0"] [ext_resource type="AudioStream" uid="uid://dyev46uqusimi" path="res://sfx/shoot.wav" id="32_x2b7c"] [ext_resource type="Script" uid="uid://d1ctdx52gskv1" path="res://scripts/components/ship_shooter.gd" id="34_gwc8i"] +[ext_resource type="Script" uid="uid://dev2q1228otm2" path="res://scripts/UI/ChargeProgressBar.cs" id="34_o1ihh"] [ext_resource type="PackedScene" uid="uid://dtem8jgcyoqar" path="res://objects/entities/green_laser.tscn" id="36_oxudy"] [ext_resource type="Script" uid="uid://diw6opv6yutgi" path="res://scripts/components/KillPlayerOutOfScreenComponent.cs" id="37_qec3q"] [ext_resource type="Script" uid="uid://3qy7rm28q66a" path="res://scripts/components/ProgressiveDamageComponent.cs" id="38_dhjci"] @@ -249,11 +250,13 @@ bus = &"sfx" stream = ExtResource("32_x2b7c") bus = &"sfx" -[node name="ChargingBarLayer" parent="." instance=ExtResource("28_3f5nm")] +[node name="ChargingBarLayer" parent="." node_paths=PackedStringArray("ProgressBar") instance=ExtResource("28_3f5nm")] offset_left = -17.0 offset_top = -30.0 offset_right = 23.0 offset_bottom = -20.0 +script = ExtResource("34_o1ihh") +ProgressBar = NodePath(".") [node name="HitParticles" parent="." instance=ExtResource("28_jh5m0")] process_material = SubResource("ParticleProcessMaterial_lgb3u") diff --git a/resources/collectables/big_coin.tres b/resources/collectables/big_coin.tres index 6d50230..ac377c8 100644 --- a/resources/collectables/big_coin.tres +++ b/resources/collectables/big_coin.tres @@ -1,6 +1,6 @@ [gd_resource type="Resource" load_steps=2 format=3 uid="uid://bsnr5v2b2mfsl"] -[ext_resource type="Script" uid="uid://gptsgaw3agkf" path="res://scripts/resources/CollectableResource.cs" id="1_wfbgp"] +[ext_resource type="Script" uid="uid://gptsgaw3agkf" path="res://scripts/Resources/CollectableResource.cs" id="1_wfbgp"] [resource] script = ExtResource("1_wfbgp") diff --git a/resources/collectables/big_treasure.tres b/resources/collectables/big_treasure.tres index 59d021a..d68a775 100644 --- a/resources/collectables/big_treasure.tres +++ b/resources/collectables/big_treasure.tres @@ -1,6 +1,6 @@ [gd_resource type="Resource" load_steps=2 format=3 uid="uid://b6xqotmke54x"] -[ext_resource type="Script" uid="uid://gptsgaw3agkf" path="res://scripts/resources/CollectableResource.cs" id="1_5mosu"] +[ext_resource type="Script" uid="uid://gptsgaw3agkf" path="res://scripts/Resources/CollectableResource.cs" id="1_5mosu"] [resource] script = ExtResource("1_5mosu") diff --git a/resources/collectables/child.tres b/resources/collectables/child.tres index db550b7..b8bc1c8 100644 --- a/resources/collectables/child.tres +++ b/resources/collectables/child.tres @@ -1,6 +1,6 @@ [gd_resource type="Resource" load_steps=2 format=3 uid="uid://b6apusc0jmi3x"] -[ext_resource type="Script" uid="uid://gptsgaw3agkf" path="res://scripts/resources/CollectableResource.cs" id="1_d8txc"] +[ext_resource type="Script" uid="uid://gptsgaw3agkf" path="res://scripts/Resources/CollectableResource.cs" id="1_d8txc"] [resource] script = ExtResource("1_d8txc") diff --git a/resources/collectables/coin.tres b/resources/collectables/coin.tres index 1fd82a5..e0e2646 100644 --- a/resources/collectables/coin.tres +++ b/resources/collectables/coin.tres @@ -1,6 +1,6 @@ [gd_resource type="Resource" load_steps=2 format=3 uid="uid://vql535ckoeqm"] -[ext_resource type="Script" uid="uid://gptsgaw3agkf" path="res://scripts/resources/CollectableResource.cs" id="1_7pquc"] +[ext_resource type="Script" uid="uid://gptsgaw3agkf" path="res://scripts/Resources/CollectableResource.cs" id="1_7pquc"] [resource] script = ExtResource("1_7pquc") diff --git a/resources/collectables/small_health_potion.tres b/resources/collectables/small_health_potion.tres index a75ae1f..c69e319 100644 --- a/resources/collectables/small_health_potion.tres +++ b/resources/collectables/small_health_potion.tres @@ -1,6 +1,6 @@ [gd_resource type="Resource" load_steps=2 format=3 uid="uid://2tl3yoh202no"] -[ext_resource type="Script" uid="uid://gptsgaw3agkf" path="res://scripts/resources/CollectableResource.cs" id="1_brkhb"] +[ext_resource type="Script" uid="uid://gptsgaw3agkf" path="res://scripts/Resources/CollectableResource.cs" id="1_brkhb"] [resource] script = ExtResource("1_brkhb") diff --git a/resources/collectables/treasure.tres b/resources/collectables/treasure.tres index 1087c86..3c72b0f 100644 --- a/resources/collectables/treasure.tres +++ b/resources/collectables/treasure.tres @@ -1,6 +1,6 @@ [gd_resource type="Resource" load_steps=2 format=3 uid="uid://bws2xldndlre1"] -[ext_resource type="Script" uid="uid://gptsgaw3agkf" path="res://scripts/resources/CollectableResource.cs" id="1_clntw"] +[ext_resource type="Script" uid="uid://gptsgaw3agkf" path="res://scripts/Resources/CollectableResource.cs" id="1_clntw"] [resource] script = ExtResource("1_clntw") diff --git a/resources/skills/brick_throw.tres b/resources/skills/brick_throw.tres index 661a69e..718b6f7 100644 --- a/resources/skills/brick_throw.tres +++ b/resources/skills/brick_throw.tres @@ -1,24 +1,23 @@ -[gd_resource type="Resource" script_class="SkillData" load_steps=5 format=3 uid="uid://dw5ee2lpeypnb"] +[gd_resource type="Resource" load_steps=4 format=3 uid="uid://dw5ee2lpeypnb"] [ext_resource type="PackedScene" uid="uid://coayig4dxelo2" path="res://objects/player_skills/brick_throw_skill.tscn" id="1_5gnea"] -[ext_resource type="Script" uid="uid://bya240e627ti6" path="res://scripts/resources/skill_data.gd" id="1_etxe2"] -[ext_resource type="Resource" uid="uid://br84dsfa3ti04" path="res://resources/throw_behaviors/tap_throw_input.tres" id="1_xwijh"] [ext_resource type="Texture2D" uid="uid://dxtdwgg3po0eg" path="res://sprites/brick_power_Skill_icon.png" id="2_yimbq"] +[ext_resource type="Script" uid="uid://d4crrfmbgxnqf" path="res://scripts/Resources/SkillData.cs" id="3_yimbq"] [resource] -script = ExtResource("1_etxe2") -name = "BRICK_POWER" -description = "BRICK_POWER_DESCRIPTION" -node = ExtResource("1_5gnea") -config = { +script = ExtResource("3_yimbq") +Name = "BRICK_POWER" +Description = "BRICK_POWER_DESCRIPTION" +Config = Dictionary[String, Variant]({ "fire_rate": 0.6, "player_controller": NodePath("."), -"throw_input_behavior": ExtResource("1_xwijh"), +"throw_input_behavior": null, "timer": NodePath("ThrowTimer") -} -cost = 50 -icon = ExtResource("2_yimbq") -type = 1 -is_active = false -level = 0 -max_level = 3 +}) +Cost = 50 +Icon = ExtResource("2_yimbq") +IsActive = false +Level = 1 +MaxLevel = 3 +Type = 0 +Node = ExtResource("1_5gnea") diff --git a/scenes/main_menu.tscn b/scenes/main_menu.tscn index b1dac87..2a08d12 100644 --- a/scenes/main_menu.tscn +++ b/scenes/main_menu.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=6 format=3 uid="uid://cl00e2ocomk3m"] -[ext_resource type="PackedScene" uid="uid://8b6ol5sssbgo" path="res://objects/ui/main_menu.tscn" id="1_ekxnf"] +[ext_resource type="PackedScene" path="res://objects/ui/main_menu.tscn" id="1_ekxnf"] [ext_resource type="PackedScene" uid="uid://y0ae6e7t70fj" path="res://objects/ui/settings_menu.tscn" id="2_bqqt6"] [ext_resource type="PackedScene" uid="uid://bwgmrcyj4mvu" path="res://objects/ui/credits.tscn" id="3_bqqt6"] [ext_resource type="PackedScene" uid="uid://b5fx1vdfky307" path="res://objects/ui/audio_settings.tscn" id="4_8ln24"] diff --git a/scripts/Resources/CollectableResource.cs b/scripts/Resources/CollectableResource.cs index 88b338b..96cb03a 100644 --- a/scripts/Resources/CollectableResource.cs +++ b/scripts/Resources/CollectableResource.cs @@ -4,6 +4,6 @@ namespace Mr.BrickAdventures.scripts.Resources; public partial class CollectableResource : Resource { - [Export] public Variant Amount { get; set; } = 0.0; + [Export] public float Amount { get; set; } = 0.0f; [Export] public CollectableType Type { get; set; } } \ No newline at end of file