More achievement cleanup

This commit is contained in:
Anuken
2020-11-04 12:45:51 -05:00
parent caec96615f
commit e8a5e35f50
11 changed files with 161 additions and 54 deletions

View File

@@ -77,7 +77,7 @@ public class CoreBlock extends StorageBlock{
public void setStats(){
super.setStats();
stats.add(Stat.buildTime, 0, StatUnit.seconds);
stats.remove(Stat.buildTime);
}
@Override

View File

@@ -46,13 +46,17 @@ public class Unloader extends Block{
public class UnloaderBuild extends Building{
public Item sortItem = null;
public Building dumpingTo;
public int offset = 0;
@Override
public void updateTile(){
if(timer(timerUnload, speed / timeScale())){
for(Building other : proximity){
for(int i = 0; i < proximity.size; i++){
int pos = (offset + i) % proximity.size;
var other = proximity.get(pos);
if(other.interactable(team) && other.block.unloadable && other.block.hasItems
&& ((sortItem == null && other.items.total() > 0) || (sortItem != null && other.items.has(sortItem)))){
&& ((sortItem == null && other.items.total() > 0) || (sortItem != null && other.items.has(sortItem)))){
//make sure the item can't be dumped back into this block
dumpingTo = other;
@@ -70,6 +74,11 @@ public class Unloader extends Block{
}
}
}
if(proximity.size > 0){
offset ++;
offset %= proximity.size;
}
}
}