Generation tweaks
This commit is contained in:
@@ -49,8 +49,8 @@ public class Vars implements Loadable{
|
|||||||
public static final ContentType[] defaultContentIcons = {ContentType.item, ContentType.liquid, ContentType.block, ContentType.unit};
|
public static final ContentType[] defaultContentIcons = {ContentType.item, ContentType.liquid, ContentType.block, ContentType.unit};
|
||||||
/** Wall darkness radius. */
|
/** Wall darkness radius. */
|
||||||
public static final int darkRadius = 4;
|
public static final int darkRadius = 4;
|
||||||
/** Maximum extra padding around deployment schematics. */
|
/** Maximum extra padding around deployment schematics. TODO 4, or 5?*/
|
||||||
public static final int maxLoadoutSchematicPad = 5;
|
public static final int maxLoadoutSchematicPad = 4;
|
||||||
/** Maximum schematic size.*/
|
/** Maximum schematic size.*/
|
||||||
public static final int maxSchematicSize = 32;
|
public static final int maxSchematicSize = 32;
|
||||||
/** All schematic base64 starts with this string.*/
|
/** All schematic base64 starts with this string.*/
|
||||||
|
|||||||
@@ -134,6 +134,7 @@ public class Blocks{
|
|||||||
tankAssembler,
|
tankAssembler,
|
||||||
shipAssembler,
|
shipAssembler,
|
||||||
mechAssembler,
|
mechAssembler,
|
||||||
|
//TODO maybe making it 5x5 would be more appropriate, seems kinda cheap.
|
||||||
basicAssemblerModule,
|
basicAssemblerModule,
|
||||||
|
|
||||||
//payloads
|
//payloads
|
||||||
@@ -143,6 +144,7 @@ public class Blocks{
|
|||||||
message, switchBlock, microProcessor, logicProcessor, hyperProcessor, largeLogicDisplay, logicDisplay, memoryCell, memoryBank,
|
message, switchBlock, microProcessor, logicProcessor, hyperProcessor, largeLogicDisplay, logicDisplay, memoryCell, memoryBank,
|
||||||
|
|
||||||
//campaign
|
//campaign
|
||||||
|
//TODO launch pad on erekir, 5x5, uses nuclear(?) fuel
|
||||||
launchPad, interplanetaryAccelerator
|
launchPad, interplanetaryAccelerator
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -86,8 +86,8 @@ public class ErekirPlanetGenerator extends PlanetGenerator{
|
|||||||
|
|
||||||
if(ice < 0.6){
|
if(ice < 0.6){
|
||||||
if(result == Blocks.rhyolite || result == Blocks.yellowStone || result == Blocks.regolith){
|
if(result == Blocks.rhyolite || result == Blocks.yellowStone || result == Blocks.regolith){
|
||||||
//TODO bio(?) luminescent stuff
|
//TODO bio(?) luminescent stuff? ice?
|
||||||
return Blocks.ferricStone; //TODO perhaps something else. what about ice?
|
return Blocks.carbonStone; //TODO perhaps something else.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -273,13 +273,13 @@ public class ErekirPlanetGenerator extends PlanetGenerator{
|
|||||||
}
|
}
|
||||||
|
|
||||||
//TODO design ore generation so it doesn't overlap
|
//TODO design ore generation so it doesn't overlap
|
||||||
if(noise(x + 999, y + 600 - x, 4, 0.63f, 50f, 1f) < 0.25f && floor == Blocks.crystallineStone){
|
if(noise(x + 999, y + 600 - x, 4, 0.63f, 45f, 1f) < 0.29f && floor == Blocks.crystallineStone){
|
||||||
ore = Blocks.oreCrystalThorium;
|
ore = Blocks.oreCrystalThorium;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(noise(x + 999, y + 600 - x, 5, 0.8f, 50f, 1f) < 0.38f && floor == Blocks.crystallineStone){
|
if(noise(x + 999, y + 600 - x, 5, 0.8f, 45f, 1f) < 0.44f && floor == Blocks.crystallineStone){
|
||||||
floor = Blocks.crystalFloor;
|
floor = Blocks.crystalFloor;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -350,7 +350,7 @@ public class ErekirPlanetGenerator extends PlanetGenerator{
|
|||||||
while(ventCount < minVents && iterations++ < maxIterations){
|
while(ventCount < minVents && iterations++ < maxIterations){
|
||||||
outer:
|
outer:
|
||||||
for(Tile tile : tiles){
|
for(Tile tile : tiles){
|
||||||
if(rand.chance(0.00017)){
|
if(rand.chance(0.00018)){
|
||||||
int radius = 1;
|
int radius = 1;
|
||||||
for(int x = -radius; x <= radius; x++){
|
for(int x = -radius; x <= radius; x++){
|
||||||
for(int y = -radius; y <= radius; y++){
|
for(int y = -radius; y <= radius; y++){
|
||||||
@@ -401,6 +401,7 @@ public class ErekirPlanetGenerator extends PlanetGenerator{
|
|||||||
decoration(0.017f);
|
decoration(0.017f);
|
||||||
|
|
||||||
//not allowed
|
//not allowed
|
||||||
|
//TODO use Items.serpuloItems
|
||||||
state.rules.hiddenBuildItems.addAll(Items.copper, Items.titanium, Items.coal, Items.lead, Items.blastCompound, Items.pyratite, Items.sporePod, Items.metaglass, Items.plastanium);
|
state.rules.hiddenBuildItems.addAll(Items.copper, Items.titanium, Items.coal, Items.lead, Items.blastCompound, Items.pyratite, Items.sporePod, Items.metaglass, Items.plastanium);
|
||||||
|
|
||||||
//it is very hot
|
//it is very hot
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{
|
|||||||
|
|
||||||
void joinLiquid(int x1, int y1, int x2, int y2){
|
void joinLiquid(int x1, int y1, int x2, int y2){
|
||||||
float nscl = rand.random(100f, 140f) * 6f;
|
float nscl = rand.random(100f, 140f) * 6f;
|
||||||
int rad = rand.random(5, 10);
|
int rad = rand.random(7, 11);
|
||||||
int avoid = 2 + rad;
|
int avoid = 2 + rad;
|
||||||
var path = pathfind(x1, y1, x2, y2, tile -> (tile.solid() || !tile.floor().isLiquid ? 70f : 0f) + noise(tile.x, tile.y, 2, 0.4f, 1f / nscl) * 500, Astar.manhattan);
|
var path = pathfind(x1, y1, x2, y2, tile -> (tile.solid() || !tile.floor().isLiquid ? 70f : 0f) + noise(tile.x, tile.y, 2, 0.4f, 1f / nscl) * 500, Astar.manhattan);
|
||||||
path.each(t -> {
|
path.each(t -> {
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ public class LaunchPad extends Block{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean shouldConsume(){
|
public boolean shouldConsume(){
|
||||||
|
//TODO do not consume after reload / disable?
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -122,7 +123,9 @@ public class LaunchPad extends Block{
|
|||||||
if(!state.isCampaign()) return;
|
if(!state.isCampaign()) return;
|
||||||
|
|
||||||
//increment launchCounter then launch when full and base conditions are met
|
//increment launchCounter then launch when full and base conditions are met
|
||||||
if((launchCounter += edelta()) >= launchTime && edelta() >= 0.001f && items.total() >= itemCapacity){
|
if((launchCounter += edelta()) >= launchTime && consValid() && items.total() >= itemCapacity){
|
||||||
|
//if there are item requirements, use those.
|
||||||
|
consume();
|
||||||
launchSound.at(x, y);
|
launchSound.at(x, y);
|
||||||
LaunchPayload entity = LaunchPayload.create();
|
LaunchPayload entity = LaunchPayload.create();
|
||||||
items.each((item, amount) -> entity.stacks.add(new ItemStack(item, amount)));
|
items.each((item, amount) -> entity.stacks.add(new ItemStack(item, amount)));
|
||||||
|
|||||||
Reference in New Issue
Block a user