|
|
|
@ -48,6 +48,8 @@ public class ItemTemplate {
@@ -48,6 +48,8 @@ public class ItemTemplate {
|
|
|
|
|
public float item_bulk_factor; |
|
|
|
|
public float item_defense_rating; |
|
|
|
|
public EnumSet<Enum.ItemFlags> item_flags = EnumSet.noneOf(Enum.ItemFlags.class); |
|
|
|
|
public EnumSet<Enum.ItemUseFlags> item_use_flags = EnumSet.noneOf(Enum.ItemUseFlags.class); |
|
|
|
|
public int item_initial_charges; |
|
|
|
|
|
|
|
|
|
public ItemTemplate(JSONObject jsonObject) { |
|
|
|
|
|
|
|
|
@ -136,5 +138,14 @@ public class ItemTemplate {
@@ -136,5 +138,14 @@ public class ItemTemplate {
|
|
|
|
|
for (Object o : itemflags) |
|
|
|
|
item_flags.add(Enum.ItemFlags.valueOf((String) o)); |
|
|
|
|
|
|
|
|
|
JSONArray itemUseflags = (JSONArray) jsonObject.get("item_use_flags"); |
|
|
|
|
|
|
|
|
|
if (itemUseflags.isEmpty() == false) |
|
|
|
|
for (Object o : itemUseflags) |
|
|
|
|
item_use_flags.add(Enum.ItemUseFlags.valueOf((String) o)); |
|
|
|
|
|
|
|
|
|
item_initial_charges = ((Long) jsonObject.get("item_initial_charges")).intValue(); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|