Merge branch 'master' of https://github.com/Anuken/Mindustry into 7.0-features
Conflicts: gradle.properties
This commit is contained in:
@@ -21,9 +21,7 @@ public class EmpBulletType extends BasicBulletType{
|
||||
Vars.indexer.allBuildings(x, y, radius, other -> {
|
||||
if(other.team == b.team){
|
||||
if(other.block.hasPower && other.block.canOverdrive && other.timeScale < timeIncrease){
|
||||
if(timeIncrease >= other.timeScale){
|
||||
other.timeScale = Math.max(other.timeScale, timeIncrease);
|
||||
}
|
||||
other.timeScale = Math.max(other.timeScale, timeIncrease);
|
||||
other.timeScaleDuration = Math.max(other.timeScaleDuration, timeDuration);
|
||||
chainEffect.at(x, y, 0, hitColor, other);
|
||||
applyEffect.at(other, other.block.size * 7f);
|
||||
|
||||
@@ -269,7 +269,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
||||
|
||||
public void applyBoost(float intensity, float duration){
|
||||
//do not refresh time scale when getting a weaker intensity
|
||||
if(intensity >= this.timeScale){
|
||||
if(intensity >= this.timeScale - 0.001f){
|
||||
timeScaleDuration = Math.max(timeScaleDuration, duration);
|
||||
}
|
||||
timeScale = Math.max(timeScale, intensity);
|
||||
@@ -280,11 +280,13 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
||||
}
|
||||
|
||||
public Building nearby(int rotation){
|
||||
if(rotation == 0) return world.build(tile.x + 1, tile.y);
|
||||
if(rotation == 1) return world.build(tile.x, tile.y + 1);
|
||||
if(rotation == 2) return world.build(tile.x - 1, tile.y);
|
||||
if(rotation == 3) return world.build(tile.x, tile.y - 1);
|
||||
return null;
|
||||
return switch(rotation){
|
||||
case 0 -> world.build(tile.x + 1, tile.y);
|
||||
case 1 -> world.build(tile.x, tile.y + 1);
|
||||
case 2 -> world.build(tile.x - 1, tile.y);
|
||||
case 3 -> world.build(tile.x, tile.y - 1);
|
||||
default -> null;
|
||||
};
|
||||
}
|
||||
|
||||
public byte relativeTo(Tile tile){
|
||||
@@ -1033,7 +1035,12 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
||||
|
||||
/** Called *after* the tile has been removed. */
|
||||
public void afterDestroyed(){
|
||||
|
||||
if(block.destroyBullet != null){
|
||||
//I really do not like that the bullet will not destroy derelict
|
||||
//but I can't do anything about it without using a random team
|
||||
//which may or may not cause issues with servers and js
|
||||
block.destroyBullet.create(this, Team.derelict, x, y, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/** @return the cap for item amount calculations, used when this block explodes. */
|
||||
|
||||
Reference in New Issue
Block a user