mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-23 13:01:38 -08:00
More logic fixes
This commit is contained in:
parent
fc883ca2f3
commit
9898daeee9
1 changed files with 11 additions and 2 deletions
|
|
@ -752,8 +752,17 @@ public class LogicBlock extends Block{
|
|||
//load up the variables that were stored
|
||||
for(int i = 0; i < varcount; i++){
|
||||
LVar var = asm.getVar(names[i]);
|
||||
if(var.objval instanceof Boxed<?> boxed){
|
||||
var.objval = boxed.unbox();
|
||||
if(var != null && (!var.constant || var.name.equals("@unit"))){
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue