Add door interaction system with requirements and HUD integration

This commit is contained in:
2025-10-30 00:57:28 +01:00
parent 9c0cd3f549
commit 5ae8b6f08c
21 changed files with 337 additions and 14 deletions

View File

@@ -11,6 +11,7 @@ using GameCore.ECS;
using GameCore.ECS.Interfaces;
using GameCore.Events;
using GameCore.Input;
using GameCore.Interaction;
using GameCore.Inventory;
using GameCore.Logging;
using GameCore.Logging.Interfaces;
@@ -27,6 +28,7 @@ public partial class GamePresenter : Node
[Export] private WeaponDatabase WeaponDatabase { get; set; }
[Export] private EntityArchetype PlayerArchetype { get; set; }
[Export] private SimulationConfigResource SimulationConfig { get; set; }
[Export(PropertyHint.Range, "1.0, 10.0, 0.1")] private float InteractionRange { get; set; } = 3.0f;
private World _world;
private PresenterRegistry _presenterRegistry;
@@ -61,7 +63,8 @@ public partial class GamePresenter : Node
_world = new World(_inputService, _worldQuery, simConfig, _logger);
var effectFactory = new EffectFactory();
var componentFactory = new ComponentFactory(effectFactory);
var requirementFactory = new InteractionRequirementFactory();
var componentFactory = new ComponentFactory(effectFactory, requirementFactory);
var weaponDataService = new GodotWeaponDataService(WeaponDatabase, effectFactory);
_presenterFactory = new PresenterFactory(_world, componentFactory, _presenterRegistry, this);
@@ -80,10 +83,14 @@ public partial class GamePresenter : Node
_world.RegisterSystem(new WeaponSwapSystem());
_world.RegisterSystem(new EquipmentSystem(_world, weaponDataService));
_world.RegisterSystem(new InteractionSystem(InteractionRange));
_world.RegisterSystem(new DoorSystem());
_world.RegisterSystem(new WeaponSystem());
_world.RegisterSystem(new ProjectileSystem());
_world.RegisterSystem(new ProjectileInitializationSystem(_world));
_world.RegisterSystem(new HealingSystem(_world));
_world.RegisterSystem(new DamageSystem(_world));
_world.RegisterSystem(new ProjectileCleanupSystem());