diff --git a/core/src/mindustry/content/TechTree.java b/core/src/mindustry/content/TechTree.java index 72f5f10970..c86b14a996 100644 --- a/core/src/mindustry/content/TechTree.java +++ b/core/src/mindustry/content/TechTree.java @@ -366,7 +366,11 @@ public class TechTree implements ContentList{ node(dagger, () -> { node(mace, () -> { node(fortress, () -> { + node(scepter, () -> { + node(reign, () -> { + }); + }); }); }); @@ -381,7 +385,11 @@ public class TechTree implements ContentList{ node(crawler, () -> { node(atrax, () -> { node(spiroct, () -> { + node(arkyid, () -> { + node(toxopid, () -> { + }); + }); }); }); }); diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index 77f5b72424..51b6631034 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -419,7 +419,6 @@ public class UnitTypes implements ContentList{ }}; spiroct = new UnitType("spiroct"){{ - itemCapacity = 200; speed = 0.4f; drag = 0.4f; hitsize = 12f; @@ -647,7 +646,7 @@ public class UnitTypes implements ContentList{ x = 0f; shootY = 22f; mirror = false; - reload = 180; + reload = 210; shake = 10f; recoil = 10f; rotateSpeed = 1f; @@ -656,7 +655,7 @@ public class UnitTypes implements ContentList{ rotate = true; occlusion = 30f; - bullet = new ArtilleryBulletType(3f, 70){{ + bullet = new ArtilleryBulletType(3f, 50){{ hitEffect = Fx.sapExplosion; knockback = 0.8f; lifetime = 80f; @@ -684,7 +683,7 @@ public class UnitTypes implements ContentList{ lifetime = 90f; width = height = 20f; collidesTiles = false; - splashDamageRadius = 90f; + splashDamageRadius = 80f; splashDamage = 45f; backColor = Pal.sapBulletBack; frontColor = lightningColor = Pal.sapBullet; diff --git a/core/src/mindustry/entities/comp/StatusComp.java b/core/src/mindustry/entities/comp/StatusComp.java index bf61535026..cde001fab6 100644 --- a/core/src/mindustry/entities/comp/StatusComp.java +++ b/core/src/mindustry/entities/comp/StatusComp.java @@ -22,6 +22,8 @@ abstract class StatusComp implements Posc, Flyingc{ @ReadOnly transient float speedMultiplier = 1, damageMultiplier = 1, armorMultiplier = 1, reloadMultiplier = 1; + @Import UnitType type; + /** @return damage taken based on status armor multipliers */ float getShieldDamage(float amount){ return amount * Mathf.clamp(1f - armorMultiplier / 100f); @@ -102,7 +104,7 @@ abstract class StatusComp implements Posc, Flyingc{ @Override public void update(){ Floor floor = floorOn(); - if(isGrounded()){ + if(isGrounded() && !type.hovering){ //apply effect apply(floor.status, floor.statusDuration); } diff --git a/core/src/mindustry/type/UnitType.java b/core/src/mindustry/type/UnitType.java index 80357dfab2..3a83bb9cb7 100644 --- a/core/src/mindustry/type/UnitType.java +++ b/core/src/mindustry/type/UnitType.java @@ -64,7 +64,7 @@ public class UnitType extends UnlockableContent{ public boolean flipBackLegs = true; public float mechLegMoveScl = 1f; - public int itemCapacity = 30; + public int itemCapacity = -1; public int ammoCapacity = 220; public int mineTier = -1; public float buildSpeed = 1f, mineSpeed = 1f; @@ -185,6 +185,10 @@ public class UnitType extends UnlockableContent{ singleTarget = weapons.size <= 1; + if(itemCapacity < 0){ + itemCapacity = Math.max(Mathf.round(hitsize * 7, 20), 20); + } + //set up default range if(range < 0){ range = Float.MAX_VALUE; diff --git a/core/src/mindustry/ui/ItemImage.java b/core/src/mindustry/ui/ItemImage.java index aed8997f5f..6cb705185d 100644 --- a/core/src/mindustry/ui/ItemImage.java +++ b/core/src/mindustry/ui/ItemImage.java @@ -10,8 +10,12 @@ public class ItemImage extends Stack{ public ItemImage(TextureRegion region, int amount){ Table t = new Table().left().bottom(); t.add(amount + "").name("item-label"); + t.pack(); - add(new Image(region)); + add(new Table(o -> { + o.left(); + o.add(new Image(region)).size(32f); + })); add(t); } diff --git a/core/src/mindustry/ui/dialogs/DatabaseDialog.java b/core/src/mindustry/ui/dialogs/DatabaseDialog.java index 2506da87d9..8b4f378902 100644 --- a/core/src/mindustry/ui/dialogs/DatabaseDialog.java +++ b/core/src/mindustry/ui/dialogs/DatabaseDialog.java @@ -1,12 +1,13 @@ package mindustry.ui.dialogs; import arc.*; -import arc.input.*; -import arc.struct.*; import arc.graphics.*; +import arc.input.*; +import arc.math.*; import arc.scene.event.*; import arc.scene.ui.*; import arc.scene.ui.layout.*; +import arc.struct.*; import arc.util.*; import mindustry.*; import mindustry.ctype.*; @@ -14,7 +15,7 @@ import mindustry.gen.*; import mindustry.graphics.*; import mindustry.ui.*; -import static mindustry.Vars.ui; +import static mindustry.Vars.*; public class DatabaseDialog extends BaseDialog{ @@ -49,8 +50,7 @@ public class DatabaseDialog extends BaseDialog{ table.table(list -> { list.left(); - int maxWidth = Core.graphics.isPortrait() ? 7 : 13; - + int cols = Mathf.clamp((Core.graphics.getWidth() - 30) / (32 + 10), 1, 18); int count = 0; for(int i = 0; i < array.size; i++){ @@ -77,7 +77,7 @@ public class DatabaseDialog extends BaseDialog{ image.addListener(new Tooltip(t -> t.background(Tex.button).add(unlock.localizedName))); } - if((++count) % maxWidth == 0){ + if((++count) % cols == 0){ list.row(); } } diff --git a/core/src/mindustry/world/consumers/ConsumeItemDynamic.java b/core/src/mindustry/world/consumers/ConsumeItemDynamic.java index 277146f156..5f3a13609a 100644 --- a/core/src/mindustry/world/consumers/ConsumeItemDynamic.java +++ b/core/src/mindustry/world/consumers/ConsumeItemDynamic.java @@ -1,7 +1,6 @@ package mindustry.world.consumers; import arc.func.*; -import arc.math.*; import arc.scene.ui.layout.*; import arc.struct.*; import arc.util.ArcAnnotate.*; @@ -48,7 +47,7 @@ public class ConsumeItemDynamic extends Consume{ for(ItemStack stack : items.get(tile)){ table.add(new ReqImage(new ItemImage(stack.item.icon(Cicon.medium), stack.amount), - () -> tile.items != null && tile.items.has(stack.item, stack.amount))).size(8 * 4).padRight(6 * Mathf.digits(stack.amount)); + () -> tile.items != null && tile.items.has(stack.item, stack.amount))).padRight(8); } } diff --git a/core/src/mindustry/world/consumers/ConsumeItems.java b/core/src/mindustry/world/consumers/ConsumeItems.java index 53eb92ebae..0fd0cdf26c 100644 --- a/core/src/mindustry/world/consumers/ConsumeItems.java +++ b/core/src/mindustry/world/consumers/ConsumeItems.java @@ -1,8 +1,7 @@ package mindustry.world.consumers; -import arc.math.*; -import arc.struct.*; import arc.scene.ui.layout.*; +import arc.struct.*; import arc.util.ArcAnnotate.*; import mindustry.gen.*; import mindustry.type.*; @@ -38,7 +37,7 @@ public class ConsumeItems extends Consume{ public void build(Building tile, Table table){ for(ItemStack stack : items){ table.add(new ReqImage(new ItemImage(stack.item.icon(Cicon.medium), stack.amount), - () -> tile.items != null && tile.items.has(stack.item, stack.amount))).size(8 * 4).padRight(Mathf.digits(stack.amount) * 6); + () -> tile.items != null && tile.items.has(stack.item, stack.amount))).padRight(8); } }