From 06292d6687a585f66d8f75b419daf179de06b312 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sun, 27 Feb 2022 11:43:14 -0500 Subject: [PATCH] More reconstructors --- .../blocks/units/ship-reconstructor-top.png | Bin 0 -> 1694 bytes .../blocks/units/ship-reconstructor.png | Bin 0 -> 1382 bytes core/assets-raw/sprites/shapes/shape-3.png | Bin 319 -> 0 bytes core/assets/icons/icons.properties | 2 + core/assets/logicids.dat | Bin 4211 -> 4251 bytes core/src/mindustry/content/Blocks.java | 23 ++++++++-- core/src/mindustry/content/UnitTypes.java | 43 ++++++++++++++++-- .../mindustry/entities/comp/BulletComp.java | 3 +- core/src/mindustry/graphics/Drawf.java | 13 ++++-- core/src/mindustry/mod/ClassMap.java | 1 - core/src/mindustry/type/Satellite.java | 11 ----- core/src/mindustry/ui/Styles.java | 4 +- .../ui/dialogs/SchematicsDialog.java | 2 +- 13 files changed, 73 insertions(+), 29 deletions(-) create mode 100644 core/assets-raw/sprites/blocks/units/ship-reconstructor-top.png create mode 100644 core/assets-raw/sprites/blocks/units/ship-reconstructor.png delete mode 100644 core/assets-raw/sprites/shapes/shape-3.png delete mode 100644 core/src/mindustry/type/Satellite.java diff --git a/core/assets-raw/sprites/blocks/units/ship-reconstructor-top.png b/core/assets-raw/sprites/blocks/units/ship-reconstructor-top.png new file mode 100644 index 0000000000000000000000000000000000000000..7c91e756cd81c893597788238a5ffd17d703d49a GIT binary patch literal 1694 zcmeAS@N?(olHy`uVBq!ia0y~yU`POA4mJh`hDS5XEf^RW7>k44ofy`glX=O&z!u@@ z;uumf=j~kE>`+I6w&(YbZE0GnaDvxK!TwNKuFIQCH&|9DWKTb5wq%lt*-Mw4E7#-& z1ymdbbXcR;CM^_JpZ#~n&ABu07Te~FPA>lbxb|J$`AG5V^WV;I-xjuD?eg8$++SU+ zUp>9}ai{C9)0-~~|M>FK$2M^_)AtFfvC|kBj9a#>dA;F?d>Tji)4*@4e~~SbBi(mu)`}-Y65~58{QyhQUNH<)mx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/assets-raw/sprites/blocks/units/ship-reconstructor.png b/core/assets-raw/sprites/blocks/units/ship-reconstructor.png new file mode 100644 index 0000000000000000000000000000000000000000..bc9ddfe97fb29fde155b871c58c6896d22107ed6 GIT binary patch literal 1382 zcmeAS@N?(olHy`uVBq!ia0y~yU`POA4mJh`hDS5XEf^RW7>k44ofy`glX=O&z^dTs z;uumf=k476+0ljq$Iq)dUvqGGRQoqXnT=+C5&JEnigV7RnMq@u8#xp}T|(7*28(q%U5ECd341rGc_mu4ch$@;R4 zDeu%@>$a>oE6C-rdHH(Dre#0ww zc+MZSyIZp%MR9kBdTGtg=?ml6*>Aq&DYZs4f8&nS@5X+SrVZKuii7kbCaRq{GMzDC z8WIWu~76EyWPt1mP5hDX9!oLQNYk z37eRNm@+hc3ZCNC&AZ@9RnF4q(*5&i zO@)G6o1S7Y;)(#`2k!` z-&S=l%S#1&5Kc~IO_&_!ks18%#p^dyi}m%6ule05V)L@PNAHm*Ppx=n(+X3@&$TCS zU3J|PzW(Rtq?*pJj5nA9xU?7-c2|f`Pu}ROGl@atcHt7P1BNE-PU0W`{9mq+z@Tbg zR4jRQ)63$lq6Nn;oV>6tF5-N|?~Y7PW8>gtuH4OP0e%sm?2@8P85#t&AT`gbH54uc`mX%v}AhDC$A&Le;w3+cbHCPZk*)DD%#FbZWH?kGZOzT;`pRA^skQX^j`;;%E43Fb@^`jmeLU;DulC-T>8sR4>ScU2 z6Z(G6vDtO2(3H*b>30SnN7XaSpIrS~wmny1)m{IJ4a&Pud3OG7*?9cHch0N-l+(kRR)GnJZmo2sIx!R&#HWH#5q@{gMop8!PC{xWt~$( F696Y(ghK!T literal 0 HcmV?d00001 diff --git a/core/assets-raw/sprites/shapes/shape-3.png b/core/assets-raw/sprites/shapes/shape-3.png deleted file mode 100644 index d8dfb1f9cff2d162c7223754be87a776f4dd41d4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 319 zcmeAS@N?(olHy`uVBq!ia0y~yV6X>a4mJh`hVXcS`wR?>Y@RNTAr-gYUOgz-Y{26Z z*tJ0H*Zv@GSB>_9lRTUUw=IdStY@FMJz2LqXyMG8S?{k&%I}}we?PtYN80>c<5jmq zeu=*-eldUkosUmHy1zXCKIxs=(LeQP_Wt|xKVbdJ{|6d)J+p%|+ zuTOku`s}`8`M;n10ne| { + color(e.color); + stroke(e.fout() * 0.9f + 0.6f); + + Fx.rand.setSeed(e.id); + for(int i = 0; i < 7; i++){ + Fx.v.trns(e.rotation, Fx.rand.random(8f, length - 8f)); + Lines.lineAngleCenter(e.x + Fx.v.x, e.y + Fx.v.y, e.rotation + e.finpow(), e.foutpowdown() * 20f * Fx.rand.random(0.5f, 1f) + 0.3f); + } + }); + + endEffect = new Effect(14f, e-> { + color(e.color); + Drawf.tri(e.x, e.y, e.fout() * 1.5f, 5f, e.rotation); + }); + + shootEffect = new Effect(10, e -> { + color(e.color); + float w = 1.2f + 7 * e.fout(); + + Drawf.tri(e.x, e.y, w, 30f * e.fout(), e.rotation); + color(e.color); + + for(int i : Mathf.signs){ + Drawf.tri(e.x, e.y, w * 0.9f, 18f * e.fout(), e.rotation + i * 90f); + } + + Drawf.tri(e.x, e.y, w, 4f * e.fout(), e.rotation + 180f); + }); + lineEffect = new Effect(14f, e -> { if(!(e.data instanceof Vec2 v)) return; @@ -2519,6 +2551,7 @@ public class UnitTypes{ }); pointEffectSpace = 8f; + if(false) pointEffect = new Effect(20, e -> { color(e.color); @@ -2822,7 +2855,7 @@ public class UnitTypes{ smoothReloadSpeed = 0.15f; recoil = 2f; - bullet = new BasicBulletType(3.5f, 40){{ + bullet = new BasicBulletType(3.5f, 50){{ backColor = trailColor = hitColor = Pal.techBlue; frontColor = Color.white; width = 7.5f; @@ -2853,7 +2886,7 @@ public class UnitTypes{ weapons.add(new PointDefenseWeapon("latum-point-defense"){{ x = 16f / 4f; y = -20f / 4f; - reload = 10f; + reload = 9f; targetInterval = 9f; targetSwitchInterval = 12f; @@ -2863,7 +2896,7 @@ public class UnitTypes{ shootEffect = Fx.sparkShoot; hitEffect = Fx.pointHit; maxRange = 100f; - damage = 35f; + damage = 38f; }}; }}); }}; diff --git a/core/src/mindustry/entities/comp/BulletComp.java b/core/src/mindustry/entities/comp/BulletComp.java index 2bdc7301af..7c860da285 100644 --- a/core/src/mindustry/entities/comp/BulletComp.java +++ b/core/src/mindustry/entities/comp/BulletComp.java @@ -27,8 +27,9 @@ abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Draw @Import Vec2 vel; IntSeq collided = new IntSeq(6); - Object data; BulletType type; + + Object data; float fdata; @ReadOnly diff --git a/core/src/mindustry/graphics/Drawf.java b/core/src/mindustry/graphics/Drawf.java index b9e1a9c062..ef2d7087f2 100644 --- a/core/src/mindustry/graphics/Drawf.java +++ b/core/src/mindustry/graphics/Drawf.java @@ -1,6 +1,5 @@ package mindustry.graphics; -import arc.*; import arc.graphics.*; import arc.graphics.g2d.*; import arc.math.*; @@ -393,8 +392,16 @@ public class Drawf{ } public static void tri(float x, float y, float width, float length, float rotation){ - float oy = 17f / 63f * length; - Draw.rect(Core.atlas.find("shape-3"), x, y - oy + length / 2f, width, length, width / 2f, oy, rotation - 90); + float + fx = Angles.trnsx(rotation, length), + fy = Angles.trnsy(rotation, length), + rx = Angles.trnsx(rotation - 90f, width / 2f), + ry = Angles.trnsy(rotation - 90f, width / 2f); + Fill.tri( + x + rx, y + ry, + x + fx, y + fy, + x - rx, y - ry + ); } public static void construct(Building t, UnlockableContent content, float rotation, float progress, float speed, float time){ diff --git a/core/src/mindustry/mod/ClassMap.java b/core/src/mindustry/mod/ClassMap.java index f256913501..3a32c32a7c 100644 --- a/core/src/mindustry/mod/ClassMap.java +++ b/core/src/mindustry/mod/ClassMap.java @@ -91,7 +91,6 @@ public class ClassMap{ classes.put("PayloadStack", mindustry.type.PayloadStack.class); classes.put("Planet", mindustry.type.Planet.class); classes.put("Publishable", mindustry.type.Publishable.class); - classes.put("Satellite", mindustry.type.Satellite.class); classes.put("Sector", mindustry.type.Sector.class); classes.put("SectorRect", mindustry.type.Sector.SectorRect.class); classes.put("SectorPreset", mindustry.type.SectorPreset.class); diff --git a/core/src/mindustry/type/Satellite.java b/core/src/mindustry/type/Satellite.java deleted file mode 100644 index 986d53a01a..0000000000 --- a/core/src/mindustry/type/Satellite.java +++ /dev/null @@ -1,11 +0,0 @@ -package mindustry.type; - -//TODO -/** Any object that is orbiting a planet. */ -public class Satellite{ - public transient Planet planet; - - public Satellite(Planet orbiting){ - this.planet = orbiting; - } -} diff --git a/core/src/mindustry/ui/Styles.java b/core/src/mindustry/ui/Styles.java index fc3e02a5f7..c6f25cd7c0 100644 --- a/core/src/mindustry/ui/Styles.java +++ b/core/src/mindustry/ui/Styles.java @@ -30,7 +30,7 @@ public class Styles{ public static TextButtonStyle defaultt, nodet, cleart, nonet, clearPartialt, clearTogglet, logicTogglet, clearToggleMenut, togglet, transt, fullTogglet, squareTogglet, logict; public static ImageButtonStyle defaulti, nodei, emptyi, emptytogglei, selecti, logici, geni, colori, accenti, cleari, clearFulli, clearPartiali, clearTogglei, clearTransi, clearToggleTransi, clearTogglePartiali; - public static ScrollPaneStyle defaultPane, horizontalPane, smallPane, nonePane; + public static ScrollPaneStyle defaultPane, horizontalPane, smallPane, noBarPane; public static SliderStyle defaultSlider; public static LabelStyle defaultLabel, outlineLabel, techLabel; public static TextFieldStyle defaultField, nodeField, areaField, nodeArea; @@ -284,7 +284,7 @@ public class Styles{ vScroll = clear; vScrollKnob = scrollKnobVerticalThin; }}; - nonePane = new ScrollPaneStyle(); + noBarPane = new ScrollPaneStyle(); defaultSlider = new SliderStyle(){{ background = sliderBack; diff --git a/core/src/mindustry/ui/dialogs/SchematicsDialog.java b/core/src/mindustry/ui/dialogs/SchematicsDialog.java index 187223139a..ed8b2380bb 100644 --- a/core/src/mindustry/ui/dialogs/SchematicsDialog.java +++ b/core/src/mindustry/ui/dialogs/SchematicsDialog.java @@ -79,7 +79,7 @@ public class SchematicsDialog extends BaseDialog{ in.add("@schematic.tags").padRight(4); //tags (no scroll pane visible) - in.pane(Styles.nonePane, t -> { + in.pane(Styles.noBarPane, t -> { rebuildTags = () -> { t.clearChildren(); t.left();