Update resource files and add new tileset; remove inactive properties and upgrade paths

This commit is contained in:
2025-10-13 21:09:05 +02:00
parent 3d8694377a
commit 00772b6330
18 changed files with 4110 additions and 526 deletions

View File

@@ -1,6 +1,4 @@
using Godot; using Godot;
using Limbo.Console.Sharp;
using Mr.BrickAdventures.scripts;
using Mr.BrickAdventures.scripts.components; using Mr.BrickAdventures.scripts.components;
namespace Mr.BrickAdventures.Autoloads; namespace Mr.BrickAdventures.Autoloads;
@@ -17,66 +15,42 @@ public partial class ConsoleManager : Node
_gameManager = GetNode<GameManager>("/root/GameManager"); _gameManager = GetNode<GameManager>("/root/GameManager");
_achievementManager = GetNode<AchievementManager>("/root/AchievementManager"); _achievementManager = GetNode<AchievementManager>("/root/AchievementManager");
_skillManager = GetNode<SkillManager>("/root/SkillManager"); _skillManager = GetNode<SkillManager>("/root/SkillManager");
RegisterConsoleCommands();
} }
public override void _ExitTree()
{
UnregisterConsoleCommands();
}
[ConsoleCommand("add_coins", "Adds a specified amount of coins to the player's total.")]
private void AddCoinsCommand(int amount) private void AddCoinsCommand(int amount)
{ {
_gameManager.AddCoins(amount); _gameManager.AddCoins(amount);
LimboConsole.Info($"Increased coins by {amount}. Total coins: {_gameManager.GetCoins()}");
} }
[ConsoleCommand("set_coins", "Sets the player's total coins to a specified amount.")]
private void SetCoinsCommand(int amount) private void SetCoinsCommand(int amount)
{ {
_gameManager.SetCoins(amount); _gameManager.SetCoins(amount);
LimboConsole.Info($"Set coins to {amount}. Total coins: {_gameManager.GetCoins()}");
} }
[ConsoleCommand("set_lives", "Sets the player's total lives to a specified amount.")]
private void SetLivesCommand(int amount) private void SetLivesCommand(int amount)
{ {
_gameManager.SetLives(amount); _gameManager.SetLives(amount);
LimboConsole.Info($"Set lives to {amount}.");
} }
[ConsoleCommand("add_lives", "Adds a specified amount of lives to the player's total.")]
private void AddLivesCommand(int amount) private void AddLivesCommand(int amount)
{ {
_gameManager.AddLives(amount); _gameManager.AddLives(amount);
LimboConsole.Info($"Increased lives by {amount}. Total lives: {_gameManager.GetLives()}");
} }
[ConsoleCommand("set_health", "Sets the player's health to a specified amount.")]
private void SetHealthCommand(float amount) private void SetHealthCommand(float amount)
{ {
var playerHealthComponent = _gameManager.Player.GetNode<HealthComponent>("HealthComponent"); var playerHealthComponent = _gameManager.Player.GetNode<HealthComponent>("HealthComponent");
if (playerHealthComponent != null) if (playerHealthComponent != null)
{ {
playerHealthComponent.Health = amount; playerHealthComponent.Health = amount;
LimboConsole.Info($"Set player health to {amount}.");
}
else
{
LimboConsole.Warn("Player HealthComponent not found.");
} }
} }
[ConsoleCommand("reset_session", "Resets the current session state.")]
private void ResetSessionCommand() private void ResetSessionCommand()
{ {
_gameManager.ResetCurrentSessionState(); _gameManager.ResetCurrentSessionState();
LimboConsole.Info("Current session state has been reset.");
} }
[ConsoleCommand("unlock_skill", "Unlocks and activates a skill by its name.")]
private void UnlockSkillCommand(string skillName) private void UnlockSkillCommand(string skillName)
{ {
if (!GetSkillManagement()) return; if (!GetSkillManagement()) return;
@@ -84,14 +58,12 @@ public partial class ConsoleManager : Node
var skill = _skillManager.GetSkillByName(skillName); var skill = _skillManager.GetSkillByName(skillName);
if (skill == null) if (skill == null)
{ {
LimboConsole.Warn($"Skill '{skillName}' not found.");
return; return;
} }
_gameManager.UnlockSkill(skill); _gameManager.UnlockSkill(skill);
_skillManager.ActivateSkill(skill); _skillManager.ActivateSkill(skill);
_skillUnlockerComponent.EmitSignal(SkillUnlockerComponent.SignalName.SkillUnlocked, skill); _skillUnlockerComponent.EmitSignal(SkillUnlockerComponent.SignalName.SkillUnlocked, skill);
LimboConsole.Info($"Skill '{skillName}' has been unlocked and activated.");
} }
private bool GetSkillManagement() private bool GetSkillManagement()
@@ -99,7 +71,6 @@ public partial class ConsoleManager : Node
var player = _gameManager.Player; var player = _gameManager.Player;
if (player == null || !IsInstanceValid(player)) if (player == null || !IsInstanceValid(player))
{ {
LimboConsole.Warn("Player node not found or is invalid.");
return false; return false;
} }
@@ -107,21 +78,17 @@ public partial class ConsoleManager : Node
if (_skillManager != null && _skillUnlockerComponent != null) return true; if (_skillManager != null && _skillUnlockerComponent != null) return true;
LimboConsole.Warn("SkillManager or SkillUnlockerComponent not found on the player.");
return false; return false;
} }
[ConsoleCommand("unlock_all_skills", "Unlocks and activates all available skills.")]
private void UnlockAllSkillsCommand() private void UnlockAllSkillsCommand()
{ {
if (!GetSkillManagement()) return; if (!GetSkillManagement()) return;
_skillUnlockerComponent.UnlockAllSkills(); _skillUnlockerComponent.UnlockAllSkills();
LimboConsole.Info("All skills have been unlocked and activated.");
} }
[ConsoleCommand("remove_skill", "Deactivates and removes a skill by its name.")]
private void RemoveSkillCommand(string skillName) private void RemoveSkillCommand(string skillName)
{ {
if (!GetSkillManagement()) return; if (!GetSkillManagement()) return;
@@ -129,16 +96,13 @@ public partial class ConsoleManager : Node
var skill = _skillManager.GetSkillByName(skillName); var skill = _skillManager.GetSkillByName(skillName);
if (skill == null) if (skill == null)
{ {
LimboConsole.Warn($"Skill '{skillName}' not found.");
return; return;
} }
_gameManager.RemoveSkill(skill.Name); _gameManager.RemoveSkill(skill.Name);
_skillManager.DeactivateSkill(skill); _skillManager.DeactivateSkill(skill);
LimboConsole.Info($"Skill '{skillName}' has been deactivated.");
} }
[ConsoleCommand("remove_all_skills", "Deactivates and removes all skills.")]
private void RemoveAllSkillsCommand() private void RemoveAllSkillsCommand()
{ {
if (!GetSkillManagement()) return; if (!GetSkillManagement()) return;
@@ -148,23 +112,18 @@ public partial class ConsoleManager : Node
_gameManager.RemoveSkill(skill.Name); _gameManager.RemoveSkill(skill.Name);
_skillManager.DeactivateSkill(skill); _skillManager.DeactivateSkill(skill);
} }
LimboConsole.Info("All skills have been deactivated.");
} }
[ConsoleCommand("next_level", "Advances the game to the next level.")]
private void GoToNextLevelCommand() private void GoToNextLevelCommand()
{ {
_gameManager.OnLevelComplete(); _gameManager.OnLevelComplete();
} }
[ConsoleCommand("unlock_achievement", "Unlocks an achievement by its ID.")]
private void UnlockAchievementCommand(string achievementId) private void UnlockAchievementCommand(string achievementId)
{ {
_achievementManager.UnlockAchievement(achievementId); _achievementManager.UnlockAchievement(achievementId);
LimboConsole.Info($"Attempted to unlock achievement '{achievementId}'.");
} }
[ConsoleCommand("reset_achievement", "Resets (locks) an achievement by its ID.")]
private void ResetAchievementCommand(string achievementId) private void ResetAchievementCommand(string achievementId)
{ {
_achievementManager.LockAchievement(achievementId); _achievementManager.LockAchievement(achievementId);

View File

@@ -1,4 +1,4 @@
<Project Sdk="Godot.NET.Sdk/4.4.1"> <Project Sdk="Godot.NET.Sdk/4.5.0">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net8.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<EnableDynamicLoading>true</EnableDynamicLoading> <EnableDynamicLoading>true</EnableDynamicLoading>
@@ -8,6 +8,5 @@
<PackageReference Include="Facepunch.Steamworks" Version="2.3.3" /> <PackageReference Include="Facepunch.Steamworks" Version="2.3.3" />
<PackageReference Include="Facepunch.Steamworks.Dlls" Version="2.3.2" /> <PackageReference Include="Facepunch.Steamworks.Dlls" Version="2.3.2" />
<PackageReference Include="Facepunch.Steamworks.Library" Version="2.3.3" /> <PackageReference Include="Facepunch.Steamworks.Library" Version="2.3.3" />
<PackageReference Include="LimboConsole.Sharp" Version="0.0.1-beta-008" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -19,7 +19,7 @@ config/version="in-dev"
run/main_scene="uid://cl00e2ocomk3m" run/main_scene="uid://cl00e2ocomk3m"
config/use_custom_user_dir=true config/use_custom_user_dir=true
config/custom_user_dir_name="MrBrickAdventures" config/custom_user_dir_name="MrBrickAdventures"
config/features=PackedStringArray("4.4", "C#", "GL Compatibility") config/features=PackedStringArray("4.5", "C#", "GL Compatibility")
run/max_fps=180 run/max_fps=180
boot_splash/bg_color=Color(0, 0, 0, 1) boot_splash/bg_color=Color(0, 0, 0, 1)
boot_splash/show_image=false boot_splash/show_image=false
@@ -80,6 +80,17 @@ movie_writer/fps=24
enabled=PackedStringArray("res://addons/dialogue_manager/plugin.cfg", "res://addons/limbo_console/plugin.cfg", "res://addons/phantom_camera/plugin.cfg") enabled=PackedStringArray("res://addons/dialogue_manager/plugin.cfg", "res://addons/limbo_console/plugin.cfg", "res://addons/phantom_camera/plugin.cfg")
[file_customization]
folder_colors={
"res://objects/": "red",
"res://objects/entities/": "yellow",
"res://resources/": "orange",
"res://scenes/": "purple",
"res://scripts/": "teal",
"res://sprites/": "green"
}
[global_group] [global_group]
coins="" coins=""
@@ -89,9 +100,9 @@ Collectables=""
[gui] [gui]
theme/default_font_antialiasing=0
theme/default_theme_scale=0.5 theme/default_theme_scale=0.5
theme/custom_font="res://fonts/PressStart2P-Regular.ttf" theme/custom_font="res://fonts/PressStart2P-Regular.ttf"
theme/default_font_antialiasing=0
[input] [input]

View File

@@ -17,9 +17,6 @@ metadata/_custom_type_script = "uid://dwb0e05pewcsn"
script = ExtResource("1_unqwr") script = ExtResource("1_unqwr")
Name = "BRICK_ARMOR" Name = "BRICK_ARMOR"
Description = "BRICK_ARMOR_DESCRIPTION" Description = "BRICK_ARMOR_DESCRIPTION"
IsActive = false
Level = 1
Type = 1
Node = ExtResource("1_aqcna") Node = ExtResource("1_aqcna")
Upgrades = Array[ExtResource("2_kqsqd")]([SubResource("Resource_xwv1u"), SubResource("Resource_xwv1u")]) Upgrades = Array[ExtResource("2_kqsqd")]([SubResource("Resource_xwv1u"), SubResource("Resource_xwv1u")])
metadata/_custom_type_script = "uid://d4crrfmbgxnqf" metadata/_custom_type_script = "uid://d4crrfmbgxnqf"

View File

@@ -26,8 +26,6 @@ metadata/_custom_type_script = "uid://dwb0e05pewcsn"
script = ExtResource("1_m360g") script = ExtResource("1_m360g")
Name = "BRICK_SHIELD" Name = "BRICK_SHIELD"
Description = "BRICK_SHIELD_DESCRIPTION" Description = "BRICK_SHIELD_DESCRIPTION"
IsActive = false
Level = 1
Type = 2 Type = 2
Node = ExtResource("1_xjknp") Node = ExtResource("1_xjknp")
Upgrades = Array[ExtResource("2_lr0w4")]([SubResource("Resource_mu2sy"), SubResource("Resource_5ab4a")]) Upgrades = Array[ExtResource("2_lr0w4")]([SubResource("Resource_mu2sy"), SubResource("Resource_5ab4a")])

View File

@@ -8,15 +8,12 @@
script = ExtResource("2_kywbf") script = ExtResource("2_kywbf")
Cost = 80 Cost = 80
Description = "" Description = ""
Properties = Dictionary[String, Variant]({})
metadata/_custom_type_script = "uid://dwb0e05pewcsn" metadata/_custom_type_script = "uid://dwb0e05pewcsn"
[resource] [resource]
script = ExtResource("1_p5qvt") script = ExtResource("1_p5qvt")
Name = "DOUBLE_JUMP" Name = "DOUBLE_JUMP"
Description = "DOUBLE_JUMP_DESCRIPTION" Description = "DOUBLE_JUMP_DESCRIPTION"
IsActive = false
Level = 1
Type = 2 Type = 2
Node = ExtResource("1_t7o84") Node = ExtResource("1_t7o84")
Upgrades = Array[ExtResource("2_kywbf")]([SubResource("Resource_0fn2n")]) Upgrades = Array[ExtResource("2_kywbf")]([SubResource("Resource_0fn2n")])

View File

@@ -8,15 +8,12 @@
script = ExtResource("2_tkhf7") script = ExtResource("2_tkhf7")
Cost = 300 Cost = 300
Description = "" Description = ""
Properties = Dictionary[String, Variant]({})
metadata/_custom_type_script = "uid://dwb0e05pewcsn" metadata/_custom_type_script = "uid://dwb0e05pewcsn"
[resource] [resource]
script = ExtResource("1_i1qac") script = ExtResource("1_i1qac")
Name = "GROUND_POUND_SKILL" Name = "GROUND_POUND_SKILL"
Description = "GROUND_POUND_SKILL_DESCRIPTION" Description = "GROUND_POUND_SKILL_DESCRIPTION"
IsActive = false
Level = 1
Type = 2 Type = 2
Node = ExtResource("1_auljr") Node = ExtResource("1_auljr")
Upgrades = Array[ExtResource("2_tkhf7")]([SubResource("Resource_upxa7")]) Upgrades = Array[ExtResource("2_tkhf7")]([SubResource("Resource_upxa7")])

View File

@@ -26,9 +26,6 @@ metadata/_custom_type_script = "uid://dwb0e05pewcsn"
script = ExtResource("1_g8qe3") script = ExtResource("1_g8qe3")
Name = "XRAY_VISION" Name = "XRAY_VISION"
Description = "XRAY_VISION_DESCRIPTION" Description = "XRAY_VISION_DESCRIPTION"
IsActive = false
Level = 1
Type = 1
Node = ExtResource("1_ax2d8") Node = ExtResource("1_ax2d8")
Upgrades = Array[ExtResource("2_o726x")]([SubResource("Resource_72ltj"), SubResource("Resource_2kdfi")]) Upgrades = Array[ExtResource("2_o726x")]([SubResource("Resource_72ltj"), SubResource("Resource_2kdfi")])
metadata/_custom_type_script = "uid://d4crrfmbgxnqf" metadata/_custom_type_script = "uid://d4crrfmbgxnqf"

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://btiaah4jcpqht"
path="res://.godot/imported/PS_Tileset_10_nes_extended.png-10092908d64a9b283078c9c31b7f7cc3.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://sprites/PS_Tileset_10_nes_extended.png"
dest_files=["res://.godot/imported/PS_Tileset_10_nes_extended.png-10092908d64a9b283078c9c31b7f7cc3.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 KiB

BIN
sprites/ppc-tileset.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

View File

@@ -2,22 +2,24 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://bfs4i3guqvk1d" uid="uid://cysarpu6snb2y"
path="res://.godot/imported/nestle.png-acabfd796145590e3624a1eec84d8be7.ctex" path="res://.godot/imported/ppc-tileset.png-9fa878d605ba142a07487f571cb041bd.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false
} }
[deps] [deps]
source_file="res://sprites/nestle.png" source_file="res://sprites/ppc-tileset.png"
dest_files=["res://.godot/imported/nestle.png-acabfd796145590e3624a1eec84d8be7.ctex"] dest_files=["res://.godot/imported/ppc-tileset.png-9fa878d605ba142a07487f571cb041bd.ctex"]
[params] [params]
compress/mode=0 compress/mode=0
compress/high_quality=false compress/high_quality=false
compress/lossy_quality=0.7 compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1 compress/hdr_compression=1
compress/normal_map=0 compress/normal_map=0
compress/channel_pack=0 compress/channel_pack=0
@@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1 mipmaps/limit=-1
roughness/mode=0 roughness/mode=0
roughness/src_normal="" roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true process/fix_alpha_border=true
process/premult_alpha=false process/premult_alpha=false
process/normal_map_invert_y=false process/normal_map_invert_y=false