mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-05 00:17:33 +07:00
Map implemented / Editor pick key / Crash fix
This commit is contained in:
parent
e727ee6d4a
commit
745ff1a270
BIN
core/assets-raw/sprites/blocks/environment/stained-boulder1.png
Normal file
BIN
core/assets-raw/sprites/blocks/environment/stained-boulder1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
BIN
core/assets-raw/sprites/blocks/environment/stained-boulder2.png
Normal file
BIN
core/assets-raw/sprites/blocks/environment/stained-boulder2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
@ -36,7 +36,7 @@ public class Blocks implements ContentList{
|
||||
//environment
|
||||
air, part, spawn, deepwater, water, tar, stone, craters, charr, sand, ice, snow,
|
||||
grass, holostone, rocks, icerocks, cliffs, pine, whiteTree, whiteTreeDead, sporeCluster,
|
||||
iceSnow, sandWater, duneRocks, stainedRocks, stainedStone, stainedRocksRed, stainedStoneRed, stainedRocksYellow, stainedStoneYellow,
|
||||
iceSnow, sandWater, duneRocks, stainedRocks, stainedStone, stainedRocksRed, stainedStoneRed, stainedRocksYellow, stainedStoneYellow, stainedBoulder,
|
||||
|
||||
//crafting
|
||||
siliconSmelter, kiln, graphitePress, plastaniumCompressor, multiPress, phaseWeaver, surgeSmelter, pyratiteMixer, blastMixer, cryofluidMixer,
|
||||
@ -64,7 +64,7 @@ public class Blocks implements ContentList{
|
||||
mechanicalDrill, pneumaticDrill, laserDrill, blastDrill, plasmaDrill, waterExtractor, oilExtractor, cultivator,
|
||||
|
||||
//storage
|
||||
core, vault, container, unloader, launchPad,
|
||||
core, coreBastion, vault, container, unloader, launchPad,
|
||||
|
||||
//turrets
|
||||
duo, hail, arc, wave, lancer, swarmer, salvo, fuse, ripple, cyclone, spectre, meltdown,
|
||||
@ -250,6 +250,7 @@ public class Blocks implements ContentList{
|
||||
|
||||
stainedStoneRed = new Floor("stained-stone-red"){{
|
||||
edgeStyle = "blocky";
|
||||
hasOres = true;
|
||||
}};
|
||||
|
||||
stainedRocksYellow = new StaticWall("stained-rocks-yellow"){{
|
||||
@ -260,6 +261,10 @@ public class Blocks implements ContentList{
|
||||
edgeStyle = "blocky";
|
||||
}};
|
||||
|
||||
stainedBoulder = new Rock("stained-boulder"){{
|
||||
variants = 2;
|
||||
}};
|
||||
|
||||
//endregion
|
||||
//region crafting
|
||||
|
||||
|
@ -226,6 +226,7 @@ public class Zones implements ContentList{
|
||||
}};
|
||||
}};
|
||||
|
||||
/*
|
||||
crags = new Zone("crags", new MapGenerator("groundZero", 1)){{ //TODO implement
|
||||
deployCost = ItemStack.with(Items.copper, 300);
|
||||
startingItems = ItemStack.with(Items.copper, 200);
|
||||
@ -237,21 +238,81 @@ public class Zones implements ContentList{
|
||||
waveTimer = true;
|
||||
waveSpacing = 60 * 80;
|
||||
}};
|
||||
}};
|
||||
}};*/
|
||||
|
||||
stainedMountains = new Zone("stainedMountains", new MapGenerator("stainedMountains", 2).dist(2.5f, true)){{ //TODO implement
|
||||
deployCost = ItemStack.with(Items.copper, 300);
|
||||
startingItems = ItemStack.with(Items.copper, 200);
|
||||
conditionWave = 15;
|
||||
stainedMountains = new Zone("stainedMountains", new MapGenerator("stainedMountains", 2)
|
||||
.dist(2.5f, true)
|
||||
.decor(new Decoration(Blocks.stainedStone, Blocks.stainedBoulder, 0.01))){{
|
||||
|
||||
deployCost = ItemStack.with(Items.copper, 500, Items.lead, 300, Items.silicon, 100);
|
||||
startingItems = ItemStack.with(Items.copper, 400, Items.lead, 100);
|
||||
conditionWave = 10;
|
||||
launchPeriod = 10;
|
||||
zoneRequirements = new Zone[]{frozenForest};
|
||||
blockRequirements = new Block[]{Blocks.copperWall};
|
||||
blockRequirements = new Block[]{Blocks.pneumaticDrill};
|
||||
itemRequirements = ItemStack.with(Items.copper, 8000, Items.silicon, 2000);
|
||||
rules = () -> new Rules(){{
|
||||
waves = true;
|
||||
waveTimer = true;
|
||||
waveSpacing = 60 * 80;
|
||||
waveSpacing = 60 * 60 * 2;
|
||||
spawns = Array.with(
|
||||
new SpawnGroup(UnitTypes.titan){{
|
||||
unitScaling = 2;
|
||||
spacing = 2;
|
||||
end = 10;
|
||||
}},
|
||||
|
||||
new SpawnGroup(UnitTypes.dagger){{
|
||||
begin = 2;
|
||||
unitScaling = 1;
|
||||
spacing = 2;
|
||||
}},
|
||||
|
||||
new SpawnGroup(UnitTypes.dagger){{
|
||||
begin = 10;
|
||||
spacing = 2;
|
||||
unitScaling = 2;
|
||||
unitAmount = 2;
|
||||
}},
|
||||
|
||||
new SpawnGroup(UnitTypes.ghoul){{
|
||||
begin = 5;
|
||||
unitScaling = 0.5f;
|
||||
unitAmount = 1;
|
||||
spacing = 5;
|
||||
}},
|
||||
|
||||
new SpawnGroup(UnitTypes.wraith){{
|
||||
begin = 10;
|
||||
unitScaling = 1f;
|
||||
unitAmount = 1;
|
||||
spacing = 5;
|
||||
}},
|
||||
|
||||
new SpawnGroup(UnitTypes.dagger){{
|
||||
begin = 2;
|
||||
unitScaling = 1;
|
||||
spacing = 2;
|
||||
}},
|
||||
|
||||
new SpawnGroup(UnitTypes.wraith){{
|
||||
begin = 23;
|
||||
unitScaling = 1f;
|
||||
unitAmount = 1;
|
||||
spacing = 2;
|
||||
}},
|
||||
|
||||
new SpawnGroup(UnitTypes.crawler){{
|
||||
begin = 20;
|
||||
unitScaling = 1;
|
||||
spacing = 10;
|
||||
unitScaling = 0.5f;
|
||||
unitAmount = 10;
|
||||
}}
|
||||
);
|
||||
}};
|
||||
}};
|
||||
|
||||
/*
|
||||
impact = new Zone("impact", new MapGenerator("groundZero", 1)){{ //TODO implement
|
||||
deployCost = ItemStack.with(Items.copper, 300);
|
||||
startingItems = ItemStack.with(Items.copper, 200);
|
||||
@ -328,6 +389,6 @@ public class Zones implements ContentList{
|
||||
waveTimer = true;
|
||||
waveSpacing = 60 * 80;
|
||||
}};
|
||||
}};
|
||||
}};*/
|
||||
}
|
||||
}
|
||||
|
@ -67,7 +67,6 @@ public class MapView extends Element implements GestureListener{
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean touchDown(InputEvent event, float x, float y, int pointer, KeyCode button){
|
||||
if(pointer != 0){
|
||||
@ -132,7 +131,7 @@ public class MapView extends Element implements GestureListener{
|
||||
op = null;
|
||||
}
|
||||
|
||||
if(lastTool != null){
|
||||
if(button == KeyCode.MOUSE_MIDDLE && lastTool != null){
|
||||
tool = lastTool;
|
||||
lastTool = null;
|
||||
}
|
||||
@ -216,6 +215,16 @@ public class MapView extends Element implements GestureListener{
|
||||
offsety -= ay * 15f / zoom;
|
||||
}
|
||||
|
||||
if(Core.input.keyTap(KeyCode.SHIFT_LEFT)){
|
||||
lastTool = tool;
|
||||
tool = EditorTool.pick;
|
||||
}
|
||||
|
||||
if(Core.input.keyRelease(KeyCode.SHIFT_LEFT) && lastTool != null){
|
||||
tool = lastTool;
|
||||
lastTool = null;
|
||||
}
|
||||
|
||||
if(ui.editor.hasPane()) return;
|
||||
|
||||
zoom += Core.input.axis(KeyCode.SCROLL) / 10f * zoom;
|
||||
|
Loading…
Reference in New Issue
Block a user