Merge branches 'master' and 'mech-rework' of https://github.com/Anuken/Mindustry into mech-rework
# Conflicts: # android/src/mindustry/android/AndroidLauncher.java # annotations/src/main/java/mindustry/annotations/SerializeAnnotationProcessor.java # annotations/src/main/java/mindustry/annotations/impl/AssetsAnnotationProcessor.java # build.gradle # core/assets-raw/fontgen/config.json # core/assets/bundles/bundle_cs.properties # core/assets/bundles/bundle_it.properties # core/assets/fonts/font.ttf # core/assets/fonts/icon.ttf # core/assets/icons/icons.properties # core/assets/sprites/block_colors.png # core/assets/sprites/sprites.atlas # core/assets/sprites/sprites.png # core/assets/sprites/sprites3.png # core/assets/sprites/sprites5.png # core/src/mindustry/content/UnitTypes.java # core/src/mindustry/core/NetClient.java # core/src/mindustry/core/NetServer.java # core/src/mindustry/entities/bullet/BulletType.java # core/src/mindustry/entities/type/TileEntity.java # core/src/mindustry/maps/filters/FilterOption.java # core/src/mindustry/mod/Scripts.java # core/src/mindustry/ui/Fonts.java # core/src/mindustry/ui/dialogs/DeployDialog.java # core/src/mindustry/ui/fragments/HudFragment.java # core/src/mindustry/ui/fragments/MenuFragment.java # core/src/mindustry/world/blocks/production/Cultivator.java # core/src/mindustry/world/blocks/units/CommandCenter.java # gradle.properties # tools/src/mindustry/tools/FontGenerator.java
This commit is contained in:
@@ -3,8 +3,7 @@ package mindustry.entities.bullet;
|
||||
import arc.audio.*;
|
||||
import arc.math.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.ctype.Content;
|
||||
import mindustry.ctype.ContentType;
|
||||
import mindustry.ctype.*;
|
||||
import mindustry.entities.*;
|
||||
import mindustry.entities.Effects.*;
|
||||
import mindustry.entities.effect.*;
|
||||
@@ -41,7 +40,9 @@ public abstract class BulletType extends Content{
|
||||
public float recoil;
|
||||
/** Whether to kill the shooter when this is shot. For suicide bombers. */
|
||||
public boolean killShooter;
|
||||
|
||||
/** Whether to instantly make the bullet disappear. */
|
||||
public boolean instantDisappear;
|
||||
/** Damage dealt in splash. 0 to disable.*/
|
||||
public float splashDamage = 0f;
|
||||
/** Knockback in velocity. */
|
||||
public float knockback;
|
||||
@@ -151,6 +152,10 @@ public abstract class BulletType extends Content{
|
||||
if(killShooter && b.getOwner() instanceof HealthTrait){
|
||||
((HealthTrait)b.getOwner()).kill();
|
||||
}
|
||||
|
||||
if(instantDisappear){
|
||||
b.time(lifetime);
|
||||
}
|
||||
}
|
||||
|
||||
public void update(Bullet b){
|
||||
|
||||
@@ -38,4 +38,9 @@ public class RubbleDecal extends Decal{
|
||||
}
|
||||
Draw.rect(region, x, y, Mathf.randomSeed(id, 0, 4) * 90);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float drawSize(){
|
||||
return region.getWidth() * 3f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -367,9 +367,9 @@ public class Player extends Unit implements BuilderMinerTrait, ShooterTrait{
|
||||
if(isAdmin){
|
||||
float s = 3f;
|
||||
Draw.color(color.r * 0.5f, color.g * 0.5f, color.b * 0.5f, 1f);
|
||||
Draw.rect(Core.atlas.find("icon-admin-badge"), x + layout.width / 2f + 2 + 1, y + nameHeight - 1.5f, s, s);
|
||||
Draw.rect(Icon.adminSmall.getRegion(), x + layout.width / 2f + 2 + 1, y + nameHeight - 1.5f, s, s);
|
||||
Draw.color(color);
|
||||
Draw.rect(Core.atlas.find("icon-admin-badge"), x + layout.width / 2f + 2 + 1, y + nameHeight - 1f, s, s);
|
||||
Draw.rect(Icon.adminSmall.getRegion(), x + layout.width / 2f + 2 + 1, y + nameHeight - 1f, s, s);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,12 +9,11 @@ import arc.math.geom.Point2;
|
||||
import arc.math.geom.Vec2;
|
||||
import arc.util.*;
|
||||
import arc.util.ArcAnnotate.*;
|
||||
import arc.util.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import mindustry.entities.*;
|
||||
import mindustry.entities.traits.*;
|
||||
import mindustry.game.EventType.*;
|
||||
import mindustry.entities.EntityGroup;
|
||||
import mindustry.entities.traits.HealthTrait;
|
||||
import mindustry.entities.traits.TargetTrait;
|
||||
import mindustry.game.*;
|
||||
import mindustry.game.EventType.BlockDestroyEvent;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.world.*;
|
||||
import mindustry.world.consumers.*;
|
||||
@@ -24,8 +23,8 @@ import java.io.*;
|
||||
|
||||
import static mindustry.Vars.*;
|
||||
|
||||
public class TileEntity extends BaseEntity implements TargetTrait, HealthTrait, TeamTrait{
|
||||
public static final float timeToSleep = 60f * 4; //4 seconds to fall asleep
|
||||
public class TileEntity extends BaseEntity implements TargetTrait, HealthTrait{
|
||||
public static final float timeToSleep = 60f * 1; //1 second to fall asleep
|
||||
private static final ObjectSet<Tile> tmpTiles = new ObjectSet<>();
|
||||
/** This value is only used for debugging. */
|
||||
public static int sleepingEntities = 0;
|
||||
@@ -85,11 +84,6 @@ public class TileEntity extends BaseEntity implements TargetTrait, HealthTrait,
|
||||
return this;
|
||||
}
|
||||
|
||||
public void applyBoost(float intensity, float duration){
|
||||
timeScaleDuration = Math.max(timeScaleDuration, duration);
|
||||
timeScale = Math.max(timeScale, intensity);
|
||||
}
|
||||
|
||||
/** Scaled delta. */
|
||||
public float delta(){
|
||||
return Time.delta() * timeScale;
|
||||
|
||||
@@ -42,7 +42,6 @@ public class GroundUnit extends BaseUnit{
|
||||
moveToCore(PathTarget.enemyCores);
|
||||
}
|
||||
}else{
|
||||
|
||||
float dst = dst(core);
|
||||
|
||||
if(dst < getWeapon().bullet.range() / 1.1f){
|
||||
@@ -165,6 +164,7 @@ public class GroundUnit extends BaseUnit{
|
||||
|
||||
if(!Units.invalidateTarget(target, this)){
|
||||
if(dst(target) < getWeapon().bullet.range()){
|
||||
|
||||
rotate(angleTo(target));
|
||||
|
||||
if(Angles.near(angleTo(target), rotation, 13f)){
|
||||
|
||||
Reference in New Issue
Block a user