diff --git a/annotations/src/main/resources/revisions/alpha/1.json b/annotations/src/main/resources/revisions/alpha/1.json new file mode 100644 index 0000000000..e7ed56e236 --- /dev/null +++ b/annotations/src/main/resources/revisions/alpha/1.json @@ -0,0 +1 @@ +{version:1,fields:[{name:ammo,type:float},{name:armor,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},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:x,type:float},{name:y,type:float}]} \ No newline at end of file diff --git a/annotations/src/main/resources/revisions/arkyid/1.json b/annotations/src/main/resources/revisions/arkyid/1.json new file mode 100644 index 0000000000..e7ed56e236 --- /dev/null +++ b/annotations/src/main/resources/revisions/arkyid/1.json @@ -0,0 +1 @@ +{version:1,fields:[{name:ammo,type:float},{name:armor,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},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:x,type:float},{name:y,type:float}]} \ No newline at end of file diff --git a/annotations/src/main/resources/revisions/beta/1.json b/annotations/src/main/resources/revisions/beta/1.json new file mode 100644 index 0000000000..e7ed56e236 --- /dev/null +++ b/annotations/src/main/resources/revisions/beta/1.json @@ -0,0 +1 @@ +{version:1,fields:[{name:ammo,type:float},{name:armor,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},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:x,type:float},{name:y,type:float}]} \ No newline at end of file diff --git a/annotations/src/main/resources/revisions/block/5.json b/annotations/src/main/resources/revisions/block/5.json new file mode 100644 index 0000000000..87765783cc --- /dev/null +++ b/annotations/src/main/resources/revisions/block/5.json @@ -0,0 +1 @@ +{version:5,fields:[{name:ammo,type:float},{name:armor,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},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:x,type:float},{name:y,type:float}]} \ No newline at end of file diff --git a/annotations/src/main/resources/revisions/corvus/5.json b/annotations/src/main/resources/revisions/corvus/5.json new file mode 100644 index 0000000000..87765783cc --- /dev/null +++ b/annotations/src/main/resources/revisions/corvus/5.json @@ -0,0 +1 @@ +{version:5,fields:[{name:ammo,type:float},{name:armor,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},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:x,type:float},{name:y,type:float}]} \ No newline at end of file diff --git a/annotations/src/main/resources/revisions/flare/5.json b/annotations/src/main/resources/revisions/flare/5.json new file mode 100644 index 0000000000..87765783cc --- /dev/null +++ b/annotations/src/main/resources/revisions/flare/5.json @@ -0,0 +1 @@ +{version:5,fields:[{name:ammo,type:float},{name:armor,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},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:x,type:float},{name:y,type:float}]} \ No newline at end of file diff --git a/annotations/src/main/resources/revisions/gamma/1.json b/annotations/src/main/resources/revisions/gamma/1.json new file mode 100644 index 0000000000..e7ed56e236 --- /dev/null +++ b/annotations/src/main/resources/revisions/gamma/1.json @@ -0,0 +1 @@ +{version:1,fields:[{name:ammo,type:float},{name:armor,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},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:x,type:float},{name:y,type:float}]} \ No newline at end of file diff --git a/annotations/src/main/resources/revisions/mace/5.json b/annotations/src/main/resources/revisions/mace/5.json new file mode 100644 index 0000000000..cbd09b982e --- /dev/null +++ b/annotations/src/main/resources/revisions/mace/5.json @@ -0,0 +1 @@ +{version:5,fields:[{name:ammo,type:float},{name:armor,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},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:x,type:float},{name:y,type:float}]} \ No newline at end of file diff --git a/annotations/src/main/resources/revisions/mega/3.json b/annotations/src/main/resources/revisions/mega/3.json new file mode 100644 index 0000000000..fc79341e16 --- /dev/null +++ b/annotations/src/main/resources/revisions/mega/3.json @@ -0,0 +1 @@ +{version:3,fields:[{name:ammo,type:float},{name:armor,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},{name:plans,type:arc.struct.Queue},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:x,type:float},{name:y,type:float}]} \ No newline at end of file diff --git a/annotations/src/main/resources/revisions/mono/4.json b/annotations/src/main/resources/revisions/mono/4.json new file mode 100644 index 0000000000..e66b1e3078 --- /dev/null +++ b/annotations/src/main/resources/revisions/mono/4.json @@ -0,0 +1 @@ +{version:4,fields:[{name:ammo,type:float},{name:armor,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},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:x,type:float},{name:y,type:float}]} \ No newline at end of file diff --git a/annotations/src/main/resources/revisions/nova/3.json b/annotations/src/main/resources/revisions/nova/3.json new file mode 100644 index 0000000000..0436c073b4 --- /dev/null +++ b/annotations/src/main/resources/revisions/nova/3.json @@ -0,0 +1 @@ +{version:3,fields:[{name:ammo,type:float},{name:armor,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},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:x,type:float},{name:y,type:float}]} \ No newline at end of file diff --git a/annotations/src/main/resources/revisions/oct/3.json b/annotations/src/main/resources/revisions/oct/3.json new file mode 100644 index 0000000000..fc79341e16 --- /dev/null +++ b/annotations/src/main/resources/revisions/oct/3.json @@ -0,0 +1 @@ +{version:3,fields:[{name:ammo,type:float},{name:armor,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},{name:plans,type:arc.struct.Queue},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:x,type:float},{name:y,type:float}]} \ No newline at end of file diff --git a/annotations/src/main/resources/revisions/poly/3.json b/annotations/src/main/resources/revisions/poly/3.json new file mode 100644 index 0000000000..d5d7a806b3 --- /dev/null +++ b/annotations/src/main/resources/revisions/poly/3.json @@ -0,0 +1 @@ +{version:3,fields:[{name:ammo,type:float},{name:armor,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},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:x,type:float},{name:y,type:float}]} \ No newline at end of file diff --git a/annotations/src/main/resources/revisions/pulsar/1.json b/annotations/src/main/resources/revisions/pulsar/1.json new file mode 100644 index 0000000000..149ab0822e --- /dev/null +++ b/annotations/src/main/resources/revisions/pulsar/1.json @@ -0,0 +1 @@ +{version:1,fields:[{name:ammo,type:float},{name:armor,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},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:x,type:float},{name:y,type:float}]} \ No newline at end of file diff --git a/annotations/src/main/resources/revisions/quad/4.json b/annotations/src/main/resources/revisions/quad/4.json new file mode 100644 index 0000000000..a5a5d90d5f --- /dev/null +++ b/annotations/src/main/resources/revisions/quad/4.json @@ -0,0 +1 @@ +{version:4,fields:[{name:ammo,type:float},{name:armor,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},{name:plans,type:arc.struct.Queue},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:x,type:float},{name:y,type:float}]} \ No newline at end of file diff --git a/annotations/src/main/resources/revisions/quasar/1.json b/annotations/src/main/resources/revisions/quasar/1.json new file mode 100644 index 0000000000..149ab0822e --- /dev/null +++ b/annotations/src/main/resources/revisions/quasar/1.json @@ -0,0 +1 @@ +{version:1,fields:[{name:ammo,type:float},{name:armor,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},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:x,type:float},{name:y,type:float}]} \ No newline at end of file diff --git a/annotations/src/main/resources/revisions/risso/5.json b/annotations/src/main/resources/revisions/risso/5.json new file mode 100644 index 0000000000..87765783cc --- /dev/null +++ b/annotations/src/main/resources/revisions/risso/5.json @@ -0,0 +1 @@ +{version:5,fields:[{name:ammo,type:float},{name:armor,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},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:x,type:float},{name:y,type:float}]} \ No newline at end of file diff --git a/annotations/src/main/resources/revisions/spiroct/4.json b/annotations/src/main/resources/revisions/spiroct/4.json new file mode 100644 index 0000000000..e66b1e3078 --- /dev/null +++ b/annotations/src/main/resources/revisions/spiroct/4.json @@ -0,0 +1 @@ +{version:4,fields:[{name:ammo,type:float},{name:armor,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},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:x,type:float},{name:y,type:float}]} \ No newline at end of file diff --git a/annotations/src/main/resources/revisions/toxopid/1.json b/annotations/src/main/resources/revisions/toxopid/1.json new file mode 100644 index 0000000000..e7ed56e236 --- /dev/null +++ b/annotations/src/main/resources/revisions/toxopid/1.json @@ -0,0 +1 @@ +{version:1,fields:[{name:ammo,type:float},{name:armor,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},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:x,type:float},{name:y,type:float}]} \ No newline at end of file diff --git a/core/assets-raw/sprites/blocks/drills/drill-top.png b/core/assets-raw/sprites/blocks/drills/drill-item-2.png similarity index 100% rename from core/assets-raw/sprites/blocks/drills/drill-top.png rename to core/assets-raw/sprites/blocks/drills/drill-item-2.png diff --git a/core/assets-raw/sprites/blocks/drills/drill-item-3.png b/core/assets-raw/sprites/blocks/drills/drill-item-3.png new file mode 100644 index 0000000000..ed716408b2 Binary files /dev/null and b/core/assets-raw/sprites/blocks/drills/drill-item-3.png differ diff --git a/core/assets-raw/sprites/blocks/drills/drill-item-4.png b/core/assets-raw/sprites/blocks/drills/drill-item-4.png new file mode 100644 index 0000000000..a18efb5dd4 Binary files /dev/null and b/core/assets-raw/sprites/blocks/drills/drill-item-4.png differ diff --git a/core/assets-raw/sprites/blocks/units/factory-in-3.png b/core/assets-raw/sprites/blocks/units/factory-in-3.png index 625be61764..7944814739 100644 Binary files a/core/assets-raw/sprites/blocks/units/factory-in-3.png and b/core/assets-raw/sprites/blocks/units/factory-in-3.png differ diff --git a/core/assets-raw/sprites/blocks/units/factory-in-5.png b/core/assets-raw/sprites/blocks/units/factory-in-5.png index f158423ff6..ccb7fbc5a3 100644 Binary files a/core/assets-raw/sprites/blocks/units/factory-in-5.png and b/core/assets-raw/sprites/blocks/units/factory-in-5.png differ diff --git a/core/assets-raw/sprites/blocks/units/factory-in-7.png b/core/assets-raw/sprites/blocks/units/factory-in-7.png index 39477c61cd..1861a46c35 100644 Binary files a/core/assets-raw/sprites/blocks/units/factory-in-7.png and b/core/assets-raw/sprites/blocks/units/factory-in-7.png differ diff --git a/core/assets-raw/sprites/blocks/units/factory-in-9.png b/core/assets-raw/sprites/blocks/units/factory-in-9.png index 6a3b324f1b..acf736c8dd 100644 Binary files a/core/assets-raw/sprites/blocks/units/factory-in-9.png and b/core/assets-raw/sprites/blocks/units/factory-in-9.png differ diff --git a/core/assets-raw/sprites/blocks/walls/scrap-wall-gigantic.png b/core/assets-raw/sprites/blocks/walls/scrap-wall-gigantic.png index a5ed4a3117..18bc9504f9 100644 Binary files a/core/assets-raw/sprites/blocks/walls/scrap-wall-gigantic.png and b/core/assets-raw/sprites/blocks/walls/scrap-wall-gigantic.png differ diff --git a/core/assets-raw/sprites/blocks/walls/scrap-wall-huge1.png b/core/assets-raw/sprites/blocks/walls/scrap-wall-huge1.png index 4a23912802..fff20289a7 100644 Binary files a/core/assets-raw/sprites/blocks/walls/scrap-wall-huge1.png and b/core/assets-raw/sprites/blocks/walls/scrap-wall-huge1.png differ diff --git a/core/assets-raw/sprites/blocks/walls/scrap-wall-huge2.png b/core/assets-raw/sprites/blocks/walls/scrap-wall-huge2.png index aa87272b1c..b3a4c16814 100644 Binary files a/core/assets-raw/sprites/blocks/walls/scrap-wall-huge2.png and b/core/assets-raw/sprites/blocks/walls/scrap-wall-huge2.png differ diff --git a/core/assets-raw/sprites/blocks/walls/scrap-wall-huge3.png b/core/assets-raw/sprites/blocks/walls/scrap-wall-huge3.png index 04f1382d4d..9c323a3b95 100644 Binary files a/core/assets-raw/sprites/blocks/walls/scrap-wall-huge3.png and b/core/assets-raw/sprites/blocks/walls/scrap-wall-huge3.png differ diff --git a/core/assets-raw/sprites/blocks/walls/scrap-wall-large1.png b/core/assets-raw/sprites/blocks/walls/scrap-wall-large1.png index 6f5b66a672..289f3ad410 100644 Binary files a/core/assets-raw/sprites/blocks/walls/scrap-wall-large1.png and b/core/assets-raw/sprites/blocks/walls/scrap-wall-large1.png differ diff --git a/core/assets-raw/sprites/blocks/walls/scrap-wall-large2.png b/core/assets-raw/sprites/blocks/walls/scrap-wall-large2.png index d271f8e16a..5785da4328 100644 Binary files a/core/assets-raw/sprites/blocks/walls/scrap-wall-large2.png and b/core/assets-raw/sprites/blocks/walls/scrap-wall-large2.png differ diff --git a/core/assets-raw/sprites/blocks/walls/scrap-wall-large3.png b/core/assets-raw/sprites/blocks/walls/scrap-wall-large3.png index 89bdcffae7..ef8b6e12cc 100644 Binary files a/core/assets-raw/sprites/blocks/walls/scrap-wall-large3.png and b/core/assets-raw/sprites/blocks/walls/scrap-wall-large3.png differ diff --git a/core/assets-raw/sprites/blocks/walls/scrap-wall-large4.png b/core/assets-raw/sprites/blocks/walls/scrap-wall-large4.png index ef76eb0c51..b437560aeb 100644 Binary files a/core/assets-raw/sprites/blocks/walls/scrap-wall-large4.png and b/core/assets-raw/sprites/blocks/walls/scrap-wall-large4.png differ diff --git a/core/assets-raw/sprites/blocks/walls/scrap-wall1.png b/core/assets-raw/sprites/blocks/walls/scrap-wall1.png index b0be0f2747..9b12ddf8d9 100644 Binary files a/core/assets-raw/sprites/blocks/walls/scrap-wall1.png and b/core/assets-raw/sprites/blocks/walls/scrap-wall1.png differ diff --git a/core/assets-raw/sprites/blocks/walls/scrap-wall2.png b/core/assets-raw/sprites/blocks/walls/scrap-wall2.png index 078bd13aa2..8869a48f20 100644 Binary files a/core/assets-raw/sprites/blocks/walls/scrap-wall2.png and b/core/assets-raw/sprites/blocks/walls/scrap-wall2.png differ diff --git a/core/assets-raw/sprites/blocks/walls/scrap-wall3.png b/core/assets-raw/sprites/blocks/walls/scrap-wall3.png index de2e17d6f2..16dc56390a 100644 Binary files a/core/assets-raw/sprites/blocks/walls/scrap-wall3.png and b/core/assets-raw/sprites/blocks/walls/scrap-wall3.png differ diff --git a/core/assets-raw/sprites/blocks/walls/scrap-wall4.png b/core/assets-raw/sprites/blocks/walls/scrap-wall4.png index 0cd3df9ca4..c67a5055b4 100644 Binary files a/core/assets-raw/sprites/blocks/walls/scrap-wall4.png and b/core/assets-raw/sprites/blocks/walls/scrap-wall4.png differ diff --git a/core/assets-raw/sprites/blocks/walls/scrap-wall5.png b/core/assets-raw/sprites/blocks/walls/scrap-wall5.png index 0cd3df9ca4..ac533dc4d6 100644 Binary files a/core/assets-raw/sprites/blocks/walls/scrap-wall5.png and b/core/assets-raw/sprites/blocks/walls/scrap-wall5.png differ diff --git a/core/assets-raw/sprites/blocks/walls/thruster-top.png b/core/assets-raw/sprites/blocks/walls/thruster-top.png new file mode 100644 index 0000000000..0a6bf7f616 Binary files /dev/null and b/core/assets-raw/sprites/blocks/walls/thruster-top.png differ diff --git a/core/assets-raw/sprites/blocks/walls/thruster.png b/core/assets-raw/sprites/blocks/walls/thruster.png index 0725cc31b2..90be6bbc53 100644 Binary files a/core/assets-raw/sprites/blocks/walls/thruster.png and b/core/assets-raw/sprites/blocks/walls/thruster.png differ diff --git a/core/assets/baseparts/1603222912251.msch b/core/assets/baseparts/1603222912251.msch index 6b33abac34..f9c5e5f55d 100644 Binary files a/core/assets/baseparts/1603222912251.msch and b/core/assets/baseparts/1603222912251.msch differ diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index c73764184b..9362508c01 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -705,6 +705,7 @@ stat.commandlimit = Command Limit stat.abilities = Abilities stat.canboost = Can Boost stat.flying = Flying +stat.ammouse = Ammo Use ability.forcefield = Force Field ability.repairfield = Repair Field @@ -727,7 +728,6 @@ bar.powerlines = Connections: {0}/{1} bar.items = Items: {0} bar.capacity = Capacity: {0} 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 @@ -744,6 +744,7 @@ bullet.sapping = [stat]sapping bullet.homing = [stat]homing bullet.shock = [stat]shock bullet.frag = [stat]frag +bullet.buildingdamage = [stat]{0}%[lightgray] building damage bullet.knockback = [stat]{0}[lightgray] knockback bullet.pierce = [stat]{0}[lightgray]x pierce bullet.infinitepierce = [stat]pierce @@ -772,6 +773,7 @@ unit.items = items unit.thousands = k unit.millions = mil unit.billions = b +unit.pershot = /shot category.purpose = Purpose category.general = General category.power = Power @@ -841,6 +843,7 @@ setting.bridgeopacity.name = Bridge Opacity setting.playerchat.name = Display Player Bubble Chat setting.showweather.name = Show Weather Graphics public.confirm = Do you want to make your game public?\n[accent]Anyone will be able to join your games.\n[lightgray]This can be changed later in Settings->Game->Public Game Visibility. +public.confirm.really = If you want to play with friends, use [green]Invite Friend[] instead of a [scarlet]Public server[]!\nAre you sure you want to make your game [scarlet]public[]? public.beta = Note that beta versions of the game cannot make public lobbies. uiscale.reset = UI scale has been changed.\nPress "OK" to confirm this scale.\n[scarlet]Reverting and exiting in[accent] {0}[] seconds... uiscale.cancel = Cancel & Exit @@ -963,6 +966,7 @@ rules.explosions = Block/Unit Explosion Damage rules.ambientlight = Ambient Light rules.weather = Weather rules.weather.frequency = Frequency: +rules.weather.always = Always rules.weather.duration = Duration: content.item.name = Items @@ -1168,7 +1172,7 @@ block.item-void.name = Item Void block.liquid-source.name = Liquid Source block.liquid-void.name = Liquid Void block.power-void.name = Power Void -block.power-source.name = Power Infinite +block.power-source.name = Power Source block.unloader.name = Unloader block.vault.name = Vault block.wave.name = Wave diff --git a/core/assets/contributors b/core/assets/contributors index 61b6bc135b..85449e6c45 100644 --- a/core/assets/contributors +++ b/core/assets/contributors @@ -7,7 +7,7 @@ Baltazár Radics Dexapnow Milinai 키에르 -Luxray5474 +skybldev Leone25 Gureumi VizardAlpha diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index 2b71c75aed..7bc2e18679 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -876,7 +876,7 @@ public class Blocks implements ContentList{ size = 4; }}; - thruster = new Wall("thruster"){{ + thruster = new Thruster("thruster"){{ health = 55 * 16 * wallHealthMultiplier; size = 4; }}; @@ -989,9 +989,9 @@ public class Blocks implements ContentList{ }}; itemBridge = new BufferedItemBridge("bridge-conveyor"){{ - requirements(Category.distribution, with(Items.lead, 4, Items.copper, 4)); + requirements(Category.distribution, with(Items.lead, 6, Items.copper, 6)); range = 4; - speed = 70f; + speed = 74f; bufferCapacity = 14; }}; @@ -1265,7 +1265,7 @@ public class Blocks implements ContentList{ tier = 2; drillTime = 600; size = 2; - drawMineItem = true; + consumes.liquid(Liquids.water, 0.05f).boost(); }}; @@ -1274,7 +1274,7 @@ public class Blocks implements ContentList{ tier = 3; drillTime = 400; size = 2; - drawMineItem = true; + consumes.liquid(Liquids.water, 0.06f).boost(); }}; @@ -1763,7 +1763,7 @@ public class Blocks implements ContentList{ despawnEffect = Fx.instBomb; trailSpacing = 20f; damage = 1350; - tileDamageMultiplier = 0.3f; + buildingDamageMultiplier = 0.3f; speed = brange; hitShake = 6f; ammoMultiplier = 1f; @@ -1992,6 +1992,7 @@ public class Blocks implements ContentList{ powerSource = new PowerSource("power-source"){{ requirements(Category.power, BuildVisibility.sandboxOnly, with()); + powerProduction = 10000f / 60f; alwaysUnlocked = true; }}; diff --git a/core/src/mindustry/content/Bullets.java b/core/src/mindustry/content/Bullets.java index 30fc1bfe79..dbed9cc7ac 100644 --- a/core/src/mindustry/content/Bullets.java +++ b/core/src/mindustry/content/Bullets.java @@ -465,6 +465,7 @@ public class Bullets implements ContentList{ speed = 4f; knockback = 1.7f; puddleSize = 8f; + orbSize = 4f; drag = 0.001f; ammoMultiplier = 0.4f; statusDuration = 60f * 4f; @@ -476,6 +477,7 @@ public class Bullets implements ContentList{ speed = 4f; knockback = 1.3f; puddleSize = 8f; + orbSize = 4f; drag = 0.001f; ammoMultiplier = 0.4f; statusDuration = 60f * 4f; @@ -487,6 +489,7 @@ public class Bullets implements ContentList{ speed = 4f; knockback = 1.3f; puddleSize = 8f; + orbSize = 4f; damage = 4.75f; drag = 0.001f; ammoMultiplier = 0.4f; @@ -498,6 +501,7 @@ public class Bullets implements ContentList{ speed = 4f; knockback = 1.3f; puddleSize = 8f; + orbSize = 4f; drag = 0.001f; ammoMultiplier = 0.4f; statusDuration = 60f * 4f; diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index 3707aaf7f7..c0d48c1723 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -182,7 +182,7 @@ public class UnitTypes implements ContentList{ lightningLength = 6; lightningColor = Pal.surge; //standard bullet damage is far too much for lightning - lightningDamage = 30; + lightningDamage = 20; }}; }}, @@ -336,7 +336,7 @@ public class UnitTypes implements ContentList{ bullet = new LightningBulletType(){{ lightningColor = hitColor = Pal.heal; - damage = 15f; + damage = 12f; lightningLength = 7; lightningLengthRand = 7; shootEffect = Fx.shootHeal; @@ -1759,7 +1759,7 @@ public class UnitTypes implements ContentList{ lifetime = 60f; shootEffect = Fx.shootSmall; smokeEffect = Fx.shootSmallSmoke; - tileDamageMultiplier = 0.01f; + buildingDamageMultiplier = 0.01f; }}; }}); }}; @@ -1801,7 +1801,7 @@ public class UnitTypes implements ContentList{ lifetime = 60f; shootEffect = Fx.shootSmall; smokeEffect = Fx.shootSmallSmoke; - tileDamageMultiplier = 0.01f; + buildingDamageMultiplier = 0.01f; }}; }}); }}; @@ -1841,7 +1841,7 @@ public class UnitTypes implements ContentList{ lifetime = 70f; shootEffect = Fx.shootSmall; smokeEffect = Fx.shootSmallSmoke; - tileDamageMultiplier = 0.01f; + buildingDamageMultiplier = 0.01f; homingPower = 0.04f; }}; }}); diff --git a/core/src/mindustry/core/Control.java b/core/src/mindustry/core/Control.java index f4f3dc75df..8dd487034b 100644 --- a/core/src/mindustry/core/Control.java +++ b/core/src/mindustry/core/Control.java @@ -351,7 +351,7 @@ public class Control implements ApplicationListener, Loadable{ if(tile != null){ tile.setBlock(content.block(plan.block), state.rules.waveTeam, plan.rotation); if(plan.config != null && tile.build != null){ - tile.build.configure(plan.config); + tile.build.configureAny(plan.config); } } } diff --git a/core/src/mindustry/core/Logic.java b/core/src/mindustry/core/Logic.java index bb91fc824e..5b7349e78e 100644 --- a/core/src/mindustry/core/Logic.java +++ b/core/src/mindustry/core/Logic.java @@ -258,13 +258,12 @@ public class Logic implements ApplicationListener{ state.rules.weather.removeAll(w -> w.weather == null); for(WeatherEntry entry : state.rules.weather){ - if(entry.weather == null) continue; //update cooldown entry.cooldown -= Time.delta; //create new event when not active - if(entry.cooldown < 0 && !entry.weather.isActive()){ - float duration = Mathf.random(entry.minDuration, entry.maxDuration); + if((entry.cooldown < 0 || entry.always) && !entry.weather.isActive()){ + float duration = entry.always ? Float.POSITIVE_INFINITY : Mathf.random(entry.minDuration, entry.maxDuration); entry.cooldown = duration + Mathf.random(entry.minFrequency, entry.maxFrequency); Tmp.v1.setToRandomDirection(); Call.createWeather(entry.weather, entry.intensity, duration, Tmp.v1.x, Tmp.v1.y); diff --git a/core/src/mindustry/editor/MapEditorDialog.java b/core/src/mindustry/editor/MapEditorDialog.java index 91927a0630..e73442497d 100644 --- a/core/src/mindustry/editor/MapEditorDialog.java +++ b/core/src/mindustry/editor/MapEditorDialog.java @@ -700,6 +700,8 @@ public class MapEditorDialog extends Dialog implements Disposable{ if(core != 0) return core; int synth = Boolean.compare(b1.synthetic(), b2.synthetic()); if(synth != 0) return synth; + int editorVis = Boolean.compare(b1.buildVisibility == BuildVisibility.editorOnly, b2.buildVisibility == BuildVisibility.editorOnly); + if(editorVis != 0) return editorVis; int ore = Boolean.compare(b1 instanceof OverlayFloor, b2 instanceof OverlayFloor); if(ore != 0) return ore; return Integer.compare(b1.id, b2.id); diff --git a/core/src/mindustry/entities/Damage.java b/core/src/mindustry/entities/Damage.java index 8e0eba7b58..9ddca6e986 100644 --- a/core/src/mindustry/entities/Damage.java +++ b/core/src/mindustry/entities/Damage.java @@ -126,6 +126,8 @@ public class Damage{ boolean collide = tile != null && collidedBlocks.add(tile.pos()); if(hitter.damage > 0){ + float health = !collide ? 0 : tile.health; + if(collide && tile.team != team && tile.collide(hitter)){ tile.collision(hitter); hitter.type.hit(hitter, tile.x, tile.y); @@ -133,7 +135,7 @@ public class Damage{ //try to heal the tile if(collide && hitter.type.testCollision(hitter, tile)){ - hitter.type.hitTile(hitter, tile, tile.health, false); + hitter.type.hitTile(hitter, tile, health, false); } } }; @@ -389,9 +391,9 @@ public class Damage{ if(scaledDamage <= 0 || tile == null) continue; //apply damage to entity if needed - if(tile.build != null && tile.team() != team){ - int health = (int)tile.build.health(); - if(tile.build.health() > 0){ + if(tile.build != null && tile.build.team != team){ + int health = (int)(tile.build.health / (tile.block().size * tile.block().size)); + if(tile.build.health > 0){ tile.build.damage(scaledDamage); scaledDamage -= health; diff --git a/core/src/mindustry/entities/bullet/BulletType.java b/core/src/mindustry/entities/bullet/BulletType.java index f0f682b8e0..73e0fb93ba 100644 --- a/core/src/mindustry/entities/bullet/BulletType.java +++ b/core/src/mindustry/entities/bullet/BulletType.java @@ -41,7 +41,7 @@ public abstract class BulletType extends Content{ /** Multiplied by turret reload speed to get final shoot speed. */ public float reloadMultiplier = 1f; /** Multiplier of how much base damage is done to tiles. */ - public float tileDamageMultiplier = 1f; + public float buildingDamageMultiplier = 1f; /** Recoil from shooter entities. */ public float recoil; /** Whether to kill the shooter when this is shot. For suicide bombers. */ diff --git a/core/src/mindustry/entities/bullet/LiquidBulletType.java b/core/src/mindustry/entities/bullet/LiquidBulletType.java index 5da33f95e0..e99b7afefc 100644 --- a/core/src/mindustry/entities/bullet/LiquidBulletType.java +++ b/core/src/mindustry/entities/bullet/LiquidBulletType.java @@ -15,6 +15,7 @@ import static mindustry.Vars.*; public class LiquidBulletType extends BulletType{ public Liquid liquid; public float puddleSize = 6f; + public float orbSize = 3f; public LiquidBulletType(@Nullable Liquid liquid){ super(3.5f, 0); @@ -64,7 +65,7 @@ public class LiquidBulletType extends BulletType{ public void draw(Bullet b){ Draw.color(liquid.color, Color.white, b.fout() / 100f); - Fill.circle(b.x, b.y, puddleSize / 2); + Fill.circle(b.x, b.y, orbSize); } @Override diff --git a/core/src/mindustry/entities/bullet/RailBulletType.java b/core/src/mindustry/entities/bullet/RailBulletType.java index dfc6f8d0ae..4ddc6e36c7 100644 --- a/core/src/mindustry/entities/bullet/RailBulletType.java +++ b/core/src/mindustry/entities/bullet/RailBulletType.java @@ -6,12 +6,6 @@ import mindustry.content.*; import mindustry.entities.*; import mindustry.gen.*; -//TODO this class is bad for multiple reasons, remove/replace it. -//- effects unreliable -//- not really hitscan but works like it -//- buggy trails -//- looks bad -//- generally unreliable public class RailBulletType extends BulletType{ public Effect pierceEffect = Fx.hitBulletSmall, updateEffect = Fx.none; /** Multiplier of damage decreased per health pierced. */ @@ -29,6 +23,7 @@ public class RailBulletType extends BulletType{ despawnEffect = Fx.none; collides = false; lifetime = 1f; + speed = 0.01f; } @Override @@ -37,7 +32,7 @@ public class RailBulletType extends BulletType{ } void handle(Bullet b, Posc pos, float initialHealth){ - float sub = initialHealth*pierceDamageFactor; + float sub = Math.max(initialHealth*pierceDamageFactor, 0); if(b.damage <= 0){ b.fdata = Math.min(b.fdata, b.dst(pos)); diff --git a/core/src/mindustry/entities/comp/BuilderComp.java b/core/src/mindustry/entities/comp/BuilderComp.java index 4d4c4751a2..9ebb5a01ad 100644 --- a/core/src/mindustry/entities/comp/BuilderComp.java +++ b/core/src/mindustry/entities/comp/BuilderComp.java @@ -33,7 +33,7 @@ abstract class BuilderComp implements Posc, Teamc, Rotc{ @Import Team team; @SyncLocal Queue plans = new Queue<>(1); - @SyncLocal transient boolean updateBuilding = true; + @SyncLocal boolean updateBuilding = true; public boolean canBuild(){ return type.buildSpeed > 0; @@ -77,7 +77,7 @@ abstract class BuilderComp implements Posc, Teamc, Rotc{ Tile tile = world.tile(current.x, current.y); - if(!(tile.block() instanceof ConstructBlock)){ + if(!(tile.build instanceof ConstructBuild cb)){ if(!current.initialized && !current.breaking && Build.validPlace(current.block, team, current.x, current.y, current.rotation)){ boolean hasAll = infinite || current.isRotation(team) || !Structs.contains(current.block.requirements, i -> core != null && !core.items.has(i.item)); @@ -92,7 +92,7 @@ abstract class BuilderComp implements Posc, Teamc, Rotc{ plans.removeFirst(); return; } - }else if(tile.team() != team && tile.team() != Team.derelict){ + }else if((tile.team() != team && tile.team() != Team.derelict) || (!current.breaking && cb.cblock != current.block)){ plans.removeFirst(); return; } diff --git a/core/src/mindustry/entities/comp/BuildingComp.java b/core/src/mindustry/entities/comp/BuildingComp.java index 964f1f7078..142e89573a 100644 --- a/core/src/mindustry/entities/comp/BuildingComp.java +++ b/core/src/mindustry/entities/comp/BuildingComp.java @@ -1165,7 +1165,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc, /** Handle a bullet collision. * @return whether the bullet should be removed. */ public boolean collision(Bullet other){ - damage(other.damage() * other.type().tileDamageMultiplier); + damage(other.damage() * other.type().buildingDamageMultiplier); return true; } diff --git a/core/src/mindustry/entities/comp/FlyingComp.java b/core/src/mindustry/entities/comp/FlyingComp.java index abcb5e39cb..94db2f6a63 100644 --- a/core/src/mindustry/entities/comp/FlyingComp.java +++ b/core/src/mindustry/entities/comp/FlyingComp.java @@ -51,8 +51,8 @@ abstract class FlyingComp implements Posc, Velc, Healthc, Hitboxc{ } void moveAt(Vec2 vector, float acceleration){ - Vec2 t = tmp1.set(vector).scl(floorSpeedMultiplier()); //target vector - tmp2.set(t).sub(vel).limit(acceleration * vector.len() * Time.delta); //delta vector + Vec2 t = tmp1.set(vector); //target vector + tmp2.set(t).sub(vel).limit(acceleration * vector.len() * Time.delta * floorSpeedMultiplier()); //delta vector vel.add(tmp2); } diff --git a/core/src/mindustry/entities/comp/HealthComp.java b/core/src/mindustry/entities/comp/HealthComp.java index ca65ea8115..85d0a37105 100644 --- a/core/src/mindustry/entities/comp/HealthComp.java +++ b/core/src/mindustry/entities/comp/HealthComp.java @@ -51,11 +51,7 @@ abstract class HealthComp implements Entityc, Posc{ /** Damage and pierce armor. */ void damagePierce(float amount, boolean withEffect){ - if(this instanceof Shieldc){ - damage(amount + ((Shieldc)this).armor(), withEffect); - }else{ - damage(amount, withEffect); - } + damage(amount, withEffect); } /** Damage and pierce armor. */ diff --git a/core/src/mindustry/entities/comp/ShieldComp.java b/core/src/mindustry/entities/comp/ShieldComp.java index d4a1ec7e4b..3ca002b288 100644 --- a/core/src/mindustry/entities/comp/ShieldComp.java +++ b/core/src/mindustry/entities/comp/ShieldComp.java @@ -14,7 +14,7 @@ abstract class ShieldComp implements Healthc, Posc{ /** Absorbs health damage. */ float shield; - /** Absorbs percentage of damage. */ + /** Substracts an amount from damage. */ float armor; /** Shield opacity. */ transient float shieldAlpha = 0f; @@ -26,8 +26,22 @@ abstract class ShieldComp implements Healthc, Posc{ amount = Math.max(amount - armor, minArmorDamage * amount); amount /= healthMultiplier; - hitTime = 1f; + rawDamage(amount); + } + @Replace + @Override + public void damagePierce(float amount, boolean withEffect){ + float pre = hitTime; + + rawDamage(amount); + + if(!withEffect){ + hitTime = pre; + } + } + + private void rawDamage(float amount){ boolean hadShields = shield > 0.0001f; if(hadShields){ diff --git a/core/src/mindustry/entities/comp/WeaponsComp.java b/core/src/mindustry/entities/comp/WeaponsComp.java index 21265731fc..9cc5f8487a 100644 --- a/core/src/mindustry/entities/comp/WeaponsComp.java +++ b/core/src/mindustry/entities/comp/WeaponsComp.java @@ -139,7 +139,7 @@ abstract class WeaponsComp implements Teamc, Posc, Rotc, Velc, Statusc{ //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 * reloadMultiplier > weapon.reload/2f && mount.reload <= weapon.reload/2f){ mounts[weapon.otherSide].side = !mounts[weapon.otherSide].side; mount.side = !mount.side; } diff --git a/core/src/mindustry/input/DesktopInput.java b/core/src/mindustry/input/DesktopInput.java index 9370c64832..801ffdbbd8 100644 --- a/core/src/mindustry/input/DesktopInput.java +++ b/core/src/mindustry/input/DesktopInput.java @@ -154,6 +154,7 @@ public class DesktopInput extends InputHandler{ } drawRequest(lineRequests.get(i)); } + lineRequests.each(this::drawOverRequest); }else if(isPlacing()){ if(block.rotate){ drawArrow(block, cursorX, cursorY, rotation); @@ -603,7 +604,6 @@ public class DesktopInput extends InputHandler{ protected void updateMovement(Unit unit){ boolean omni = unit.type.omniMovement; - boolean ground = unit.isGrounded(); float speed = unit.realSpeed(); float xa = Core.input.axis(Binding.move_x); diff --git a/core/src/mindustry/input/InputHandler.java b/core/src/mindustry/input/InputHandler.java index 2fed50a715..65147fda5d 100644 --- a/core/src/mindustry/input/InputHandler.java +++ b/core/src/mindustry/input/InputHandler.java @@ -48,7 +48,6 @@ public abstract class InputHandler implements InputProcessor, GestureListener{ /** Maximum line length. */ final static int maxLength = 100; final static Rect r1 = new Rect(), r2 = new Rect(); - final static Seq tmpPoints = new Seq<>(), tmpPoints2 = new Seq<>(); public final OverlayFragment frag = new OverlayFragment(); @@ -1144,7 +1143,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{ diagonal = !diagonal; } - if(block instanceof PowerNode){ + if(block != null && block.swapDiagonalPlacement){ diagonal = !diagonal; } @@ -1161,39 +1160,8 @@ public abstract class InputHandler implements InputProcessor, GestureListener{ points = Placement.normalizeLine(startX, startY, endX, endY); } - if(block instanceof PowerNode node){ - var base = tmpPoints2; - var result = tmpPoints.clear(); - - base.selectFrom(points, p -> p == points.first() || p == points.peek() || Build.validPlace(block, player.team(), p.x, p.y, rotation, false)); - boolean addedLast = false; - - outer: - for(int i = 0; i < base.size;){ - var point = base.get(i); - result.add(point); - if(i == base.size - 1) addedLast = true; - - //find the furthest node that overlaps this one - for(int j = base.size - 1; j > i; j--){ - var other = base.get(j); - boolean over = node.overlaps(world.tile(point.x, point.y), world.tile(other.x, other.y)); - - if(over){ - //add node to list and start searching for node that overlaps the next one - i = j; - continue outer; - } - } - - //if it got here, that means nothing was found. try to proceed to the next node anyway - i ++; - } - - if(!addedLast) result.add(base.peek()); - - points.clear(); - points.addAll(result); + if(block != null){ + block.changePlacementPath(points, rotation); } float angle = Angles.angle(startX, startY, endX, endY); diff --git a/core/src/mindustry/input/Placement.java b/core/src/mindustry/input/Placement.java index 47fefecdcb..874269846f 100644 --- a/core/src/mindustry/input/Placement.java +++ b/core/src/mindustry/input/Placement.java @@ -1,6 +1,7 @@ package mindustry.input; import arc.*; +import arc.func.*; import arc.math.*; import arc.math.geom.*; import arc.struct.*; @@ -11,6 +12,7 @@ import mindustry.world.blocks.distribution.*; import static mindustry.Vars.*; public class Placement{ + private final static Seq tmpPoints = new Seq<>(), tmpPoints2 = new Seq<>(); private static final NormalizeResult result = new NormalizeResult(); private static final NormalizeDrawResult drawResult = new NormalizeDrawResult(); private static Bresenham2 bres = new Bresenham2(); @@ -68,6 +70,42 @@ public class Placement{ return points; } + /** Calculates optimal node placement for nodes with spacing. Used for bridges and power nodes. */ + public static void calculateNodes(Seq points, Block block, int rotation, Boolf2 overlapper){ + var base = tmpPoints2; + var result = tmpPoints.clear(); + + base.selectFrom(points, p -> p == points.first() || p == points.peek() || Build.validPlace(block, player.team(), p.x, p.y, rotation, false)); + boolean addedLast = false; + + outer: + for(int i = 0; i < base.size;){ + var point = base.get(i); + result.add(point); + if(i == base.size - 1) addedLast = true; + + //find the furthest node that overlaps this one + for(int j = base.size - 1; j > i; j--){ + var other = base.get(j); + boolean over = overlapper.get(point, other); + + if(over){ + //add node to list and start searching for node that overlaps the next one + i = j; + continue outer; + } + } + + //if it got here, that means nothing was found. try to proceed to the next node anyway + i ++; + } + + if(!addedLast) result.add(base.peek()); + + points.clear(); + points.addAll(result); + } + private static float tileHeuristic(Tile tile, Tile other){ Block block = control.input.block; diff --git a/core/src/mindustry/type/StatusEffect.java b/core/src/mindustry/type/StatusEffect.java index 90488c62ea..a02cb28978 100644 --- a/core/src/mindustry/type/StatusEffect.java +++ b/core/src/mindustry/type/StatusEffect.java @@ -52,7 +52,7 @@ public class StatusEffect extends MappableContent{ if(damage > 0){ unit.damageContinuousPierce(damage); }else if(damage < 0){ //heal unit - unit.heal(damage * Time.delta); + unit.heal(-1f * damage * Time.delta); } if(effect != Fx.none && Mathf.chanceDelta(effectChance)){ diff --git a/core/src/mindustry/type/Weather.java b/core/src/mindustry/type/Weather.java index 48a05219f5..c6ae657bc9 100644 --- a/core/src/mindustry/type/Weather.java +++ b/core/src/mindustry/type/Weather.java @@ -61,12 +61,17 @@ public class Weather extends UnlockableContent{ return entity; } + @Nullable + public WeatherState instance(){ + return Groups.weather.find(w -> w.weather() == this); + } + public boolean isActive(){ - return Groups.weather.find(w -> w.weather() == this) != null; + return instance() != null; } public void remove(){ - Entityc e = Groups.weather.find(w -> w.weather() == this); + var e = instance(); if(e != null) e.remove(); } @@ -259,6 +264,8 @@ public class Weather extends UnlockableContent{ public float cooldown; /** Intensity of the weather produced. */ public float intensity = 1f; + /** If true, this weather is always active. */ + public boolean always = false; /** Creates a weather entry with some approximate weather values. */ public WeatherEntry(Weather weather){ diff --git a/core/src/mindustry/ui/dialogs/CustomRulesDialog.java b/core/src/mindustry/ui/dialogs/CustomRulesDialog.java index 4d6a4483f9..cfcdd85452 100644 --- a/core/src/mindustry/ui/dialogs/CustomRulesDialog.java +++ b/core/src/mindustry/ui/dialogs/CustomRulesDialog.java @@ -284,19 +284,23 @@ public class CustomRulesDialog extends BaseDialog{ f.defaults().padRight(4).left(); f.add("@rules.weather.duration"); - field(f, entry.minDuration / toMinutes, v -> entry.minDuration = v * toMinutes); + field(f, entry.minDuration / toMinutes, v -> entry.minDuration = v * toMinutes).disabled(v -> entry.always); f.add("@waves.to"); - field(f, entry.maxDuration / toMinutes, v -> entry.maxDuration = v * toMinutes); + field(f, entry.maxDuration / toMinutes, v -> entry.maxDuration = v * toMinutes).disabled(v -> entry.always); f.add("@unit.minutes"); f.row(); f.add("@rules.weather.frequency"); - field(f, entry.minFrequency / toMinutes, v -> entry.minFrequency = v * toMinutes); + field(f, entry.minFrequency / toMinutes, v -> entry.minFrequency = v * toMinutes).disabled(v -> entry.always); f.add("@waves.to"); - field(f, entry.maxFrequency / toMinutes, v -> entry.maxFrequency = v * toMinutes); + field(f, entry.maxFrequency / toMinutes, v -> entry.maxFrequency = v * toMinutes).disabled(v -> entry.always); f.add("@unit.minutes"); + f.row(); + + f.check("@rules.weather.always", val -> entry.always = val).checked(cc -> entry.always).padBottom(4); + //intensity can't currently be customized }).grow().left().pad(6).top(); @@ -314,8 +318,8 @@ public class CustomRulesDialog extends BaseDialog{ dialog.addCloseButton(); dialog.buttons.button("@add", Icon.add, () -> { - BaseDialog addd = new BaseDialog("@add"); - addd.cont.pane(t -> { + BaseDialog add = new BaseDialog("@add"); + add.cont.pane(t -> { t.background(Tex.button); int i = 0; for(Weather weather : content.getBy(ContentType.weather)){ @@ -324,13 +328,13 @@ public class CustomRulesDialog extends BaseDialog{ rules.weather.add(new WeatherEntry(weather)); rebuild[0].run(); - addd.hide(); + add.hide(); }).size(140f, 50f); if(++i % 2 == 0) t.row(); } }); - addd.addCloseButton(); - addd.show(); + add.addCloseButton(); + add.show(); }).width(170f); //reset cooldown to random number diff --git a/core/src/mindustry/ui/dialogs/HostDialog.java b/core/src/mindustry/ui/dialogs/HostDialog.java index 1282d47b7d..682f0a010f 100644 --- a/core/src/mindustry/ui/dialogs/HostDialog.java +++ b/core/src/mindustry/ui/dialogs/HostDialog.java @@ -67,10 +67,15 @@ public class HostDialog extends BaseDialog{ player.admin(true); if(steam){ - Core.app.post(() -> Core.settings.getBoolOnce("steampublic2", () -> { + Core.app.post(() -> Core.settings.getBoolOnce("steampublic3", () -> { ui.showCustomConfirm("@setting.publichost.name", "@public.confirm", "@yes", "@no", () -> { - Core.settings.put("publichost", true); - platform.updateLobby(); + ui.showCustomConfirm("@setting.publichost.name", "@public.confirm.really", "@no", "@yes", () -> { + Core.settings.put("publichost", true); + platform.updateLobby(); + }, () -> { + Core.settings.put("publichost", false); + platform.updateLobby(); + }); }, () -> { Core.settings.put("publichost", false); platform.updateLobby(); diff --git a/core/src/mindustry/ui/dialogs/PlanetDialog.java b/core/src/mindustry/ui/dialogs/PlanetDialog.java index 7251a48421..e3a13c2c0e 100644 --- a/core/src/mindustry/ui/dialogs/PlanetDialog.java +++ b/core/src/mindustry/ui/dialogs/PlanetDialog.java @@ -399,6 +399,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{ void setup(){ zoom = planets.zoom = 1f; selectAlpha = 1f; + ui.minimapfrag.hide(); clearChildren(); diff --git a/core/src/mindustry/ui/dialogs/SettingsMenuDialog.java b/core/src/mindustry/ui/dialogs/SettingsMenuDialog.java index 43e5c9a8fe..94465167bf 100644 --- a/core/src/mindustry/ui/dialogs/SettingsMenuDialog.java +++ b/core/src/mindustry/ui/dialogs/SettingsMenuDialog.java @@ -32,9 +32,9 @@ import static mindustry.Vars.net; import static mindustry.Vars.*; public class SettingsMenuDialog extends SettingsDialog{ - private SettingsTable graphics; - private SettingsTable game; - private SettingsTable sound; + public SettingsTable graphics; + public SettingsTable game; + public SettingsTable sound; private Table prefs; private Table menu; diff --git a/core/src/mindustry/ui/fragments/MinimapFragment.java b/core/src/mindustry/ui/fragments/MinimapFragment.java index aee9f09793..07536f2e3c 100644 --- a/core/src/mindustry/ui/fragments/MinimapFragment.java +++ b/core/src/mindustry/ui/fragments/MinimapFragment.java @@ -110,6 +110,10 @@ public class MinimapFragment extends Fragment{ return shown; } + public void hide(){ + shown = false; + } + public void toggle(){ float size = baseSize * zoom * world.width(); float ratio = (float)renderer.minimap.getTexture().height / renderer.minimap.getTexture().width; diff --git a/core/src/mindustry/world/Block.java b/core/src/mindustry/world/Block.java index 09546b6b27..b82a1ddb1a 100644 --- a/core/src/mindustry/world/Block.java +++ b/core/src/mindustry/world/Block.java @@ -143,6 +143,8 @@ public class Block extends UnlockableContent{ public boolean sync; /** Whether this block uses conveyor-type placement mode. */ public boolean conveyorPlacement; + /** Whether to swap the diagonal placement modes. */ + public boolean swapDiagonalPlacement; /** * The color of this block when displayed on the minimap or map preview. * Do not set manually! This is overridden when loading for most blocks. @@ -386,6 +388,11 @@ public class Block extends UnlockableContent{ return this; } + /** Mutates the given list of points used during line placement. */ + public void changePlacementPath(Seq points, int rotation){ + + } + public Object nextConfig(){ if(saveConfig && lastConfig != null){ return lastConfig; diff --git a/core/src/mindustry/world/blocks/campaign/Accelerator.java b/core/src/mindustry/world/blocks/campaign/Accelerator.java index 96bc2b1b44..b5a33bc2d3 100644 --- a/core/src/mindustry/world/blocks/campaign/Accelerator.java +++ b/core/src/mindustry/world/blocks/campaign/Accelerator.java @@ -50,37 +50,48 @@ public class Accelerator extends Block{ } public class AcceleratorBuild extends Building{ + public float heat, statusLerp; + @Override + public void updateTile(){ + super.updateTile(); + heat = Mathf.lerpDelta(heat, consValid() ? 1f : 0f, 0.05f); + statusLerp = Mathf.lerpDelta(statusLerp, power.status, 0.05f); + } + @Override public void draw(){ super.draw(); for(int l = 0; l < 4; l++){ float length = 7f + l * 5f; - Draw.color(team.color, Pal.darkMetal, Mathf.absin(Time.time + l*50f, 10f, 1f)); + Draw.color(Tmp.c1.set(Pal.darkMetal).lerp(team.color, statusLerp), Pal.darkMetal, Mathf.absin(Time.time + l*50f, 10f, 1f)); for(int i = 0; i < 4; i++){ float rot = i*90f + 45f; Draw.rect(arrowRegion, x + Angles.trnsx(rot, length), y + Angles.trnsy(rot, length), rot + 180f); } } + + if(heat < 0.0001f) return; float rad = size * tilesize / 2f * 0.74f; float scl = 2f; Draw.z(Layer.bullet - 0.0001f); - Lines.stroke(1.75f, Pal.accent); + Lines.stroke(1.75f * heat, Pal.accent); Lines.square(x, y, rad * 1.22f, 45f); - Lines.stroke(3f, Pal.accent); + Lines.stroke(3f * heat, Pal.accent); Lines.square(x, y, rad, Time.time / scl); Lines.square(x, y, rad, -Time.time / scl); Draw.color(team.color); + Draw.alpha(Mathf.clamp(heat * 3f)); for(int i = 0; i < 4; i++){ float rot = i*90f + 45f + (-Time.time /3f)%360f; - float length = 26f; + float length = 26f * heat; Draw.rect(arrowRegion, x + Angles.trnsx(rot, length), y + Angles.trnsy(rot, length), rot + 180f); } diff --git a/core/src/mindustry/world/blocks/defense/Thruster.java b/core/src/mindustry/world/blocks/defense/Thruster.java new file mode 100644 index 0000000000..89c9a28c12 --- /dev/null +++ b/core/src/mindustry/world/blocks/defense/Thruster.java @@ -0,0 +1,37 @@ +package mindustry.world.blocks.defense; + +import arc.graphics.g2d.*; +import arc.util.*; +import mindustry.annotations.Annotations.*; +import mindustry.entities.units.*; + +public class Thruster extends Wall{ + public @Load("@-top") TextureRegion topRegion; + + public Thruster(String name){ + super(name); + rotate = true; + quickRotate = false; + } + + @Override + public void drawRequestRegion(BuildPlan req, Eachable list){ + Draw.rect(region, req.drawx(), req.drawy()); + Draw.rect(topRegion, req.drawx(), req.drawy(), req.rotation * 90); + } + + @Override + public TextureRegion[] icons(){ + return new TextureRegion[]{region, topRegion}; + } + + public class ThrusterBuild extends WallBuild{ + + @Override + public void draw(){ + super.draw(); + + Draw.rect(topRegion, x, y, rotdeg()); + } + } +} diff --git a/core/src/mindustry/world/blocks/defense/turrets/PointDefenseTurret.java b/core/src/mindustry/world/blocks/defense/turrets/PointDefenseTurret.java index 2c9ef9c134..9c0259c8b2 100644 --- a/core/src/mindustry/world/blocks/defense/turrets/PointDefenseTurret.java +++ b/core/src/mindustry/world/blocks/defense/turrets/PointDefenseTurret.java @@ -62,7 +62,7 @@ public class PointDefenseTurret extends ReloadTurret{ //retarget if(timer(timerTarget, retargetTime)){ - target = Groups.bullet.intersect(x - range, y - range, range*2, range*2).min(b -> b.team == team || !b.type().hittable ? Float.MAX_VALUE : b.dst2(this)); + target = Groups.bullet.intersect(x - range, y - range, range*2, range*2).min(b -> b.team != team && b.type().hittable, b -> b.dst2(this)); } //pooled bullets diff --git a/core/src/mindustry/world/blocks/defense/turrets/TractorBeamTurret.java b/core/src/mindustry/world/blocks/defense/turrets/TractorBeamTurret.java index 511faf35ef..34e960ea2d 100644 --- a/core/src/mindustry/world/blocks/defense/turrets/TractorBeamTurret.java +++ b/core/src/mindustry/world/blocks/defense/turrets/TractorBeamTurret.java @@ -118,7 +118,7 @@ public class TractorBeamTurret extends BaseTurret{ } any = true; - target.impulseNet(Tmp.v1.set(this).sub(target).limit((force + (1f - target.dst(this) / range) * scaledForce) * efficiency() * timeScale)); + target.impulseNet(Tmp.v1.set(this).sub(target).limit((force + (1f - target.dst(this) / range) * scaledForce) * edelta() * timeScale)); } }else{ strength = Mathf.lerpDelta(strength, 0, 0.1f); diff --git a/core/src/mindustry/world/blocks/defense/turrets/Turret.java b/core/src/mindustry/world/blocks/defense/turrets/Turret.java index 0a00cf9b8a..044f583722 100644 --- a/core/src/mindustry/world/blocks/defense/turrets/Turret.java +++ b/core/src/mindustry/world/blocks/defense/turrets/Turret.java @@ -113,6 +113,7 @@ public class Turret extends ReloadTurret{ stats.add(Stat.reload, 60f / reloadTime * (alternate ? 1 : shots), StatUnit.none); stats.add(Stat.targetsAir, targetAir); stats.add(Stat.targetsGround, targetGround); + if(ammoPerShot != 1) stats.add(Stat.ammoUse, ammoPerShot, StatUnit.perShot); } @Override diff --git a/core/src/mindustry/world/blocks/distribution/ItemBridge.java b/core/src/mindustry/world/blocks/distribution/ItemBridge.java index cfcc488881..604cefce4a 100644 --- a/core/src/mindustry/world/blocks/distribution/ItemBridge.java +++ b/core/src/mindustry/world/blocks/distribution/ItemBridge.java @@ -13,6 +13,7 @@ import mindustry.annotations.Annotations.*; import mindustry.entities.units.*; import mindustry.gen.*; import mindustry.graphics.*; +import mindustry.input.*; import mindustry.type.*; import mindustry.world.*; import mindustry.world.meta.*; @@ -152,6 +153,11 @@ public class ItemBridge extends Block{ lastPlan = plan; } + @Override + public void changePlacementPath(Seq points, int rotation){ + Placement.calculateNodes(points, this, rotation, (point, other) -> Math.max(Math.abs(point.x - other.x), Math.abs(point.y - other.y)) <= range); + } + public class ItemBridgeBuild extends Building{ public int link = -1; public IntSet incoming = new IntSet(); diff --git a/core/src/mindustry/world/blocks/distribution/StackConveyor.java b/core/src/mindustry/world/blocks/distribution/StackConveyor.java index 4d6ca5d614..4b30d7e82b 100644 --- a/core/src/mindustry/world/blocks/distribution/StackConveyor.java +++ b/core/src/mindustry/world/blocks/distribution/StackConveyor.java @@ -29,7 +29,7 @@ public class StackConveyor extends Block implements Autotiler{ public float speed = 0f; public boolean splitOut = true; - /** (minimum) amount of loading docks needed to fill a line */ + /** (minimum) amount of loading docks needed to fill a line. */ public float recharge = 2f; public Effect loadEffect = Fx.plasticburn; public Effect unloadEffect = Fx.plasticburn; @@ -46,7 +46,6 @@ public class StackConveyor extends Block implements Autotiler{ ambientSound = Sounds.conveyor; ambientSoundVolume = 0.004f; - unloadable = false; } @Override @@ -269,6 +268,11 @@ public class StackConveyor extends Block implements Autotiler{ } } + @Override + public void itemTaken(Item item){ + if(items.empty()) poofOut(); + } + @Override public boolean acceptItem(Building source, Item item){ if(this == source) return true; // player threw items diff --git a/core/src/mindustry/world/blocks/experimental/BlockForge.java b/core/src/mindustry/world/blocks/experimental/BlockForge.java index c609416a30..6dcd81a4eb 100644 --- a/core/src/mindustry/world/blocks/experimental/BlockForge.java +++ b/core/src/mindustry/world/blocks/experimental/BlockForge.java @@ -37,6 +37,11 @@ public class BlockForge extends PayloadAcceptor{ consumes.add(new ConsumeItemDynamic((BlockForgeBuild e) -> e.recipe != null ? e.recipe.requirements : ItemStack.empty)); } + @Override + public TextureRegion[] icons(){ + return new TextureRegion[]{region, outRegion}; + } + @Override public void setBars(){ super.setBars(); diff --git a/core/src/mindustry/world/blocks/experimental/BlockLoader.java b/core/src/mindustry/world/blocks/experimental/BlockLoader.java index 3e015ec9a6..afaefeffcc 100644 --- a/core/src/mindustry/world/blocks/experimental/BlockLoader.java +++ b/core/src/mindustry/world/blocks/experimental/BlockLoader.java @@ -31,6 +31,11 @@ public class BlockLoader extends PayloadAcceptor{ rotate = true; } + @Override + public TextureRegion[] icons(){ + return new TextureRegion[]{region, inRegion, outRegion, topRegion}; + } + @Override public boolean outputsItems(){ return false; @@ -72,7 +77,7 @@ public class BlockLoader extends PayloadAcceptor{ //draw input for(int i = 0; i < 4; i++){ if(blends(i) && i != rotation){ - Draw.rect(inRegion, x, y, i * 90); + Draw.rect(inRegion, x, y, (i * 90) - 180); } } diff --git a/core/src/mindustry/world/blocks/logic/LogicBlock.java b/core/src/mindustry/world/blocks/logic/LogicBlock.java index a3de197586..b9fc38bf8b 100644 --- a/core/src/mindustry/world/blocks/logic/LogicBlock.java +++ b/core/src/mindustry/world/blocks/logic/LogicBlock.java @@ -194,6 +194,7 @@ public class LogicBlock extends Block{ public LExecutor executor = new LExecutor(); public float accumulator = 0; public Seq links = new Seq<>(); + public boolean checkedDuplicates = false; public void readCompressed(byte[] data, boolean relative){ DataInputStream stream = new DataInputStream(new InflaterInputStream(new ByteArrayInputStream(data))); @@ -362,6 +363,21 @@ public class LogicBlock extends Block{ public void updateTile(){ executor.team = team; + if(!checkedDuplicates){ + checkedDuplicates = true; + var removal = new IntSet(); + var removeLinks = new Seq(); + for(var link : links){ + var build = world.build(link.x, link.y); + if(build != null){ + if(!removal.add(build.id)){ + removeLinks.add(link); + } + } + } + links.removeAll(removeLinks); + } + //check for previously invalid links to add after configuration boolean changed = false; @@ -371,7 +387,7 @@ public class LogicBlock extends Block{ if(!l.active) continue; boolean valid = validLink(world.build(l.x, l.y)); - if(valid != l.valid ){ + if(valid != l.valid){ changed = true; l.valid = valid; if(valid){ diff --git a/core/src/mindustry/world/blocks/power/ItemLiquidGenerator.java b/core/src/mindustry/world/blocks/power/ItemLiquidGenerator.java index 16cd34fb7b..b9e7f112bc 100644 --- a/core/src/mindustry/world/blocks/power/ItemLiquidGenerator.java +++ b/core/src/mindustry/world/blocks/power/ItemLiquidGenerator.java @@ -92,11 +92,6 @@ public class ItemLiquidGenerator extends PowerGenerator{ return generateTime > 0; } - @Override - public float ambientVolume(){ - return Mathf.clamp(productionEfficiency); - } - @Override public void updateTile(){ //Note: Do not use this delta when calculating the amount of power or the power efficiency, but use it for resource consumption if necessary. diff --git a/core/src/mindustry/world/blocks/power/PowerGenerator.java b/core/src/mindustry/world/blocks/power/PowerGenerator.java index ae9453d675..5a2bd12f0d 100644 --- a/core/src/mindustry/world/blocks/power/PowerGenerator.java +++ b/core/src/mindustry/world/blocks/power/PowerGenerator.java @@ -1,6 +1,7 @@ package mindustry.world.blocks.power; import arc.*; +import arc.math.*; import arc.struct.*; import arc.util.*; import arc.util.io.*; @@ -50,6 +51,11 @@ public class PowerGenerator extends PowerDistributor{ /** The efficiency of the producer. An efficiency of 1.0 means 100% */ public float productionEfficiency = 0.0f; + @Override + public float ambientVolume(){ + return Mathf.clamp(productionEfficiency); + } + @Override public float getPowerProduction(){ return powerProduction * productionEfficiency; diff --git a/core/src/mindustry/world/blocks/power/PowerNode.java b/core/src/mindustry/world/blocks/power/PowerNode.java index f744dbe0b5..64f0bd38dc 100644 --- a/core/src/mindustry/world/blocks/power/PowerNode.java +++ b/core/src/mindustry/world/blocks/power/PowerNode.java @@ -14,6 +14,7 @@ import mindustry.entities.units.*; import mindustry.game.*; import mindustry.gen.*; import mindustry.graphics.*; +import mindustry.input.*; import mindustry.ui.*; import mindustry.world.*; import mindustry.world.meta.*; @@ -25,7 +26,8 @@ public class PowerNode extends PowerBlock{ protected static boolean returnValue = false; protected static BuildPlan otherReq; - protected final ObjectSet graphs = new ObjectSet<>(); + protected final static ObjectSet graphs = new ObjectSet<>(); + protected final static Seq tmpPoints = new Seq<>(), tmpPoints2 = new Seq<>(); public @Load("laser") TextureRegion laser; public @Load("laser-end") TextureRegion laserEnd; @@ -40,6 +42,7 @@ public class PowerNode extends PowerBlock{ consumesPower = false; outputsPower = false; canOverdrive = false; + swapDiagonalPlacement = true; config(Integer.class, (entity, value) -> { PowerModule power = entity.power; @@ -149,17 +152,20 @@ public class PowerNode extends PowerBlock{ Draw.reset(); } - protected void setupColor(float satisfaction){ - float fract = 1f - satisfaction; + @Override + public void changePlacementPath(Seq points, int rotation){ + Placement.calculateNodes(points, this, rotation, (point, other) -> overlaps(world.tile(point.x, point.y), world.tile(other.x, other.y))); + } - Draw.color(laserColor1, laserColor2, fract * 0.86f + Mathf.absin(3f, 0.1f)); + protected void setupColor(float satisfaction){ + Draw.color(laserColor1, laserColor2, (1f - satisfaction) * 0.86f + Mathf.absin(3f, 0.1f)); Draw.alpha(renderer == null ? 0.5f : renderer.laserOpacity); } protected void drawLaser(Team team, float x1, float y1, float x2, float y2, int size1, int size2){ - float angle1 = Angles.angle(x1, y1, x2, y2); - float vx = Mathf.cosDeg(angle1), vy = Mathf.sinDeg(angle1); - float len1 = size1 * tilesize / 2f - 1.5f, len2 = size2 * tilesize / 2f - 1.5f; + float angle1 = Angles.angle(x1, y1, x2, y2), + vx = Mathf.cosDeg(angle1), vy = Mathf.sinDeg(angle1), + len1 = size1 * tilesize / 2f - 1.5f, len2 = size2 * tilesize / 2f - 1.5f; Drawf.laser(team, laser, laserEnd, x1 + vx*len1, y1 + vy*len1, x2 - vx*len2, y2 - vy*len2, 0.25f); } diff --git a/core/src/mindustry/world/blocks/production/Drill.java b/core/src/mindustry/world/blocks/production/Drill.java index a124d9ceed..6d4e0c8708 100644 --- a/core/src/mindustry/world/blocks/production/Drill.java +++ b/core/src/mindustry/world/blocks/production/Drill.java @@ -42,7 +42,7 @@ public class Drill extends Block{ protected int returnCount; /** Whether to draw the item this drill is mining. */ - public boolean drawMineItem = false; + public boolean drawMineItem = true; /** Effect played when an item is produced. This is colored. */ public Effect drillEffect = Fx.mine; /** Speed the drill bit rotates at. */ @@ -57,6 +57,7 @@ public class Drill extends Block{ public @Load("@-rim") TextureRegion rimRegion; public @Load("@-rotator") TextureRegion rotatorRegion; public @Load("@-top") TextureRegion topRegion; + public @Load(value = "@-item", fallback = "drill-item-@size") TextureRegion itemRegion; public Drill(String name){ super(name); @@ -76,11 +77,11 @@ public class Drill extends Block{ Tile tile = req.tile(); if(tile == null) return; - countOre(req.tile()); - if(returnItem == null) return; + countOre(tile); + if(returnItem == null || !drawMineItem) return; Draw.color(returnItem.color); - Draw.rect("drill-top", req.drawx(), req.drawy()); + Draw.rect(itemRegion, req.drawx(), req.drawy()); Draw.color(); } @@ -124,6 +125,12 @@ public class Drill extends Block{ Draw.rect(returnItem.icon(Cicon.small), dx, dy - 1); Draw.reset(); Draw.rect(returnItem.icon(Cicon.small), dx, dy); + + if(drawMineItem){ + Draw.color(returnItem.color); + Draw.rect(itemRegion, tile.worldx() + offset, tile.worldy() + offset); + Draw.color(); + } }else{ Tile to = tile.getLinkedTilesAs(this, tempTiles).find(t -> t.drop() != null && t.drop().hardness > tier); Item item = to == null ? null : to.drop(); @@ -304,7 +311,7 @@ public class Drill extends Block{ if(dominantItem != null && drawMineItem){ Draw.color(dominantItem.color); - Draw.rect("drill-top", x, y); + Draw.rect(itemRegion, x, y); Draw.color(); } } diff --git a/core/src/mindustry/world/blocks/production/SolidPump.java b/core/src/mindustry/world/blocks/production/SolidPump.java index d49a6499ac..78a423dcec 100644 --- a/core/src/mindustry/world/blocks/production/SolidPump.java +++ b/core/src/mindustry/world/blocks/production/SolidPump.java @@ -56,7 +56,7 @@ public class SolidPump extends Pump{ stats.remove(Stat.output); stats.add(Stat.output, result, 60f * pumpAmount, true); if(attribute != null){ - stats.add(baseEfficiency > 0.0001f ? Stat.affinities : Stat.tiles, attribute); + stats.add(baseEfficiency > 0.0001f ? Stat.affinities : Stat.tiles, attribute, floating, 1f, baseEfficiency <= 0.001f); } } diff --git a/core/src/mindustry/world/blocks/sandbox/PowerSource.java b/core/src/mindustry/world/blocks/sandbox/PowerSource.java index fbc24f5ea7..b392ce8813 100644 --- a/core/src/mindustry/world/blocks/sandbox/PowerSource.java +++ b/core/src/mindustry/world/blocks/sandbox/PowerSource.java @@ -4,6 +4,8 @@ import mindustry.world.blocks.power.*; public class PowerSource extends PowerNode{ + public float powerProduction = 10000f; + public PowerSource(String name){ super(name); maxNodes = 100; @@ -14,7 +16,7 @@ public class PowerSource extends PowerNode{ public class PowerSourceBuild extends PowerNodeBuild{ @Override public float getPowerProduction(){ - return enabled ? 10000f : 0f; + return enabled ? powerProduction : 0f; } } diff --git a/core/src/mindustry/world/blocks/storage/CoreBlock.java b/core/src/mindustry/world/blocks/storage/CoreBlock.java index 6d77239f50..18299cd02a 100644 --- a/core/src/mindustry/world/blocks/storage/CoreBlock.java +++ b/core/src/mindustry/world/blocks/storage/CoreBlock.java @@ -386,6 +386,13 @@ public class CoreBlock extends StorageBlock{ }else{ super.handleItem(source, item); } + }else if(incinerate()){ + if(items.get(item) >= storageCapacity){ + //create item incineration effect at random intervals + if(!noEffect){ + incinerateEffect(this, source); + } + } } } } diff --git a/core/src/mindustry/world/blocks/units/Reconstructor.java b/core/src/mindustry/world/blocks/units/Reconstructor.java index 2aba7a8c7a..634ea5b911 100644 --- a/core/src/mindustry/world/blocks/units/Reconstructor.java +++ b/core/src/mindustry/world/blocks/units/Reconstructor.java @@ -39,7 +39,7 @@ public class Reconstructor extends UnitBlock{ @Override public TextureRegion[] icons(){ - return new TextureRegion[]{region, outRegion, topRegion}; + return new TextureRegion[]{region, inRegion, outRegion, topRegion}; } @Override @@ -129,7 +129,7 @@ public class Reconstructor extends UnitBlock{ //draw input for(int i = 0; i < 4; i++){ if(blends(i) && i != rotation){ - Draw.rect(inRegion, x, y, i * 90); + Draw.rect(inRegion, x, y, (i * 90) - 180); } } diff --git a/core/src/mindustry/world/meta/Stat.java b/core/src/mindustry/world/meta/Stat.java index 8f1d23820b..2f933bb46a 100644 --- a/core/src/mindustry/world/meta/Stat.java +++ b/core/src/mindustry/world/meta/Stat.java @@ -70,6 +70,7 @@ public enum Stat{ targetsGround(StatCat.function), damage(StatCat.function), ammo(StatCat.function), + ammoUse(StatCat.function), shieldHealth(StatCat.function), cooldownTime(StatCat.function), diff --git a/core/src/mindustry/world/meta/StatUnit.java b/core/src/mindustry/world/meta/StatUnit.java index b2a866be3e..f2d1ba07c3 100644 --- a/core/src/mindustry/world/meta/StatUnit.java +++ b/core/src/mindustry/world/meta/StatUnit.java @@ -20,6 +20,7 @@ public enum StatUnit{ minutes, perSecond, perMinute, + perShot, timesSpeed(false), percent(false), shieldHealth, diff --git a/core/src/mindustry/world/meta/Stats.java b/core/src/mindustry/world/meta/Stats.java index 0b1bf192da..39d887f188 100644 --- a/core/src/mindustry/world/meta/Stats.java +++ b/core/src/mindustry/world/meta/Stats.java @@ -55,22 +55,22 @@ public class Stats{ } public void add(Stat stat, Attribute attr){ - add(stat, attr, false, 1f); + add(stat, attr, false, 1f, false); } public void add(Stat stat, Attribute attr, float scale){ - add(stat, attr, false, scale); + add(stat, attr, false, scale, false); } public void add(Stat stat, Attribute attr, boolean floating){ - add(stat, attr, floating, 1f); + add(stat, attr, floating, 1f, false); } - public void add(Stat stat, Attribute attr, boolean floating, float scale){ + public void add(Stat stat, Attribute attr, boolean floating, float scale, boolean startZero){ for(var block : Vars.content.blocks() .select(block -> block instanceof Floor f && f.attributes.get(attr) != 0 && !(f.isLiquid && !floating)) .as().with(s -> s.sort(f -> f.attributes.get(attr)))){ - add(stat, new FloorEfficiencyValue(block, block.attributes.get(attr) * scale)); + add(stat, new FloorEfficiencyValue(block, block.attributes.get(attr) * scale, startZero)); } } diff --git a/core/src/mindustry/world/meta/values/AmmoListValue.java b/core/src/mindustry/world/meta/values/AmmoListValue.java index f6b5037505..b1d6066ef9 100644 --- a/core/src/mindustry/world/meta/values/AmmoListValue.java +++ b/core/src/mindustry/world/meta/values/AmmoListValue.java @@ -46,6 +46,10 @@ public class AmmoListValue implements StatValue{ bt.add(Core.bundle.format("bullet.damage", type.damage)); } + if(type.buildingDamageMultiplier != 1){ + sep(bt, Core.bundle.format("bullet.buildingdamage", type.buildingDamageMultiplier * 100)); + } + if(type.splashDamage > 0){ sep(bt, Core.bundle.format("bullet.splashdamage", (int)type.splashDamage, Strings.fixed(type.splashDamageRadius / tilesize, 1))); } diff --git a/core/src/mindustry/world/meta/values/FloorEfficiencyValue.java b/core/src/mindustry/world/meta/values/FloorEfficiencyValue.java index 619598a230..ad32ecf453 100644 --- a/core/src/mindustry/world/meta/values/FloorEfficiencyValue.java +++ b/core/src/mindustry/world/meta/values/FloorEfficiencyValue.java @@ -10,16 +10,18 @@ import mindustry.world.meta.*; public class FloorEfficiencyValue implements StatValue{ private final Floor floor; private final float multiplier; + private final boolean startZero; - public FloorEfficiencyValue(Floor floor, float multiplier){ + public FloorEfficiencyValue(Floor floor, float multiplier, boolean startZero){ this.floor = floor; this.multiplier = multiplier; + this.startZero = startZero; } @Override public void display(Table table){ table.stack(new Image(floor.icon(Cicon.medium)).setScaling(Scaling.fit), new Table(t -> { - t.top().right().add((multiplier < 0 ? "[scarlet]" : "[accent]+") + (int)((multiplier) * 100) + "%").style(Styles.outlineLabel); + t.top().right().add((multiplier < 0 ? "[scarlet]" : startZero ? "[accent]" : "[accent]+") + (int)((multiplier) * 100) + "%").style(Styles.outlineLabel); })); } } diff --git a/gradle.properties b/gradle.properties index 3b10f28992..6612596de1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ org.gradle.daemon=true org.gradle.jvmargs=-Xms256m -Xmx1024m -archash=2eb670fd55b9210b804ae729293b358d5368f9f3 +archash=b91cf2f8d2073bb03f6c07e8f8282c4039b10138 diff --git a/servers_be.json b/servers_be.json index 307f108b4f..a363d94b30 100644 --- a/servers_be.json +++ b/servers_be.json @@ -10,8 +10,5 @@ }, { "address": "mindustry.pl:6660" - }, - { - "address": "be.wayzer.cf" } ] diff --git a/servers_v6.json b/servers_v6.json index 7aac5e5e16..fea3cf319b 100644 --- a/servers_v6.json +++ b/servers_v6.json @@ -54,5 +54,9 @@ { "name": "ALEX", "address": ["alexmindustry.ddns.net:6568", "alexmindustry.ddns.net:6569"] + }, + { + "name": "Minty [subzero]", + "address": ["minty-server.ddns.net"] } ]