Fixed unit icons / New scatter AA turret

This commit is contained in:
Anuken
2019-03-14 16:37:07 -04:00
parent 71751ee18d
commit 43bcf0cf3b
11 changed files with 1241 additions and 1155 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 B

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

@@ -603,6 +603,7 @@ block.thorium-wall-large.name = Large Thorium Wall
block.door.name = Door block.door.name = Door
block.door-large.name = Large Door block.door-large.name = Large Door
block.duo.name = Duo block.duo.name = Duo
block.scatter.name = Scatter
block.hail.name = Hail block.hail.name = Hail
block.lancer.name = Lancer block.lancer.name = Lancer
block.conveyor.name = Conveyor block.conveyor.name = Conveyor
@@ -764,8 +765,9 @@ block.mend-projector.description = Periodically heals blocks in its vicinity.
block.overdrive-projector.description = Increases the speed of nearby buildings like drills and conveyors. block.overdrive-projector.description = Increases the speed of nearby buildings like drills and conveyors.
block.force-projector.description = Creates a hexagonal force field around itself, protecting buildings and units inside from damage through bullets. block.force-projector.description = Creates a hexagonal force field around itself, protecting buildings and units inside from damage through bullets.
block.shock-mine.description = Damages enemies stepping on the mine. Nearly invisible to the enemy. block.shock-mine.description = Damages enemies stepping on the mine. Nearly invisible to the enemy.
block.duo.description = A small, cheap turret. block.duo.description = A small, cheap turret. Useful against ground units.
block.arc.description = A small turret which shoots electricity in a random arc towards the enemy. block.scatter.description = A medium-sized anti-air turret. Sprays clumps of lead or scrap flak at enemy units.
block.arc.description = A small close-range turret which shoots electricity in a random arc towards the enemy.
block.hail.description = A small artillery turret. block.hail.description = A small artillery turret.
block.lancer.description = A medium-sized turret which shoots charged electricity beams. block.lancer.description = A medium-sized turret which shoots charged electricity beams.
block.wave.description = A medium-sized rapid-fire turret which shoots liquid bubbles. block.wave.description = A medium-sized rapid-fire turret which shoots liquid bubbles.

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 237 KiB

After

Width:  |  Height:  |  Size: 238 KiB

View File

@@ -72,7 +72,7 @@ public class Blocks implements ContentList{
coreShard, coreFoundation, coreNucleus, vault, container, unloader, launchPad, coreShard, coreFoundation, coreNucleus, vault, container, unloader, launchPad,
//turrets //turrets
duo, hail, arc, wave, lancer, swarmer, salvo, fuse, ripple, cyclone, spectre, meltdown, duo, scatter, hail, arc, wave, lancer, swarmer, salvo, fuse, ripple, cyclone, spectre, meltdown,
//units //units
spiritFactory, phantomFactory, wraithFactory, ghoulFactory, revenantFactory, daggerFactory, crawlerFactory, titanFactory, spiritFactory, phantomFactory, wraithFactory, ghoulFactory, revenantFactory, daggerFactory, crawlerFactory, titanFactory,
@@ -1066,6 +1066,26 @@ public class Blocks implements ContentList{
rotatespeed = 10f; rotatespeed = 10f;
}}; }};
scatter = new BurstTurret("scatter"){{
requirements(Category.turret, ItemStack.with(Items.copper, 170, Items.lead, 90), true);
ammo(
Items.scrap, Bullets.flakScrap,
Items.lead, Bullets.flakLead
);
reload = 45f;
range = 160f;
size = 2;
burstSpacing = 5f;
shots = 2;
recoil = 2f;
rotatespeed = 10f;
inaccuracy = 18f;
shootCone = 35f;
health = 220;
}};
hail = new ArtilleryTurret("hail"){{ hail = new ArtilleryTurret("hail"){{
requirements(Category.turret, ItemStack.with(Items.copper, 60, Items.graphite, 35)); requirements(Category.turret, ItemStack.with(Items.copper, 60, Items.graphite, 35));
ammo( ammo(
@@ -1138,6 +1158,7 @@ public class Blocks implements ContentList{
shootCone = 40f; shootCone = 40f;
rotatespeed = 8f; rotatespeed = 8f;
powerUsed = 1f / 2f; powerUsed = 1f / 2f;
targetAir = false;
consumes.powerBuffered(80f); consumes.powerBuffered(80f);
range = 80f; range = 80f;
shootEffect = Fx.lightningShoot; shootEffect = Fx.lightningShoot;
@@ -1221,7 +1242,7 @@ public class Blocks implements ContentList{
); );
xRand = 4f; xRand = 4f;
reload = 8f; reload = 8f;
range = 145f; range = 160f;
size = 3; size = 3;
recoil = 3f; recoil = 3f;
rotatespeed = 10f; rotatespeed = 10f;

View File

@@ -30,7 +30,7 @@ public class Bullets implements ContentList{
artilleryDense, arilleryPlastic, artilleryPlasticFrag, artilleryHoming, artlleryIncendiary, artilleryExplosive, artilleryUnit, artilleryDense, arilleryPlastic, artilleryPlasticFrag, artilleryHoming, artlleryIncendiary, artilleryExplosive, artilleryUnit,
//flak //flak
flakPlastic, flakExplosive, flakSurge, flakScrap, flakLead, flakPlastic, flakExplosive, flakSurge,
//missiles //missiles
missileExplosive, missileIncendiary, missileSurge, missileJavelin, missileSwarm, missileRevenant, missileExplosive, missileIncendiary, missileSurge, missileJavelin, missileSwarm, missileRevenant,
@@ -140,6 +140,25 @@ public class Bullets implements ContentList{
frontColor = Pal.bulletYellow; frontColor = Pal.bulletYellow;
}}; }};
flakLead = new FlakBulletType(3.9f, 3){{
shootEffect = Fx.shootSmall;
bulletWidth = 6f;
bulletHeight = 8f;
hitEffect = Fx.flakExplosion;
splashDamage = 25f;
splashDamageRadius = 15f;
}};
flakScrap = new FlakBulletType(3.5f, 3){{
shootEffect = Fx.shootSmall;
reloadMultiplier = 0.5f;
bulletWidth = 6f;
bulletHeight = 8f;
hitEffect = Fx.flakExplosion;
splashDamage = 16f;
splashDamageRadius = 24f;
}};
flakPlastic = new FlakBulletType(4f, 6){{ flakPlastic = new FlakBulletType(4f, 6){{
splashDamageRadius = 50f; splashDamageRadius = 50f;
fragBullet = artilleryPlasticFrag; fragBullet = artilleryPlasticFrag;

View File

@@ -51,16 +51,16 @@ public class WaveInfoDialog extends FloatingDialog{
cont.clear(); cont.clear();
cont.table("button-disabled", main -> { cont.table("clear", main -> {
main.pane(t -> table = t).growX().growY().get().setScrollingDisabled(true, false); main.pane(t -> table = t).growX().growY().get().setScrollingDisabled(true, false);
main.row(); main.row();
main.addButton("$add", () -> { main.addButton("$add", () -> {
if(groups == null) groups = new Array<>(); if(groups == null) groups = new Array<>();
groups.add(new SpawnGroup(lastType)); groups.add(new SpawnGroup(lastType));
buildGroups(); buildGroups();
}).growX().height(80f); }).growX().height(70f);
}).width(390f).growY(); }).width(390f).growY();
cont.table("button-disabled", m -> { cont.table("clear", m -> {
m.add("Preview").color(Color.LIGHT_GRAY).growX().center().get().setAlignment(Align.center, Align.center); m.add("Preview").color(Color.LIGHT_GRAY).growX().center().get().setAlignment(Align.center, Align.center);
m.row(); m.row();
m.addButton("-", () -> {}).update(t -> { m.addButton("-", () -> {}).update(t -> {
@@ -98,7 +98,7 @@ public class WaveInfoDialog extends FloatingDialog{
if(groups != null){ if(groups != null){
for(SpawnGroup group : groups){ for(SpawnGroup group : groups){
table.table("button-disabled", t -> { table.table("clear", t -> {
t.margin(6f).defaults().pad(2).padLeft(5f).growX().left(); t.margin(6f).defaults().pad(2).padLeft(5f).growX().left();
t.addButton(b -> { t.addButton(b -> {
b.left(); b.left();
@@ -166,7 +166,7 @@ public class WaveInfoDialog extends FloatingDialog{
t.remove(); t.remove();
updateWaves(); updateWaves();
}).growX().pad(-6f).padTop(5); }).growX().pad(-6f).padTop(5);
}).width(340f).pad(3); }).width(340f).pad(5);
table.row(); table.row();
} }
}else{ }else{
@@ -204,7 +204,7 @@ public class WaveInfoDialog extends FloatingDialog{
for(int i = start; i < displayed + start; i ++){ for(int i = start; i < displayed + start; i ++){
int wave = i; int wave = i;
preview.table("button-disabled", table -> { preview.table("underline", table -> {
table.add(wave + "").color(Pal.accent).center().colspan(2).get().setAlignment(Align.center, Align.center); table.add(wave + "").color(Pal.accent).center().colspan(2).get().setAlignment(Align.center, Align.center);
table.row(); table.row();

View File

@@ -48,7 +48,7 @@ public class DatabaseDialog extends FloatingDialog{
list.left(); list.left();
int maxWidth = UIUtils.portrait() ? 7 : 13; int maxWidth = UIUtils.portrait() ? 7 : 13;
int size = 8 * 4; int size = 8 * 5;
int count = 0; int count = 0;

View File

@@ -1,6 +1,7 @@
package io.anuke.mindustry; package io.anuke.mindustry;
import io.anuke.arc.graphics.Color; import io.anuke.arc.graphics.Color;
import io.anuke.arc.graphics.g2d.Draw;
import io.anuke.arc.graphics.g2d.TextureRegion; import io.anuke.arc.graphics.g2d.TextureRegion;
import io.anuke.arc.math.Mathf; import io.anuke.arc.math.Mathf;
import io.anuke.arc.util.Log; import io.anuke.arc.util.Log;
@@ -165,8 +166,8 @@ public class Generators {
int off = image.width()/2 - mech.weapon.region.getWidth()/2; int off = image.width()/2 - mech.weapon.region.getWidth()/2;
image.draw(mech.weapon.region, -(int)mech.weaponOffsetX + off, (int)mech.weaponOffsetY + off + 4, false, false); image.draw(mech.weapon.region, -(int)mech.weaponOffsetX + off, (int)mech.weaponOffsetY + off, false, false);
image.draw(mech.weapon.region, (int)mech.weaponOffsetX + off, (int)mech.weaponOffsetY + off + 4, true, false); image.draw(mech.weapon.region, (int)mech.weaponOffsetX + off, (int)mech.weaponOffsetY + off, true, false);
image.save("mech-icon-" + mech.name); image.save("mech-icon-" + mech.name);
@@ -187,14 +188,12 @@ public class Generators {
image.draw(type.legRegion, true, false); image.draw(type.legRegion, true, false);
image.draw(type.region); image.draw(type.region);
image.draw(type.weapon.region, for(boolean b : Mathf.booleans){
-(int)type.weapon.width + image.width()/2 - type.weapon.region.getWidth()/2, image.draw(type.weapon.region,
(int)type.weaponOffsetY - image.height()/2 - type.weapon.region.getHeight()/2 + 1, (int)(Mathf.sign(b) * type.weapon.width / Draw.scl + image.width()/2 - type.weapon.region.getWidth()/2),
false, false); (int)(type.weaponOffsetY / Draw.scl + image.height()/2f - type.weapon.region.getHeight()/2f),
image.draw(type.weapon.region, b, false);
(int)type.weapon.width + image.width()/2 - type.weapon.region.getWidth()/2, }
(int)type.weaponOffsetY - image.height()/2 - type.weapon.region.getHeight()/2 + 1,
true, false);
image.save("unit-icon-" + type.name); image.save("unit-icon-" + type.name);
} }

View File

@@ -2,6 +2,7 @@ package io.anuke.mindustry;
import io.anuke.arc.Core; import io.anuke.arc.Core;
import io.anuke.arc.collection.ObjectMap; import io.anuke.arc.collection.ObjectMap;
import io.anuke.arc.graphics.g2d.Draw;
import io.anuke.arc.graphics.g2d.TextureAtlas; import io.anuke.arc.graphics.g2d.TextureAtlas;
import io.anuke.arc.graphics.g2d.TextureAtlas.AtlasRegion; import io.anuke.arc.graphics.g2d.TextureAtlas.AtlasRegion;
import io.anuke.arc.graphics.g2d.TextureRegion; import io.anuke.arc.graphics.g2d.TextureRegion;
@@ -95,6 +96,8 @@ public class ImagePacker{
} }
}; };
Draw.scl = 1f/Core.atlas.find("scale_marker").getWidth();
Time.mark(); Time.mark();
Generators.generate(); Generators.generate();
Log.info("&ly[Generator]&lc Total time to generate: &lg{0}&lcms", Time.elapsed()); Log.info("&ly[Generator]&lc Total time to generate: &lg{0}&lcms", Time.elapsed());