mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-12-06 02:40:23 -08:00
Bulwark shield mechanics mostly done
This commit is contained in:
parent
396c087072
commit
2d19c7ae97
37 changed files with 237 additions and 38 deletions
1
annotations/src/main/resources/revisions/alpha/3.json
Normal file
1
annotations/src/main/resources/revisions/alpha/3.json
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{version:3,fields:[{name:abilities,type:"mindustry.entities.abilities.Ability[]"},{name:ammo,type:float},{name:controller,type:mindustry.entities.units.UnitController},{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: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}]}
|
||||||
1
annotations/src/main/resources/revisions/arkyid/3.json
Normal file
1
annotations/src/main/resources/revisions/arkyid/3.json
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{version:3,fields:[{name:abilities,type:"mindustry.entities.abilities.Ability[]"},{name:ammo,type:float},{name:controller,type:mindustry.entities.units.UnitController},{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: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}]}
|
||||||
1
annotations/src/main/resources/revisions/beta/3.json
Normal file
1
annotations/src/main/resources/revisions/beta/3.json
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{version:3,fields:[{name:abilities,type:"mindustry.entities.abilities.Ability[]"},{name:ammo,type:float},{name:controller,type:mindustry.entities.units.UnitController},{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: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}]}
|
||||||
1
annotations/src/main/resources/revisions/block/7.json
Normal file
1
annotations/src/main/resources/revisions/block/7.json
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{version:7,fields:[{name:abilities,type:"mindustry.entities.abilities.Ability[]"},{name:ammo,type:float},{name:controller,type:mindustry.entities.units.UnitController},{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: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}]}
|
||||||
1
annotations/src/main/resources/revisions/corvus/7.json
Normal file
1
annotations/src/main/resources/revisions/corvus/7.json
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{version:7,fields:[{name:abilities,type:"mindustry.entities.abilities.Ability[]"},{name:ammo,type:float},{name:controller,type:mindustry.entities.units.UnitController},{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: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}]}
|
||||||
1
annotations/src/main/resources/revisions/flare/7.json
Normal file
1
annotations/src/main/resources/revisions/flare/7.json
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{version:7,fields:[{name:abilities,type:"mindustry.entities.abilities.Ability[]"},{name:ammo,type:float},{name:controller,type:mindustry.entities.units.UnitController},{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: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}]}
|
||||||
1
annotations/src/main/resources/revisions/gamma/3.json
Normal file
1
annotations/src/main/resources/revisions/gamma/3.json
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{version:3,fields:[{name:abilities,type:"mindustry.entities.abilities.Ability[]"},{name:ammo,type:float},{name:controller,type:mindustry.entities.units.UnitController},{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: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}]}
|
||||||
1
annotations/src/main/resources/revisions/mace/7.json
Normal file
1
annotations/src/main/resources/revisions/mace/7.json
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{version:7,fields:[{name:abilities,type:"mindustry.entities.abilities.Ability[]"},{name:ammo,type:float},{name:baseRotation,type:float},{name:controller,type:mindustry.entities.units.UnitController},{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: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}]}
|
||||||
1
annotations/src/main/resources/revisions/manifold/1.json
Normal file
1
annotations/src/main/resources/revisions/manifold/1.json
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{version:1,fields:[{name:abilities,type:"mindustry.entities.abilities.Ability[]"},{name:ammo,type:float},{name:building,type:Building},{name:controller,type:mindustry.entities.units.UnitController},{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:payloads,type:arc.struct.Seq<mindustry.world.blocks.payloads.Payload>},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,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}]}
|
||||||
1
annotations/src/main/resources/revisions/mega/5.json
Normal file
1
annotations/src/main/resources/revisions/mega/5.json
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{version:5,fields:[{name:abilities,type:"mindustry.entities.abilities.Ability[]"},{name:ammo,type:float},{name:controller,type:mindustry.entities.units.UnitController},{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:payloads,type:arc.struct.Seq<mindustry.world.blocks.payloads.Payload>},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,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}]}
|
||||||
1
annotations/src/main/resources/revisions/missile/1.json
Normal file
1
annotations/src/main/resources/revisions/missile/1.json
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{version:1,fields:[{name:abilities,type:"mindustry.entities.abilities.Ability[]"},{name:ammo,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:lifetime,type:float},{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: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:time,type:float},{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}]}
|
||||||
1
annotations/src/main/resources/revisions/mono/6.json
Normal file
1
annotations/src/main/resources/revisions/mono/6.json
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{version:6,fields:[{name:abilities,type:"mindustry.entities.abilities.Ability[]"},{name:ammo,type:float},{name:controller,type:mindustry.entities.units.UnitController},{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: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}]}
|
||||||
1
annotations/src/main/resources/revisions/nova/5.json
Normal file
1
annotations/src/main/resources/revisions/nova/5.json
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{version:5,fields:[{name:abilities,type:"mindustry.entities.abilities.Ability[]"},{name:ammo,type:float},{name:baseRotation,type:float},{name:controller,type:mindustry.entities.units.UnitController},{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: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}]}
|
||||||
1
annotations/src/main/resources/revisions/oct/5.json
Normal file
1
annotations/src/main/resources/revisions/oct/5.json
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{version:5,fields:[{name:abilities,type:"mindustry.entities.abilities.Ability[]"},{name:ammo,type:float},{name:controller,type:mindustry.entities.units.UnitController},{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:payloads,type:arc.struct.Seq<mindustry.world.blocks.payloads.Payload>},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,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}]}
|
||||||
1
annotations/src/main/resources/revisions/poly/5.json
Normal file
1
annotations/src/main/resources/revisions/poly/5.json
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{version:5,fields:[{name:abilities,type:"mindustry.entities.abilities.Ability[]"},{name:ammo,type:float},{name:controller,type:mindustry.entities.units.UnitController},{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: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}]}
|
||||||
1
annotations/src/main/resources/revisions/pulsar/3.json
Normal file
1
annotations/src/main/resources/revisions/pulsar/3.json
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{version:3,fields:[{name:abilities,type:"mindustry.entities.abilities.Ability[]"},{name:ammo,type:float},{name:baseRotation,type:float},{name:controller,type:mindustry.entities.units.UnitController},{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: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}]}
|
||||||
1
annotations/src/main/resources/revisions/quad/6.json
Normal file
1
annotations/src/main/resources/revisions/quad/6.json
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{version:6,fields:[{name:abilities,type:"mindustry.entities.abilities.Ability[]"},{name:ammo,type:float},{name:controller,type:mindustry.entities.units.UnitController},{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:payloads,type:arc.struct.Seq<mindustry.world.blocks.payloads.Payload>},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,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}]}
|
||||||
1
annotations/src/main/resources/revisions/quasar/3.json
Normal file
1
annotations/src/main/resources/revisions/quasar/3.json
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{version:3,fields:[{name:abilities,type:"mindustry.entities.abilities.Ability[]"},{name:ammo,type:float},{name:baseRotation,type:float},{name:controller,type:mindustry.entities.units.UnitController},{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: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}]}
|
||||||
1
annotations/src/main/resources/revisions/risso/7.json
Normal file
1
annotations/src/main/resources/revisions/risso/7.json
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{version:7,fields:[{name:abilities,type:"mindustry.entities.abilities.Ability[]"},{name:ammo,type:float},{name:controller,type:mindustry.entities.units.UnitController},{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: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}]}
|
||||||
1
annotations/src/main/resources/revisions/scuttler/1.json
Normal file
1
annotations/src/main/resources/revisions/scuttler/1.json
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{version:1,fields:[{name:abilities,type:"mindustry.entities.abilities.Ability[]"},{name:ammo,type:float},{name:controller,type:mindustry.entities.units.UnitController},{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: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}]}
|
||||||
1
annotations/src/main/resources/revisions/spiroct/6.json
Normal file
1
annotations/src/main/resources/revisions/spiroct/6.json
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{version:6,fields:[{name:abilities,type:"mindustry.entities.abilities.Ability[]"},{name:ammo,type:float},{name:controller,type:mindustry.entities.units.UnitController},{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: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}]}
|
||||||
1
annotations/src/main/resources/revisions/toxopid/3.json
Normal file
1
annotations/src/main/resources/revisions/toxopid/3.json
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{version:3,fields:[{name:abilities,type:"mindustry.entities.abilities.Ability[]"},{name:ammo,type:float},{name:controller,type:mindustry.entities.units.UnitController},{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: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}]}
|
||||||
1
annotations/src/main/resources/revisions/vanquish/1.json
Normal file
1
annotations/src/main/resources/revisions/vanquish/1.json
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{version:1,fields:[{name:abilities,type:"mindustry.entities.abilities.Ability[]"},{name:ammo,type:float},{name:controller,type:mindustry.entities.units.UnitController},{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: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.
|
Before Width: | Height: | Size: 1.4 KiB |
BIN
core/assets-raw/sprites/units/bulwark-shield.png
Normal file
BIN
core/assets-raw/sprites/units/bulwark-shield.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 632 B |
|
|
@ -17,14 +17,7 @@ void main(){
|
||||||
vec4 c = texture2D(u_texture, v_texCoords);
|
vec4 c = texture2D(u_texture, v_texCoords);
|
||||||
|
|
||||||
c.a *= u_progress;
|
c.a *= u_progress;
|
||||||
|
c.a *= step(abs(sin(coords.y*3.0 + u_time)), 0.9);
|
||||||
if(c.a > 0.01){
|
|
||||||
float f = step(abs(sin(coords.y*3.0 + u_time)), 0.9);
|
|
||||||
c.a *= f;
|
|
||||||
//c.rgb = mix(c.rgb, u_color.rgb, f * u_color.a);
|
|
||||||
}
|
|
||||||
|
|
||||||
// c.a *= (1.0-coords.y);
|
|
||||||
|
|
||||||
gl_FragColor = c * v_color;
|
gl_FragColor = c * v_color;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3066,7 +3066,7 @@ public class Blocks{
|
||||||
|
|
||||||
ammo(
|
ammo(
|
||||||
//TODO 1 more ammo type, decide on base type
|
//TODO 1 more ammo type, decide on base type
|
||||||
Items.fissileMatter, new ArtilleryBulletType(2.5f, 100, "shell"){{
|
Items.fissileMatter, new ArtilleryBulletType(2.5f, 300, "shell"){{
|
||||||
hitEffect = new MultiEffect(Fx.titanExplosion, Fx.titanSmoke);
|
hitEffect = new MultiEffect(Fx.titanExplosion, Fx.titanSmoke);
|
||||||
despawnEffect = Fx.none;
|
despawnEffect = Fx.none;
|
||||||
knockback = 2f;
|
knockback = 2f;
|
||||||
|
|
|
||||||
|
|
@ -2503,16 +2503,25 @@ public class UnitTypes{
|
||||||
bulwark = new UnitType("bulwark"){{
|
bulwark = new UnitType("bulwark"){{
|
||||||
drag = 0.1f;
|
drag = 0.1f;
|
||||||
speed = 0.62f;
|
speed = 0.62f;
|
||||||
hitSize = 23f;
|
hitSize = 19f;
|
||||||
health = 8000;
|
health = 7300;
|
||||||
armor = 6f;
|
armor = 5f;
|
||||||
outlineColor = Pal.darkOutline;
|
outlineColor = Pal.darkOutline;
|
||||||
envDisabled = Env.space;
|
envDisabled = Env.space;
|
||||||
|
|
||||||
//TODO shield ability looks bad
|
//new ForceFieldAbility(60f, 0.3f, 400f, 60f * 6);
|
||||||
//abilities.add(new ArmorPlateAbility());
|
abilities.add(new ShieldSectorAbility(){{
|
||||||
|
region = "bulwark-shield";
|
||||||
|
radius = 34f;
|
||||||
|
sectorAngle = 85f;
|
||||||
|
regen = 0.4f;
|
||||||
|
cooldown = 60f * 8f;
|
||||||
|
max = 1500f;
|
||||||
|
y = -20f;
|
||||||
|
width = 6f;
|
||||||
|
}});
|
||||||
|
|
||||||
rotateSpeed = 2.7f;
|
rotateSpeed = 2.2f;
|
||||||
|
|
||||||
legCount = 4;
|
legCount = 4;
|
||||||
legLength = 15f;
|
legLength = 15f;
|
||||||
|
|
@ -2554,7 +2563,7 @@ public class UnitTypes{
|
||||||
homingPower = 0.2f;
|
homingPower = 0.2f;
|
||||||
weaveMag = 4;
|
weaveMag = 4;
|
||||||
weaveScale = 4;
|
weaveScale = 4;
|
||||||
lifetime = 60f;
|
lifetime = 55f;
|
||||||
//TODO better
|
//TODO better
|
||||||
shootEffect = Fx.shootBig2;
|
shootEffect = Fx.shootBig2;
|
||||||
smokeEffect = Fx.shootSmokeTitan;
|
smokeEffect = Fx.shootSmokeTitan;
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,16 @@ package mindustry.entities.abilities;
|
||||||
import arc.*;
|
import arc.*;
|
||||||
import arc.scene.ui.layout.*;
|
import arc.scene.ui.layout.*;
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
|
import mindustry.type.*;
|
||||||
|
|
||||||
public abstract class Ability implements Cloneable{
|
public abstract class Ability implements Cloneable{
|
||||||
|
//the one and only data variable that is synced.
|
||||||
|
public float data;
|
||||||
|
|
||||||
public void update(Unit unit){}
|
public void update(Unit unit){}
|
||||||
public void draw(Unit unit){}
|
public void draw(Unit unit){}
|
||||||
public void death(Unit unit){}
|
public void death(Unit unit){}
|
||||||
|
public void init(UnitType type){}
|
||||||
|
|
||||||
public Ability copy(){
|
public Ability copy(){
|
||||||
try{
|
try{
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
package mindustry.entities.abilities;
|
package mindustry.entities.abilities;
|
||||||
|
|
||||||
import arc.*;
|
|
||||||
import arc.func.*;
|
import arc.func.*;
|
||||||
import arc.graphics.*;
|
import arc.graphics.*;
|
||||||
import arc.graphics.g2d.*;
|
import arc.graphics.g2d.*;
|
||||||
|
|
@ -8,6 +7,7 @@ import arc.math.*;
|
||||||
import arc.math.geom.*;
|
import arc.math.geom.*;
|
||||||
import arc.scene.ui.layout.*;
|
import arc.scene.ui.layout.*;
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
|
import mindustry.*;
|
||||||
import mindustry.content.*;
|
import mindustry.content.*;
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
import mindustry.graphics.*;
|
import mindustry.graphics.*;
|
||||||
|
|
@ -84,7 +84,7 @@ public class ForceFieldAbility extends Ability{
|
||||||
|
|
||||||
Draw.color(unit.team.color, Color.white, Mathf.clamp(alpha));
|
Draw.color(unit.team.color, Color.white, Mathf.clamp(alpha));
|
||||||
|
|
||||||
if(Core.settings.getBool("animatedshields")){
|
if(Vars.renderer.animateShields){
|
||||||
Fill.poly(unit.x, unit.y, 6, realRad);
|
Fill.poly(unit.x, unit.y, 6, realRad);
|
||||||
}else{
|
}else{
|
||||||
Lines.stroke(1.5f);
|
Lines.stroke(1.5f);
|
||||||
|
|
|
||||||
132
core/src/mindustry/entities/abilities/ShieldSectorAbility.java
Normal file
132
core/src/mindustry/entities/abilities/ShieldSectorAbility.java
Normal file
|
|
@ -0,0 +1,132 @@
|
||||||
|
package mindustry.entities.abilities;
|
||||||
|
|
||||||
|
import arc.func.*;
|
||||||
|
import arc.graphics.*;
|
||||||
|
import arc.graphics.g2d.*;
|
||||||
|
import arc.math.*;
|
||||||
|
import arc.math.geom.*;
|
||||||
|
import arc.scene.ui.layout.*;
|
||||||
|
import arc.util.*;
|
||||||
|
import mindustry.*;
|
||||||
|
import mindustry.content.*;
|
||||||
|
import mindustry.gen.*;
|
||||||
|
import mindustry.graphics.*;
|
||||||
|
import mindustry.type.*;
|
||||||
|
import mindustry.ui.*;
|
||||||
|
|
||||||
|
public class ShieldSectorAbility extends Ability{
|
||||||
|
private static Unit paramUnit;
|
||||||
|
private static ShieldSectorAbility paramField;
|
||||||
|
private static Vec2 paramPos = new Vec2();
|
||||||
|
private static final Cons<Bullet> shieldConsumer = b -> {
|
||||||
|
if(b.team != paramUnit.team && b.type.absorbable && paramField.data > 0 &&
|
||||||
|
!paramPos.within(b, paramField.radius + paramField.width/2f) &&
|
||||||
|
Tmp.v1.set(b).add(b.vel).within(paramPos, paramField.radius + paramField.width/2f) &&
|
||||||
|
Angles.within(paramPos.angleTo(b), paramUnit.rotation + paramField.angleOffset, paramField.sectorAngle / 2f)){
|
||||||
|
|
||||||
|
b.absorb();
|
||||||
|
Fx.absorb.at(b);
|
||||||
|
|
||||||
|
//break shield
|
||||||
|
if(paramField.data <= b.damage()){
|
||||||
|
paramField.data -= paramField.cooldown * paramField.regen;
|
||||||
|
|
||||||
|
//TODO fx
|
||||||
|
}
|
||||||
|
|
||||||
|
paramField.data -= b.damage();
|
||||||
|
paramField.alpha = 1f;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/** Shield radius. */
|
||||||
|
public float radius = 60f;
|
||||||
|
/** Shield regen speed in damage/tick. */
|
||||||
|
public float regen = 0.1f;
|
||||||
|
/** Maximum shield. */
|
||||||
|
public float max = 200f;
|
||||||
|
/** Cooldown after the shield is broken, in ticks. */
|
||||||
|
public float cooldown = 60f * 5;
|
||||||
|
/** Angle of shield sector. */
|
||||||
|
public float sectorAngle = 80f;
|
||||||
|
/** Offset parameters for shield. */
|
||||||
|
public float angleOffset = 0f, x = 0f, y = 0f;
|
||||||
|
/** If true, only activates when shooting. */
|
||||||
|
public boolean whenShooting = true;
|
||||||
|
/** Width of shield line. */
|
||||||
|
public float width = 6f;
|
||||||
|
|
||||||
|
/** Whether to draw the sector line. */
|
||||||
|
public boolean drawSector = true;
|
||||||
|
/** If not null, will be drawn on top. */
|
||||||
|
public @Nullable String region;
|
||||||
|
/** If true, sprite position will be influenced by x/y. */
|
||||||
|
public boolean offsetRegion = false;
|
||||||
|
|
||||||
|
/** State. */
|
||||||
|
protected float widthScale, alpha;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void update(Unit unit){
|
||||||
|
if(data < max){
|
||||||
|
data += Time.delta * regen;
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean active = data > 0 && (unit.isShooting || !whenShooting);
|
||||||
|
alpha = Math.max(alpha - Time.delta/10f, 0f);
|
||||||
|
|
||||||
|
if(active){
|
||||||
|
widthScale = Mathf.lerpDelta(widthScale, 1f, 0.06f);
|
||||||
|
paramUnit = unit;
|
||||||
|
paramField = this;
|
||||||
|
paramPos.set(x, y).rotate(unit.rotation - 90f).add(unit);
|
||||||
|
|
||||||
|
Groups.bullet.intersect(unit.x - radius, unit.y - radius, radius * 2f, radius * 2f, shieldConsumer);
|
||||||
|
}else{
|
||||||
|
widthScale = Mathf.lerpDelta(widthScale, 0f, 0.11f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void init(UnitType type){
|
||||||
|
data = max;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void draw(Unit unit){
|
||||||
|
|
||||||
|
if(widthScale > 0.001f){
|
||||||
|
Draw.z(Layer.shields);
|
||||||
|
|
||||||
|
Draw.color(unit.team.color, Color.white, Mathf.clamp(alpha));
|
||||||
|
var pos = paramPos.set(x, y).rotate(unit.rotation - 90f).add(unit);
|
||||||
|
|
||||||
|
if(Vars.renderer.animateShields){
|
||||||
|
if(region != null){
|
||||||
|
Vec2 rp = offsetRegion ? pos : Tmp.v1.set(unit);
|
||||||
|
Draw.yscl = widthScale;
|
||||||
|
Draw.rect(region, rp.x, rp.y, unit.rotation - 90);
|
||||||
|
Draw.yscl = 1f;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(drawSector){
|
||||||
|
Lines.stroke(width * widthScale);
|
||||||
|
Lines.swirl(pos.x, pos.y, radius, sectorAngle / 360f, unit.rotation + angleOffset - sectorAngle / 2f);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
//TODO
|
||||||
|
Lines.stroke(1.5f);
|
||||||
|
Draw.alpha(0.09f);
|
||||||
|
Fill.poly(pos.x, pos.y, 6, radius);
|
||||||
|
Draw.alpha(1f);
|
||||||
|
Lines.poly(pos.x, pos.y, 6, radius);
|
||||||
|
}
|
||||||
|
Draw.reset();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void displayBars(Unit unit, Table bars){
|
||||||
|
bars.add(new Bar("stat.shieldhealth", Pal.accent, () -> data / max)).row();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -6,7 +6,6 @@ import arc.graphics.g2d.*;
|
||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
import arc.math.geom.*;
|
import arc.math.geom.*;
|
||||||
import arc.scene.ui.layout.*;
|
import arc.scene.ui.layout.*;
|
||||||
import arc.struct.*;
|
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
import mindustry.ai.*;
|
import mindustry.ai.*;
|
||||||
import mindustry.ai.types.*;
|
import mindustry.ai.types.*;
|
||||||
|
|
@ -43,6 +42,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
|
||||||
@Import WeaponMount[] mounts;
|
@Import WeaponMount[] mounts;
|
||||||
|
|
||||||
private UnitController controller;
|
private UnitController controller;
|
||||||
|
Ability[] abilities = {};
|
||||||
UnitType type = UnitTypes.alpha;
|
UnitType type = UnitTypes.alpha;
|
||||||
boolean spawnedByCore;
|
boolean spawnedByCore;
|
||||||
double flag;
|
double flag;
|
||||||
|
|
@ -50,7 +50,6 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
|
||||||
transient @Nullable Trail trail;
|
transient @Nullable Trail trail;
|
||||||
|
|
||||||
transient float shadowAlpha = -1f;
|
transient float shadowAlpha = -1f;
|
||||||
transient Seq<Ability> abilities = new Seq<>(0);
|
|
||||||
transient float healTime;
|
transient float healTime;
|
||||||
private transient float resupplyTime = Mathf.random(10f);
|
private transient float resupplyTime = Mathf.random(10f);
|
||||||
private transient boolean wasPlayer;
|
private transient boolean wasPlayer;
|
||||||
|
|
@ -308,8 +307,11 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
|
||||||
|
|
||||||
if(controller == null) controller(type.createController());
|
if(controller == null) controller(type.createController());
|
||||||
if(mounts().length != type.weapons.size) setupWeapons(type);
|
if(mounts().length != type.weapons.size) setupWeapons(type);
|
||||||
if(abilities.size != type.abilities.size){
|
if(abilities.length != type.abilities.size){
|
||||||
abilities = type.abilities.map(Ability::copy);
|
abilities = new Ability[type.abilities.size];
|
||||||
|
for(int i = 0; i < type.abilities.size; i ++){
|
||||||
|
abilities[i] = type.abilities.get(i).copy();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -393,11 +395,9 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(abilities.size > 0){
|
|
||||||
for(Ability a : abilities){
|
for(Ability a : abilities){
|
||||||
a.update(self());
|
a.update(self());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if(trail != null){
|
if(trail != null){
|
||||||
trail.length = type.trailLength;
|
trail.length = type.trailLength;
|
||||||
|
|
@ -546,11 +546,9 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(abilities.size > 0){
|
|
||||||
for(Ability a : abilities){
|
for(Ability a : abilities){
|
||||||
a.death(self());
|
a.death(self());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
remove();
|
remove();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import mindustry.annotations.Annotations.*;
|
||||||
import mindustry.content.TechTree.*;
|
import mindustry.content.TechTree.*;
|
||||||
import mindustry.ctype.*;
|
import mindustry.ctype.*;
|
||||||
import mindustry.entities.*;
|
import mindustry.entities.*;
|
||||||
|
import mindustry.entities.abilities.*;
|
||||||
import mindustry.entities.bullet.*;
|
import mindustry.entities.bullet.*;
|
||||||
import mindustry.entities.units.*;
|
import mindustry.entities.units.*;
|
||||||
import mindustry.game.*;
|
import mindustry.game.*;
|
||||||
|
|
@ -187,6 +188,31 @@ public class TypeIO{
|
||||||
return noMounts;
|
return noMounts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Ability[] readAbilities(Reads read, Ability[] abilities){
|
||||||
|
byte len = read.b();
|
||||||
|
for(int i = 0; i < len; i++){
|
||||||
|
float data = read.f();
|
||||||
|
if(abilities.length > i){
|
||||||
|
abilities[i].data = data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return abilities;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void writeAbilities(Writes write, Ability[] abilities){
|
||||||
|
write.b(abilities.length);
|
||||||
|
for(var a : abilities){
|
||||||
|
write.f(a.data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static final Ability[] noAbilities = {};
|
||||||
|
|
||||||
|
public static Ability[] readAbilities(Reads read){
|
||||||
|
read.skip(read.b());
|
||||||
|
return noAbilities;
|
||||||
|
}
|
||||||
|
|
||||||
public static void writeUnit(Writes write, Unit unit){
|
public static void writeUnit(Writes write, Unit unit){
|
||||||
write.b(unit == null || unit.isNull() ? 0 : unit instanceof BlockUnitc ? 1 : 2);
|
write.b(unit == null || unit.isNull() ? 0 : unit instanceof BlockUnitc ? 1 : 2);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package mindustry.maps;
|
||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
import arc.math.geom.*;
|
import arc.math.geom.*;
|
||||||
import arc.struct.*;
|
import arc.struct.*;
|
||||||
|
import arc.util.*;
|
||||||
import mindustry.ai.*;
|
import mindustry.ai.*;
|
||||||
import mindustry.content.*;
|
import mindustry.content.*;
|
||||||
import mindustry.entities.*;
|
import mindustry.entities.*;
|
||||||
|
|
@ -318,7 +319,7 @@ public class SectorDamage{
|
||||||
if(unit.team == state.rules.defaultTeam){
|
if(unit.team == state.rules.defaultTeam){
|
||||||
sumHealth += unit.health*healthMult + unit.shield;
|
sumHealth += unit.health*healthMult + unit.shield;
|
||||||
sumDps += unit.type.dpsEstimate;
|
sumDps += unit.type.dpsEstimate;
|
||||||
if(unit.abilities.find(a -> a instanceof RepairFieldAbility) instanceof RepairFieldAbility h){
|
if(Structs.find(unit.abilities, a -> a instanceof RepairFieldAbility) instanceof RepairFieldAbility h){
|
||||||
sumRps += h.amount / h.reload * 60f;
|
sumRps += h.amount / h.reload * 60f;
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
|
|
||||||
|
|
@ -243,6 +243,7 @@ public class UnitType extends UnlockableContent{
|
||||||
table.table(bars -> {
|
table.table(bars -> {
|
||||||
bars.defaults().growX().height(20f).pad(4);
|
bars.defaults().growX().height(20f).pad(4);
|
||||||
|
|
||||||
|
//TODO overlay shields
|
||||||
bars.add(new Bar("stat.health", Pal.health, unit::healthf).blink(Color.white));
|
bars.add(new Bar("stat.health", Pal.health, unit::healthf).blink(Color.white));
|
||||||
bars.row();
|
bars.row();
|
||||||
|
|
||||||
|
|
@ -456,6 +457,10 @@ public class UnitType extends UnlockableContent{
|
||||||
}).layer(Layer.debris);
|
}).layer(Layer.debris);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for(Ability ab : abilities){
|
||||||
|
ab.init(this);
|
||||||
|
}
|
||||||
|
|
||||||
canHeal = weapons.contains(w -> w.bullet.heals());
|
canHeal = weapons.contains(w -> w.bullet.heals());
|
||||||
|
|
||||||
//add mirrored weapon variants
|
//add mirrored weapon variants
|
||||||
|
|
@ -770,12 +775,10 @@ public class UnitType extends UnlockableContent{
|
||||||
Draw.z(z);
|
Draw.z(z);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(unit.abilities.size > 0){
|
|
||||||
for(Ability a : unit.abilities){
|
for(Ability a : unit.abilities){
|
||||||
Draw.reset();
|
Draw.reset();
|
||||||
a.draw(unit);
|
a.draw(unit);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Draw.reset();
|
Draw.reset();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,4 +24,4 @@ android.useAndroidX=true
|
||||||
#used for slow jitpack builds; TODO see if this actually works
|
#used for slow jitpack builds; TODO see if this actually works
|
||||||
org.gradle.internal.http.socketTimeout=100000
|
org.gradle.internal.http.socketTimeout=100000
|
||||||
org.gradle.internal.http.connectionTimeout=100000
|
org.gradle.internal.http.connectionTimeout=100000
|
||||||
archash=a5df968996
|
archash=390397fbb9
|
||||||
|
|
|
||||||
|
|
@ -350,14 +350,23 @@ public class ApplicationTests{
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void load(){
|
void saveLoad(){
|
||||||
world.loadMap(testMap);
|
world.loadMap(testMap);
|
||||||
Map map = state.map;
|
Map map = state.map;
|
||||||
|
|
||||||
|
float hp = 30f;
|
||||||
|
|
||||||
|
Unit unit = UnitTypes.dagger.spawn(Team.sharded, 20f, 30f);
|
||||||
|
unit.health = hp;
|
||||||
|
|
||||||
SaveIO.save(saveDirectory.child("0.msav"));
|
SaveIO.save(saveDirectory.child("0.msav"));
|
||||||
resetWorld();
|
resetWorld();
|
||||||
SaveIO.load(saveDirectory.child("0.msav"));
|
SaveIO.load(saveDirectory.child("0.msav"));
|
||||||
|
|
||||||
|
Unit spawned = Groups.unit.find(u -> u.type == UnitTypes.dagger);
|
||||||
|
assertNotNull(spawned, "Saved daggers must persist");
|
||||||
|
assertEquals(hp, spawned.health, "Spawned dagger health must save.");
|
||||||
|
|
||||||
assertEquals(world.width(), map.width);
|
assertEquals(world.width(), map.width);
|
||||||
assertEquals(world.height(), map.height);
|
assertEquals(world.height(), map.height);
|
||||||
assertTrue(state.teams.playerCores().size > 0);
|
assertTrue(state.teams.playerCores().size > 0);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue