This commit is contained in:
Anuken
2023-08-22 10:10:08 -04:00
parent e6aa87ed71
commit 207806440b
4 changed files with 9 additions and 5 deletions

View File

@@ -23,6 +23,10 @@ public class MinerAI extends AIController{
unit.mineTile(null);
}
if(ore != null && !unit.validMine(ore)){
ore = null;
}
if(mining){
if(timer.get(timerTarget2, 60 * 4) || targetItem == null){
targetItem = unit.type.mineItems.min(i -> indexer.hasOre(i) && unit.canMine(i), i -> core.items.get(i));

View File

@@ -165,14 +165,14 @@ public class NetClient implements ApplicationListener{
public static void sound(Sound sound, float volume, float pitch, float pan){
if(sound == null || headless) return;
sound.play(Mathf.clamp(volume, 0, 8f) * Core.settings.getInt("sfxvol") / 100f, pitch, pan, false, false);
sound.play(Mathf.clamp(volume, 0, 8f) * Core.settings.getInt("sfxvol") / 100f, Mathf.clamp(pitch, 0f, 20f), pan, false, false);
}
@Remote(variants = Variant.both, unreliable = true, called = Loc.server)
public static void soundAt(Sound sound, float x, float y, float volume, float pitch){
if(sound == null || headless) return;
sound.at(x, y, pitch, Mathf.clamp(volume, 0, 4f));
sound.at(x, y, Mathf.clamp(pitch, 0f, 20f), Mathf.clamp(volume, 0, 4f));
}
@Remote(variants = Variant.both, unreliable = true)