Fixed core crash / Fixed error texture on shoot
This commit is contained in:
@@ -164,6 +164,9 @@ public class Block extends BaseBlock {
|
||||
public void playerPlaced(Tile tile){
|
||||
}
|
||||
|
||||
public void removed(Tile tile){
|
||||
}
|
||||
|
||||
/** Called after the block is placed by anyone. */
|
||||
public void placed(Tile tile){
|
||||
}
|
||||
|
||||
@@ -397,6 +397,7 @@ public class Tile implements PosTrait, TargetTrait{
|
||||
|
||||
private void preChanged(){
|
||||
synchronized(tileSetLock){
|
||||
block().removed(this);
|
||||
if(entity != null){
|
||||
entity.removeFromProximity();
|
||||
}
|
||||
|
||||
@@ -86,6 +86,11 @@ public class CoreBlock extends StorageBlock{
|
||||
return state.teams.get(tile.getTeam()).cores.size > 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removed(Tile tile){
|
||||
state.teams.get(tile.getTeam()).cores.removeValue(tile, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void placed(Tile tile){
|
||||
state.teams.get(tile.getTeam()).cores.add(tile);
|
||||
@@ -166,10 +171,8 @@ public class CoreBlock extends StorageBlock{
|
||||
|
||||
@Override
|
||||
public void onDestroyed(Tile tile){
|
||||
//TODO more dramatic effects
|
||||
super.onDestroyed(tile);
|
||||
|
||||
state.teams.get(tile.getTeam()).cores.removeValue(tile, true);
|
||||
//TODO more dramatic effects
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user