Disabled spawner radius/warning when waves off

This commit is contained in:
Anuken
2020-10-16 11:27:17 -04:00
parent 2f54edf34f
commit f5decdaa1c
4 changed files with 23 additions and 6 deletions

View File

@@ -196,6 +196,21 @@ public class CoreBlock extends StorageBlock{
return false;
}
@Override
public void onDestroyed(){
super.onDestroyed();
//add a spawn to the map for future reference - waves should be disabled, so it shouldn't matter
if(state.isCampaign() && team == state.rules.waveTeam){
//do not recache
tile.setOverlayQuiet(Blocks.spawn);
if(!spawner.getSpawns().contains(tile)){
spawner.getSpawns().add(tile);
}
}
}
@Override
public void drawLight(){
Drawf.light(team, x, y, 30f * size, Pal.accent, 0.5f + Mathf.absin(20f, 0.1f));