From 007238378e61fbe9f12da7e9ad25d15e5bd7b0ec Mon Sep 17 00:00:00 2001 From: Victor Chelaru Date: Tue, 16 Jan 2024 06:22:10 -0700 Subject: [PATCH] Fixed can be set in file logic, oops --- .../OfficialPlugins/PropertyGrid/MainPropertyGridPlugin.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/FRBDK/Glue/OfficialPlugins/PropertyGrid/MainPropertyGridPlugin.cs b/FRBDK/Glue/OfficialPlugins/PropertyGrid/MainPropertyGridPlugin.cs index e2ac489b4..aef705bfd 100644 --- a/FRBDK/Glue/OfficialPlugins/PropertyGrid/MainPropertyGridPlugin.cs +++ b/FRBDK/Glue/OfficialPlugins/PropertyGrid/MainPropertyGridPlugin.cs @@ -223,6 +223,8 @@ private void HandleNamedObjectSelect(NamedObjectSave namedObject, GlueElement cu // 1. I like the solution above to avoid confusion; but there are times when an object has properties which don't // come from file - like the X/Y values of a TileMap. Therefore, some properties should have defaults that stick // around. Eventually this probably means a new property on the VariableDefinition object. + // Update January 16, 2024 - added CanBeSetInFile. If false, then we won't null out the default value because + // there's no way this could be specified in a file so the default value is actually used. var isFile = namedObject.SourceType == SourceType.File; var ati = namedObject.GetAssetTypeInfo(); @@ -244,7 +246,7 @@ private void HandleNamedObjectSelect(NamedObjectSave namedObject, GlueElement cu } foreach(var variable in ati.VariableDefinitions) { - if(variable.CanBeSetInFile == false) + if(variable.CanBeSetInFile) { variable.DefaultValue = null; }