#if UNITY_EDITOR using System; using DepthsOfGreed.HandbookUI; using UnityEngine; // Editor-only fixture. Never attached to the saved scene. public sealed class SupplyContractTestBackend : MonoBehaviour, ISupplyGameplay { public SupplyState state=new SupplyState(); public bool reject; public SupplyState ReadState()=>state; public SupplyCommandResult SetConnected(long id,bool connected) { if(reject)return new SupplyCommandResult(false,"Test: Verbindung gesperrt"); foreach(var t in state.towers)if(t.instanceId==id){t.connected=connected;return new SupplyCommandResult(true);} return new SupplyCommandResult(false,"Turm fehlt"); } public SupplyCommandResult SetPriority(SupplyKind kind) {if(reject)return new SupplyCommandResult(false,"Test: Priorität gesperrt");state.priority=kind;return new SupplyCommandResult(true);} } #endif