(a6437298b) Added LightComponent.IsOn to the SerializableProperties that can be accessed without reflection.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user