From 90a2f000417cb5307f432df69f07feebcb7639c7 Mon Sep 17 00:00:00 2001 From: Anuken Date: Thu, 28 Apr 2022 14:51:20 -0400 Subject: [PATCH] Nuke launch format string --- core/src/mindustry/content/SectorPresets.java | 2 +- .../mindustry/entities/bullet/BulletType.java | 17 ++++++++++------- .../world/blocks/distribution/Conveyor.java | 1 + .../world/blocks/distribution/ItemBridge.java | 1 + .../world/blocks/distribution/Junction.java | 3 ++- .../world/blocks/distribution/OverflowGate.java | 2 +- .../world/blocks/distribution/Router.java | 2 +- .../world/blocks/distribution/Sorter.java | 2 +- .../blocks/distribution/StackConveyor.java | 1 + .../mindustry/world/blocks/liquid/Conduit.java | 1 + .../world/blocks/liquid/LiquidRouter.java | 2 ++ 11 files changed, 22 insertions(+), 12 deletions(-) diff --git a/core/src/mindustry/content/SectorPresets.java b/core/src/mindustry/content/SectorPresets.java index ffc30f855f..5101ee1e4c 100644 --- a/core/src/mindustry/content/SectorPresets.java +++ b/core/src/mindustry/content/SectorPresets.java @@ -209,7 +209,7 @@ public class SectorPresets{ rules = r -> { r.objectives.addAll( new DestroyBlocksObjective(Blocks.coreBastion, Team.malis, Point2.pack(290,501), Point2.pack(158,496)), - new TimerObjective("Nuclear launch detected", 4 * 60 * 60).withMarkers( + new TimerObjective("[accent]⚠ Nuclear launch detected:\n[lightgray]{0}", 4 * 60 * 60).withMarkers( new TextMarker("Evacuate base", 1, 1), new MinimapMarker(338,378, Color.red) ).withFlags("nuke1") diff --git a/core/src/mindustry/entities/bullet/BulletType.java b/core/src/mindustry/entities/bullet/BulletType.java index dc02bb94a8..41555fefc0 100644 --- a/core/src/mindustry/entities/bullet/BulletType.java +++ b/core/src/mindustry/entities/bullet/BulletType.java @@ -305,13 +305,7 @@ public class BulletType extends Content implements Cloneable{ Effect.shake(hitShake, hitShake, b); createFrags(b, x, y); - - if(puddleLiquid != null && puddles > 0){ - for(int i = 0; i < puddles; i++){ - Tile tile = world.tileWorld(x + Mathf.range(puddleRange), y + Mathf.range(puddleRange)); - Puddles.deposit(tile, puddleLiquid, puddleAmount); - } - } + createPuddles(b, x, y); if(incendChance > 0 && Mathf.chance(incendChance)){ Damage.createIncend(x, y, incendSpread, incendAmount); @@ -329,6 +323,15 @@ public class BulletType extends Content implements Cloneable{ } } + public void createPuddles(Bullet b, float x, float y){ + if(puddleLiquid != null && puddles > 0){ + for(int i = 0; i < puddles; i++){ + Tile tile = world.tileWorld(x + Mathf.range(puddleRange), y + Mathf.range(puddleRange)); + Puddles.deposit(tile, puddleLiquid, puddleAmount); + } + } + } + public void createSplashDamage(Bullet b, float x, float y){ if(splashDamageRadius > 0 && !b.absorbed){ Damage.damage(b.team, x, y, splashDamageRadius, splashDamage * b.damageMultiplier(), false, collidesAir, collidesGround, scaledSplashDamage, b); diff --git a/core/src/mindustry/world/blocks/distribution/Conveyor.java b/core/src/mindustry/world/blocks/distribution/Conveyor.java index a415c0cc2f..093f31aa1b 100644 --- a/core/src/mindustry/world/blocks/distribution/Conveyor.java +++ b/core/src/mindustry/world/blocks/distribution/Conveyor.java @@ -44,6 +44,7 @@ public class Conveyor extends Block implements Autotiler{ itemCapacity = capacity; priority = TargetPriority.transport; conveyorPlacement = true; + underBullets = true; ambientSound = Sounds.conveyor; ambientSoundVolume = 0.0022f; diff --git a/core/src/mindustry/world/blocks/distribution/ItemBridge.java b/core/src/mindustry/world/blocks/distribution/ItemBridge.java index fce14a711f..61abb66bd4 100644 --- a/core/src/mindustry/world/blocks/distribution/ItemBridge.java +++ b/core/src/mindustry/world/blocks/distribution/ItemBridge.java @@ -44,6 +44,7 @@ public class ItemBridge extends Block{ super(name); update = true; solid = true; + underBullets = true; hasPower = true; itemCapacity = 10; configurable = true; diff --git a/core/src/mindustry/world/blocks/distribution/Junction.java b/core/src/mindustry/world/blocks/distribution/Junction.java index a60e13fb2b..804399b715 100644 --- a/core/src/mindustry/world/blocks/distribution/Junction.java +++ b/core/src/mindustry/world/blocks/distribution/Junction.java @@ -16,7 +16,8 @@ public class Junction extends Block{ public Junction(String name){ super(name); update = true; - solid = true; + solid = false; + underBullets = true; group = BlockGroup.transportation; unloadable = false; noUpdateDisabled = true; diff --git a/core/src/mindustry/world/blocks/distribution/OverflowGate.java b/core/src/mindustry/world/blocks/distribution/OverflowGate.java index 2f7ee97c20..70b942afe1 100644 --- a/core/src/mindustry/world/blocks/distribution/OverflowGate.java +++ b/core/src/mindustry/world/blocks/distribution/OverflowGate.java @@ -15,7 +15,7 @@ public class OverflowGate extends Block{ public OverflowGate(String name){ super(name); hasItems = true; - solid = true; + underBullets = true; update = false; destructible = true; group = BlockGroup.transportation; diff --git a/core/src/mindustry/world/blocks/distribution/Router.java b/core/src/mindustry/world/blocks/distribution/Router.java index cddef060f0..5bc382d18c 100644 --- a/core/src/mindustry/world/blocks/distribution/Router.java +++ b/core/src/mindustry/world/blocks/distribution/Router.java @@ -15,7 +15,7 @@ public class Router extends Block{ public Router(String name){ super(name); solid = true; - update = true; + underBullets = true; hasItems = true; itemCapacity = 1; group = BlockGroup.transportation; diff --git a/core/src/mindustry/world/blocks/distribution/Sorter.java b/core/src/mindustry/world/blocks/distribution/Sorter.java index d0251459ab..5e19c65966 100644 --- a/core/src/mindustry/world/blocks/distribution/Sorter.java +++ b/core/src/mindustry/world/blocks/distribution/Sorter.java @@ -21,7 +21,7 @@ public class Sorter extends Block{ super(name); update = false; destructible = true; - solid = true; + underBullets = true; instantTransfer = true; group = BlockGroup.transportation; configurable = true; diff --git a/core/src/mindustry/world/blocks/distribution/StackConveyor.java b/core/src/mindustry/world/blocks/distribution/StackConveyor.java index 43775acc48..b48fe664a5 100644 --- a/core/src/mindustry/world/blocks/distribution/StackConveyor.java +++ b/core/src/mindustry/world/blocks/distribution/StackConveyor.java @@ -52,6 +52,7 @@ public class StackConveyor extends Block implements Autotiler{ itemCapacity = 10; conveyorPlacement = true; highUnloadPriority = true; + underBullets = true; priority = TargetPriority.transport; ambientSound = Sounds.conveyor; diff --git a/core/src/mindustry/world/blocks/liquid/Conduit.java b/core/src/mindustry/world/blocks/liquid/Conduit.java index 0c2debb4ad..c9046020b4 100644 --- a/core/src/mindustry/world/blocks/liquid/Conduit.java +++ b/core/src/mindustry/world/blocks/liquid/Conduit.java @@ -46,6 +46,7 @@ public class Conduit extends LiquidBlock implements Autotiler{ rotate = true; solid = false; floating = true; + underBullets = true; conveyorPlacement = true; noUpdateDisabled = true; canOverdrive = false; diff --git a/core/src/mindustry/world/blocks/liquid/LiquidRouter.java b/core/src/mindustry/world/blocks/liquid/LiquidRouter.java index 507602a987..12a24b4be4 100644 --- a/core/src/mindustry/world/blocks/liquid/LiquidRouter.java +++ b/core/src/mindustry/world/blocks/liquid/LiquidRouter.java @@ -12,6 +12,8 @@ public class LiquidRouter extends LiquidBlock{ public LiquidRouter(String name){ super(name); + underBullets = true; + solid = false; noUpdateDisabled = true; canOverdrive = false; }