This commit is contained in:
Anuken 2021-08-19 09:36:53 -04:00
parent a67b7a6e77
commit a39f2bd3a9
8 changed files with 70 additions and 2 deletions

View File

@ -32,6 +32,7 @@ pulsar=19
quad=23
quasar=32
risso=20
scuttler=35
spiroct=21
toxopid=33
vela=25

View File

@ -0,0 +1 @@
{fields:[{name:ammo,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:crawlTime,type:float},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:segmentRot,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:vel,type:arc.math.geom.Vec2},{name:x,type:float},{name:y,type:float}]}

Binary file not shown.

After

Width:  |  Height:  |  Size: 866 B

View File

@ -402,3 +402,4 @@
63307=fissile-matter|item-fissile-matter-ui
63306=neoplasm|liquid-neoplasm-ui
63305=dormant-cyst|item-dormant-cyst-ui
63304=scuttler|unit-scuttler-ui

Binary file not shown.

View File

@ -24,7 +24,7 @@ import static arc.math.Angles.*;
import static mindustry.Vars.*;
public class UnitTypes implements ContentList{
//region definitions
//region standard
//mech
public static @EntityDef({Unitc.class, Mechc.class}) UnitType mace, dagger, crawler, fortress, scepter, reign, vela;
@ -67,6 +67,12 @@ public class UnitTypes implements ContentList{
//endregion
//region neoplasm
public static @EntityDef({Unitc.class, Crawlc.class}) UnitType scuttler;
//endregion
@Override
public void load(){
//region ground attack
@ -2394,6 +2400,16 @@ public class UnitTypes implements ContentList{
}
};
//endregion
//region neoplasm
scuttler = new UnitType("scuttler"){{
hitSize = 30f;
omniMovement = false;
rotateSpeed = 1f;
drawCell = false;
}};
//endregion
}
}

View File

@ -0,0 +1,48 @@
package mindustry.entities.comp;
import arc.math.geom.*;
import mindustry.ai.*;
import mindustry.annotations.Annotations.*;
import mindustry.content.*;
import mindustry.entities.*;
import mindustry.entities.EntityCollisions.*;
import mindustry.gen.*;
import mindustry.type.*;
import mindustry.world.blocks.environment.*;
//TODO
@Component
abstract class CrawlComp implements Posc, Rotc, Hitboxc, Unitc{
@Import float x, y, speedMultiplier;
@Import UnitType type;
@Import Vec2 vel;
//TODO segments
float segmentRot;
float crawlTime;
@Replace
@Override
public SolidPred solidity(){
return EntityCollisions::legsSolid;
}
@Override
@Replace
public int pathType(){
return Pathfinder.costLegs;
}
@Override
@Replace
public float floorSpeedMultiplier(){
Floor on = isFlying() ? Blocks.air.asFloor() : floorOn();
//TODO take into account extra blocks
return on.speedMultiplier * speedMultiplier;
}
@Override
public void update(){
crawlTime += vel.len();
}
}

View File

@ -11,6 +11,7 @@ import static mindustry.entities.Puddles.*;
public class CellLiquid extends Liquid{
public Color colorFrom = Color.white.cpy(), colorTo = Color.white.cpy();
public int cells = 8;
public CellLiquid(String name, Color color){
super(name, color);
@ -33,7 +34,7 @@ public class CellLiquid extends Liquid{
float length = Math.max(f, 0.3f) * 9f;
rand.setSeed(id);
for(int i = 0; i < 8; i++){
for(int i = 0; i < cells; i++){
Tmp.v1.trns(rand.random(360f), rand.random(length));
float vx = x + Tmp.v1.x, vy = y + Tmp.v1.y;