mirror of
https://github.com/Retera/WarsmashModEngine.git
synced 2022-07-31 17:38:59 +02:00
Merge
This commit is contained in:
commit
0e37ed51cc
@ -707,10 +707,7 @@ public class Jass2 {
|
|||||||
final Double timeout = arguments.get(1).visit(RealJassValueVisitor.getInstance());
|
final Double timeout = arguments.get(1).visit(RealJassValueVisitor.getInstance());
|
||||||
final boolean periodic = arguments.get(2).visit(BooleanJassValueVisitor.getInstance());
|
final boolean periodic = arguments.get(2).visit(BooleanJassValueVisitor.getInstance());
|
||||||
final JassFunction handlerFunc = nullable(arguments, 3, JassFunctionJassValueVisitor.getInstance());
|
final JassFunction handlerFunc = nullable(arguments, 3, JassFunctionJassValueVisitor.getInstance());
|
||||||
if (timer == null) {
|
if ((timer != null) && !timer.isRunning()) {
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if (!timer.isRunning()) {
|
|
||||||
timer.setTimeoutTime(timeout.floatValue());
|
timer.setTimeoutTime(timeout.floatValue());
|
||||||
timer.setRepeats(periodic);
|
timer.setRepeats(periodic);
|
||||||
timer.setHandlerFunc(handlerFunc);
|
timer.setHandlerFunc(handlerFunc);
|
||||||
@ -728,6 +725,7 @@ public class Jass2 {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
jassProgramVisitor.getJassNativeManager().createNative("TimerGetRemaining", new JassFunction() {
|
jassProgramVisitor.getJassNativeManager().createNative("TimerGetRemaining", new JassFunction() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope,
|
public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope,
|
||||||
final TriggerExecutionScope triggerScope) {
|
final TriggerExecutionScope triggerScope) {
|
||||||
@ -2638,6 +2636,16 @@ public class Jass2 {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
jassProgramVisitor.getJassNativeManager().createNative("GetPlayerState", new JassFunction() {
|
||||||
|
@Override
|
||||||
|
public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope,
|
||||||
|
final TriggerExecutionScope triggerScope) {
|
||||||
|
final CPlayer player = arguments.get(0).visit(ObjectJassValueVisitor.getInstance());
|
||||||
|
final CPlayerState whichPlayerState = arguments.get(1).visit(ObjectJassValueVisitor.getInstance());
|
||||||
|
return new IntegerJassValue(
|
||||||
|
player.getPlayerState(CommonEnvironment.this.simulation, whichPlayerState));
|
||||||
|
}
|
||||||
|
});
|
||||||
jassProgramVisitor.getJassNativeManager().createNative("GetPlayerTechResearched", new JassFunction() {
|
jassProgramVisitor.getJassNativeManager().createNative("GetPlayerTechResearched", new JassFunction() {
|
||||||
@Override
|
@Override
|
||||||
public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope,
|
public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope,
|
||||||
|
Loading…
Reference in New Issue
Block a user