diff --git a/core/assets-raw/sprites/units/precept-cell.png b/core/assets-raw/sprites/units/precept-cell.png new file mode 100644 index 0000000000..8f4a9ecdaf Binary files /dev/null and b/core/assets-raw/sprites/units/precept-cell.png differ diff --git a/core/assets-raw/sprites/units/precept-treads.png b/core/assets-raw/sprites/units/precept-treads.png new file mode 100644 index 0000000000..913546e376 Binary files /dev/null and b/core/assets-raw/sprites/units/precept-treads.png differ diff --git a/core/assets-raw/sprites/units/precept-weapon-cell.png b/core/assets-raw/sprites/units/precept-weapon-cell.png new file mode 100644 index 0000000000..e3cad4156d Binary files /dev/null and b/core/assets-raw/sprites/units/precept-weapon-cell.png differ diff --git a/core/assets-raw/sprites/units/precept-weapon-heat.png b/core/assets-raw/sprites/units/precept-weapon-heat.png new file mode 100644 index 0000000000..07c80972db Binary files /dev/null and b/core/assets-raw/sprites/units/precept-weapon-heat.png differ diff --git a/core/assets-raw/sprites/units/precept-weapon.png b/core/assets-raw/sprites/units/precept-weapon.png new file mode 100644 index 0000000000..a90cf9ad73 Binary files /dev/null and b/core/assets-raw/sprites/units/precept-weapon.png differ diff --git a/core/assets-raw/sprites/units/precept.png b/core/assets-raw/sprites/units/precept.png new file mode 100644 index 0000000000..683a19acee Binary files /dev/null and b/core/assets-raw/sprites/units/precept.png differ diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index 9cae7ab7dc..ca2ff96520 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -1942,12 +1942,12 @@ block.cyanogen-synthesizer.name = Cyanogen Synthesizer block.phase-synthesizer.name = Phase Synthesizer block.heat-reactor.name = Heat Reactor block.beryllium-wall.name = Beryllium Wall -block.beryllium-wall-large.name = Beryllium Wall Large +block.beryllium-wall-large.name = Large Beryllium Wall block.tungsten-wall.name = Tungsten Wall -block.tungsten-wall-large.name = Tungsten Wall Large +block.tungsten-wall-large.name = Large Tungsten Wall block.blast-door.name = Blast Door block.carbide-wall.name = Carbide Wall -block.carbide-wall-large.name = Carbide Wall Large +block.carbide-wall-large.name = Large Carbide Wall block.radar.name = Radar block.build-tower.name = Build Tower block.regen-projector.name = Regen Projector @@ -2002,6 +2002,12 @@ block.small-deconstructor.name = Small Deconstructor block.canvas.name = Canvas block.world-processor.name = World Processor block.world-cell.name = World Cell +block.shield-breaker.name = Shield Breaker +block.tank-fabricator.name = Tank Fabricator +block.mech-fabricator.name = Mech Fabricator +block.ship-fabricator.name = Ship Fabricator +block.basic-reconstructor.name = Basic Reconstructor +block.unit-repair-tower.name = Unit Repair Tower status.slow.name = Slow status.shielded.name = Shielded status.corroded.name = Corroded @@ -2015,15 +2021,18 @@ unit.bulwark.name = Bulwark unit.krepost.name = Krepost unit.avert.name = Avert unit.quell.name = Quell -unit.quell-missile.name = Quell Missile unit.disrupt.name = Disrupt -unit.disrupt-missile.name = Disrupt Missile unit.evoke.name = Evoke unit.incite.name = Incite unit.emanate.name = Emanate unit.manifold.name = Manifold unit.assembly-drone.name = Assembly Drone unit.effect-drone.name = Effect Drone +unit.precept.name = Precept +unit.merui.name = Merui +unit.anthicus.name = Anthicus +unit.osc.name = Osc +unit.obviate.name = Obviate sector.two.name = Two sector.three.name = Three sector.four.name = Four diff --git a/core/assets/icons/icons.properties b/core/assets/icons/icons.properties index 60451df04d..0cdaf71573 100755 --- a/core/assets/icons/icons.properties +++ b/core/assets/icons/icons.properties @@ -557,3 +557,4 @@ 63135=unit-repair-tower|block-unit-repair-tower-ui 63134=merui|unit-merui-ui 63133=osc|unit-osc-ui +63132=precept|unit-precept-ui diff --git a/core/assets/logicids.dat b/core/assets/logicids.dat index c18ca7932c..d2ecc3dbe5 100644 Binary files a/core/assets/logicids.dat and b/core/assets/logicids.dat differ diff --git a/core/src/mindustry/content/Fx.java b/core/src/mindustry/content/Fx.java index 6f918c4c95..628157fad8 100644 --- a/core/src/mindustry/content/Fx.java +++ b/core/src/mindustry/content/Fx.java @@ -824,12 +824,6 @@ public class Fx{ Drawf.light(e.x, e.y, 23f, e.color, e.fout() * 0.7f); }), - hitYellowLaser = new Effect(8, e -> { - color(Color.white, Pal.lightTrail, e.fin()); - stroke(0.5f + e.fout()); - Lines.circle(e.x, e.y, e.fin() * 5f); - }), - despawn = new Effect(12, e -> { color(Pal.lighterOrange, Color.gray, e.fin()); stroke(e.fout()); diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index c9accc663e..420fa33d28 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -80,7 +80,7 @@ public class UnitTypes{ public static @EntityDef({Unitc.class, BuildingTetherc.class, Payloadc.class}) UnitType manifold, assemblyDrone, effectDrone; //tank - public static @EntityDef({Unitc.class, Tankc.class}) UnitType stell, locus, vanquish, conquer; + public static @EntityDef({Unitc.class, Tankc.class}) UnitType stell, locus, precept, vanquish, conquer; //endregion @@ -2585,6 +2585,72 @@ public class UnitTypes{ }}); }}; + precept = new TankUnitType("precept"){{ + hitSize = 26f; + treadPullOffset = 5; + speed = 0.64f; + rotateSpeed = 1.5f; + health = 4500; + armor = 10f; + itemCapacity = 0; + treadRects = new Rect[]{new Rect(16, 38, 30, 75), new Rect(44, 7, 17, 60)}; + researchCostMultiplier = 0f; + + weapons.add(new Weapon("precept-weapon"){{ + layerOffset = 0.0001f; + reload = 85f; + shootY = 16f; + recoil = 3f; + rotate = true; + rotateSpeed = 1.3f; + mirror = false; + shootCone = 2f; + x = 0f; + y = -1f; + heatColor = Color.valueOf("f9350f"); + cooldownTime = 30f; + bullet = new BasicBulletType(7f, 90){{ + sprite = "missile-large"; + width = 7.5f; + height = 13f; + lifetime = 28f; + hitSize = 6f; + pierceCap = 2; + pierce = true; + pierceBuilding = true; + hitColor = backColor = trailColor = Color.valueOf("feb380"); + frontColor = Color.white; + trailWidth = 2.8f; + trailLength = 8; + hitEffect = despawnEffect = Fx.blastExplosion; + shootEffect = Fx.shootTitan; + smokeEffect = Fx.shootSmokeTitan; + splashDamageRadius = 20f; + splashDamage = 50f; + + trailEffect = Fx.hitSquaresColor; + trailRotation = true; + trailInterval = 3f; + + fragBullets = 4; + + fragBullet = new BasicBulletType(5f, 25){{ + sprite = "missile-large"; + width = 5f; + height = 7f; + lifetime = 15f; + hitSize = 4f; + hitColor = backColor = trailColor = Color.valueOf("feb380"); + frontColor = Color.white; + trailWidth = 1.7f; + trailLength = 3; + drag = 0.01f; + despawnEffect = hitEffect = Fx.hitBulletColor; + }}; + }}; + }}); + }}; + vanquish = new TankUnitType("vanquish"){{ hitSize = 28f; treadPullOffset = 4; @@ -2597,7 +2663,7 @@ public class UnitTypes{ weapons.add(new Weapon("vanquish-weapon"){{ layerOffset = 0.0001f; - reload = 120f; + reload = 110f; shootY = 71f / 4f; shake = 5f; recoil = 4f; @@ -2610,7 +2676,7 @@ public class UnitTypes{ heatColor = Color.valueOf("f9350f"); cooldownTime = 80f; - bullet = new BasicBulletType(8f, 130){{ + bullet = new BasicBulletType(8f, 140){{ sprite = "missile-large"; width = 9.5f; height = 15f; @@ -2618,7 +2684,7 @@ public class UnitTypes{ hitSize = 6f; shootEffect = Fx.shootTitan; smokeEffect = Fx.shootSmokeTitan; - pierceCap = 2; + pierceCap = 3; pierce = true; pierceBuilding = true; hitColor = backColor = trailColor = Color.valueOf("feb380"); diff --git a/core/src/mindustry/entities/bullet/BulletType.java b/core/src/mindustry/entities/bullet/BulletType.java index 9b99917b3a..179bfe4f04 100644 --- a/core/src/mindustry/entities/bullet/BulletType.java +++ b/core/src/mindustry/entities/bullet/BulletType.java @@ -25,6 +25,7 @@ import mindustry.world.blocks.defense.Wall.*; import static mindustry.Vars.*; +//TODO document public class BulletType extends Content implements Cloneable{ /** Lifetime in ticks. */ public float lifetime = 40f; diff --git a/core/src/mindustry/graphics/BlockRenderer.java b/core/src/mindustry/graphics/BlockRenderer.java index 170b80b0ab..6c6d0d871b 100644 --- a/core/src/mindustry/graphics/BlockRenderer.java +++ b/core/src/mindustry/graphics/BlockRenderer.java @@ -332,7 +332,7 @@ public class BlockRenderer{ procLinks.clear(); procLights.clear(); - var bounds = camera.bounds(Tmp.r3).grow(tilesize); + var bounds = camera.bounds(Tmp.r3).grow(tilesize * 2f); //draw floor lights floorTree.intersect(bounds, tile -> lightview.add(tile)); diff --git a/core/src/mindustry/type/UnitType.java b/core/src/mindustry/type/UnitType.java index b89af108dd..4650430b7a 100644 --- a/core/src/mindustry/type/UnitType.java +++ b/core/src/mindustry/type/UnitType.java @@ -362,17 +362,26 @@ public class UnitType extends UnlockableContent{ /** how much of a top part of a tread sprite is "cut off" relative to the pattern; this is corrected for */ public int treadPullOffset = 0; - //SEGMENTED / CRAWL UNITS + //SEGMENTED / CRAWL UNITS (this is WIP content!) - //for crawlers + /** number of independent segments */ public int segments = 0; - public float segmentSpacing = 2f, segmentScl = 4f, segmentPhase = 5f, segmentRotSpeed = 1f, segmentMaxRot = 30f; + /** magnitude of sine offset between segments */ + public float segmentMag = 2f, + /** scale of sine offset between segments */ + segmentScl = 4f, + /** index multiplier of sine offset between segments */ + segmentPhase = 5f, + /** how fast each segment moves towards the next one */ + segmentRotSpeed = 1f, + /** maximum difference between segment angles */ + segmentMaxRot = 30f, /** speed multiplier this unit will have when crawlSlowdownFrac is met. */ - public float crawlSlowdown = 0.5f; + crawlSlowdown = 0.5f, /** damage dealt to blocks under this tank/crawler every frame. */ - public float crushDamage = 0f; + crushDamage = 0f, /** the fraction of solids under this block necessary for it to reach crawlSlowdown. */ - public float crawlSlowdownFrac = 0.55f; + crawlSlowdownFrac = 0.55f; //MISSILE UNITS @@ -1377,6 +1386,7 @@ public class UnitType extends UnlockableContent{ Draw.reset(); } + //TODO public void drawCrawl(Crawlc crawl){ Unit unit = (Unit)crawl; applyColor(unit); @@ -1386,20 +1396,18 @@ public class UnitType extends UnlockableContent{ TextureRegion[] regions = p == 0 ? segmentOutlineRegions : segmentRegions; for(int i = 0; i < segments; i++){ - float trns = Mathf.sin(crawl.crawlTime() + i * segmentPhase, segmentScl, segmentSpacing); + float trns = Mathf.sin(crawl.crawlTime() + i * segmentPhase, segmentScl, segmentMag); //at segment 0, rotation = segmentRot, but at the last segment it is rotation float rot = Mathf.slerp(crawl.segmentRot(), unit.rotation, i / (float)(segments - 1)); float tx = Angles.trnsx(rot, trns), ty = Angles.trnsy(rot, trns); - //shadow Draw.color(0f, 0f, 0f, 0.2f); //Draw.rect(regions[i], unit.x + tx + 2f, unit.y + ty - 2f, rot - 90); applyColor(unit); - //TODO merge outlines? Draw.rect(regions[i], unit.x + tx, unit.y + ty, rot - 90); } diff --git a/core/src/mindustry/world/Block.java b/core/src/mindustry/world/Block.java index 5a3e588001..77436ec6bf 100644 --- a/core/src/mindustry/world/Block.java +++ b/core/src/mindustry/world/Block.java @@ -55,10 +55,12 @@ public class Block extends UnlockableContent implements Senseable{ public boolean acceptsItems = false; public boolean separateItemCapacity = false; + /** maximum items this block can carry (usually, this is per-type of item) */ public int itemCapacity = 10; + /** maximum total liquids this block can carry if hasLiquids = true */ public float liquidCapacity = 10f; + /** higher numbers increase liquid output speed; TODO remove and replace with better liquids system */ public float liquidPressure = 1f; - /** If true, this block outputs to its facing direction, when applicable. * Used for blending calculations. */ public boolean outputFacing = true; diff --git a/gradle.properties b/gradle.properties index 675f91763b..7b642a60b2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -25,4 +25,4 @@ org.gradle.caching=true #used for slow jitpack builds; TODO see if this actually works org.gradle.internal.http.socketTimeout=100000 org.gradle.internal.http.connectionTimeout=100000 -archash=7f36a32bec +archash=9ae34c37ed