From e9205482e7967c57715f27b79db6bf4c88305f35 Mon Sep 17 00:00:00 2001 From: Anuken Date: Mon, 18 Apr 2022 12:28:59 -0400 Subject: [PATCH] WIP t2 insect --- .../sprites/units/anthicus-cell.png | Bin 0 -> 777 bytes core/assets-raw/sprites/units/anthicus.png | Bin 0 -> 2434 bytes core/assets/icons/icons.properties | 1 + core/assets/logicids.dat | Bin 4292 -> 4302 bytes core/src/mindustry/content/UnitTypes.java | 29 +++++++++++++++++- core/src/mindustry/type/UnitType.java | 13 +++++--- 6 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 core/assets-raw/sprites/units/anthicus-cell.png create mode 100644 core/assets-raw/sprites/units/anthicus.png diff --git a/core/assets-raw/sprites/units/anthicus-cell.png b/core/assets-raw/sprites/units/anthicus-cell.png new file mode 100644 index 0000000000000000000000000000000000000000..e0d1d8071608e62b8a06d8f1ab24a3cbacd71a7c GIT binary patch literal 777 zcmeAS@N?(olHy`uVBq!ia0y~yV5nnYV5sL{V_;y=tS{4LU|?V@4sv&5Sa(k5B?AM~ zVNVywkcv5P?*tYtHV|le`0d)glW{{EPqdK24Y)X=-G& zX(9u0K;Zn^QpWIE%QCg>@8@mzu3BB_!=5QMlRadQbVzUVE{}^xq8yIiT#zMm+4Be6 zJk}5y-c`p8@3!dG`8yoF2NDjvaVVSZit~^CQQ`&1Y9&^&6+g-EyYfio&P^-%7xwb< z{`K3Bt*U!x*mvLl|KC46rqdRt)x4eg@0{VHvwsZIUlt`?Ppf|W`t2?412xyY3)AX4 zlw_UsH?`!)F9?3&+V){>cQMc24!M1AALX4-TKTm4h3)^_l?T%+-Rz_{7`=|on=@tR z{yA@p`;70G9m}umS?v4b(sj-sIwj!`o66_d_L=TYivDox^xoeL?yGKYT9IToVIA`h zk&S8I=d>T|3TADyRNijpGDob)eaH9YjXSJ2{g<8Vz5Z--xn#%xlMA0OJ7~@0puM&_ zU+hn<#Ig=^yLF!=jxXyzpvK*6J6nI!d8Zd^)<(YFF!S;sDgCwgp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UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index 2212e91398..1128b28cd1 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -37,7 +37,8 @@ public class UnitTypes{ //legs public static @EntityDef({Unitc.class, Legsc.class}) UnitType corvus, atrax, - latum, bulwark, krepost; + latum, anthicus, + bulwark, krepost; //legs, legacy public static @EntityDef(value = {Unitc.class, Legsc.class}, legacy = true) UnitType spiroct, arkyid, toxopid; @@ -2922,6 +2923,32 @@ public class UnitTypes{ }}); }}; + anthicus = new ErekirUnitType("anthicus"){{ + speed = 0.7f; + drag = 0.1f; + hitSize = 21f; + rotateSpeed = 3f; + health = 1100; + armor = 5f; + + legCount = 6; + legLength = 18f; + lockLegBase = true; + legContinuousMove = true; + legExtension = -3f; + legBaseOffset = 7f; + maxStretch = 1.1f; + maxCompress = 0.2f; + legLengthScl = 0.95f; + legTrns = 0.7f; + + legMoveSpace = 1f; + hovering = true; + + visualElevation = 0.2f; + groundLayer = Layer.legUnit - 1f; + }}; + bulwark = new ErekirUnitType("bulwark"){{ drag = 0.1f; speed = 0.6f; diff --git a/core/src/mindustry/type/UnitType.java b/core/src/mindustry/type/UnitType.java index dd1de4118a..07a7399029 100644 --- a/core/src/mindustry/type/UnitType.java +++ b/core/src/mindustry/type/UnitType.java @@ -163,7 +163,9 @@ public class UnitType extends UnlockableContent{ public float drownTimeMultiplier = 1f; public float engineOffset = 5f, engineSize = 2.5f; public @Nullable Color engineColor = null; + public @Nullable Color trailColor; public Color engineColorInner = Color.white; + public float engineLayer = -1f; public Seq engines = new Seq<>(); public float strafePenalty = 0.5f; /** If false, this unit does not physically collide with others. */ @@ -856,8 +858,13 @@ public class UnitType extends UnlockableContent{ if(drawBody) drawOutline(unit); drawWeaponOutlines(unit); + if(engineLayer > 0) Draw.z(engineLayer); + if(trailLength > 0 && !naval && unit.isFlying()){ + drawTrail(unit); + } if(engineSize > 0) drawEngine(unit); if(engines.size > 0) drawEngines(unit); + Draw.z(z); if(drawBody) drawBody(unit); if(drawCell) drawCell(unit); drawWeapons(unit); @@ -993,10 +1000,6 @@ public class UnitType extends UnlockableContent{ float scale = unit.elevation; float offset = engineOffset/2f + engineOffset/2f*scale; - if(trailLength > 0 && !naval){ - drawTrail(unit); - } - Draw.color(engineColor == null ? unit.team.color : engineColor); Fill.circle( unit.x + Angles.trnsx(unit.rotation + 180, offset), @@ -1017,7 +1020,7 @@ public class UnitType extends UnlockableContent{ unit.trail = new Trail(trailLength); } Trail trail = unit.trail; - trail.draw(unit.team.color, (engineSize + Mathf.absin(Time.time, 2f, engineSize / 4f) * unit.elevation) * trailScl); + trail.draw(trailColor == null ? unit.team.color : trailColor, (engineSize + Mathf.absin(Time.time, 2f, engineSize / 4f) * unit.elevation) * trailScl); } public void drawEngines(Unit unit){