mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-10 02:37:12 +07:00
Blend filter parameters / New map
This commit is contained in:
parent
c4157d2ec8
commit
7b83406ee4
@ -271,6 +271,7 @@ filter.ore = Ore
|
||||
filter.rivernoise = River Noise
|
||||
filter.mirror = Mirror
|
||||
filter.clear = Clear
|
||||
filter.option.ignore = Ignore
|
||||
filter.scatter = Scatter
|
||||
filter.terrain = Terrain
|
||||
filter.option.scale = Scale
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 2.0 KiB |
BIN
core/assets/maps/shattered.msav
Normal file
BIN
core/assets/maps/shattered.msav
Normal file
Binary file not shown.
BIN
core/assets/maps/wasteland.msav
Normal file
BIN
core/assets/maps/wasteland.msav
Normal file
Binary file not shown.
@ -20,7 +20,7 @@ import static io.anuke.mindustry.Vars.*;
|
||||
|
||||
public class Maps implements Disposable{
|
||||
/** List of all built-in maps. Filenames only. */
|
||||
private static String[] defaultMapNames = {"fortress", "labyrinth", "islands", "tendrils", "caldera", "glacier", "veins", "canyon"};
|
||||
private static String[] defaultMapNames = {"fortress", "labyrinth", "islands", "tendrils", "caldera", "glacier", "veins", "canyon", "shattered", "wasteland"};
|
||||
/** All maps stored in an ordered array. */
|
||||
private Array<Map> maps = new Array<>();
|
||||
/** Serializer for meta. */
|
||||
|
@ -11,20 +11,21 @@ import static io.anuke.mindustry.maps.filters.FilterOption.*;
|
||||
|
||||
public class BlendFilter extends GenerateFilter{
|
||||
float radius = 2f;
|
||||
Block block = Blocks.stone, floor = Blocks.ice;
|
||||
Block block = Blocks.stone, floor = Blocks.ice, ignore = Blocks.air;
|
||||
|
||||
{
|
||||
buffered = true;
|
||||
options(
|
||||
new SliderOption("radius", () -> radius, f -> radius = f, 1f, 10f),
|
||||
new BlockOption("block", () -> block, b -> block = b, anyOptional),
|
||||
new BlockOption("floor", () -> floor, b -> floor = b, floorsOnly)
|
||||
new BlockOption("floor", () -> floor, b -> floor = b, floorsOnly),
|
||||
new BlockOption("ignore", () -> ignore, b -> ignore = b, floorsOptional)
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply(){
|
||||
if(in.floor == block || block == Blocks.air) return;
|
||||
if(in.floor == block || block == Blocks.air || in.floor == ignore) return;
|
||||
|
||||
int rad = (int)radius;
|
||||
boolean found = false;
|
||||
|
Loading…
Reference in New Issue
Block a user