WIP map notification instruction
This commit is contained in:
@@ -1252,5 +1252,20 @@ public class LExecutor{
|
||||
}
|
||||
}
|
||||
|
||||
public static class FlushNotificationI implements LInstruction{
|
||||
|
||||
@Override
|
||||
public void run(LExecutor exec){
|
||||
//skip back to self until possible
|
||||
if(ui.hudfrag.hasToast()){
|
||||
exec.var(varCounter).numval --;
|
||||
return;
|
||||
}
|
||||
|
||||
ui.hudfrag.showToast(Icon.info, exec.textBuffer.toString());
|
||||
exec.textBuffer.setLength(0);
|
||||
}
|
||||
}
|
||||
|
||||
//endregion
|
||||
}
|
||||
|
||||
@@ -1271,4 +1271,27 @@ public class LStatements{
|
||||
return new SetRuleI(rule, builder.var(value));
|
||||
}
|
||||
}
|
||||
|
||||
@RegisterStatement("notification")
|
||||
public static class FlushNotificationStatement extends LStatement{
|
||||
|
||||
@Override
|
||||
public void build(Table table){
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean privileged(){
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Color color(){
|
||||
return Pal.logicWorld;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LInstruction build(LAssembler builder){
|
||||
return new FlushNotificationI();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user