Dungeon Room Re-import and Old Models Deleted

This commit is contained in:
Pal
2025-09-26 04:06:41 -07:00
parent 928112188b
commit 3aa1d66040
3842 changed files with 29460 additions and 76275 deletions

View File

@@ -33,54 +33,54 @@ public partial class PauseDebugMenu : Control, IDebugMenu
public override void _Ready()
{
VisibilityChanged += PauseDebugMenu_VisibilityChanged;
LoadNextFloorButton.Pressed += LoadNextFloorButton_Pressed;
_itemDatabase = new ItemDatabase();
_spawnableItems = _itemDatabase.Items;
_spawnableEnemies = [];
foreach (var item in _spawnableItems)
SpawnItemDropDown.AddItem(item.ItemName);
VisibilityChanged += PauseDebugMenu_VisibilityChanged;
LoadNextFloorButton.Pressed += LoadNextFloorButton_Pressed;
_itemDatabase = new ItemDatabase();
_spawnableItems = _itemDatabase.Items;
_spawnableEnemies = [];
foreach (var item in _spawnableItems)
SpawnItemDropDown.AddItem(item.ItemName);
_spawnableEnemies = [.. _enemyDatabase.EnemyList];
_spawnableEnemies = [.. _enemyDatabase.EnemyList];
foreach (var enemy in _spawnableEnemies)
{
var tempEnemy = enemy.Instantiate<Enemy>();
SpawnEnemyDropDown.AddItem(tempEnemy.Name);
}
SpawnItemDropDown.AllowReselect = true;
SpawnEnemyDropDown.AllowReselect = true;
foreach (var enemy in _spawnableEnemies)
{
var tempEnemy = enemy.Instantiate<Enemy>();
SpawnEnemyDropDown.AddItem(tempEnemy.Name);
}
SpawnItemDropDown.AllowReselect = true;
SpawnEnemyDropDown.AllowReselect = true;
SpawnItemDropDown.ItemSelected += SpawnItemDropDown_ItemSelected;
SpawnEnemyDropDown.ItemSelected += SpawnEnemyDropDown_ItemSelected;
SpawnItemDropDown.ItemSelected += SpawnItemDropDown_ItemSelected;
SpawnEnemyDropDown.ItemSelected += SpawnEnemyDropDown_ItemSelected;
}
private void SpawnEnemyDropDown_ItemSelected(long index)
{
var enemyToSpawn = _spawnableEnemies.ElementAt((int)index);
var loadedEnemy = enemyToSpawn.Instantiate<Enemy>();
AddChild(loadedEnemy);
loadedEnemy.GlobalPosition = new Vector3(_player.CurrentPosition.X, _player.CurrentPosition.Y + 1, _player.CurrentPosition.Z) + (-_player.CurrentBasis.Z * 2);
var enemyToSpawn = _spawnableEnemies.ElementAt((int)index);
var loadedEnemy = enemyToSpawn.Instantiate<Enemy>();
AddChild(loadedEnemy);
loadedEnemy.GlobalPosition = new Vector3(_player.CurrentPosition.X, _player.CurrentPosition.Y + 1, _player.CurrentPosition.Z) + (-_player.CurrentBasis.Z * 2);
}
private void SpawnItemDropDown_ItemSelected(long index)
{
var itemToSpawn = _spawnableItems.ElementAt((int)index);
var duplicated = itemToSpawn.Duplicate((int)DuplicateFlags.UseInstantiation) as Node3D;
AddChild(duplicated);
duplicated.GlobalPosition = new Vector3(_player.CurrentPosition.X, _player.CurrentPosition.Y + 1, _player.CurrentPosition.Z) + (-_player.CurrentBasis.Z * 2);
var itemToSpawn = _spawnableItems.ElementAt((int)index);
var duplicated = itemToSpawn.Duplicate((int)DuplicateFlags.UseInstantiation) as Node3D;
AddChild(duplicated);
duplicated.GlobalPosition = new Vector3(_player.CurrentPosition.X, _player.CurrentPosition.Y + 1, _player.CurrentPosition.Z) + (-_player.CurrentBasis.Z * 2);
}
private void LoadNextFloorButton_Pressed()
{
_map.SpawnNextFloor();
_map.SpawnNextFloor();
}
private void PauseDebugMenu_VisibilityChanged()
{
if (Visible)
LoadNextFloorButton.GrabFocus();
else
ReleaseFocus();
if (Visible)
LoadNextFloorButton.GrabFocus();
else
ReleaseFocus();
}
}
}