mirror of
https://github.com/exituser/Brewery.git
synced 2026-09-17 07:49:03 +00:00
Added some more Custom Metrics Charts
This commit is contained in:
@@ -50,16 +50,17 @@ public class BData {
|
||||
Brew.loadPrevSeeds(data);
|
||||
|
||||
List<Integer> brewsCreated = data.getIntegerList("brewsCreated");
|
||||
if (brewsCreated != null && brewsCreated.size() == 6) {
|
||||
if (brewsCreated != null && brewsCreated.size() == 7) {
|
||||
int hash = data.getInt("brewsCreatedH");
|
||||
// Check the hash to prevent tampering with statistics
|
||||
if (brewsCreated.hashCode() == hash) {
|
||||
P.p.brewsCreated = brewsCreated.get(0);
|
||||
P.p.exc = brewsCreated.get(1);
|
||||
P.p.good = brewsCreated.get(2);
|
||||
P.p.norm = brewsCreated.get(3);
|
||||
P.p.bad = brewsCreated.get(4);
|
||||
P.p.terr = brewsCreated.get(5);
|
||||
P.p.brewsCreatedCmd = brewsCreated.get(1);
|
||||
P.p.exc = brewsCreated.get(2);
|
||||
P.p.good = brewsCreated.get(3);
|
||||
P.p.norm = brewsCreated.get(4);
|
||||
P.p.bad = brewsCreated.get(5);
|
||||
P.p.terr = brewsCreated.get(6);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,6 +127,7 @@ public class BData {
|
||||
// Store how many legacy brews were created
|
||||
if (P.p.brewsCreated <= 0) {
|
||||
P.p.brewsCreated = 0;
|
||||
P.p.brewsCreatedCmd = 0;
|
||||
P.p.exc = 0;
|
||||
P.p.good = 0;
|
||||
P.p.norm = 0;
|
||||
@@ -133,7 +135,7 @@ public class BData {
|
||||
P.p.terr = 0;
|
||||
if (!Brew.noLegacy()) {
|
||||
for (Brew brew : Brew.legacyPotions.values()) {
|
||||
P.p.metricsForCreate(brew);
|
||||
P.p.metricsForCreate(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user