Merge branch 'master' of https://github.com/Anuken/Mindustry into rendering-optimizations
# Conflicts: # core/assets/sprites/sprites.atlas # core/assets/sprites/sprites.png # core/src/io/anuke/mindustry/core/Renderer.java # core/src/io/anuke/mindustry/entities/units/types/Drone.java # core/src/io/anuke/mindustry/graphics/CacheLayer.java # core/src/io/anuke/mindustry/world/blocks/Floor.java
This commit is contained in:
@@ -37,6 +37,7 @@ public class UnitTypes implements ContentList{
|
||||
};
|
||||
|
||||
spirit = new UnitType("spirit", Spirit.class, Spirit::new){{
|
||||
weapon = Weapons.healBlasterDrone;
|
||||
isFlying = true;
|
||||
drag = 0.01f;
|
||||
speed = 0.2f;
|
||||
|
||||
@@ -7,7 +7,7 @@ import io.anuke.mindustry.type.ContentType;
|
||||
import io.anuke.mindustry.type.Weapon;
|
||||
|
||||
public class Weapons implements ContentList{
|
||||
public static Weapon blaster, blasterSmall, glaiveBlaster, droneBlaster, healBlaster, chainBlaster, shockgun,
|
||||
public static Weapon blaster, blasterSmall, glaiveBlaster, droneBlaster, healBlaster, healBlasterDrone, chainBlaster, shockgun,
|
||||
sapper, swarmer, bomber, bomberTrident, flakgun, flamethrower, missiles, artillery, laserBurster;
|
||||
|
||||
@Override
|
||||
@@ -169,6 +169,16 @@ public class Weapons implements ContentList{
|
||||
ejectEffect = Fx.none;
|
||||
ammo = AmmoTypes.lancerLaser;
|
||||
}};
|
||||
|
||||
healBlasterDrone = new Weapon("heal-blaster"){{
|
||||
length = 1.5f;
|
||||
reload = 40f;
|
||||
width = 0.5f;
|
||||
roundrobin = true;
|
||||
ejectEffect = Fx.none;
|
||||
recoil = 2f;
|
||||
ammo = AmmoTypes.healBlaster;
|
||||
}};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -64,9 +64,9 @@ public class LiquidBlocks extends BlockList implements ContentList{
|
||||
}};
|
||||
|
||||
phaseConduit = new LiquidBridge("phase-conduit"){{
|
||||
range = 11;
|
||||
range = 12;
|
||||
hasPower = true;
|
||||
consumes.power(0.05f);
|
||||
consumes.power(0.03f);
|
||||
}};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,24 +32,13 @@ public class TurretBlocks extends BlockList implements ContentList{
|
||||
|
||||
hail = new ArtilleryTurret("hail"){{
|
||||
ammoTypes = new AmmoType[]{AmmoTypes.artilleryDense, AmmoTypes.artilleryHoming, AmmoTypes.artilleryIncindiary};
|
||||
reload = 70f;
|
||||
reload = 60f;
|
||||
recoil = 2f;
|
||||
range = 230f;
|
||||
inaccuracy = 1f;
|
||||
shootCone = 10f;
|
||||
health = 120;
|
||||
}};
|
||||
/*
|
||||
scatter = new BurstTurret("scatter"){{
|
||||
ammoTypes = new AmmoType[]{AmmoTypes.flakCopper};
|
||||
reload = 70f;
|
||||
recoil = 2f;
|
||||
shots = 3;
|
||||
range = 220f;
|
||||
inaccuracy = 2f;
|
||||
shootCone = 40f;
|
||||
health = 120;
|
||||
}};*/
|
||||
|
||||
scorch = new LiquidTurret("scorch"){
|
||||
protected TextureRegion shootRegion;
|
||||
@@ -117,11 +106,11 @@ public class TurretBlocks extends BlockList implements ContentList{
|
||||
|
||||
arc = new PowerTurret("arc"){{
|
||||
shootType = AmmoTypes.arc;
|
||||
reload = 55f;
|
||||
reload = 85f;
|
||||
shootShake = 1f;
|
||||
shootCone = 40f;
|
||||
rotatespeed = 8f;
|
||||
powerUsed = 7f;
|
||||
powerUsed = 10f;
|
||||
powerCapacity = 30f;
|
||||
range = 150f;
|
||||
shootEffect = ShootFx.lightningShoot;
|
||||
@@ -132,7 +121,7 @@ public class TurretBlocks extends BlockList implements ContentList{
|
||||
|
||||
swarmer = new BurstTurret("swarmer"){{
|
||||
ammoTypes = new AmmoType[]{AmmoTypes.missileExplosive, AmmoTypes.missileIncindiary, AmmoTypes.missileSurge};
|
||||
reload = 60f;
|
||||
reload = 50f;
|
||||
shots = 4;
|
||||
burstSpacing = 5;
|
||||
inaccuracy = 10f;
|
||||
@@ -156,7 +145,7 @@ public class TurretBlocks extends BlockList implements ContentList{
|
||||
size = 2;
|
||||
range = 120f;
|
||||
ammoTypes = new AmmoType[]{AmmoTypes.bulletCopper, AmmoTypes.bulletDense, AmmoTypes.bulletPyratite, AmmoTypes.bulletThorium, AmmoTypes.bulletSilicon};
|
||||
reload = 40f;
|
||||
reload = 35f;
|
||||
restitution = 0.03f;
|
||||
ammoEjectBack = 3f;
|
||||
cooldown = 0.03f;
|
||||
@@ -216,7 +205,6 @@ public class TurretBlocks extends BlockList implements ContentList{
|
||||
}};
|
||||
|
||||
fuse = new ItemTurret("fuse"){{
|
||||
//TODO make it use power
|
||||
ammoTypes = new AmmoType[]{AmmoTypes.fuseShotgun};
|
||||
reload = 50f;
|
||||
shootShake = 4f;
|
||||
|
||||
@@ -43,7 +43,7 @@ public class TurretBullets extends BulletList implements ContentList{
|
||||
};
|
||||
|
||||
healBullet = new BulletType(5.2f, 13){
|
||||
float healAmount = 21f;
|
||||
float healPercent = 3f;
|
||||
|
||||
{
|
||||
hiteffect = BulletFx.hitLaser;
|
||||
@@ -51,6 +51,11 @@ public class TurretBullets extends BulletList implements ContentList{
|
||||
collidesTeam = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean collides(Bullet b, Tile tile){
|
||||
return tile.getTeam() != b.getTeam() || tile.entity.healthf() < 1f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(Bullet b){
|
||||
Draw.color(Palette.heal);
|
||||
@@ -67,8 +72,8 @@ public class TurretBullets extends BulletList implements ContentList{
|
||||
tile = tile.target();
|
||||
|
||||
if(tile.getTeam() == b.getTeam() && !(tile.block() instanceof BuildBlock)){
|
||||
Effects.effect(BlockFx.healBlock, tile.drawx(), tile.drawy(), tile.block().size);
|
||||
tile.entity.healBy(healAmount);
|
||||
Effects.effect(BlockFx.healBlockFull, Palette.heal, tile.drawx(), tile.drawy(), tile.block().size);
|
||||
tile.entity.healBy(healPercent / 100f * tile.entity.maxHealth());
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -304,7 +309,7 @@ public class TurretBullets extends BulletList implements ContentList{
|
||||
}
|
||||
};
|
||||
|
||||
arc = new BulletType(0.001f, 30){
|
||||
arc = new BulletType(0.001f, 26){
|
||||
{
|
||||
lifetime = 1;
|
||||
despawneffect = Fx.none;
|
||||
|
||||
Reference in New Issue
Block a user