Bugfixes / Built-in rate limits

This commit is contained in:
Anuken
2020-05-15 15:45:23 -04:00
parent 9f20de427e
commit bc28dd392b
15 changed files with 106 additions and 32 deletions

View File

@@ -18,10 +18,10 @@ public class SaveMeta{
public StringMap tags;
public String[] mods;
/** These are in items/second. */
public ObjectFloatMap<Item> productionRates;
public ObjectFloatMap<Item> exportRates;
public boolean hasProduction;
public SaveMeta(int version, long timestamp, long timePlayed, int build, String map, int wave, Rules rules, ObjectFloatMap<Item> productionRates, StringMap tags){
public SaveMeta(int version, long timestamp, long timePlayed, int build, String map, int wave, Rules rules, ObjectFloatMap<Item> exportRates, StringMap tags){
this.version = version;
this.build = build;
this.timestamp = timestamp;
@@ -31,8 +31,8 @@ public class SaveMeta{
this.rules = rules;
this.tags = tags;
this.mods = JsonIO.read(String[].class, tags.get("mods", "[]"));
this.productionRates = productionRates;
this.exportRates = exportRates;
productionRates.each(e -> hasProduction |= e.value > 0.001f);
exportRates.each(e -> hasProduction |= e.value > 0.001f);
}
}