diff --git a/core/src/mindustry/Vars.java b/core/src/mindustry/Vars.java index 2ffaff7756..07843424da 100644 --- a/core/src/mindustry/Vars.java +++ b/core/src/mindustry/Vars.java @@ -90,12 +90,14 @@ public class Vars implements Loadable{ public static final float minArmorDamage = 0.05f; /** launch animation duration */ public static final float launchDuration = 140f; + /** size of tiles in units */ + public static final int tilesize = 8; + /** size of one tile payload (^2) */ + public static final float tilePayload = tilesize * tilesize; /** tile used in certain situations, instead of null */ public static Tile emptyTile; /** for map generator dialog */ public static boolean updateEditorOnChange = false; - /** size of tiles in units */ - public static final int tilesize = 8; /** all choosable player colors in join/host dialog */ public static final Color[] playerColors = { Color.valueOf("82759a"), diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index 94d2f13937..4e5f0cdecf 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -11,6 +11,8 @@ import mindustry.gen.*; import mindustry.graphics.*; import mindustry.type.*; +import static mindustry.Vars.*; + public class UnitTypes implements ContentList{ //region definitions @@ -1194,7 +1196,7 @@ public class UnitTypes implements ContentList{ rotateShooting = false; hitsize = 15f; engineSize = 3f; - payloadCapacity = 4 * (8 * 8); + payloadCapacity = (2 * 2) * tilePayload; buildSpeed = 2.5f; weapons.add( @@ -1227,7 +1229,7 @@ public class UnitTypes implements ContentList{ engineSize = 6f; rotateShooting = false; hitsize = 32f; - payloadCapacity = (3 * 3) * (8 * 8); + payloadCapacity = (3 * 3) * tilePayload; buildSpeed = 2.5f; range = 140f; targetAir = false; @@ -1287,7 +1289,7 @@ public class UnitTypes implements ContentList{ engineSize = 7.8f; rotateShooting = false; hitsize = 60f; - payloadCapacity = (5.2f * 5.2f) * (8 * 8); + payloadCapacity = (5.3f * 5.3f) * tilePayload; buildSpeed = 4f; drawShields = false;