mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-12 10:59:22 +07:00
Balancing / Tau mech mobile block repair
This commit is contained in:
parent
b427185fac
commit
061c55614b
@ -83,7 +83,7 @@ public class Items implements ContentList{
|
||||
}};
|
||||
|
||||
biomatter = new Item("biomatter", Color.valueOf("648b55")){{
|
||||
flammability = 0.4f;
|
||||
flammability = 0.55f;
|
||||
fluxiness = 0.3f;
|
||||
}};
|
||||
|
||||
|
@ -26,7 +26,7 @@ public class Liquids implements ContentList{
|
||||
|
||||
lava = new Liquid("lava", Color.valueOf("e37341")){
|
||||
{
|
||||
temperature = 0.8f;
|
||||
temperature = 1f;
|
||||
viscosity = 0.8f;
|
||||
tier = 2;
|
||||
effect = StatusEffects.melting;
|
||||
|
@ -123,6 +123,7 @@ public class Mechs implements ContentList{
|
||||
speed = 0.44f;
|
||||
drag = 0.35f;
|
||||
boostSpeed = 0.8f;
|
||||
canHeal = true;
|
||||
weapon = Weapons.healBlaster;
|
||||
armor = 15f;
|
||||
trailColorTo = Palette.heal;
|
||||
@ -287,8 +288,8 @@ public class Mechs implements ContentList{
|
||||
trident = new Mech("trident-ship", true){
|
||||
{
|
||||
drillPower = 2;
|
||||
speed = 0.12f;
|
||||
drag = 0.035f;
|
||||
speed = 0.14f;
|
||||
drag = 0.034f;
|
||||
mass = 2.5f;
|
||||
turnCursor = false;
|
||||
armor = 20f;
|
||||
|
@ -152,7 +152,7 @@ public class Weapons implements ContentList{
|
||||
bomberTrident = new Weapon("bomber"){{
|
||||
length = 0f;
|
||||
width = 2f;
|
||||
reload = 9f;
|
||||
reload = 8f;
|
||||
shots = 2;
|
||||
roundrobin = true;
|
||||
ejectEffect = Fx.none;
|
||||
|
@ -196,9 +196,9 @@ public class CraftingBlocks extends BlockList implements ContentList{
|
||||
biomatterCompressor = new Compressor("biomattercompressor"){{
|
||||
liquidCapacity = 60f;
|
||||
itemCapacity = 50;
|
||||
craftTime = 25f;
|
||||
craftTime = 20f;
|
||||
outputLiquid = Liquids.oil;
|
||||
outputLiquidAmount = 1.5f;
|
||||
outputLiquidAmount = 2.5f;
|
||||
size = 2;
|
||||
health = 320;
|
||||
hasLiquids = true;
|
||||
|
@ -21,7 +21,7 @@ public class PowerBlocks extends BlockList implements ContentList{
|
||||
thermalGenerator = new LiquidHeatGenerator("thermal-generator"){{
|
||||
maxLiquidGenerate = 2f;
|
||||
powerCapacity = 40f;
|
||||
powerPerLiquid = 0.3f;
|
||||
powerPerLiquid = 0.35f;
|
||||
generateEffect = BlockFx.redgeneratespark;
|
||||
size = 2;
|
||||
}};
|
||||
|
@ -99,13 +99,13 @@ public class ProductionBlocks extends BlockList implements ContentList{
|
||||
|
||||
cultivator = new Cultivator("cultivator"){{
|
||||
result = Items.biomatter;
|
||||
drillTime = 260;
|
||||
drillTime = 200;
|
||||
size = 2;
|
||||
hasLiquids = true;
|
||||
hasPower = true;
|
||||
|
||||
consumes.power(0.08f);
|
||||
consumes.liquid(Liquids.water, 0.2f);
|
||||
consumes.liquid(Liquids.water, 0.15f);
|
||||
}};
|
||||
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ public class StorageBlocks extends BlockList implements ContentList{
|
||||
}};
|
||||
|
||||
unloader = new SortedUnloader("unloader"){{
|
||||
speed = 12f;
|
||||
speed = 7f;
|
||||
}};
|
||||
}
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ public class TurretBlocks extends BlockList implements ContentList{
|
||||
inaccuracy = 5f;
|
||||
shootCone = 50f;
|
||||
shootEffect = ShootFx.shootLiquid;
|
||||
range = 70f;
|
||||
range = 90f;
|
||||
health = 360;
|
||||
|
||||
drawer = (tile, entity) -> {
|
||||
|
@ -334,7 +334,7 @@ public class TurretBullets extends BulletList implements ContentList{
|
||||
lifetime = 200f;
|
||||
despawneffect = BlockFx.smeltsmoke;
|
||||
hiteffect = BulletFx.hitBulletBig;
|
||||
drag = 0.01f;
|
||||
drag = 0.005f;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -645,7 +645,8 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra
|
||||
}
|
||||
|
||||
protected void updateFlying(){
|
||||
if(Units.invalidateTarget(target, this)){
|
||||
if(Units.invalidateTarget(target, this) && !(target instanceof TileEntity && ((TileEntity) target).damaged() && target.getTeam() == team &&
|
||||
mech.canHeal && distanceTo(target) < getWeapon().getAmmo().getRange())){
|
||||
target = null;
|
||||
}
|
||||
|
||||
@ -726,11 +727,22 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra
|
||||
isShooting = false;
|
||||
if(Settings.getBool("autotarget")){
|
||||
target = Units.getClosestTarget(team, x, y, getWeapon().getAmmo().getRange());
|
||||
|
||||
if(mech.canHeal && target == null){
|
||||
target = Geometry.findClosest(x, y, world.indexer.getDamaged(Team.blue));
|
||||
if(target != null && distanceTo(target) > getWeapon().getAmmo().getRange()){
|
||||
target = null;
|
||||
}else if(target != null){
|
||||
target = ((Tile)target).entity;
|
||||
}
|
||||
}
|
||||
|
||||
if(target != null){
|
||||
setMineTile(null);
|
||||
}
|
||||
}
|
||||
}else if(target.isValid()){
|
||||
}else if(target.isValid() || (target instanceof TileEntity && ((TileEntity) target).damaged() && target.getTeam() == team &&
|
||||
mech.canHeal && distanceTo(target) < getWeapon().getAmmo().getRange())){
|
||||
//rotate toward and shoot the target
|
||||
if(mech.turnCursor){
|
||||
rotation = Mathf.slerpDelta(rotation, angleTo(target), 0.2f);
|
||||
|
@ -96,6 +96,9 @@ public class MobileInput extends InputHandler implements GestureListener{
|
||||
TileEntity entity = tile.entity;
|
||||
player.setMineTile(null);
|
||||
player.target = entity;
|
||||
}else if(tile != null && player.mech.canHeal && tile.entity != null && tile.getTeam() == player.getTeam() && tile.entity.damaged()){
|
||||
player.setMineTile(null);
|
||||
player.target = tile.entity;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -34,6 +34,7 @@ public class Mech extends UnlockableContent{
|
||||
public Color trailColorTo = Palette.boostTo;
|
||||
public int itemCapacity = 30;
|
||||
public boolean turnCursor = true;
|
||||
public boolean canHeal = false;
|
||||
|
||||
public float weaponOffsetX, weaponOffsetY;
|
||||
public Weapon weapon = Weapons.blaster;
|
||||
|
@ -1,16 +1,8 @@
|
||||
package io.anuke.mindustry.world.blocks.distribution;
|
||||
|
||||
import io.anuke.mindustry.type.Liquid;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
|
||||
public class LiquidTank extends LiquidRouter{
|
||||
|
||||
public LiquidTank(String name){
|
||||
super(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canDumpLiquid(Tile tile, Tile to, Liquid liquid){
|
||||
return super.canDumpLiquid(tile, to, liquid) && !(to.block() instanceof LiquidTank);
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ public class LiquidHeatGenerator extends LiquidGenerator{
|
||||
public void setStats(){
|
||||
super.setStats();
|
||||
|
||||
stats.add(BlockStat.basePowerGeneration, maxLiquidGenerate * powerPerLiquid * 60f, StatUnit.powerSecond);
|
||||
stats.add(BlockStat.basePowerGeneration, maxLiquidGenerate * powerPerLiquid * 60f * 0.5f, StatUnit.powerSecond);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -47,7 +47,8 @@ public class PowerNode extends PowerBlock{
|
||||
|
||||
@Remote(targets = Loc.both, called = Loc.server, forward = true)
|
||||
public static void linkPowerNodes(Player player, Tile tile, Tile other){
|
||||
if(tile.entity.power == null || !((PowerNode)tile.block()).linkValid(tile, other)) return;
|
||||
if(tile.entity.power == null || !((PowerNode)tile.block()).linkValid(tile, other)
|
||||
|| tile.entity.power.links.size >= ((PowerNode)tile.block()).maxNodes) return;
|
||||
|
||||
TileEntity entity = tile.entity();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user