Project

General

Profile

« Previous | Next » 

Revision dd8c5356

Added by Leszek Koltunski almost 3 years ago

solve the 'wasDownloadableButNowIsBuiltIn()' bug in 1.9.6 and 1.9.7.

View differences:

src/main/java/org/distorted/objects/RubikObjectList.java
178 178
    if( ordinal==ObjectConstants.REX_3  ) return 16;
179 179
    if( ordinal==ObjectConstants.MIRR_3 ) return 16;
180 180

  
181
    ObjectType type = ObjectType.getObject(ordinal);
182
    return type.getNumScramble();
181
    // in 1.9.6 & 1.9.7 there is a bug with downloadable objects (in this very function!):
182
    // All of those have DBLevel equal to CUBE_3's DBlevel (in 1.9.7!), i.e. 17.
183
    // This will be a problem when we release a new version of the app which has some of the
184
    // previously downloadable objects built-in. Thus: in case of those, we need to keep using
185
    // 17.
186

  
187
    if( ObjectType.wasDownloadableButNowIsBuiltIn(ordinal) )
188
      {
189
      return 17;
190
      }
191

  
192
    return ObjectType.getObject(ordinal).getNumScramble();
183 193
    }
184 194

  
185 195
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff