From a8240379acf087ded23ce39c9e38e16cbd71f230 Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Mon, 8 Apr 2019 23:12:22 +0300 Subject: [PATCH] (a6437298b) Added LightComponent.IsOn to the SerializableProperties that can be accessed without reflection. --- .../Source/Serialization/SerializableProperty.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Barotrauma/BarotraumaShared/Source/Serialization/SerializableProperty.cs b/Barotrauma/BarotraumaShared/Source/Serialization/SerializableProperty.cs index 3856ef078..b2dbc8a56 100644 --- a/Barotrauma/BarotraumaShared/Source/Serialization/SerializableProperty.cs +++ b/Barotrauma/BarotraumaShared/Source/Serialization/SerializableProperty.cs @@ -443,6 +443,9 @@ namespace Barotrauma case "IsDead": { if (parentObject is Character character) { return character.IsDead; } } break; + case "IsOn": + { if (parentObject is LightComponent lightComponent) { return lightComponent.IsOn; } } + break; } return null; @@ -488,6 +491,9 @@ namespace Barotrauma case "SpeedMultiplier": { if (parentObject is Character character && value is float) { character.SpeedMultiplier = (float)value; return true; } } break; + case "IsOn": + { if (parentObject is LightComponent lightComponent && value is bool) { lightComponent.IsOn = (bool)value; return true; } } + break; } return false;