Revision 1f656ca7
Added by Leszek Koltunski almost 2 years ago
src/main/java/org/distorted/objectlib/json/JsonReader.java | ||
---|---|---|
32 | 32 |
|
33 | 33 |
import org.distorted.objectlib.helpers.ObjectFaceShape; |
34 | 34 |
import org.distorted.objectlib.helpers.ObjectSignature; |
35 |
import org.distorted.objectlib.objects.TwistyBandagedGeneric;
|
|
35 |
import org.distorted.objectlib.objects.TwistyBandagedCuboid;
|
|
36 | 36 |
import org.json.JSONArray; |
37 | 37 |
import org.json.JSONException; |
38 | 38 |
import org.json.JSONObject; |
... | ... | |
146 | 146 |
long signature2 = object.getLong("signature2"); |
147 | 147 |
long signature3 = object.getLong("signature3"); |
148 | 148 |
|
149 |
if( mLongName.equals(TwistyBandagedGeneric.OBJECT_NAME) )
|
|
149 |
switch( TwistyBandagedCuboid.getType(mShortName) )
|
|
150 | 150 |
{ |
151 |
mSignature = new ObjectSignature(mShortName,signature1,signature2,signature3); |
|
152 |
} |
|
153 |
else |
|
154 |
{ |
|
155 |
mSignature = new ObjectSignature(signature1,signature2,signature3); |
|
151 |
case 0: mSignature = new ObjectSignature(signature1,signature2,signature3); break; |
|
152 |
case 1: mSignature = new ObjectSignature(mShortName,signature1,signature2,signature3); break; |
|
153 |
case 2: mSignature = new ObjectSignature("333",signature1,signature2,signature3); break; |
|
156 | 154 |
} |
157 | 155 |
} |
158 | 156 |
catch(JSONException ex) |
Also available in: Unified diff
Make the 4 built-in BandagedCuboids use the introduced InitData concept and remove all specific bandaged object classes.