From 5eb722efee79da088ac2a353af5701cc229fcbcc Mon Sep 17 00:00:00 2001 From: Leonwang4234 <62972692+Leonwang4234@users.noreply.github.com> Date: Sun, 20 Sep 2020 20:25:18 -0700 Subject: [PATCH 1/2] Update Wall.java --- core/src/mindustry/world/blocks/defense/Wall.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/src/mindustry/world/blocks/defense/Wall.java b/core/src/mindustry/world/blocks/defense/Wall.java index c99100166a..d3ebf72a9a 100644 --- a/core/src/mindustry/world/blocks/defense/Wall.java +++ b/core/src/mindustry/world/blocks/defense/Wall.java @@ -1,6 +1,7 @@ package mindustry.world.blocks.defense; import arc.*; +import arc.audio.*; import arc.graphics.*; import arc.graphics.g2d.*; import arc.math.*; @@ -20,11 +21,13 @@ public class Wall extends Block{ public float lightningDamage = 20f; public int lightningLength = 17; public Color lightningColor = Pal.surge; + public Sound lightningSound = Sounds.spark; public float chanceDeflect = 10f; public boolean flashHit; public Color flashColor = Color.white; public boolean deflect; + public Sound deflectSound = Sounds.none; public Wall(String name){ super(name); @@ -94,6 +97,7 @@ public class Wall extends Block{ if(lightningChance > 0){ if(Mathf.chance(lightningChance)){ Lightning.create(team, lightningColor, lightningDamage, x, y, bullet.rotation() + 180f, lightningLength); + lightningSound.at(tile, Mathf.random(0.9f, 1.1f)); } } @@ -105,6 +109,9 @@ public class Wall extends Block{ //bullet reflection chance depends on bullet damage if(!Mathf.chance(chanceDeflect / bullet.damage())) return true; + //make sound + deflectSound.at(tile, Mathf.random(0.9f, 1.1f)); + //translate bullet back to where it was upon collision bullet.trns(-bullet.vel.x, -bullet.vel.y); From 6840fb53b7460e068ba7fceddbafc09b392ce3c2 Mon Sep 17 00:00:00 2001 From: Felix Corvus Date: Mon, 21 Sep 2020 16:24:06 +0300 Subject: [PATCH 2/2] Update Pal.java --- core/src/mindustry/graphics/Pal.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/mindustry/graphics/Pal.java b/core/src/mindustry/graphics/Pal.java index 1d154dc5c0..771697b845 100644 --- a/core/src/mindustry/graphics/Pal.java +++ b/core/src/mindustry/graphics/Pal.java @@ -3,7 +3,7 @@ package mindustry.graphics; import arc.graphics.Color; public class Pal{ - public static final Color + public static Color items = Color.valueOf("2ea756"), command = Color.valueOf("eab678"),