File tree 1 file changed +12
-1
lines changed
megameklab/src/megameklab/ui/generalUnit
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -247,13 +247,24 @@ public void setFromEntity(Entity en) {
247
247
}
248
248
} else if (en .hasETypeFlag (Entity .ETYPE_JUMPSHIP )) {
249
249
minWalk = 0 ; // Station-keeping drive. Legal for warships, though unusual.
250
+ } else if (en instanceof ConvFighter asf ) { // ConvFighter is a subclass of AeroSpaceFighter so should be checked first
251
+ if (asf .getWeight () <= 5 ) {
252
+ minWalk = 2 ;
253
+ } else {
254
+ minWalk = 1 ;
255
+ }
256
+ } else if (en instanceof AeroSpaceFighter asf ) {
257
+ if (asf .getWeight () <= 5 ) {
258
+ minWalk = 4 ;
259
+ } else {
260
+ minWalk = 3 ;
261
+ }
250
262
}
251
263
// Trailers with no engine have a max speed of zero.
252
264
if (en .isTrailer () && ((en .getEngine () == null )
253
265
|| (en .getEngine ().getEngineType () == Engine .NONE ))) {
254
266
maxWalk = 0 ;
255
267
}
256
-
257
268
spnWalkModel .setMinimum (minWalk );
258
269
spnWalkModel .setMaximum (maxWalk );
259
270
spnWalk .setValue (Math .max (minWalk , en .getOriginalWalkMP ()));
You can’t perform that action at this time.
0 commit comments