mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-12-05 18:30:22 -08:00
Compare commits
18 commits
10bb45de31
...
134167cb2e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
134167cb2e | ||
|
|
848fcfad1f | ||
|
|
f14f8eff83 | ||
|
|
774443c960 | ||
|
|
d4d2a5e54c | ||
|
|
98b6ac2d94 | ||
|
|
ed860e8395 | ||
|
|
cc693f97b6 | ||
|
|
11773a5991 | ||
|
|
d33d355aa2 | ||
|
|
67495e628b | ||
|
|
dd8c06192e | ||
|
|
d934a02791 | ||
|
|
3b10100ae4 | ||
|
|
bec2ca3821 | ||
|
|
2042d6ef29 | ||
|
|
fddc6e53f3 | ||
|
|
3f2aba4123 |
95 changed files with 322 additions and 133 deletions
Binary file not shown.
|
Before Width: | Height: | Size: 908 B After Width: | Height: | Size: 840 B |
|
|
@ -472,7 +472,7 @@ editor.generation = Generation
|
|||
editor.objectives = Objectives
|
||||
editor.locales = Locale Bundles
|
||||
editor.patches.guide = Patch Guide
|
||||
editor.patches = Content Patches
|
||||
editor.patches = Data Patches
|
||||
editor.patch: Patchset: {0}
|
||||
editor.patches.none = [lightgray]No patchsets loaded.
|
||||
editor.patches.errors = Patchset Errors
|
||||
|
|
|
|||
|
|
@ -110,6 +110,7 @@ dsmolenaers (freesound.org)
|
|||
Headphaze (freesound.org)
|
||||
Michel Baradari (opengameart.org)
|
||||
Michael Klier (opengameart.org)
|
||||
Lee Barkovich (opengameart.org)
|
||||
Neoqueto (Darktech LDR Font)
|
||||
Nikolass
|
||||
VolasYouKnow
|
||||
|
|
|
|||
Binary file not shown.
BIN
core/assets/sounds/artilleryExplosion.ogg
Normal file
BIN
core/assets/sounds/artilleryExplosion.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/artillerySap.ogg
Normal file
BIN
core/assets/sounds/artillerySap.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/artillerySapBig.ogg
Normal file
BIN
core/assets/sounds/artillerySapBig.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/artilleryShockExplosion.ogg
Normal file
BIN
core/assets/sounds/artilleryShockExplosion.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/artilleryShockExplosionBig.ogg
Normal file
BIN
core/assets/sounds/artilleryShockExplosionBig.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/artillerySmall.ogg
Normal file
BIN
core/assets/sounds/artillerySmall.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
core/assets/sounds/beamPlasma.ogg
Normal file
BIN
core/assets/sounds/beamPlasma.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/beamPlasmaFire.ogg
Normal file
BIN
core/assets/sounds/beamPlasmaFire.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/beamPlasmaFireSmall.ogg
Normal file
BIN
core/assets/sounds/beamPlasmaFireSmall.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/beamPlasmaSmall.ogg
Normal file
BIN
core/assets/sounds/beamPlasmaSmall.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
core/assets/sounds/bombDrop.ogg
Normal file
BIN
core/assets/sounds/bombDrop.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
core/assets/sounds/crawlerExplosion.ogg
Normal file
BIN
core/assets/sounds/crawlerExplosion.ogg
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
core/assets/sounds/empBlast.ogg
Normal file
BIN
core/assets/sounds/empBlast.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
core/assets/sounds/explosionPlasmaSmall.ogg
Normal file
BIN
core/assets/sounds/explosionPlasmaSmall.ogg
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
core/assets/sounds/flamePlasma.ogg
Normal file
BIN
core/assets/sounds/flamePlasma.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
core/assets/sounds/laser2.ogg
Normal file
BIN
core/assets/sounds/laser2.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
core/assets/sounds/lasercharge3.ogg
Normal file
BIN
core/assets/sounds/lasercharge3.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
core/assets/sounds/massdriver.ogg
Normal file
BIN
core/assets/sounds/massdriver.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/massdriverReceive.ogg
Normal file
BIN
core/assets/sounds/massdriverReceive.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/mechStep.ogg
Normal file
BIN
core/assets/sounds/mechStep.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
core/assets/sounds/missileLong.ogg
Normal file
BIN
core/assets/sounds/missileLong.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/missilePlasma.ogg
Normal file
BIN
core/assets/sounds/missilePlasma.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/missilePlasmaShort.ogg
Normal file
BIN
core/assets/sounds/missilePlasmaShort.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/missileShort.ogg
Normal file
BIN
core/assets/sounds/missileShort.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/padLand.ogg
Normal file
BIN
core/assets/sounds/padLand.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/padLaunch.ogg
Normal file
BIN
core/assets/sounds/padLaunch.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
core/assets/sounds/reactorExplosion.ogg
Normal file
BIN
core/assets/sounds/reactorExplosion.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
core/assets/sounds/shock.ogg
Normal file
BIN
core/assets/sounds/shock.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
core/assets/sounds/shootAtrax.ogg
Normal file
BIN
core/assets/sounds/shootAtrax.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/shootCyclone.ogg
Normal file
BIN
core/assets/sounds/shootCyclone.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/shootDagger.ogg
Normal file
BIN
core/assets/sounds/shootDagger.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/shootDuo.ogg
Normal file
BIN
core/assets/sounds/shootDuo.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/shootNavanax.ogg
Normal file
BIN
core/assets/sounds/shootNavanax.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/shootOmura.ogg
Normal file
BIN
core/assets/sounds/shootOmura.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/shootReign.ogg
Normal file
BIN
core/assets/sounds/shootReign.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/shootRipple.ogg
Normal file
BIN
core/assets/sounds/shootRipple.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/shootSalvo.ogg
Normal file
BIN
core/assets/sounds/shootSalvo.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/shootScepter.ogg
Normal file
BIN
core/assets/sounds/shootScepter.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/shootSegment.ogg
Normal file
BIN
core/assets/sounds/shootSegment.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
core/assets/sounds/shootSpectre.ogg
Normal file
BIN
core/assets/sounds/shootSpectre.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/shootStell.ogg
Normal file
BIN
core/assets/sounds/shootStell.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/shotgunSap.ogg
Normal file
BIN
core/assets/sounds/shotgunSap.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
core/assets/sounds/sparkBullet.ogg
Normal file
BIN
core/assets/sounds/sparkBullet.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/walkerStep.ogg
Normal file
BIN
core/assets/sounds/walkerStep.ogg
Normal file
Binary file not shown.
|
|
@ -270,7 +270,6 @@ public class CommandAI extends AIController{
|
|||
|
||||
Building targetBuild = world.buildWorld(targetPos.x, targetPos.y);
|
||||
|
||||
|
||||
//TODO: should the unit stop when it finds a target?
|
||||
if(
|
||||
(hasStance(UnitStance.patrol) && !hasStance(UnitStance.pursueTarget) && target != null && unit.within(target, unit.type.range - 2f) && !unit.type.circleTarget) ||
|
||||
|
|
@ -347,7 +346,7 @@ public class CommandAI extends AIController{
|
|||
if(move){
|
||||
if(unit.type.circleTarget && attackTarget != null){
|
||||
target = attackTarget;
|
||||
circleAttack(80f);
|
||||
circleAttack(unit.type.circleTargetRadius);
|
||||
}else{
|
||||
moveTo(vecOut,
|
||||
withinAttackRange ? engageRange :
|
||||
|
|
@ -362,7 +361,7 @@ public class CommandAI extends AIController{
|
|||
attackTarget = null;
|
||||
}
|
||||
|
||||
if(unit.isFlying() && move && (attackTarget == null || !unit.within(attackTarget, unit.type.range))){
|
||||
if(unit.isFlying() && move && !(unit.type.circleTarget && !unit.type.omniMovement) && (attackTarget == null || !unit.within(attackTarget, unit.type.range))){
|
||||
unit.lookAt(vecMovePos);
|
||||
}else{
|
||||
faceTarget();
|
||||
|
|
@ -379,7 +378,11 @@ public class CommandAI extends AIController{
|
|||
}
|
||||
|
||||
}else if(target != null){
|
||||
faceTarget();
|
||||
if(unit.type.circleTarget && shouldFire()){
|
||||
circleAttack(unit.type.circleTargetRadius);
|
||||
}else{
|
||||
faceTarget();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ public class FlyingAI extends AIController{
|
|||
|
||||
if(target != null && unit.hasWeapons()){
|
||||
if(unit.type.circleTarget){
|
||||
circleAttack(120f);
|
||||
circleAttack(unit.type.circleTargetRadius);
|
||||
}else{
|
||||
moveTo(target, unit.type.range * 0.8f);
|
||||
unit.lookAt(target);
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ public class RepairAI extends AIController{
|
|||
|
||||
if(target != null && target instanceof Building b && b.team == unit.team){
|
||||
if(unit.type.circleTarget){
|
||||
circleAttack(120f);
|
||||
circleAttack(unit.type.circleTargetRadius);
|
||||
}else if(!target.within(unit, unit.type.range * 0.65f)){
|
||||
moveTo(target, unit.type.range * 0.65f);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,25 +3,33 @@ package mindustry.audio;
|
|||
import arc.*;
|
||||
import arc.audio.*;
|
||||
import arc.struct.*;
|
||||
import mindustry.gen.*;
|
||||
|
||||
import static mindustry.gen.Sounds.*;
|
||||
|
||||
/** Sets up priorities and groups for various sounds. */
|
||||
public class SoundPriority{
|
||||
static int lastGroup = 1;
|
||||
|
||||
public static void init(){
|
||||
max(7, laserbig, beam, laserbeam);
|
||||
|
||||
//priority 2: long weapon loops
|
||||
set(
|
||||
2f,
|
||||
laserbig,
|
||||
beam
|
||||
beam,
|
||||
laserbeam,
|
||||
beamPlasma
|
||||
);
|
||||
|
||||
//priority 1.5: big weapon sounds, not loops
|
||||
set(1.5f,
|
||||
set(
|
||||
1.5f,
|
||||
railgun,
|
||||
largeCannon
|
||||
largeCannon,
|
||||
lasercharge,
|
||||
lasercharge2,
|
||||
lasercharge3
|
||||
);
|
||||
|
||||
//priority 1: ambient noises
|
||||
|
|
@ -36,13 +44,35 @@ public class SoundPriority{
|
|||
respawning
|
||||
);
|
||||
|
||||
//this is spammed a LOT
|
||||
Sounds.shootBig.setMinConcurrentInterrupt(shootBig.getLength() * 0.9f);
|
||||
//very loud
|
||||
laser.setMaxConcurrent(5);
|
||||
|
||||
sameGroup(flame, flamePlasma);
|
||||
|
||||
//sameGroup(hit1, hit2, hit3);
|
||||
//max(4, hit1, hit2, hit3);
|
||||
|
||||
sameGroup(missile, missileShort, missilePlasmaShort);
|
||||
sameGroup(spark, shock);
|
||||
|
||||
for(var sound : Core.assets.getAll(Sound.class, new Seq<>())){
|
||||
sound.setMinConcurrentInterrupt(Math.min(0.25f, sound.getLength() * 0.5f));
|
||||
sound.setMaxConcurrent(7);
|
||||
}
|
||||
|
||||
mechStep.setMinConcurrentInterrupt(0.5f);
|
||||
walkerStep.setMinConcurrentInterrupt(0.6f);
|
||||
|
||||
mechStep.setMaxConcurrent(4);
|
||||
walkerStep.setMaxConcurrent(4);
|
||||
}
|
||||
|
||||
static void max(int max, Sound... sounds){
|
||||
for(var s : sounds) s.setMaxConcurrent(max);
|
||||
}
|
||||
|
||||
static void sameGroup(Sound... sounds){
|
||||
int id = lastGroup ++;
|
||||
for(var s : sounds) s.setConcurrentGroup(id);
|
||||
}
|
||||
|
||||
static void set(float value, Sound... sounds){
|
||||
|
|
|
|||
|
|
@ -3298,6 +3298,7 @@ public class Blocks{
|
|||
}
|
||||
}};
|
||||
|
||||
shootSound = Sounds.shootDuo;
|
||||
recoil = 0.5f;
|
||||
shootY = 3f;
|
||||
reload = 20f;
|
||||
|
|
@ -3501,7 +3502,7 @@ public class Blocks{
|
|||
inaccuracy = 1f;
|
||||
shootCone = 10f;
|
||||
health = 260;
|
||||
shootSound = Sounds.bang;
|
||||
shootSound = Sounds.artillerySmall;
|
||||
coolant = consumeCoolant(0.1f);
|
||||
limitRange(0f);
|
||||
}};
|
||||
|
|
@ -3538,7 +3539,6 @@ public class Blocks{
|
|||
flags = EnumSet.of(BlockFlag.turret, BlockFlag.extinguisher);
|
||||
}};
|
||||
|
||||
//TODO these may work in space, but what's the point?
|
||||
lancer = new PowerTurret("lancer"){{
|
||||
requirements(Category.turret, with(Items.copper, 60, Items.lead, 70, Items.silicon, 60, Items.titanium, 30));
|
||||
range = 165f;
|
||||
|
|
@ -3558,6 +3558,7 @@ public class Blocks{
|
|||
accurateDelay = false;
|
||||
shootSound = Sounds.laser;
|
||||
coolant = consumeCoolant(0.2f);
|
||||
chargeSound = Sounds.lasercharge3;
|
||||
|
||||
consumePower(6f);
|
||||
|
||||
|
|
@ -3800,7 +3801,7 @@ public class Blocks{
|
|||
|
||||
ammoUseEffect = Fx.casing2;
|
||||
scaledHealth = 240;
|
||||
shootSound = Sounds.shootBig;
|
||||
shootSound = Sounds.shootSalvo;
|
||||
|
||||
limitRange();
|
||||
coolant = consumeCoolant(0.2f);
|
||||
|
|
@ -3835,7 +3836,7 @@ public class Blocks{
|
|||
damage = 0.2f;
|
||||
layer = Layer.bullet - 2f;
|
||||
}},
|
||||
Liquids.slag, new LiquidBulletType(Liquids.slag){{
|
||||
Liquids.slag, new LiquidBulletType(Liquids.slag){{
|
||||
lifetime = 49f;
|
||||
speed = 4f;
|
||||
knockback = 1.3f;
|
||||
|
|
@ -3900,6 +3901,7 @@ public class Blocks{
|
|||
|
||||
scaledHealth = 220;
|
||||
shootSound = Sounds.shotgun;
|
||||
shootSoundVolume = 0.9f;
|
||||
coolant = consumeCoolant(0.3f);
|
||||
|
||||
float brange = range + 10f;
|
||||
|
|
@ -3925,25 +3927,31 @@ public class Blocks{
|
|||
ripple = new ItemTurret("ripple"){{
|
||||
requirements(Category.turret, with(Items.copper, 150, Items.graphite, 135, Items.titanium, 60));
|
||||
ammo(
|
||||
Items.graphite, new ArtilleryBulletType(3f, 20){{
|
||||
Items.graphite, new ArtilleryBulletType(3f, 40){{
|
||||
hitEffect = new MultiEffect(Fx.flakExplosion, Fx.shockwaveSmaller);
|
||||
knockback = 0.8f;
|
||||
lifetime = 80f;
|
||||
width = height = 11f;
|
||||
width = 12f;
|
||||
height = 14f;
|
||||
collidesTiles = false;
|
||||
splashDamageRadius = 25f * 0.75f;
|
||||
splashDamage = 33f;
|
||||
splashDamageRadius = 30f * 0.75f;
|
||||
splashDamage = 70f;
|
||||
|
||||
backColor = hitColor = trailColor = Pal.graphiteAmmoBack;
|
||||
frontColor = Pal.graphiteAmmoFront;
|
||||
despawnEffect = Fx.hitBulletColor;
|
||||
lifeScaleRandMax = 1.08f;
|
||||
lifeScaleRandMin = 0.95f;
|
||||
}},
|
||||
Items.silicon, new ArtilleryBulletType(3f, 20){{
|
||||
Items.silicon, new ArtilleryBulletType(3f, 40){{
|
||||
hitEffect = new MultiEffect(Fx.flakExplosion, Fx.shockwaveSmaller);
|
||||
knockback = 0.8f;
|
||||
lifetime = 80f;
|
||||
width = height = 11f;
|
||||
width = 12f;
|
||||
height = 14f;
|
||||
collidesTiles = false;
|
||||
splashDamageRadius = 25f * 0.75f;
|
||||
splashDamage = 33f;
|
||||
splashDamageRadius = 30f * 0.75f;
|
||||
splashDamage = 70f;
|
||||
reloadMultiplier = 1.2f;
|
||||
ammoMultiplier = 3f;
|
||||
homingPower = 0.08f;
|
||||
|
|
@ -3955,15 +3963,18 @@ public class Blocks{
|
|||
despawnEffect = Fx.hitBulletColor;
|
||||
backColor = hitColor = trailColor = Pal.siliconAmmoBack;
|
||||
frontColor = Pal.siliconAmmoFront;
|
||||
lifeScaleRandMax = 1.08f;
|
||||
lifeScaleRandMin = 0.95f;
|
||||
}},
|
||||
Items.pyratite, new ArtilleryBulletType(3f, 24){{
|
||||
hitEffect = Fx.blastExplosion;
|
||||
Items.pyratite, new ArtilleryBulletType(3f, 48){{
|
||||
hitEffect = new MultiEffect(Fx.blastExplosion, Fx.shockwave);
|
||||
knockback = 0.8f;
|
||||
lifetime = 80f;
|
||||
width = height = 13f;
|
||||
width = 13f;
|
||||
height = 15f;
|
||||
collidesTiles = false;
|
||||
splashDamageRadius = 25f * 0.75f;
|
||||
splashDamage = 45f;
|
||||
splashDamageRadius = 30f * 0.75f;
|
||||
splashDamage = 90f;
|
||||
status = StatusEffects.burning;
|
||||
statusDuration = 60f * 12f;
|
||||
frontColor = Pal.lightishOrange;
|
||||
|
|
@ -3972,32 +3983,38 @@ public class Blocks{
|
|||
trailEffect = Fx.incendTrail;
|
||||
ammoMultiplier = 4f;
|
||||
despawnEffect = Fx.hitBulletColor;
|
||||
lifeScaleRandMax = 1.08f;
|
||||
lifeScaleRandMin = 0.95f;
|
||||
}},
|
||||
Items.blastCompound, new ArtilleryBulletType(2f, 20, "shell"){{
|
||||
hitEffect = Fx.blastExplosion;
|
||||
Items.blastCompound, new ArtilleryBulletType(2f, 40, "shell"){{
|
||||
hitEffect = new MultiEffect(Fx.blastExplosion, Fx.shockwave);
|
||||
knockback = 0.8f;
|
||||
lifetime = 80f;
|
||||
width = height = 14f;
|
||||
width = 14f;
|
||||
height = 16f;
|
||||
collidesTiles = false;
|
||||
ammoMultiplier = 4f;
|
||||
splashDamageRadius = 45f * 0.75f;
|
||||
splashDamage = 55f;
|
||||
splashDamageRadius = 50f * 0.75f;
|
||||
splashDamage = 90f;
|
||||
|
||||
status = StatusEffects.blasted;
|
||||
lifeScaleRandMax = 1.08f;
|
||||
lifeScaleRandMin = 0.95f;
|
||||
|
||||
despawnEffect = Fx.hitBulletColor;
|
||||
despawnEffect = Fx.hitBulletColor;
|
||||
backColor = hitColor = trailColor = Pal.blastAmmoBack;
|
||||
frontColor = Pal.blastAmmoFront;
|
||||
}},
|
||||
Items.plastanium, new ArtilleryBulletType(3.4f, 20, "shell"){{
|
||||
hitEffect = Fx.plasticExplosion;
|
||||
Items.plastanium, new ArtilleryBulletType(3.4f, 40, "shell"){{
|
||||
hitEffect = new MultiEffect(Fx.plasticExplosion, Fx.shockwave);
|
||||
knockback = 1f;
|
||||
lifetime = 80f;
|
||||
width = height = 13f;
|
||||
width = 13f;
|
||||
height = 15f;
|
||||
collidesTiles = false;
|
||||
splashDamageRadius = 35f * 0.75f;
|
||||
splashDamage = 45f;
|
||||
fragBullet = new BasicBulletType(2.5f, 10, "bullet"){{
|
||||
splashDamageRadius = 40f * 0.75f;
|
||||
splashDamage = 90f;
|
||||
fragBullet = new BasicBulletType(2.5f, 14, "bullet"){{
|
||||
width = 10f;
|
||||
height = 12f;
|
||||
shrinkY = 1f;
|
||||
|
|
@ -4007,21 +4024,24 @@ public class Blocks{
|
|||
despawnEffect = Fx.none;
|
||||
collidesAir = false;
|
||||
}};
|
||||
fragBullets = 10;
|
||||
fragBullets = 15;
|
||||
backColor = Pal.plastaniumBack;
|
||||
frontColor = Pal.plastaniumFront;
|
||||
lifeScaleRandMax = 1.08f;
|
||||
lifeScaleRandMin = 0.95f;
|
||||
}}
|
||||
);
|
||||
|
||||
targetAir = false;
|
||||
size = 3;
|
||||
shoot.shots = 4;
|
||||
inaccuracy = 12f;
|
||||
reload = 60f;
|
||||
inaccuracy = 11f;
|
||||
reload = 120f;
|
||||
ammoEjectBack = 5f;
|
||||
ammoUseEffect = Fx.casing3Double;
|
||||
ammoPerShot = 2;
|
||||
velocityRnd = 0.2f;
|
||||
|
||||
scaleLifetimeOffset = 1f / 9f;
|
||||
recoil = 6f;
|
||||
shake = 2f;
|
||||
|
|
@ -4030,7 +4050,7 @@ public class Blocks{
|
|||
coolant = consumeCoolant(0.3f);
|
||||
|
||||
scaledHealth = 130;
|
||||
shootSound = Sounds.artillery;
|
||||
shootSound = Sounds.shootRipple;
|
||||
}};
|
||||
|
||||
cyclone = new ItemTurret("cyclone"){{
|
||||
|
|
@ -4143,7 +4163,7 @@ public class Blocks{
|
|||
rotateSpeed = 10f;
|
||||
inaccuracy = 10f;
|
||||
shootCone = 30f;
|
||||
shootSound = Sounds.shootSnap;
|
||||
shootSound = Sounds.shootCyclone;
|
||||
coolant = consumeCoolant(0.3f);
|
||||
|
||||
scaledHealth = 145;
|
||||
|
|
@ -4251,7 +4271,7 @@ public class Blocks{
|
|||
shake = 2f;
|
||||
size = 4;
|
||||
shootCone = 24f;
|
||||
shootSound = Sounds.shootBig;
|
||||
shootSound = Sounds.shootSpectre;
|
||||
|
||||
scaledHealth = 160;
|
||||
coolant = consumeCoolant(1f);
|
||||
|
|
|
|||
|
|
@ -1530,6 +1530,12 @@ public class Fx{
|
|||
Lines.circle(e.x, e.y, e.fin() * 28f);
|
||||
}),
|
||||
|
||||
shockwaveSmaller = new Effect(9f, 80f, e -> {
|
||||
color(Color.white, Color.lightGray, e.fin());
|
||||
stroke(e.fout() * 2f + 0.2f);
|
||||
Lines.circle(e.x, e.y, e.fin() * 22f);
|
||||
}),
|
||||
|
||||
bigShockwave = new Effect(10f, 80f, e -> {
|
||||
color(Color.white, Color.lightGray, e.fin());
|
||||
stroke(e.fout() * 3f);
|
||||
|
|
@ -2017,18 +2023,18 @@ public class Fx{
|
|||
shootSmallFlame = new Effect(32f, 80f, e -> {
|
||||
color(Pal.lightFlame, Pal.darkFlame, Color.gray, e.fin());
|
||||
|
||||
randLenVectors(e.id, 8, e.finpow() * 60f, e.rotation, 10f, (x, y) -> {
|
||||
randLenVectors(e.id, 12, e.finpow() * 60f, e.rotation, 10f, (x, y) -> {
|
||||
Fill.circle(e.x + x, e.y + y, 0.65f + e.fout() * 1.5f);
|
||||
});
|
||||
}),
|
||||
}).followParent(false),
|
||||
|
||||
shootPyraFlame = new Effect(33f, 80f, e -> {
|
||||
color(Pal.lightPyraFlame, Pal.darkPyraFlame, Color.gray, e.fin());
|
||||
|
||||
randLenVectors(e.id, 10, e.finpow() * 70f, e.rotation, 10f, (x, y) -> {
|
||||
randLenVectors(e.id, 13, e.finpow() * 70f, e.rotation, 10f, (x, y) -> {
|
||||
Fill.circle(e.x + x, e.y + y, 0.65f + e.fout() * 1.6f);
|
||||
});
|
||||
}),
|
||||
}).followParent(false),
|
||||
|
||||
shootLiquid = new Effect(15f, 80f, e -> {
|
||||
color(e.color);
|
||||
|
|
|
|||
|
|
@ -103,6 +103,7 @@ public class UnitTypes{
|
|||
hitSize = 8f;
|
||||
health = 150;
|
||||
weapons.add(new Weapon("large-weapon"){{
|
||||
shootSound = Sounds.shootDagger;
|
||||
reload = 13f;
|
||||
x = 4f;
|
||||
y = 2f;
|
||||
|
|
@ -122,24 +123,23 @@ public class UnitTypes{
|
|||
health = 550;
|
||||
armor = 4f;
|
||||
ammoType = new ItemAmmoType(Items.coal);
|
||||
|
||||
immunities.add(StatusEffects.burning);
|
||||
|
||||
weapons.add(new Weapon("flamethrower"){{
|
||||
top = false;
|
||||
shootSound = Sounds.flame;
|
||||
shootY = 2f;
|
||||
reload = 11f;
|
||||
reload = 22f;
|
||||
recoil = 1f;
|
||||
ejectEffect = Fx.none;
|
||||
bullet = new BulletType(4.2f, 37f){{
|
||||
bullet = new BulletType(4.2f, 37f*2f){{
|
||||
ammoMultiplier = 3f;
|
||||
hitSize = 7f;
|
||||
lifetime = 13f;
|
||||
pierce = true;
|
||||
pierceBuilding = true;
|
||||
pierceCap = 2;
|
||||
statusDuration = 60f * 4;
|
||||
statusDuration = 60f * 5;
|
||||
shootEffect = Fx.shootSmallFlame;
|
||||
hitEffect = Fx.hitFlameSmall;
|
||||
despawnEffect = Fx.none;
|
||||
|
|
@ -197,6 +197,8 @@ public class UnitTypes{
|
|||
stepShake = 0.15f;
|
||||
singleTarget = true;
|
||||
drownTimeMultiplier = 1.5f;
|
||||
stepSound = Sounds.mechStep;
|
||||
stepSoundVolume = 0.25f;
|
||||
|
||||
abilities.add(new ShieldRegenFieldAbility(25f, 250f, 60f * 1, 60f));
|
||||
|
||||
|
|
@ -216,7 +218,7 @@ public class UnitTypes{
|
|||
recoil = 5f;
|
||||
shake = 2f;
|
||||
ejectEffect = Fx.casing3;
|
||||
shootSound = Sounds.bang;
|
||||
shootSound = Sounds.shootScepter;
|
||||
inaccuracy = 3f;
|
||||
|
||||
shoot.shots = 3;
|
||||
|
|
@ -232,6 +234,7 @@ public class UnitTypes{
|
|||
lightningColor = Pal.surge;
|
||||
//standard bullet damage is far too much for lightning
|
||||
lightningDamage = 20;
|
||||
despawnSound = Sounds.sparkBullet;
|
||||
}};
|
||||
}},
|
||||
|
||||
|
|
@ -242,6 +245,7 @@ public class UnitTypes{
|
|||
rotate = true;
|
||||
ejectEffect = Fx.casing1;
|
||||
bullet = smallBullet;
|
||||
shootSound = Sounds.shootDagger;
|
||||
}},
|
||||
new Weapon("mount-weapon"){{
|
||||
reload = 16f;
|
||||
|
|
@ -250,6 +254,7 @@ public class UnitTypes{
|
|||
rotate = true;
|
||||
ejectEffect = Fx.casing1;
|
||||
bullet = smallBullet;
|
||||
shootSound = Sounds.shootDagger;
|
||||
}}
|
||||
);
|
||||
}};
|
||||
|
|
@ -266,6 +271,7 @@ public class UnitTypes{
|
|||
mechFrontSway = 1.9f;
|
||||
mechSideSway = 0.6f;
|
||||
ammoType = new ItemAmmoType(Items.thorium);
|
||||
stepSound = Sounds.mechStep;
|
||||
|
||||
weapons.add(
|
||||
new Weapon("reign-weapon"){{
|
||||
|
|
@ -277,7 +283,7 @@ public class UnitTypes{
|
|||
recoil = 5f;
|
||||
shake = 2f;
|
||||
ejectEffect = Fx.casing4;
|
||||
shootSound = Sounds.bang;
|
||||
shootSound = Sounds.shootReign;
|
||||
|
||||
bullet = new BasicBulletType(13f, 80){{
|
||||
pierce = true;
|
||||
|
|
@ -295,6 +301,7 @@ public class UnitTypes{
|
|||
fragBullets = 3;
|
||||
fragLifeMin = 0f;
|
||||
fragRandomSpread = 30f;
|
||||
despawnSound = Sounds.explosion;
|
||||
|
||||
fragBullet = new BasicBulletType(9f, 20){{
|
||||
width = 10f;
|
||||
|
|
@ -380,7 +387,7 @@ public class UnitTypes{
|
|||
|
||||
ejectEffect = Fx.none;
|
||||
recoil = 2.5f;
|
||||
shootSound = Sounds.spark;
|
||||
shootSound = Sounds.shock;
|
||||
|
||||
bullet = new LightningBulletType(){{
|
||||
lightningColor = hitColor = Pal.heal;
|
||||
|
|
@ -475,6 +482,8 @@ public class UnitTypes{
|
|||
immunities = ObjectSet.with(StatusEffects.burning);
|
||||
|
||||
singleTarget = true;
|
||||
stepSound = Sounds.mechStep;
|
||||
stepSoundVolume = 0.25f;
|
||||
|
||||
weapons.add(new Weapon("vela-weapon"){{
|
||||
mirror = false;
|
||||
|
|
@ -489,7 +498,8 @@ public class UnitTypes{
|
|||
reload = 155f;
|
||||
recoil = 0f;
|
||||
chargeSound = Sounds.lasercharge2;
|
||||
shootSound = Sounds.beam;
|
||||
shootSound = Sounds.beamPlasma;
|
||||
initialShootSound = Sounds.beamPlasmaFire;
|
||||
continuous = true;
|
||||
cooldownTime = 200f;
|
||||
|
||||
|
|
@ -541,6 +551,10 @@ public class UnitTypes{
|
|||
rotateSpeed = 1.5f;
|
||||
drownTimeMultiplier = 1.6f;
|
||||
|
||||
stepSound = Sounds.walkerStep;
|
||||
stepSoundVolume = 1.1f;
|
||||
stepSoundPitch = 0.9f;
|
||||
|
||||
legCount = 4;
|
||||
legLength = 14f;
|
||||
legBaseOffset = 11f;
|
||||
|
|
@ -623,13 +637,13 @@ public class UnitTypes{
|
|||
reload = 24f;
|
||||
shootCone = 180f;
|
||||
ejectEffect = Fx.none;
|
||||
shootSound = Sounds.explosion;
|
||||
shootSound = Sounds.crawlerExplosion;
|
||||
shootSoundVolume = 0.4f;
|
||||
x = shootY = 0f;
|
||||
mirror = false;
|
||||
bullet = new BulletType(){{
|
||||
collidesTiles = false;
|
||||
collides = false;
|
||||
hitSound = Sounds.explosion;
|
||||
|
||||
rangeOverride = 25f;
|
||||
hitEffect = Fx.pulverize;
|
||||
|
|
@ -671,7 +685,7 @@ public class UnitTypes{
|
|||
ejectEffect = Fx.none;
|
||||
recoil = 1f;
|
||||
x = 7f;
|
||||
shootSound = Sounds.flame;
|
||||
shootSound = Sounds.shootAtrax;
|
||||
|
||||
bullet = new LiquidBulletType(Liquids.slag){{
|
||||
damage = 13;
|
||||
|
|
@ -768,6 +782,10 @@ public class UnitTypes{
|
|||
legSpeed = 0.2f;
|
||||
ammoType = new PowerAmmoType(2000);
|
||||
|
||||
stepSound = Sounds.walkerStep;
|
||||
stepSoundVolume = 0.75f;
|
||||
stepSoundPitch = 1.1f;
|
||||
|
||||
legSplashDamage = 32;
|
||||
legSplashRange = 30;
|
||||
|
||||
|
|
@ -820,13 +838,14 @@ public class UnitTypes{
|
|||
shake = 3f;
|
||||
rotateSpeed = 2f;
|
||||
ejectEffect = Fx.casing1;
|
||||
shootSound = Sounds.artillery;
|
||||
shootSound = Sounds.artillerySap;
|
||||
rotate = true;
|
||||
shadow = 8f;
|
||||
recoil = 3f;
|
||||
|
||||
bullet = new ArtilleryBulletType(2f, 12){{
|
||||
hitEffect = Fx.sapExplosion;
|
||||
despawnSound = Sounds.artilleryShockExplosion;
|
||||
knockback = 0.8f;
|
||||
lifetime = 70f;
|
||||
width = height = 19f;
|
||||
|
|
@ -854,6 +873,8 @@ public class UnitTypes{
|
|||
health = 22000;
|
||||
armor = 13f;
|
||||
lightRadius = 140f;
|
||||
stepSound = Sounds.walkerStep;
|
||||
stepSoundVolume = 1.1f;
|
||||
|
||||
rotateSpeed = 1.9f;
|
||||
|
||||
|
|
@ -885,7 +906,8 @@ public class UnitTypes{
|
|||
shake = 4f;
|
||||
rotateSpeed = 2f;
|
||||
ejectEffect = Fx.casing1;
|
||||
shootSound = Sounds.shootBig;
|
||||
shootSound = Sounds.shotgunSap;
|
||||
shootSoundVolume = 0.8f;
|
||||
rotate = true;
|
||||
shadow = 12f;
|
||||
recoil = 3f;
|
||||
|
|
@ -917,13 +939,14 @@ public class UnitTypes{
|
|||
recoil = 10f;
|
||||
rotateSpeed = 1f;
|
||||
ejectEffect = Fx.casing3;
|
||||
shootSound = Sounds.artillery;
|
||||
shootSound = Sounds.artillerySapBig;
|
||||
rotate = true;
|
||||
shadow = 30f;
|
||||
|
||||
rotationLimit = 80f;
|
||||
|
||||
bullet = new ArtilleryBulletType(3f, 50){{
|
||||
despawnSound = Sounds.artilleryShockExplosionBig;
|
||||
hitEffect = Fx.sapExplosion;
|
||||
knockback = 0.8f;
|
||||
lifetime = 80f;
|
||||
|
|
@ -949,6 +972,7 @@ public class UnitTypes{
|
|||
fragBullets = 9;
|
||||
|
||||
fragBullet = new ArtilleryBulletType(2.3f, 30){{
|
||||
despawnSound = Sounds.artilleryShockExplosion;
|
||||
hitEffect = Fx.sapExplosion;
|
||||
knockback = 0.8f;
|
||||
lifetime = 90f;
|
||||
|
|
@ -984,18 +1008,25 @@ public class UnitTypes{
|
|||
flying = true;
|
||||
health = 70;
|
||||
engineOffset = 5.75f;
|
||||
//TODO balance
|
||||
//targetAir = false;
|
||||
targetFlags = new BlockFlag[]{BlockFlag.generator, null};
|
||||
hitSize = 9;
|
||||
itemCapacity = 10;
|
||||
circleTarget = true;
|
||||
omniMovement = false;
|
||||
rotateSpeed = 5f;
|
||||
circleTargetRadius = 60f;
|
||||
|
||||
weapons.add(new Weapon(){{
|
||||
y = 0f;
|
||||
x = 2f;
|
||||
reload = 20f;
|
||||
y = 1f;
|
||||
x = 0f;
|
||||
minShootVelocity = 2f;
|
||||
shootCone = 10f;
|
||||
reload = 80f;
|
||||
shoot.shots = 3;
|
||||
shoot.shotDelay = 3f;
|
||||
ejectEffect = Fx.casing1;
|
||||
bullet = new BasicBulletType(2.5f, 9){{
|
||||
mirror = false;
|
||||
bullet = new BasicBulletType(2.5f, 16){{
|
||||
width = 7f;
|
||||
height = 9f;
|
||||
lifetime = 45f;
|
||||
|
|
@ -1003,7 +1034,7 @@ public class UnitTypes{
|
|||
smokeEffect = Fx.shootSmallSmoke;
|
||||
ammoMultiplier = 2;
|
||||
}};
|
||||
shootSound = Sounds.pew;
|
||||
shootSound = Sounds.shootDagger;
|
||||
}});
|
||||
}};
|
||||
|
||||
|
|
@ -1024,9 +1055,12 @@ public class UnitTypes{
|
|||
targetFlags = new BlockFlag[]{BlockFlag.factory, null};
|
||||
circleTarget = true;
|
||||
ammoType = new ItemAmmoType(Items.graphite);
|
||||
omniMovement = false;
|
||||
rotateSpeed = 4.5f;
|
||||
circleTargetRadius = 40f;
|
||||
|
||||
weapons.add(new Weapon(){{
|
||||
minShootVelocity = 0.75f;
|
||||
minShootVelocity = 1f;
|
||||
x = 3f;
|
||||
shootY = 0f;
|
||||
reload = 12f;
|
||||
|
|
@ -1034,7 +1068,8 @@ public class UnitTypes{
|
|||
ejectEffect = Fx.none;
|
||||
inaccuracy = 15f;
|
||||
ignoreRotation = true;
|
||||
shootSound = Sounds.none;
|
||||
shootSound = Sounds.bombDrop;
|
||||
soundPitchMax = 1.2f;
|
||||
bullet = new BombBulletType(27f, 25f){{
|
||||
width = 10f;
|
||||
height = 14f;
|
||||
|
|
@ -1074,7 +1109,7 @@ public class UnitTypes{
|
|||
shoot.shots = 2;
|
||||
inaccuracy = 5f;
|
||||
velocityRnd = 0.2f;
|
||||
shootSound = Sounds.missile;
|
||||
shootSound = Sounds.missileLong;
|
||||
|
||||
bullet = new MissileBulletType(3f, 14){{
|
||||
width = 8f;
|
||||
|
|
@ -1159,7 +1194,7 @@ public class UnitTypes{
|
|||
shake = 1f;
|
||||
rotateSpeed = 2f;
|
||||
ejectEffect = Fx.casing1;
|
||||
shootSound = Sounds.shootBig;
|
||||
shootSound = Sounds.shootSpectre;
|
||||
rotate = true;
|
||||
shadow = 8f;
|
||||
bullet = new BasicBulletType(7f, 55){{
|
||||
|
|
@ -1208,7 +1243,7 @@ public class UnitTypes{
|
|||
rotateSpeed = 2f;
|
||||
reload = 45f;
|
||||
recoil = 4f;
|
||||
shootSound = Sounds.laser;
|
||||
shootSound = Sounds.laser2;
|
||||
shadow = 20f;
|
||||
rotate = true;
|
||||
|
||||
|
|
@ -1228,7 +1263,7 @@ public class UnitTypes{
|
|||
y = 27f;
|
||||
rotateSpeed = 2f;
|
||||
reload = 9f;
|
||||
shootSound = Sounds.shoot;
|
||||
shootSound = Sounds.shootCyclone;
|
||||
shadow = 7f;
|
||||
rotate = true;
|
||||
recoil = 0.5f;
|
||||
|
|
@ -1242,7 +1277,7 @@ public class UnitTypes{
|
|||
ejectEffect = Fx.casing1;
|
||||
rotateSpeed = 7f;
|
||||
shake = 1f;
|
||||
shootSound = Sounds.shoot;
|
||||
shootSound = Sounds.shootCyclone;
|
||||
rotate = true;
|
||||
shadow = 12f;
|
||||
shootY = 7.25f;
|
||||
|
|
@ -1301,7 +1336,7 @@ public class UnitTypes{
|
|||
reload = 30f;
|
||||
ejectEffect = Fx.none;
|
||||
recoil = 2f;
|
||||
shootSound = Sounds.missile;
|
||||
shootSound = Sounds.missilePlasmaShort;
|
||||
velocityRnd = 0.5f;
|
||||
inaccuracy = 15f;
|
||||
alternate = true;
|
||||
|
|
@ -1498,6 +1533,7 @@ public class UnitTypes{
|
|||
y = 1.5f;
|
||||
rotate = true;
|
||||
ejectEffect = Fx.casing1;
|
||||
shootSound = Sounds.shootDagger;
|
||||
bullet = new BasicBulletType(2.5f, 9){{
|
||||
width = 7f;
|
||||
height = 9f;
|
||||
|
|
@ -1513,7 +1549,7 @@ public class UnitTypes{
|
|||
y = -5f;
|
||||
rotate = true;
|
||||
ejectEffect = Fx.casing1;
|
||||
shootSound = Sounds.missile;
|
||||
shootSound = Sounds.missileShort;
|
||||
bullet = new MissileBulletType(2.7f, 12, "missile"){{
|
||||
keepVelocity = true;
|
||||
width = 8f;
|
||||
|
|
@ -1559,7 +1595,7 @@ public class UnitTypes{
|
|||
rotateSpeed = 5f;
|
||||
inaccuracy = 8f;
|
||||
ejectEffect = Fx.casing1;
|
||||
shootSound = Sounds.shoot;
|
||||
shootSound = Sounds.shootDuo;
|
||||
bullet = new FlakBulletType(4.2f, 3){{
|
||||
lifetime = 60f;
|
||||
ammoMultiplier = 4f;
|
||||
|
|
@ -1581,7 +1617,7 @@ public class UnitTypes{
|
|||
rotateSpeed = 2f;
|
||||
shake = 1.5f;
|
||||
ejectEffect = Fx.casing2;
|
||||
shootSound = Sounds.bang;
|
||||
shootSound = Sounds.artillerySmall;
|
||||
bullet = new ArtilleryBulletType(3f, 20, "shell"){{
|
||||
hitEffect = Fx.flakExplosion;
|
||||
knockback = 0.8f;
|
||||
|
|
@ -1665,7 +1701,7 @@ public class UnitTypes{
|
|||
|
||||
inaccuracy = 5f;
|
||||
velocityRnd = 0.1f;
|
||||
shootSound = Sounds.missile;
|
||||
shootSound = Sounds.missileShort;
|
||||
ammoType = new ItemAmmoType(Items.thorium);
|
||||
|
||||
ejectEffect = Fx.none;
|
||||
|
|
@ -1724,7 +1760,7 @@ public class UnitTypes{
|
|||
inaccuracy = 7f;
|
||||
ejectEffect = Fx.none;
|
||||
shake = 1f;
|
||||
shootSound = Sounds.missile;
|
||||
shootSound = Sounds.missileLong;
|
||||
|
||||
shoot = new ShootAlternate(){{
|
||||
shots = 6;
|
||||
|
|
@ -1766,7 +1802,7 @@ public class UnitTypes{
|
|||
recoil = 3f;
|
||||
shadow = 12f;
|
||||
ejectEffect = Fx.casing3;
|
||||
shootSound = Sounds.shootBig;
|
||||
shootSound = Sounds.shootSpectre;
|
||||
|
||||
shoot.shots = 3;
|
||||
shoot.shotDelay = 4f;
|
||||
|
|
@ -1792,10 +1828,6 @@ public class UnitTypes{
|
|||
faceTarget = false;
|
||||
ammoType = new PowerAmmoType(4000);
|
||||
|
||||
float spawnTime = 60f * 15f;
|
||||
|
||||
abilities.add(new UnitSpawnAbility(flare, spawnTime, 19.25f, -31.75f), new UnitSpawnAbility(flare, spawnTime, -19.25f, -31.75f));
|
||||
|
||||
trailLength = 70;
|
||||
waveTrailX = 23f;
|
||||
waveTrailY = -32f;
|
||||
|
|
@ -1813,7 +1845,7 @@ public class UnitTypes{
|
|||
shake = 6f;
|
||||
recoil = 10.5f;
|
||||
shadow = 50f;
|
||||
shootSound = Sounds.railgun;
|
||||
shootSound = Sounds.shootOmura;
|
||||
|
||||
ejectEffect = Fx.none;
|
||||
|
||||
|
|
@ -1886,8 +1918,9 @@ public class UnitTypes{
|
|||
rotate = true;
|
||||
reload = 90f;
|
||||
x = y = shootX = shootY = 0f;
|
||||
shootSound = Sounds.mineDeploy;
|
||||
shootSound = Sounds.missilePlasmaShort;
|
||||
rotateSpeed = 180f;
|
||||
shootSoundVolume = 0.9f;
|
||||
|
||||
shoot.shots = 3;
|
||||
shoot.shotDelay = 7f;
|
||||
|
|
@ -1906,7 +1939,7 @@ public class UnitTypes{
|
|||
frontColor = Color.white;
|
||||
mixColorTo = Color.white;
|
||||
|
||||
hitSound = Sounds.plasmaboom;
|
||||
hitSound = Sounds.explosionPlasmaSmall;
|
||||
underwater = true;
|
||||
|
||||
ejectEffect = Fx.none;
|
||||
|
|
@ -1968,7 +2001,8 @@ public class UnitTypes{
|
|||
rotateSpeed = 5f;
|
||||
inaccuracy = 10f;
|
||||
ejectEffect = Fx.casing1;
|
||||
shootSound = Sounds.flame;
|
||||
shootSound = Sounds.flamePlasma;
|
||||
shootSoundVolume = 0.9f;
|
||||
shootCone = 30f;
|
||||
|
||||
bullet = new BulletType(3.4f, 23f){{
|
||||
|
|
@ -2057,7 +2091,7 @@ public class UnitTypes{
|
|||
rotate = true;
|
||||
inaccuracy = 1f;
|
||||
velocityRnd = 0.1f;
|
||||
shootSound = Sounds.missile;
|
||||
shootSound = Sounds.missilePlasma;
|
||||
|
||||
ejectEffect = Fx.none;
|
||||
bullet = new FlakBulletType(2.5f, 25){{
|
||||
|
|
@ -2073,6 +2107,7 @@ public class UnitTypes{
|
|||
lightRadius = 60f;
|
||||
lightOpacity = 0.7f;
|
||||
lightColor = Pal.heal;
|
||||
despawnSound = Sounds.explosion;
|
||||
|
||||
splashDamageRadius = 30f;
|
||||
splashDamage = 25f;
|
||||
|
|
@ -2240,7 +2275,8 @@ public class UnitTypes{
|
|||
rotateSpeed = 3.5f;
|
||||
reload = 170f;
|
||||
recoil = 1f;
|
||||
shootSound = Sounds.beam;
|
||||
shootSound = Sounds.beamPlasmaSmall;
|
||||
initialShootSound = Sounds.beamPlasmaFireSmall;
|
||||
continuous = true;
|
||||
cooldownTime = reload;
|
||||
immunities.add(StatusEffects.burning);
|
||||
|
|
@ -2291,8 +2327,7 @@ public class UnitTypes{
|
|||
shootY = 7f;
|
||||
recoil = 4f;
|
||||
cooldownTime = reload - 10f;
|
||||
//TODO better sound
|
||||
shootSound = Sounds.laser;
|
||||
shootSound = Sounds.shootNavanax;
|
||||
|
||||
bullet = new EmpBulletType(){{
|
||||
float rad = 100f;
|
||||
|
|
@ -2326,7 +2361,7 @@ public class UnitTypes{
|
|||
hitShake = 4f;
|
||||
trailRotation = true;
|
||||
status = StatusEffects.electrified;
|
||||
hitSound = Sounds.plasmaboom;
|
||||
hitSound = Sounds.empBlast;
|
||||
|
||||
trailEffect = new Effect(16f, e -> {
|
||||
color(Pal.heal);
|
||||
|
|
@ -2431,15 +2466,14 @@ public class UnitTypes{
|
|||
health = 170f;
|
||||
engineOffset = 6f;
|
||||
hitSize = 9f;
|
||||
faceTarget = false;
|
||||
lowAltitude = true;
|
||||
|
||||
weapons.add(new Weapon("small-mount-weapon"){{
|
||||
top = false;
|
||||
reload = 20f;
|
||||
x = 3f;
|
||||
y = 0.5f;
|
||||
rotate = true;
|
||||
y = 1f;
|
||||
recoil = 1f;
|
||||
shoot.shots = 2;
|
||||
shoot.shotDelay = 4f;
|
||||
|
||||
|
|
@ -2533,6 +2567,7 @@ public class UnitTypes{
|
|||
researchCostMultiplier = 0f;
|
||||
|
||||
weapons.add(new Weapon("stell-weapon"){{
|
||||
shootSound = Sounds.shootStell;
|
||||
layerOffset = 0.0001f;
|
||||
reload = 50f;
|
||||
shootY = 4.5f;
|
||||
|
|
@ -2797,6 +2832,7 @@ public class UnitTypes{
|
|||
recoil = 2f;
|
||||
rotate = true;
|
||||
rotateSpeed = 2f;
|
||||
shootSound = Sounds.shootStell;
|
||||
|
||||
bullet = new BasicBulletType(4.5f, 25){{
|
||||
width = 6.5f;
|
||||
|
|
@ -3349,6 +3385,10 @@ public class UnitTypes{
|
|||
legMaxLength = 1.3f;
|
||||
researchCostMultiplier = 0f;
|
||||
|
||||
stepSound = Sounds.walkerStep;
|
||||
stepSoundVolume = 1f;
|
||||
stepSoundPitch = 1f;
|
||||
|
||||
abilities.add(new ShieldArcAbility(){{
|
||||
region = "tecta-shield";
|
||||
radius = 45f;
|
||||
|
|
@ -3452,6 +3492,10 @@ public class UnitTypes{
|
|||
legStraightness = 0.6f;
|
||||
baseLegStraightness = 0.5f;
|
||||
|
||||
stepSound = Sounds.walkerStep;
|
||||
stepSoundVolume = 1.1f;
|
||||
stepSoundPitch = 0.9f;
|
||||
|
||||
legCount = 8;
|
||||
legLength = 30f;
|
||||
legForwardScl = 2.1f;
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public class GameState{
|
|||
/** Team data. Gets reset every new game. */
|
||||
public Teams teams = new Teams();
|
||||
/** Handles JSON edits of game content. */
|
||||
public ContentPatcher patcher = new ContentPatcher();
|
||||
public DataPatcher patcher = new DataPatcher();
|
||||
/** Number of enemies in the game; only used clientside in servers. */
|
||||
public int enemies;
|
||||
/** Map being playtested (not edited!) */
|
||||
|
|
|
|||
|
|
@ -14,14 +14,14 @@ public class ArtilleryBulletType extends BasicBulletType{
|
|||
collidesAir = false;
|
||||
scaleLife = true;
|
||||
hitShake = 1f;
|
||||
hitSound = Sounds.explosion;
|
||||
hitSound = Sounds.artilleryExplosion;
|
||||
hitEffect = Fx.flakExplosion;
|
||||
shootEffect = Fx.shootBig;
|
||||
trailEffect = Fx.artilleryTrail;
|
||||
|
||||
//default settings:
|
||||
shrinkX = 0.15f;
|
||||
shrinkY = 0.63f;
|
||||
shrinkY = 0.5f;
|
||||
shrinkInterp = Interp.slope;
|
||||
|
||||
//for trail:
|
||||
|
|
|
|||
|
|
@ -25,8 +25,11 @@ public class BasicBulletType extends BulletType{
|
|||
public BasicBulletType(float speed, float damage, String bulletSprite){
|
||||
super(speed, damage);
|
||||
this.sprite = bulletSprite;
|
||||
|
||||
hitSoundPitchRange = 0.2f;
|
||||
hitSoundVolume = 0.4f;
|
||||
}
|
||||
|
||||
|
||||
public BasicBulletType(float speed, float damage){
|
||||
this(speed, damage, "bullet");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,9 +80,9 @@ public class BulletType extends Content implements Cloneable{
|
|||
public Sound hitSound = Sounds.none;
|
||||
/** Sound made when hitting something or getting removed.*/
|
||||
public Sound despawnSound = Sounds.none;
|
||||
/** Pitch of the sound made when hitting something*/
|
||||
public float hitSoundPitch = 1;
|
||||
/** Volume of the sound made when hitting something*/
|
||||
/** Pitch of the sound made when hitting something */
|
||||
public float hitSoundPitch = 1, hitSoundPitchRange = 0.1f;
|
||||
/** Volume of the sound made when hitting something */
|
||||
public float hitSoundVolume = 1;
|
||||
/** Extra inaccuracy when firing. */
|
||||
public float inaccuracy = 0f;
|
||||
|
|
@ -511,7 +511,7 @@ public class BulletType extends Content implements Cloneable{
|
|||
|
||||
public void hit(Bullet b, float x, float y){
|
||||
hitEffect.at(x, y, b.rotation(), hitColor);
|
||||
hitSound.at(x, y, hitSoundPitch, hitSoundVolume);
|
||||
hitSound.at(x, y, hitSoundPitch + Mathf.range(hitSoundPitchRange), hitSoundVolume);
|
||||
|
||||
Effect.shake(hitShake, hitShake, b);
|
||||
|
||||
|
|
@ -609,7 +609,7 @@ public class BulletType extends Content implements Cloneable{
|
|||
}
|
||||
|
||||
despawnEffect.at(b.x, b.y, b.rotation(), hitColor);
|
||||
despawnSound.at(b);
|
||||
despawnSound.at(b, 1f + Mathf.range(hitSoundPitchRange));
|
||||
|
||||
Effect.shake(despawnShake, despawnShake, b);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ public class ShrapnelBulletType extends BulletType{
|
|||
Drawf.tri(b.x + Tmp.v1.x, b.y + Tmp.v1.y, serrationWidth, sl, b.rotation() + 90);
|
||||
Drawf.tri(b.x + Tmp.v1.x, b.y + Tmp.v1.y, serrationWidth, sl, b.rotation() - 90);
|
||||
}
|
||||
Drawf.tri(b.x, b.y, width * b.fout(), (realLength + 50), b.rotation());
|
||||
Drawf.tri(b.x, b.y, width * b.fout(), (realLength + 4f), b.rotation());
|
||||
Drawf.tri(b.x, b.y, width * b.fout(), 10f, b.rotation() + 180f);
|
||||
Draw.reset();
|
||||
|
||||
|
|
|
|||
|
|
@ -179,6 +179,7 @@ abstract class LegsComp implements Posc, Rotc, Hitboxc, Unitc{
|
|||
floor.walkSound.at(x, y, 1f, floor.walkSoundVolume);
|
||||
}else{
|
||||
Fx.unitLandSmall.at(l.base.x, l.base.y, type.rippleScale, floor.mapColor);
|
||||
type.stepSound.at(l.base.x, l.base.y, type.stepSoundPitch + Mathf.range(0.1f), type.stepSoundVolume);
|
||||
}
|
||||
|
||||
//shake when legs contact ground
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ abstract class MechComp implements Posc, Hitboxc, Unitc, Mechc, ElevationMovec{
|
|||
if(type.mechStepParticles){
|
||||
Effect.floorDust(cx, cy, hitSize/8f);
|
||||
}
|
||||
type.stepSound.at(cx, cy, type.stepSoundPitch + Mathf.range(0.1f), type.stepSoundVolume);
|
||||
}
|
||||
|
||||
walkExtension = extendScl;
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ public class RegionPart extends DrawPart{
|
|||
int i = params.sideOverride == -1 ? s : params.sideOverride;
|
||||
|
||||
//can be null
|
||||
var region = drawRegion ? regions[Math.min(i, regions.length - 1)] : null;
|
||||
var region = drawRegion && regions.length > 0 ? regions[Math.min(i, regions.length - 1)] : null;
|
||||
float sign = (i == 0 ? 1 : -1) * params.sideMultiplier;
|
||||
Tmp.v1.set((x + mx) * sign, y + my).rotateRadExact((params.rotation - 90) * Mathf.degRad);
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ public class AIController implements UnitController{
|
|||
/** main target that is being faced */
|
||||
protected @Nullable Teamc target;
|
||||
protected @Nullable Teamc bomberTarget;
|
||||
protected boolean turningAway;
|
||||
|
||||
{
|
||||
resetTimers();
|
||||
|
|
@ -155,7 +156,8 @@ public class AIController implements UnitController{
|
|||
}
|
||||
|
||||
public void targetInvalidated(){
|
||||
//TODO: try this for normal units, reset the target timer
|
||||
//immediately find a new target
|
||||
timer.reset(timerTarget, -1f);
|
||||
}
|
||||
|
||||
public void updateWeapons(){
|
||||
|
|
@ -169,7 +171,7 @@ public class AIController implements UnitController{
|
|||
noTargetTime += Time.delta;
|
||||
|
||||
if(invalid(target)){
|
||||
if(target != null && !target.isAdded()){
|
||||
if(target instanceof Healthc h && !h.isValid()){
|
||||
targetInvalidated();
|
||||
}
|
||||
target = null;
|
||||
|
|
@ -300,14 +302,32 @@ public class AIController implements UnitController{
|
|||
}
|
||||
|
||||
public void circleAttack(float circleLength){
|
||||
if(target == null) return;
|
||||
|
||||
vec.set(target).sub(unit);
|
||||
|
||||
float ang = unit.angleTo(target);
|
||||
float diff = Angles.angleDist(ang, unit.rotation());
|
||||
|
||||
if(target instanceof Unit u && u.collisionLayer() == unit.collisionLayer()){
|
||||
float avoidDist = u.physicSize() + 30f;
|
||||
if(turningAway){
|
||||
|
||||
vec.setLength(prefSpeed()).scl(-1f);
|
||||
unit.movePref(vec);
|
||||
|
||||
if(!unit.within(u, unit.type.circleTargetRadius*0.5f + u.physicSize())){
|
||||
turningAway = false;
|
||||
}
|
||||
return;
|
||||
}else if(unit.within(u, avoidDist)){
|
||||
turningAway = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(diff > 70f && vec.len() < circleLength){
|
||||
vec.setAngle(unit.vel().angle());
|
||||
}else{
|
||||
}else if(unit.type.omniMovement){ //non-omni movement units don't need to do this as the turning is already smoothed out
|
||||
vec.setAngle(Angles.moveToward(unit.vel().angle(), vec.angle(), 6f));
|
||||
}
|
||||
|
||||
|
|
@ -359,7 +379,12 @@ public class AIController implements UnitController{
|
|||
|
||||
if(arrive){
|
||||
Tmp.v3.set(-unit.vel.x / unit.type.accel * 2f, -unit.vel.y / unit.type.accel * 2f).add((target.getX() - unit.x), (target.getY() - unit.y));
|
||||
vec.add(Tmp.v3).limit(speed * length);
|
||||
if(unit.type.omniMovement){
|
||||
vec.add(Tmp.v3).limit(speed * length);
|
||||
}else{
|
||||
//directly move the unit to prevent a backwards movement vector from messing things up
|
||||
unit.moveAt(Tmp.v3.limit(speed * length));
|
||||
}
|
||||
}
|
||||
|
||||
if(length < -0.5f){
|
||||
|
|
|
|||
|
|
@ -437,6 +437,13 @@ public class FloorRenderer{
|
|||
int idx = vidx;
|
||||
vidx += spriteSize;
|
||||
|
||||
//fixes graphical artifacting due to low precision positions/UVs. TODO: test for issues
|
||||
final float grow = 0.01f;
|
||||
x -= grow;
|
||||
y -= grow;
|
||||
width += grow*2f;
|
||||
height += grow*2f;
|
||||
|
||||
if(!Mathf.zero(rotation)){
|
||||
//bottom left and top right corner points relative to origin
|
||||
float worldOriginX = x + originX;
|
||||
|
|
|
|||
|
|
@ -461,6 +461,8 @@ public abstract class SaveVersion extends SaveFileReader{
|
|||
}
|
||||
|
||||
public void readWorldEntities(DataInput stream, Prov[] mapping) throws IOException{
|
||||
IntSet used = new IntSet();
|
||||
Seq<Entityc> reassign = new Seq<>();
|
||||
|
||||
int amount = stream.readInt();
|
||||
for(int j = 0; j < amount; j++){
|
||||
|
|
@ -477,10 +479,20 @@ public abstract class SaveVersion extends SaveFileReader{
|
|||
EntityGroup.checkNextId(id);
|
||||
entity.id(id);
|
||||
entity.read(in);
|
||||
entity.add();
|
||||
if(used.add(id)){
|
||||
entity.add();
|
||||
}else{
|
||||
Log.warn("Duplicate entity ID in save: @ (@)", id, entity);
|
||||
reassign.add(entity);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
for(var ent : reassign){
|
||||
ent.id(EntityGroup.nextId());
|
||||
ent.add();
|
||||
}
|
||||
|
||||
Groups.all.each(Entityc::afterReadAll);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import java.util.*;
|
|||
|
||||
/** The current implementation is awful. Consider it a proof of concept. */
|
||||
@SuppressWarnings("unchecked")
|
||||
public class ContentPatcher{
|
||||
public class DataPatcher{
|
||||
private static final Object root = new Object();
|
||||
private static final ObjectMap<String, ContentType> nameToType = new ObjectMap<>();
|
||||
private static ContentParser parser = createParser();
|
||||
|
|
@ -129,6 +129,8 @@ public class ContentPatcher{
|
|||
if(!Vars.headless){
|
||||
if(object instanceof DrawPart part && parent instanceof MappableContent cont){
|
||||
part.load(cont.name);
|
||||
}else if(object instanceof DrawPart part && parent instanceof Weapon w){
|
||||
part.load(w.name);
|
||||
}else if(object instanceof DrawBlock draw && parent instanceof Block block){
|
||||
draw.load(block);
|
||||
}else if(object instanceof Weapon weapon){
|
||||
|
|
@ -629,7 +629,9 @@ public class Planet extends UnlockableContent{
|
|||
batch.color(Tmp.c1);
|
||||
batch.vertex(Tmp.bz3.valueAt(Tmp.v32, f).add(normal, -stroke));
|
||||
}
|
||||
Gl.disable(Gl.cullFace);
|
||||
batch.flush(Gl.triangleStrip);
|
||||
Gl.enable(Gl.cullFace);
|
||||
}
|
||||
|
||||
public Vec3 lookAt(Sector sector, Vec3 out){
|
||||
|
|
|
|||
|
|
@ -93,6 +93,8 @@ public class UnitType extends UnlockableContent implements Senseable{
|
|||
mineRange = 70f,
|
||||
/** range at which this unit can build */
|
||||
buildRange = Vars.buildingRange,
|
||||
/** radius for circleTarget, if true */
|
||||
circleTargetRadius = 80f,
|
||||
/** multiplier for damage this (flying) unit deals when crashing on enemy things */
|
||||
crashDamageMultiplier = 1f,
|
||||
/** multiplier for health that this flying unit has for its wreck, based on its max health. */
|
||||
|
|
@ -298,6 +300,12 @@ public class UnitType extends UnlockableContent implements Senseable{
|
|||
public Sound loopSound = Sounds.none;
|
||||
/** volume of loop sound */
|
||||
public float loopSoundVolume = 0.5f;
|
||||
/** sound played when this mech/insect unit does a step */
|
||||
public Sound stepSound = Sounds.none;
|
||||
/** volume of step sound */
|
||||
public float stepSoundVolume = 0.5f;
|
||||
/** base pitch of step sound */
|
||||
public float stepSoundPitch = 1f;
|
||||
/** effect that this unit emits when falling */
|
||||
public Effect fallEffect = Fx.fallSmoke;
|
||||
/** effect created at engine when unit falls. */
|
||||
|
|
@ -1351,7 +1359,7 @@ public class UnitType extends UnlockableContent implements Senseable{
|
|||
if(stacks != null){
|
||||
ItemStack[] out = new ItemStack[stacks.length];
|
||||
for(int i = 0; i < out.length; i++){
|
||||
out[i] = new ItemStack(stacks[i].item, UI.roundAmount((int)(Math.pow(stacks[i].amount, 1.1) * researchCostMultiplier)));
|
||||
out[i] = new ItemStack(stacks[i].item, UI.roundAmount((int)(stacks[i].amount * researchCostMultiplier)));
|
||||
}
|
||||
|
||||
//remove zero-requirements for automatic unlocks
|
||||
|
|
|
|||
|
|
@ -128,6 +128,10 @@ public class Weapon implements Cloneable{
|
|||
public float layerOffset = 0f;
|
||||
/** sound used for shooting */
|
||||
public Sound shootSound = Sounds.pew;
|
||||
/** 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 */
|
||||
|
|
@ -498,7 +502,9 @@ public class Weapon implements Cloneable{
|
|||
handleBullet(unit, mount, mount.bullet);
|
||||
|
||||
if(!continuous){
|
||||
shootSound.at(bulletX, bulletY, Mathf.random(soundPitchMin, soundPitchMax));
|
||||
shootSound.at(bulletX, bulletY, Mathf.random(soundPitchMin, soundPitchMax), shootSoundVolume);
|
||||
}else{
|
||||
initialShootSound.at(bulletX, bulletY, Mathf.random(soundPitchMin, soundPitchMax), shootSoundVolume);
|
||||
}
|
||||
|
||||
ejectEffect.at(mountX, mountY, angle * Mathf.sign(this.x));
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package mindustry.world.blocks.campaign;
|
|||
import arc.*;
|
||||
import arc.Graphics.*;
|
||||
import arc.Graphics.Cursor.*;
|
||||
import arc.audio.*;
|
||||
import arc.graphics.*;
|
||||
import arc.graphics.g2d.*;
|
||||
import arc.math.*;
|
||||
|
|
@ -52,6 +53,10 @@ public class LandingPad extends Block{
|
|||
public float liquidPad = 2f;
|
||||
public Color bottomColor = Pal.darkerMetal;
|
||||
|
||||
public float landSoundVolume = 0.75f;
|
||||
//impact timing must be exactly equal to arrivalDuration
|
||||
public Sound landSound = Sounds.padLand;
|
||||
|
||||
public LandingPad(String name){
|
||||
super(name);
|
||||
|
||||
|
|
@ -145,6 +150,7 @@ public class LandingPad extends Block{
|
|||
arriving = config;
|
||||
arrivingTimer = 0f;
|
||||
liquidRemoved = 0f;
|
||||
landSound.at(x, y, 1f, landSoundVolume);
|
||||
|
||||
if(state.isCampaign() && !isFake()){
|
||||
state.rules.sector.info.importCooldownTimers.put(config, 0f);
|
||||
|
|
|
|||
|
|
@ -30,7 +30,8 @@ import static mindustry.Vars.*;
|
|||
public class LaunchPad extends Block{
|
||||
/** Time between launches. */
|
||||
public float launchTime = 1f;
|
||||
public Sound launchSound = Sounds.none;
|
||||
public float launchSoundPitchRand = 0.1f;
|
||||
public Sound launchSound = Sounds.padLaunch;
|
||||
|
||||
public @Load("@-light") TextureRegion lightRegion;
|
||||
public @Load(value = "@-pod", fallback = "launchpod") TextureRegion podRegion;
|
||||
|
|
@ -145,7 +146,7 @@ public class LaunchPad extends Block{
|
|||
if((launchCounter += edelta()) >= launchTime && items.total() >= itemCapacity){
|
||||
//if there are item requirements, use those.
|
||||
consume();
|
||||
launchSound.at(x, y);
|
||||
launchSound.at(x, y, 1f + Mathf.range(launchSoundPitchRand));
|
||||
LaunchPayload entity = LaunchPayload.create();
|
||||
items.each((item, amount) -> entity.stacks.add(new ItemStack(item, amount)));
|
||||
entity.set(this);
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ public class PointDefenseTurret extends ReloadTurret{
|
|||
public Effect hitEffect = Fx.pointHit;
|
||||
public Effect shootEffect = Fx.sparkShoot;
|
||||
|
||||
public Sound shootSound = Sounds.lasershoot;
|
||||
public Sound shootSound = Sounds.shootSegment;
|
||||
|
||||
public float shootCone = 5f;
|
||||
public float bulletDamage = 10f;
|
||||
|
|
|
|||
|
|
@ -119,6 +119,8 @@ public class Turret extends ReloadTurret{
|
|||
public Effect ammoUseEffect = Fx.none;
|
||||
/** Sound emitted when a single bullet is shot. */
|
||||
public Sound shootSound = Sounds.shoot;
|
||||
/** Volume of shooting sound. */
|
||||
public float shootSoundVolume = 1f;
|
||||
/** Sound emitted when shoot.firstShotDelay is >0 and shooting begins. */
|
||||
public Sound chargeSound = Sounds.none;
|
||||
/** The sound that this block makes while active. One sound loop. Do not overuse. */
|
||||
|
|
@ -735,7 +737,7 @@ public class Turret extends ReloadTurret{
|
|||
|
||||
(shootEffect == null ? type.shootEffect : shootEffect).at(bulletX, bulletY, rotation + angleOffset, type.hitColor);
|
||||
(smokeEffect == null ? type.smokeEffect : smokeEffect).at(bulletX, bulletY, rotation + angleOffset, type.hitColor);
|
||||
shootSound.at(bulletX, bulletY, Mathf.random(soundPitchMin, soundPitchMax));
|
||||
shootSound.at(bulletX, bulletY, Mathf.random(soundPitchMin, soundPitchMax), shootSoundVolume);
|
||||
|
||||
ammoUseEffect.at(
|
||||
x - Angles.trnsx(rotation, ammoEjectBack),
|
||||
|
|
|
|||
|
|
@ -36,7 +36,9 @@ public class MassDriver extends Block{
|
|||
public Effect shootEffect = Fx.shootBig2;
|
||||
public Effect smokeEffect = Fx.shootBigSmoke2;
|
||||
public Effect receiveEffect = Fx.mineBig;
|
||||
public Sound shootSound = Sounds.shootBig;
|
||||
public Sound shootSound = Sounds.massdriver;
|
||||
public Sound receiveSound = Sounds.massdriverReceive;
|
||||
public float shootSoundVolume = 0.5f;
|
||||
public float shake = 3f;
|
||||
public @Load("@-base") TextureRegion baseRegion;
|
||||
|
||||
|
|
@ -306,7 +308,7 @@ public class MassDriver extends Block{
|
|||
|
||||
Effect.shake(shake, shake, this);
|
||||
|
||||
shootSound.at(tile, Mathf.random(0.9f, 1.1f));
|
||||
shootSound.at(x, y, 1f + Mathf.range(0.2f), shootSoundVolume);
|
||||
}
|
||||
|
||||
public void handlePayload(Bullet bullet, DriverBulletData data){
|
||||
|
|
@ -326,6 +328,7 @@ public class MassDriver extends Block{
|
|||
|
||||
Effect.shake(shake, shake, this);
|
||||
receiveEffect.at(bullet);
|
||||
receiveSound.at(x, y, 1f + Mathf.range(0.2f), shootSoundVolume);
|
||||
|
||||
reloadCounter = 1f;
|
||||
bullet.remove();
|
||||
|
|
|
|||
|
|
@ -32,7 +32,9 @@ public class PayloadMassDriver extends PayloadBlock{
|
|||
public Effect shootEffect = Fx.shootBig2;
|
||||
public Effect smokeEffect = Fx.shootPayloadDriver;
|
||||
public Effect receiveEffect = Fx.payloadReceive;
|
||||
public Sound shootSound = Sounds.shootBig;
|
||||
public Sound shootSound = Sounds.massdriver;
|
||||
public Sound receiveSound = Sounds.massdriverReceive;
|
||||
public float shootSoundVolume = 0.7f;
|
||||
public float shake = 3f;
|
||||
|
||||
public Effect transferEffect = new Effect(11f, 600f, e -> {
|
||||
|
|
@ -176,6 +178,7 @@ public class PayloadMassDriver extends PayloadBlock{
|
|||
receiveEffect.at(x - cx/2f, y - cy/2f, turretRotation);
|
||||
reloadCounter = 1f;
|
||||
Effect.shake(shake, shake, this);
|
||||
receiveSound.at(x, y, 1f + Mathf.range(0.2f), shootSoundVolume);
|
||||
}
|
||||
|
||||
charging = false;
|
||||
|
|
@ -294,7 +297,7 @@ public class PayloadMassDriver extends PayloadBlock{
|
|||
smokeEffect.at(x, y, turretRotation);
|
||||
|
||||
Effect.shake(shake, shake, this);
|
||||
shootSound.at(this, Mathf.random(0.9f, 1.1f));
|
||||
shootSound.at(x, y, Mathf.random(0.9f, 1.1f), shootSoundVolume);
|
||||
transferEffect.at(x + cx, y + cy, turretRotation, new PayloadMassDriverData(x + cx, y + cy, other.x - cx, other.y - cy, payload));
|
||||
Payload pay = payload;
|
||||
other.recPayload = payload;
|
||||
|
|
|
|||
|
|
@ -34,6 +34,8 @@ public class NuclearReactor extends PowerGenerator{
|
|||
public float heatOutput = 15f;
|
||||
/** rate at which heat progress increases */
|
||||
public float heatWarmupRate = 1f;
|
||||
/** time taken to cool down if no fuel is inputted even if coolant is not present*/
|
||||
public float ambientCooldownTime = 60f * 20f;
|
||||
/** threshold at which block starts smoking */
|
||||
public float smokeThreshold = 0.3f;
|
||||
/** heat threshold at which lights start flashing */
|
||||
|
|
@ -66,7 +68,7 @@ public class NuclearReactor extends PowerGenerator{
|
|||
explosionDamage = 1250 * 4;
|
||||
|
||||
explodeEffect = Fx.reactorExplosion;
|
||||
explodeSound = Sounds.explosionbig;
|
||||
explodeSound = Sounds.reactorExplosion;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -104,6 +106,7 @@ public class NuclearReactor extends PowerGenerator{
|
|||
}
|
||||
}else{
|
||||
productionEfficiency = 0f;
|
||||
heat = Math.max(0f, heat - Time.delta / ambientCooldownTime);
|
||||
}
|
||||
|
||||
if(heat > 0){
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ public class Drill extends Block{
|
|||
liquidCapacity = 5f;
|
||||
hasItems = true;
|
||||
ambientSound = Sounds.drill;
|
||||
ambientSoundVolume = 0.018f;
|
||||
ambientSoundVolume = 0.019f;
|
||||
//drills work in space I guess
|
||||
envEnabled |= Env.space;
|
||||
flags = EnumSet.of(BlockFlag.drill);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue