quantum-space-buddies/QSB/EchoesOfTheEye/AirlockSync/Messages/AirlockInitialStateMessage.cs
2022-07-25 10:19:16 +01:00

18 lines
680 B
C#

using QSB.EchoesOfTheEye.AirlockSync.WorldObjects;
using QSB.Messaging;
namespace QSB.EchoesOfTheEye.AirlockSync.Messages;
internal class AirlockInitialStateMessage : QSBWorldObjectMessage<QSBGhostAirlock, (bool innerDoorOpen, bool outerDoorOpen, bool pressurized)>
{
public AirlockInitialStateMessage(bool innerDoorOpen, bool outerDoorOpen, bool pressurized) : base((innerDoorOpen, outerDoorOpen, pressurized)) { }
public override void OnReceiveRemote()
{
var airlock = WorldObject.AttachedObject;
airlock._innerDoor.SetOpenImmediate(Data.innerDoorOpen);
airlock._outerDoor.SetOpenImmediate(Data.outerDoorOpen);
airlock.SetPressurization(Data.pressurized);
}
}