mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-13 19:39:04 +07:00
Made logic processors reset variables on edit
This commit is contained in:
parent
e9c93ab3a0
commit
2ae864f4d3
@ -9,6 +9,7 @@ import mindustry.ui.dialogs.*;
|
||||
|
||||
public class MapResizeDialog extends BaseDialog{
|
||||
public static int minSize = 50, maxSize = 500, increment = 50;
|
||||
|
||||
int width, height;
|
||||
|
||||
public MapResizeDialog(MapEditor editor, Intc2 cons){
|
||||
|
@ -317,17 +317,6 @@ public class LogicBlock extends Block{
|
||||
asm.putConst("@links", executor.links.length);
|
||||
asm.putConst("@ipt", instructionsPerTick);
|
||||
|
||||
//store any older variables
|
||||
for(Var var : executor.vars){
|
||||
boolean unit = var.name.equals("@unit");
|
||||
if(!var.constant || unit){
|
||||
BVar dest = asm.getVar(var.name);
|
||||
if(dest != null && (!dest.constant || unit)){
|
||||
dest.value = var.isobj ? var.objval : var.numval;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//inject any extra variables
|
||||
if(assemble != null){
|
||||
assemble.get(asm);
|
||||
|
Loading…
Reference in New Issue
Block a user