From 0247301272127550fddbc4348ec274e660093dfa Mon Sep 17 00:00:00 2001 From: QmelZ <59574967+QmelZ@users.noreply.github.com> Date: Thu, 3 Jun 2021 21:41:08 +0300 Subject: [PATCH] Custom Mass Driver Bullets (#5300) * custom mass driver bullets * ohno * should be fixed now --- core/src/mindustry/content/Blocks.java | 1 + core/src/mindustry/content/Bullets.java | 4 +--- core/src/mindustry/world/blocks/distribution/MassDriver.java | 4 +++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index 5a329a668a..f4827a7c99 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -1028,6 +1028,7 @@ public class Blocks implements ContentList{ reloadTime = 200f; range = 440f; consumes.power(1.75f); + bullet = new MassDriverBolt(); }}; //special transport blocks diff --git a/core/src/mindustry/content/Bullets.java b/core/src/mindustry/content/Bullets.java index e318d80f98..674cb514e2 100644 --- a/core/src/mindustry/content/Bullets.java +++ b/core/src/mindustry/content/Bullets.java @@ -36,7 +36,7 @@ public class Bullets implements ContentList{ waterShot, cryoShot, slagShot, oilShot, heavyWaterShot, heavyCryoShot, heavySlagShot, heavyOilShot, //environment, misc. - damageLightning, damageLightningGround, fireball, basicFlame, pyraFlame, driverBolt; + damageLightning, damageLightningGround, fireball, basicFlame, pyraFlame; @Override public void load(){ @@ -510,7 +510,5 @@ public class Bullets implements ContentList{ statusDuration = 60f * 4f; damage = 0.2f; }}; - - driverBolt = new MassDriverBolt(); } } diff --git a/core/src/mindustry/world/blocks/distribution/MassDriver.java b/core/src/mindustry/world/blocks/distribution/MassDriver.java index b8659c3d89..94b993aa7f 100644 --- a/core/src/mindustry/world/blocks/distribution/MassDriver.java +++ b/core/src/mindustry/world/blocks/distribution/MassDriver.java @@ -12,6 +12,7 @@ import arc.util.pooling.*; import mindustry.annotations.Annotations.*; import mindustry.content.*; import mindustry.entities.*; +import mindustry.entities.bullet.*; import mindustry.gen.*; import mindustry.graphics.*; import mindustry.logic.*; @@ -28,6 +29,7 @@ public class MassDriver extends Block{ public int minDistribute = 10; public float knockback = 4f; public float reloadTime = 100f; + public MassDriverBolt bullet; public float bulletSpeed = 5.5f; public float bulletLifetime = 200f; public Effect shootEffect = Fx.shootBig2; @@ -287,7 +289,7 @@ public class MassDriver extends Block{ float angle = tile.angleTo(target); - Bullets.driverBolt.create(this, team, + bullet.create(this, team, x + Angles.trnsx(angle, translation), y + Angles.trnsy(angle, translation), angle, -1f, bulletSpeed, bulletLifetime, data);