Miner drone / Editor bugfixes
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 350 B |
@@ -788,6 +788,7 @@ block.blast-mixer.name = Blast Mixer
|
|||||||
block.solar-panel.name = Solar Panel
|
block.solar-panel.name = Solar Panel
|
||||||
block.solar-panel-large.name = Large Solar Panel
|
block.solar-panel-large.name = Large Solar Panel
|
||||||
block.oil-extractor.name = Oil Extractor
|
block.oil-extractor.name = Oil Extractor
|
||||||
|
block.draug-factory.name = Draug Miner Factory
|
||||||
block.spirit-factory.name = Spirit Drone Factory
|
block.spirit-factory.name = Spirit Drone Factory
|
||||||
block.phantom-factory.name = Phantom Drone Factory
|
block.phantom-factory.name = Phantom Drone Factory
|
||||||
block.wraith-factory.name = Wraith Fighter Factory
|
block.wraith-factory.name = Wraith Fighter Factory
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 705 B After Width: | Height: | Size: 709 B |
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 249 KiB After Width: | Height: | Size: 252 KiB |
|
Before Width: | Height: | Size: 214 KiB After Width: | Height: | Size: 220 KiB |
|
Before Width: | Height: | Size: 401 KiB After Width: | Height: | Size: 400 KiB |
|
Before Width: | Height: | Size: 283 KiB After Width: | Height: | Size: 292 KiB |
@@ -77,7 +77,7 @@ public class Blocks implements ContentList{
|
|||||||
duo, scatter, scorch, hail, arc, wave, lancer, swarmer, salvo, fuse, ripple, cyclone, spectre, meltdown,
|
duo, scatter, scorch, hail, arc, wave, lancer, swarmer, salvo, fuse, ripple, cyclone, spectre, meltdown,
|
||||||
|
|
||||||
//units
|
//units
|
||||||
spiritFactory, phantomFactory, wraithFactory, ghoulFactory, revenantFactory, daggerFactory, crawlerFactory, titanFactory,
|
draugFactory, spiritFactory, phantomFactory, wraithFactory, ghoulFactory, revenantFactory, daggerFactory, crawlerFactory, titanFactory,
|
||||||
fortressFactory, repairPoint,
|
fortressFactory, repairPoint,
|
||||||
|
|
||||||
//upgrades
|
//upgrades
|
||||||
@@ -1590,6 +1590,16 @@ public class Blocks implements ContentList{
|
|||||||
|
|
||||||
BooleanProvider padVisible = () -> state.rules.attackMode || state.rules.pvp || state.isEditor();
|
BooleanProvider padVisible = () -> state.rules.attackMode || state.rules.pvp || state.isEditor();
|
||||||
|
|
||||||
|
draugFactory = new UnitFactory("draug-factory"){{
|
||||||
|
requirements(Category.units, ItemStack.with(Items.copper, 30, Items.lead, 120));
|
||||||
|
type = UnitTypes.draug;
|
||||||
|
produceTime = 5000;
|
||||||
|
size = 2;
|
||||||
|
maxSpawn = 2;
|
||||||
|
consumes.power(0.5f);
|
||||||
|
consumes.items();
|
||||||
|
}};
|
||||||
|
|
||||||
spiritFactory = new UnitFactory("spirit-factory"){{
|
spiritFactory = new UnitFactory("spirit-factory"){{
|
||||||
requirements(Category.units, ItemStack.with(Items.copper, 70, Items.lead, 110, Items.silicon, 80));
|
requirements(Category.units, ItemStack.with(Items.copper, 70, Items.lead, 110, Items.silicon, 80));
|
||||||
type = UnitTypes.spirit;
|
type = UnitTypes.spirit;
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ public class Mechs implements ContentList{
|
|||||||
weapon = new Weapon("shockgun"){{
|
weapon = new Weapon("shockgun"){{
|
||||||
shake = 2f;
|
shake = 2f;
|
||||||
length = 1f;
|
length = 1f;
|
||||||
reload = 45f;
|
reload = 55f;
|
||||||
shotDelay = 3f;
|
shotDelay = 3f;
|
||||||
roundrobin = true;
|
roundrobin = true;
|
||||||
shots = 2;
|
shots = 2;
|
||||||
@@ -159,12 +159,12 @@ public class Mechs implements ContentList{
|
|||||||
weaponOffsetX = 1;
|
weaponOffsetX = 1;
|
||||||
weaponOffsetY = 0;
|
weaponOffsetY = 0;
|
||||||
engineColor = Color.valueOf("feb380");
|
engineColor = Color.valueOf("feb380");
|
||||||
health = 320f;
|
health = 350f;
|
||||||
buildPower = 1.5f;
|
buildPower = 1.5f;
|
||||||
weapon = new Weapon("swarmer"){{
|
weapon = new Weapon("swarmer"){{
|
||||||
length = 1.5f;
|
length = 1.5f;
|
||||||
recoil = 4f;
|
recoil = 4f;
|
||||||
reload = 45f;
|
reload = 38f;
|
||||||
shots = 4;
|
shots = 4;
|
||||||
spacing = 8f;
|
spacing = 8f;
|
||||||
inaccuracy = 8f;
|
inaccuracy = 8f;
|
||||||
|
|||||||
@@ -8,12 +8,27 @@ import io.anuke.mindustry.type.Weapon;
|
|||||||
|
|
||||||
public class UnitTypes implements ContentList{
|
public class UnitTypes implements ContentList{
|
||||||
public static UnitType
|
public static UnitType
|
||||||
spirit, phantom,
|
draug, spirit, phantom,
|
||||||
wraith, ghoul, revenant, lich, reaper,
|
wraith, ghoul, revenant, lich, reaper,
|
||||||
dagger, crawler, titan, fortress, eruptor, chaosArray, eradicator;
|
dagger, crawler, titan, fortress, eruptor, chaosArray, eradicator;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void load(){
|
public void load(){
|
||||||
|
draug = new UnitType("draug", Draug.class, Draug::new){{
|
||||||
|
isFlying = true;
|
||||||
|
drag = 0.01f;
|
||||||
|
speed = 0.3f;
|
||||||
|
maxVelocity = 1.2f;
|
||||||
|
range = 50f;
|
||||||
|
health = 60;
|
||||||
|
minePower = 0.5f;
|
||||||
|
engineSize = 1.8f;
|
||||||
|
engineOffset = 5.7f;
|
||||||
|
weapon = new Weapon("you have incurred my wrath. prepare to die."){{
|
||||||
|
bullet = Bullets.lancerLaser;
|
||||||
|
}};
|
||||||
|
}};
|
||||||
|
|
||||||
spirit = new UnitType("spirit", Spirit.class, Spirit::new){{
|
spirit = new UnitType("spirit", Spirit.class, Spirit::new){{
|
||||||
isFlying = true;
|
isFlying = true;
|
||||||
drag = 0.01f;
|
drag = 0.01f;
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ public class Zones implements ContentList{
|
|||||||
alwaysUnlocked = true;
|
alwaysUnlocked = true;
|
||||||
conditionWave = 5;
|
conditionWave = 5;
|
||||||
launchPeriod = 5;
|
launchPeriod = 5;
|
||||||
|
loadout = Loadouts.basicFoundation;
|
||||||
zoneRequirements = ZoneRequirement.with(desertWastes, 60);
|
zoneRequirements = ZoneRequirement.with(desertWastes, 60);
|
||||||
resources = new Item[]{Items.copper, Items.scrap, Items.lead, Items.coal, Items.sand};
|
resources = new Item[]{Items.copper, Items.scrap, Items.lead, Items.coal, Items.sand};
|
||||||
}};
|
}};
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import io.anuke.mindustry.world.Tile;
|
|||||||
import io.anuke.mindustry.world.blocks.Floor;
|
import io.anuke.mindustry.world.blocks.Floor;
|
||||||
|
|
||||||
import static io.anuke.mindustry.Vars.content;
|
import static io.anuke.mindustry.Vars.content;
|
||||||
import static io.anuke.mindustry.Vars.world;
|
|
||||||
|
|
||||||
public class DrawOperation{
|
public class DrawOperation{
|
||||||
private MapEditor editor;
|
private MapEditor editor;
|
||||||
@@ -66,7 +65,7 @@ public class DrawOperation{
|
|||||||
tile.setFloor((Floor)content.block(to));
|
tile.setFloor((Floor)content.block(to));
|
||||||
}else if(type == OpType.block.ordinal()){
|
}else if(type == OpType.block.ordinal()){
|
||||||
Block block = content.block(to);
|
Block block = content.block(to);
|
||||||
world.setBlock(tile, block, tile.getTeam(), tile.rotation());
|
tile.setBlock(block, tile.getTeam(), tile.rotation());
|
||||||
}else if(type == OpType.rotation.ordinal()){
|
}else if(type == OpType.rotation.ordinal()){
|
||||||
tile.rotation(to);
|
tile.rotation(to);
|
||||||
}else if(type == OpType.team.ordinal()){
|
}else if(type == OpType.team.ordinal()){
|
||||||
|
|||||||
@@ -112,14 +112,17 @@ public enum EditorTool{
|
|||||||
|
|
||||||
if(editor.drawBlock.isOverlay()){
|
if(editor.drawBlock.isOverlay()){
|
||||||
Block dest = tile.overlay();
|
Block dest = tile.overlay();
|
||||||
|
if(dest == editor.drawBlock) return;
|
||||||
tester = t -> t.overlay() == dest;
|
tester = t -> t.overlay() == dest;
|
||||||
setter = t -> t.setOverlay(editor.drawBlock);
|
setter = t -> t.setOverlay(editor.drawBlock);
|
||||||
}else if(editor.drawBlock.isFloor()){
|
}else if(editor.drawBlock.isFloor()){
|
||||||
Block dest = tile.floor();
|
Block dest = tile.floor();
|
||||||
|
if(dest == editor.drawBlock) return;
|
||||||
tester = t -> t.floor() == dest;
|
tester = t -> t.floor() == dest;
|
||||||
setter = t -> t.setFloorUnder(editor.drawBlock.asFloor());
|
setter = t -> t.setFloorUnder(editor.drawBlock.asFloor());
|
||||||
}else{
|
}else{
|
||||||
Block dest = tile.block();
|
Block dest = tile.block();
|
||||||
|
if(dest == editor.drawBlock) return;
|
||||||
tester = t -> t.block() == dest;
|
tester = t -> t.block() == dest;
|
||||||
setter = t -> t.setBlock(editor.drawBlock);
|
setter = t -> t.setBlock(editor.drawBlock);
|
||||||
}
|
}
|
||||||
@@ -130,9 +133,9 @@ public enum EditorTool{
|
|||||||
|
|
||||||
//only fill synthetic blocks, it's meaningless otherwise
|
//only fill synthetic blocks, it's meaningless otherwise
|
||||||
if(tile.link().synthetic()){
|
if(tile.link().synthetic()){
|
||||||
|
|
||||||
Team dest = tile.getTeam();
|
Team dest = tile.getTeam();
|
||||||
fill(editor, x, y, false, t -> t.getTeam() == dest, t -> t.setTeam(editor.drawTeam));
|
if(dest == editor.drawTeam) return;
|
||||||
|
fill(editor, x, y, false, t -> t.getTeamID() == dest.ordinal() && t.link().synthetic(), t -> t.setTeam(editor.drawTeam));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -413,7 +413,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
}
|
}
|
||||||
|
|
||||||
Table table = new Table("dialogDim");
|
Table table = new Table("dialogDim");
|
||||||
table.defaults().size(280f, 70f);
|
table.defaults().size(300f, 70f);
|
||||||
|
|
||||||
for(int i = 0; i < tool.altModes.length; i++){
|
for(int i = 0; i < tool.altModes.length; i++){
|
||||||
int mode = i;
|
int mode = i;
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
package io.anuke.mindustry.entities.type.base;
|
||||||
|
|
||||||
|
public class Draug extends MinerDrone{
|
||||||
|
}
|
||||||
@@ -53,9 +53,7 @@ public class MinerDrone extends FlyingUnit implements MinerTrait{
|
|||||||
}
|
}
|
||||||
|
|
||||||
retarget(() -> {
|
retarget(() -> {
|
||||||
if(getMineTile() == null){
|
findItem();
|
||||||
findItem();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(targetItem == null) return;
|
if(targetItem == null) return;
|
||||||
|
|
||||||
@@ -147,6 +145,11 @@ public class MinerDrone extends FlyingUnit implements MinerTrait{
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UnitState getStartState(){
|
||||||
|
return mine;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void update(){
|
public void update(){
|
||||||
super.update();
|
super.update();
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ public class UnitFactory extends Block{
|
|||||||
Shaders.build.progress = entity.buildTime / produceTime;
|
Shaders.build.progress = entity.buildTime / produceTime;
|
||||||
Shaders.build.color.set(Pal.accent);
|
Shaders.build.color.set(Pal.accent);
|
||||||
Shaders.build.color.a = entity.speedScl;
|
Shaders.build.color.a = entity.speedScl;
|
||||||
Shaders.build.time = -entity.time / 10f;
|
Shaders.build.time = -entity.time / 20f;
|
||||||
|
|
||||||
Draw.shader(Shaders.build);
|
Draw.shader(Shaders.build);
|
||||||
Draw.rect(region, tile.drawx(), tile.drawy());
|
Draw.rect(region, tile.drawx(), tile.drawy());
|
||||||
@@ -137,7 +137,7 @@ public class UnitFactory extends Block{
|
|||||||
Draw.alpha(entity.speedScl);
|
Draw.alpha(entity.speedScl);
|
||||||
|
|
||||||
Lines.lineAngleCenter(
|
Lines.lineAngleCenter(
|
||||||
tile.drawx() + Mathf.sin(entity.time, 6f, Vars.tilesize / 2f * size - 2f),
|
tile.drawx() + Mathf.sin(entity.time, 20f, Vars.tilesize / 2f * size - 2f),
|
||||||
tile.drawy(),
|
tile.drawy(),
|
||||||
90,
|
90,
|
||||||
size * Vars.tilesize - 4f);
|
size * Vars.tilesize - 4f);
|
||||||
|
|||||||