mirror of
https://github.com/songoda/UltimateRepairing.git
synced 2024-11-01 00:10:19 +01:00
Fixed an issue with switching between repair types.
This commit is contained in:
parent
ab480dc587
commit
07a334d1b9
@ -41,9 +41,9 @@ public enum RepairType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public RepairType getNext(Player player) {
|
public RepairType getNext(Player player) {
|
||||||
for (int i = 0; i < values().length; i++) {
|
for (int i = 1; i < values().length + 1; i++) {
|
||||||
int index = ordinal();
|
int index = ordinal();
|
||||||
int nextIndex = index + 1;
|
int nextIndex = index + i;
|
||||||
RepairType[] cars = RepairType.values();
|
RepairType[] cars = RepairType.values();
|
||||||
nextIndex %= cars.length;
|
nextIndex %= cars.length;
|
||||||
RepairType type = cars[nextIndex];
|
RepairType type = cars[nextIndex];
|
||||||
|
Loading…
Reference in New Issue
Block a user