mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 03:35:51 +00:00
Changed Script Rating System
This commit is contained in:
parent
090471167c
commit
506c54149e
@ -1251,7 +1251,9 @@ public abstract class ProgrammableAndroid extends SlimefunItem {
|
||||
}
|
||||
|
||||
public float getScriptRating(Config script) {
|
||||
return Math.round(((getScriptRating(script, true) * 100.0f) / getScriptRating(script, true) + getScriptRating(script, false)) * 100.0f) / 100.0f;
|
||||
int positive = getScriptRating(script, true) + 1;
|
||||
int negative = getScriptRating(script, false);
|
||||
return Math.round((positive / (positive + negative)) * 100.0f) / 100.0f;
|
||||
}
|
||||
|
||||
private int getScriptRating(Config script, boolean positive) {
|
||||
|
Loading…
Reference in New Issue
Block a user