Balancing / Item tweaks
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 404 KiB After Width: | Height: | Size: 405 KiB |
|
Before Width: | Height: | Size: 307 KiB After Width: | Height: | Size: 307 KiB |
@@ -1110,7 +1110,7 @@ public class Blocks implements ContentList{
|
|||||||
size = 4;
|
size = 4;
|
||||||
health = 900;
|
health = 900;
|
||||||
powerProduction = 130f;
|
powerProduction = 130f;
|
||||||
itemDuration = 80f;
|
itemDuration = 90f;
|
||||||
consumes.power(25f);
|
consumes.power(25f);
|
||||||
consumes.item(Items.blastCompound);
|
consumes.item(Items.blastCompound);
|
||||||
consumes.liquid(Liquids.cryofluid, 0.25f);
|
consumes.liquid(Liquids.cryofluid, 0.25f);
|
||||||
@@ -1151,7 +1151,7 @@ public class Blocks implements ContentList{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
blastDrill = new Drill("blast-drill"){{
|
blastDrill = new Drill("blast-drill"){{
|
||||||
requirements(Category.production, ItemStack.with(Items.copper, 130, Items.silicon, 120, Items.titanium, 100, Items.thorium, 90));
|
requirements(Category.production, ItemStack.with(Items.copper, 130, Items.silicon, 120, Items.titanium, 100, Items.thorium, 100));
|
||||||
drillTime = 200;
|
drillTime = 200;
|
||||||
size = 4;
|
size = 4;
|
||||||
drawRim = true;
|
drawRim = true;
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import io.anuke.arc.math.Mathf;
|
|||||||
import io.anuke.arc.util.Time;
|
import io.anuke.arc.util.Time;
|
||||||
import io.anuke.mindustry.entities.Effects;
|
import io.anuke.mindustry.entities.Effects;
|
||||||
import io.anuke.mindustry.entities.Units;
|
import io.anuke.mindustry.entities.Units;
|
||||||
|
import io.anuke.mindustry.entities.bullet.BombBulletType;
|
||||||
import io.anuke.mindustry.entities.effect.Lightning;
|
import io.anuke.mindustry.entities.effect.Lightning;
|
||||||
import io.anuke.mindustry.entities.type.Player;
|
import io.anuke.mindustry.entities.type.Player;
|
||||||
import io.anuke.mindustry.game.ContentList;
|
import io.anuke.mindustry.game.ContentList;
|
||||||
@@ -307,11 +308,11 @@ public class Mechs implements ContentList{
|
|||||||
trident = new Mech("trident-ship", true){
|
trident = new Mech("trident-ship", true){
|
||||||
{
|
{
|
||||||
drillPower = 2;
|
drillPower = 2;
|
||||||
speed = 0.14f;
|
speed = 0.15f;
|
||||||
drag = 0.034f;
|
drag = 0.034f;
|
||||||
mass = 2.5f;
|
mass = 2.5f;
|
||||||
turnCursor = false;
|
turnCursor = false;
|
||||||
health = 220f;
|
health = 250f;
|
||||||
itemCapacity = 30;
|
itemCapacity = 30;
|
||||||
engineColor = Color.valueOf("84f491");
|
engineColor = Color.valueOf("84f491");
|
||||||
cellTrnsY = 1f;
|
cellTrnsY = 1f;
|
||||||
@@ -319,14 +320,22 @@ public class Mechs implements ContentList{
|
|||||||
weapon = new Weapon("bomber"){{
|
weapon = new Weapon("bomber"){{
|
||||||
length = 0f;
|
length = 0f;
|
||||||
width = 2f;
|
width = 2f;
|
||||||
reload = 8f;
|
reload = 25f;
|
||||||
shots = 2;
|
shots = 2;
|
||||||
|
shotDelay = 1f;
|
||||||
|
shots = 8;
|
||||||
roundrobin = true;
|
roundrobin = true;
|
||||||
ejectEffect = Fx.none;
|
ejectEffect = Fx.none;
|
||||||
velocityRnd = 1f;
|
velocityRnd = 1f;
|
||||||
inaccuracy = 40f;
|
inaccuracy = 20f;
|
||||||
ignoreRotation = true;
|
ignoreRotation = true;
|
||||||
bullet = Bullets.bombExplosive;
|
bullet = new BombBulletType(14f, 25f, "shell"){{
|
||||||
|
bulletWidth = 10f;
|
||||||
|
bulletHeight = 14f;
|
||||||
|
hitEffect = Fx.flakExplosion;
|
||||||
|
shootEffect = Fx.none;
|
||||||
|
smokeEffect = Fx.none;
|
||||||
|
}};
|
||||||
}};
|
}};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -637,9 +637,14 @@ public class Player extends Unit implements BuilderTrait, ShooterTrait{
|
|||||||
|
|
||||||
protected void updateShooting(){
|
protected void updateShooting(){
|
||||||
if(!state.isEditor() && isShooting() && mech.canShoot(this)){
|
if(!state.isEditor() && isShooting() && mech.canShoot(this)){
|
||||||
|
if(!mech.turnCursor){
|
||||||
|
//shoot forward ignoring cursor
|
||||||
|
mech.weapon.update(this, x + Angles.trnsx(rotation, 1f), y + Angles.trnsy(rotation, 1f));
|
||||||
|
}else{
|
||||||
mech.weapon.update(this, pointerX, pointerY);
|
mech.weapon.update(this, pointerX, pointerY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected void updateFlying(){
|
protected void updateFlying(){
|
||||||
if(Units.invalidateTarget(target, this) && !(target instanceof TileEntity && ((TileEntity)target).damaged() && target.isValid() && target.getTeam() == team && mech.canHeal && dst(target) < getWeapon().bullet.range())){
|
if(Units.invalidateTarget(target, this) && !(target instanceof TileEntity && ((TileEntity)target).damaged() && target.isValid() && target.getTeam() == team && mech.canHeal && dst(target) < getWeapon().bullet.range())){
|
||||||
|
|||||||
@@ -88,13 +88,14 @@ public class Weapon{
|
|||||||
public static void shootDirect(ShooterTrait shooter, float offsetX, float offsetY, float rotation, boolean left){
|
public static void shootDirect(ShooterTrait shooter, float offsetX, float offsetY, float rotation, boolean left){
|
||||||
float x = shooter.getX() + offsetX;
|
float x = shooter.getX() + offsetX;
|
||||||
float y = shooter.getY() + offsetY;
|
float y = shooter.getY() + offsetY;
|
||||||
|
float baseX = shooter.getX(), baseY = shooter.getY();
|
||||||
|
|
||||||
Weapon weapon = shooter.getWeapon();
|
Weapon weapon = shooter.getWeapon();
|
||||||
|
|
||||||
sequenceNum = 0;
|
sequenceNum = 0;
|
||||||
if(weapon.shotDelay > 0.01f){
|
if(weapon.shotDelay > 0.01f){
|
||||||
Angles.shotgun(weapon.shots, weapon.spacing, rotation, f -> {
|
Angles.shotgun(weapon.shots, weapon.spacing, rotation, f -> {
|
||||||
Time.run(sequenceNum * weapon.shotDelay, () -> weapon.bullet(shooter, x, y, f + Mathf.range(weapon.inaccuracy)));
|
Time.run(sequenceNum * weapon.shotDelay, () -> weapon.bullet(shooter, x + shooter.getX() - baseX, y + shooter.getY() - baseY, f + Mathf.range(weapon.inaccuracy)));
|
||||||
sequenceNum++;
|
sequenceNum++;
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import java.util.Locale;
|
|||||||
import static io.anuke.mindustry.Vars.content;
|
import static io.anuke.mindustry.Vars.content;
|
||||||
import static io.anuke.mindustry.Vars.data;
|
import static io.anuke.mindustry.Vars.data;
|
||||||
|
|
||||||
|
/** Displays a list of items, e.g. launched items.*/
|
||||||
public class ItemsDisplay extends Table{
|
public class ItemsDisplay extends Table{
|
||||||
private static final NumberFormat format = NumberFormat.getNumberInstance(Locale.getDefault());
|
private static final NumberFormat format = NumberFormat.getNumberInstance(Locale.getDefault());
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package io.anuke.mindustry.world.consumers;
|
package io.anuke.mindustry.world.consumers;
|
||||||
|
|
||||||
import io.anuke.arc.collection.Array;
|
|
||||||
import io.anuke.arc.function.Predicate;
|
import io.anuke.arc.function.Predicate;
|
||||||
import io.anuke.arc.scene.ui.layout.Table;
|
import io.anuke.arc.scene.ui.layout.Table;
|
||||||
import io.anuke.mindustry.entities.type.TileEntity;
|
import io.anuke.mindustry.entities.type.TileEntity;
|
||||||
@@ -33,9 +32,8 @@ public class ConsumeItemFilter extends Consume{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void build(Tile tile, Table table){
|
public void build(Tile tile, Table table){
|
||||||
Array<Item> list = content.items().select(filter);
|
|
||||||
MultiReqImage image = new MultiReqImage();
|
MultiReqImage image = new MultiReqImage();
|
||||||
list.each(item -> image.add(new ReqImage(new ItemImage(item.icon(Icon.large), 1), () -> tile.entity != null && tile.entity.items != null && tile.entity.items.has(item))));
|
content.items().each(filter, item -> image.add(new ReqImage(new ItemImage(item.icon(Icon.large), 1), () -> tile.entity != null && tile.entity.items != null && tile.entity.items.has(item))));
|
||||||
|
|
||||||
table.add(image).size(8 * 4);
|
table.add(image).size(8 * 4);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ task swapColors(){
|
|||||||
task scaleSprites4x(){
|
task scaleSprites4x(){
|
||||||
doLast{
|
doLast{
|
||||||
fileTree(dir: '../core/assets-raw/sprites_out/', include: "**/*.png").visit{ file ->
|
fileTree(dir: '../core/assets-raw/sprites_out/', include: "**/*.png").visit{ file ->
|
||||||
if(file.isDirectory() || file.toString().contains("/ui/")) return
|
if(file.isDirectory() || file.toString().replace("\\", "/").contains("/ui/")) return
|
||||||
|
|
||||||
scaleImage(file.file)
|
scaleImage(file.file)
|
||||||
antialias(file.file)
|
antialias(file.file)
|
||||||
@@ -205,7 +205,7 @@ task pack(){
|
|||||||
doLast{
|
doLast{
|
||||||
|
|
||||||
fileTree(dir: '../core/assets-raw/sprites_out/', include: "**/*.png").visit{ file ->
|
fileTree(dir: '../core/assets-raw/sprites_out/', include: "**/*.png").visit{ file ->
|
||||||
if(file.isDirectory() || file.toString().contains("/ui/")) return
|
if(file.isDirectory() || file.toString().replace("\\", "/").contains("/ui/")) return
|
||||||
|
|
||||||
antialias(file.file)
|
antialias(file.file)
|
||||||
}
|
}
|
||||||
|
|||||||