This commit is contained in:
Anuken
2021-07-15 10:10:36 -04:00
parent 61d81046ae
commit 8fb7cdaba6
2 changed files with 2 additions and 14 deletions

View File

@@ -633,7 +633,7 @@ public class TypeIO{
}
}
/** Representes a building that has not been resolved yet. */
/** Represents a building that has not been resolved yet. */
public static class BuildingBox{
public int pos;

View File

@@ -249,18 +249,6 @@ public class LogicBlock extends Block{
}
}
@Override
public void onProximityAdded(){
super.onProximityAdded();
//unbox buildings after reading
for(var v : executor.vars){
if(v.objval instanceof BuildingBox b){
v.objval = world.build(b.pos);
}
}
}
public String findLinkName(Block block){
String bname = getLinkName(block);
Bits taken = new Bits(links.size);
@@ -595,7 +583,7 @@ public class LogicBlock extends Block{
for(int i = 0; i < varcount; i++){
BVar dest = asm.getVar(names[i]);
if(dest != null && !dest.constant){
dest.value = values[i];
dest.value = values[i] instanceof BuildingBox box ? world.build(box.pos) : values[i];
}
}
});