Compilation for Android on Java 9+

This commit is contained in:
Anuken
2020-08-14 19:45:22 -04:00
parent 75606baf6a
commit b57fb47855
4 changed files with 22 additions and 1 deletions

View File

@@ -501,7 +501,11 @@ public class LExecutor{
//this should avoid any garbage allocation
Var v = exec.vars[value];
if(v.isobj && value != 0){
String strValue = v.objval instanceof String ? (String)v.objval : v.objval == null ? "null" : "[object]";
String strValue = v.objval instanceof String ? (String)v.objval : v.objval == null ? "null" :
v.objval instanceof Content ? "[content]" :
v.objval instanceof Building ? "[building]" :
v.objval instanceof Unit ? "[unit]" :
"[object]";
exec.textBuffer.append(strValue);
}else{

View File

@@ -73,6 +73,12 @@ public class Door extends Wall{
}
}
@Override
public double sense(LAccess sensor){
if(sensor == LAccess.enabled) return open ? 1 : 0;
return super.sense(sensor);
}
@Override
public void control(LAccess type, double p1, double p2, double p3, double p4){
if(type == LAccess.enabled){