Global sector items / Mod file reading
This commit is contained in:
@@ -163,6 +163,21 @@ public class Universe{
|
||||
save();
|
||||
}
|
||||
|
||||
/** This method is expensive to call; only do so sparingly. */
|
||||
public ItemSeq getGlobalResources(){
|
||||
ItemSeq count = new ItemSeq();
|
||||
|
||||
for(Planet planet : content.planets()){
|
||||
for(Sector sector : planet.sectors){
|
||||
if(sector.hasSave()){
|
||||
count.add(sector.calculateItems());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
public float secondsMod(float mod, float scale){
|
||||
return (seconds / scale) % mod;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user