Idle sector resource production

This commit is contained in:
Anuken
2020-06-28 18:55:42 -04:00
parent fceac4c1a1
commit 0d6657a1e8
5 changed files with 61 additions and 55 deletions

View File

@@ -152,8 +152,8 @@ public class Universe{
//TODO a turn passing may break the core; detect this, send an event and mark the sector as having no base!
for(Planet planet : content.planets()){
for(Sector sector : planet.sectors){
//attacks happen even for sectors without bases - stuff still gets destroyed
if(!sector.isBeingPlayed() && sector.hasSave() && sector.hasWaves()){
//update turns passed for all sectors
if(!sector.isBeingPlayed() && sector.hasSave()){
sector.setTurnsPassed(sector.getTurnsPassed() + 1);
}
}
@@ -162,10 +162,6 @@ public class Universe{
//calculate passive item generation
//TODO make exports only update for sector with items
//TODO items should be added directly to cores!
int[] exports = getTotalExports();
for(int i = 0; i < exports.length; i++){
//data.addItem(content.item(i), exports[i]);
}
Events.fire(new TurnEvent());
}