Cleanup previous refactor, fix floor count
This commit is contained in:
@@ -4,7 +4,6 @@ using Chickensoft.Introspection;
|
||||
using Godot;
|
||||
using Zennysoft.Game.Abstractions;
|
||||
using Zennysoft.Ma.Adapter;
|
||||
using Zennysoft.Ma.Adapter;
|
||||
|
||||
namespace Zennysoft.Game.Ma;
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@ public partial class Game : Node3D, IGame
|
||||
|
||||
IGameEventDepot IProvide<IGameEventDepot>.Value() => GameEventDepot;
|
||||
|
||||
IMap IProvide<IMap>.Value() => Map;
|
||||
|
||||
private static SimpleInjector.Container _container;
|
||||
|
||||
public IInstantiator Instantiator { get; set; } = default!;
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Threading.Tasks;
|
||||
using Zennysoft.Game.Abstractions;
|
||||
using Zennysoft.Ma.Adapter;
|
||||
|
||||
public interface IGame : IProvide<IGameRepo>, IProvide<IGameEventDepot>, IProvide<IGame>, IProvide<IPlayer>, IProvide<ISaveChunk<GameData>>, INode3D
|
||||
public interface IGame : IProvide<IGameRepo>, IProvide<IGameEventDepot>, IProvide<IGame>, IProvide<IPlayer>, IProvide<IMap>, IProvide<ISaveChunk<GameData>>, INode3D
|
||||
{
|
||||
void LoadExistingGame();
|
||||
|
||||
|
||||
@@ -28,6 +28,8 @@ public partial class InventoryMenu : Control, IInventoryMenu
|
||||
|
||||
[Dependency] public IPlayer Player => this.DependOn<IPlayer>();
|
||||
|
||||
[Dependency] public IMap _map => this.DependOn<IMap>();
|
||||
|
||||
[Dependency] public IGameEventDepot GameEventDepot => this.DependOn<IGameEventDepot>();
|
||||
|
||||
private InventoryPageNumber _currentPageNumber = InventoryPageNumber.FirstPage;
|
||||
@@ -245,8 +247,7 @@ public partial class InventoryMenu : Control, IInventoryMenu
|
||||
|
||||
private void PopulatePlayerInfo()
|
||||
{
|
||||
// TODO: Fix
|
||||
FloorLabel.Text = $"Floor 01";
|
||||
FloorLabel.Text = $"Floor {_map.CurrentFloorNumber:D2}";
|
||||
|
||||
if (ItemSlots.Any())
|
||||
{
|
||||
|
||||
@@ -22,6 +22,8 @@ public interface IMap : INode3D, IProvide<ISaveChunk<MapData>>
|
||||
Transform3D GetPlayerSpawnPosition();
|
||||
|
||||
IDungeonRoom GetPlayersCurrentRoom();
|
||||
|
||||
public int CurrentFloorNumber { get; }
|
||||
}
|
||||
|
||||
|
||||
@@ -52,6 +54,8 @@ public partial class Map : Node3D, IMap
|
||||
|
||||
public IDungeonFloor CurrentFloor { get; private set; }
|
||||
|
||||
public int CurrentFloorNumber { get; private set; } = 0;
|
||||
|
||||
public void OnResolved()
|
||||
{
|
||||
FloorScenes = [];
|
||||
@@ -95,6 +99,7 @@ public partial class Map : Node3D, IMap
|
||||
Player.TeleportPlayer(transform);
|
||||
CurrentFloor.FloorIsLoaded = true;
|
||||
Game.NextFloorLoaded();
|
||||
CurrentFloorNumber += 1;
|
||||
}
|
||||
|
||||
public IDungeonRoom GetPlayersCurrentRoom()
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
namespace Zennysoft.Game.Abstractions;
|
||||
|
||||
public interface IKillable
|
||||
{
|
||||
public void Die();
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
uid://djmmgvqb2rcde
|
||||
Reference in New Issue
Block a user