only consider a script pointer as invalid if it points to something other than XSERun / NoInfoRun

This commit is contained in:
haven1433 2023-07-19 21:40:05 -05:00
parent c76acd2536
commit e8bae98ea3
2 changed files with 3 additions and 1 deletions

View File

@ -89,6 +89,8 @@ namespace HavenSoft.HexManiac.Core.Models.Map {
public ModelTable MapScripts {
get => Element.GetSubTable("mapscripts");
}
public override string ToString() => $"({Group}, {Map})";
}
public record LayoutPrototype(int PrimaryBlockset, int SecondaryBlockset, int BorderBlock);

View File

@ -269,7 +269,7 @@ namespace HavenSoft.HexManiac.Core.ViewModels.Map {
}
var run = element.Model.GetNextRun(address);
if (run.Start < address || run is not XSERun) {
if (run.Start < address || (run is not XSERun && run is not NoInfoRun)) {
ScriptAddressError = IsValidScriptFreespace(address) ? "Freespace found at that address." : "No script found at that address.";
HasScriptAddressError = true;
return;