More logic fixes
This commit is contained in:
@@ -752,8 +752,17 @@ public class LogicBlock extends Block{
|
|||||||
//load up the variables that were stored
|
//load up the variables that were stored
|
||||||
for(int i = 0; i < varcount; i++){
|
for(int i = 0; i < varcount; i++){
|
||||||
LVar var = asm.getVar(names[i]);
|
LVar var = asm.getVar(names[i]);
|
||||||
if(var.objval instanceof Boxed<?> boxed){
|
if(var != null && (!var.constant || var.name.equals("@unit"))){
|
||||||
var.objval = boxed.unbox();
|
var value = values[i];
|
||||||
|
if(value instanceof Boxed<?> boxed) value = boxed.unbox();
|
||||||
|
|
||||||
|
if(value instanceof Number num){
|
||||||
|
var.numval = num.doubleValue();
|
||||||
|
var.isobj = false;
|
||||||
|
}else{
|
||||||
|
var.objval = value;
|
||||||
|
var.isobj = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user