Some new sounds
This commit is contained in:
@@ -288,6 +288,10 @@ public class Blocks implements ContentList{
|
||||
attributes.set(Attribute.water, 1f);
|
||||
cacheLayer = CacheLayer.mud;
|
||||
albedo = 0.35f;
|
||||
walkSound = Sounds.mud;
|
||||
walkSoundVolume = 0.08f;
|
||||
walkSoundPitchMin = 0.4f;
|
||||
walkSoundPitchMax = 0.5f;
|
||||
}};
|
||||
|
||||
((ShallowLiquid)darksandTaintedWater).set(Blocks.taintedWater, Blocks.darksand);
|
||||
@@ -593,7 +597,7 @@ public class Blocks implements ContentList{
|
||||
drawer = new DrawWeave();
|
||||
|
||||
ambientSound = Sounds.techloop;
|
||||
ambientSoundVolume = 0.05f;
|
||||
ambientSoundVolume = 0.02f;
|
||||
|
||||
consumes.items(with(Items.thorium, 4, Items.sand, 10));
|
||||
consumes.power(5f);
|
||||
@@ -1225,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.16f;
|
||||
ambientSoundVolume = 0.2f;
|
||||
size = 3;
|
||||
health = 700;
|
||||
itemDuration = 360f;
|
||||
|
||||
@@ -75,10 +75,14 @@ abstract class FlyingComp implements Posc, Velc, Healthc, Hitboxc{
|
||||
wasFlying = isFlying();
|
||||
}
|
||||
|
||||
if(!hovering && isGrounded() && floor.isLiquid){
|
||||
if(!hovering && isGrounded()){
|
||||
if((splashTimer += Mathf.dst(deltaX(), deltaY())) >= (7f + hitSize()/8f)){
|
||||
floor.walkEffect.at(x, y, hitSize() / 8f, floor.mapColor);
|
||||
splashTimer = 0f;
|
||||
|
||||
if(!(this instanceof WaterMovec)){
|
||||
floor.walkSound.at(x, y, Mathf.random(floor.walkSoundPitchMin, floor.walkSoundPitchMax), floor.walkSoundVolume);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -112,6 +112,7 @@ abstract class LegsComp implements Posc, Rotc, Hitboxc, Flyingc, Unitc{
|
||||
Floor floor = Vars.world.floorWorld(l.base.x, l.base.y);
|
||||
if(floor.isLiquid){
|
||||
floor.walkEffect.at(l.base.x, l.base.y, type.rippleScale, floor.mapColor);
|
||||
floor.walkSound.at(x, y, 1f, floor.walkSoundVolume);
|
||||
}else{
|
||||
Fx.unitLandSmall.at(l.base.x, l.base.y, type.rippleScale, floor.mapColor);
|
||||
}
|
||||
|
||||
@@ -96,11 +96,13 @@ public class LAssembler{
|
||||
if(data == null || data.isEmpty()) return new Seq<>();
|
||||
|
||||
Seq<LStatement> statements = new Seq<>();
|
||||
String[] lines = data.split("[;\n]+");
|
||||
String[] lines = data.split("\n");
|
||||
int index = 0;
|
||||
for(String line : lines){
|
||||
//comments
|
||||
if(line.startsWith("#")) continue;
|
||||
//remove trailing semicolons in case someone adds them in for no reason
|
||||
if(line.endsWith(";")) line = line.substring(0, line.length() - 1);
|
||||
|
||||
if(index++ > max) break;
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package mindustry.world.blocks.defense.turrets;
|
||||
|
||||
import arc.audio.*;
|
||||
import arc.graphics.*;
|
||||
import arc.graphics.g2d.*;
|
||||
import arc.math.*;
|
||||
@@ -34,6 +35,9 @@ public class TractorBeamTurret extends BaseTurret{
|
||||
public StatusEffect status = StatusEffects.none;
|
||||
public float statusDuration = 300;
|
||||
|
||||
public Sound shootSound = Sounds.tractorbeam;
|
||||
public float shootSoundVolume = 0.9f;
|
||||
|
||||
public TractorBeamTurret(String name){
|
||||
super(name);
|
||||
|
||||
@@ -91,6 +95,8 @@ public class TractorBeamTurret extends BaseTurret{
|
||||
|
||||
//look at target
|
||||
if(target != null && target.within(this, range) && target.team() != team && target.type.flying && efficiency() > 0.01f){
|
||||
loops.play(shootSound, this, shootSoundVolume);
|
||||
|
||||
any = true;
|
||||
float dest = angleTo(target);
|
||||
rotation = Angles.moveToward(rotation, dest, rotateSpeed * edelta());
|
||||
|
||||
@@ -42,7 +42,7 @@ public class Conveyor extends Block implements Autotiler{
|
||||
conveyorPlacement = true;
|
||||
|
||||
ambientSound = Sounds.conveyor;
|
||||
ambientSoundVolume = 0.004f;
|
||||
ambientSoundVolume = 0.002f;
|
||||
unloadable = false;
|
||||
noUpdateDisabled = false;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package mindustry.world.blocks.environment;
|
||||
|
||||
import arc.*;
|
||||
import arc.audio.*;
|
||||
import arc.graphics.*;
|
||||
import arc.graphics.g2d.*;
|
||||
import arc.graphics.g2d.TextureAtlas.*;
|
||||
@@ -10,6 +11,7 @@ import arc.struct.*;
|
||||
import arc.util.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.entities.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.graphics.*;
|
||||
import mindustry.graphics.MultiPacker.*;
|
||||
import mindustry.type.*;
|
||||
@@ -33,7 +35,11 @@ public class Floor extends Block{
|
||||
/** How many ticks it takes to drown on this. */
|
||||
public float drownTime = 0f;
|
||||
/** Effect when walking on this floor. */
|
||||
public Effect walkEffect = Fx.ripple;
|
||||
public Effect walkEffect = Fx.none;
|
||||
/** Sound made when walking. */
|
||||
public Sound walkSound = Sounds.none;
|
||||
/** Volume of sound made when walking. */
|
||||
public float walkSoundVolume = 0.1f, walkSoundPitchMin = 0.8f, walkSoundPitchMax = 1.2f;
|
||||
/** Effect displayed when drowning on this floor. */
|
||||
public Effect drownUpdateEffect = Fx.bubble;
|
||||
/** Status effect applied when walking on. */
|
||||
@@ -115,6 +121,14 @@ public class Floor extends Block{
|
||||
if(decoration == Blocks.air){
|
||||
decoration = content.blocks().min(b -> b instanceof Boulder && b.breakable ? mapColor.diff(b.mapColor) : Float.POSITIVE_INFINITY);
|
||||
}
|
||||
|
||||
if(isLiquid && walkEffect == Fx.none){
|
||||
walkEffect = Fx.ripple;
|
||||
}
|
||||
|
||||
if(isLiquid && walkSound == Sounds.none){
|
||||
walkSound = Sounds.splash;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user