Merge branch 'master' into unit-stats
This commit is contained in:
BIN
core/assets/sounds/plasmaboom.ogg
Normal file
BIN
core/assets/sounds/plasmaboom.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/plasmadrop.ogg
Normal file
BIN
core/assets/sounds/plasmadrop.ogg
Normal file
Binary file not shown.
Binary file not shown.
@@ -10,6 +10,12 @@ import mindustry.*;
|
||||
public class LoopControl{
|
||||
private ObjectMap<Sound, SoundData> sounds = new ObjectMap<>();
|
||||
|
||||
public void play(Sound sound, float volume){
|
||||
if(Vars.headless) return;
|
||||
|
||||
play(sound, Core.camera.position, volume);
|
||||
}
|
||||
|
||||
public void play(Sound sound, Position pos, float volume){
|
||||
if(Vars.headless) return;
|
||||
|
||||
|
||||
@@ -728,7 +728,7 @@ public class Blocks implements ContentList{
|
||||
hasItems = hasPower = true;
|
||||
drawer = new DrawRotator();
|
||||
ambientSound = Sounds.grinding;
|
||||
ambientSoundVolume = 0.02f;
|
||||
ambientSoundVolume = 0.025f;
|
||||
|
||||
consumes.item(Items.scrap, 1);
|
||||
consumes.power(0.50f);
|
||||
@@ -1229,7 +1229,7 @@ public class Blocks implements ContentList{
|
||||
thoriumReactor = new NuclearReactor("thorium-reactor"){{
|
||||
requirements(Category.power, with(Items.lead, 300, Items.silicon, 200, Items.graphite, 150, Items.thorium, 150, Items.metaglass, 50));
|
||||
ambientSound = Sounds.hum;
|
||||
ambientSoundVolume = 0.2f;
|
||||
ambientSoundVolume = 0.24f;
|
||||
size = 3;
|
||||
health = 700;
|
||||
itemDuration = 360f;
|
||||
|
||||
@@ -1309,6 +1309,9 @@ public class UnitTypes implements ContentList{
|
||||
reload = 55f;
|
||||
minShootVelocity = 0.01f;
|
||||
|
||||
soundPitchMin = 1f;
|
||||
shootSound = Sounds.plasmadrop;
|
||||
|
||||
bullet = new BasicBulletType(){{
|
||||
sprite = "large-bomb";
|
||||
width = height = 120/4f;
|
||||
@@ -1320,9 +1323,10 @@ public class UnitTypes implements ContentList{
|
||||
frontColor = Color.white;
|
||||
mixColorTo = Color.white;
|
||||
|
||||
hitSound = Sounds.plasmaboom;
|
||||
|
||||
shootCone = 180f;
|
||||
ejectEffect = Fx.none;
|
||||
shootSound = Sounds.none;
|
||||
despawnShake = 4f;
|
||||
|
||||
collidesAir = false;
|
||||
|
||||
@@ -365,6 +365,7 @@ public class NetClient implements ApplicationListener{
|
||||
|
||||
@Remote(variants = Variant.one)
|
||||
public static void setPosition(float x, float y){
|
||||
player.unit().set(x, y);
|
||||
player.set(x, y);
|
||||
}
|
||||
|
||||
|
||||
@@ -204,6 +204,9 @@ public class LExecutor{
|
||||
//no units of this type found
|
||||
exec.setconst(varUnit, null);
|
||||
}
|
||||
}else if(exec.obj(type) instanceof Unit u && u.team == exec.team){
|
||||
//bind to specific unit object
|
||||
exec.setconst(varUnit, u);
|
||||
}else{
|
||||
exec.setconst(varUnit, null);
|
||||
}
|
||||
|
||||
@@ -89,9 +89,9 @@ public abstract class Weather extends UnlockableContent{
|
||||
}
|
||||
}
|
||||
|
||||
if(sound != Sounds.none){
|
||||
if(!headless && sound != Sounds.none){
|
||||
float noise = soundVolOscMag > 0 ? (float)Math.abs(Noise.rawNoise(Time.time() / soundVolOscScl)) * soundVolOscMag : 0;
|
||||
loops.play(sound, Core.camera.position, Math.max((soundVol + noise) * state.opacity, soundVolMin));
|
||||
loops.play(sound, Math.max((soundVol + noise) * state.opacity, soundVolMin));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ public class Drill extends Block{
|
||||
liquidCapacity = 5f;
|
||||
hasItems = true;
|
||||
ambientSound = Sounds.drill;
|
||||
ambientSoundVolume = 0.015f;
|
||||
ambientSoundVolume = 0.018f;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -209,6 +209,11 @@ public class Drill extends Block{
|
||||
return efficiency() > 0.01f && items.total() < itemCapacity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float ambientVolume(){
|
||||
return efficiency() * (size * size) / 4f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawSelect(){
|
||||
if(dominantItem != null){
|
||||
|
||||
@@ -2,6 +2,7 @@ package mindustry.world.blocks.production;
|
||||
|
||||
import arc.graphics.g2d.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.graphics.*;
|
||||
import mindustry.world.meta.*;
|
||||
|
||||
@@ -15,6 +16,8 @@ public class Fracker extends SolidPump{
|
||||
public Fracker(String name){
|
||||
super(name);
|
||||
hasItems = true;
|
||||
ambientSound = Sounds.drill;
|
||||
ambientSoundVolume = 0.03f;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -46,11 +46,13 @@ public class AmmoListValue<T extends UnlockableContent> implements StatValue{
|
||||
sep(bt, Core.bundle.format("bullet.splashdamage", (int)type.splashDamage, Strings.fixed(type.splashDamageRadius / tilesize, 1)));
|
||||
}
|
||||
|
||||
//ammo multiplyers do not make sense for units
|
||||
if(!(t instanceof UnitType) && !Mathf.equal(type.ammoMultiplier, 1f))
|
||||
if(!(t instanceof UnitType) && !Mathf.equal(type.ammoMultiplier, 1f) && !(type instanceof LiquidBulletType)){
|
||||
sep(bt, Core.bundle.format("bullet.multiplier", (int)type.ammoMultiplier));
|
||||
if(!Mathf.equal(type.reloadMultiplier, 1f))
|
||||
}
|
||||
|
||||
if(!Mathf.equal(type.reloadMultiplier, 1f)){
|
||||
sep(bt, Core.bundle.format("bullet.reload", Strings.fixed(type.reloadMultiplier, 1)));
|
||||
}
|
||||
|
||||
if(type.knockback > 0){
|
||||
sep(bt, Core.bundle.format("bullet.knockback", Strings.fixed(type.knockback, 1)));
|
||||
|
||||
3
fastlane/metadata/android/en-US/changelogs/29697.txt
Normal file
3
fastlane/metadata/android/en-US/changelogs/29697.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
- Fixed server weather-related crash
|
||||
- Fixed music not loading on certain systems
|
||||
- Added sounds for quad unit
|
||||
3
fastlane/metadata/android/en-US/changelogs/29699.txt
Normal file
3
fastlane/metadata/android/en-US/changelogs/29699.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
- Fixed server weather-related crash
|
||||
- Fixed music not loading on certain systems
|
||||
- Added sounds for quad unit
|
||||
Reference in New Issue
Block a user