Work on new maps continues
|
Before Width: | Height: | Size: 75 B |
BIN
core/assets-raw/sprites/blocks/environment/metal-floor-2.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
core/assets-raw/sprites/blocks/environment/metal-floor-3.png
Normal file
|
After Width: | Height: | Size: 1015 B |
BIN
core/assets-raw/sprites/blocks/environment/metal-floor-4.png
Normal file
|
After Width: | Height: | Size: 1016 B |
BIN
core/assets-raw/sprites/blocks/environment/metal-floor-5.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 195 B |
BIN
core/assets-raw/sprites/blocks/environment/metal-floor.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 89 B |
|
Before Width: | Height: | Size: 93 B |
|
Before Width: | Height: | Size: 81 B |
|
Before Width: | Height: | Size: 91 B |
|
Before Width: | Height: | Size: 85 B |
|
Before Width: | Height: | Size: 91 B |
BIN
core/assets-raw/sprites/blocks/walls/scrap-wall-gigantic.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
core/assets-raw/sprites/blocks/walls/scrap-wall-huge1.png
Normal file
|
After Width: | Height: | Size: 333 B |
BIN
core/assets-raw/sprites/blocks/walls/scrap-wall-huge2.png
Normal file
|
After Width: | Height: | Size: 400 B |
BIN
core/assets-raw/sprites/blocks/walls/scrap-wall-huge3.png
Normal file
|
After Width: | Height: | Size: 399 B |
|
Before Width: | Height: | Size: 196 B After Width: | Height: | Size: 196 B |
BIN
core/assets-raw/sprites/blocks/walls/scrap-wall-large2.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
core/assets-raw/sprites/blocks/walls/scrap-wall-large3.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
core/assets-raw/sprites/blocks/walls/scrap-wall-large4.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
core/assets-raw/sprites/blocks/walls/scrap-wall4.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
core/assets-raw/sprites/blocks/walls/scrap-wall5.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
core/assets-raw/sprites/blocks/walls/thruster.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
@@ -271,7 +271,7 @@ zone.frozenForest.name = Frozen Forest
|
|||||||
zone.ruinousShores.name = Ruinous Shores
|
zone.ruinousShores.name = Ruinous Shores
|
||||||
zone.crags.name = Crags
|
zone.crags.name = Crags
|
||||||
zone.stainedMountains.name = Stained Mountains
|
zone.stainedMountains.name = Stained Mountains
|
||||||
zone.impact.name = Impact 0079
|
zone.impact0079.name = Impact 0079
|
||||||
zone.desolateRift.name = Desolate Rift
|
zone.desolateRift.name = Desolate Rift
|
||||||
zone.arcticDesert.name = Arctic Desert
|
zone.arcticDesert.name = Arctic Desert
|
||||||
zone.dryWastes.name = Dry Wastes
|
zone.dryWastes.name = Dry Wastes
|
||||||
@@ -570,6 +570,7 @@ block.separator.name = Separator
|
|||||||
block.centrifuge.name = Centrifuge
|
block.centrifuge.name = Centrifuge
|
||||||
block.power-node.name = Power Node
|
block.power-node.name = Power Node
|
||||||
block.power-node-large.name = Large Power Node
|
block.power-node-large.name = Large Power Node
|
||||||
|
block.surge-tower.name = Surge Tower
|
||||||
block.battery.name = Battery
|
block.battery.name = Battery
|
||||||
block.battery-large.name = Large Battery
|
block.battery-large.name = Large Battery
|
||||||
block.combustion-generator.name = Combustion Generator
|
block.combustion-generator.name = Combustion Generator
|
||||||
|
|||||||
BIN
core/assets/maps/impact0079.mmap
Normal file
BIN
core/assets/maps/test.mmap
Normal file
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.1 MiB |
@@ -37,6 +37,7 @@ public class Blocks implements ContentList{
|
|||||||
air, part, spawn, deepwater, water, tar, stone, craters, charr, sand, ice, snow,
|
air, part, spawn, deepwater, water, tar, stone, craters, charr, sand, ice, snow,
|
||||||
grass, holostone, rocks, icerocks, cliffs, pine, whiteTree, whiteTreeDead, sporeCluster,
|
grass, holostone, rocks, icerocks, cliffs, pine, whiteTree, whiteTreeDead, sporeCluster,
|
||||||
iceSnow, sandWater, duneRocks, stainedRocks, stainedStone, stainedRocksRed, stainedStoneRed, stainedRocksYellow, stainedStoneYellow, stainedBoulder,
|
iceSnow, sandWater, duneRocks, stainedRocks, stainedStone, stainedRocksRed, stainedStoneRed, stainedRocksYellow, stainedStoneYellow, stainedBoulder,
|
||||||
|
metalFloor, metalFloorDamaged, metalFloor2, metalFloor3, metalFloor4, metalFloor5,
|
||||||
|
|
||||||
//crafting
|
//crafting
|
||||||
siliconSmelter, kiln, graphitePress, plastaniumCompressor, multiPress, phaseWeaver, surgeSmelter, pyratiteMixer, blastMixer, cryofluidMixer,
|
siliconSmelter, kiln, graphitePress, plastaniumCompressor, multiPress, phaseWeaver, surgeSmelter, pyratiteMixer, blastMixer, cryofluidMixer,
|
||||||
@@ -46,7 +47,7 @@ public class Blocks implements ContentList{
|
|||||||
powerVoid, powerSource, itemSource, liquidSource, itemVoid,
|
powerVoid, powerSource, itemSource, liquidSource, itemVoid,
|
||||||
|
|
||||||
//defense
|
//defense
|
||||||
scrapWall, scrapWallLarge,
|
scrapWall, scrapWallLarge, scrapWallHuge, scrapWallGigantic, thruster, //ok these names are getting ridiculous. but at least I don't have humongous walls yet
|
||||||
copperWall, copperWallLarge, titaniumWall, titaniumWallLarge, thoriumWall, thoriumWallLarge, door, doorLarge,
|
copperWall, copperWallLarge, titaniumWall, titaniumWallLarge, thoriumWall, thoriumWallLarge, door, doorLarge,
|
||||||
phaseWall, phaseWallLarge, surgeWall, surgeWallLarge, mendProjector, overdriveProjector, forceProjector, shockMine,
|
phaseWall, phaseWallLarge, surgeWall, surgeWallLarge, mendProjector, overdriveProjector, forceProjector, shockMine,
|
||||||
|
|
||||||
@@ -265,6 +266,30 @@ public class Blocks implements ContentList{
|
|||||||
variants = 2;
|
variants = 2;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
metalFloor = new Floor("metal-floor"){{
|
||||||
|
variants = 0;
|
||||||
|
}};
|
||||||
|
|
||||||
|
metalFloorDamaged = new Floor("metal-floor-damaged"){{
|
||||||
|
variants = 0;
|
||||||
|
}};
|
||||||
|
|
||||||
|
metalFloor2 = new Floor("metal-floor-2"){{
|
||||||
|
variants = 0;
|
||||||
|
}};
|
||||||
|
|
||||||
|
metalFloor3 = new Floor("metal-floor-3"){{
|
||||||
|
variants = 0;
|
||||||
|
}};
|
||||||
|
|
||||||
|
metalFloor4 = new Floor("metal-floor-4"){{
|
||||||
|
variants = 0;
|
||||||
|
}};
|
||||||
|
|
||||||
|
metalFloor5 = new Floor("metal-floor-5"){{
|
||||||
|
variants = 0;
|
||||||
|
}};
|
||||||
|
|
||||||
//endregion
|
//endregion
|
||||||
//region crafting
|
//region crafting
|
||||||
|
|
||||||
@@ -492,13 +517,30 @@ public class Blocks implements ContentList{
|
|||||||
int wallHealthMultiplier = 3;
|
int wallHealthMultiplier = 3;
|
||||||
|
|
||||||
scrapWall = new Wall("scrap-wall"){{
|
scrapWall = new Wall("scrap-wall"){{
|
||||||
health = 80;
|
health = 60 * wallHealthMultiplier;
|
||||||
variants = 3;
|
variants = 5;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
scrapWallLarge = new Wall("scrap-wall-large"){{
|
scrapWallLarge = new Wall("scrap-wall-large"){{
|
||||||
health = 80 * 4;
|
health = 60 * 4 * wallHealthMultiplier;
|
||||||
size = 2;
|
size = 2;
|
||||||
|
variants = 4;
|
||||||
|
}};
|
||||||
|
|
||||||
|
scrapWallHuge = new Wall("scrap-wall-huge"){{
|
||||||
|
health = 60 * 9 * wallHealthMultiplier;
|
||||||
|
size = 3;
|
||||||
|
variants = 3;
|
||||||
|
}};
|
||||||
|
|
||||||
|
scrapWallGigantic = new Wall("scrap-wall-gigantic"){{
|
||||||
|
health = 60 * 16 * wallHealthMultiplier;
|
||||||
|
size = 4;
|
||||||
|
}};
|
||||||
|
|
||||||
|
thruster = new Wall("thruster"){{
|
||||||
|
health = 55 * 16 * wallHealthMultiplier;
|
||||||
|
size = 4;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
copperWall = new Wall("copper-wall"){{
|
copperWall = new Wall("copper-wall"){{
|
||||||
|
|||||||
@@ -312,13 +312,13 @@ public class Zones implements ContentList{
|
|||||||
);
|
);
|
||||||
}};
|
}};
|
||||||
}};
|
}};
|
||||||
/*
|
|
||||||
impact = new Zone("impact", new MapGenerator("groundZero", 1)){{ //TODO implement
|
impact = new Zone("impact0079", new MapGenerator("impact0079")){{ //TODO implement
|
||||||
deployCost = ItemStack.with(Items.copper, 300);
|
deployCost = ItemStack.with(Items.copper, 4000);
|
||||||
startingItems = ItemStack.with(Items.copper, 200);
|
startingItems = ItemStack.with(Items.copper, 200);
|
||||||
conditionWave = 15;
|
conditionWave = 15;
|
||||||
zoneRequirements = new Zone[]{frozenForest};
|
zoneRequirements = new Zone[]{stainedMountains};
|
||||||
blockRequirements = new Block[]{Blocks.copperWall};
|
blockRequirements = new Block[]{Blocks.launchPad};
|
||||||
rules = () -> new Rules(){{
|
rules = () -> new Rules(){{
|
||||||
waves = true;
|
waves = true;
|
||||||
waveTimer = true;
|
waveTimer = true;
|
||||||
@@ -326,6 +326,8 @@ public class Zones implements ContentList{
|
|||||||
}};
|
}};
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
desolateRift = new Zone("desolateRift", new MapGenerator("groundZero", 1)){{ //TODO implement
|
desolateRift = new Zone("desolateRift", new MapGenerator("groundZero", 1)){{ //TODO implement
|
||||||
deployCost = ItemStack.with(Items.copper, 300);
|
deployCost = ItemStack.with(Items.copper, 300);
|
||||||
startingItems = ItemStack.with(Items.copper, 200);
|
startingItems = ItemStack.with(Items.copper, 200);
|
||||||
|
|||||||
@@ -236,10 +236,21 @@ public class MapEditor{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void resize(int width, int height){
|
public void resize(int width, int height){
|
||||||
|
MapTileData previous = map;
|
||||||
|
int offsetX = -(width - previous.width())/2, offsetY = -(height - previous.height())/2;
|
||||||
|
|
||||||
map = new MapTileData(width, height);
|
map = new MapTileData(width, height);
|
||||||
for(int x = 0; x < map.width(); x++){
|
for(int x = 0; x < map.width(); x++){
|
||||||
for(int y = 0; y < map.height(); y++){
|
for(int y = 0; y < map.height(); y++){
|
||||||
map.write(x, y, DataPosition.floor, Blocks.stone.id);
|
int px = offsetX + x, py = offsetY + y;
|
||||||
|
if(Structs.inBounds(px, py, previous.width(), previous.height())){
|
||||||
|
map.write(x, y, DataPosition.floor, previous.read(px, py, DataPosition.floor));
|
||||||
|
map.write(x, y, DataPosition.wall, previous.read(px, py, DataPosition.wall));
|
||||||
|
map.write(x, y, DataPosition.link, previous.read(px, py, DataPosition.link));
|
||||||
|
map.write(x, y, DataPosition.rotationTeam, previous.read(px, py, DataPosition.rotationTeam));
|
||||||
|
}else{
|
||||||
|
map.write(x, y, DataPosition.floor, Blocks.stone.id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
renderer.resize(width, height);
|
renderer.resize(width, height);
|
||||||
|
|||||||
@@ -58,6 +58,8 @@ public class MapView extends Element implements GestureListener{
|
|||||||
Core.input.getInputProcessors().insert(0, new GestureDetector(20, 0.5f, 2, 0.15f, this));
|
Core.input.getInputProcessors().insert(0, new GestureDetector(20, 0.5f, 2, 0.15f, this));
|
||||||
touchable(Touchable.enabled);
|
touchable(Touchable.enabled);
|
||||||
|
|
||||||
|
Point2 firstTouch = new Point2();
|
||||||
|
|
||||||
addListener(new InputListener(){
|
addListener(new InputListener(){
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -95,6 +97,7 @@ public class MapView extends Element implements GestureListener{
|
|||||||
startx = p.x;
|
startx = p.x;
|
||||||
starty = p.y;
|
starty = p.y;
|
||||||
tool.touched(editor, p.x, p.y);
|
tool.touched(editor, p.x, p.y);
|
||||||
|
firstTouch.set(p);
|
||||||
|
|
||||||
if(tool.edit){
|
if(tool.edit){
|
||||||
updated = true;
|
updated = true;
|
||||||
@@ -116,6 +119,14 @@ public class MapView extends Element implements GestureListener{
|
|||||||
Point2 p = project(x, y);
|
Point2 p = project(x, y);
|
||||||
|
|
||||||
if(tool == EditorTool.line){
|
if(tool == EditorTool.line){
|
||||||
|
if(Core.input.keyDown(KeyCode.TAB)){
|
||||||
|
if(Math.abs(p.x - firstTouch.x) > Math.abs(p.y - firstTouch.y)){
|
||||||
|
p.y = firstTouch.y;
|
||||||
|
}else{
|
||||||
|
p.x = firstTouch.x;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ui.editor.resetSaved();
|
ui.editor.resetSaved();
|
||||||
Array<Point2> points = br.line(startx, starty, p.x, p.y);
|
Array<Point2> points = br.line(startx, starty, p.x, p.y);
|
||||||
for(Point2 point : points){
|
for(Point2 point : points){
|
||||||
@@ -140,6 +151,7 @@ public class MapView extends Element implements GestureListener{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void touchDragged(InputEvent event, float x, float y, int pointer){
|
public void touchDragged(InputEvent event, float x, float y, int pointer){
|
||||||
|
|
||||||
mousex = x;
|
mousex = x;
|
||||||
mousey = y;
|
mousey = y;
|
||||||
|
|
||||||
@@ -153,8 +165,19 @@ public class MapView extends Element implements GestureListener{
|
|||||||
}
|
}
|
||||||
updated = true;
|
updated = true;
|
||||||
}
|
}
|
||||||
lastx = p.x;
|
|
||||||
lasty = p.y;
|
if(tool == EditorTool.line && Core.input.keyDown(KeyCode.TAB)){
|
||||||
|
if(Math.abs(p.x - firstTouch.x) > Math.abs(p.y - firstTouch.y)){
|
||||||
|
lastx = p.x;
|
||||||
|
lasty = firstTouch.y;
|
||||||
|
}else{
|
||||||
|
lastx = firstTouch.x;
|
||||||
|
lasty = p.y;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
lastx = p.x;
|
||||||
|
lasty = p.y;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -316,7 +339,7 @@ public class MapView extends Element implements GestureListener{
|
|||||||
Lines.poly(brushPolygons[index], v2.x, v2.y, scaling);
|
Lines.poly(brushPolygons[index], v2.x, v2.y, scaling);
|
||||||
}
|
}
|
||||||
|
|
||||||
if((tool.edit || tool == EditorTool.line) && (!mobile || drawing)){
|
if((tool.edit || (tool == EditorTool.line && !drawing)) && (!mobile || drawing)){
|
||||||
Point2 p = project(mousex, mousey);
|
Point2 p = project(mousex, mousey);
|
||||||
Vector2 v = unproject(p.x, p.y).add(x, y);
|
Vector2 v = unproject(p.x, p.y).add(x, y);
|
||||||
Lines.poly(brushPolygons[index], v.x, v.y, scaling);
|
Lines.poly(brushPolygons[index], v.x, v.y, scaling);
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ public class MapGenerator extends Generator{
|
|||||||
public int enemySpawns = -1;
|
public int enemySpawns = -1;
|
||||||
/*Whether floor is distorted along with blocks.*/
|
/*Whether floor is distorted along with blocks.*/
|
||||||
public boolean distortFloor = false;
|
public boolean distortFloor = false;
|
||||||
|
/**Items randomly added to containers and vaults.*/
|
||||||
public ItemStack[] storageDrops = ItemStack.with(Items.copper, 300, Items.lead, 300, Items.silicon, 200, Items.graphite, 200, Items.blastCompound, 200);
|
public ItemStack[] storageDrops = ItemStack.with(Items.copper, 300, Items.lead, 300, Items.silicon, 200, Items.graphite, 200, Items.blastCompound, 200);
|
||||||
|
|
||||||
public MapGenerator(String mapName){
|
public MapGenerator(String mapName){
|
||||||
@@ -74,6 +75,7 @@ public class MapGenerator extends Generator{
|
|||||||
data.position(0, 0);
|
data.position(0, 0);
|
||||||
TileDataMarker marker = data.newDataMarker();
|
TileDataMarker marker = data.newDataMarker();
|
||||||
Array<Point2> players = new Array<>();
|
Array<Point2> players = new Array<>();
|
||||||
|
Array<Block> coreTypes = new Array<>();
|
||||||
Array<Point2> enemies = new Array<>();
|
Array<Point2> enemies = new Array<>();
|
||||||
|
|
||||||
for(int y = 0; y < data.height(); y++){
|
for(int y = 0; y < data.height(); y++){
|
||||||
@@ -82,6 +84,7 @@ public class MapGenerator extends Generator{
|
|||||||
|
|
||||||
if(content.block(marker.wall) instanceof CoreBlock){
|
if(content.block(marker.wall) instanceof CoreBlock){
|
||||||
players.add(new Point2(x, y));
|
players.add(new Point2(x, y));
|
||||||
|
coreTypes.add(content.block(marker.wall));
|
||||||
marker.wall = 0;
|
marker.wall = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -164,7 +167,7 @@ public class MapGenerator extends Generator{
|
|||||||
}
|
}
|
||||||
|
|
||||||
//TODO set specific core block?
|
//TODO set specific core block?
|
||||||
tiles[core.x][core.y].setBlock(Blocks.coreShard, defaultTeam);
|
tiles[core.x][core.y].setBlock(coreTypes.get(players.indexOf(core)), defaultTeam);
|
||||||
|
|
||||||
world.prepareTiles(tiles);
|
world.prepareTiles(tiles);
|
||||||
world.setMap(map);
|
world.setMap(map);
|
||||||
|
|||||||
@@ -157,6 +157,8 @@ public class CoreBlock extends StorageBlock{
|
|||||||
if(entity.progress >= 1f){
|
if(entity.progress >= 1f){
|
||||||
Call.onUnitRespawn(tile, entity.currentUnit);
|
Call.onUnitRespawn(tile, entity.currentUnit);
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
entity.heat = Mathf.lerpDelta(entity.heat, 0f, 0.1f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||