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