From 90a2f000417cb5307f432df69f07feebcb7639c7 Mon Sep 17 00:00:00 2001 From: Anuken Date: Thu, 28 Apr 2022 14:51:20 -0400 Subject: [PATCH 1/3] 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; } From fe4b32be1f39e37a1a71e1fc98e3b46bdfcc92db Mon Sep 17 00:00:00 2001 From: Anuken Date: Thu, 28 Apr 2022 14:51:38 -0400 Subject: [PATCH 2/3] Color tweak --- core/src/mindustry/content/SectorPresets.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/src/mindustry/content/SectorPresets.java b/core/src/mindustry/content/SectorPresets.java index 5101ee1e4c..3aa74143f6 100644 --- a/core/src/mindustry/content/SectorPresets.java +++ b/core/src/mindustry/content/SectorPresets.java @@ -1,7 +1,6 @@ package mindustry.content; -import arc.graphics.Color; -import arc.math.geom.Point2; +import arc.math.geom.*; import mindustry.game.MapObjectives.*; import mindustry.game.*; import mindustry.graphics.*; @@ -211,7 +210,7 @@ public class SectorPresets{ new DestroyBlocksObjective(Blocks.coreBastion, Team.malis, Point2.pack(290,501), Point2.pack(158,496)), 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) + new MinimapMarker(338,378, Pal.remove) ).withFlags("nuke1") ); }; From 293311087dbcccf4420ba67fb61d0e3c0b950c92 Mon Sep 17 00:00:00 2001 From: Anuken Date: Thu, 28 Apr 2022 14:52:51 -0400 Subject: [PATCH 3/3] Fixed destroyblocks objective --- core/assets/bundles/bundle.properties | 2 +- core/src/mindustry/content/SectorPresets.java | 10 +++++----- core/src/mindustry/game/MapObjectives.java | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index 6b54fe5588..bac92856db 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -577,7 +577,7 @@ configure = Configure Loadout objective.research = [accent]Research:\n[]{0}[lightgray]{1} objective.produce = [accent]Obtain:\n[]{0}[lightgray]{1} objective.destroyblock = [accent]Destroy:\n[]{0}[lightgray]{1} -objective.destroyblocks = [accent]Destroy: [lightgray]{0}[]/{1}\n{2}[lightgray]{3} +objective.destroyblocks = [accent]Destroy: [lightgray]{0}[white]/{1}\n{2}[lightgray]{3} objective.item = [accent]Obtain: [][lightgray]{0}[]/{1}\n{2}[lightgray]{3} objective.coreitem = [accent]Move into Core:\n[][lightgray]{0}[]/{1}\n{2}[lightgray]{3} objective.build = [accent]Build: [][lightgray]{0}[]x\n{1}[lightgray]{2} diff --git a/core/src/mindustry/content/SectorPresets.java b/core/src/mindustry/content/SectorPresets.java index 3aa74143f6..536fdd7683 100644 --- a/core/src/mindustry/content/SectorPresets.java +++ b/core/src/mindustry/content/SectorPresets.java @@ -207,11 +207,11 @@ public class SectorPresets{ rules = r -> { r.objectives.addAll( - new DestroyBlocksObjective(Blocks.coreBastion, Team.malis, Point2.pack(290,501), Point2.pack(158,496)), - new TimerObjective("[accent]⚠ Nuclear launch detected:\n[lightgray]{0}", 4 * 60 * 60).withMarkers( - new TextMarker("Evacuate base", 1, 1), - new MinimapMarker(338,378, Pal.remove) - ).withFlags("nuke1") + new DestroyBlocksObjective(Blocks.coreBastion, Team.malis, Point2.pack(290,501), Point2.pack(158,496)), + new TimerObjective("[accent]⚠ Nuclear launch detected:\n[lightgray]{0}", 4 * 60 * 60).withMarkers( + new TextMarker("Evacuate base", 1, 1), + new MinimapMarker(338,378, Pal.remove) + ).withFlags("nuke1") ); }; }}; diff --git a/core/src/mindustry/game/MapObjectives.java b/core/src/mindustry/game/MapObjectives.java index 31261bae63..c153446228 100644 --- a/core/src/mindustry/game/MapObjectives.java +++ b/core/src/mindustry/game/MapObjectives.java @@ -308,7 +308,7 @@ public class MapObjectives{ @Override public String text(){ - return Core.bundle.format("objective.destroyblocks", positions, positions.length, block.emoji(), block.localizedName); + return Core.bundle.format("objective.destroyblocks", progress(), positions.length, block.emoji(), block.localizedName); } }