Add debug menu, add ability to load next floor or spawn item

This commit is contained in:
2025-04-09 22:45:00 -07:00
parent 40e7fd0ef2
commit a7381658f4
39 changed files with 411 additions and 210 deletions

View File

@@ -2,5 +2,5 @@
public interface IKillable public interface IKillable
{ {
public void Die(); public abstract void Die();
} }

View File

@@ -203,6 +203,11 @@ Load={
"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":10,"pressure":0.0,"pressed":true,"script":null) "events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":10,"pressure":0.0,"pressed":true,"script":null)
] ]
} }
Debug={
"deadzone": 0.2,
"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":4,"pressure":0.0,"pressed":true,"script":null)
]
}
[internationalization] [internationalization]

View File

@@ -87,7 +87,7 @@ public partial class Enemy : CharacterBody3D, IEnemy, IProvide<IEnemyLogic>
_lineOfSight.BodyEntered += LineOfSight_BodyEntered; _lineOfSight.BodyEntered += LineOfSight_BodyEntered;
} }
public void OnProcess(double delta) public override void _Process(double delta)
{ {
if (CurrentHP.Value <= 0) if (CurrentHP.Value <= 0)
return; return;
@@ -159,7 +159,7 @@ public partial class Enemy : CharacterBody3D, IEnemy, IProvide<IEnemyLogic>
_knockbackStrength = 0.3f; _knockbackStrength = 0.3f;
} }
public void Die() public virtual void Die()
{ {
SetProcess(false); SetProcess(false);
CurrentHP.OnNext(0); CurrentHP.OnNext(0);

View File

@@ -9,4 +9,6 @@ public interface INavigationAgentClient
public void SetTarget(Vector3 target); public void SetTarget(Vector3 target);
public bool IsAvoidanceEnabled { get; } public bool IsAvoidanceEnabled { get; }
public void Stop();
} }

View File

@@ -39,6 +39,12 @@ public partial class NavigationAgentClient : Node3D, INavigationAgentClient
_thinkTimer.Start(); _thinkTimer.Start();
} }
public void Stop()
{
_patrolTimer.Stop();
_thinkTimer.Stop();
}
private void NavAgent_VelocityComputed(Vector3 safeVelocity) private void NavAgent_VelocityComputed(Vector3 safeVelocity)
{ {
if (!_canMove) if (!_canMove)

View File

@@ -48,6 +48,12 @@ public partial class Sproingy : Enemy, IHasPrimaryAttack, ICanPatrol
PrimaryAttack(); PrimaryAttack();
} }
public override void Die()
{
_navigationAgentClient.Stop();
base.Die();
}
public void PrimaryAttack() public void PrimaryAttack()
{ {
_enemyModelView.PlayPrimaryAttackAnimation(); _enemyModelView.PlayPrimaryAttackAnimation();

View File

@@ -22,7 +22,7 @@ public partial class Michael : Enemy, IHasPrimaryAttack, ICanPatrol
((EnemyModelView2D)_enemyModelView).Hitbox.AreaEntered += Hitbox_AreaEntered; ((EnemyModelView2D)_enemyModelView).Hitbox.AreaEntered += Hitbox_AreaEntered;
} }
public new void OnPhysicsProcess(double delta) public void OnPhysicsProcess(double delta)
{ {
_enemyLogic.Input(new EnemyLogic.Input.PhysicsTick(delta)); _enemyLogic.Input(new EnemyLogic.Input.PhysicsTick(delta));
@@ -38,6 +38,12 @@ public partial class Michael : Enemy, IHasPrimaryAttack, ICanPatrol
base._PhysicsProcess(delta); base._PhysicsProcess(delta);
} }
public override void Die()
{
_navigationAgentClient.Stop();
base.Die();
}
public override void TakeAction() public override void TakeAction()
{ {
PrimaryAttack(); PrimaryAttack();

View File

@@ -57,6 +57,12 @@ public partial class Sara : Enemy, IHasPrimaryAttack, IHasSecondaryAttack, ICanP
options[(int)selection].Invoke(); options[(int)selection].Invoke();
} }
public override void Die()
{
_navigationAgentClient.Stop();
base.Die();
}
public void PrimaryAttack() public void PrimaryAttack()
{ {
_enemyModelView.PlayPrimaryAttackAnimation(); _enemyModelView.PlayPrimaryAttackAnimation();

View File

@@ -30,7 +30,7 @@ public partial class Ballos : Enemy, IHasPrimaryAttack, IHasSecondaryAttack, ICa
((EnemyModelView2D)_enemyModelView).Hitbox.AreaEntered += Hitbox_AreaEntered; ((EnemyModelView2D)_enemyModelView).Hitbox.AreaEntered += Hitbox_AreaEntered;
} }
public new void OnPhysicsProcess(double delta) public void OnPhysicsProcess(double delta)
{ {
_enemyLogic.Input(new EnemyLogic.Input.PhysicsTick(delta)); _enemyLogic.Input(new EnemyLogic.Input.PhysicsTick(delta));
@@ -53,6 +53,13 @@ public partial class Ballos : Enemy, IHasPrimaryAttack, IHasSecondaryAttack, ICa
var selection = rng.RandWeighted([0.875f, 0.125f]); var selection = rng.RandWeighted([0.875f, 0.125f]);
options[(int)selection].Invoke(); options[(int)selection].Invoke();
} }
public override void Die()
{
_navigationAgentClient.Stop();
base.Die();
}
public void PrimaryAttack() public void PrimaryAttack()
{ {
_enemyModelView.PlayPrimaryAttackAnimation(); _enemyModelView.PlayPrimaryAttackAnimation();

File diff suppressed because one or more lines are too long

View File

@@ -80,6 +80,7 @@ shape = SubResource("SphereShape3D_lqifn")
[node name="EnemyModelView" parent="." instance=ExtResource("3_q1q0f")] [node name="EnemyModelView" parent="." instance=ExtResource("3_q1q0f")]
unique_name_in_owner = true unique_name_in_owner = true
transform = Transform3D(0.999848, 0, 0.0174524, 0, 1, 0, -0.0174524, 0, 0.999848, 0, 0, 0)
[node name="Raycast" type="RayCast3D" parent="."] [node name="Raycast" type="RayCast3D" parent="."]
unique_name_in_owner = true unique_name_in_owner = true

View File

@@ -6952,7 +6952,7 @@ script = ExtResource("1_ol7va")
EnemyLoreInfo = SubResource("Resource_500at") EnemyLoreInfo = SubResource("Resource_500at")
[node name="Sprite3D" type="Sprite3D" parent="."] [node name="Sprite3D" type="Sprite3D" parent="."]
transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, 2, 0) transform = Transform3D(-1.5, 0, -1.31134e-07, 0, 1.5, 0, 1.31134e-07, 0, -1.5, 0, 0, 0)
billboard = 2 billboard = 2
alpha_cut = 1 alpha_cut = 1
texture_filter = 0 texture_filter = 0

View File

@@ -28,7 +28,7 @@ public partial class Chinthe : Enemy, IHasPrimaryAttack, ICanPatrol, ICanActivat
EnemyModelView.Hitbox.AreaEntered += Hitbox_AreaEntered; EnemyModelView.Hitbox.AreaEntered += Hitbox_AreaEntered;
} }
public new void OnPhysicsProcess(double delta) public void OnPhysicsProcess(double delta)
{ {
_enemyLogic.Input(new EnemyLogic.Input.PhysicsTick(delta)); _enemyLogic.Input(new EnemyLogic.Input.PhysicsTick(delta));
@@ -47,6 +47,12 @@ public partial class Chinthe : Enemy, IHasPrimaryAttack, ICanPatrol, ICanActivat
base._PhysicsProcess(delta); base._PhysicsProcess(delta);
} }
public override void Die()
{
_navigationAgentClient.Stop();
base.Die();
}
public override void TakeAction() public override void TakeAction()
{ {
PrimaryAttack(); PrimaryAttack();

View File

@@ -57,6 +57,12 @@ public partial class Ambassador : Enemy, IHasPrimaryAttack, IHasSecondaryAttack,
options[(int)selection].Invoke(); options[(int)selection].Invoke();
} }
public override void Die()
{
_navigationAgentClient.Stop();
base.Die();
}
public void PrimaryAttack() public void PrimaryAttack()
{ {
_enemyModelView.PlayPrimaryAttackAnimation(); _enemyModelView.PlayPrimaryAttackAnimation();

View File

@@ -53,6 +53,13 @@ public partial class AgiDemon : Enemy, IHasPrimaryAttack, IHasSecondaryAttack, I
var selection = rng.RandWeighted([0.875f, 0.125f]); var selection = rng.RandWeighted([0.875f, 0.125f]);
options[(int)selection].Invoke(); options[(int)selection].Invoke();
} }
public override void Die()
{
_navigationAgentClient.Stop();
base.Die();
}
public void PrimaryAttack() public void PrimaryAttack()
{ {
_enemyModelView.PlayPrimaryAttackAnimation(); _enemyModelView.PlayPrimaryAttackAnimation();

View File

@@ -53,6 +53,13 @@ public partial class Palan : Enemy, IHasPrimaryAttack, IHasSecondaryAttack, ICan
var selection = rng.RandWeighted([0.875f, 0.125f]); var selection = rng.RandWeighted([0.875f, 0.125f]);
options[(int)selection].Invoke(); options[(int)selection].Invoke();
} }
public override void Die()
{
_navigationAgentClient.Stop();
base.Die();
}
public void PrimaryAttack() public void PrimaryAttack()
{ {
_enemyModelView.PlayPrimaryAttackAnimation(); _enemyModelView.PlayPrimaryAttackAnimation();

View File

@@ -53,6 +53,13 @@ public partial class ShieldOfHeaven : Enemy, IHasPrimaryAttack, IHasSecondaryAtt
var selection = rng.RandWeighted([0.875f, 0.125f]); var selection = rng.RandWeighted([0.875f, 0.125f]);
options[(int)selection].Invoke(); options[(int)selection].Invoke();
} }
public override void Die()
{
_navigationAgentClient.Stop();
base.Die();
}
public void PrimaryAttack() public void PrimaryAttack()
{ {
_enemyModelView.PlayPrimaryAttackAnimation(); _enemyModelView.PlayPrimaryAttackAnimation();

View File

@@ -8,17 +8,17 @@
script = ExtResource("2_bpd8u") script = ExtResource("2_bpd8u")
CurrentHP = 100.0 CurrentHP = 100.0
MaximumHP = 100 MaximumHP = 100
CurrentAttack = 0 CurrentAttack = null
CurrentDefense = 0 CurrentDefense = null
MaxAttack = 0 MaxAttack = null
MaxDefense = 0 MaxDefense = null
ExpFromDefeat = 0 ExpFromDefeat = null
Luck = 0.05 Luck = 0.05
_telluricResistance = 0.0 _telluricResistance = null
_aeolicResistance = 0.0 _aeolicResistance = null
_hydricResistance = 0.0 _hydricResistance = null
_igneousResistance = 0.0 _igneousResistance = null
_ferrumResistance = 0.0 _ferrumResistance = null
DropsSoulGemChance = 0.0 DropsSoulGemChance = 0.0
metadata/_custom_type_script = "uid://dnkmr0eq1sij0" metadata/_custom_type_script = "uid://dnkmr0eq1sij0"
@@ -33,6 +33,7 @@ collision_layer = 2
collision_mask = 2 collision_mask = 2
script = ExtResource("1_dqcrh") script = ExtResource("1_dqcrh")
_enemyStatResource = SubResource("Resource_ccv8a") _enemyStatResource = SubResource("Resource_ccv8a")
_maximumWallMoveAmount = null
[node name="CollisionShape3D" type="CollisionShape3D" parent="."] [node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.40558, 8.3319, 2.53654) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.40558, 8.3319, 2.53654)

View File

@@ -157,33 +157,57 @@ unique_name_in_owner = true
[node name="Arm1" parent="LeftArms" instance=ExtResource("1_ell80")] [node name="Arm1" parent="LeftArms" instance=ExtResource("1_ell80")]
unique_name_in_owner = true unique_name_in_owner = true
Damage = null
PrimaryAttackElementalDamageBonus = null
[node name="Arm2" parent="LeftArms" instance=ExtResource("2_kblru")] [node name="Arm2" parent="LeftArms" instance=ExtResource("2_kblru")]
unique_name_in_owner = true unique_name_in_owner = true
Damage = null
PrimaryAttackElementalType = null
PrimaryAttackElementalDamageBonus = null
[node name="Arm3" parent="LeftArms" instance=ExtResource("3_nqxqr")] [node name="Arm3" parent="LeftArms" instance=ExtResource("3_nqxqr")]
unique_name_in_owner = true unique_name_in_owner = true
Damage = null
PrimaryAttackElementalType = null
PrimaryAttackElementalDamageBonus = null
[node name="Arm4" parent="LeftArms" instance=ExtResource("4_r5yku")] [node name="Arm4" parent="LeftArms" instance=ExtResource("4_r5yku")]
unique_name_in_owner = true unique_name_in_owner = true
Damage = null
PrimaryAttackElementalType = null
PrimaryAttackElementalDamageBonus = null
[node name="Arm5" parent="LeftArms" instance=ExtResource("5_5oa7x")] [node name="Arm5" parent="LeftArms" instance=ExtResource("5_5oa7x")]
unique_name_in_owner = true unique_name_in_owner = true
Damage = null
PrimaryAttackElementalType = null
PrimaryAttackElementalDamageBonus = null
[node name="RightArms" type="Node3D" parent="."] [node name="RightArms" type="Node3D" parent="."]
unique_name_in_owner = true unique_name_in_owner = true
[node name="Arm6" parent="RightArms" instance=ExtResource("6_h1yna")] [node name="Arm6" parent="RightArms" instance=ExtResource("6_h1yna")]
unique_name_in_owner = true unique_name_in_owner = true
Damage = null
PrimaryAttackElementalDamageBonus = null
[node name="Arm7" parent="RightArms" instance=ExtResource("7_6s6sq")] [node name="Arm7" parent="RightArms" instance=ExtResource("7_6s6sq")]
unique_name_in_owner = true unique_name_in_owner = true
Damage = null
PrimaryAttackElementalDamageBonus = null
[node name="Arm8" parent="RightArms" instance=ExtResource("8_e82oe")] [node name="Arm8" parent="RightArms" instance=ExtResource("8_e82oe")]
unique_name_in_owner = true unique_name_in_owner = true
Damage = null
PrimaryAttackElementalType = null
PrimaryAttackElementalDamageBonus = null
[node name="Arm9" parent="RightArms" instance=ExtResource("9_c826n")] [node name="Arm9" parent="RightArms" instance=ExtResource("9_c826n")]
unique_name_in_owner = true unique_name_in_owner = true
Damage = null
PrimaryAttackElementalType = null
PrimaryAttackElementalDamageBonus = null
[node name="Base" type="Node3D" parent="."] [node name="Base" type="Node3D" parent="."]

View File

@@ -12,14 +12,14 @@ CurrentAttack = 10
CurrentDefense = 5 CurrentDefense = 5
MaxAttack = 10 MaxAttack = 10
MaxDefense = 5 MaxDefense = 5
ExpFromDefeat = 0 ExpFromDefeat = null
Luck = 0.05 Luck = 0.05
_telluricResistance = 0.0 _telluricResistance = null
_aeolicResistance = 0.0 _aeolicResistance = null
_hydricResistance = 0.5 _hydricResistance = 0.5
_igneousResistance = 0.0 _igneousResistance = null
_ferrumResistance = 0.0 _ferrumResistance = null
DropsSoulGemChance = 0.75 DropsSoulGemChance = null
metadata/_custom_type_script = "uid://dnkmr0eq1sij0" metadata/_custom_type_script = "uid://dnkmr0eq1sij0"
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_cwfph"] [sub_resource type="CapsuleShape3D" id="CapsuleShape3D_cwfph"]
@@ -41,8 +41,11 @@ axis_lock_linear_y = true
axis_lock_angular_x = true axis_lock_angular_x = true
script = ExtResource("1_wbopj") script = ExtResource("1_wbopj")
PrimaryAttackElementalType = 3 PrimaryAttackElementalType = 3
PrimaryAttackElementalDamageBonus = null
SecondaryAttackElementalType = 3 SecondaryAttackElementalType = 3
SecondaryAttackElementalDamageBonus = null
_enemyStatResource = SubResource("Resource_m7ocm") _enemyStatResource = SubResource("Resource_m7ocm")
_movementSpeed = null
[node name="CollisionShape3D" type="CollisionShape3D" parent="."] [node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0) transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0)

View File

@@ -2,9 +2,9 @@
state "EnemyLogic State" as Zennysoft_Game_Ma_EnemyLogic_State { state "EnemyLogic State" as Zennysoft_Game_Ma_EnemyLogic_State {
state "Alive" as Zennysoft_Game_Ma_EnemyLogic_State_Alive { state "Alive" as Zennysoft_Game_Ma_EnemyLogic_State_Alive {
state "Activated" as Zennysoft_Game_Ma_EnemyLogic_State_Activated { state "Activated" as Zennysoft_Game_Ma_EnemyLogic_State_Activated {
state "Patrolling" as Zennysoft_Game_Ma_EnemyLogic_State_Patrolling
state "FollowPlayer" as Zennysoft_Game_Ma_EnemyLogic_State_FollowPlayer
state "Attacking" as Zennysoft_Game_Ma_EnemyLogic_State_Attacking state "Attacking" as Zennysoft_Game_Ma_EnemyLogic_State_Attacking
state "FollowPlayer" as Zennysoft_Game_Ma_EnemyLogic_State_FollowPlayer
state "Patrolling" as Zennysoft_Game_Ma_EnemyLogic_State_Patrolling
} }
state "Idle" as Zennysoft_Game_Ma_EnemyLogic_State_Idle state "Idle" as Zennysoft_Game_Ma_EnemyLogic_State_Idle
} }

View File

@@ -335,6 +335,22 @@ public partial class Game : Node3D, IGame
return rolledItem; return rolledItem;
} }
public override void _Input(InputEvent @event)
{
if (@event.IsActionPressed(GameInputs.Debug) && !InGameUI.DebugMenu.Visible)
{
InGameUI.DebugMenu.Show();
InGameUI.PlayerInfoUI.Hide();
GameRepo.Pause();
}
else if (@event.IsActionPressed(GameInputs.Debug) && InGameUI.DebugMenu.Visible)
{
InGameUI.DebugMenu.Hide();
InGameUI.PlayerInfoUI.Show();
GameRepo.Resume();
}
}
private void DropRestorative(Vector3 vector) private void DropRestorative(Vector3 vector)
{ {
var restorativeScene = GD.Load<PackedScene>("res://src/items/restorative/Restorative.tscn"); var restorativeScene = GD.Load<PackedScene>("res://src/items/restorative/Restorative.tscn");

View File

@@ -1,7 +1,7 @@
[gd_scene load_steps=35 format=3 uid="uid://dlj8qdg1c5048"] [gd_scene load_steps=35 format=3 uid="uid://dlj8qdg1c5048"]
[ext_resource type="Script" path="res://src/inventory_menu/InventoryMenu.cs" id="1_l64wl"] [ext_resource type="Script" uid="uid://cmtet15hi5oiy" path="res://src/inventory_menu/InventoryMenu.cs" id="1_l64wl"]
[ext_resource type="Shader" path="res://src/inventory_menu/InventoryMenu.gdshader" id="2_0fvsh"] [ext_resource type="Shader" uid="uid://cnphwvmr05hp1" path="res://src/inventory_menu/InventoryMenu.gdshader" id="2_0fvsh"]
[ext_resource type="FontFile" uid="uid://cm8j5vcdop5x0" path="res://src/ui/fonts/Mrs-Eaves-OT-Roman_31443.ttf" id="3_lm4o1"] [ext_resource type="FontFile" uid="uid://cm8j5vcdop5x0" path="res://src/ui/fonts/Mrs-Eaves-OT-Roman_31443.ttf" id="3_lm4o1"]
[ext_resource type="FontFile" uid="uid://cb41qqmxqurj8" path="res://src/ui/fonts/FT88-Bold.ttf" id="4_rg5yb"] [ext_resource type="FontFile" uid="uid://cb41qqmxqurj8" path="res://src/ui/fonts/FT88-Bold.ttf" id="4_rg5yb"]
[ext_resource type="FontFile" uid="uid://dit3vylt7hmmx" path="res://src/ui/fonts/FT88-Regular.ttf" id="5_2qnnx"] [ext_resource type="FontFile" uid="uid://dit3vylt7hmmx" path="res://src/ui/fonts/FT88-Regular.ttf" id="5_2qnnx"]
@@ -440,9 +440,9 @@ focus_neighbor_right = NodePath(".")
focus_neighbor_bottom = NodePath("../ThrowButton") focus_neighbor_bottom = NodePath("../ThrowButton")
theme = ExtResource("8_khyvo") theme = ExtResource("8_khyvo")
theme_override_colors/font_disabled_color = Color(0.137255, 0.121569, 0.12549, 1) theme_override_colors/font_disabled_color = Color(0.137255, 0.121569, 0.12549, 1)
theme_override_colors/font_pressed_color = Color(0.137255, 0.121569, 0.12549, 1)
theme_override_colors/font_focus_color = Color(1, 0.94902, 0, 1)
theme_override_colors/font_color = Color(0.737255, 0.705882, 0.690196, 1) theme_override_colors/font_color = Color(0.737255, 0.705882, 0.690196, 1)
theme_override_colors/font_focus_color = Color(1, 0.94902, 0, 1)
theme_override_colors/font_pressed_color = Color(0.137255, 0.121569, 0.12549, 1)
theme_override_styles/focus = SubResource("StyleBoxEmpty_0kb6l") theme_override_styles/focus = SubResource("StyleBoxEmpty_0kb6l")
theme_override_styles/disabled = SubResource("StyleBoxEmpty_fu7o2") theme_override_styles/disabled = SubResource("StyleBoxEmpty_fu7o2")
theme_override_styles/pressed = SubResource("StyleBoxEmpty_nkvce") theme_override_styles/pressed = SubResource("StyleBoxEmpty_nkvce")
@@ -464,9 +464,9 @@ focus_neighbor_right = NodePath(".")
focus_neighbor_bottom = NodePath("../DropButton") focus_neighbor_bottom = NodePath("../DropButton")
theme = ExtResource("8_khyvo") theme = ExtResource("8_khyvo")
theme_override_colors/font_disabled_color = Color(0.137255, 0.121569, 0.12549, 1) theme_override_colors/font_disabled_color = Color(0.137255, 0.121569, 0.12549, 1)
theme_override_colors/font_pressed_color = Color(0.137255, 0.121569, 0.12549, 1)
theme_override_colors/font_focus_color = Color(1, 0.94902, 0, 1)
theme_override_colors/font_color = Color(0.737255, 0.705882, 0.690196, 1) theme_override_colors/font_color = Color(0.737255, 0.705882, 0.690196, 1)
theme_override_colors/font_focus_color = Color(1, 0.94902, 0, 1)
theme_override_colors/font_pressed_color = Color(0.137255, 0.121569, 0.12549, 1)
theme_override_styles/focus = SubResource("StyleBoxEmpty_0kb6l") theme_override_styles/focus = SubResource("StyleBoxEmpty_0kb6l")
theme_override_styles/disabled = SubResource("StyleBoxEmpty_ascpt") theme_override_styles/disabled = SubResource("StyleBoxEmpty_ascpt")
theme_override_styles/pressed = SubResource("StyleBoxEmpty_abpb1") theme_override_styles/pressed = SubResource("StyleBoxEmpty_abpb1")
@@ -488,9 +488,9 @@ focus_neighbor_right = NodePath(".")
focus_neighbor_bottom = NodePath(".") focus_neighbor_bottom = NodePath(".")
theme = ExtResource("8_khyvo") theme = ExtResource("8_khyvo")
theme_override_colors/font_disabled_color = Color(0.137255, 0.121569, 0.12549, 1) theme_override_colors/font_disabled_color = Color(0.137255, 0.121569, 0.12549, 1)
theme_override_colors/font_pressed_color = Color(0.137255, 0.121569, 0.12549, 1)
theme_override_colors/font_focus_color = Color(1, 0.94902, 0, 1)
theme_override_colors/font_color = Color(0.737255, 0.705882, 0.690196, 1) theme_override_colors/font_color = Color(0.737255, 0.705882, 0.690196, 1)
theme_override_colors/font_focus_color = Color(1, 0.94902, 0, 1)
theme_override_colors/font_pressed_color = Color(0.137255, 0.121569, 0.12549, 1)
theme_override_styles/focus = SubResource("StyleBoxEmpty_omlgh") theme_override_styles/focus = SubResource("StyleBoxEmpty_omlgh")
theme_override_styles/disabled = SubResource("StyleBoxEmpty_uerb4") theme_override_styles/disabled = SubResource("StyleBoxEmpty_uerb4")
theme_override_styles/pressed = SubResource("StyleBoxEmpty_lvcf8") theme_override_styles/pressed = SubResource("StyleBoxEmpty_lvcf8")

View File

@@ -11,7 +11,12 @@ public partial class Armor : EquipableItem
{ {
public override void _Notification(int what) => this.Notify(what); public override void _Notification(int what) => this.Notify(what);
[Node] private Sprite3D Sprite { get; set; } = default!; [Node] private Sprite3D _sprite { get; set; } = default!;
public override void _Ready()
{
_sprite.Texture = Stats.Texture;
}
public override string ItemName => Stats.Name; public override string ItemName => Stats.Name;
@@ -32,8 +37,8 @@ public partial class Armor : EquipableItem
public override ItemTag ItemTag => Stats.ItemTag; public override ItemTag ItemTag => Stats.ItemTag;
[Export]
[Save("armor_stats")] [Save("armor_stats")]
[Export]
public ArmorStats Stats { get; set; } = new ArmorStats(); public ArmorStats Stats { get; set; } = new ArmorStats();
public override Texture2D GetTexture() => Stats.Texture; public override Texture2D GetTexture() => Stats.Texture;
} }

View File

@@ -1,17 +1,24 @@
[gd_resource type="Resource" script_class="ArmorStats" load_steps=3 format=3 uid="uid://b8mjje06x6dl1"] [gd_resource type="Resource" script_class="ArmorStats" load_steps=3 format=3 uid="uid://b8mjje06x6dl1"]
[ext_resource type="Texture2D" uid="uid://dbb3x4cbo8jc1" path="res://src/items/armor/textures/ACCEPTANCE.PNG" id="1_p85jd"] [ext_resource type="Texture2D" uid="uid://dbb3x4cbo8jc1" path="res://src/items/armor/textures/ACCEPTANCE.PNG" id="1_p85jd"]
[ext_resource type="Script" path="res://src/items/armor/ArmorStats.cs" id="1_si4wu"] [ext_resource type="Script" uid="uid://dqtp6ewvttoyu" path="res://src/items/armor/ArmorStats.cs" id="1_si4wu"]
[resource] [resource]
script = ExtResource("1_si4wu") script = ExtResource("1_si4wu")
Defense = 9
TelluricResistance = 0.0
AeolicResistance = 0.0
HydricResistance = 0.0
IgneousResistance = 0.0
FerrumResistance = 0.0
Name = "Acceptance" Name = "Acceptance"
Description = "+9 DEF" Description = "+9 DEF"
Texture = ExtResource("1_p85jd") Defense = 9
_telluricResistance = 0.0
_aeolicResistance = 0.0
_hydricResistance = 0.0
_igneousResistance = 0.0
_ferrumResistance = 0.0
Name = "Acceptance"
Description = "+9 DEF"
SpawnRate = 0.01 SpawnRate = 0.01
ThrowSpeed = 12.0
HealHPAmount = 0
HealVTAmount = 0
ThrowDamage = 5
ItemTag = 0
Texture = ExtResource("1_p85jd")

View File

@@ -1,4 +1,4 @@
[gd_resource type="Resource" script_class="WeaponStats" load_steps=2 format=3 uid="uid://ww4vha51i82v"] [gd_resource type="Resource" load_steps=2 format=3 uid="uid://ww4vha51i82v"]
[ext_resource type="Script" uid="uid://cc7byqeolw5y4" path="res://src/items/weapons/WeaponStats.cs" id="1_d2lw0"] [ext_resource type="Script" uid="uid://cc7byqeolw5y4" path="res://src/items/weapons/WeaponStats.cs" id="1_d2lw0"]
@@ -21,17 +21,6 @@ AttackSpeed = 0.15
WeaponElement = 0 WeaponElement = 0
ElementalDamageBonus = 1.0 ElementalDamageBonus = 1.0
WeaponTag = 0 WeaponTag = 0
Name = "Atonement"
Description = "\"Should I betray my mother, my father, my brother, my sister, my love, let me be pierced by a thousand knives.
Should I betray the self, let me be struck by 10,000 lightning bolts.
Should I betray them both, let me wander the earth until the pillars of heaven turn to dust.\"
When the 2nd world reached the end of it's creation,
The Goddess of Destruction materialized it's sorrow into this form.
A powerful weapon that has the ability to obliterate anything of the earth.
There is significance in your using it."
SpawnRate = 0.0 SpawnRate = 0.0
ThrowSpeed = 12.0 ThrowSpeed = 12.0
HealHPAmount = 0 HealHPAmount = 0

View File

@@ -5,7 +5,7 @@
[resource] [resource]
script = ExtResource("1_iran7") script = ExtResource("1_iran7")
Name = "Mystery rod" Name = "Mystery Rod"
Description = "Unidentified rod." Description = "Unidentified rod."
Damage = 0 Damage = 0
Luck = 0.05 Luck = 0.05
@@ -13,7 +13,7 @@ AttackSpeed = 1.0
WeaponElement = 0 WeaponElement = 0
ElementalDamageBonus = 1.0 ElementalDamageBonus = 1.0
WeaponTag = 0 WeaponTag = 0
Name = "Mystery rod" Name = "Mystery Rod"
Description = "Unidentified rod." Description = "Unidentified rod."
SpawnRate = 0.5 SpawnRate = 0.5
ThrowSpeed = 12.0 ThrowSpeed = 12.0

View File

@@ -37,7 +37,7 @@ public partial class MonsterRoom : DungeonRoom
var enemy = enemyDatabase.EnemyList[rng.RandWeighted(enemyDatabase.SpawnRate)]; var enemy = enemyDatabase.EnemyList[rng.RandWeighted(enemyDatabase.SpawnRate)];
var instantiatedEnemy = enemy.Instantiate<Enemy>(); var instantiatedEnemy = enemy.Instantiate<Enemy>();
instantiatedEnemy.Position = new Vector3(spawnPoint.Position.X, -0.5f, spawnPoint.Position.Z); instantiatedEnemy.Position = new Vector3(spawnPoint.Position.X, 0, spawnPoint.Position.Z);
AddChild(instantiatedEnemy); AddChild(instantiatedEnemy);
} }
} }

View File

@@ -1,13 +1,11 @@
[gd_scene load_steps=15 format=3 uid="uid://bc1sp6xwe0j65"] [gd_scene load_steps=13 format=3 uid="uid://bc1sp6xwe0j65"]
[ext_resource type="Script" uid="uid://dwt6302nsf4vq" path="res://src/map/dungeon/code/DungeonFloor.cs" id="1_0ecnn"] [ext_resource type="Script" uid="uid://dwt6302nsf4vq" path="res://src/map/dungeon/code/DungeonFloor.cs" id="1_0ecnn"]
[ext_resource type="Script" uid="uid://b1x125h0tya2w" path="res://addons/SimpleDungeons/DungeonGenerator3D.gd" id="2_cxmwa"] [ext_resource type="Script" uid="uid://b1x125h0tya2w" path="res://addons/SimpleDungeons/DungeonGenerator3D.gd" id="2_cxmwa"]
[ext_resource type="PackedScene" uid="uid://dpec2lbt83dhe" path="res://src/map/dungeon/rooms/Set A/03. Antechamber A.tscn" id="3_gkkr3"] [ext_resource type="PackedScene" uid="uid://dpec2lbt83dhe" path="res://src/map/dungeon/rooms/Set A/03. Antechamber A.tscn" id="3_gkkr3"]
[ext_resource type="PackedScene" uid="uid://dn5546yqyntfr" path="res://src/map/dungeon/rooms/Set A/10. Item Transfer Room.tscn" id="6_atq1f"] [ext_resource type="PackedScene" uid="uid://dn5546yqyntfr" path="res://src/map/dungeon/rooms/Set A/10. Item Transfer Room.tscn" id="6_atq1f"]
[ext_resource type="Script" uid="uid://ce73fuh74l81l" path="res://addons/SimpleDungeons/DungeonRoom3D.gd" id="8_1l8yt"]
[ext_resource type="PackedScene" uid="uid://b82dx66mgs2d7" path="res://src/map/dungeon/rooms/Set A/08. Basin Room.tscn" id="8_5rblf"] [ext_resource type="PackedScene" uid="uid://b82dx66mgs2d7" path="res://src/map/dungeon/rooms/Set A/08. Basin Room.tscn" id="8_5rblf"]
[ext_resource type="PackedScene" uid="uid://bs56ccgosmu47" path="res://src/enemy/enemy_types/01. sproingy/Sproingy.tscn" id="9_atq1f"] [ext_resource type="PackedScene" uid="uid://bs56ccgosmu47" path="res://src/enemy/enemy_types/01. sproingy/Sproingy.tscn" id="9_atq1f"]
[ext_resource type="Script" uid="uid://fk3jis6rsipv" path="res://src/map/dungeon/code/corridor.gd" id="9_lcc45"]
[ext_resource type="PackedScene" uid="uid://dbvr8ewajja6a" path="res://src/enemy/EnemyDatabase.tscn" id="12_aw26s"] [ext_resource type="PackedScene" uid="uid://dbvr8ewajja6a" path="res://src/enemy/EnemyDatabase.tscn" id="12_aw26s"]
[ext_resource type="PackedScene" uid="uid://cihbmyo0ltq4m" path="res://src/map/dungeon/rooms/Set A/19. Floor Exit A.tscn" id="12_n02rw"] [ext_resource type="PackedScene" uid="uid://cihbmyo0ltq4m" path="res://src/map/dungeon/rooms/Set A/19. Floor Exit A.tscn" id="12_n02rw"]
[ext_resource type="PackedScene" uid="uid://bn4gslp2gk8ds" path="res://src/map/dungeon/rooms/Set A/18. Corridor A.tscn" id="13_ofywd"] [ext_resource type="PackedScene" uid="uid://bn4gslp2gk8ds" path="res://src/map/dungeon/rooms/Set A/18. Corridor A.tscn" id="13_ofywd"]
@@ -47,167 +45,95 @@ corridor_cost_multiplier = 0.1
show_debug_in_editor = false show_debug_in_editor = false
hide_debug_visuals_for_all_generated_rooms = false hide_debug_visuals_for_all_generated_rooms = false
[node name="Item Transfer Room_0" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("6_atq1f")] [node name="Item Transfer Room_0" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("6_atq1f")]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 22, 0, 20) transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 22, 0, 20)
script = ExtResource("8_1l8yt")
size_in_voxels = Vector3i(3, 1, 4)
voxel_scale = Vector3(4, 4, 4)
min_count = 1
max_count = 1
[node name="BasinRoom_1" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("8_5rblf")] [node name="BasinRoom_1" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("8_5rblf")]
transform = Transform3D(1.19249e-08, 0, -1, 0, 1, 0, 1, 0, 1.19249e-08, 4, 0, 14) transform = Transform3D(1.19249e-08, 0, -1, 0, 1, 0, 1, 0, 1.19249e-08, 4, 0, 14)
script = ExtResource("8_1l8yt")
size_in_voxels = Vector3i(5, 1, 4)
voxel_scale = Vector3(4, 4, 4)
min_count = 1
max_count = 2
[node name="Antechamber A_2" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("3_gkkr3")] [node name="Antechamber A_2" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("3_gkkr3")]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, -22, 0, 20) transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, -22, 0, 20)
script = ExtResource("8_1l8yt")
size_in_voxels = Vector3i(5, 1, 4)
voxel_scale = Vector3(4, 4, 4)
min_count = 1
max_count = 2
[node name="Floor Exit A_3" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("12_n02rw")] [node name="Floor Exit A_3" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("12_n02rw")]
transform = Transform3D(1.19249e-08, 0, -1, 0, 1, 0, 1, 0, 1.19249e-08, 14, 0, -6) transform = Transform3D(1.19249e-08, 0, -1, 0, 1, 0, 1, 0, 1.19249e-08, 14, 0, -6)
script = ExtResource("8_1l8yt")
size_in_voxels = Vector3i(5, 1, 9)
voxel_scale = Vector3(4, 4, 4)
min_count = 1
max_count = 1
[node name="Corridor_4" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] [node name="Corridor_4" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 22, 0, 30) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 22, 0, 30)
script = ExtResource("9_lcc45")
voxel_scale = Vector3(4, 4, 4)
[node name="Corridor_5" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] [node name="Corridor_5" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 18, 0, 30) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 18, 0, 30)
script = ExtResource("9_lcc45")
voxel_scale = Vector3(4, 4, 4)
[node name="Corridor_6" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] [node name="Corridor_6" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 14, 0, 30) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 14, 0, 30)
script = ExtResource("9_lcc45")
voxel_scale = Vector3(4, 4, 4)
[node name="Corridor_7" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] [node name="Corridor_7" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 14, 0, 26) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 14, 0, 26)
script = ExtResource("9_lcc45")
voxel_scale = Vector3(4, 4, 4)
[node name="Corridor_8" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] [node name="Corridor_8" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 14, 0, 22) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 14, 0, 22)
script = ExtResource("9_lcc45")
voxel_scale = Vector3(4, 4, 4)
[node name="Corridor_9" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] [node name="Corridor_9" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 14, 0, 18) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 14, 0, 18)
script = ExtResource("9_lcc45")
voxel_scale = Vector3(4, 4, 4)
[node name="Corridor_10" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] [node name="Corridor_10" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 14, 0, 14) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 14, 0, 14)
script = ExtResource("9_lcc45")
voxel_scale = Vector3(4, 4, 4)
[node name="Corridor_11" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] [node name="Corridor_11" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, 0, 26) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, 0, 26)
script = ExtResource("9_lcc45")
voxel_scale = Vector3(4, 4, 4)
[node name="Corridor_12" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] [node name="Corridor_12" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6, 0, 26) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6, 0, 26)
script = ExtResource("9_lcc45")
voxel_scale = Vector3(4, 4, 4)
[node name="Corridor_13" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] [node name="Corridor_13" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, 26) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, 26)
script = ExtResource("9_lcc45")
voxel_scale = Vector3(4, 4, 4)
[node name="Corridor_14" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] [node name="Corridor_14" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 0, 26) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 0, 26)
script = ExtResource("9_lcc45")
voxel_scale = Vector3(4, 4, 4)
[node name="Corridor_15" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] [node name="Corridor_15" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6, 0, 26) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6, 0, 26)
script = ExtResource("9_lcc45")
voxel_scale = Vector3(4, 4, 4)
[node name="Corridor_16" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] [node name="Corridor_16" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10, 0, 26) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10, 0, 26)
script = ExtResource("9_lcc45")
voxel_scale = Vector3(4, 4, 4)
[node name="Corridor_17" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] [node name="Corridor_17" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10, 0, 22) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10, 0, 22)
script = ExtResource("9_lcc45")
voxel_scale = Vector3(4, 4, 4)
[node name="Corridor_18" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] [node name="Corridor_18" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10, 0, 18) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10, 0, 18)
script = ExtResource("9_lcc45")
voxel_scale = Vector3(4, 4, 4)
[node name="Corridor_19" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] [node name="Corridor_19" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10, 0, 14) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10, 0, 14)
script = ExtResource("9_lcc45")
voxel_scale = Vector3(4, 4, 4)
[node name="Corridor_20" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] [node name="Corridor_20" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10, 0, 10) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10, 0, 10)
script = ExtResource("9_lcc45")
voxel_scale = Vector3(4, 4, 4)
[node name="Corridor_21" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] [node name="Corridor_21" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -14, 0, 10) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -14, 0, 10)
script = ExtResource("9_lcc45")
voxel_scale = Vector3(4, 4, 4)
[node name="Corridor_22" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] [node name="Corridor_22" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -18, 0, 10) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -18, 0, 10)
script = ExtResource("9_lcc45")
voxel_scale = Vector3(4, 4, 4)
[node name="Corridor_23" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] [node name="Corridor_23" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -18, 0, 6) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -18, 0, 6)
script = ExtResource("9_lcc45")
voxel_scale = Vector3(4, 4, 4)
[node name="Corridor_24" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] [node name="Corridor_24" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -18, 0, 2) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -18, 0, 2)
script = ExtResource("9_lcc45")
voxel_scale = Vector3(4, 4, 4)
[node name="Corridor_25" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] [node name="Corridor_25" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -18, 0, -2) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -18, 0, -2)
script = ExtResource("9_lcc45")
voxel_scale = Vector3(4, 4, 4)
[node name="Corridor_26" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] [node name="Corridor_26" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -14, 0, -2) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -14, 0, -2)
script = ExtResource("9_lcc45")
voxel_scale = Vector3(4, 4, 4)
[node name="Corridor_27" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] [node name="Corridor_27" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10, 0, -2) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10, 0, -2)
script = ExtResource("9_lcc45")
voxel_scale = Vector3(4, 4, 4)
[node name="Corridor_28" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] [node name="Corridor_28" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10, 0, -6) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10, 0, -6)
script = ExtResource("9_lcc45")
voxel_scale = Vector3(4, 4, 4)
[node name="Corridor_29" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] [node name="Corridor_29" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6, 0, -6) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6, 0, -6)
script = ExtResource("9_lcc45")
voxel_scale = Vector3(4, 4, 4)
[node name="RoomsContainer" type="Node3D" parent="NavigationRegion3D/DungeonGenerator"] [node name="RoomsContainer" type="Node3D" parent="NavigationRegion3D/DungeonGenerator"]

View File

@@ -0,0 +1,84 @@
[gd_scene load_steps=8 format=3 uid="uid://8f3dk16nj0dn"]
[ext_resource type="Script" uid="uid://l1v4ppubryd3" path="res://src/ui/pause_menu/PauseDebugMenu.cs" id="1_a7f7f"]
[ext_resource type="FontFile" uid="uid://dp1k143v7cppw" path="res://src/ui/fonts/Lust_Sans_Regular.otf" id="1_dan2i"]
[ext_resource type="LabelSettings" uid="uid://wc363u5t1yi2" path="res://src/ui/label_settings/HeadingFont.tres" id="2_a7f7f"]
[ext_resource type="FontFile" uid="uid://dit3vylt7hmmx" path="res://src/ui/fonts/FT88-Regular.ttf" id="3_k06jx"]
[sub_resource type="Theme" id="Theme_0tcdw"]
default_font = ExtResource("3_k06jx")
default_font_size = 40
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_18bov"]
bg_color = Color(0.2484, 0.2484, 0.2484, 1)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_1ctjd"]
[node name="Control" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_a7f7f")
[node name="MarginContainer" type="MarginContainer" parent="."]
process_mode = 3
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 25
theme_override_constants/margin_top = 25
theme_override_constants/margin_bottom = 0
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
process_mode = 3
layout_mode = 2
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer"]
layout_mode = 2
theme_override_fonts/font = ExtResource("1_dan2i")
theme_override_font_sizes/font_size = 72
text = "Debug Menu"
label_settings = ExtResource("2_a7f7f")
horizontal_alignment = 1
vertical_alignment = 1
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
layout_mode = 2
[node name="VFlowContainer" type="VBoxContainer" parent="MarginContainer/VBoxContainer/HBoxContainer"]
layout_mode = 2
theme_override_constants/separation = 15
[node name="LoadNextFloorButton" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer/VFlowContainer"]
unique_name_in_owner = true
process_mode = 3
custom_minimum_size = Vector2(500, 100)
layout_mode = 2
focus_neighbor_top = NodePath(".")
focus_neighbor_bottom = NodePath("../SpawnItemDropDown")
theme = SubResource("Theme_0tcdw")
theme_override_colors/font_color = Color(0.916332, 0.589636, 0.0275597, 1)
theme_override_colors/font_focus_color = Color(0, 0, 1, 1)
theme_override_colors/font_pressed_color = Color(0, 0, 0, 1)
theme_override_constants/outline_size = 2
theme_override_styles/normal = SubResource("StyleBoxFlat_18bov")
button_mask = 0
text = "Load Next Floor"
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer/VFlowContainer"]
layout_mode = 2
text = "Spawn Item:"
label_settings = ExtResource("2_a7f7f")
[node name="SpawnItemDropDown" type="OptionButton" parent="MarginContainer/VBoxContainer/HBoxContainer/VFlowContainer"]
unique_name_in_owner = true
layout_mode = 2
focus_neighbor_top = NodePath("../LoadNextFloorButton")
focus_neighbor_bottom = NodePath(".")
theme_override_styles/normal = SubResource("StyleBoxFlat_1ctjd")

View File

@@ -33,8 +33,8 @@ MaxDefense = 1
Luck = 0.05 Luck = 0.05
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_dw45s"] [sub_resource type="CapsuleShape3D" id="CapsuleShape3D_dw45s"]
radius = 1.02589 radius = 1.0
height = 2.83556 height = 3.07596
[sub_resource type="Animation" id="Animation_hcjph"] [sub_resource type="Animation" id="Animation_hcjph"]
length = 0.001 length = 0.001
@@ -495,7 +495,7 @@ _defaultWeapon = ExtResource("3_es4xk")
_defaultArmor = ExtResource("4_bj1ma") _defaultArmor = ExtResource("4_bj1ma")
[node name="PlayerGeometryCollision" type="CollisionShape3D" parent="."] [node name="PlayerGeometryCollision" type="CollisionShape3D" parent="."]
transform = Transform3D(-0.0242402, 0, 0.999706, 0, 1, 0, -0.999706, 0, -0.0242402, 0, 1.06447, 0.367568) transform = Transform3D(-0.0242402, 0, 0.999706, 0, 1, 0, -0.999706, 0, -0.0242402, 0, 1.06447, -0.153069)
shape = SubResource("CapsuleShape3D_dw45s") shape = SubResource("CapsuleShape3D_dw45s")
[node name="HealthTimer" type="Timer" parent="."] [node name="HealthTimer" type="Timer" parent="."]

View File

@@ -24,6 +24,8 @@ public partial class InGameUI : Control, IInGameUI
[Node] public IUseTeleportPrompt UseTeleportPrompt { get; set; } = default!; [Node] public IUseTeleportPrompt UseTeleportPrompt { get; set; } = default!;
[Node] public IDebugMenu DebugMenu { get; set; } = default!;
[Dependency] private IGameRepo _gameRepo => this.DependOn<IGameRepo>(); [Dependency] private IGameRepo _gameRepo => this.DependOn<IGameRepo>();
public IInGameUILogic InGameUILogic { get; set; } = default!; public IInGameUILogic InGameUILogic { get; set; } = default!;

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=7 format=3 uid="uid://b1muxus5qdbeu"] [gd_scene load_steps=8 format=3 uid="uid://b1muxus5qdbeu"]
[ext_resource type="Script" uid="uid://dlq2mkhl4pe7a" path="res://src/ui/in_game_ui/InGameUI.cs" id="1_sc13i"] [ext_resource type="Script" uid="uid://dlq2mkhl4pe7a" path="res://src/ui/in_game_ui/InGameUI.cs" id="1_sc13i"]
[ext_resource type="PackedScene" uid="uid://bwbofurcvf3yh" path="res://src/minimap/Minimap.tscn" id="2_6sfje"] [ext_resource type="PackedScene" uid="uid://bwbofurcvf3yh" path="res://src/minimap/Minimap.tscn" id="2_6sfje"]
@@ -6,6 +6,7 @@
[ext_resource type="PackedScene" uid="uid://dxl8il8f13c2x" path="res://src/ui/player_ui/PlayerInfoUI.tscn" id="4_46s5l"] [ext_resource type="PackedScene" uid="uid://dxl8il8f13c2x" path="res://src/ui/player_ui/PlayerInfoUI.tscn" id="4_46s5l"]
[ext_resource type="PackedScene" uid="uid://bea2waybmgd6u" path="res://src/ui/teleport_prompt/UseTeleportPrompt.tscn" id="5_h1hgq"] [ext_resource type="PackedScene" uid="uid://bea2waybmgd6u" path="res://src/ui/teleport_prompt/UseTeleportPrompt.tscn" id="5_h1hgq"]
[ext_resource type="Script" uid="uid://dj6oqler47dqf" path="res://src/utils/FpsCounter.cs" id="7_c6o8j"] [ext_resource type="Script" uid="uid://dj6oqler47dqf" path="res://src/utils/FpsCounter.cs" id="7_c6o8j"]
[ext_resource type="PackedScene" uid="uid://8f3dk16nj0dn" path="res://src/menu/DebugMenu.tscn" id="7_llomk"]
[node name="InGameUI" type="Control"] [node name="InGameUI" type="Control"]
process_mode = 3 process_mode = 3
@@ -48,3 +49,8 @@ anchor_bottom = 0.021
offset_right = -0.320004 offset_right = -0.320004
offset_bottom = 0.319998 offset_bottom = 0.319998
script = ExtResource("7_c6o8j") script = ExtResource("7_c6o8j")
[node name="DebugMenu" parent="." instance=ExtResource("7_llomk")]
unique_name_in_owner = true
visible = false
layout_mode = 1

View File

@@ -0,0 +1 @@
uid://0jfd7fcxyuq1

View File

@@ -0,0 +1,5 @@
using Chickensoft.GodotNodeInterfaces;
namespace Zennysoft.Game.Ma;
public interface IDebugMenu : IControl;

View File

@@ -0,0 +1 @@
uid://dkibl33wtc58k

View File

@@ -0,0 +1,58 @@
using Chickensoft.AutoInject;
using Chickensoft.Introspection;
using Godot;
using System.Collections.Immutable;
using System.Linq;
using Zennysoft.Ma.Adapter;
namespace Zennysoft.Game.Ma;
[Meta(typeof(IAutoNode))]
public partial class PauseDebugMenu : Control, IDebugMenu
{
public override void _Notification(int what) => this.Notify(what);
[Dependency] private IMap _map => this.DependOn<IMap>(() => new Map());
[Dependency] private IPlayer _player => this.DependOn<IPlayer>();
[Node] public Button LoadNextFloorButton { get; set; } = default!;
[Node] public OptionButton SpawnItemDropDown { get; set; } = default;
private ImmutableList<InventoryItem> SpawnableItems;
private ItemDatabase _itemDatabase;
public override void _Ready()
{
VisibilityChanged += PauseDebugMenu_VisibilityChanged;
LoadNextFloorButton.Pressed += LoadNextFloorButton_Pressed;
_itemDatabase = new ItemDatabase();
SpawnableItems = _itemDatabase.Items;
foreach (var item in SpawnableItems)
SpawnItemDropDown.AddItem(item.ItemName, SpawnableItems.IndexOf(item));
SpawnItemDropDown.ItemSelected += SpawnItemDropDown_ItemSelected;
}
private void SpawnItemDropDown_ItemSelected(long index)
{
var itemToSpawn = SpawnableItems.ElementAt((int)index);
var duplicated = itemToSpawn.Duplicate((int)DuplicateFlags.UseInstantiation) as Node3D;
duplicated.GlobalPosition = new Vector3(_player.CurrentPosition.X, _player.CurrentPosition.Y + 1, _player.CurrentPosition.Z) + (-_player.CurrentBasis.Z * 2);
AddChild(duplicated);
}
private void LoadNextFloorButton_Pressed()
{
_map.SpawnNextFloor();
}
private void PauseDebugMenu_VisibilityChanged()
{
if (Visible)
LoadNextFloorButton.GrabFocus();
else
ReleaseFocus();
}
}

View File

@@ -0,0 +1 @@
uid://l1v4ppubryd3

View File

@@ -1,8 +1,7 @@
[gd_scene load_steps=5 format=3 uid="uid://blbqgw3wosc1w"] [gd_scene load_steps=5 format=3 uid="uid://blbqgw3wosc1w"]
[sub_resource type="Animation" id="Animation_ccrq3"] [sub_resource type="Animation" id="Animation_f1eqn"]
resource_name = "fade_out" length = 0.001
length = 0.5
tracks/0/type = "value" tracks/0/type = "value"
tracks/0/imported = false tracks/0/imported = false
tracks/0/enabled = true tracks/0/enabled = true
@@ -10,10 +9,10 @@ tracks/0/path = NodePath(".:modulate")
tracks/0/interp = 1 tracks/0/interp = 1
tracks/0/loop_wrap = true tracks/0/loop_wrap = true
tracks/0/keys = { tracks/0/keys = {
"times": PackedFloat32Array(0, 0.3), "times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1, 7.7), "transitions": PackedFloat32Array(1),
"update": 0, "update": 0,
"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)] "values": [Color(1, 1, 1, 1)]
} }
[sub_resource type="Animation" id="Animation_bium7"] [sub_resource type="Animation" id="Animation_bium7"]
@@ -32,8 +31,9 @@ tracks/0/keys = {
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)] "values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)]
} }
[sub_resource type="Animation" id="Animation_f1eqn"] [sub_resource type="Animation" id="Animation_ccrq3"]
length = 0.001 resource_name = "fade_out"
length = 0.5
tracks/0/type = "value" tracks/0/type = "value"
tracks/0/imported = false tracks/0/imported = false
tracks/0/enabled = true tracks/0/enabled = true
@@ -41,17 +41,17 @@ tracks/0/path = NodePath(".:modulate")
tracks/0/interp = 1 tracks/0/interp = 1
tracks/0/loop_wrap = true tracks/0/loop_wrap = true
tracks/0/keys = { tracks/0/keys = {
"times": PackedFloat32Array(0), "times": PackedFloat32Array(0, 0.3),
"transitions": PackedFloat32Array(1), "transitions": PackedFloat32Array(1, 7.7),
"update": 0, "update": 0,
"values": [Color(1, 1, 1, 1)] "values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)]
} }
[sub_resource type="AnimationLibrary" id="AnimationLibrary_pmp7u"] [sub_resource type="AnimationLibrary" id="AnimationLibrary_pmp7u"]
_data = { _data = {
"RESET": SubResource("Animation_f1eqn"), &"RESET": SubResource("Animation_f1eqn"),
"fade_in": SubResource("Animation_bium7"), &"fade_in": SubResource("Animation_bium7"),
"fade_out": SubResource("Animation_ccrq3") &"fade_out": SubResource("Animation_ccrq3")
} }
[node name="PauseMenu" type="Control"] [node name="PauseMenu" type="Control"]
@@ -66,7 +66,7 @@ grow_vertical = 2
[node name="AnimationPlayer" type="AnimationPlayer" parent="."] [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
unique_name_in_owner = true unique_name_in_owner = true
libraries = { libraries = {
"": SubResource("AnimationLibrary_pmp7u") &"": SubResource("AnimationLibrary_pmp7u")
} }
[node name="ColorRect" type="ColorRect" parent="."] [node name="ColorRect" type="ColorRect" parent="."]