Added a PowerLost BoolReference to prevent looping over _activePowerStructures twice in PowerHandler

This commit is contained in:
Stedd 2024-10-06 11:50:36 +02:00
parent 510aaf1b67
commit cf3cf65b06
1 changed files with 3 additions and 1 deletions

View File

@ -1,3 +1,5 @@
using ScriptableObjectArchitecture;
namespace GameDev.CoreSystems namespace GameDev.CoreSystems
{ {
public interface IPowerSystem public interface IPowerSystem
@ -15,7 +17,7 @@ namespace GameDev.CoreSystems
/// <summary> /// <summary>
/// True if consumer demand exceed generator capacity /// True if consumer demand exceed generator capacity
/// </summary> /// </summary>
public bool PowerLost { get; set; } public BoolReference PowerLost { get; set; }
/// <summary> /// <summary>
/// Initialize the power configuration of the entity with the <see cref="SoPowerConfig"/> /// Initialize the power configuration of the entity with the <see cref="SoPowerConfig"/>