Skip to content

Commit 6e9d998

Browse files
committed
improve messaging around saving vanilla/custom objects
1 parent ada7c34 commit 6e9d998

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

Dat/FileParsing/SawyerStreamWriter.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ public static void WriteLocoObject(Stream stream, LocoObject obj)
490490
}
491491
}
492492

493-
public static MemoryStream WriteLocoObject(string objName, ObjectType objectType, ObjectSource objectSource, SawyerEncoding encoding, ILogger logger, LocoObject obj, bool allowWritingAsVanilla)
493+
public static MemoryStream WriteLocoObject(string objName, ObjectType objectType, ObjectSource objectSource, SawyerEncoding encoding, ILogger logger, LocoObject obj, bool allowWritingAsVanillaObjectSource)
494494
{
495495
var validationResults = new List<ValidationResult>();
496496
if (!Validator.TryValidateObject(obj.Object, new ValidationContext(obj.Object), validationResults))
@@ -506,10 +506,10 @@ public static MemoryStream WriteLocoObject(string objName, ObjectType objectType
506506

507507
// s5 header
508508
var sourceGame = objectSource.Convert();
509-
if (sourceGame == DatObjectSource.Vanilla && !allowWritingAsVanilla)
509+
if (sourceGame == DatObjectSource.Vanilla && !allowWritingAsVanillaObjectSource)
510510
{
511511
sourceGame = DatObjectSource.Custom;
512-
logger.LogWarning("Cannot save an object as 'Vanilla' - using 'Custom' instead");
512+
logger.LogWarning("Cannot save an object with object source as 'Vanilla' - using 'Custom' instead");
513513
}
514514

515515
var s5Header = new S5Header(objName, 0)

Gui/ViewModels/EditorSettingsWindowViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public void Commit()
2626
Model.ObjDataDirectories = [.. ObjDataDirectories];
2727
}
2828

29-
[Category("Misc"), DisplayName("Allow saving as vanilla object"), Description("If enabled, the editor will allow saving objects with \"Vanilla\" flag set. If disabled, the object will be forcefully saved as \"Custom\" instead.")]
29+
[Category("Misc"), DisplayName("Allow saving with vanilla object source"), Description("If enabled, the editor will allow saving objects with \"Vanilla\" object source flag set. If disabled, the object will be forcefully saved as \"Custom\" instead.")]
3030
public bool AllowSavingAsVanillaObject
3131
{
3232
get => Model.AllowSavingAsVanillaObject;

0 commit comments

Comments
 (0)