Spoiler
public class DE_ModPlugin extends BaseModPlugin {
private static void initMyMod() {
new Gen().generate(Global.getSector());
}
@Override
public void onNewGameAfterEconomyLoad() {
Global.getLogger(this.getClass()).info("Hooray My mod plugin in a jar is loaded!");
initMyMod();
SectorAPI sector = null;
assert false;
StarSystemAPI system = sector.getStarSystem("Askonia");
// Salus Siphon Platform
SectorEntityToken diktatsiphonStation = system.addCustomEntity("salus_siphon", "Salus Siphon Platform", "station_side05", "sindrian_diktat");
diktatsiphonStation.setCustomDescriptionId("station_salus_siphon");
diktatsiphonStation.setInteractionImage("illustrations", "space_bar");
diktatsiphonStation.setCircularOrbitWithSpin(system.getEntityById("salus"), 50, 45, 80, 700, 25);
MarketAPI diktatsiphonStation_market = addMarketplace("sindrian_diktat",
diktatsiphonStation,
null,
"Salus Siphon Platform",
4,
new ArrayList<>(
Arrays.asList(
Conditions.VOLATILES_DIFFUSE,
Conditions.POPULATION_4,
("gas_giant")
)
),
new ArrayList<>(
Arrays.asList(
Industries.ORBITALSTATION_HIGH,
Industries.GROUNDDEFENSES,
Industries.MINING, Items.PLASMA_DYNAMO,
Industries.POPULATION,
Industries.SPACEPORT
)
),
new ArrayList<>(
Arrays.asList(
Submarkets.SUBMARKET_OPEN,
Submarkets.SUBMARKET_BLACK,
Submarkets.SUBMARKET_STORAGE
)
),
//tariffs
0.3f,
//freeport
false,
//junk and chatter
true);
// Opis Mining Platform
SectorEntityToken diktatStation = system.addCustomEntity("opis_mining", "Opis Mining Platform", "station_side00", "sindrian_diktat");
diktatStation.setCustomDescriptionId("station_opis_mining");
diktatStation.setInteractionImage("illustrations", "space_bar");
diktatStation.setCircularOrbitWithSpin(system.getEntityById("salus"), 45, 1100, 70, 40, 80);
MarketAPI diktatStation_market = addMarketplace("sindrian_diktat",
diktatStation,
null,
"Opis Mining Platform",
6,
new ArrayList<>(
Arrays.asList(
Conditions.ORE_RICH,
Conditions.RARE_ORE_RICH,
Conditions.VOLATILES_TRACE,
Conditions.NO_ATMOSPHERE,
Conditions.POPULATION_6
)
),
new ArrayList<>(
Arrays.asList(
Industries.BATTLESTATION,
Industries.HEAVYBATTERIES,
Industries.MINING,
Industries.POPULATION,
Industries.REFINING, Items.CATALYTIC_CORE,
Industries.MILITARYBASE,
Industries.WAYSTATION,
Industries.SPACEPORT
)
),
new ArrayList<>(
Arrays.asList(
Submarkets.SUBMARKET_STORAGE,
Submarkets.SUBMARKET_BLACK,
Submarkets.SUBMARKET_OPEN,
Submarkets.GENERIC_MILITARY
)
),
//tariffs
0.3f,
//freeport
false,
//junk and chatter
false);
PlanetAPI drakon = system.addPlanet("drakon", system.getEntityById("star"), "Drakon", "frozen1", 280, 150, 12000, 800);
drakon.getSpec().setPitch(180f);
drakon.getSpec().setTilt(-30f);
drakon.getSpec().setGlowTexture(Global.getSettings().getSpriteName("hab_glows", "asharu"));
drakon.applySpecChanges();
drakon.setInteractionImage("illustrations", "space_bar");
drakon.setCustomDescriptionId("planet_drakon");
MarketAPI market = Global.getSector().getEconomy().getMarket("drakon");
MarketAPI Drakon_market = addMarketplace("sindrian_diktat",
drakon,
null,
"Drakon",
4,
new ArrayList<>(
Arrays.asList(
Conditions.ORGANICS_PLENTIFUL,
Conditions.VOLATILES_DIFFUSE,
Conditions.NO_ATMOSPHERE,
Conditions.VERY_COLD,
Conditions.POPULATION_5,
Conditions.OUTPOST,
Conditions.FRONTIER
)
),
new ArrayList<>(
Arrays.asList(
Industries.GROUNDDEFENSES,
Industries.MINING,
Industries.POPULATION,
Industries.REFINING,
Industries.SPACEPORT
)
),
new ArrayList<>(
Arrays.asList(
Submarkets.SUBMARKET_STORAGE,
Submarkets.SUBMARKET_BLACK,
Submarkets.SUBMARKET_OPEN,
Submarkets.GENERIC_MILITARY
)
),
//tariffs
0.3f,
//freeport
false,
//junk and chatter
false);
}
}
The mod plugin file, I can send the gen file too if necessary though it is just code for addMarketplace