From 0def903566a92b220a3fb7ce917ce404384b999c Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Tue, 16 Aug 2022 16:27:56 -0700 Subject: [PATCH] initial state for light sensors --- .../LightSensorSync/Messages/SetIlluminatedMessage.cs | 5 +++++ .../LightSensorSync/Patches/LightSensorPatches.cs | 2 -- .../LightSensorSync/WorldObjects/QSBLightSensor.cs | 10 +++++----- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/QSB/EchoesOfTheEye/LightSensorSync/Messages/SetIlluminatedMessage.cs b/QSB/EchoesOfTheEye/LightSensorSync/Messages/SetIlluminatedMessage.cs index abd96f19..74e517d6 100644 --- a/QSB/EchoesOfTheEye/LightSensorSync/Messages/SetIlluminatedMessage.cs +++ b/QSB/EchoesOfTheEye/LightSensorSync/Messages/SetIlluminatedMessage.cs @@ -9,6 +9,11 @@ internal class SetIlluminatedMessage : QSBWorldObjectMessage -/// TODO: switch this over to some sort of auth system. -/// list of illuminators doesn't work because if a player illuminates and then leaves, -/// it'll be considered illuminated forever until they come back. -/// /// BUG: this breaks in zone2. /// the sector it's enabled in is bigger than the sector the zone2 walls are enabled in :( /// maybe this can be fixed by making the collision group use the same sector. @@ -34,7 +32,9 @@ internal class QSBLightSensor : AuthWorldObject public override void SendInitialState(uint to) { base.SendInitialState(to); - // todo initial state + + this.SendMessage(new SetIlluminatedMessage(AttachedObject._illuminated) { To = to }); + this.SendMessage(new IlluminatingLanternsMessage(AttachedObject._illuminatingDreamLanternList) { To = to }); } public override async UniTask Init(CancellationToken ct)