Revision 920cbdf9
Added by Leszek Koltunski 11 months ago
src/main/java/org/distorted/objects/RubikObject.java | ||
---|---|---|
27 | 27 |
import org.distorted.jsons.ObjectJson; |
28 | 28 |
import org.distorted.main.R; |
29 | 29 |
import org.distorted.objectlib.main.ObjectType; |
30 |
import org.distorted.objectlib.metadata.Metadata; |
|
30 | 31 |
import org.distorted.objectlib.patterns.RubikPatternList; |
31 | 32 |
import org.distorted.solvers.ImplementedSolversList; |
32 | 33 |
|
... | ... | |
54 | 55 |
|
55 | 56 |
RubikObject(ObjectType type) |
56 | 57 |
{ |
58 |
Metadata meta = type.getMetadata(); |
|
57 | 59 |
mObjectOrdinal= type.ordinal(); |
58 | 60 |
|
59 | 61 |
mUpperName = type.name(); |
60 | 62 |
mLowerName = type.name().toLowerCase(Locale.ENGLISH); |
61 |
mNumScramble = type.getNumScramble();
|
|
62 |
mPrice = type.getPrice();
|
|
63 |
mNumScramble = meta.numScrambles();
|
|
64 |
mPrice = meta.price();
|
|
63 | 65 |
mIsFree = mPrice==0; |
64 |
mIconID = type.getIconID();
|
|
66 |
mIconID = meta.icon();
|
|
65 | 67 |
mJsonID = ObjectJson.getObjectJsonID(mObjectOrdinal); |
66 | 68 |
mMeshID = ObjectMesh.getMeshID(mObjectOrdinal); |
67 | 69 |
mExtrasID = ObjectJson.getExtrasJsonID(mObjectOrdinal); |
... | ... | |
73 | 75 |
mSolverOrdinal = ImplementedSolversList.getSolverOrdinal(mObjectOrdinal); |
74 | 76 |
mExtrasOrdinal = -1; |
75 | 77 |
|
76 |
mObjectVersion = ObjectType.getObjectVersion(mObjectOrdinal);
|
|
77 |
mExtrasVersion = ObjectType.getExtrasVersion(mObjectOrdinal);
|
|
78 |
mObjectVersion = meta.objectVersion();
|
|
79 |
mExtrasVersion = meta.extrasVersion();
|
|
78 | 80 |
} |
79 | 81 |
|
80 | 82 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Big step toward separating TwistyObject metadata.