From cf3cf65b068d861d5bd65db2fbbb53a55f5bbf4d Mon Sep 17 00:00:00 2001 From: Stedd Date: Sun, 6 Oct 2024 11:50:36 +0200 Subject: [PATCH] Added a PowerLost BoolReference to prevent looping over _activePowerStructures twice in PowerHandler --- Interfaces/IPowerSystem.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Interfaces/IPowerSystem.cs b/Interfaces/IPowerSystem.cs index 3da9c64..07ccab8 100644 --- a/Interfaces/IPowerSystem.cs +++ b/Interfaces/IPowerSystem.cs @@ -1,3 +1,5 @@ +using ScriptableObjectArchitecture; + namespace GameDev.CoreSystems { public interface IPowerSystem @@ -15,7 +17,7 @@ namespace GameDev.CoreSystems /// /// True if consumer demand exceed generator capacity /// - public bool PowerLost { get; set; } + public BoolReference PowerLost { get; set; } /// /// Initialize the power configuration of the entity with the