Revision e1a86bf2
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objectlib/json/JsonWriter.java | ||
---|---|---|
36 | 36 |
import org.distorted.objectlib.helpers.ObjectSticker; |
37 | 37 |
import org.distorted.objectlib.helpers.ScrambleState; |
38 | 38 |
import org.distorted.objectlib.main.TwistyObject; |
39 |
import org.distorted.objectlib.main.ObjectType; |
|
39 | 40 |
|
40 | 41 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
41 | 42 |
|
... | ... | |
354 | 355 |
{ |
355 | 356 |
JSONObject metadata = new JSONObject(); |
356 | 357 |
|
358 |
ObjectType type = object.getObjectType(); |
|
359 |
|
|
357 | 360 |
metadata.put("longname" , object.getObjectName() ); |
358 | 361 |
metadata.put("inventor" , object.getInventor()); |
359 | 362 |
metadata.put("year" , object.getYearOfInvention()); |
360 | 363 |
metadata.put("complexity" , object.getComplexity()); |
361 | 364 |
metadata.put("size" , object.getSize() ); |
362 | 365 |
metadata.put("solved_func", object.getSolvedFunctionIndex() ); |
366 |
metadata.put("scrambles" , type.getNumScramble() ); |
|
367 |
metadata.put("shortname" , type.name() ); |
|
363 | 368 |
|
364 | 369 |
return metadata; |
365 | 370 |
} |
Also available in: Unified diff
Move the main app to the 'J1M1' object creation mode, i.e. create them from the Json files and using the Dmesh fiels as well.
Make it possible for any app descending from the 'objectlib' to use any of the J0M0, J0M1, J1M0, J1M1 modes.