mirror of
https://github.com/haven1433/HexManiacAdvance.git
synced 2026-05-14 00:00:36 -05:00
fix broken tests
This commit is contained in:
parent
81f988ede8
commit
bc66dbf733
|
|
@ -71,6 +71,7 @@ namespace HavenSoft.HexManiac.Core.Models {
|
|||
BattleScriptLines = new ScriptLine[0];
|
||||
AnimationScriptLines = new ScriptLine[0];
|
||||
BattleAIScriptLines = new ScriptLine[0];
|
||||
DocReference = new Dictionary<string, IReadOnlyList<DocLabel>>();
|
||||
WorkDispatcher = InstantDispatch.Instance;
|
||||
CopyLimit = copyLimit;
|
||||
PythonUtility = string.Empty;
|
||||
|
|
|
|||
|
|
@ -1025,7 +1025,10 @@ namespace HavenSoft.HexManiac.Core.ViewModels {
|
|||
|
||||
public ViewPort(string fileName, IDataModel model, IWorkDispatcher dispatcher, Singletons singletons = null, MapTutorialsViewModel tutorials = null, IFileSystem fs = null, PythonTool pythonTool = null, ChangeHistory<ModelDelta> changeHistory = null, EventTemplate eventTemplate = null) {
|
||||
Singletons = singletons ?? new Singletons();
|
||||
this.docs = model.Count >= 0x100 && Singletons.DocReference.TryGetValue(model.GetGameCode().Substring(4), out var docs) ? docs : new List<DocLabel>();
|
||||
this.docs = new List<DocLabel>();
|
||||
if (model.Count >= 0x100 && Singletons.DocReference.TryGetValue(model.GetGameCode().Substring(4), out var docs)) {
|
||||
this.docs = docs;
|
||||
}
|
||||
PythonTool = pythonTool;
|
||||
ownsHistory = changeHistory == null;
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ namespace HavenSoft.HexManiac.Tests {
|
|||
private readonly ScriptParser battle;
|
||||
|
||||
public ScriptTests() {
|
||||
Model.LoadMetadata(BaseModel.GetDefaultMetadatas().First()); // load default script-related lists, like script_compare
|
||||
battle = ViewPort.Tools.CodeTool.BattleScriptParser;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user