Skip to content

Commit

Permalink
fix(pass): Fixed base pass ratio.
Browse files Browse the repository at this point in the history
  • Loading branch information
CarmJos committed Jan 28, 2024
1 parent 6b85e2e commit 79fad86
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ interface SERVER extends Configuration {
ConfiguredMap<Integer, Double> AUTO_PASS_RATIO = ConfigValueMap.builderOf(Integer.class, Double.class)
.asTreeMap().fromString().parseKey(Integer::parseInt).parseValue(Double::parseDouble)
.defaults(m -> {
m.put(2, 1.0);
m.put(5, 0.8);
m.put(20, 0.6);
}).build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ public double getAutoPassRatio(int total) {

double ratio = 1;
for (Map.Entry<Integer, Double> entry : ratioMap.entrySet()) {
if (ratio < 1 && total < entry.getKey()) break;
if (total < entry.getKey()) break;
ratio = entry.getValue();
}

return ratio;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public ResubmitGUI(@NotNull Player player, @NotNull LobbyUserData data,

public void initItems() {
setItem(4, new GUIItem(PluginConfig.RESUBMIT.ITEMS.INFO.prepare(
getRequest().getID(),
getRequest().count(VoteDecision.APPROVE),
getRequest().count(VoteDecision.REJECT),
getRequest().count(VoteDecision.ABSTAIN)
Expand Down

0 comments on commit 79fad86

Please sign in to comment.