Merge branch 'master' of https://github.com/Anuken/Mindustry into 7.0-features
Conflicts: core/src/mindustry/world/blocks/environment/Floor.java core/src/mindustry/world/blocks/payloads/Payload.java gradle.properties
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package mindustry.entities.abilities;
|
||||
|
||||
import arc.*;
|
||||
import arc.audio.*;
|
||||
import arc.graphics.*;
|
||||
import arc.graphics.g2d.*;
|
||||
import arc.math.*;
|
||||
@@ -16,14 +17,15 @@ import mindustry.type.*;
|
||||
public class EnergyFieldAbility extends Ability{
|
||||
private static final Seq<Healthc> all = new Seq<>();
|
||||
|
||||
public float damage = 1, repair = 20f, reload = 100, range = 60;
|
||||
public float damage = 1, reload = 100, range = 60;
|
||||
public Effect healEffect = Fx.heal, hitEffect = Fx.hitLaserBlast, damageEffect = Fx.chainLightning;
|
||||
public StatusEffect status = StatusEffects.electrified;
|
||||
public Sound shootSound = Sounds.spark;
|
||||
public float statusDuration = 60f * 6f;
|
||||
public float x, y;
|
||||
public boolean hitBuildings = true;
|
||||
public int maxTargets = 25;
|
||||
public float healPercent = 3f;
|
||||
public float healPercent = 2.5f;
|
||||
|
||||
public float layer = Layer.bullet - 0.001f, blinkScl = 20f;
|
||||
public float effectRadius = 5f, sectorRad = 0.14f, rotateSpeed = 0.5f;
|
||||
@@ -139,6 +141,10 @@ public class EnergyFieldAbility extends Ability{
|
||||
}
|
||||
}
|
||||
|
||||
if(anyNearby){
|
||||
shootSound.at(unit);
|
||||
}
|
||||
|
||||
timer = 0f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -232,8 +232,8 @@ public class BulletType extends Content implements Cloneable{
|
||||
}
|
||||
|
||||
if(entity instanceof Unit unit){
|
||||
Tmp.v3.set(unit).sub(b.x, b.y).nor().scl(knockback * 80f);
|
||||
if(impact) Tmp.v3.setAngle(b.rotation());
|
||||
Tmp.v3.set(unit).sub(b).nor().scl(knockback * 80f);
|
||||
if(impact) Tmp.v3.setAngle(b.rotation() + (knockback < 0 ? 180f : 0f));
|
||||
unit.impulse(Tmp.v3);
|
||||
unit.apply(status, statusDuration);
|
||||
}
|
||||
|
||||
@@ -106,7 +106,6 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
||||
|
||||
/** Sets up all the necessary variables, but does not add this entity anywhere. */
|
||||
public Building create(Block block, Team team){
|
||||
this.tile = emptyTile;
|
||||
this.block = block;
|
||||
this.team = team;
|
||||
|
||||
@@ -1443,7 +1442,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
||||
@Override
|
||||
public void killed(){
|
||||
Events.fire(new BlockDestroyEvent(tile));
|
||||
block.breakSound.at(tile);
|
||||
block.destroySound.at(tile);
|
||||
onDestroyed();
|
||||
tile.remove();
|
||||
remove();
|
||||
|
||||
@@ -2,6 +2,7 @@ package mindustry.entities.comp;
|
||||
|
||||
import arc.math.*;
|
||||
import arc.math.geom.*;
|
||||
import arc.util.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import mindustry.async.PhysicsProcess.*;
|
||||
import mindustry.gen.*;
|
||||
|
||||
@@ -238,6 +238,10 @@ abstract class PlayerComp implements UnitController, Entityc, Syncc, Timerc, Dra
|
||||
con.kick(reason);
|
||||
}
|
||||
|
||||
void kick(KickReason reason, long duration){
|
||||
con.kick(reason, duration);
|
||||
}
|
||||
|
||||
void kick(String reason){
|
||||
con.kick(reason);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user