Skip to content

Commit

Permalink
Fixup sprite transition rules and devkitARM project closing (#232)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonko0493 authored Jun 20, 2023
1 parent cbc1329 commit 65841bd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/SerialLoops/Editors/ScriptEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1832,6 +1832,7 @@ private void UpdatePreview()
}
catch (InvalidOperationException)
{
_log.LogWarning($"Unable to determine speaking character in DIALOGUE command in {_script.DisplayName}.");
using Stream noPreviewStream = Assembly.GetCallingAssembly().GetManifestResourceStream("SerialLoops.Graphics.ScriptPreviewError.png");
canvas.DrawImage(SKImage.FromEncodedData(noPreviewStream), new SKPoint(0, 0));
canvas.Flush();
Expand Down Expand Up @@ -1875,6 +1876,10 @@ private void UpdatePreview()
break;
}
}
else if (sprites.ContainsKey(character))
{
sprites[character] = new() { Sprite = spriteParam.Sprite, Positioning = sprites[character].Positioning, PalEffect = spritePaint };
}
}
}
else if (command.Verb == CommandVerb.INVEST_START)
Expand Down
4 changes: 4 additions & 0 deletions src/SerialLoops/MainForm.eto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,10 @@ public void OpenProjectFromPath(string path)
LoopyProgressTracker tracker = new();
_ = new ProgressDialog(() => (OpenProject, result) = Project.OpenProject(path, CurrentConfig, Log, tracker),
() => { }, tracker, "Loading Project");
if (result.State == Project.LoadProjectState.DEVKITARM_OUTOFDATE)
{
OpenProject = null;
}
if (OpenProject is not null && result.State == Project.LoadProjectState.LOOSELEAF_FILES)
{
if (MessageBox.Show("Saved but unbuilt files were detected in the project directory. " +
Expand Down

0 comments on commit 65841bd

Please sign in to comment.