More map submission testing / Desktop editor pick tile support
This commit is contained in:
BIN
core/assets/maps/seaPort.msav
Normal file
BIN
core/assets/maps/seaPort.msav
Normal file
Binary file not shown.
BIN
core/assets/maps/weatheredChannels.msav
Normal file
BIN
core/assets/maps/weatheredChannels.msav
Normal file
Binary file not shown.
@@ -10,7 +10,7 @@ public class SectorPresets{
|
|||||||
craters, biomassFacility, taintedWoods, frozenForest, ruinousShores, facility32m, windsweptIslands, stainedMountains, tarFields,
|
craters, biomassFacility, taintedWoods, frozenForest, ruinousShores, facility32m, windsweptIslands, stainedMountains, tarFields,
|
||||||
frontier, fungalPass, infestedCanyons, atolls, mycelialBastion, extractionOutpost, saltFlats, testingGrounds, overgrowth, //polarAerodrome,
|
frontier, fungalPass, infestedCanyons, atolls, mycelialBastion, extractionOutpost, saltFlats, testingGrounds, overgrowth, //polarAerodrome,
|
||||||
impact0078, desolateRift, nuclearComplex, planetaryTerminal,
|
impact0078, desolateRift, nuclearComplex, planetaryTerminal,
|
||||||
coastline, navalFortress,
|
coastline, navalFortress, weatheredChannels, seaPort,
|
||||||
|
|
||||||
onset, aegis, lake, intersect, basin, atlas, split, marsh, peaks, ravine, caldera,
|
onset, aegis, lake, intersect, basin, atlas, split, marsh, peaks, ravine, caldera,
|
||||||
stronghold, crevice, siege, crossroads, karst, origin;
|
stronghold, crevice, siege, crossroads, karst, origin;
|
||||||
@@ -62,6 +62,10 @@ public class SectorPresets{
|
|||||||
difficulty = 3;
|
difficulty = 3;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
seaPort = new SectorPreset("seaPort", serpulo, 47){{
|
||||||
|
difficulty = 4;
|
||||||
|
}};
|
||||||
|
|
||||||
facility32m = new SectorPreset("facility32m", serpulo, 64){{
|
facility32m = new SectorPreset("facility32m", serpulo, 64){{
|
||||||
captureWave = 25;
|
captureWave = 25;
|
||||||
difficulty = 4;
|
difficulty = 4;
|
||||||
@@ -91,6 +95,11 @@ public class SectorPresets{
|
|||||||
difficulty = 5;
|
difficulty = 5;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
weatheredChannels = new SectorPreset("weatheredChannels", serpulo, 39){{
|
||||||
|
captureWave = 40;
|
||||||
|
difficulty = 7;
|
||||||
|
}};
|
||||||
|
|
||||||
navalFortress = new SectorPreset("navalFortress", serpulo, 216){{
|
navalFortress = new SectorPreset("navalFortress", serpulo, 216){{
|
||||||
difficulty = 9;
|
difficulty = 9;
|
||||||
}};
|
}};
|
||||||
|
|||||||
@@ -464,6 +464,18 @@ public class SerpuloTechTree{
|
|||||||
new Research(kiln),
|
new Research(kiln),
|
||||||
new Research(mechanicalPump)
|
new Research(mechanicalPump)
|
||||||
), () -> {
|
), () -> {
|
||||||
|
node(seaPort, Seq.with(
|
||||||
|
new SectorComplete(biomassFacility),
|
||||||
|
new Research(navalFactory),
|
||||||
|
new Research(risso),
|
||||||
|
new Research(retusa),
|
||||||
|
new Research(steamGenerator),
|
||||||
|
new Research(cultivator),
|
||||||
|
new Research(coalCentrifuge)
|
||||||
|
), () -> {
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
node(windsweptIslands, Seq.with(
|
node(windsweptIslands, Seq.with(
|
||||||
new SectorComplete(ruinousShores),
|
new SectorComplete(ruinousShores),
|
||||||
new Research(pneumaticDrill),
|
new Research(pneumaticDrill),
|
||||||
@@ -565,6 +577,12 @@ public class SerpuloTechTree{
|
|||||||
new Research(navalFactory),
|
new Research(navalFactory),
|
||||||
new Research(payloadConveyor)
|
new Research(payloadConveyor)
|
||||||
), () -> {
|
), () -> {
|
||||||
|
node(weatheredChannels, Seq.with(
|
||||||
|
new SectorComplete(impact0078)
|
||||||
|
), () -> {
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
node(navalFortress, Seq.with(
|
node(navalFortress, Seq.with(
|
||||||
new SectorComplete(coastline),
|
new SectorComplete(coastline),
|
||||||
new SectorComplete(extractionOutpost),
|
new SectorComplete(extractionOutpost),
|
||||||
|
|||||||
@@ -146,6 +146,13 @@ abstract class BuilderComp implements Posc, Statusc, Teamc, Rotc{
|
|||||||
|
|
||||||
if(hasAll){
|
if(hasAll){
|
||||||
Call.beginPlace(self(), current.block, team, current.x, current.y, current.rotation);
|
Call.beginPlace(self(), current.block, team, current.x, current.y, current.rotation);
|
||||||
|
|
||||||
|
if(current.block.instantBuild){
|
||||||
|
if(plans.size > 0){
|
||||||
|
plans.removeFirst();
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
current.stuck = true;
|
current.stuck = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -146,10 +146,22 @@ public class PlacementFragment{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(tryRecipe != null && tryRecipe.isVisible() && unlocked(tryRecipe)){
|
if(tryRecipe == null && state.rules.editor){
|
||||||
|
var tile = world.tileWorld(Core.input.mouseWorldX(), Core.input.mouseWorldY());
|
||||||
|
if(tile != null){
|
||||||
|
tryRecipe =
|
||||||
|
tile.block() != Blocks.air ? tile.block() :
|
||||||
|
tile.overlay() != Blocks.air ? tile.overlay() :
|
||||||
|
tile.floor() != Blocks.air ? tile.floor() : null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(tryRecipe != null && ((tryRecipe.isVisible() && unlocked(tryRecipe)) || state.rules.editor)){
|
||||||
input.block = tryRecipe;
|
input.block = tryRecipe;
|
||||||
tryRecipe.lastConfig = tryConfig;
|
tryRecipe.lastConfig = tryConfig;
|
||||||
currentCategory = input.block.category;
|
if(tryRecipe.isVisible()){
|
||||||
|
currentCategory = input.block.category;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -328,6 +328,8 @@ public class Block extends UnlockableContent implements Senseable{
|
|||||||
public boolean instantDeconstruct = false;
|
public boolean instantDeconstruct = false;
|
||||||
/** If true, this block constructs immediately. This implies no resource requirement, and ignores configs - do not use, this is for performance only! */
|
/** If true, this block constructs immediately. This implies no resource requirement, and ignores configs - do not use, this is for performance only! */
|
||||||
public boolean instantBuild = false;
|
public boolean instantBuild = false;
|
||||||
|
/** If true, this block can be placed even in "dark" areas. Only used for editor static walls. */
|
||||||
|
public boolean ignoreBuildDarkness = false;
|
||||||
/** Effect for placing the block. Passes size as rotation. */
|
/** Effect for placing the block. Passes size as rotation. */
|
||||||
public Effect placeEffect = Fx.placeBlock;
|
public Effect placeEffect = Fx.placeBlock;
|
||||||
/** Effect for breaking the block. Passes size as rotation. */
|
/** Effect for breaking the block. Passes size as rotation. */
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ public class Build{
|
|||||||
/** Returns whether a tile can be placed at this location by this team. */
|
/** Returns whether a tile can be placed at this location by this team. */
|
||||||
public static boolean validPlace(Block type, Team team, int x, int y, int rotation, boolean checkVisible){
|
public static boolean validPlace(Block type, Team team, int x, int y, int rotation, boolean checkVisible){
|
||||||
//the wave team can build whatever they want as long as it's visible - banned blocks are not applicable
|
//the wave team can build whatever they want as long as it's visible - banned blocks are not applicable
|
||||||
if(type == null || (checkVisible && (!type.environmentBuildable() || (!type.isPlaceable() && !(state.rules.waves && team == state.rules.waveTeam && type.isVisible()))))){
|
if(type == null || (!state.rules.editor && (checkVisible && (!type.environmentBuildable() || (!type.isPlaceable() && !(state.rules.waves && team == state.rules.waveTeam && type.isVisible())))))){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -205,7 +205,7 @@ public class Build{
|
|||||||
}
|
}
|
||||||
|
|
||||||
//campaign darkness check
|
//campaign darkness check
|
||||||
if(world.getDarkness(x, y) >= 3){
|
if(!type.ignoreBuildDarkness && world.getDarkness(x, y) >= 3){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -92,6 +92,7 @@ public class Floor extends Block{
|
|||||||
placeableLiquid = true;
|
placeableLiquid = true;
|
||||||
allowRectanglePlacement = true;
|
allowRectanglePlacement = true;
|
||||||
instantBuild = true;
|
instantBuild = true;
|
||||||
|
ignoreBuildDarkness = true;
|
||||||
placeEffect = Fx.rotateBlock;
|
placeEffect = Fx.rotateBlock;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import arc.graphics.g2d.*;
|
|||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
import arc.math.geom.*;
|
import arc.math.geom.*;
|
||||||
import mindustry.annotations.Annotations.*;
|
import mindustry.annotations.Annotations.*;
|
||||||
|
import mindustry.content.*;
|
||||||
import mindustry.graphics.*;
|
import mindustry.graphics.*;
|
||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
|
|
||||||
@@ -21,7 +22,10 @@ public class StaticWall extends Prop{
|
|||||||
variants = 2;
|
variants = 2;
|
||||||
cacheLayer = CacheLayer.walls;
|
cacheLayer = CacheLayer.walls;
|
||||||
allowRectanglePlacement = true;
|
allowRectanglePlacement = true;
|
||||||
|
placeEffect = Fx.rotateBlock;
|
||||||
instantBuild = true;
|
instantBuild = true;
|
||||||
|
ignoreBuildDarkness = true;
|
||||||
|
placeableLiquid = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -49,6 +53,11 @@ public class StaticWall extends Prop{
|
|||||||
split = large.split(32, 32);
|
split = large.split(32, 32);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canReplace(Block other){
|
||||||
|
return other instanceof StaticWall || super.canReplace(other);
|
||||||
|
}
|
||||||
|
|
||||||
boolean eq(int rx, int ry){
|
boolean eq(int rx, int ry){
|
||||||
return rx < world.width() - 1 && ry < world.height() - 1
|
return rx < world.width() - 1 && ry < world.height() - 1
|
||||||
&& world.tile(rx + 1, ry).block() == this
|
&& world.tile(rx + 1, ry).block() == this
|
||||||
|
|||||||
Reference in New Issue
Block a user