File tree Expand file tree Collapse file tree 10 files changed +16
-12
lines changed Expand file tree Collapse file tree 10 files changed +16
-12
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ public enum BulletType {
59
59
Arrays .stream (BulletType .values ()).forEach (v -> idToEnum [v .id ] = v );
60
60
}
61
61
62
- final int id ;
62
+ public final int id ;
63
63
64
64
BulletType (final int id ) {
65
65
this .id = id ;
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ public enum CommandType {
32
32
Arrays .stream (CommandType .values ()).forEach (v -> idToEnum [v .id ] = v );
33
33
}
34
34
35
- final int id ;
35
+ public final int id ;
36
36
37
37
CommandType (final int id ) {
38
38
this .id = id ;
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ public enum EventType {
33
33
Arrays .stream (EventType .values ()).forEach (v -> idToEnum [v .id ] = v );
34
34
}
35
35
36
- final int id ;
36
+ public final int id ;
37
37
38
38
EventType (int id ) {
39
39
this .id = id ;
Original file line number Diff line number Diff line change @@ -35,8 +35,7 @@ public enum GameType {
35
35
Arrays .stream (GameType .values ()).forEach (v -> idToEnum [v .id ] = v );
36
36
}
37
37
38
-
39
- final int id ;
38
+ public final int id ;
40
39
41
40
GameType (final int id ) {
42
41
this .id = id ;
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ public enum Latency {
23
23
Arrays .stream (Latency .values ()).forEach (v -> idToEnum [v .id ] = v );
24
24
}
25
25
26
- final int id ;
26
+ public final int id ;
27
27
28
28
Latency (final int id ) {
29
29
this .id = id ;
Original file line number Diff line number Diff line change @@ -209,8 +209,7 @@ public enum Order {
209
209
Arrays .stream (Order .values ()).forEach (v -> idToEnum [v .id ] = v );
210
210
}
211
211
212
-
213
- final int id ;
212
+ public final int id ;
214
213
215
214
Order (final int id ) {
216
215
this .id = id ;
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ public enum PlayerType {
26
26
Arrays .stream (PlayerType .values ()).forEach (v -> idToEnum [v .id ] = v );
27
27
}
28
28
29
- final int id ;
29
+ public final int id ;
30
30
31
31
PlayerType (final int id ) {
32
32
this .id = id ;
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ public enum Race {
58
58
Arrays .stream (Race .values ()).forEach (v -> idToEnum [v .id ] = v );
59
59
}
60
60
61
- final int id ;
61
+ public final int id ;
62
62
63
63
Race (final int id ) {
64
64
this .id = id ;
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ enum ShapeType {
21
21
Arrays .stream (ShapeType .values ()).forEach (v -> idToEnum [v .id ] = v );
22
22
}
23
23
24
- final int id ;
24
+ public final int id ;
25
25
26
26
ShapeType (final int id ) {
27
27
this .id = id ;
Original file line number Diff line number Diff line change @@ -826,7 +826,7 @@ public UnitType getBuildType() {
826
826
}
827
827
828
828
/**
829
- * Retrieves the list of units queued up to be trained.
829
+ * Retrieves the list of unit types queued up to be trained.
830
830
*
831
831
* @return a List<UnitType> containing all the types that are in this factory's training
832
832
* queue, from oldest to most recent.
@@ -838,13 +838,19 @@ public List<UnitType> getTrainingQueue() {
838
838
return IntStream .range (0 , getTrainingQueueCount ()).mapToObj (this ::getTrainingQueueAt ).collect (Collectors .toList ());
839
839
}
840
840
841
+ /**
842
+ * Retrieves a unit type from a specific index in the queue of units this unit is training.
843
+ */
841
844
public UnitType getTrainingQueueAt (int i ) {
842
845
if (game .isLatComEnabled () && self ().trainingQueue [i ].valid (game .getFrameCount ())) {
843
846
return self ().trainingQueue [i ].get ();
844
847
}
845
848
return UnitType .idToEnum [unitData .getTrainingQueue (i )];
846
849
}
847
850
851
+ /**
852
+ * Retrieves the number of units in this unit's training queue.
853
+ */
848
854
public int getTrainingQueueCount () {
849
855
int count = unitData .getTrainingQueueCount ();
850
856
if (game .isLatComEnabled () && self ().trainingQueueCount .valid (game .getFrameCount ())) {
You can’t perform that action at this time.
0 commit comments