Skip to content

Commit 0a5a0a4

Browse files
committed
JASS native BlzLoadTOCFile
1 parent 3eb0d21 commit 0a5a0a4

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

  • core/src/com/etheller/warsmash/parsers/jass

core/src/com/etheller/warsmash/parsers/jass/Jass2.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3888,6 +3888,21 @@ public void remove() {
38883888
}
38893889
return null;
38903890
});
3891+
3892+
// Frames
3893+
jassProgramVisitor.getJassNativeManager().createNative("BlzLoadTOCFile",
3894+
(arguments, globalScope, triggerScope) -> {
3895+
final String tocFileName = nullableWithWarning(arguments, 0, StringJassValueVisitor.getInstance(), globalScope, triggerScope);
3896+
if (tocFileName != null) {
3897+
try {
3898+
this.gameUI.loadTOCFile(tocFileName);
3899+
} catch (final IOException e) {
3900+
throw new RuntimeException(e);
3901+
}
3902+
}
3903+
return BooleanJassValue.TRUE;
3904+
});
3905+
38913906
jassProgramVisitor.getJassNativeManager().createNative("AddPlayerTechResearched",
38923907
(arguments, globalScope, triggerScope) -> {
38933908
final CPlayer player = arguments.get(0).visit(ObjectJassValueVisitor.getInstance());

0 commit comments

Comments
 (0)