File tree Expand file tree Collapse file tree 4 files changed +12
-9
lines changed Expand file tree Collapse file tree 4 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -191,7 +191,7 @@ public enum TechType {
191
191
Arrays .stream (TechType .values ()).forEach (v -> idToEnum [v .id ] = v );
192
192
}
193
193
194
- final int id ;
194
+ public final int id ;
195
195
196
196
TechType (final int id ) {
197
197
this .id = id ;
Original file line number Diff line number Diff line change @@ -835,14 +835,17 @@ public UnitType getBuildType() {
835
835
* @see #isTraining
836
836
*/
837
837
public List <UnitType > getTrainingQueue () {
838
- return IntStream .range (0 , getTrainingQueueCount ())
839
- .mapToObj (i -> game .isLatComEnabled () && self ().trainingQueue [i ].valid (game .getFrameCount ()) ?
840
- self ().trainingQueue [i ].get () :
841
- UnitType .idToEnum [unitData .getTrainingQueue (i )])
842
- .collect (Collectors .toList ());
838
+ return IntStream .range (0 , getTrainingQueueCount ()).mapToObj (this ::getTrainingQueueAt ).collect (Collectors .toList ());
839
+ }
840
+
841
+ public UnitType getTrainingQueueAt (int i ) {
842
+ if (game .isLatComEnabled () && self ().trainingQueue [i ].valid (game .getFrameCount ())) {
843
+ return self ().trainingQueue [i ].get ();
844
+ }
845
+ return UnitType .idToEnum [unitData .getTrainingQueue (i )];
843
846
}
844
847
845
- int getTrainingQueueCount () {
848
+ public int getTrainingQueueCount () {
846
849
int count = unitData .getTrainingQueueCount ();
847
850
if (game .isLatComEnabled () && self ().trainingQueueCount .valid (game .getFrameCount ())) {
848
851
return count + self ().trainingQueueCount .get ();
Original file line number Diff line number Diff line change @@ -252,7 +252,7 @@ public enum UnitType {
252
252
Arrays .stream (UnitType .values ()).forEach (v -> idToEnum [v .id ] = v );
253
253
}
254
254
255
- final int id ;
255
+ public final int id ;
256
256
257
257
UnitType (final int id ) {
258
258
this .id = id ;
Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ public enum UpgradeType {
205
205
Arrays .stream (UpgradeType .values ()).forEach (v -> idToEnum [v .id ] = v );
206
206
}
207
207
208
- final int id ;
208
+ public final int id ;
209
209
210
210
UpgradeType (final int id ) {
211
211
this .id = id ;
You can’t perform that action at this time.
0 commit comments