Fixed #5584
This commit is contained in:
@@ -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 static class BuildingBox{
|
||||||
public int pos;
|
public int pos;
|
||||||
|
|
||||||
|
|||||||
@@ -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){
|
public String findLinkName(Block block){
|
||||||
String bname = getLinkName(block);
|
String bname = getLinkName(block);
|
||||||
Bits taken = new Bits(links.size);
|
Bits taken = new Bits(links.size);
|
||||||
@@ -595,7 +583,7 @@ public class LogicBlock extends Block{
|
|||||||
for(int i = 0; i < varcount; i++){
|
for(int i = 0; i < varcount; i++){
|
||||||
BVar dest = asm.getVar(names[i]);
|
BVar dest = asm.getVar(names[i]);
|
||||||
if(dest != null && !dest.constant){
|
if(dest != null && !dest.constant){
|
||||||
dest.value = values[i];
|
dest.value = values[i] instanceof BuildingBox box ? world.build(box.pos) : values[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user