Better logic UI

This commit is contained in:
Anuken
2020-08-09 15:10:13 -04:00
parent 1d5a25ce75
commit 6dca449b08
8 changed files with 103 additions and 62 deletions

View File

@@ -311,20 +311,21 @@ public class LExecutor{
//graphics on headless servers are useless.
if(Vars.headless) return;
Building build = exec.building(target);
if(build instanceof LogicDisplayEntity){
//flush is a special command
if(type == commandFlush){
if(type == commandFlush){
Building build = exec.building(target);
if(build instanceof LogicDisplayEntity){
//flush is a special command
LogicDisplayEntity d = (LogicDisplayEntity)build;
for(int i = 0; i < exec.graphicsBuffer.size; i++){
d.commands.addLast(exec.graphicsBuffer.items[i]);
}
exec.graphicsBuffer.clear();
}else{
//cap graphics buffer size
if(exec.graphicsBuffer.size < 1024){
exec.graphicsBuffer.add(DisplayCmd.get(type, exec.numi(x), exec.numi(y), exec.numi(p1), exec.numi(p2), exec.numi(p3)));
}
}
}else{
//add graphics calls, cap graphics buffer size
if(exec.graphicsBuffer.size < 1024){
exec.graphicsBuffer.add(DisplayCmd.get(type, exec.numi(x), exec.numi(y), exec.numi(p1), exec.numi(p2), exec.numi(p3)));
}
}
}