Fixed reconstructor commanding in multiplayer
This commit is contained in:
@@ -890,6 +890,11 @@ public class Block extends UnlockableContent implements Senseable{
|
||||
|
||||
}
|
||||
|
||||
/** Called when building of this block begins. */
|
||||
public void placeBegan(Tile tile, Block previous, @Nullable Unit builder){
|
||||
placeBegan(tile, previous);
|
||||
}
|
||||
|
||||
/** Called right before building of this block begins. */
|
||||
public void beforePlaceBegan(Tile tile, Block previous){
|
||||
|
||||
|
||||
@@ -115,9 +115,9 @@ public class Build{
|
||||
build.prevBuild = prevBuild;
|
||||
if(unit != null && unit.getControllerName() != null) build.lastAccessed = unit.getControllerName();
|
||||
|
||||
result.placeBegan(tile, previous);
|
||||
|
||||
Events.fire(new BlockBuildBeginEvent(tile, team, unit, false));
|
||||
|
||||
result.placeBegan(tile, previous, unit);
|
||||
}
|
||||
|
||||
/** Returns whether a tile can be placed at this location by this team. */
|
||||
|
||||
@@ -164,7 +164,7 @@ public class CoreBlock extends StorageBlock{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void placeBegan(Tile tile, Block previous){
|
||||
public void placeBegan(Tile tile, Block previous, Unit builder){
|
||||
//finish placement immediately when a block is replaced.
|
||||
if(previous instanceof CoreBlock){
|
||||
tile.setBlock(this, tile.team());
|
||||
@@ -181,6 +181,8 @@ public class CoreBlock extends StorageBlock{
|
||||
|
||||
nextItems = null;
|
||||
}
|
||||
|
||||
Events.fire(new BlockBuildEndEvent(tile, builder, tile.team(), false, null));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user