Creates assets in world from JSON

This commit is contained in:
2018-12-04 01:36:00 +01:00
parent 5a19f801b3
commit 6bb6d88371
15 changed files with 234 additions and 91 deletions

View File

@ -26,6 +26,8 @@
package opensesim.sesim.Assets;
import opensesim.world.AbstractAsset;
import opensesim.world.World;
import org.json.JSONObject;
/**
*
@ -33,6 +35,12 @@ import opensesim.world.AbstractAsset;
*/
public class CryptoCurrency extends AbstractAsset{
public CryptoCurrency(World world, JSONObject cfg) {
super(world, cfg);
}
@Override
public String getTypeName() {
return "Crypto Currency";

View File

@ -26,6 +26,8 @@
package opensesim.sesim.Assets;
import opensesim.world.AbstractAsset;
import opensesim.world.World;
import org.json.JSONObject;
/**
*
@ -33,6 +35,12 @@ import opensesim.world.AbstractAsset;
*/
public class CurrencyAsset extends AbstractAsset {
public CurrencyAsset(World world, JSONObject cfg) {
super(world, cfg);
}
@Override
public String getTypeName() {
return "Currency";

View File

@ -27,12 +27,21 @@ package opensesim.sesim.Assets;
import javax.swing.JPanel;
import opensesim.world.AbstractAsset;
import opensesim.world.World;
import org.json.JSONObject;
/**
*
* @author 7u83 <7u83@mail.ru>
*/
public class FurtureAsset extends AbstractAsset{
public FurtureAsset(World world, JSONObject cfg) {
super(world, cfg);
}
@Override
public String getTypeName(){
return "Future";

View File

@ -26,6 +26,8 @@
package opensesim.sesim.Assets;
import opensesim.world.AbstractAsset;
import opensesim.world.World;
import org.json.JSONObject;
/**
*
@ -33,6 +35,12 @@ import opensesim.world.AbstractAsset;
*/
public class StockAssett extends AbstractAsset{
public StockAssett(World world, JSONObject cfg) {
super(world, cfg);
}
@Override
public String getTypeName() {
return "Stock";

View File

@ -26,12 +26,20 @@
package opensesim.sesim.Assets;
import opensesim.world.AbstractAsset;
import opensesim.world.World;
import org.json.JSONObject;
/**
*
* @author 7u83 <7u83@mail.ru>
*/
public class WarrentAsset extends AbstractAsset{
public WarrentAsset(World world, JSONObject cfg) {
super(world, cfg);
}
@Override
public String getTypeName(){
return "Warrent";