Overhaul item and inventory and clean up bits and pieces
This commit is contained in:
@@ -33,7 +33,7 @@ public partial class PauseDebugMenu : Control, IDebugMenu
|
||||
private readonly string _floorFilePath = @"res://src/map/dungeon/floors/";
|
||||
private readonly string _enemyFilePath = @"res://src/enemy/enemy_types";
|
||||
|
||||
private ImmutableList<InventoryItem> _spawnableItems;
|
||||
private ImmutableList<IBaseInventoryItem> _spawnableItems;
|
||||
private ImmutableList<string> _spawnableEnemies;
|
||||
|
||||
private ItemDatabase _itemDatabase;
|
||||
@@ -110,7 +110,7 @@ public partial class PauseDebugMenu : Control, IDebugMenu
|
||||
|
||||
private void SpawnItemDropDown_ItemSelected(long index)
|
||||
{
|
||||
var itemToSpawn = _spawnableItems.ElementAt((int)index);
|
||||
var itemToSpawn = _spawnableItems.ElementAt((int)index) as Node3D;
|
||||
var duplicated = itemToSpawn.Duplicate((int)DuplicateFlags.UseInstantiation) as Node3D;
|
||||
_game.AddChild(duplicated);
|
||||
duplicated.GlobalPosition = new Vector3(_player.GlobalPosition.X, _player.GlobalPosition.Y + 1, _player.GlobalPosition.Z) + (-_player.GlobalBasis.Z * 2);
|
||||
|
||||
Reference in New Issue
Block a user