Merge branch 'master' into patch-3

This commit is contained in:
Anuken
2020-07-22 21:40:05 -04:00
committed by GitHub
173 changed files with 4506 additions and 2406 deletions
@@ -4,6 +4,7 @@ alpha=0
arkyid=37
atrax=38
block=1
bryde=40
cix=2
draug=3
flare=36
@@ -0,0 +1 @@
{version:1,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
@@ -0,0 +1 @@
{version:2,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
@@ -0,0 +1 @@
{version:1,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:baseRotation,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
@@ -0,0 +1 @@
{version:2,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:baseRotation,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
@@ -0,0 +1 @@
{version:1,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
@@ -0,0 +1 @@
{version:2,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
@@ -0,0 +1 @@
{version:1,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:baseRotation,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
@@ -0,0 +1 @@
{version:2,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:baseRotation,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
@@ -0,0 +1 @@
{version:1,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:payloads,type:arc.struct.Seq<mindustry.world.blocks.payloads.Payload>,size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
@@ -0,0 +1 @@
{version:2,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:payloads,type:arc.struct.Seq<mindustry.world.blocks.payloads.Payload>,size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
@@ -0,0 +1 @@
{version:1,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
@@ -0,0 +1 @@
{version:2,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
@@ -0,0 +1 @@
{version:1,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
@@ -0,0 +1 @@
{version:2,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
@@ -0,0 +1 @@
{fields:[{name:ammo,type:int,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:payloads,type:arc.struct.Seq<mindustry.world.blocks.payloads.Payload>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
@@ -0,0 +1 @@
{version:1,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
@@ -0,0 +1 @@
{version:2,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
@@ -0,0 +1 @@
{version:1,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
@@ -0,0 +1 @@
{version:2,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
@@ -0,0 +1 @@
{version:1,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:baseRotation,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
@@ -0,0 +1 @@
{version:2,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:baseRotation,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
@@ -0,0 +1 @@
{version:1,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
@@ -0,0 +1 @@
{version:2,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
@@ -0,0 +1 @@
{version:1,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
@@ -0,0 +1 @@
{version:2,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 316 B

After

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 321 B

After

Width:  |  Height:  |  Size: 562 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 311 B

After

Width:  |  Height:  |  Size: 531 B

+2 -1
View File
@@ -599,7 +599,8 @@ bar.poweramount = Power: {0}
bar.poweroutput = Power Output: {0}
bar.items = Items: {0}
bar.capacity = Capacity: {0}
bar.units = Units: {0}/{1}
bar.unitcap = {0} {1}/{2}
bar.limitreached = [scarlet] {0} / {1}[white] {2}\n[lightgray][[unit disabled]
bar.liquid = Liquid
bar.heat = Heat
bar.power = Power
+2 -2
View File
@@ -982,7 +982,7 @@ block.liquid-void.name = Рідинний вакуум
block.power-void.name = Енергетичний вакуум
block.power-source.name = Нескінченне джерело енергії
block.unloader.name = Розвантажувач
block.vault.name = Сховище
block.vault.name = Вмістилище
block.wave.name = Хвиля
block.swarmer.name = Роєвик
block.salvo.name = Залп
@@ -1013,7 +1013,7 @@ block.phase-conduit.name = Фазовий трубопровід
block.liquid-router.name = Рідинний маршрутизатор
block.liquid-tank.name = Рідинний резервуар
block.liquid-junction.name = Рідинне перехрестя
block.bridge-conduit.name = Мостовий водопровід
block.bridge-conduit.name = Мостовий трубопровід
block.rotary-pump.name = Роторний насос
block.thorium-reactor.name = Торієвий реактор
block.mass-driver.name = Електромагнітна катапульта
+25
View File
@@ -253,3 +253,28 @@
63491=tetrative-reconstructor|block-tetrative-reconstructor-medium
63490=resupply-point|block-resupply-point-medium
63489=parallax|block-parallax-medium
63488=dagger|unit-dagger-medium
63487=mace|unit-mace-medium
63486=fortress|unit-fortress-medium
63485=nova|unit-nova-medium
63484=pulsar|unit-pulsar-medium
63483=quasar|unit-quasar-medium
63482=crawler|unit-crawler-medium
63481=atrax|unit-atrax-medium
63480=spiroct|unit-spiroct-medium
63479=arkyid|unit-arkyid-medium
63478=flare|unit-flare-medium
63477=horizon|unit-horizon-medium
63476=zenith|unit-zenith-medium
63475=antumbra|unit-antumbra-medium
63474=eclipse|unit-eclipse-medium
63473=mono|unit-mono-medium
63472=poly|unit-poly-medium
63471=mega|unit-mega-medium
63470=risse|unit-risse-medium
63469=minke|unit-minke-medium
63468=bryde|unit-bryde-medium
63467=alpha|unit-alpha-medium
63466=beta|unit-beta-medium
63465=gamma|unit-gamma-medium
63464=block|unit-block-medium
File diff suppressed because it is too large Load Diff
Binary file not shown.

Before

Width:  |  Height:  |  Size: 590 KiB

After

Width:  |  Height:  |  Size: 608 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1023 KiB

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 181 KiB

After

Width:  |  Height:  |  Size: 187 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 300 KiB

After

Width:  |  Height:  |  Size: 307 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 376 KiB

After

Width:  |  Height:  |  Size: 386 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

File diff suppressed because it is too large Load Diff
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 MiB

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 182 KiB

After

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 294 KiB

After

Width:  |  Height:  |  Size: 302 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 380 KiB

After

Width:  |  Height:  |  Size: 391 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

+1 -1
View File
@@ -25,7 +25,7 @@ public class BaseAI{
private static final float step = 5;
private static final int attempts = 5;
private static final float emptyChance = 0.01f;
private final static int timerStep = 0, timerSpawn = 1;
private static final int timerStep = 0, timerSpawn = 1;
private static int correct = 0, incorrect = 0;
+1 -1
View File
@@ -62,7 +62,7 @@ public class BaseRegistry{
//calculate averages
if(tile.block instanceof Drill || tile.block instanceof Pump){
Tmp.v1.add(tile.x*tilesize + tile.block.offset(), tile.y*tilesize + tile.block.offset());
Tmp.v1.add(tile.x*tilesize + tile.block.offset, tile.y*tilesize + tile.block.offset);
drills ++;
}
}
+4 -4
View File
@@ -22,7 +22,7 @@ import static mindustry.Vars.*;
/** Class used for indexing special target blocks for AI. */
public class BlockIndexer{
/** Size of one quadrant. */
private final static int quadrantSize = 16;
private static final int quadrantSize = 16;
/** Set of all ores that are being scanned. */
private final ObjectSet<Item> scanOres = new ObjectSet<>();
@@ -181,7 +181,7 @@ public class BlockIndexer{
for(int y = -tileRange + ty; y <= tileRange + ty; y++){
if(!Mathf.within(x * tilesize, y * tilesize, wx, wy, range)) continue;
Building other = world.ent(x, y);
Building other = world.build(x, y);
if(other == null) continue;
@@ -247,7 +247,7 @@ public class BlockIndexer{
for(int tx = rx * quadrantSize; tx < (rx + 1) * quadrantSize && tx < world.width(); tx++){
for(int ty = ry * quadrantSize; ty < (ry + 1) * quadrantSize && ty < world.height(); ty++){
Building e = world.ent(tx, ty);
Building e = world.build(tx, ty);
if(e == null) continue;
@@ -388,7 +388,7 @@ public class BlockIndexer{
outer:
for(int x = quadrantX * quadrantSize; x < world.width() && x < (quadrantX + 1) * quadrantSize; x++){
for(int y = quadrantY * quadrantSize; y < world.height() && y < (quadrantY + 1) * quadrantSize; y++){
Building result = world.ent(x, y);
Building result = world.build(x, y);
//when a targetable block is found, mark this quadrant as occupied and stop searching
if(result != null && result.team() == team){
bits.set(quadrantX, quadrantY);
+2 -2
View File
@@ -167,12 +167,12 @@ public class Pathfinder implements Runnable{
}
}
public Tile getTargetTile(Tile tile, Team team, Position target){
public @Nullable Tile getTargetTile(Tile tile, Team team, Position target){
return getTargetTile(tile, team, getTarget(target));
}
/** Gets next tile to travel to. Main thread only. */
public Tile getTargetTile(Tile tile, Team team, PathTarget target){
public @Nullable Tile getTargetTile(Tile tile, Team team, PathTarget target){
if(tile == null) return null;
if(fieldMap[team.id] == null){
+1 -1
View File
@@ -69,7 +69,7 @@ public class BuilderAI extends AIController{
float length = circleLength <= 0.001f ? 1f : Mathf.clamp((unit.dst(target) - circleLength) / 100f, -1f, 1f);
vec.setLength(unit.type().speed * Time.delta() * length);
vec.setLength(unit.type().speed * Time.delta * length);
if(length < -0.5f){
vec.rotate(180f);
}else if(length < 0){
+3 -3
View File
@@ -61,7 +61,7 @@ public class FlyingAI extends AIController{
vec.rotate((circleLength - vec.len()) / circleLength * 180f);
}
vec.setLength(speed * Time.delta());
vec.setLength(speed * Time.delta);
unit.moveAt(vec);
}
@@ -73,7 +73,7 @@ public class FlyingAI extends AIController{
float length = circleLength <= 0.001f ? 1f : Mathf.clamp((unit.dst(target) - circleLength) / 100f, -1f, 1f);
vec.setLength(unit.type().speed * Time.delta() * length);
vec.setLength(unit.type().speed * Time.delta * length);
if(length < -0.5f){
vec.rotate(180f);
}else if(length < 0){
@@ -95,7 +95,7 @@ public class FlyingAI extends AIController{
vec.setAngle(Mathf.slerpDelta(unit.vel().angle(), vec.angle(), 0.6f));
}
vec.setLength(unit.type().speed * Time.delta());
vec.setLength(unit.type().speed * Time.delta);
unit.moveAt(vec);
}
+4 -2
View File
@@ -35,8 +35,10 @@ public class FormationAI extends AIController implements FormationMember{
if(leader.isShooting){
unit.aimLook(leader.aimX(), leader.aimY());
}else{
if(!unit.moving()){
unit.lookAt(unit.vel.angle());
if(!leader.moving() || !unit.type().rotateShooting){
if(unit.moving()){
unit.lookAt(unit.vel.angle());
}
}else{
unit.lookAt(leader.rotation);
}
+29 -2
View File
@@ -4,6 +4,7 @@ import arc.math.geom.*;
import mindustry.*;
import mindustry.game.*;
import mindustry.gen.*;
import mindustry.type.*;
import java.util.*;
@@ -11,6 +12,8 @@ import java.util.*;
public class TeamIndexProcess implements AsyncProcess{
private QuadTree<Unit>[] trees = new QuadTree[Team.all.length];
private int[] counts = new int[Team.all.length];
private int[][] typeCounts = new int[Team.all.length][0];
private int[][] activeCounts = new int[Team.all.length][0];
public QuadTree<Unit> tree(Team team){
if(trees[team.id] == null) trees[team.id] = new QuadTree<>(Vars.world.getQuadBounds(new Rect()));
@@ -22,8 +25,27 @@ public class TeamIndexProcess implements AsyncProcess{
return counts[team.id];
}
public void updateCount(Team team, int amount){
public int countType(Team team, UnitType type){
return typeCounts[team.id].length <= type.id ? 0 : typeCounts[team.id][type.id];
}
public int countActive(Team team, UnitType type){
return activeCounts[team.id].length <= type.id ? 0 : activeCounts[team.id][type.id];
}
public void updateCount(Team team, UnitType type, int amount){
counts[team.id] += amount;
if(typeCounts[team.id].length <= type.id){
typeCounts[team.id] = new int[Vars.content.units().size];
}
typeCounts[team.id][type.id] += amount;
}
public void updateActiveCount(Team team, UnitType type, int amount){
if(activeCounts[team.id].length <= type.id){
activeCounts[team.id] = new int[Vars.content.units().size];
}
activeCounts[team.id][type.id] += amount;
}
@Override
@@ -39,13 +61,18 @@ public class TeamIndexProcess implements AsyncProcess{
if(trees[team.id] != null){
trees[team.id].clear();
}
Arrays.fill(typeCounts[team.id], 0);
Arrays.fill(activeCounts[team.id], 0);
}
Arrays.fill(counts, 0);
for(Unit unit : Groups.unit){
tree(unit.team).insert(unit);
counts[unit.team.id] ++;
updateCount(unit.team, unit.type(), 1);
if(!unit.deactivated) updateActiveCount(unit.team, unit.type(), 1);
}
}
+2 -2
View File
@@ -136,10 +136,10 @@ public class MusicControl{
silenced = false;
}else if(current == music && music != null){
//fade in the playing track
fade = Mathf.clamp(fade + Time.delta()/finTime);
fade = Mathf.clamp(fade + Time.delta /finTime);
}else if(current != null){
//fade out the current track
fade = Mathf.clamp(fade - Time.delta()/foutTime);
fade = Mathf.clamp(fade - Time.delta /foutTime);
if(fade <= 0.01f){
//stop current track when it hits 0 volume
+2 -2
View File
@@ -27,9 +27,9 @@ public class SoundLoop{
}else{
//fade the sound in or out
if(play){
volume = Mathf.clamp(volume + fadeSpeed * Time.delta());
volume = Mathf.clamp(volume + fadeSpeed * Time.delta);
}else{
volume = Mathf.clamp(volume - fadeSpeed * Time.delta());
volume = Mathf.clamp(volume - fadeSpeed * Time.delta);
if(volume <= 0.001f){
sound.stop(id);
id = -1;
+27 -17
View File
@@ -1004,17 +1004,17 @@ public class Blocks implements ContentList{
rotaryPump = new Pump("rotary-pump"){{
requirements(Category.liquid, with(Items.copper, 70, Items.metaglass, 50, Items.silicon, 20, Items.titanium, 35));
pumpAmount = 0.8f;
consumes.power(0.15f);
pumpAmount = 0.2f;
consumes.power(0.3f);
liquidCapacity = 30f;
hasPower = true;
size = 2;
}};
thermalPump = new Pump("thermal-pump"){{
requirements(Category.liquid, with(Items.copper, 80, Items.metaglass, 70, Items.silicon, 30, Items.titanium, 40, Items.thorium, 35));
pumpAmount = 1.5f;
consumes.power(0.30f);
requirements(Category.liquid, with(Items.copper, 80, Items.metaglass, 90, Items.silicon, 30, Items.titanium, 40, Items.thorium, 35));
pumpAmount = 0.22f;
consumes.power(1.3f);
liquidCapacity = 40f;
hasPower = true;
size = 3;
@@ -1228,6 +1228,9 @@ public class Blocks implements ContentList{
rotateSpeed = 6f;
warmupSpeed = 0.01f;
//more than the laser drill
liquidBoostIntensity = 1.8f;
consumes.power(3f);
consumes.liquid(Liquids.water, 0.1f).boost();
}};
@@ -1284,6 +1287,8 @@ public class Blocks implements ContentList{
health = 1100;
itemCapacity = 4000;
size = 3;
unitCapModifier = 8;
}};
coreFoundation = new CoreBlock("core-foundation"){{
@@ -1293,6 +1298,8 @@ public class Blocks implements ContentList{
health = 2000;
itemCapacity = 9000;
size = 4;
unitCapModifier = 16;
}};
coreNucleus = new CoreBlock("core-nucleus"){{
@@ -1302,6 +1309,8 @@ public class Blocks implements ContentList{
health = 4000;
itemCapacity = 13000;
size = 5;
unitCapModifier = 24;
}};
vault = new StorageBlock("vault"){{
@@ -1411,7 +1420,6 @@ public class Blocks implements ContentList{
Liquids.cryofluid, Bullets.cryoShot,
Liquids.oil, Bullets.oilShot
);
targetAir = false;
size = 2;
recoilAmount = 0f;
reloadTime = 2f;
@@ -1679,11 +1687,11 @@ public class Blocks implements ContentList{
//region units
groundFactory = new UnitFactory("ground-factory"){{
requirements(Category.units, with(Items.copper, 30, Items.lead, 70));
requirements(Category.units, with(Items.copper, 50, Items.lead, 120, Items.silicon, 80));
plans = new UnitPlan[]{
new UnitPlan(UnitTypes.dagger, 200f, with(Items.silicon, 10, Items.lead, 10)),
new UnitPlan(UnitTypes.crawler, 200f, with(Items.silicon, 10, Items.blastCompound, 10)),
new UnitPlan(UnitTypes.nova, 200f, with(Items.silicon, 20, Items.lead, 20, Items.titanium, 20)),
new UnitPlan(UnitTypes.dagger, 60f * 20, with(Items.silicon, 10, Items.lead, 10)),
new UnitPlan(UnitTypes.crawler, 60f * 15, with(Items.silicon, 10, Items.blastCompound, 10)),
new UnitPlan(UnitTypes.nova, 60f * 40, with(Items.silicon, 30, Items.lead, 20, Items.titanium, 20)),
};
size = 3;
consumes.power(1.2f);
@@ -1692,8 +1700,8 @@ public class Blocks implements ContentList{
airFactory = new UnitFactory("air-factory"){{
requirements(Category.units, with(Items.copper, 30, Items.lead, 70));
plans = new UnitPlan[]{
new UnitPlan(UnitTypes.flare, 200f, with(Items.silicon, 10)),
new UnitPlan(UnitTypes.mono, 200f, with(Items.silicon, 15, Items.lead, 15)),
new UnitPlan(UnitTypes.flare, 60f * 15, with(Items.silicon, 10)),
new UnitPlan(UnitTypes.mono, 60f * 35, with(Items.silicon, 30, Items.lead, 15)),
};
size = 3;
consumes.power(1.2f);
@@ -1702,7 +1710,7 @@ public class Blocks implements ContentList{
navalFactory = new UnitFactory("naval-factory"){{
requirements(Category.units, with(Items.copper, 30, Items.lead, 70));
plans = new UnitPlan[]{
new UnitPlan(UnitTypes.risse, 200f, with(Items.silicon, 20, Items.metaglass, 25)),
new UnitPlan(UnitTypes.risse, 60f * 30f, with(Items.silicon, 20, Items.metaglass, 25)),
};
size = 3;
requiresWater = true;
@@ -1716,7 +1724,7 @@ public class Blocks implements ContentList{
consumes.power(3f);
consumes.items(with(Items.silicon, 40, Items.graphite, 40));
constructTime = 60f * 5f;
constructTime = 60f * 10f;
upgrades = new UnitType[][]{
{UnitTypes.nova, UnitTypes.quasar},
@@ -1735,7 +1743,7 @@ public class Blocks implements ContentList{
consumes.power(6f);
consumes.items(with(Items.silicon, 130, Items.titanium, 80, Items.metaglass, 30));
constructTime = 60f * 15f;
constructTime = 60f * 30f;
upgrades = new UnitType[][]{
{UnitTypes.horizon, UnitTypes.zenith},
@@ -1755,7 +1763,8 @@ public class Blocks implements ContentList{
consumes.items(with(Items.silicon, 200, Items.titanium, 200, Items.surgealloy, 240));
consumes.liquid(Liquids.cryofluid, 1f);
constructTime = 60f * 60f;
constructTime = 60f * 60f * 1.5f;
liquidCapacity = 30f;
upgrades = new UnitType[][]{
{UnitTypes.zenith, UnitTypes.antumbra},
@@ -1770,7 +1779,8 @@ public class Blocks implements ContentList{
consumes.items(with(Items.silicon, 300, Items.plastanium, 300, Items.surgealloy, 300, Items.phasefabric, 250));
consumes.liquid(Liquids.cryofluid, 3f);
constructTime = 60f * 60f * 3;
constructTime = 60f * 60f * 4;
liquidCapacity = 60f;
upgrades = new UnitType[][]{
{UnitTypes.antumbra, UnitTypes.eclipse},
+3 -3
View File
@@ -416,18 +416,18 @@ public class Bullets implements ContentList{
@Override
public void update(Bullet b){
if(Mathf.chance(0.04 * Time.delta())){
if(Mathf.chance(0.04 * Time.delta)){
Tile tile = world.tileWorld(b.x, b.y);
if(tile != null){
Fires.create(tile);
}
}
if(Mathf.chance(0.1 * Time.delta())){
if(Mathf.chance(0.1 * Time.delta)){
Fx.fireballsmoke.at(b.x, b.y);
}
if(Mathf.chance(0.1 * Time.delta())){
if(Mathf.chance(0.1 * Time.delta)){
Fx.ballfire.at(b.x, b.y);
}
}
+8
View File
@@ -38,6 +38,14 @@ public class Fx{
}),
unitCapKill = new Effect(80f, e -> {
color(Color.scarlet);
alpha(e.fout(Interp.pow4Out));
float size = 10f + e.fout(Interp.pow10In) * 25f;
Draw.rect(Icon.warning.getRegion(), e.x, e.y, size, size);
}),
unitControl = new Effect(30f, e -> {
if(!(e.data instanceof Unit)) return;
+8 -4
View File
@@ -349,7 +349,7 @@ public class UnitTypes implements ContentList{
despawnEffect = Fx.none;
width = 0.54f;
lifetime = 35f;
knockback = -1f;
knockback = -1.2f;
}};
}});
@@ -368,7 +368,7 @@ public class UnitTypes implements ContentList{
despawnEffect = Fx.none;
width = 0.4f;
lifetime = 25f;
knockback = -0.5f;
knockback = -0.6f;
}};
}});
}};
@@ -569,6 +569,8 @@ public class UnitTypes implements ContentList{
mineTier = 1;
mineSpeed = 2.5f;
//no weapon, mining only
/*
weapons.add(new Weapon(){{
y = 1.5f;
x = 0f;
@@ -582,7 +584,7 @@ public class UnitTypes implements ContentList{
bullet = new HealBulletType(5.2f, 10){{
healPercent = 4f;
}};
}});
}});*/
}};
poly = new UnitType("poly"){{
@@ -678,6 +680,8 @@ public class UnitTypes implements ContentList{
immunities = ObjectSet.with(StatusEffects.wet);
trailLength = 20;
armor = 2f;
weapons.add(new Weapon("mount-weapon"){{
reload = 12f;
x = 4f;
@@ -796,7 +800,7 @@ public class UnitTypes implements ContentList{
hitEffect = Fx.massiveExplosion;
knockback = 1.5f;
lifetime = 140f;
height = 17f;
height = 15.5f;
width = 15f;
collidesTiles = false;
ammoMultiplier = 4f;
+4 -11
View File
@@ -416,19 +416,12 @@ public class Control implements ApplicationListener, Loadable{
//just a regular reminder
if(!OS.prop("user.name").equals("anuke") && !OS.hasEnv("iknowwhatimdoing")){
if(mobile){
Runnable[] run = {null};
run[0] = () -> {
ui.showInfo("[scarlet]6.0 doesn't work on mobile.[] Don't play it.", run[0]);
};
}else{
ui.showInfo("[scarlet]6.0 is not supposed to be played.[] Go do something else.");
}
ui.showInfo("[scarlet]6.0 is not supposed to be played.[] Go do something else.");
}
//play tutorial on stop
if(!settings.getBool("playedtutorial", false)){
Core.app.post(() -> Core.app.post(this::playTutorial));
//Core.app.post(() -> Core.app.post(this::playTutorial));
}
//display UI scale changed dialog
@@ -449,7 +442,7 @@ public class Control implements ApplicationListener, Loadable{
if(countdown[0] <= 0){
exit.run();
}
return Core.bundle.format("uiscale.reset", (int)((countdown[0] -= Time.delta()) / 60f));
return Core.bundle.format("uiscale.reset", (int)((countdown[0] -= Time.delta) / 60f));
}).pad(10f).expand().center();
dialog.buttons.defaults().size(200f, 60f);
@@ -486,7 +479,6 @@ public class Control implements ApplicationListener, Loadable{
music.update();
loops.update();
Time.updateGlobal();
if(Core.input.keyTap(Binding.fullscreen)){
boolean full = settings.getBool("fullscreen");
@@ -528,6 +520,7 @@ public class Control implements ApplicationListener, Loadable{
}
}else{
//this runs in the menu
if(!state.isPaused()){
Time.update();
}
+2 -2
View File
@@ -244,7 +244,7 @@ public class Logic implements ApplicationListener{
for(WeatherEntry entry : state.rules.weather){
//update cooldown
entry.cooldown -= Time.delta();
entry.cooldown -= Time.delta;
//create new event when not active
if(entry.cooldown < 0 && !entry.weather.isActive()){
@@ -356,7 +356,7 @@ public class Logic implements ApplicationListener{
if(state.rules.waves && state.rules.waveTimer && !state.gameOver){
if(!isWaitingWave()){
state.wavetime = Math.max(state.wavetime - Time.delta(), 0);
state.wavetime = Math.max(state.wavetime - Time.delta, 0);
}
}
+3 -3
View File
@@ -28,8 +28,8 @@ import java.util.zip.*;
import static mindustry.Vars.*;
public class NetClient implements ApplicationListener{
private final static float dataTimeout = 60 * 18;
private final static float playerSyncTime = 2;
private static final float dataTimeout = 60 * 18;
private static final float playerSyncTime = 2;
public final static float viewScale = 2f;
private long ping;
@@ -476,7 +476,7 @@ public class NetClient implements ApplicationListener{
}else if(!connecting){
net.disconnect();
}else{ //...must be connecting
timeoutTime += Time.delta();
timeoutTime += Time.delta;
if(timeoutTime > dataTimeout){
Log.err("Failed to load data!");
ui.loadfrag.hide();
+6 -6
View File
@@ -34,13 +34,13 @@ import static arc.util.Log.*;
import static mindustry.Vars.*;
public class NetServer implements ApplicationListener{
private final static int maxSnapshotSize = 430, timerBlockSync = 0;
private final static float serverSyncTime = 12, blockSyncTime = 60 * 8;
private final static FloatBuffer fbuffer = FloatBuffer.allocate(20);
private final static Vec2 vector = new Vec2();
private final static Rect viewport = new Rect();
private static final int maxSnapshotSize = 430, timerBlockSync = 0;
private static final float serverSyncTime = 12, blockSyncTime = 60 * 8;
private static final FloatBuffer fbuffer = FloatBuffer.allocate(20);
private static final Vec2 vector = new Vec2();
private static final Rect viewport = new Rect();
/** If a player goes away of their server-side coordinates by this distance, they get teleported back. */
private final static float correctDist = 16f;
private static final float correctDist = 16f;
public final Administration admins = new Administration();
public final CommandHandler clientCommands = new CommandHandler("/");
+3 -3
View File
@@ -63,7 +63,7 @@ public class Renderer implements ApplicationListener{
camerascale = Mathf.lerpDelta(camerascale, targetscale, 0.1f);
if(landTime > 0){
landTime -= Time.delta();
landTime -= Time.delta;
landscale = Interp.pow5In.apply(minZoomScl, Scl.scl(4f), 1f - landTime / Fx.coreLand.lifetime);
camerascale = landscale;
weatherAlpha = 0f;
@@ -172,8 +172,8 @@ public class Renderer implements ApplicationListener{
if(shaketime > 0){
float intensity = shakeIntensity * (settings.getInt("screenshake", 4) / 4f) * scale;
camera.position.add(Mathf.range(intensity), Mathf.range(intensity));
shakeIntensity -= 0.25f * Time.delta();
shaketime -= Time.delta();
shakeIntensity -= 0.25f * Time.delta;
shaketime -= Time.delta;
shakeIntensity = Mathf.clamp(shakeIntensity, 0f, 100f);
}else{
shakeIntensity = 0f;
+4 -4
View File
@@ -110,14 +110,14 @@ public class World{
}
@Nullable
public Building ent(int x, int y){
public Building build(int x, int y){
Tile tile = tile(x, y);
if(tile == null) return null;
return tile.build;
}
@Nullable
public Building ent(int pos){
public Building build(int pos){
Tile tile = tile(pos);
if(tile == null) return null;
return tile.build;
@@ -134,8 +134,8 @@ public class World{
}
@Nullable
public Building entWorld(float x, float y){
return ent(Math.round(x / tilesize), Math.round(y / tilesize));
public Building buildWorld(float x, float y){
return build(Math.round(x / tilesize), Math.round(y / tilesize));
}
public int toTile(float coord){
+3 -3
View File
@@ -112,14 +112,14 @@ public class MapRenderer implements Disposable{
if(wall.rotate){
mesh.draw(idxWall, region,
wx * tilesize + wall.offset(), wy * tilesize + wall.offset(),
wx * tilesize + wall.offset, wy * tilesize + wall.offset,
region.getWidth() * Draw.scl, region.getHeight() * Draw.scl, tile.rotdeg() - 90);
}else{
float width = region.getWidth() * Draw.scl, height = region.getHeight() * Draw.scl;
mesh.draw(idxWall, region,
wx * tilesize + wall.offset() + (tilesize - width) / 2f,
wy * tilesize + wall.offset() + (tilesize - height) / 2f,
wx * tilesize + wall.offset + (tilesize - width) / 2f,
wy * tilesize + wall.offset + (tilesize - height) / 2f,
width, height);
}
}else{
@@ -3,7 +3,7 @@ package mindustry.editor;
import arc.struct.Seq;
public class OperationStack{
private final static int maxSize = 10;
private static final int maxSize = 10;
private Seq<DrawOperation> stack = new Seq<>();
private int index = 0;
@@ -25,7 +25,7 @@ import static mindustry.Vars.*;
import static mindustry.game.SpawnGroup.never;
public class WaveInfoDialog extends BaseDialog{
private final static int displayed = 20;
private static final int displayed = 20;
private Seq<SpawnGroup> groups = new Seq<>();
private Table table, preview;
@@ -104,7 +104,7 @@ public class WaveInfoDialog extends BaseDialog{
m.button("-", () -> {
}).update(t -> {
if(t.getClickListener().isPressed()){
updateTimer += Time.delta();
updateTimer += Time.delta;
if(updateTimer >= updatePeriod){
start = Math.max(start - 1, 0);
updateTimer = 0f;
@@ -118,7 +118,7 @@ public class WaveInfoDialog extends BaseDialog{
m.button("+", () -> {
}).update(t -> {
if(t.getClickListener().isPressed()){
updateTimer += Time.delta();
updateTimer += Time.delta;
if(updateTimer >= updatePeriod){
start++;
updateTimer = 0f;
+2 -2
View File
@@ -86,7 +86,7 @@ public class Damage{
collidedBlocks.clear();
tr.trns(angle, length);
Intc2 collider = (cx, cy) -> {
Building tile = world.ent(cx, cy);
Building tile = world.build(cx, cy);
if(tile != null && !collidedBlocks.contains(tile.pos()) && tile.team() != team && tile.collide(hitter)){
tile.collision(hitter);
collidedBlocks.add(tile.pos());
@@ -159,7 +159,7 @@ public class Damage{
tmpBuilding = null;
world.raycastEachWorld(x, y, x + tr.x, y + tr.y, (cx, cy) -> {
Building tile = world.ent(cx, cy);
Building tile = world.build(cx, cy);
if(tile != null && tile.team != hitter.team){
tmpBuilding = tile;
//TODO return tile
+3 -7
View File
@@ -62,6 +62,9 @@ public class Effects{
public static void decal(TextureRegion region, float x, float y, float rotation, float lifetime, Color color){
if(headless || region == null || !Core.atlas.isFound(region)) return;
Tile tile = world.tileWorld(x, y);
if(tile == null || tile.floor().isLiquid) return;
Decal decal = Decal.create();
decal.set(x, y);
decal.rotation(rotation);
@@ -74,22 +77,15 @@ public class Effects{
public static void scorch(float x, float y, int size){
if(headless) return;
Tile tile = world.tileWorld(x, y);
if(tile == null || tile.floor().isLiquid) return;
size = Mathf.clamp(size, 0, 9);
TextureRegion region = Core.atlas.find("scorch-" + size + "-" + Mathf.random(2));
decal(region, x, y, Mathf.random(4) * 90, 3600, Pal.rubble);
}
public static void rubble(float x, float y, int blockSize){
if(headless) return;
Tile tile = world.tileWorld(x, y);
if(tile == null || tile.floor().isLiquid) return;
TextureRegion region = Core.atlas.find("rubble-" + blockSize + "-" + (Core.atlas.has("rubble-" + blockSize + "-1") ? Mathf.random(0, 1) : "0"));
decal(region, x, y, Mathf.random(4) * 90, 3600, Pal.rubble);
}
+2 -2
View File
@@ -52,9 +52,9 @@ public class Fires{
public static void extinguish(Tile tile, float intensity){
if(tile != null && map.containsKey(tile.pos())){
Fire fire = map.get(tile.pos());
fire.time(fire.time() + intensity * Time.delta());
fire.time(fire.time + intensity * Time.delta);
Fx.steam.at(fire);
if(fire.time() >= fire.lifetime()){
if(fire.time >= fire.lifetime){
Events.fire(Trigger.fireExtinguish);
}
}
+5 -5
View File
@@ -24,8 +24,8 @@ public class Predict{
* @return the intercept location
*/
public static Vec2 intercept(float srcx, float srcy, float dstx, float dsty, float dstvx, float dstvy, float v){
dstvx /= Time.delta();
dstvy /= Time.delta();
dstvx /= Time.delta;
dstvy /= Time.delta;
float tx = dstx - srcx,
ty = dsty - srcy;
@@ -58,8 +58,8 @@ public class Predict{
ddy += ((Hitboxc)dst).deltaY();
}
if(src instanceof Hitboxc){
ddx -= ((Hitboxc)src).deltaX()/(Time.delta());
ddy -= ((Hitboxc)src).deltaY()/(Time.delta());
ddx -= ((Hitboxc)src).deltaX()/(Time.delta);
ddy -= ((Hitboxc)src).deltaY()/(Time.delta);
}
return intercept(src.getX(), src.getY(), dst.getX(), dst.getY(), ddx, ddy, v);
}
@@ -68,7 +68,7 @@ public class Predict{
* See {@link #intercept(float, float, float, float, float, float, float)}.
*/
public static Vec2 intercept(Hitboxc src, Hitboxc dst, float v){
return intercept(src.getX(), src.getY(), dst.getX(), dst.getY(), dst.deltaX() - src.deltaX()/(2f*Time.delta()), dst.deltaY() - src.deltaX()/(2f*Time.delta()), v);
return intercept(src.getX(), src.getY(), dst.getX(), dst.getY(), dst.deltaX() - src.deltaX()/(2f* Time.delta), dst.deltaY() - src.deltaX()/(2f* Time.delta), v);
}
private static Vec2 quad(float a, float b, float c){
+7 -2
View File
@@ -6,6 +6,7 @@ import mindustry.annotations.Annotations.*;
import mindustry.content.*;
import mindustry.game.*;
import mindustry.gen.*;
import mindustry.type.*;
import mindustry.world.*;
import static mindustry.Vars.*;
@@ -29,11 +30,15 @@ public class Units{
}
/** @return whether a new instance of a unit of this team can be created. */
public static boolean canCreate(Team team){
return teamIndex.count(team) < getCap(team);
public static boolean canCreate(Team team, UnitType type){
return teamIndex.countType(team, type) < getCap(team);
}
public static int getCap(Team team){
//wave team has no cap
if((team == state.rules.waveTeam && state.rules.waves) || (state.isCampaign() && team == state.rules.waveTeam)){
return Integer.MAX_VALUE;
}
return state.rules.unitCap + indexer.getExtraUnits(team);
}
@@ -50,7 +50,7 @@ public class ForceFieldAbility implements Ability{
@Override
public void update(Unit unit){
if(unit.shield < max){
unit.shield += Time.delta() * regen;
unit.shield += Time.delta * regen;
}
if(unit.shield > 0){
@@ -22,7 +22,7 @@ public class HealFieldAbility implements Ability{
@Override
public void update(Unit unit){
unit.timer1 += Time.delta();
unit.timer1 += Time.delta;
if(unit.timer1 >= reload){
wasHealed = false;
@@ -23,7 +23,7 @@ public class ShieldFieldAbility implements Ability{
@Override
public void update(Unit unit){
unit.timer1 += Time.delta();
unit.timer1 += Time.delta;
if(unit.timer1 >= reload){
applied = false;
@@ -24,7 +24,7 @@ public class StatusFieldAbility implements Ability{
@Override
public void update(Unit unit){
unit.timer2 += Time.delta();
unit.timer2 += Time.delta;
if(unit.timer2 >= reload){
@@ -196,7 +196,7 @@ public abstract class BulletType extends Content{
}
if(weaveMag > 0){
b.vel.rotate(Mathf.sin(Mathf.randomSeed(b.id, 10f) + b.time, weaveScale, weaveMag) * Time.delta());
b.vel.rotate(Mathf.sin(Mathf.randomSeed(b.id, 10f) + b.time, weaveScale, weaveMag) * Time.delta);
}
if(trailChance > 0){
@@ -241,7 +241,7 @@ public abstract class BulletType extends Content{
bullet.owner = owner;
bullet.team = team;
bullet.vel.trns(angle, speed * velocityScl);
bullet.set(x - bullet.vel.x * Time.delta(), y - bullet.vel.y * Time.delta());
bullet.set(x - bullet.vel.x * Time.delta, y - bullet.vel.y * Time.delta);
bullet.lifetime = lifetime * lifetimeScl;
bullet.data = data;
bullet.drag = drag;
@@ -114,9 +114,9 @@ abstract class BuilderComp implements Unitc{
BuildEntity entity = tile.bc();
if(current.breaking){
entity.deconstruct(base(), core, 1f / entity.buildCost * Time.delta() * type().buildSpeed * state.rules.buildSpeedMultiplier);
entity.deconstruct(base(), core, 1f / entity.buildCost * Time.delta * type().buildSpeed * state.rules.buildSpeedMultiplier);
}else{
if(entity.construct(base(), core, 1f / entity.buildCost * Time.delta() * type().buildSpeed * state.rules.buildSpeedMultiplier, current.hasConfig)){
if(entity.construct(base(), core, 1f / entity.buildCost * Time.delta * type().buildSpeed * state.rules.buildSpeedMultiplier, current.hasConfig)){
if(current.hasConfig){
Call.tileConfig(null, tile.build, current.config);
}
@@ -201,14 +201,14 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
}
public Building nearby(int dx, int dy){
return world.ent(tile.x + dx, tile.y + dy);
return world.build(tile.x + dx, tile.y + dy);
}
public Building nearby(int rotation){
if(rotation == 0) return world.ent(tile.x + 1, tile.y);
if(rotation == 1) return world.ent(tile.x, tile.y + 1);
if(rotation == 2) return world.ent(tile.x - 1, tile.y);
if(rotation == 3) return world.ent(tile.x, tile.y - 1);
if(rotation == 0) return world.build(tile.x + 1, tile.y);
if(rotation == 1) return world.build(tile.x, tile.y + 1);
if(rotation == 2) return world.build(tile.x - 1, tile.y);
if(rotation == 3) return world.build(tile.x, tile.y - 1);
return null;
}
@@ -290,7 +290,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
/** Scaled delta. */
public float delta(){
return Time.delta() * timeScale;
return Time.delta * timeScale;
}
/** Efficiency * delta. */
@@ -305,7 +305,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
/** Call when nothing is happening to the entity. This increments the internal sleep timer. */
public void sleep(){
sleepTime += Time.delta();
sleepTime += Time.delta;
if(!sleeping && sleepTime >= timeToSleep){
remove();
sleeping = true;
@@ -518,14 +518,14 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
Liquid other = next.liquids().current();
if((other.flammability > 0.3f && liquid.temperature > 0.7f) || (liquid.flammability > 0.3f && other.temperature > 0.7f)){
damage(1 * Time.delta());
next.damage(1 * Time.delta());
if(Mathf.chance(0.1 * Time.delta())){
damage(1 * Time.delta);
next.damage(1 * Time.delta);
if(Mathf.chance(0.1 * Time.delta)){
Fx.fire.at(fx, fy);
}
}else if((liquid.temperature > 0.7f && other.temperature < 0.55f) || (other.temperature > 0.7f && liquid.temperature < 0.55f)){
liquids.remove(liquid, Math.min(liquids.get(liquid), 0.7f * Time.delta()));
if(Mathf.chance(0.2f * Time.delta())){
liquids.remove(liquid, Math.min(liquids.get(liquid), 0.7f * Time.delta));
if(Mathf.chance(0.2f * Time.delta)){
Fx.steam.at(fx, fy);
}
}
@@ -539,6 +539,10 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
return base();
}
public @Nullable Payload getPayload(){
return null;
}
/** Tries to take the payload. Returns null if no payload is present. */
public @Nullable Payload takePayload(){
return null;
@@ -793,7 +797,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
int range = 10;
tempTiles.clear();
Geometry.circle(tileX(), tileY(), range, (x, y) -> {
Building other = world.ent(x, y);
Building other = world.build(x, y);
if(other != null && other.block instanceof PowerNode && ((PowerNode)other.block).linkValid(other, base()) && !PowerNode.insulated(other, base())
&& !other.proximity().contains(this.<Building>base()) &&
!(block.outputsPower && proximity.contains(p -> p.power() != null && p.power().graph == other.power().graph))){
@@ -922,60 +926,63 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
table.row();
table.table(bars -> {
bars.defaults().growX().height(18f).pad(4);
//only display everything else if the team is the same
if(team == player.team()){
table.table(bars -> {
bars.defaults().growX().height(18f).pad(4);
displayBars(bars);
}).growX();
table.row();
table.table(this::displayConsumption).growX();
displayBars(bars);
}).growX();
table.row();
table.table(this::displayConsumption).growX();
boolean displayFlow = (block.category == Category.distribution || block.category == Category.liquid) && Core.settings.getBool("flow");
boolean displayFlow = (block.category == Category.distribution || block.category == Category.liquid) && Core.settings.getBool("flow");
if(displayFlow){
String ps = " " + StatUnit.perSecond.localized();
if(displayFlow){
String ps = " " + StatUnit.perSecond.localized();
if(items != null){
table.row();
table.left();
table.table(l -> {
Bits current = new Bits();
if(items != null){
table.row();
table.left();
table.table(l -> {
Bits current = new Bits();
Runnable rebuild = () -> {
l.clearChildren();
Runnable rebuild = () -> {
l.clearChildren();
l.left();
for(Item item : content.items()){
if(items.hasFlowItem(item)){
l.image(item.icon(Cicon.small)).padRight(3f);
l.label(() -> items.getFlowRate(item) < 0 ? "..." : Strings.fixed(items.getFlowRate(item), 1) + ps).color(Color.lightGray);
l.row();
}
}
};
rebuild.run();
l.update(() -> {
for(Item item : content.items()){
if(items.hasFlowItem(item) && !current.get(item.id)){
current.set(item.id);
rebuild.run();
}
}
});
}).left();
}
if(liquids != null){
table.row();
table.table(l -> {
l.left();
for(Item item : content.items()){
if(items.hasFlowItem(item)){
l.image(item.icon(Cicon.small)).padRight(3f);
l.label(() -> items.getFlowRate(item) < 0 ? "..." : Strings.fixed(items.getFlowRate(item), 1) + ps).color(Color.lightGray);
l.row();
}
}
};
rebuild.run();
l.update(() -> {
for(Item item : content.items()){
if(items.hasFlowItem(item) && !current.get(item.id)){
current.set(item.id);
rebuild.run();
}
}
});
}).left();
l.image(() -> liquids.current().icon(Cicon.small)).padRight(3f);
l.label(() -> liquids.getFlowRate() < 0 ? "..." : Strings.fixed(liquids.getFlowRate(), 2) + ps).color(Color.lightGray);
}).left();
}
}
if(liquids != null){
table.row();
table.table(l -> {
l.left();
l.image(() -> liquids.current().icon(Cicon.small)).padRight(3f);
l.label(() -> liquids.getFlowRate() < 0 ? "..." : Strings.fixed(liquids.getFlowRate(), 2) + ps).color(Color.lightGray);
});
}
table.marginBottom(-5);
}
table.marginBottom(-5);
}
public void displayConsumption(Table table){
@@ -1061,7 +1068,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
Point2[] nearby = Edges.getEdges(block.size);
for(Point2 point : nearby){
Building other = world.ent(tile.x + point.x, tile.y + point.y);
Building other = world.build(tile.x + point.x, tile.y + point.y);
//remove this tile from all nearby tile's proximities
if(other != null){
tmpTiles.add(other);
@@ -1080,7 +1087,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
Point2[] nearby = Edges.getEdges(block.size);
for(Point2 point : nearby){
Building other = world.ent(tile.x + point.x, tile.y + point.y);
Building other = world.build(tile.x + point.x, tile.y + point.y);
if(other == null || !(other.tile.interactable(team))) continue;
@@ -1171,7 +1178,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
@Final
@Override
public void update(){
timeScaleDuration -= Time.delta();
timeScaleDuration -= Time.delta;
if(timeScaleDuration <= 0f || !block.canOverdrive){
timeScale = 1f;
}
@@ -111,7 +111,7 @@ abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Draw
if(type.collidesTiles && type.collides && type.collidesGround){
world.raycastEach(world.toTile(lastX()), world.toTile(lastY()), tileX(), tileY(), (x, y) -> {
Building tile = world.ent(x, y);
Building tile = world.build(x, y);
if(tile == null) return false;
if(tile.collide(base()) && type.collides(base(), tile) && !tile.dead() && (type.collidesTeam || tile.team != team)){
@@ -26,19 +26,19 @@ abstract class FireComp implements Timedc, Posc, Firec{
@Override
public void update(){
if(Mathf.chance(0.1 * Time.delta())){
if(Mathf.chance(0.1 * Time.delta)){
Fx.fire.at(x + Mathf.range(4f), y + Mathf.range(4f));
}
if(Mathf.chance(0.05 * Time.delta())){
if(Mathf.chance(0.05 * Time.delta)){
Fx.fireSmoke.at(x + Mathf.range(4f), y + Mathf.range(4f));
}
if(Mathf.chance(0.001 * Time.delta())){
if(Mathf.chance(0.001 * Time.delta)){
Sounds.fire.at(this);
}
time = Mathf.clamp(time + Time.delta(), 0, lifetime());
time = Mathf.clamp(time + Time.delta, 0, lifetime());
if(Vars.net.client()){
return;
@@ -55,7 +55,7 @@ abstract class FireComp implements Timedc, Posc, Firec{
float flammability = baseFlammability + puddleFlammability;
if(!damage && flammability <= 0){
time += Time.delta() * 8;
time += Time.delta * 8;
}
if(baseFlammability < 0 || block != tile.block()){
@@ -64,20 +64,20 @@ abstract class FireComp implements Timedc, Posc, Firec{
}
if(damage){
lifetime += Mathf.clamp(flammability / 8f, 0f, 0.6f) * Time.delta();
lifetime += Mathf.clamp(flammability / 8f, 0f, 0.6f) * Time.delta;
}
if(flammability > 1f && Mathf.chance(spreadChance * Time.delta() * Mathf.clamp(flammability / 5f, 0.3f, 2f))){
if(flammability > 1f && Mathf.chance(spreadChance * Time.delta * Mathf.clamp(flammability / 5f, 0.3f, 2f))){
Point2 p = Geometry.d4[Mathf.random(3)];
Tile other = world.tile(tile.x + p.x, tile.y + p.y);
Fires.create(other);
if(Mathf.chance(fireballChance * Time.delta() * Mathf.clamp(flammability / 10f))){
if(Mathf.chance(fireballChance * Time.delta * Mathf.clamp(flammability / 10f))){
Bullets.fireball.createNet(Team.derelict, x, y, Mathf.random(360f), -1f, 1, 1);
}
}
if(Mathf.chance(0.1 * Time.delta())){
if(Mathf.chance(0.1 * Time.delta)){
Puddlec p = Puddles.get(tile);
puddleFlammability = p != null ? p.getFlammability() / 3f : 0;
@@ -44,8 +44,8 @@ abstract class FlyingComp implements Posc, Velc, Healthc, Hitboxc{
}
void wobble(){
x += Mathf.sin(Time.time() + id() * 99, 25f, 0.05f) * Time.delta() * elevation;
y += Mathf.cos(Time.time() + id() * 99, 25f, 0.05f) * Time.delta() * elevation;
x += Mathf.sin(Time.time() + id() * 99, 25f, 0.05f) * Time.delta * elevation;
y += Mathf.cos(Time.time() + id() * 99, 25f, 0.05f) * Time.delta * elevation;
}
void moveAt(Vec2 vector, float acceleration){
@@ -81,7 +81,7 @@ abstract class FlyingComp implements Posc, Velc, Healthc, Hitboxc{
}
if(canDrown() && floor.isLiquid && floor.drownTime > 0){
drownTime += Time.delta() * 1f / floor.drownTime;
drownTime += Time.delta * 1f / floor.drownTime;
drownTime = Mathf.clamp(drownTime);
if(Mathf.chanceDelta(0.05f)){
floor.drownUpdateEffect.at(x, y, 1f, floor.mapColor);
@@ -24,7 +24,7 @@ abstract class HealthComp implements Entityc{
@Override
public void update(){
hitTime -= Time.delta() / hitDuration;
hitTime -= Time.delta / hitDuration;
}
void killed(){
@@ -82,11 +82,11 @@ abstract class HealthComp implements Entityc{
}
void damageContinuous(float amount){
damage(amount * Time.delta(), hitTime <= -10 + hitDuration);
damage(amount * Time.delta, hitTime <= -10 + hitDuration);
}
void damageContinuousPierce(float amount){
damagePierce(amount * Time.delta(), hitTime <= -20 + hitDuration);
damagePierce(amount * Time.delta, hitTime <= -20 + hitDuration);
}
void clampHealth(){
@@ -14,6 +14,6 @@ abstract class MechComp implements Posc, Flyingc, Hitboxc, Unitc, Mechc, Elevati
public void update(){
float len = deltaLen();
baseRotation = Angles.moveToward(baseRotation, deltaAngle(), type().baseRotateSpeed * Mathf.clamp(len / type().speed));
walkTime += Time.delta()*len;
walkTime += Time.delta *len;
}
}
@@ -58,7 +58,7 @@ abstract class MinerComp implements Itemsc, Posc, Teamc, Rotc, Drawc, Unitc{
}else{
Item item = mineTile.drop();
rotation(Mathf.slerpDelta(rotation(), angleTo(mineTile.worldx(), mineTile.worldy()), 0.4f));
mineTimer += Time.delta()*type.mineSpeed;
mineTimer += Time.delta *type.mineSpeed;
if(mineTimer >= 50f + item.hardness*10f){
mineTimer = 0;
@@ -76,7 +76,7 @@ abstract class MinerComp implements Itemsc, Posc, Teamc, Rotc, Drawc, Unitc{
}
}
if(Mathf.chance(0.06 * Time.delta())){
if(Mathf.chance(0.06 * Time.delta)){
Fx.pulverizeSmall.at(mineTile.worldx() + Mathf.range(tilesize / 2f), mineTile.worldy() + Mathf.range(tilesize / 2f), 0f, item.color);
}
}
@@ -12,7 +12,7 @@ import mindustry.world.blocks.payloads.*;
/** An entity that holds a payload. */
@Component
abstract class PayloadComp implements Posc, Rotc{
abstract class PayloadComp implements Posc, Rotc, Hitboxc{
@Import float x, y, rotation;
Seq<Payload> payloads = new Seq<>();
@@ -87,7 +87,7 @@ abstract class PayloadComp implements Posc, Rotc{
/** @return whether the tile has been successfully placed. */
boolean dropBlock(BlockPayload payload){
Building tile = payload.entity;
int tx = Vars.world.toTile(x - tile.block().offset()), ty = Vars.world.toTile(y - tile.block().offset());
int tx = Vars.world.toTile(x - tile.block().offset), ty = Vars.world.toTile(y - tile.block().offset);
Tile on = Vars.world.tile(tx, ty);
if(on != null && Build.validPlace(tile.block(), tile.team(), tx, ty, tile.rotation())){
int rot = (int)((rotation + 45f) / 90f) % 4;
@@ -119,7 +119,7 @@ abstract class PlayerComp implements UnitController, Entityc, Syncc, Timerc, Dra
}else if(core != null){
//have a small delay before death to prevent the camera from jumping around too quickly
//(this is not for balance)
deathTimer += Time.delta();
deathTimer += Time.delta;
if(deathTimer >= deathDelay){
//request spawn - this happens serverside only
core.requestSpawn(base());
@@ -127,7 +127,7 @@ abstract class PlayerComp implements UnitController, Entityc, Syncc, Timerc, Dra
}
}
textFadeTime -= Time.delta() / (60 * 5);
textFadeTime -= Time.delta / (60 * 5);
}
@@ -43,13 +43,13 @@ abstract class PuddleComp implements Posc, Puddlec, Drawc{
//update code
float addSpeed = accepting > 0 ? 3f : 0f;
amount -= Time.delta() * (1f - liquid.viscosity) / (5f + addSpeed);
amount -= Time.delta * (1f - liquid.viscosity) / (5f + addSpeed);
amount += accepting;
accepting = 0f;
if(amount >= maxLiquid / 1.5f && generation < maxGeneration){
float deposited = Math.min((amount - maxLiquid / 1.5f) / 4f, 0.3f) * Time.delta();
float deposited = Math.min((amount - maxLiquid / 1.5f) / 4f, 0.3f) * Time.delta;
for(Point2 point : Geometry.d4){
Tile other = world.tile(tile.x + point.x, tile.y + point.y);
if(other != null && other.block() == Blocks.air){
@@ -87,7 +87,7 @@ abstract class PuddleComp implements Posc, Puddlec, Drawc{
updateTime = 40f;
}
updateTime -= Time.delta();
updateTime -= Time.delta;
}
@Override
@@ -52,7 +52,7 @@ abstract class ShieldComp implements Healthc, Posc{
@Override
public void update(){
shieldAlpha -= Time.delta() / 15f;
shieldAlpha -= Time.delta / 15f;
if(shieldAlpha < 0) shieldAlpha = 0f;
}
}
@@ -117,7 +117,7 @@ abstract class StatusComp implements Posc, Flyingc{
while(index < statuses.size){
StatusEntry entry = statuses.get(index++);
entry.time = Math.max(entry.time - Time.delta(), 0);
entry.time = Math.max(entry.time - Time.delta, 0);
applied.set(entry.effect.id);
if(entry.time <= 0 && !entry.effect.permanent){
@@ -13,7 +13,7 @@ abstract class TimedComp implements Entityc, Scaled{
@MethodPriority(100)
@Override
public void update(){
time = Math.min(time + Time.delta(), lifetime);
time = Math.min(time + Time.delta, lifetime);
if(time >= lifetime){
remove();
+34 -8
View File
@@ -32,7 +32,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
private UnitController controller;
private UnitType type;
boolean spawnedByCore;
boolean spawnedByCore, deactivated;
transient float timer1, timer2;
@@ -103,7 +103,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
}
public void lookAt(float angle){
rotation = Angles.moveToward(rotation, angle, type.rotateSpeed * Time.delta());
rotation = Angles.moveToward(rotation, angle, type.rotateSpeed * Time.delta);
}
public void lookAt(Position pos){
@@ -118,6 +118,14 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
return controller instanceof AIController;
}
public int count(){
return teamIndex.countType(team, type);
}
public int cap(){
return Units.getCap(team);
}
private void setStats(UnitType type){
this.type = type;
this.maxHealth = type.health;
@@ -147,12 +155,19 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
@Override
public void add(){
teamIndex.updateCount(team, 1);
teamIndex.updateCount(team, type, 1);
//check if over unit cap
if(count() > cap() && !spawnedByCore){
deactivated = true;
}else{
teamIndex.updateActiveCount(team, type, 1);
}
}
@Override
public void remove(){
teamIndex.updateCount(team, -1);
teamIndex.updateCount(team, type, -1);
controller.removed(base());
}
@@ -167,7 +182,13 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
@Override
public void update(){
type.update(base());
//activate the unit when possible
if(!net.client() && deactivated && teamIndex.countActive(team, type) < Units.getCap(team)){
teamIndex.updateActiveCount(team, type, 1);
deactivated = false;
}
if(!deactivated) type.update(base());
drag = type.drag * (isGrounded() ? (floorOn().dragMultiplier) : 1f);
@@ -176,7 +197,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
float relativeSize = state.rules.dropZoneRadius + bounds()/2f + 1f;
for(Tile spawn : spawner.getSpawns()){
if(within(spawn.worldx(), spawn.worldy(), relativeSize)){
vel().add(Tmp.v1.set(this).sub(spawn.worldx(), spawn.worldy()).setLength(0.1f + 1f - dst(spawn) / relativeSize).scl(0.45f * Time.delta()));
vel().add(Tmp.v1.set(this).sub(spawn.worldx(), spawn.worldy()).setLength(0.1f + 1f - dst(spawn) / relativeSize).scl(0.45f * Time.delta));
}
}
}
@@ -204,7 +225,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
}
//move down
elevation -= type.fallSpeed * Time.delta();
elevation -= type.fallSpeed * Time.delta;
if(isGrounded()){
destroy();
@@ -227,10 +248,15 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
}
//AI only updates on the server
if(!net.client() && !dead){
if(!net.client() && !dead && !deactivated){
controller.updateUnit();
}
//do not control anything when deactivated
if(deactivated){
controlWeapons(false, false);
}
//remove units spawned by the core
if(spawnedByCore && !isPlayer()){
Call.unitDespawn(base());
@@ -17,8 +17,8 @@ abstract class VelComp implements Posc{
@MethodPriority(-1)
@Override
public void update(){
move(vel.x * Time.delta(), vel.y * Time.delta());
vel.scl(1f - drag * Time.delta());
move(vel.x * Time.delta, vel.y * Time.delta);
vel.scl(1f - drag * Time.delta);
}
boolean moving(){
@@ -42,7 +42,7 @@ abstract class WaterMoveComp implements Posc, Velc, Hitboxc, Flyingc, Unitc{
Floor floor = floorOn();
Color color = Tmp.c1.set(floor.mapColor).mul(1.5f);
trailColor.lerp(color, Mathf.clamp(Time.delta() * 0.04f));
trailColor.lerp(color, Mathf.clamp(Time.delta * 0.04f));
tleft.draw(trailColor, type.trailScl);
tright.draw(trailColor, type.trailScl);
@@ -26,7 +26,7 @@ abstract class WeaponsComp implements Teamc, Posc, Rotc{
@ReadOnly transient float range, aimX, aimY;
@ReadOnly transient boolean isRotate;
boolean isShooting;
int ammo;
float ammo;
void setWeaponRotation(float rotation){
for(WeaponMount mount : mounts){
@@ -47,6 +47,10 @@ abstract class WeaponsComp implements Teamc, Posc, Rotc{
}
}
void controlWeapons(boolean rotateShoot){
controlWeapons(rotateShoot, rotateShoot);
}
void controlWeapons(boolean rotate, boolean shoot){
for(WeaponMount mount : mounts){
mount.rotate = rotate;
@@ -82,11 +86,11 @@ abstract class WeaponsComp implements Teamc, Posc, Rotc{
public void update(){
for(WeaponMount mount : mounts){
Weapon weapon = mount.weapon;
mount.reload = Math.max(mount.reload - Time.delta() * reloadMultiplier, 0);
mount.reload = Math.max(mount.reload - Time.delta * reloadMultiplier, 0);
//flip weapon shoot side for alternating weapons at half reload
if(weapon.otherSide != -1 && weapon.alternate && mount.side == weapon.flipSprite &&
mount.reload + Time.delta() > weapon.reload/2f && mount.reload <= weapon.reload/2f){
mount.reload + Time.delta > weapon.reload/2f && mount.reload <= weapon.reload/2f){
mounts[weapon.otherSide].side = !mounts[weapon.otherSide].side;
mount.side = !mount.side;
}
@@ -97,7 +101,7 @@ abstract class WeaponsComp implements Teamc, Posc, Rotc{
axisY = this.y + Angles.trnsy(rotation - 90, weapon.x, weapon.y);
mount.targetRotation = Angles.angle(axisX, axisY, mount.aimX, mount.aimY) - rotation;
mount.rotation = Angles.moveToward(mount.rotation, mount.targetRotation, weapon.rotateSpeed * Time.delta());
mount.rotation = Angles.moveToward(mount.rotation, mount.targetRotation, weapon.rotateSpeed * Time.delta);
}else{
mount.rotation = 0;
mount.targetRotation = angleTo(mount.aimX, mount.aimY);
@@ -117,11 +117,11 @@ public class BuildPlan{
}
public float drawx(){
return x*tilesize + block.offset();
return x*tilesize + block.offset;
}
public float drawy(){
return y*tilesize + block.offset();
return y*tilesize + block.offset;
}
public BuildPlan configure(Object config){
+1 -1
View File
@@ -86,7 +86,7 @@ public class Saves{
}
if(state.isGame() && !state.gameOver && current != null && current.isAutosave() && !state.rules.tutorial){
time += Time.delta();
time += Time.delta;
if(time > Core.settings.getInt("saveinterval") * 60){
saving = true;
+5 -5
View File
@@ -345,7 +345,7 @@ public class Schematics implements Loadable{
boolean found = false;
for(int cx = x; cx <= x2; cx++){
for(int cy = y; cy <= y2; cy++){
Building linked = world.ent(cx, cy);
Building linked = world.build(cx, cy);
if(linked != null &&linked.block().isVisible() && !(linked.block() instanceof BuildBlock)){
int top = linked.block().size/2;
@@ -373,7 +373,7 @@ public class Schematics implements Loadable{
IntSet counted = new IntSet();
for(int cx = ox; cx <= ox2; cx++){
for(int cy = oy; cy <= oy2; cy++){
Building tile = world.ent(cx, cy);
Building tile = world.build(cx, cy);
if(tile != null && !counted.contains(tile.pos()) && !(tile.block() instanceof BuildBlock)
&& (tile.block().isVisible() || (tile.block() instanceof CoreBlock))){
@@ -601,7 +601,7 @@ public class Schematics implements Loadable{
});
//rotate actual request, centered on its multiblock position
float wx = (req.x - ox) * tilesize + req.block.offset(), wy = (req.y - oy) * tilesize + req.block.offset();
float wx = (req.x - ox) * tilesize + req.block.offset, wy = (req.y - oy) * tilesize + req.block.offset;
float x = wx;
if(direction >= 0){
wx = -wy;
@@ -610,8 +610,8 @@ public class Schematics implements Loadable{
wx = wy;
wy = -x;
}
req.x = (short)(world.toTile(wx - req.block.offset()) + ox);
req.y = (short)(world.toTile(wy - req.block.offset()) + oy);
req.x = (short)(world.toTile(wx - req.block.offset) + ox);
req.y = (short)(world.toTile(wy - req.block.offset) + oy);
req.rotation = (byte)Mathf.mod(req.rotation + direction, 4);
});

Some files were not shown because too many files have changed in this diff Show More