Scrapped reaper segments
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
BIN
core/assets-raw/sprites/units/reaper/reaper-part0.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
core/assets-raw/sprites/units/reaper/reaper-part1.png
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
core/assets-raw/sprites/units/reaper/reaper-part2.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
core/assets-raw/sprites/units/reaper/reaper-part3.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 771 B After Width: | Height: | Size: 771 B |
|
Before Width: | Height: | Size: 607 KiB After Width: | Height: | Size: 278 KiB |
|
Before Width: | Height: | Size: 175 KiB After Width: | Height: | Size: 712 KiB |
|
Before Width: | Height: | Size: 124 KiB After Width: | Height: | Size: 126 KiB |
|
Before Width: | Height: | Size: 277 KiB After Width: | Height: | Size: 277 KiB |
|
Before Width: | Height: | Size: 897 KiB After Width: | Height: | Size: 897 KiB |
|
Before Width: | Height: | Size: 880 KiB After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 125 KiB After Width: | Height: | Size: 126 KiB |
|
Before Width: | Height: | Size: 276 KiB After Width: | Height: | Size: 276 KiB |
|
Before Width: | Height: | Size: 949 KiB After Width: | Height: | Size: 949 KiB |
@@ -48,16 +48,16 @@ public class Bullets implements ContentList{
|
|||||||
hitEffect = Fx.flakExplosion;
|
hitEffect = Fx.flakExplosion;
|
||||||
knockback = 0.8f;
|
knockback = 0.8f;
|
||||||
lifetime = 50f;
|
lifetime = 50f;
|
||||||
bulletWidth = bulletHeight = 11f;
|
width = height = 11f;
|
||||||
collidesTiles = false;
|
collidesTiles = false;
|
||||||
splashDamageRadius = 25f;
|
splashDamageRadius = 25f;
|
||||||
splashDamage = 33f;
|
splashDamage = 33f;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
artilleryPlasticFrag = new BasicBulletType(2.5f, 10, "bullet"){{
|
artilleryPlasticFrag = new BasicBulletType(2.5f, 10, "bullet"){{
|
||||||
bulletWidth = 10f;
|
width = 10f;
|
||||||
bulletHeight = 12f;
|
height = 12f;
|
||||||
bulletShrink = 1f;
|
shrinkY = 1f;
|
||||||
lifetime = 15f;
|
lifetime = 15f;
|
||||||
backColor = Pal.plastaniumBack;
|
backColor = Pal.plastaniumBack;
|
||||||
frontColor = Pal.plastaniumFront;
|
frontColor = Pal.plastaniumFront;
|
||||||
@@ -68,7 +68,7 @@ public class Bullets implements ContentList{
|
|||||||
hitEffect = Fx.plasticExplosion;
|
hitEffect = Fx.plasticExplosion;
|
||||||
knockback = 1f;
|
knockback = 1f;
|
||||||
lifetime = 55f;
|
lifetime = 55f;
|
||||||
bulletWidth = bulletHeight = 13f;
|
width = height = 13f;
|
||||||
collidesTiles = false;
|
collidesTiles = false;
|
||||||
splashDamageRadius = 35f;
|
splashDamageRadius = 35f;
|
||||||
splashDamage = 45f;
|
splashDamage = 45f;
|
||||||
@@ -82,7 +82,7 @@ public class Bullets implements ContentList{
|
|||||||
hitEffect = Fx.flakExplosion;
|
hitEffect = Fx.flakExplosion;
|
||||||
knockback = 0.8f;
|
knockback = 0.8f;
|
||||||
lifetime = 45f;
|
lifetime = 45f;
|
||||||
bulletWidth = bulletHeight = 11f;
|
width = height = 11f;
|
||||||
collidesTiles = false;
|
collidesTiles = false;
|
||||||
splashDamageRadius = 25f;
|
splashDamageRadius = 25f;
|
||||||
splashDamage = 33f;
|
splashDamage = 33f;
|
||||||
@@ -96,7 +96,7 @@ public class Bullets implements ContentList{
|
|||||||
hitEffect = Fx.blastExplosion;
|
hitEffect = Fx.blastExplosion;
|
||||||
knockback = 0.8f;
|
knockback = 0.8f;
|
||||||
lifetime = 60f;
|
lifetime = 60f;
|
||||||
bulletWidth = bulletHeight = 13f;
|
width = height = 13f;
|
||||||
collidesTiles = false;
|
collidesTiles = false;
|
||||||
splashDamageRadius = 25f;
|
splashDamageRadius = 25f;
|
||||||
splashDamage = 35f;
|
splashDamage = 35f;
|
||||||
@@ -110,7 +110,7 @@ public class Bullets implements ContentList{
|
|||||||
hitEffect = Fx.blastExplosion;
|
hitEffect = Fx.blastExplosion;
|
||||||
knockback = 0.8f;
|
knockback = 0.8f;
|
||||||
lifetime = 70f;
|
lifetime = 70f;
|
||||||
bulletWidth = bulletHeight = 14f;
|
width = height = 14f;
|
||||||
collidesTiles = false;
|
collidesTiles = false;
|
||||||
ammoMultiplier = 4f;
|
ammoMultiplier = 4f;
|
||||||
splashDamageRadius = 45f;
|
splashDamageRadius = 45f;
|
||||||
@@ -123,9 +123,9 @@ public class Bullets implements ContentList{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
glassFrag = new BasicBulletType(3f, 5, "bullet"){{
|
glassFrag = new BasicBulletType(3f, 5, "bullet"){{
|
||||||
bulletWidth = 5f;
|
width = 5f;
|
||||||
bulletHeight = 12f;
|
height = 12f;
|
||||||
bulletShrink = 1f;
|
shrinkY = 1f;
|
||||||
lifetime = 20f;
|
lifetime = 20f;
|
||||||
backColor = Pal.gray;
|
backColor = Pal.gray;
|
||||||
frontColor = Color.white;
|
frontColor = Color.white;
|
||||||
@@ -136,8 +136,8 @@ public class Bullets implements ContentList{
|
|||||||
lifetime = 60f;
|
lifetime = 60f;
|
||||||
ammoMultiplier = 4f;
|
ammoMultiplier = 4f;
|
||||||
shootEffect = Fx.shootSmall;
|
shootEffect = Fx.shootSmall;
|
||||||
bulletWidth = 6f;
|
width = 6f;
|
||||||
bulletHeight = 8f;
|
height = 8f;
|
||||||
hitEffect = Fx.flakExplosion;
|
hitEffect = Fx.flakExplosion;
|
||||||
splashDamage = 27f;
|
splashDamage = 27f;
|
||||||
splashDamageRadius = 15f;
|
splashDamageRadius = 15f;
|
||||||
@@ -148,8 +148,8 @@ public class Bullets implements ContentList{
|
|||||||
ammoMultiplier = 5f;
|
ammoMultiplier = 5f;
|
||||||
shootEffect = Fx.shootSmall;
|
shootEffect = Fx.shootSmall;
|
||||||
reloadMultiplier = 0.5f;
|
reloadMultiplier = 0.5f;
|
||||||
bulletWidth = 6f;
|
width = 6f;
|
||||||
bulletHeight = 8f;
|
height = 8f;
|
||||||
hitEffect = Fx.flakExplosion;
|
hitEffect = Fx.flakExplosion;
|
||||||
splashDamage = 22f;
|
splashDamage = 22f;
|
||||||
splashDamageRadius = 24f;
|
splashDamageRadius = 24f;
|
||||||
@@ -160,8 +160,8 @@ public class Bullets implements ContentList{
|
|||||||
ammoMultiplier = 5f;
|
ammoMultiplier = 5f;
|
||||||
shootEffect = Fx.shootSmall;
|
shootEffect = Fx.shootSmall;
|
||||||
reloadMultiplier = 0.8f;
|
reloadMultiplier = 0.8f;
|
||||||
bulletWidth = 6f;
|
width = 6f;
|
||||||
bulletHeight = 8f;
|
height = 8f;
|
||||||
hitEffect = Fx.flakExplosion;
|
hitEffect = Fx.flakExplosion;
|
||||||
splashDamage = 20f;
|
splashDamage = 20f;
|
||||||
splashDamageRadius = 20f;
|
splashDamageRadius = 20f;
|
||||||
@@ -199,9 +199,9 @@ public class Bullets implements ContentList{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
missileExplosive = new MissileBulletType(2.7f, 10, "missile"){{
|
missileExplosive = new MissileBulletType(2.7f, 10, "missile"){{
|
||||||
bulletWidth = 8f;
|
width = 8f;
|
||||||
bulletHeight = 8f;
|
height = 8f;
|
||||||
bulletShrink = 0f;
|
shrinkY = 0f;
|
||||||
drag = -0.01f;
|
drag = -0.01f;
|
||||||
splashDamageRadius = 30f;
|
splashDamageRadius = 30f;
|
||||||
splashDamage = 30f;
|
splashDamage = 30f;
|
||||||
@@ -217,9 +217,9 @@ public class Bullets implements ContentList{
|
|||||||
missileIncendiary = new MissileBulletType(2.9f, 12, "missile"){{
|
missileIncendiary = new MissileBulletType(2.9f, 12, "missile"){{
|
||||||
frontColor = Pal.lightishOrange;
|
frontColor = Pal.lightishOrange;
|
||||||
backColor = Pal.lightOrange;
|
backColor = Pal.lightOrange;
|
||||||
bulletWidth = 7f;
|
width = 7f;
|
||||||
bulletHeight = 8f;
|
height = 8f;
|
||||||
bulletShrink = 0f;
|
shrinkY = 0f;
|
||||||
drag = -0.01f;
|
drag = -0.01f;
|
||||||
homingPower = 0.08f;
|
homingPower = 0.08f;
|
||||||
splashDamageRadius = 20f;
|
splashDamageRadius = 20f;
|
||||||
@@ -230,9 +230,9 @@ public class Bullets implements ContentList{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
missileSurge = new MissileBulletType(4.4f, 20, "bullet"){{
|
missileSurge = new MissileBulletType(4.4f, 20, "bullet"){{
|
||||||
bulletWidth = 8f;
|
width = 8f;
|
||||||
bulletHeight = 8f;
|
height = 8f;
|
||||||
bulletShrink = 0f;
|
shrinkY = 0f;
|
||||||
drag = -0.01f;
|
drag = -0.01f;
|
||||||
splashDamageRadius = 28f;
|
splashDamageRadius = 28f;
|
||||||
splashDamage = 40f;
|
splashDamage = 40f;
|
||||||
@@ -244,9 +244,9 @@ public class Bullets implements ContentList{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
missileJavelin = new MissileBulletType(5f, 10.5f, "missile"){{
|
missileJavelin = new MissileBulletType(5f, 10.5f, "missile"){{
|
||||||
bulletWidth = 8f;
|
width = 8f;
|
||||||
bulletHeight = 8f;
|
height = 8f;
|
||||||
bulletShrink = 0f;
|
shrinkY = 0f;
|
||||||
drag = -0.003f;
|
drag = -0.003f;
|
||||||
keepVelocity = false;
|
keepVelocity = false;
|
||||||
splashDamageRadius = 20f;
|
splashDamageRadius = 20f;
|
||||||
@@ -262,9 +262,9 @@ public class Bullets implements ContentList{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
missileSwarm = new MissileBulletType(2.7f, 12, "missile"){{
|
missileSwarm = new MissileBulletType(2.7f, 12, "missile"){{
|
||||||
bulletWidth = 8f;
|
width = 8f;
|
||||||
bulletHeight = 8f;
|
height = 8f;
|
||||||
bulletShrink = 0f;
|
shrinkY = 0f;
|
||||||
drag = -0.003f;
|
drag = -0.003f;
|
||||||
homingRange = 60f;
|
homingRange = 60f;
|
||||||
keepVelocity = false;
|
keepVelocity = false;
|
||||||
@@ -281,8 +281,8 @@ public class Bullets implements ContentList{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
standardCopper = new BasicBulletType(2.5f, 9, "bullet"){{
|
standardCopper = new BasicBulletType(2.5f, 9, "bullet"){{
|
||||||
bulletWidth = 7f;
|
width = 7f;
|
||||||
bulletHeight = 9f;
|
height = 9f;
|
||||||
lifetime = 60f;
|
lifetime = 60f;
|
||||||
shootEffect = Fx.shootSmall;
|
shootEffect = Fx.shootSmall;
|
||||||
smokeEffect = Fx.shootSmallSmoke;
|
smokeEffect = Fx.shootSmallSmoke;
|
||||||
@@ -290,16 +290,16 @@ public class Bullets implements ContentList{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
standardDense = new BasicBulletType(3.5f, 18, "bullet"){{
|
standardDense = new BasicBulletType(3.5f, 18, "bullet"){{
|
||||||
bulletWidth = 9f;
|
width = 9f;
|
||||||
bulletHeight = 12f;
|
height = 12f;
|
||||||
reloadMultiplier = 0.6f;
|
reloadMultiplier = 0.6f;
|
||||||
ammoMultiplier = 4;
|
ammoMultiplier = 4;
|
||||||
lifetime = 60f;
|
lifetime = 60f;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
standardThorium = new BasicBulletType(4f, 29, "bullet"){{
|
standardThorium = new BasicBulletType(4f, 29, "bullet"){{
|
||||||
bulletWidth = 10f;
|
width = 10f;
|
||||||
bulletHeight = 13f;
|
height = 13f;
|
||||||
shootEffect = Fx.shootBig;
|
shootEffect = Fx.shootBig;
|
||||||
smokeEffect = Fx.shootBigSmoke;
|
smokeEffect = Fx.shootBigSmoke;
|
||||||
ammoMultiplier = 4;
|
ammoMultiplier = 4;
|
||||||
@@ -307,8 +307,8 @@ public class Bullets implements ContentList{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
standardHoming = new BasicBulletType(3f, 12, "bullet"){{
|
standardHoming = new BasicBulletType(3f, 12, "bullet"){{
|
||||||
bulletWidth = 7f;
|
width = 7f;
|
||||||
bulletHeight = 9f;
|
height = 9f;
|
||||||
homingPower = 0.08f;
|
homingPower = 0.08f;
|
||||||
reloadMultiplier = 1.5f;
|
reloadMultiplier = 1.5f;
|
||||||
ammoMultiplier = 5;
|
ammoMultiplier = 5;
|
||||||
@@ -316,8 +316,8 @@ public class Bullets implements ContentList{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
standardIncendiary = new BasicBulletType(3.2f, 11, "bullet"){{
|
standardIncendiary = new BasicBulletType(3.2f, 11, "bullet"){{
|
||||||
bulletWidth = 10f;
|
width = 10f;
|
||||||
bulletHeight = 12f;
|
height = 12f;
|
||||||
frontColor = Pal.lightishOrange;
|
frontColor = Pal.lightishOrange;
|
||||||
backColor = Pal.lightOrange;
|
backColor = Pal.lightOrange;
|
||||||
status = StatusEffects.burning;
|
status = StatusEffects.burning;
|
||||||
@@ -326,8 +326,8 @@ public class Bullets implements ContentList{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
standardGlaive = new BasicBulletType(4f, 7.5f, "bullet"){{
|
standardGlaive = new BasicBulletType(4f, 7.5f, "bullet"){{
|
||||||
bulletWidth = 10f;
|
width = 10f;
|
||||||
bulletHeight = 12f;
|
height = 12f;
|
||||||
frontColor = Color.valueOf("feb380");
|
frontColor = Color.valueOf("feb380");
|
||||||
backColor = Color.valueOf("ea8878");
|
backColor = Color.valueOf("ea8878");
|
||||||
status = StatusEffects.burning;
|
status = StatusEffects.burning;
|
||||||
@@ -335,28 +335,28 @@ public class Bullets implements ContentList{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
standardMechSmall = new BasicBulletType(4f, 9, "bullet"){{
|
standardMechSmall = new BasicBulletType(4f, 9, "bullet"){{
|
||||||
bulletWidth = 11f;
|
width = 11f;
|
||||||
bulletHeight = 14f;
|
height = 14f;
|
||||||
lifetime = 40f;
|
lifetime = 40f;
|
||||||
inaccuracy = 5f;
|
inaccuracy = 5f;
|
||||||
despawnEffect = Fx.hitBulletSmall;
|
despawnEffect = Fx.hitBulletSmall;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
standardDenseBig = new BasicBulletType(7f, 55, "bullet"){{
|
standardDenseBig = new BasicBulletType(7f, 55, "bullet"){{
|
||||||
bulletWidth = 15f;
|
width = 15f;
|
||||||
bulletHeight = 21f;
|
height = 21f;
|
||||||
shootEffect = Fx.shootBig;
|
shootEffect = Fx.shootBig;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
standardThoriumBig = new BasicBulletType(8f, 80, "bullet"){{
|
standardThoriumBig = new BasicBulletType(8f, 80, "bullet"){{
|
||||||
bulletWidth = 16f;
|
width = 16f;
|
||||||
bulletHeight = 23f;
|
height = 23f;
|
||||||
shootEffect = Fx.shootBig;
|
shootEffect = Fx.shootBig;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
standardIncendiaryBig = new BasicBulletType(7f, 60, "bullet"){{
|
standardIncendiaryBig = new BasicBulletType(7f, 60, "bullet"){{
|
||||||
bulletWidth = 16f;
|
width = 16f;
|
||||||
bulletHeight = 21f;
|
height = 21f;
|
||||||
frontColor = Pal.lightishOrange;
|
frontColor = Pal.lightishOrange;
|
||||||
backColor = Pal.lightOrange;
|
backColor = Pal.lightOrange;
|
||||||
status = StatusEffects.burning;
|
status = StatusEffects.burning;
|
||||||
@@ -510,16 +510,16 @@ public class Bullets implements ContentList{
|
|||||||
driverBolt = new MassDriverBolt();
|
driverBolt = new MassDriverBolt();
|
||||||
|
|
||||||
frag = new BasicBulletType(5f, 8, "bullet"){{
|
frag = new BasicBulletType(5f, 8, "bullet"){{
|
||||||
bulletWidth = 8f;
|
width = 8f;
|
||||||
bulletHeight = 9f;
|
height = 9f;
|
||||||
bulletShrink = 0.5f;
|
shrinkY = 0.5f;
|
||||||
lifetime = 50f;
|
lifetime = 50f;
|
||||||
drag = 0.04f;
|
drag = 0.04f;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
bombExplosive = new BombBulletType(18f, 25f, "shell"){{
|
bombExplosive = new BombBulletType(18f, 25f, "shell"){{
|
||||||
bulletWidth = 10f;
|
width = 10f;
|
||||||
bulletHeight = 14f;
|
height = 14f;
|
||||||
hitEffect = Fx.flakExplosion;
|
hitEffect = Fx.flakExplosion;
|
||||||
shootEffect = Fx.none;
|
shootEffect = Fx.none;
|
||||||
smokeEffect = Fx.none;
|
smokeEffect = Fx.none;
|
||||||
@@ -529,8 +529,8 @@ public class Bullets implements ContentList{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
bombIncendiary = new BombBulletType(7f, 10f, "shell"){{
|
bombIncendiary = new BombBulletType(7f, 10f, "shell"){{
|
||||||
bulletWidth = 8f;
|
width = 8f;
|
||||||
bulletHeight = 12f;
|
height = 12f;
|
||||||
hitEffect = Fx.flakExplosion;
|
hitEffect = Fx.flakExplosion;
|
||||||
backColor = Pal.lightOrange;
|
backColor = Pal.lightOrange;
|
||||||
frontColor = Pal.lightishOrange;
|
frontColor = Pal.lightishOrange;
|
||||||
@@ -541,8 +541,8 @@ public class Bullets implements ContentList{
|
|||||||
|
|
||||||
bombOil = new BombBulletType(2f, 3f, "shell"){
|
bombOil = new BombBulletType(2f, 3f, "shell"){
|
||||||
{
|
{
|
||||||
bulletWidth = 8f;
|
width = 8f;
|
||||||
bulletHeight = 12f;
|
height = 12f;
|
||||||
hitEffect = Fx.pulverize;
|
hitEffect = Fx.pulverize;
|
||||||
backColor = new Color(0x4f4f4fff);
|
backColor = new Color(0x4f4f4fff);
|
||||||
frontColor = Color.gray;
|
frontColor = Color.gray;
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
package mindustry.content;
|
package mindustry.content;
|
||||||
|
|
||||||
import arc.graphics.*;
|
import arc.graphics.*;
|
||||||
|
import arc.graphics.g2d.*;
|
||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
|
import arc.math.geom.*;
|
||||||
import arc.struct.*;
|
import arc.struct.*;
|
||||||
|
import arc.util.*;
|
||||||
import mindustry.ai.types.*;
|
import mindustry.ai.types.*;
|
||||||
import mindustry.annotations.Annotations.*;
|
import mindustry.annotations.Annotations.*;
|
||||||
import mindustry.ctype.*;
|
import mindustry.ctype.*;
|
||||||
@@ -197,7 +200,7 @@ public class UnitTypes implements ContentList{
|
|||||||
hitEffect = Fx.blastExplosion;
|
hitEffect = Fx.blastExplosion;
|
||||||
knockback = 0.8f;
|
knockback = 0.8f;
|
||||||
lifetime = 110f;
|
lifetime = 110f;
|
||||||
bulletWidth = bulletHeight = 14f;
|
width = height = 14f;
|
||||||
collides = true;
|
collides = true;
|
||||||
collidesTiles = true;
|
collidesTiles = true;
|
||||||
splashDamageRadius = 20f;
|
splashDamageRadius = 20f;
|
||||||
@@ -371,9 +374,9 @@ public class UnitTypes implements ContentList{
|
|||||||
shake = 1f;
|
shake = 1f;
|
||||||
|
|
||||||
bullet = new MissileBulletType(2.7f, 12, "missile"){{
|
bullet = new MissileBulletType(2.7f, 12, "missile"){{
|
||||||
bulletWidth = 8f;
|
width = 8f;
|
||||||
bulletHeight = 8f;
|
height = 8f;
|
||||||
bulletShrink = 0f;
|
shrinkY = 0f;
|
||||||
drag = -0.003f;
|
drag = -0.003f;
|
||||||
homingRange = 60f;
|
homingRange = 60f;
|
||||||
keepVelocity = false;
|
keepVelocity = false;
|
||||||
@@ -403,6 +406,7 @@ public class UnitTypes implements ContentList{
|
|||||||
engineOffset = 38;
|
engineOffset = 38;
|
||||||
engineSize = 7.3f;
|
engineSize = 7.3f;
|
||||||
hitsize = 58f;
|
hitsize = 58f;
|
||||||
|
parts = 4;
|
||||||
|
|
||||||
weapons.add(new Weapon(){{
|
weapons.add(new Weapon(){{
|
||||||
y = 1.5f;
|
y = 1.5f;
|
||||||
@@ -412,7 +416,63 @@ public class UnitTypes implements ContentList{
|
|||||||
bullet = Bullets.standardCopper;
|
bullet = Bullets.standardCopper;
|
||||||
shootSound = Sounds.shoot;
|
shootSound = Sounds.shoot;
|
||||||
}});
|
}});
|
||||||
}};
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawBody(Unitc unit){
|
||||||
|
applyColor(unit);
|
||||||
|
|
||||||
|
for(int i = 0; i < parts; i++){
|
||||||
|
Vec2 v = drift(i);
|
||||||
|
Draw.rect(partRegions[i], unit.x() + v.x, unit.y() + v.y, unit.rotation() - 90 + rot(unit, i));
|
||||||
|
}
|
||||||
|
|
||||||
|
Draw.reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawCell(Unitc unit){
|
||||||
|
applyColor(unit);
|
||||||
|
|
||||||
|
Draw.color(cellColor(unit));
|
||||||
|
for(int i = 0; i < parts; i++){
|
||||||
|
Vec2 v = drift(i);
|
||||||
|
Draw.rect(partCellRegions[i], unit.x() + v.x, unit.y() + v.y, unit.rotation() - 90 + rot(unit, i));
|
||||||
|
}
|
||||||
|
Draw.reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawEngine(Unitc unit){
|
||||||
|
float bend = rot(unit, parts - 1);
|
||||||
|
Vec2 v = drift(parts - 1);
|
||||||
|
float cx = Angles.trnsx(bend + unit.rotation() + 180, engineOffset) - Angles.trnsx(unit.rotation() + 180, engineOffset) + v.x,
|
||||||
|
cy = Angles.trnsy(bend + unit.rotation() + 180, engineOffset) - Angles.trnsy(unit.rotation() + 180, engineOffset) + v.y;
|
||||||
|
unit.trns(cx, cy);
|
||||||
|
|
||||||
|
super.drawEngine(unit);
|
||||||
|
|
||||||
|
unit.trns(-cx, -cy);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void update(Unitc unit){
|
||||||
|
unit.animation(Mathf.slerpDelta(unit.animation(), unit.rotation(), 0.01f));
|
||||||
|
}
|
||||||
|
|
||||||
|
Vec2 drift(int i){
|
||||||
|
float l = 0.5f;
|
||||||
|
float s = 12f;
|
||||||
|
float off = i*19;
|
||||||
|
return Tmp.v1.set(Mathf.absin(Time.time()+off, s, l), Mathf.absin(Time.time() + 94+off, s, l)).limit(l);
|
||||||
|
}
|
||||||
|
|
||||||
|
float rot(Unitc unit, int i){
|
||||||
|
float offset = ((i + 0.5f) - parts/2f) / (parts/2f);
|
||||||
|
float mag = i == parts - 1 ? 8f : 13f;
|
||||||
|
return Mathf.clamp((unit.animation() - unit.rotation()) / 3f, -mag, mag) * offset;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
vanguard = new UnitType("vanguard"){{
|
vanguard = new UnitType("vanguard"){{
|
||||||
@@ -487,8 +547,8 @@ public class UnitTypes implements ContentList{
|
|||||||
alternate = true;
|
alternate = true;
|
||||||
|
|
||||||
bullet = new BasicBulletType(2.5f, 9){{
|
bullet = new BasicBulletType(2.5f, 9){{
|
||||||
bulletWidth = 7f;
|
width = 7f;
|
||||||
bulletHeight = 9f;
|
height = 9f;
|
||||||
lifetime = 60f;
|
lifetime = 60f;
|
||||||
shootEffect = Fx.shootSmall;
|
shootEffect = Fx.shootSmall;
|
||||||
smokeEffect = Fx.shootSmallSmoke;
|
smokeEffect = Fx.shootSmallSmoke;
|
||||||
|
|||||||
@@ -37,12 +37,12 @@ public class ArtilleryBulletType extends BasicBulletType{
|
|||||||
float baseScale = 0.7f;
|
float baseScale = 0.7f;
|
||||||
float scale = (baseScale + b.fslope() * (1f - baseScale));
|
float scale = (baseScale + b.fslope() * (1f - baseScale));
|
||||||
|
|
||||||
float height = bulletHeight * ((1f - bulletShrink) + bulletShrink * b.fout());
|
float height = this.height * ((1f - shrinkY) + shrinkY * b.fout());
|
||||||
|
|
||||||
Draw.color(backColor);
|
Draw.color(backColor);
|
||||||
Draw.rect(backRegion, b.x(), b.y(), bulletWidth * scale, height * scale, b.rotation() - 90);
|
Draw.rect(backRegion, b.x(), b.y(), width * scale, height * scale, b.rotation() - 90);
|
||||||
Draw.color(frontColor);
|
Draw.color(frontColor);
|
||||||
Draw.rect(frontRegion, b.x(), b.y(), bulletWidth * scale, height * scale, b.rotation() - 90);
|
Draw.rect(frontRegion, b.x(), b.y(), width * scale, height * scale, b.rotation() - 90);
|
||||||
Draw.color();
|
Draw.color();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,16 +10,16 @@ import mindustry.graphics.Pal;
|
|||||||
/** An extended BulletType for most ammo-based bullets shot from turrets and units. */
|
/** An extended BulletType for most ammo-based bullets shot from turrets and units. */
|
||||||
public class BasicBulletType extends BulletType{
|
public class BasicBulletType extends BulletType{
|
||||||
public Color backColor = Pal.bulletYellowBack, frontColor = Pal.bulletYellow;
|
public Color backColor = Pal.bulletYellowBack, frontColor = Pal.bulletYellow;
|
||||||
public float bulletWidth = 5f, bulletHeight = 7f;
|
public float width = 5f, height = 7f;
|
||||||
public float bulletShrink = 0.5f;
|
public float shrinkX = 0f, shrinkY = 0.5f;
|
||||||
public String bulletSprite;
|
public String sprite;
|
||||||
|
|
||||||
public TextureRegion backRegion;
|
public TextureRegion backRegion;
|
||||||
public TextureRegion frontRegion;
|
public TextureRegion frontRegion;
|
||||||
|
|
||||||
public BasicBulletType(float speed, float damage, String bulletSprite){
|
public BasicBulletType(float speed, float damage, String bulletSprite){
|
||||||
super(speed, damage);
|
super(speed, damage);
|
||||||
this.bulletSprite = bulletSprite;
|
this.sprite = bulletSprite;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -34,18 +34,19 @@ public class BasicBulletType extends BulletType{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void load(){
|
public void load(){
|
||||||
backRegion = Core.atlas.find(bulletSprite + "-back");
|
backRegion = Core.atlas.find(sprite + "-back");
|
||||||
frontRegion = Core.atlas.find(bulletSprite);
|
frontRegion = Core.atlas.find(sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void draw(Bulletc b){
|
public void draw(Bulletc b){
|
||||||
float height = bulletHeight * ((1f - bulletShrink) + bulletShrink * b.fout());
|
float height = this.height * ((1f - shrinkY) + shrinkY * b.fout());
|
||||||
|
float width = this.width * ((1f - shrinkX) + shrinkX * b.fout());
|
||||||
|
|
||||||
Draw.color(backColor);
|
Draw.color(backColor);
|
||||||
Draw.rect(backRegion, b.x(), b.y(), bulletWidth, height, b.rotation() - 90);
|
Draw.rect(backRegion, b.x(), b.y(), width, height, b.rotation() - 90);
|
||||||
Draw.color(frontColor);
|
Draw.color(frontColor);
|
||||||
Draw.rect(frontRegion, b.x(), b.y(), bulletWidth, height, b.rotation() - 90);
|
Draw.rect(frontRegion, b.x(), b.y(), width, height, b.rotation() - 90);
|
||||||
Draw.color();
|
Draw.color();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ public class BombBulletType extends BasicBulletType{
|
|||||||
splashDamage = damage;
|
splashDamage = damage;
|
||||||
collidesTiles = false;
|
collidesTiles = false;
|
||||||
collides = false;
|
collides = false;
|
||||||
bulletShrink = 0.7f;
|
shrinkY = 0.7f;
|
||||||
lifetime = 30f;
|
lifetime = 30f;
|
||||||
drag = 0.05f;
|
drag = 0.05f;
|
||||||
keepVelocity = false;
|
keepVelocity = false;
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ public class FlakBulletType extends BasicBulletType{
|
|||||||
splashDamage = 15f;
|
splashDamage = 15f;
|
||||||
splashDamageRadius = 34f;
|
splashDamageRadius = 34f;
|
||||||
hitEffect = Fx.flakExplosionBig;
|
hitEffect = Fx.flakExplosionBig;
|
||||||
bulletWidth = 8f;
|
width = 8f;
|
||||||
bulletHeight = 10f;
|
height = 10f;
|
||||||
collidesGround = false;
|
collidesGround = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
|
|||||||
private UnitController controller;
|
private UnitController controller;
|
||||||
private UnitType type;
|
private UnitType type;
|
||||||
boolean spawnedByCore;
|
boolean spawnedByCore;
|
||||||
|
float animation;
|
||||||
|
|
||||||
public void moveAt(Vec2 vector){
|
public void moveAt(Vec2 vector){
|
||||||
moveAt(vector, type.accel);
|
moveAt(vector, type.accel);
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ import static mindustry.Vars.*;
|
|||||||
|
|
||||||
public class UnitType extends UnlockableContent{
|
public class UnitType extends UnlockableContent{
|
||||||
public static final float shadowTX = -12, shadowTY = -13, shadowColor = Color.toFloatBits(0, 0, 0, 0.22f);
|
public static final float shadowTX = -12, shadowTY = -13, shadowColor = Color.toFloatBits(0, 0, 0, 0.22f);
|
||||||
public static final boolean debug = false;
|
|
||||||
private static final Vec2 legOffset = new Vec2();
|
private static final Vec2 legOffset = new Vec2();
|
||||||
|
|
||||||
public boolean flying;
|
public boolean flying;
|
||||||
@@ -62,6 +61,7 @@ public class UnitType extends UnlockableContent{
|
|||||||
public float lightRadius = 60f, lightOpacity = 0.6f;
|
public float lightRadius = 60f, lightOpacity = 0.6f;
|
||||||
public Color lightColor = Pal.powerLight;
|
public Color lightColor = Pal.powerLight;
|
||||||
public boolean drawCell = true, drawItems = true;
|
public boolean drawCell = true, drawItems = true;
|
||||||
|
public int parts = 0;
|
||||||
|
|
||||||
public ObjectSet<StatusEffect> immunities = new ObjectSet<>();
|
public ObjectSet<StatusEffect> immunities = new ObjectSet<>();
|
||||||
public Sound deathSound = Sounds.bang;
|
public Sound deathSound = Sounds.bang;
|
||||||
@@ -69,16 +69,13 @@ public class UnitType extends UnlockableContent{
|
|||||||
public Seq<Weapon> weapons = new Seq<>();
|
public Seq<Weapon> weapons = new Seq<>();
|
||||||
public TextureRegion baseRegion, legRegion, region, shadowRegion, cellRegion,
|
public TextureRegion baseRegion, legRegion, region, shadowRegion, cellRegion,
|
||||||
occlusionRegion, jointRegion, footRegion, legBaseRegion, baseJointRegion;
|
occlusionRegion, jointRegion, footRegion, legBaseRegion, baseJointRegion;
|
||||||
|
public TextureRegion[] partRegions;
|
||||||
|
public TextureRegion[] partCellRegions;
|
||||||
|
|
||||||
public UnitType(String name){
|
public UnitType(String name){
|
||||||
super(name);
|
super(name);
|
||||||
|
|
||||||
if(EntityMapping.map(name) != null){
|
constructor = EntityMapping.map(name);
|
||||||
constructor = EntityMapping.map(name);
|
|
||||||
}else{
|
|
||||||
//TODO fix for mods
|
|
||||||
throw new RuntimeException("Unit has no type: " + name);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public UnitController createController(){
|
public UnitController createController(){
|
||||||
@@ -130,6 +127,14 @@ public class UnitType extends UnlockableContent{
|
|||||||
cellRegion = Core.atlas.find(name + "-cell", Core.atlas.find("power-cell"));
|
cellRegion = Core.atlas.find(name + "-cell", Core.atlas.find("power-cell"));
|
||||||
occlusionRegion = Core.atlas.find("circle-shadow");
|
occlusionRegion = Core.atlas.find("circle-shadow");
|
||||||
shadowRegion = icon(Cicon.full);
|
shadowRegion = icon(Cicon.full);
|
||||||
|
|
||||||
|
partRegions = new TextureRegion[parts];
|
||||||
|
partCellRegions = new TextureRegion[parts];
|
||||||
|
|
||||||
|
for(int i = 0; i < parts; i++){
|
||||||
|
partRegions[i] = Core.atlas.find(name + "-part" + i);
|
||||||
|
partCellRegions[i] = Core.atlas.find(name + "-cell" + i);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -175,12 +180,10 @@ public class UnitType extends UnlockableContent{
|
|||||||
drawOcclusion(unit);
|
drawOcclusion(unit);
|
||||||
|
|
||||||
Draw.z(z);
|
Draw.z(z);
|
||||||
drawEngine(unit);
|
if(engineSize > 0) drawEngine(unit);
|
||||||
if(!debug){
|
drawBody(unit);
|
||||||
drawBody(unit);
|
if(drawCell) drawCell(unit);
|
||||||
if(drawCell) drawCell(unit);
|
drawWeapons(unit);
|
||||||
drawWeapons(unit);
|
|
||||||
}
|
|
||||||
if(drawItems) drawItems(unit);
|
if(drawItems) drawItems(unit);
|
||||||
drawLight(unit);
|
drawLight(unit);
|
||||||
|
|
||||||
@@ -328,11 +331,15 @@ public class UnitType extends UnlockableContent{
|
|||||||
public void drawCell(Unitc unit){
|
public void drawCell(Unitc unit){
|
||||||
applyColor(unit);
|
applyColor(unit);
|
||||||
|
|
||||||
Draw.color(Color.black, unit.team().color, unit.healthf() + Mathf.absin(Time.time(), Math.max(unit.healthf() * 5f, 1f), 1f - unit.healthf()));
|
Draw.color(cellColor(unit));
|
||||||
Draw.rect(cellRegion, unit, unit.rotation() - 90);
|
Draw.rect(cellRegion, unit, unit.rotation() - 90);
|
||||||
Draw.reset();
|
Draw.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Color cellColor(Unitc unit){
|
||||||
|
return Tmp.c1.set(Color.black).lerp(unit.team().color, unit.healthf() + Mathf.absin(Time.time(), Math.max(unit.healthf() * 5f, 1f), 1f - unit.healthf()));
|
||||||
|
}
|
||||||
|
|
||||||
public void drawLight(Unitc unit){
|
public void drawLight(Unitc unit){
|
||||||
if(lightRadius > 0){
|
if(lightRadius > 0){
|
||||||
Drawf.light(unit, lightRadius, lightColor, lightOpacity);
|
Drawf.light(unit, lightRadius, lightColor, lightOpacity);
|
||||||
@@ -367,38 +374,28 @@ public class UnitType extends UnlockableContent{
|
|||||||
|
|
||||||
Tmp.v1.set(leg.base).sub(leg.joint).inv().setLength(legExtension);
|
Tmp.v1.set(leg.base).sub(leg.joint).inv().setLength(legExtension);
|
||||||
|
|
||||||
if(debug){
|
if(leg.moving && baseElevation > 0){
|
||||||
Draw.color(Color.red);
|
float scl = baseElevation;
|
||||||
Lines.line(position.x, position.y, leg.joint.x, leg.joint.y);
|
float elev = Mathf.slope(1f - leg.stage) * scl;
|
||||||
|
Draw.color(shadowColor);
|
||||||
|
Draw.rect(footRegion, leg.base.x + shadowTX * elev, leg.base.y + shadowTY * elev, position.angleTo(leg.base));
|
||||||
|
Draw.color();
|
||||||
|
}
|
||||||
|
|
||||||
Draw.color(Color.green);
|
Draw.rect(footRegion, leg.base.x, leg.base.y, position.angleTo(leg.base));
|
||||||
Lines.line(leg.joint.x, leg.joint.y, leg.base.x, leg.base.y);
|
|
||||||
|
|
||||||
Draw.reset();
|
Lines.stroke(legRegion.getHeight() * Draw.scl * flips);
|
||||||
}else{
|
Lines.line(legRegion, position.x, position.y, leg.joint.x, leg.joint.y, CapStyle.none, 0);
|
||||||
if(leg.moving && baseElevation > 0){
|
|
||||||
float scl = baseElevation;
|
|
||||||
float elev = Mathf.slope(1f - leg.stage) * scl;
|
|
||||||
Draw.color(shadowColor);
|
|
||||||
Draw.rect(footRegion, leg.base.x + shadowTX * elev, leg.base.y + shadowTY * elev, position.angleTo(leg.base));
|
|
||||||
Draw.color();
|
|
||||||
}
|
|
||||||
|
|
||||||
Draw.rect(footRegion, leg.base.x, leg.base.y, position.angleTo(leg.base));
|
Lines.stroke(legBaseRegion.getHeight() * Draw.scl * flips);
|
||||||
|
Lines.line(legBaseRegion, leg.joint.x + Tmp.v1.x, leg.joint.y + Tmp.v1.y, leg.base.x, leg.base.y, CapStyle.none, 0);
|
||||||
|
|
||||||
Lines.stroke(legRegion.getHeight() * Draw.scl * flips);
|
if(jointRegion.found()){
|
||||||
Lines.line(legRegion, position.x, position.y, leg.joint.x, leg.joint.y, CapStyle.none, 0);
|
Draw.rect(jointRegion, leg.joint.x, leg.joint.y);
|
||||||
|
}
|
||||||
|
|
||||||
Lines.stroke(legBaseRegion.getHeight() * Draw.scl * flips);
|
if(baseJointRegion.found()){
|
||||||
Lines.line(legBaseRegion, leg.joint.x + Tmp.v1.x, leg.joint.y + Tmp.v1.y, leg.base.x, leg.base.y, CapStyle.none, 0);
|
Draw.rect(baseJointRegion, position.x, position.y, rotation);
|
||||||
|
|
||||||
if(jointRegion.found()){
|
|
||||||
Draw.rect(jointRegion, leg.joint.x, leg.joint.y);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(baseJointRegion.found()){
|
|
||||||
Draw.rect(baseJointRegion, position.x, position.y, rotation);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ import java.util.*;
|
|||||||
import static mindustry.Vars.*;
|
import static mindustry.Vars.*;
|
||||||
|
|
||||||
public class Block extends UnlockableContent{
|
public class Block extends UnlockableContent{
|
||||||
public static final int crackRegions = 8, maxCrackSize = 5;
|
public static final int crackRegions = 8, maxCrackSize = 9;
|
||||||
|
|
||||||
public boolean hasItems;
|
public boolean hasItems;
|
||||||
public boolean hasLiquids;
|
public boolean hasLiquids;
|
||||||
|
|||||||
@@ -75,8 +75,8 @@ public class PayloadConveyor extends Block{
|
|||||||
//differing sizes
|
//differing sizes
|
||||||
(accept.block().size > size &&
|
(accept.block().size > size &&
|
||||||
(rotation() % 2 == 0 ? //check orientation
|
(rotation() % 2 == 0 ? //check orientation
|
||||||
Math.abs(accept.y() - y) <= accept.block().size * tilesize - size * tilesize : //check Y alignment
|
Math.abs(accept.y() - y) <= (accept.block().size * tilesize - size * tilesize)/2f : //check Y alignment
|
||||||
Math.abs(accept.x() - x) <= accept.block().size * tilesize - size * tilesize //check X alignment
|
Math.abs(accept.x() - x) <= (accept.block().size * tilesize - size * tilesize)/2f //check X alignment
|
||||||
)))){
|
)))){
|
||||||
next = accept;
|
next = accept;
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ public class BlockLoader extends PayloadAcceptor{
|
|||||||
|
|
||||||
//draw input
|
//draw input
|
||||||
for(int i = 0; i < 4; i++){
|
for(int i = 0; i < 4; i++){
|
||||||
if(blends(this, i) && i != rotation()){
|
if(blends(i) && i != rotation()){
|
||||||
Draw.rect(inRegion, x, y, i * 90);
|
Draw.rect(inRegion, x, y, i * 90);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,11 +30,20 @@ public class PayloadAcceptor extends Block{
|
|||||||
int size = tile.block().size;
|
int size = tile.block().size;
|
||||||
Tilec accept = tile.nearby(Geometry.d4(direction).x * size, Geometry.d4(direction).y * size);
|
Tilec accept = tile.nearby(Geometry.d4(direction).x * size, Geometry.d4(direction).y * size);
|
||||||
return accept != null &&
|
return accept != null &&
|
||||||
accept.block().size == size &&
|
|
||||||
accept.block().outputsPayload &&
|
accept.block().outputsPayload &&
|
||||||
//block must either be facing this one, or not be rotating
|
|
||||||
|
//if size is the same, block must either be facing this one, or not be rotating
|
||||||
|
((accept.block().size == size &&
|
||||||
((accept.tileX() + Geometry.d4(accept.rotation()).x * size == tile.tileX() && accept.tileY() + Geometry.d4(accept.rotation()).y * size == tile.tileY())
|
((accept.tileX() + Geometry.d4(accept.rotation()).x * size == tile.tileX() && accept.tileY() + Geometry.d4(accept.rotation()).y * size == tile.tileY())
|
||||||
|| !accept.block().rotate || (accept.block().rotate && !accept.block().outputFacing));
|
|| !accept.block().rotate || (accept.block().rotate && !accept.block().outputFacing))) ||
|
||||||
|
|
||||||
|
//if the other block is smaller, check alignment
|
||||||
|
(accept.block().size < size &&
|
||||||
|
(accept.rotation() % 2 == 0 ? //check orientation; make sure it's aligned properly with this block.
|
||||||
|
Math.abs(accept.y() - tile.y()) <= (size * tilesize - accept.block().size * tilesize)/2f : //check Y alignment
|
||||||
|
Math.abs(accept.x() - tile.x()) <= (size * tilesize - accept.block().size * tilesize)/2f //check X alignment
|
||||||
|
)) && (!accept.block().rotate || accept.front() == tile || !accept.block().outputFacing) //make sure it's facing this block
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public class PayloadAcceptorEntity<T extends Payload> extends TileEntity{
|
public class PayloadAcceptorEntity<T extends Payload> extends TileEntity{
|
||||||
@@ -63,6 +72,10 @@ public class PayloadAcceptor extends Block{
|
|||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean blends(int direction){
|
||||||
|
return PayloadAcceptor.blends(this, direction);
|
||||||
|
}
|
||||||
|
|
||||||
public void updatePayload(){
|
public void updatePayload(){
|
||||||
if(payload != null){
|
if(payload != null){
|
||||||
payload.set(x + payVector.x, y + payVector.y, payRotation);
|
payload.set(x + payVector.x, y + payVector.y, payRotation);
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import mindustry.ui.*;
|
|||||||
import mindustry.world.blocks.payloads.*;
|
import mindustry.world.blocks.payloads.*;
|
||||||
import mindustry.world.meta.*;
|
import mindustry.world.meta.*;
|
||||||
|
|
||||||
import static mindustry.Vars.state;
|
import static mindustry.Vars.*;
|
||||||
|
|
||||||
public class Reconstructor extends UnitBlock{
|
public class Reconstructor extends UnitBlock{
|
||||||
public float constructTime = 60 * 2;
|
public float constructTime = 60 * 2;
|
||||||
@@ -63,7 +63,7 @@ public class Reconstructor extends UnitBlock{
|
|||||||
|
|
||||||
//draw input
|
//draw input
|
||||||
for(int i = 0; i < 4; i++){
|
for(int i = 0; i < 4; i++){
|
||||||
if(blends(this, i) && i != rotation()){
|
if(blends(i) && i != rotation()){
|
||||||
Draw.rect(inRegion, x, y, i * 90);
|
Draw.rect(inRegion, x, y, i * 90);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
org.gradle.daemon=true
|
org.gradle.daemon=true
|
||||||
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
||||||
archash=fe98ee919fd2c8761640281e2c4640ddb8765264
|
archash=c8b730cd1b8f188d2d5508e85505fbfb0e324b5f
|
||||||
|
|||||||
@@ -244,45 +244,55 @@ public class Generators{
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
ImagePacker.generate("unit-icons", () -> {
|
ImagePacker.generate("unit-icons", () -> content.units().each(type -> {
|
||||||
content.units().each(type -> {
|
if(type.isHidden()) return; //hidden units don't generate
|
||||||
type.load();
|
|
||||||
try{
|
|
||||||
|
|
||||||
Image image = ImagePacker.get(type.region);
|
type.load();
|
||||||
|
|
||||||
if(type.constructor.get() instanceof Mechc){
|
Image image = ImagePacker.get(type.parts > 0 ? type.partRegions[0] : type.region);
|
||||||
image.drawCenter(type.baseRegion);
|
for(int i = 1; i < type.parts; i++){
|
||||||
image.drawCenter(type.legRegion);
|
image.draw(ImagePacker.get(type.partRegions[i]));
|
||||||
image.drawCenter(type.legRegion, true, false);
|
}
|
||||||
}
|
if(type.parts > 0){
|
||||||
image.draw(type.region);
|
image.save(type.name);
|
||||||
|
}
|
||||||
|
|
||||||
Image baseCell = ImagePacker.get(type.cellRegion);
|
if(type.constructor.get() instanceof Mechc){
|
||||||
Image cell = new Image(type.cellRegion.getWidth(), type.cellRegion.getHeight());
|
image.drawCenter(type.baseRegion);
|
||||||
cell.each((x, y) -> cell.draw(x, y, baseCell.getColor(x, y).mul(Color.valueOf("ffa665"))));
|
image.drawCenter(type.legRegion);
|
||||||
|
image.drawCenter(type.legRegion, true, false);
|
||||||
|
image.draw(type.region);
|
||||||
|
}
|
||||||
|
|
||||||
image.draw(cell, image.width / 2 - cell.width / 2, image.height / 2 - cell.height / 2);
|
Image baseCell = ImagePacker.get(type.parts > 0 ? type.partCellRegions[0] : type.cellRegion);
|
||||||
|
for(int i = 1; i < type.parts; i++){
|
||||||
|
baseCell.draw(ImagePacker.get(type.partCellRegions[i]));
|
||||||
|
}
|
||||||
|
|
||||||
for(Weapon weapon : type.weapons){
|
if(type.parts > 0){
|
||||||
weapon.load();
|
image.save(type.name + "-cell");
|
||||||
|
}
|
||||||
|
|
||||||
for(int i : (weapon.mirror ? Mathf.signs : Mathf.one)){
|
Image cell = new Image(type.cellRegion.getWidth(), type.cellRegion.getHeight());
|
||||||
i *= Mathf.sign(weapon.flipped);
|
cell.each((x, y) -> cell.draw(x, y, baseCell.getColor(x, y).mul(Color.valueOf("ffa665"))));
|
||||||
|
|
||||||
image.draw(weapon.region,
|
image.draw(cell, image.width / 2 - cell.width / 2, image.height / 2 - cell.height / 2);
|
||||||
(int)(i * weapon.x / Draw.scl + image.width / 2 - weapon.region.getWidth() / 2),
|
|
||||||
(int)(-weapon.y / Draw.scl + image.height / 2f - weapon.region.getHeight() / 2f),
|
|
||||||
i > 0, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
image.save("unit-" + type.name + "-full");
|
for(Weapon weapon : type.weapons){
|
||||||
}catch(IllegalArgumentException ignored){
|
weapon.load();
|
||||||
//skip
|
|
||||||
|
for(int i : (weapon.mirror ? Mathf.signs : Mathf.one)){
|
||||||
|
i *= Mathf.sign(weapon.flipped);
|
||||||
|
|
||||||
|
image.draw(weapon.region,
|
||||||
|
(int)(i * weapon.x / Draw.scl + image.width / 2 - weapon.region.getWidth() / 2),
|
||||||
|
(int)(-weapon.y / Draw.scl + image.height / 2f - weapon.region.getHeight() / 2f),
|
||||||
|
i > 0, false);
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
});
|
|
||||||
|
image.save("unit-" + type.name + "-full");
|
||||||
|
}));
|
||||||
|
|
||||||
ImagePacker.generate("ore-icons", () -> {
|
ImagePacker.generate("ore-icons", () -> {
|
||||||
content.blocks().<OreBlock>each(b -> b instanceof OreBlock, ore -> {
|
content.blocks().<OreBlock>each(b -> b instanceof OreBlock, ore -> {
|
||||||
|
|||||||