Sound file reorganization
This commit is contained in:
@@ -11,14 +11,13 @@ public class SoundPriority{
|
||||
static int lastGroup = 1;
|
||||
|
||||
public static void init(){
|
||||
max(7, laserbig, beam, laserbeam);
|
||||
max(7, beamPlasma, shootMeltdown, beamMeltdown);
|
||||
|
||||
//priority 2: long weapon loops and big explosions
|
||||
set(
|
||||
2f,
|
||||
laserbig,
|
||||
beam,
|
||||
laserbeam,
|
||||
beamMeltdown,
|
||||
beamLustre,
|
||||
beamPlasma,
|
||||
reactorExplosion,
|
||||
reactorExplosion2,
|
||||
@@ -29,31 +28,36 @@ public class SoundPriority{
|
||||
//priority 1.5: big weapon sounds, not loops
|
||||
set(
|
||||
1.5f,
|
||||
railgun,
|
||||
largeCannon,
|
||||
lasercharge,
|
||||
lasercharge2,
|
||||
lasercharge3
|
||||
shootMeltdown,
|
||||
shootSublimate,
|
||||
shootForeshadow,
|
||||
shootConquer,
|
||||
shootCorvus,
|
||||
chargeCorvus,
|
||||
chargeVela,
|
||||
chargeLancer
|
||||
);
|
||||
|
||||
//priority 1: ambient noises
|
||||
set(
|
||||
1f,
|
||||
conveyor,
|
||||
smelter,
|
||||
drill,
|
||||
extractLoop,
|
||||
flux,
|
||||
hum,
|
||||
respawning
|
||||
loopConveyor,
|
||||
loopSmelter,
|
||||
loopDrill,
|
||||
loopExtract,
|
||||
loopFlux,
|
||||
loopHum,
|
||||
loopBio,
|
||||
loopTech,
|
||||
loopUnitBuilding
|
||||
);
|
||||
|
||||
//very loud
|
||||
laser.setMaxConcurrent(5);
|
||||
shootLancer.setMaxConcurrent(5);
|
||||
|
||||
sameGroup(flame, flamePlasma);
|
||||
sameGroup(missile, missileShort, missilePlasmaShort);
|
||||
sameGroup(spark, shock);
|
||||
sameGroup(shootFlame, shootFlamePlasma);
|
||||
sameGroup(shootMissile, shootMissileShort, shootMissilePlasmaShort);
|
||||
sameGroup(shootArc, shootPulsar);
|
||||
|
||||
for(var sound : Core.assets.getAll(Sound.class, new Seq<>())){
|
||||
sound.setMinConcurrentInterrupt(Math.min(0.25f, sound.getLength() * 0.5f));
|
||||
@@ -69,7 +73,7 @@ public class SoundPriority{
|
||||
max(4, mechStep, mechStepHeavy, walkerStep, walkerStepSmall, walkerStepTiny, mechStepSmall);
|
||||
|
||||
//repair sounds are lower priority and generally not important
|
||||
set(-1f, blockHeal, healAbility);
|
||||
set(-1f, blockHeal, healWave);
|
||||
|
||||
//step sounds are low priority
|
||||
set(-2f, mechStep, mechStepHeavy, walkerStep, walkerStepSmall, walkerStepTiny, mechStepSmall);
|
||||
|
||||
@@ -399,7 +399,7 @@ public class Blocks{
|
||||
statusDuration = 30f;
|
||||
attributes.set(Attribute.water, 1f);
|
||||
cacheLayer = CacheLayer.mud;
|
||||
walkSound = Sounds.mud;
|
||||
walkSound = Sounds.stepMud;
|
||||
walkSoundVolume = 0.08f;
|
||||
walkSoundPitchMin = 0.4f;
|
||||
walkSoundPitchMax = 0.5f;
|
||||
@@ -1070,7 +1070,7 @@ public class Blocks{
|
||||
hasPower = true;
|
||||
hasLiquids = false;
|
||||
drawer = new DrawMulti(new DrawDefault(), new DrawFlame(Color.valueOf("ffef99")));
|
||||
ambientSound = Sounds.smelter;
|
||||
ambientSound = Sounds.loopSmelter;
|
||||
ambientSoundVolume = 0.07f;
|
||||
|
||||
consumeItems(with(Items.coal, 1, Items.sand, 2));
|
||||
@@ -1088,7 +1088,7 @@ public class Blocks{
|
||||
itemCapacity = 30;
|
||||
boostScale = 0.15f;
|
||||
drawer = new DrawMulti(new DrawDefault(), new DrawFlame(Color.valueOf("ffef99")));
|
||||
ambientSound = Sounds.smelter;
|
||||
ambientSound = Sounds.loopSmelter;
|
||||
ambientSoundVolume = 0.07f;
|
||||
|
||||
consumeItems(with(Items.coal, 4, Items.sand, 6, Items.pyratite, 1));
|
||||
@@ -1103,7 +1103,7 @@ public class Blocks{
|
||||
size = 2;
|
||||
hasPower = hasItems = true;
|
||||
drawer = new DrawMulti(new DrawDefault(), new DrawFlame(Color.valueOf("ffc099")));
|
||||
ambientSound = Sounds.smelter;
|
||||
ambientSound = Sounds.loopSmelter;
|
||||
ambientSoundVolume = 0.07f;
|
||||
|
||||
consumeItems(with(Items.lead, 1, Items.sand, 1));
|
||||
@@ -1138,7 +1138,7 @@ public class Blocks{
|
||||
drawer = new DrawMulti(new DrawRegion("-bottom"), new DrawWeave(), new DrawDefault());
|
||||
envEnabled |= Env.space;
|
||||
|
||||
ambientSound = Sounds.techloop;
|
||||
ambientSound = Sounds.loopTech;
|
||||
ambientSoundVolume = 0.02f;
|
||||
|
||||
consumeItems(with(Items.thorium, 4, Items.sand, 10));
|
||||
@@ -1292,7 +1292,7 @@ public class Blocks{
|
||||
spinSprite = true;
|
||||
rotateSpeed = 2f;
|
||||
}}, new DrawRegion("-top"));
|
||||
ambientSound = Sounds.grinding;
|
||||
ambientSound = Sounds.loopGrind;
|
||||
ambientSoundVolume = 0.025f;
|
||||
|
||||
consumeItem(Items.scrap, 1);
|
||||
@@ -1335,7 +1335,7 @@ public class Blocks{
|
||||
drawer = new DrawMulti(new DrawRegion("-bottom"), new DrawArcSmelt(), new DrawDefault());
|
||||
fogRadius = 3;
|
||||
researchCost = with(Items.beryllium, 150, Items.graphite, 50);
|
||||
ambientSound = Sounds.smelter;
|
||||
ambientSound = Sounds.loopSmelter;
|
||||
ambientSoundVolume = 0.12f;
|
||||
|
||||
consumeItems(with(Items.graphite, 1, Items.sand, 4));
|
||||
@@ -1378,7 +1378,7 @@ public class Blocks{
|
||||
}}
|
||||
);
|
||||
|
||||
ambientSound = Sounds.electricHum;
|
||||
ambientSound = Sounds.loopElectricHum;
|
||||
ambientSoundVolume = 0.08f;
|
||||
|
||||
regionRotated1 = 3;
|
||||
@@ -1405,7 +1405,7 @@ public class Blocks{
|
||||
itemCapacity = 0;
|
||||
liquidCapacity = 60f;
|
||||
consumePower(2f);
|
||||
ambientSound = Sounds.extractLoop;
|
||||
ambientSound = Sounds.loopExtract;
|
||||
ambientSoundVolume = 0.06f;
|
||||
|
||||
heatRequirement = 6f;
|
||||
@@ -1429,7 +1429,7 @@ public class Blocks{
|
||||
rotateDraw = false;
|
||||
|
||||
drawer = new DrawMulti(new DrawRegion("-bottom"), new DrawLiquidRegion(), new DrawDefault(), new DrawHeatOutput());
|
||||
ambientSound = Sounds.extractLoop;
|
||||
ambientSound = Sounds.loopExtract;
|
||||
ambientSoundVolume = 0.08f;
|
||||
|
||||
regionRotated1 = 2;
|
||||
@@ -1448,7 +1448,7 @@ public class Blocks{
|
||||
size = 2;
|
||||
heatOutput = 3f;
|
||||
regionRotated1 = 1;
|
||||
ambientSound = Sounds.hum;
|
||||
ambientSound = Sounds.loopHum;
|
||||
itemCapacity = 0;
|
||||
consumePower(100f / 60f);
|
||||
}};
|
||||
@@ -1464,7 +1464,7 @@ public class Blocks{
|
||||
liquidCapacity = 120f;
|
||||
rotateDraw = false;
|
||||
regionRotated1 = 1;
|
||||
ambientSound = Sounds.hum;
|
||||
ambientSound = Sounds.loopHum;
|
||||
consumeLiquid(Liquids.slag, 40f / 60f);
|
||||
heatOutput = 8f;
|
||||
|
||||
@@ -1478,7 +1478,7 @@ public class Blocks{
|
||||
size = 2;
|
||||
heatOutput = 15f;
|
||||
craftTime = 60f * 8f;
|
||||
ambientSound = Sounds.hum;
|
||||
ambientSound = Sounds.loopHum;
|
||||
consumeItem(Items.phaseFabric);
|
||||
}};
|
||||
|
||||
@@ -1532,7 +1532,7 @@ public class Blocks{
|
||||
itemCapacity = 20;
|
||||
hasPower = hasItems = true;
|
||||
drawer = new DrawMulti(new DrawRegion("-bottom"), new DrawCrucibleFlame(), new DrawDefault(), new DrawHeatInput());
|
||||
ambientSound = Sounds.smelter;
|
||||
ambientSound = Sounds.loopSmelter;
|
||||
ambientSoundVolume = 0.09f;
|
||||
|
||||
heatRequirement = 10f;
|
||||
@@ -1582,7 +1582,7 @@ public class Blocks{
|
||||
craftTime = 60f * 3f;
|
||||
liquidCapacity = 80f * 5;
|
||||
|
||||
ambientSound = Sounds.smelter;
|
||||
ambientSound = Sounds.loopSmelter;
|
||||
ambientSoundVolume = 0.9f;
|
||||
|
||||
outputItem = new ItemStack(Items.surgeAlloy, 1);
|
||||
@@ -1626,7 +1626,7 @@ public class Blocks{
|
||||
|
||||
size = 3;
|
||||
|
||||
ambientSound = Sounds.extractLoop;
|
||||
ambientSound = Sounds.loopExtract;
|
||||
ambientSoundVolume = 0.08f;
|
||||
|
||||
liquidCapacity = 80f;
|
||||
@@ -1647,7 +1647,7 @@ public class Blocks{
|
||||
craftTime = 60f * 2f;
|
||||
liquidCapacity = 10f * 4;
|
||||
|
||||
ambientSound = Sounds.techloop;
|
||||
ambientSound = Sounds.loopTech;
|
||||
ambientSoundVolume = 0.04f;
|
||||
|
||||
outputItem = new ItemStack(Items.phaseFabric, 1);
|
||||
@@ -2515,7 +2515,7 @@ public class Blocks{
|
||||
powerProduction = 1f;
|
||||
itemDuration = 120f;
|
||||
|
||||
ambientSound = Sounds.smelter;
|
||||
ambientSound = Sounds.loopSmelter;
|
||||
ambientSoundVolume = 0.03f;
|
||||
generateEffect = Fx.generatespark;
|
||||
|
||||
@@ -2532,7 +2532,7 @@ public class Blocks{
|
||||
effectChance = 0.011f;
|
||||
size = 2;
|
||||
floating = true;
|
||||
ambientSound = Sounds.hum;
|
||||
ambientSound = Sounds.loopHum;
|
||||
ambientSoundVolume = 0.06f;
|
||||
}};
|
||||
|
||||
@@ -2545,7 +2545,7 @@ public class Blocks{
|
||||
size = 2;
|
||||
generateEffect = Fx.generatespark;
|
||||
|
||||
ambientSound = Sounds.smelter;
|
||||
ambientSound = Sounds.loopSmelter;
|
||||
ambientSoundVolume = 0.06f;
|
||||
|
||||
consume(new ConsumeItemFlammable());
|
||||
@@ -2573,9 +2573,9 @@ public class Blocks{
|
||||
hasLiquids = true;
|
||||
hasItems = true;
|
||||
size = 3;
|
||||
ambientSound = Sounds.steam;
|
||||
ambientSound = Sounds.loopSteam;
|
||||
generateEffect = Fx.generatespark;
|
||||
ambientSoundVolume = 0.03f;
|
||||
ambientSoundVolume = 0.05f;
|
||||
|
||||
drawer = new DrawMulti(new DrawDefault(), new DrawWarmupRegion(), new DrawLiquidRegion());
|
||||
|
||||
@@ -2609,7 +2609,7 @@ public class Blocks{
|
||||
|
||||
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;
|
||||
ambientSound = Sounds.loopHum;
|
||||
ambientSoundVolume = 0.24f;
|
||||
size = 3;
|
||||
health = 700;
|
||||
@@ -2627,7 +2627,7 @@ public class Blocks{
|
||||
health = 900;
|
||||
powerProduction = 130f;
|
||||
itemDuration = 140f;
|
||||
ambientSound = Sounds.pulse;
|
||||
ambientSound = Sounds.loopPulse;
|
||||
ambientSoundVolume = 0.08f;
|
||||
liquidCapacity = 80f;
|
||||
|
||||
@@ -2685,7 +2685,7 @@ public class Blocks{
|
||||
generateEffect = Fx.turbinegenerate;
|
||||
effectChance = 0.04f;
|
||||
size = 3;
|
||||
ambientSound = Sounds.hum;
|
||||
ambientSound = Sounds.loopHum;
|
||||
ambientSoundVolume = 0.06f;
|
||||
|
||||
drawer = new DrawMulti(new DrawDefault(), new DrawBlurSpin("-rotator", 0.6f * 9f){{
|
||||
@@ -2717,7 +2717,7 @@ public class Blocks{
|
||||
|
||||
liquidCapacity = 20f * 5;
|
||||
|
||||
ambientSound = Sounds.smelter;
|
||||
ambientSound = Sounds.loopSmelter;
|
||||
ambientSoundVolume = 0.06f;
|
||||
}};
|
||||
|
||||
@@ -2745,7 +2745,7 @@ public class Blocks{
|
||||
|
||||
generateEffect = Fx.none;
|
||||
|
||||
ambientSound = Sounds.smelter;
|
||||
ambientSound = Sounds.loopSmelter;
|
||||
ambientSoundVolume = 0.06f;
|
||||
|
||||
researchCostMultiplier = 0.4f;
|
||||
@@ -2763,8 +2763,8 @@ public class Blocks{
|
||||
explosionRadius = 17;
|
||||
explosionDamage = 2500;
|
||||
|
||||
ambientSound = Sounds.flux;
|
||||
ambientSoundVolume = 0.13f;
|
||||
ambientSound = Sounds.loopFlux;
|
||||
ambientSoundVolume = 0.15f;
|
||||
|
||||
size = 5;
|
||||
|
||||
@@ -2811,7 +2811,7 @@ public class Blocks{
|
||||
|
||||
powerProduction = 140f;
|
||||
|
||||
ambientSound = Sounds.bioLoop;
|
||||
ambientSound = Sounds.loopBio;
|
||||
ambientSoundVolume = 0.2f;
|
||||
|
||||
explosionPuddles = 80;
|
||||
@@ -2978,7 +2978,7 @@ public class Blocks{
|
||||
drawer = new DrawMulti(new DrawRegion("-bottom"), new DrawBlurSpin("-rotator", 6f), new DrawRegion("-mid"), new DrawLiquidTile(Liquids.water, 38f / 4f), new DrawDefault());
|
||||
craftTime = 120f;
|
||||
size = 3;
|
||||
ambientSound = Sounds.hum;
|
||||
ambientSound = Sounds.loopHum;
|
||||
ambientSoundVolume = 0.06f;
|
||||
hasLiquids = true;
|
||||
boostScale = 1f / 9f;
|
||||
@@ -2998,7 +2998,7 @@ public class Blocks{
|
||||
output = Items.sand;
|
||||
fogRadius = 2;
|
||||
researchCost = with(Items.beryllium, 100, Items.graphite, 40);
|
||||
ambientSound = Sounds.drill;
|
||||
ambientSound = Sounds.loopDrill;
|
||||
ambientSoundVolume = 0.04f;
|
||||
}};
|
||||
|
||||
@@ -3011,7 +3011,7 @@ public class Blocks{
|
||||
attribute = Attribute.sand;
|
||||
output = Items.sand;
|
||||
fogRadius = 3;
|
||||
ambientSound = Sounds.drill;
|
||||
ambientSound = Sounds.loopDrill;
|
||||
ambientSoundVolume = 0.08f;
|
||||
|
||||
consumeLiquid(Liquids.hydrogen, 1f / 60f);
|
||||
@@ -3393,7 +3393,7 @@ public class Blocks{
|
||||
shootCone = 35f;
|
||||
|
||||
scaledHealth = 200;
|
||||
shootSound = Sounds.shootSnap;
|
||||
shootSound = Sounds.shootScatter;
|
||||
coolant = consumeCoolant(0.2f);
|
||||
researchCostMultiplier = 0.05f;
|
||||
|
||||
@@ -3440,7 +3440,7 @@ public class Blocks{
|
||||
targetAir = false;
|
||||
ammoUseEffect = Fx.none;
|
||||
health = 400;
|
||||
shootSound = Sounds.flame;
|
||||
shootSound = Sounds.shootFlame;
|
||||
coolant = consumeCoolant(0.1f);
|
||||
}};
|
||||
|
||||
@@ -3503,7 +3503,7 @@ public class Blocks{
|
||||
inaccuracy = 1f;
|
||||
shootCone = 10f;
|
||||
health = 260;
|
||||
shootSound = Sounds.artillerySmall;
|
||||
shootSound = Sounds.shootArtillerySmall;
|
||||
coolant = consumeCoolant(0.1f);
|
||||
limitRange(0f);
|
||||
}};
|
||||
@@ -3557,9 +3557,9 @@ public class Blocks{
|
||||
targetAir = false;
|
||||
moveWhileCharging = false;
|
||||
accurateDelay = false;
|
||||
shootSound = Sounds.laser;
|
||||
shootSound = Sounds.shootLancer;
|
||||
coolant = consumeCoolant(0.2f);
|
||||
chargeSound = Sounds.lasercharge3;
|
||||
chargeSound = Sounds.chargeLancer;
|
||||
|
||||
consumePower(6f);
|
||||
|
||||
@@ -3613,7 +3613,7 @@ public class Blocks{
|
||||
recoil = 1f;
|
||||
size = 1;
|
||||
health = 260;
|
||||
shootSound = Sounds.spark;
|
||||
shootSound = Sounds.shootArc;
|
||||
consumePower(3.3f);
|
||||
coolant = consumeCoolant(0.1f);
|
||||
}};
|
||||
@@ -3700,7 +3700,7 @@ public class Blocks{
|
||||
consumeAmmoOnce = false;
|
||||
size = 2;
|
||||
scaledHealth = 300;
|
||||
shootSound = Sounds.missile;
|
||||
shootSound = Sounds.shootMissile;
|
||||
envEnabled |= Env.space;
|
||||
|
||||
limitRange(5f);
|
||||
@@ -3901,7 +3901,7 @@ public class Blocks{
|
||||
envEnabled |= Env.space;
|
||||
|
||||
scaledHealth = 220;
|
||||
shootSound = Sounds.shotgun;
|
||||
shootSound = Sounds.shootFuse;
|
||||
shootSoundVolume = 0.9f;
|
||||
coolant = consumeCoolant(0.3f);
|
||||
|
||||
@@ -4203,7 +4203,7 @@ public class Blocks{
|
||||
shake = 4f;
|
||||
size = 4;
|
||||
shootCone = 2f;
|
||||
shootSound = Sounds.railgun;
|
||||
shootSound = Sounds.shootForeshadow;
|
||||
unitSort = UnitSorts.strongest;
|
||||
envEnabled |= Env.space;
|
||||
|
||||
@@ -4290,8 +4290,8 @@ public class Blocks{
|
||||
reload = 90f;
|
||||
firingMoveFract = 0.5f;
|
||||
shootDuration = 230f;
|
||||
shootSound = Sounds.laserbig;
|
||||
loopSound = Sounds.beam;
|
||||
shootSound = Sounds.shootMeltdown;
|
||||
loopSound = Sounds.beamMeltdown;
|
||||
loopSoundVolume = 2f;
|
||||
envEnabled |= Env.space;
|
||||
|
||||
@@ -4563,7 +4563,7 @@ public class Blocks{
|
||||
|
||||
float r = range = 130f;
|
||||
|
||||
loopSound = Sounds.torch;
|
||||
loopSound = Sounds.shootSublimate;
|
||||
shootSound = Sounds.none;
|
||||
loopSoundVolume = 1f;
|
||||
|
||||
@@ -4734,7 +4734,7 @@ public class Blocks{
|
||||
}}
|
||||
);
|
||||
|
||||
shootSound = Sounds.mediumCannon;
|
||||
shootSound = Sounds.shootTank;
|
||||
ammoPerShot = 4;
|
||||
maxAmmo = ammoPerShot * 3;
|
||||
targetAir = false;
|
||||
@@ -5134,7 +5134,7 @@ public class Blocks{
|
||||
scaleDamageEfficiency = true;
|
||||
shootSound = Sounds.none;
|
||||
loopSoundVolume = 1f;
|
||||
loopSound = Sounds.laserbeam;
|
||||
loopSound = Sounds.beamLustre;
|
||||
|
||||
shootWarmupSpeed = 0.08f;
|
||||
shootCone = 360f;
|
||||
@@ -5180,7 +5180,7 @@ public class Blocks{
|
||||
trailLength = 18;
|
||||
missileAccelTime = 50f;
|
||||
lowAltitude = true;
|
||||
loopSound = Sounds.missileTrail;
|
||||
loopSound = Sounds.loopMissileTrail;
|
||||
loopSoundVolume = 0.6f;
|
||||
deathSound = Sounds.largeExplosion;
|
||||
targetAir = false;
|
||||
@@ -5267,7 +5267,7 @@ public class Blocks{
|
||||
trailLength = 18;
|
||||
missileAccelTime = 50f;
|
||||
lowAltitude = true;
|
||||
loopSound = Sounds.missileTrail;
|
||||
loopSound = Sounds.loopMissileTrail;
|
||||
loopSoundVolume = 0.6f;
|
||||
deathSound = Sounds.largeExplosion;
|
||||
targetAir = false;
|
||||
@@ -5373,7 +5373,7 @@ public class Blocks{
|
||||
trailLength = 18;
|
||||
missileAccelTime = 30f;
|
||||
lowAltitude = true;
|
||||
loopSound = Sounds.missileTrail;
|
||||
loopSound = Sounds.loopMissileTrail;
|
||||
loopSoundVolume = 0.6f;
|
||||
deathSound = Sounds.largeExplosion;
|
||||
targetAir = false;
|
||||
@@ -5428,7 +5428,7 @@ public class Blocks{
|
||||
rotateSpeed = 1.4f;
|
||||
trailLength = 12;
|
||||
lowAltitude = true;
|
||||
loopSound = Sounds.missileTrail;
|
||||
loopSound = Sounds.loopMissileTrail;
|
||||
loopSoundVolume = 0.6f;
|
||||
deathSound = Sounds.largeExplosion;
|
||||
targetAir = false;
|
||||
@@ -5532,7 +5532,7 @@ public class Blocks{
|
||||
|
||||
fogRadiusMultiplier = 0.4f;
|
||||
coolantMultiplier = 15f;
|
||||
shootSound = Sounds.missileLaunch;
|
||||
shootSound = Sounds.shootScathe;
|
||||
|
||||
minWarmup = 0.94f;
|
||||
newTargetInterval = 40f;
|
||||
@@ -5824,7 +5824,7 @@ public class Blocks{
|
||||
coolant = consume(new ConsumeLiquid(Liquids.water, 15f / 60f));
|
||||
limitRange();
|
||||
|
||||
loopSound = Sounds.glow;
|
||||
loopSound = Sounds.loopGlow;
|
||||
loopSoundVolume = 0.8f;
|
||||
}};
|
||||
|
||||
@@ -5839,8 +5839,8 @@ public class Blocks{
|
||||
var circleColor = haloColor;
|
||||
float circleY = 25f, circleRad = 11f, circleRotSpeed = 3.5f, circleStroke = 1.6f;
|
||||
|
||||
shootSound = Sounds.malignShoot;
|
||||
loopSound = Sounds.spellLoop;
|
||||
shootSound = Sounds.shootMalign;
|
||||
loopSound = Sounds.loopMalign;
|
||||
loopSoundVolume = 1.3f;
|
||||
|
||||
shootType = new FlakBulletType(8f, 70f){{
|
||||
|
||||
@@ -105,7 +105,6 @@ public class UnitTypes{
|
||||
stepSoundVolume = 0.4f;
|
||||
|
||||
weapons.add(new Weapon("large-weapon"){{
|
||||
shootSound = Sounds.shootDagger;
|
||||
reload = 13f;
|
||||
x = 4f;
|
||||
y = 2f;
|
||||
@@ -129,7 +128,7 @@ public class UnitTypes{
|
||||
|
||||
weapons.add(new Weapon("flamethrower"){{
|
||||
top = false;
|
||||
shootSound = Sounds.flame;
|
||||
shootSound = Sounds.shootFlame;
|
||||
shootY = 2f;
|
||||
reload = 22f;
|
||||
recoil = 1f;
|
||||
@@ -172,7 +171,7 @@ public class UnitTypes{
|
||||
recoil = 4f;
|
||||
shake = 2f;
|
||||
ejectEffect = Fx.casing2;
|
||||
shootSound = Sounds.artillery;
|
||||
shootSound = Sounds.shootArtillery;
|
||||
bullet = new ArtilleryBulletType(2f, 20, "shell"){{
|
||||
hitEffect = Fx.blastExplosion;
|
||||
knockback = 0.8f;
|
||||
@@ -240,7 +239,7 @@ public class UnitTypes{
|
||||
lightningColor = Pal.surge;
|
||||
//standard bullet damage is far too much for lightning
|
||||
lightningDamage = 20;
|
||||
despawnSound = Sounds.sparkBullet;
|
||||
despawnSound = Sounds.shockBullet;
|
||||
}};
|
||||
}},
|
||||
|
||||
@@ -251,7 +250,6 @@ public class UnitTypes{
|
||||
rotate = true;
|
||||
ejectEffect = Fx.casing1;
|
||||
bullet = smallBullet;
|
||||
shootSound = Sounds.shootDagger;
|
||||
}},
|
||||
new Weapon("mount-weapon"){{
|
||||
reload = 16f;
|
||||
@@ -260,7 +258,6 @@ public class UnitTypes{
|
||||
rotate = true;
|
||||
ejectEffect = Fx.casing1;
|
||||
bullet = smallBullet;
|
||||
shootSound = Sounds.shootDagger;
|
||||
}}
|
||||
);
|
||||
}};
|
||||
@@ -352,7 +349,7 @@ public class UnitTypes{
|
||||
alternate = false;
|
||||
ejectEffect = Fx.none;
|
||||
recoil = 2f;
|
||||
shootSound = Sounds.lasershoot;
|
||||
shootSound = Sounds.shootLaser;
|
||||
|
||||
bullet = new LaserBoltBulletType(5.2f, 13){{
|
||||
lifetime = 30f;
|
||||
@@ -396,7 +393,7 @@ public class UnitTypes{
|
||||
|
||||
ejectEffect = Fx.none;
|
||||
recoil = 2.5f;
|
||||
shootSound = Sounds.shock;
|
||||
shootSound = Sounds.shootPulsar;
|
||||
|
||||
bullet = new LightningBulletType(){{
|
||||
lightningColor = hitColor = Pal.heal;
|
||||
@@ -451,7 +448,7 @@ public class UnitTypes{
|
||||
x = 6.5f;
|
||||
reload = 55f;
|
||||
recoil = 4f;
|
||||
shootSound = Sounds.laser;
|
||||
shootSound = Sounds.shootLancer;
|
||||
|
||||
bullet = new LaserBulletType(){{
|
||||
damage = 45f;
|
||||
@@ -509,9 +506,9 @@ public class UnitTypes{
|
||||
|
||||
reload = 155f;
|
||||
recoil = 0f;
|
||||
chargeSound = Sounds.lasercharge2;
|
||||
chargeSound = Sounds.chargeVela;
|
||||
shootSound = Sounds.beamPlasma;
|
||||
initialShootSound = Sounds.beamPlasmaFire;
|
||||
initialShootSound = Sounds.shootBeamPlasma;
|
||||
continuous = true;
|
||||
cooldownTime = 200f;
|
||||
|
||||
@@ -582,8 +579,8 @@ public class UnitTypes{
|
||||
drawShields = false;
|
||||
|
||||
weapons.add(new Weapon("corvus-weapon"){{
|
||||
shootSound = Sounds.laserblast;
|
||||
chargeSound = Sounds.lasercharge;
|
||||
shootSound = Sounds.shootCorvus;
|
||||
chargeSound = Sounds.chargeCorvus;
|
||||
soundPitchMin = 1f;
|
||||
top = false;
|
||||
mirror = false;
|
||||
@@ -744,7 +741,7 @@ public class UnitTypes{
|
||||
ejectEffect = Fx.none;
|
||||
recoil = 2f;
|
||||
rotate = true;
|
||||
shootSound = Sounds.sap;
|
||||
shootSound = Sounds.shootSap;
|
||||
|
||||
x = 8.5f;
|
||||
y = -1.5f;
|
||||
@@ -767,7 +764,7 @@ public class UnitTypes{
|
||||
rotate = true;
|
||||
x = 4f;
|
||||
y = 3f;
|
||||
shootSound = Sounds.sap;
|
||||
shootSound = Sounds.shootSap;
|
||||
|
||||
bullet = new SapBulletType(){{
|
||||
sapStrength = 0.8f;
|
||||
@@ -834,7 +831,7 @@ public class UnitTypes{
|
||||
y = 8f;
|
||||
rotate = true;
|
||||
bullet = sapper;
|
||||
shootSound = Sounds.sap;
|
||||
shootSound = Sounds.shootSap;
|
||||
}},
|
||||
new Weapon("spiroct-weapon"){{
|
||||
reload = 14f;
|
||||
@@ -842,7 +839,7 @@ public class UnitTypes{
|
||||
y = 6f;
|
||||
rotate = true;
|
||||
bullet = sapper;
|
||||
shootSound = Sounds.sap;
|
||||
shootSound = Sounds.shootSap;
|
||||
}},
|
||||
new Weapon("spiroct-weapon"){{
|
||||
reload = 22f;
|
||||
@@ -850,7 +847,7 @@ public class UnitTypes{
|
||||
y = 0f;
|
||||
rotate = true;
|
||||
bullet = sapper;
|
||||
shootSound = Sounds.sap;
|
||||
shootSound = Sounds.shootSap;
|
||||
}},
|
||||
new Weapon("large-purple-mount"){{
|
||||
y = -7f;
|
||||
@@ -860,7 +857,7 @@ public class UnitTypes{
|
||||
shake = 3f;
|
||||
rotateSpeed = 2f;
|
||||
ejectEffect = Fx.casing1;
|
||||
shootSound = Sounds.artillerySap;
|
||||
shootSound = Sounds.shootArtillerySap;
|
||||
rotate = true;
|
||||
shadow = 8f;
|
||||
recoil = 3f;
|
||||
@@ -928,7 +925,7 @@ public class UnitTypes{
|
||||
shake = 4f;
|
||||
rotateSpeed = 2f;
|
||||
ejectEffect = Fx.casing1;
|
||||
shootSound = Sounds.shotgunSap;
|
||||
shootSound = Sounds.shootToxopidShotgun;
|
||||
shootSoundVolume = 0.8f;
|
||||
rotate = true;
|
||||
shadow = 12f;
|
||||
@@ -961,7 +958,7 @@ public class UnitTypes{
|
||||
recoil = 10f;
|
||||
rotateSpeed = 1f;
|
||||
ejectEffect = Fx.casing3;
|
||||
shootSound = Sounds.artillerySapBig;
|
||||
shootSound = Sounds.shootArtillerySapBig;
|
||||
rotate = true;
|
||||
shadow = 30f;
|
||||
|
||||
@@ -1057,7 +1054,6 @@ public class UnitTypes{
|
||||
smokeEffect = Fx.shootSmallSmoke;
|
||||
ammoMultiplier = 2;
|
||||
}};
|
||||
shootSound = Sounds.shootDagger;
|
||||
}});
|
||||
}};
|
||||
|
||||
@@ -1091,7 +1087,7 @@ public class UnitTypes{
|
||||
ejectEffect = Fx.none;
|
||||
inaccuracy = 15f;
|
||||
ignoreRotation = true;
|
||||
shootSound = Sounds.bombDrop;
|
||||
shootSound = Sounds.shootHorizon;
|
||||
soundPitchMax = 1.2f;
|
||||
bullet = new BombBulletType(27f, 25f){{
|
||||
width = 10f;
|
||||
@@ -1132,7 +1128,7 @@ public class UnitTypes{
|
||||
shoot.shots = 2;
|
||||
inaccuracy = 5f;
|
||||
velocityRnd = 0.2f;
|
||||
shootSound = Sounds.missileLong;
|
||||
shootSound = Sounds.shootMissileLong;
|
||||
|
||||
bullet = new MissileBulletType(3f, 14){{
|
||||
width = 8f;
|
||||
@@ -1194,7 +1190,7 @@ public class UnitTypes{
|
||||
ejectEffect = Fx.casing1;
|
||||
rotateSpeed = 8f;
|
||||
bullet = missiles;
|
||||
shootSound = Sounds.missile;
|
||||
shootSound = Sounds.shootMissile;
|
||||
rotate = true;
|
||||
shadow = 6f;
|
||||
}},
|
||||
@@ -1205,7 +1201,7 @@ public class UnitTypes{
|
||||
rotateSpeed = 8f;
|
||||
ejectEffect = Fx.casing1;
|
||||
bullet = missiles;
|
||||
shootSound = Sounds.missile;
|
||||
shootSound = Sounds.shootMissile;
|
||||
rotate = true;
|
||||
shadow = 6f;
|
||||
}},
|
||||
@@ -1266,7 +1262,7 @@ public class UnitTypes{
|
||||
rotateSpeed = 2f;
|
||||
reload = 45f;
|
||||
recoil = 4f;
|
||||
shootSound = Sounds.laser2;
|
||||
shootSound = Sounds.shootEclipse;
|
||||
shadow = 20f;
|
||||
rotate = true;
|
||||
|
||||
@@ -1361,7 +1357,7 @@ public class UnitTypes{
|
||||
reload = 30f;
|
||||
ejectEffect = Fx.none;
|
||||
recoil = 2f;
|
||||
shootSound = Sounds.missilePlasmaShort;
|
||||
shootSound = Sounds.shootMissilePlasmaShort;
|
||||
velocityRnd = 0.5f;
|
||||
inaccuracy = 15f;
|
||||
alternate = true;
|
||||
@@ -1411,7 +1407,7 @@ public class UnitTypes{
|
||||
|
||||
weapons.add(
|
||||
new Weapon("heal-weapon-mount"){{
|
||||
shootSound = Sounds.lasershoot;
|
||||
shootSound = Sounds.shootLaser;
|
||||
reload = 24f;
|
||||
x = 8f;
|
||||
y = -6f;
|
||||
@@ -1425,7 +1421,7 @@ public class UnitTypes{
|
||||
}};
|
||||
}},
|
||||
new Weapon("heal-weapon-mount"){{
|
||||
shootSound = Sounds.lasershoot;
|
||||
shootSound = Sounds.shootLaser;
|
||||
reload = 15f;
|
||||
x = 4f;
|
||||
y = 5f;
|
||||
@@ -1472,7 +1468,7 @@ public class UnitTypes{
|
||||
minShootVelocity = 0.01f;
|
||||
|
||||
soundPitchMin = 1f;
|
||||
shootSound = Sounds.plasmadrop;
|
||||
shootSound = Sounds.shootQuad;
|
||||
|
||||
bullet = new BasicBulletType(){{
|
||||
sprite = "large-bomb";
|
||||
@@ -1485,7 +1481,7 @@ public class UnitTypes{
|
||||
frontColor = Color.white;
|
||||
mixColorTo = Color.white;
|
||||
|
||||
hitSound = Sounds.plasmaBomb;
|
||||
hitSound = Sounds.explodePlasma;
|
||||
|
||||
shootCone = 180f;
|
||||
ejectEffect = Fx.none;
|
||||
@@ -1560,7 +1556,6 @@ public class UnitTypes{
|
||||
y = 1.5f;
|
||||
rotate = true;
|
||||
ejectEffect = Fx.casing1;
|
||||
shootSound = Sounds.shootDagger;
|
||||
bullet = new BasicBulletType(2.5f, 9){{
|
||||
width = 7f;
|
||||
height = 9f;
|
||||
@@ -1576,7 +1571,7 @@ public class UnitTypes{
|
||||
y = -5f;
|
||||
rotate = true;
|
||||
ejectEffect = Fx.casing1;
|
||||
shootSound = Sounds.missileShort;
|
||||
shootSound = Sounds.shootMissileShort;
|
||||
bullet = new MissileBulletType(2.7f, 12, "missile"){{
|
||||
keepVelocity = true;
|
||||
width = 8f;
|
||||
@@ -1644,7 +1639,7 @@ public class UnitTypes{
|
||||
rotateSpeed = 2f;
|
||||
shake = 1.5f;
|
||||
ejectEffect = Fx.casing2;
|
||||
shootSound = Sounds.artillerySmall;
|
||||
shootSound = Sounds.shootArtillerySmall;
|
||||
bullet = new ArtilleryBulletType(3f, 20, "shell"){{
|
||||
hitEffect = Fx.flakExplosion;
|
||||
knockback = 0.8f;
|
||||
@@ -1689,7 +1684,7 @@ public class UnitTypes{
|
||||
|
||||
inaccuracy = 3f;
|
||||
ejectEffect = Fx.casing3;
|
||||
shootSound = Sounds.artillery;
|
||||
shootSound = Sounds.shootArtillery;
|
||||
|
||||
bullet = new ArtilleryBulletType(3.2f, 15){{
|
||||
trailMult = 0.8f;
|
||||
@@ -1728,7 +1723,7 @@ public class UnitTypes{
|
||||
|
||||
inaccuracy = 5f;
|
||||
velocityRnd = 0.1f;
|
||||
shootSound = Sounds.missileShort;
|
||||
shootSound = Sounds.shootMissileShort;
|
||||
ammoType = new ItemAmmoType(Items.thorium);
|
||||
|
||||
ejectEffect = Fx.none;
|
||||
@@ -1787,7 +1782,7 @@ public class UnitTypes{
|
||||
inaccuracy = 7f;
|
||||
ejectEffect = Fx.none;
|
||||
shake = 1f;
|
||||
shootSound = Sounds.missileLong;
|
||||
shootSound = Sounds.shootMissileLong;
|
||||
|
||||
shoot = new ShootAlternate(){{
|
||||
shots = 6;
|
||||
@@ -1924,7 +1919,7 @@ public class UnitTypes{
|
||||
}});
|
||||
|
||||
weapons.add(new Weapon("retusa-weapon"){{
|
||||
shootSound = Sounds.lasershoot;
|
||||
shootSound = Sounds.shootLaser;
|
||||
reload = 22f;
|
||||
x = 4.5f;
|
||||
y = -3.5f;
|
||||
@@ -1945,7 +1940,7 @@ public class UnitTypes{
|
||||
rotate = true;
|
||||
reload = 90f;
|
||||
x = y = shootX = shootY = 0f;
|
||||
shootSound = Sounds.torpedoPlasma;
|
||||
shootSound = Sounds.shootRetusa;
|
||||
rotateSpeed = 180f;
|
||||
shootSoundVolume = 0.9f;
|
||||
|
||||
@@ -2028,7 +2023,7 @@ public class UnitTypes{
|
||||
rotateSpeed = 5f;
|
||||
inaccuracy = 10f;
|
||||
ejectEffect = Fx.casing1;
|
||||
shootSound = Sounds.flamePlasma;
|
||||
shootSound = Sounds.shootFlamePlasma;
|
||||
shootSoundVolume = 0.9f;
|
||||
shootCone = 30f;
|
||||
|
||||
@@ -2118,7 +2113,7 @@ public class UnitTypes{
|
||||
rotate = true;
|
||||
inaccuracy = 1f;
|
||||
velocityRnd = 0.1f;
|
||||
shootSound = Sounds.missilePlasma;
|
||||
shootSound = Sounds.shootMissilePlasma;
|
||||
|
||||
ejectEffect = Fx.none;
|
||||
bullet = new FlakBulletType(2.5f, 25){{
|
||||
@@ -2303,7 +2298,7 @@ public class UnitTypes{
|
||||
reload = 170f;
|
||||
recoil = 1f;
|
||||
shootSound = Sounds.beamPlasmaSmall;
|
||||
initialShootSound = Sounds.beamPlasmaFireSmall;
|
||||
initialShootSound = Sounds.shootBeamPlasmaSmall;
|
||||
continuous = true;
|
||||
cooldownTime = reload;
|
||||
immunities.add(StatusEffects.burning);
|
||||
@@ -2388,7 +2383,7 @@ public class UnitTypes{
|
||||
hitShake = 4f;
|
||||
trailRotation = true;
|
||||
status = StatusEffects.electrified;
|
||||
hitSound = Sounds.empBlast;
|
||||
hitSound = Sounds.explosionNavanax;
|
||||
|
||||
trailEffect = new Effect(16f, e -> {
|
||||
color(Pal.heal);
|
||||
@@ -2458,7 +2453,7 @@ public class UnitTypes{
|
||||
top = false;
|
||||
|
||||
bullet = new LaserBoltBulletType(2.5f, 11){{
|
||||
shootSound = Sounds.laserbolt;
|
||||
shootSound = Sounds.shootAlpha;
|
||||
keepVelocity = false;
|
||||
width = 1.5f;
|
||||
height = 4.5f;
|
||||
@@ -2507,7 +2502,7 @@ public class UnitTypes{
|
||||
shoot.shotDelay = 4f;
|
||||
|
||||
bullet = new LaserBoltBulletType(3f, 11){{
|
||||
shootSound = Sounds.laserbolt;
|
||||
shootSound = Sounds.shootAlpha;
|
||||
keepVelocity = false;
|
||||
width = 1.5f;
|
||||
height = 4.5f;
|
||||
@@ -2560,7 +2555,7 @@ public class UnitTypes{
|
||||
inaccuracy = 3f;
|
||||
|
||||
bullet = new LaserBoltBulletType(3.5f, 11){{
|
||||
shootSound = Sounds.laserbolt;
|
||||
shootSound = Sounds.shootAlpha;
|
||||
keepVelocity = false;
|
||||
width = 1.5f;
|
||||
height = 5f;
|
||||
@@ -2645,7 +2640,7 @@ public class UnitTypes{
|
||||
tankMoveSound = Sounds.tankMove;
|
||||
|
||||
weapons.add(new Weapon("locus-weapon"){{
|
||||
shootSound = Sounds.bolt;
|
||||
shootSound = Sounds.shootLocus;
|
||||
layerOffset = 0.0001f;
|
||||
reload = 18f;
|
||||
shootY = 10f;
|
||||
@@ -2801,7 +2796,7 @@ public class UnitTypes{
|
||||
tankMoveSound = Sounds.tankMoveHeavy;
|
||||
|
||||
weapons.add(new Weapon("vanquish-weapon"){{
|
||||
shootSound = Sounds.mediumCannon;
|
||||
shootSound = Sounds.shootTank;
|
||||
layerOffset = 0.0001f;
|
||||
reload = 70f;
|
||||
shootY = 71f / 4f;
|
||||
@@ -2905,7 +2900,7 @@ public class UnitTypes{
|
||||
treadRects = new Rect[]{new Rect(27 - xo, 152 - yo, 56, 73), new Rect(24 - xo, 51 - 9 - yo, 29, 17), new Rect(59 - xo, 18 - 9 - yo, 39, 19)};
|
||||
|
||||
weapons.add(new Weapon("conquer-weapon"){{
|
||||
shootSound = Sounds.largeCannon;
|
||||
shootSound = Sounds.shootConquer;
|
||||
layerOffset = 0.1f;
|
||||
reload = 100f;
|
||||
shootY = 32.5f;
|
||||
@@ -3255,7 +3250,7 @@ public class UnitTypes{
|
||||
recoil = 0.5f;
|
||||
|
||||
bullet = new BulletType(){{
|
||||
shootSound = Sounds.lasershoot;
|
||||
shootSound = Sounds.shootLaser;
|
||||
shootEffect = Fx.sparkShoot;
|
||||
hitEffect = Fx.pointHit;
|
||||
maxRange = 100f;
|
||||
@@ -3313,7 +3308,7 @@ public class UnitTypes{
|
||||
}
|
||||
|
||||
weapons.add(new Weapon("anthicus-weapon"){{
|
||||
shootSound = Sounds.missileLarge;
|
||||
shootSound = Sounds.shootMissileLarge;
|
||||
shootSoundVolume = 0.5f;
|
||||
x = 29f / 4f;
|
||||
y = -11f / 4f;
|
||||
@@ -3475,7 +3470,7 @@ public class UnitTypes{
|
||||
groundLayer = Layer.legUnit;
|
||||
|
||||
weapons.add(new Weapon("tecta-weapon"){{
|
||||
shootSound = Sounds.malignShoot;
|
||||
shootSound = Sounds.shootMalign;
|
||||
mirror = true;
|
||||
top = false;
|
||||
|
||||
@@ -3573,7 +3568,7 @@ public class UnitTypes{
|
||||
alwaysShootWhenMoving = true;
|
||||
|
||||
weapons.add(new Weapon("collaris-weapon"){{
|
||||
shootSound = Sounds.pulseBlast;
|
||||
shootSound = Sounds.shootCollaris;
|
||||
mirror = true;
|
||||
rotationLimit = 30f;
|
||||
rotateSpeed = 0.4f;
|
||||
@@ -3857,7 +3852,7 @@ public class UnitTypes{
|
||||
}});
|
||||
|
||||
weapons.add(new Weapon(){{
|
||||
shootSound = Sounds.shockBlast;
|
||||
shootSound = Sounds.explosionObviate;
|
||||
x = 0f;
|
||||
y = -2f;
|
||||
shootY = 0f;
|
||||
@@ -3968,7 +3963,7 @@ public class UnitTypes{
|
||||
}});
|
||||
|
||||
weapons.add(new Weapon("quell-weapon"){{
|
||||
shootSound = Sounds.missileSmall;
|
||||
shootSound = Sounds.shootMissileSmall;
|
||||
x = 51 / 4f;
|
||||
y = 5 / 4f;
|
||||
rotate = true;
|
||||
@@ -4085,7 +4080,8 @@ public class UnitTypes{
|
||||
}
|
||||
|
||||
weapons.add(new Weapon("disrupt-weapon"){{
|
||||
shootSound = Sounds.missileLarge;
|
||||
shootSound = Sounds.shootMissileLarge;
|
||||
shootSoundVolume = 0.6f;
|
||||
x = 78f / 4f;
|
||||
y = -10f / 4f;
|
||||
mirror = true;
|
||||
|
||||
@@ -24,7 +24,7 @@ public class Weathers{
|
||||
density = 1200f;
|
||||
attrs.set(Attribute.light, -0.15f);
|
||||
|
||||
sound = Sounds.windhowl;
|
||||
sound = Sounds.windHowl;
|
||||
soundVol = 0f;
|
||||
soundVolOscMag = 1.5f;
|
||||
soundVolOscScl = 1100f;
|
||||
|
||||
@@ -131,7 +131,7 @@ public class Control implements ApplicationListener, Loadable{
|
||||
state.map.setHighScore(state.wave);
|
||||
}
|
||||
|
||||
Sounds.wave.play();
|
||||
Sounds.waveSpawn.play();
|
||||
});
|
||||
|
||||
Events.on(GameOverEvent.class, event -> {
|
||||
|
||||
@@ -133,15 +133,13 @@ public class World{
|
||||
return tile;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Building build(int x, int y){
|
||||
public @Nullable Building build(int x, int y){
|
||||
Tile tile = tile(x, y);
|
||||
if(tile == null) return null;
|
||||
return tile.build;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Building build(int pos){
|
||||
public @Nullable Building build(int pos){
|
||||
Tile tile = tile(pos);
|
||||
if(tile == null) return null;
|
||||
return tile.build;
|
||||
@@ -151,16 +149,18 @@ public class World{
|
||||
return tiles.getn(x, y);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Tile tileWorld(float x, float y){
|
||||
public @Nullable Tile tileWorld(float x, float y){
|
||||
return tile(Math.round(x / tilesize), Math.round(y / tilesize));
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Building buildWorld(float x, float y){
|
||||
public @Nullable Building buildWorld(float x, float y){
|
||||
return build(Math.round(x / tilesize), Math.round(y / tilesize));
|
||||
}
|
||||
|
||||
public @Nullable Building buildWorld(Position pos){
|
||||
return buildWorld(pos.getX(), pos.getY());
|
||||
}
|
||||
|
||||
/** Convert from world to logic tile coordinates. Whole numbers are at centers of tiles. */
|
||||
public static float conv(float coord){
|
||||
return coord / tilesize;
|
||||
|
||||
@@ -24,7 +24,7 @@ public class EnergyFieldAbility extends Ability{
|
||||
public float damage = 1, reload = 100, range = 60;
|
||||
public Effect healEffect = Fx.heal, hitEffect = Fx.hitLaserBlast, damageEffect = Fx.chainLightning;
|
||||
public StatusEffect status = StatusEffects.electrified;
|
||||
public Sound shootSound = Sounds.spark;
|
||||
public Sound shootSound = Sounds.shootEnergyField;
|
||||
public float statusDuration = 60f * 6f;
|
||||
public float x, y;
|
||||
public boolean targetGround = true, targetAir = true, hitBuildings = true, hitUnits = true;
|
||||
@@ -185,7 +185,7 @@ public class EnergyFieldAbility extends Ability{
|
||||
}
|
||||
|
||||
if(anyNearby){
|
||||
shootSound.at(unit);
|
||||
shootSound.at(unit, 1f + Mathf.range(0.1f), 1f);
|
||||
|
||||
if(useAmmo && state.rules.unitAmmo){
|
||||
unit.ammo --;
|
||||
|
||||
@@ -37,15 +37,15 @@ public class MoveLightningAbility extends Ability{
|
||||
public @Nullable BulletType bullet;
|
||||
/** Bullet angle parameters */
|
||||
public float bulletAngle = 0f, bulletSpread = 0f;
|
||||
|
||||
|
||||
public Effect shootEffect = Fx.sparkShoot;
|
||||
public boolean parentizeEffects;
|
||||
public Sound shootSound = Sounds.spark;
|
||||
public Sound shootSound = Sounds.shootArc;
|
||||
|
||||
protected float side = 1f;
|
||||
|
||||
|
||||
MoveLightningAbility(){}
|
||||
|
||||
|
||||
public MoveLightningAbility(float damage, int length, float chance, float y, float minSpeed, float maxSpeed, Color color, String heatRegion){
|
||||
this.damage = damage;
|
||||
this.length = length;
|
||||
@@ -56,7 +56,7 @@ public class MoveLightningAbility extends Ability{
|
||||
this.color = color;
|
||||
this.heatRegion = heatRegion;
|
||||
}
|
||||
|
||||
|
||||
public MoveLightningAbility(float damage, int length, float chance, float y, float minSpeed, float maxSpeed, Color color){
|
||||
this.damage = damage;
|
||||
this.length = length;
|
||||
@@ -95,7 +95,7 @@ public class MoveLightningAbility extends Ability{
|
||||
if(alternate) side *= -1f;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void draw(Unit unit){
|
||||
float scl = Mathf.clamp((unit.vel().len() - minSpeed) / (maxSpeed - minSpeed));
|
||||
|
||||
@@ -15,7 +15,7 @@ public class RepairFieldAbility extends Ability{
|
||||
public float amount = 1, reload = 100, range = 60, healPercent = 0f;
|
||||
public Effect healEffect = Fx.heal;
|
||||
public Effect activeEffect = Fx.healWaveDynamic;
|
||||
public Sound sound = Sounds.healAbility;
|
||||
public Sound sound = Sounds.healWave;
|
||||
public float soundVolume = 0.5f;
|
||||
public boolean parentizeEffects = false;
|
||||
/** Multiplies healing to units of the same type by this amount. */
|
||||
|
||||
@@ -155,7 +155,7 @@ abstract class BuilderComp implements Posc, Statusc, Teamc, Rotc{
|
||||
if(!within(tile, finalPlaceDst)) continue;
|
||||
|
||||
if(!headless){
|
||||
Vars.control.sound.loop(Sounds.build, tile, 0.15f);
|
||||
Vars.control.sound.loop(Sounds.loopBuild, tile, 0.15f);
|
||||
}
|
||||
|
||||
if(!(tile.build instanceof ConstructBuild cb)){
|
||||
|
||||
@@ -1489,7 +1489,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
||||
playDestroySound();
|
||||
|
||||
if(explosiveness > 40f){
|
||||
Sounds.blockExplodeExplosive.at(tile, Mathf.random(block.destroyPitchMin, block.destroyPitchMax), block.destroySoundVolume);
|
||||
(Mathf.chance(0.5) ? Sounds.blockExplodeExplosive : Sounds.blockExplodeExplosiveAlt).at(tile, Mathf.random(block.destroyPitchMin, block.destroyPitchMax), block.destroySoundVolume);
|
||||
}else if(flammability > 5f){
|
||||
Sounds.blockExplodeFlammable.at(tile, Mathf.random(block.destroyPitchMin, block.destroyPitchMax), block.destroySoundVolume);
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ abstract class FireComp implements Timedc, Posc, Syncc, Drawc{
|
||||
animation %= frames;
|
||||
|
||||
if(!headless){
|
||||
control.sound.loop(Sounds.fire, this, 0.07f);
|
||||
control.sound.loop(Sounds.loopFire, this, 0.07f);
|
||||
}
|
||||
|
||||
//faster updates -> disappears more quickly
|
||||
|
||||
@@ -942,10 +942,6 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
||||
player.unit().updateBuilding(isBuilding);
|
||||
}
|
||||
|
||||
if(!player.dead() && player.shooting && !wasShooting && player.unit().hasWeapons() && state.rules.unitAmmo && !player.team().rules().infiniteAmmo && player.unit().ammo <= 0){
|
||||
player.unit().type.weapons.first().noAmmoSound.at(player.unit());
|
||||
}
|
||||
|
||||
//you don't want selected blocks while locked, looks weird
|
||||
if(locked()){
|
||||
block = null;
|
||||
|
||||
@@ -383,7 +383,7 @@ public class UnitType extends UnlockableContent implements Senseable{
|
||||
/** if true, harder materials will take longer to mine */
|
||||
public boolean mineHardnessScaling = true;
|
||||
/** continuous sound emitted when mining. */
|
||||
public Sound mineSound = Sounds.minebeam;
|
||||
public Sound mineSound = Sounds.loopMineBeam;
|
||||
/** volume of mining sound. */
|
||||
public float mineSoundVolume = 0.6f;
|
||||
/** Target items to mine. Used in MinerAI */
|
||||
|
||||
@@ -132,15 +132,13 @@ public class Weapon implements Cloneable{
|
||||
/** volume of active sound */
|
||||
public float activeSoundVolume = 1f;
|
||||
/** sound used for shooting */
|
||||
public Sound shootSound = Sounds.pew;
|
||||
public Sound shootSound = Sounds.shoot;
|
||||
/** volume of the shoot sound */
|
||||
public float shootSoundVolume = 1f;
|
||||
/** sound used when this weapon first fires; for continuous weapons only */
|
||||
public Sound initialShootSound = Sounds.none;
|
||||
/** sound used for weapons that have a delay */
|
||||
public Sound chargeSound = Sounds.none;
|
||||
/** sound played when there is nothing to shoot */
|
||||
public Sound noAmmoSound = Sounds.noammo;
|
||||
/** displayed region (autoloaded) */
|
||||
public TextureRegion region;
|
||||
/** heat region, must be same size as region (optional) */
|
||||
|
||||
@@ -37,7 +37,7 @@ public class MissileUnitType extends UnitType{
|
||||
targetPriority = -1f;
|
||||
outlineColor = Pal.darkOutline;
|
||||
fogRadius = 2f;
|
||||
loopSound = Sounds.missileTrail;
|
||||
loopSound = Sounds.loopMissileTrail;
|
||||
loopSoundVolume = 0.05f;
|
||||
drawMinimap = false;
|
||||
//TODO weapon configs, etc?
|
||||
|
||||
@@ -61,7 +61,7 @@ public class RepairBeamWeapon extends Weapon{
|
||||
recoil = 0f;
|
||||
noAttack = true;
|
||||
useAttackRange = false;
|
||||
activeSound = Sounds.healBeam;
|
||||
activeSound = Sounds.beamHeal;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -311,7 +311,7 @@ public class Block extends UnlockableContent implements Senseable{
|
||||
/** Sound made when this block is built. */
|
||||
public Sound placeSound = Sounds.unset;
|
||||
/** Sound made when this block is deconstructed. */
|
||||
public Sound breakSound = Sounds.breaks;
|
||||
public Sound breakSound = Sounds.unset;
|
||||
/** Sounds made when this block is destroyed.*/
|
||||
public Sound destroySound = Sounds.unset;
|
||||
/** Volume of destruction sound. */
|
||||
@@ -1264,14 +1264,21 @@ public class Block extends UnlockableContent implements Senseable{
|
||||
destroySound =
|
||||
size >= 3 ? Sounds.blockExplode3 :
|
||||
size >= 2 ? Sounds.blockExplode2 :
|
||||
Sounds.blockExplode1;
|
||||
new RandomSound(Sounds.blockExplode1, Sounds.blockExplode1Alt);
|
||||
}
|
||||
|
||||
if(placeSound == Sounds.unset){
|
||||
placeSound =
|
||||
size >= 3 ? Sounds.place3 :
|
||||
size >= 2 ? Sounds.place2 :
|
||||
Sounds.place1;
|
||||
size >= 3 ? Sounds.blockPlace3 :
|
||||
size >= 2 ? Sounds.blockPlace2 :
|
||||
Sounds.blockPlace1;
|
||||
}
|
||||
|
||||
if(breakSound == Sounds.unset){
|
||||
breakSound =
|
||||
size >= 3 ? Sounds.blockBreak3 :
|
||||
size >= 2 ? Sounds.blockBreak2 :
|
||||
Sounds.blockBreak1;
|
||||
}
|
||||
|
||||
//disable standard shadow
|
||||
|
||||
@@ -65,7 +65,7 @@ public class DirectionalForceProjector extends Block{
|
||||
solid = true;
|
||||
group = BlockGroup.projectors;
|
||||
envEnabled |= Env.space;
|
||||
ambientSound = Sounds.shield;
|
||||
ambientSound = Sounds.loopShield;
|
||||
ambientSoundVolume = 0.08f;
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ public class ForceProjector extends Block{
|
||||
hasLiquids = true;
|
||||
hasItems = true;
|
||||
envEnabled |= Env.space;
|
||||
ambientSound = Sounds.shield;
|
||||
ambientSound = Sounds.loopShield;
|
||||
ambientSoundVolume = 0.08f;
|
||||
flags = EnumSet.of(BlockFlag.shield);
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ public class MendProjector extends Block{
|
||||
public float phaseBoost = 12f;
|
||||
public float phaseRangeBoost = 50f;
|
||||
public float useTime = 400f;
|
||||
public Sound mendSound = Sounds.healAbility;
|
||||
public Sound mendSound = Sounds.healWave;
|
||||
public float mendSoundVolume = 0.5f;
|
||||
|
||||
private boolean any = false;
|
||||
|
||||
@@ -20,7 +20,7 @@ public class Wall extends Block{
|
||||
public float lightningDamage = 20f;
|
||||
public int lightningLength = 17;
|
||||
public Color lightningColor = Pal.surge;
|
||||
public Sound lightningSound = Sounds.spark;
|
||||
public Sound lightningSound = Sounds.shootArc;
|
||||
|
||||
/** Bullet deflection chance. -1 to disable */
|
||||
public float chanceDeflect = -1f;
|
||||
|
||||
@@ -17,7 +17,7 @@ public class ContinuousLiquidTurret extends ContinuousTurret{
|
||||
super(name);
|
||||
hasLiquids = true;
|
||||
//TODO
|
||||
loopSound = Sounds.minebeam;
|
||||
loopSound = Sounds.loopMineBeam;
|
||||
shootSound = Sounds.none;
|
||||
smokeEffect = Fx.none;
|
||||
shootEffect = Fx.none;
|
||||
|
||||
@@ -21,7 +21,7 @@ public class LiquidTurret extends Turret{
|
||||
public LiquidTurret(String name){
|
||||
super(name);
|
||||
hasLiquids = true;
|
||||
loopSound = Sounds.spray;
|
||||
loopSound = Sounds.loopSpray;
|
||||
shootSound = Sounds.none;
|
||||
smokeEffect = Fx.none;
|
||||
shootEffect = Fx.none;
|
||||
|
||||
@@ -31,7 +31,7 @@ public class TractorBeamTurret extends BaseTurret{
|
||||
public StatusEffect status = StatusEffects.none;
|
||||
public float statusDuration = 300;
|
||||
|
||||
public Sound shootSound = Sounds.tractorbeam;
|
||||
public Sound shootSound = Sounds.beamParallax;
|
||||
public float shootSoundVolume = 0.9f;
|
||||
|
||||
public @Load(value = "@-base", fallback = "block-@size") TextureRegion baseRegion;
|
||||
|
||||
@@ -118,7 +118,7 @@ public class Turret extends ReloadTurret{
|
||||
/** Effect created when ammo is used. Not optional. */
|
||||
public Effect ammoUseEffect = Fx.none;
|
||||
/** Sound emitted when a single bullet is shot. */
|
||||
public Sound shootSound = Sounds.shoot;
|
||||
public Sound shootSound = Sounds.shootDuo;
|
||||
/** Volume of shooting sound. */
|
||||
public float shootSoundVolume = 1f;
|
||||
/** Sound emitted when shoot.firstShotDelay is >0 and shooting begins. */
|
||||
|
||||
@@ -46,7 +46,7 @@ public class Conveyor extends Block implements Autotiler{
|
||||
conveyorPlacement = true;
|
||||
underBullets = true;
|
||||
|
||||
ambientSound = Sounds.conveyor;
|
||||
ambientSound = Sounds.loopConveyor;
|
||||
ambientSoundVolume = 0.0022f;
|
||||
unloadable = false;
|
||||
noUpdateDisabled = false;
|
||||
@@ -55,7 +55,7 @@ public class Conveyor extends Block implements Autotiler{
|
||||
@Override
|
||||
public void setStats(){
|
||||
super.setStats();
|
||||
|
||||
|
||||
//have to add a custom calculated speed, since the actual movement speed is apparently not linear
|
||||
stats.add(Stat.itemsMoved, displayedSpeed, StatUnit.itemsSecond);
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ public class StackConveyor extends Block implements Autotiler{
|
||||
underBullets = true;
|
||||
priority = TargetPriority.transport;
|
||||
|
||||
ambientSound = Sounds.conveyor;
|
||||
ambientSound = Sounds.loopConveyor;
|
||||
ambientSoundVolume = 0.004f;
|
||||
}
|
||||
|
||||
|
||||
@@ -196,7 +196,7 @@ public class Floor extends Block{
|
||||
}
|
||||
|
||||
if(isLiquid && walkSound == Sounds.none){
|
||||
walkSound = Sounds.splash;
|
||||
walkSound = Sounds.stepWater;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ public class BeamDrill extends Block{
|
||||
regionRotated1 = 1;
|
||||
ignoreLineRotation = true;
|
||||
ambientSoundVolume = 0.05f;
|
||||
ambientSound = Sounds.minebeam;
|
||||
ambientSound = Sounds.loopMineBeam;
|
||||
|
||||
envEnabled |= Env.space;
|
||||
flags = EnumSet.of(BlockFlag.drill);
|
||||
|
||||
@@ -81,7 +81,7 @@ public class Drill extends Block{
|
||||
hasLiquids = true;
|
||||
liquidCapacity = 5f;
|
||||
hasItems = true;
|
||||
ambientSound = Sounds.drill;
|
||||
ambientSound = Sounds.loopDrill;
|
||||
ambientSoundVolume = 0.019f;
|
||||
//drills work in space I guess
|
||||
envEnabled |= Env.space;
|
||||
|
||||
@@ -10,7 +10,7 @@ public class Fracker extends SolidPump{
|
||||
public Fracker(String name){
|
||||
super(name);
|
||||
hasItems = true;
|
||||
ambientSound = Sounds.drill;
|
||||
ambientSound = Sounds.loopDrill;
|
||||
ambientSoundVolume = 0.03f;
|
||||
envRequired |= Env.groundOil;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ public class GenericCrafter extends Block{
|
||||
update = true;
|
||||
solid = true;
|
||||
hasItems = true;
|
||||
ambientSound = Sounds.machine;
|
||||
ambientSound = Sounds.loopMachine;
|
||||
sync = true;
|
||||
ambientSoundVolume = 0.03f;
|
||||
flags = EnumSet.of(BlockFlag.factory);
|
||||
|
||||
@@ -43,7 +43,7 @@ public class Reconstructor extends UnitBlock{
|
||||
regionRotated1 = 1;
|
||||
regionRotated2 = 2;
|
||||
commandable = true;
|
||||
ambientSound = Sounds.respawning;
|
||||
ambientSound = Sounds.loopUnitBuilding;
|
||||
configurable = true;
|
||||
config(UnitCommand.class, (ReconstructorBuild build, UnitCommand command) -> build.command = command);
|
||||
configClear((ReconstructorBuild build) -> build.command = null);
|
||||
|
||||
@@ -63,7 +63,7 @@ public class RepairTurret extends Block{
|
||||
group = BlockGroup.projectors;
|
||||
|
||||
envEnabled |= Env.space;
|
||||
ambientSound = Sounds.healBeam;
|
||||
ambientSound = Sounds.beamHeal;
|
||||
ambientSoundVolume = 1f;
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ public class UnitAssembler extends PayloadBlock{
|
||||
group = BlockGroup.units;
|
||||
commandable = true;
|
||||
quickRotate = false;
|
||||
ambientSound = Sounds.respawning;
|
||||
ambientSound = Sounds.loopUnitBuilding;
|
||||
ambientSoundVolume = 0.13f;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ public class UnitCargoLoader extends Block{
|
||||
update = true;
|
||||
hasItems = true;
|
||||
itemCapacity = 200;
|
||||
ambientSound = Sounds.respawning;
|
||||
ambientSound = Sounds.loopUnitBuilding;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -50,7 +50,7 @@ public class UnitFactory extends UnitBlock{
|
||||
rotate = true;
|
||||
regionRotated1 = 1;
|
||||
commandable = true;
|
||||
ambientSound = Sounds.respawning;
|
||||
ambientSound = Sounds.loopUnitBuilding;
|
||||
|
||||
config(Integer.class, (UnitFactoryBuild build, Integer i) -> {
|
||||
if(!configurable) return;
|
||||
|
||||
Reference in New Issue
Block a user