Cut 7b: 16 modular Brokkr weapon parts, mfg paint bands 10..14, ClientOrdnanceMirror, audio & tooltips

This commit is contained in:
Meta Vens 2026-12-05 17:54:11 +01:00
commit 6447155efb
27 changed files with 2420 additions and 74 deletions

View file

@ -746,6 +746,116 @@ public partial class ParticlePool : Node3D
}
break;
}
case WeaponVisualClass.GaussRail:
{
Color gaussCol = new(0.22f, 0.78f, 1.0f, 0.98f);
SpawnParticle(new ParticleSlot
{
Active = true,
Mode = ModeMuzzleStarburst,
Position = start,
Velocity = Vector3.Zero,
StartSize = 1.45f,
EndSize = 0.50f,
AspectY = 1f,
Rotation = NextFloat() * MathF.Tau,
Emissive = 3.8f,
ColorStart = new Color(0.75f, 0.96f, 1.0f, 1.0f),
ColorEnd = gaussCol with { A = 0f },
Lifetime = 0.095f
});
SpawnSparkBurst(start, (end - start).Normalized(), 4, gaussCol, 14f);
if (!hasCam || start.DistanceSquaredTo(camPos) <= 65f * 65f)
{
SpawnFlashLight(start, gaussCol with { A = 1f }, 4.2f, 14f, 0.11f, priority: 5);
}
break;
}
case WeaponVisualClass.PlasmaPpc:
{
Color plasmaCol = new(0.16f, 0.88f, 0.95f, 0.96f);
SpawnParticle(new ParticleSlot
{
Active = true,
Mode = ModeSteamFire,
Position = start,
Velocity = (end - start).Normalized() * 3.5f,
StartSize = 0.85f,
EndSize = 2.0f,
AspectY = 1f,
Rotation = NextFloat() * MathF.Tau,
Emissive = 3.2f,
ColorStart = plasmaCol,
ColorEnd = new Color(0.08f, 0.45f, 0.65f, 0f),
Lifetime = 0.24f
});
if (!hasCam || start.DistanceSquaredTo(camPos) <= 55f * 55f)
{
SpawnFlashLight(start, plasmaCol with { A = 1f }, 3.4f, 12f, 0.12f, priority: 4);
}
break;
}
case WeaponVisualClass.RocketSalvo:
{
SpawnParticle(new ParticleSlot
{
Active = true,
Mode = ModeMuzzleStarburst,
Position = start,
Velocity = Vector3.Zero,
StartSize = 1.15f,
EndSize = 0.55f,
AspectY = 1f,
Rotation = NextFloat() * MathF.Tau,
Emissive = 3.0f,
ColorStart = new Color(1.0f, 0.72f, 0.24f, 0.96f),
ColorEnd = new Color(0.95f, 0.35f, 0.08f, 0f),
Lifetime = 0.10f
});
SpawnParticle(new ParticleSlot
{
Active = true,
Mode = ModeDustSmoke,
Position = start,
Velocity = new Vector3(NextSigned() * 1.2f, 1.4f, NextSigned() * 1.2f),
Gravity = -0.15f,
Drag = 1.8f,
StartSize = 0.55f,
EndSize = 1.85f,
AspectY = 1f,
Rotation = NextFloat() * MathF.Tau,
AngularVel = NextSigned() * 1.3f,
Emissive = 0f,
ColorStart = new Color(0.62f, 0.58f, 0.52f, 0.55f),
ColorEnd = new Color(0.45f, 0.42f, 0.38f, 0f),
Lifetime = 0.42f
});
break;
}
case WeaponVisualClass.SwarmSmart:
{
Color swarmCol = new(0.56f, 0.96f, 0.28f, 0.96f);
SpawnParticle(new ParticleSlot
{
Active = true,
Mode = ModeMuzzleStarburst,
Position = start,
Velocity = Vector3.Zero,
StartSize = 0.78f,
EndSize = 0.36f,
AspectY = 1f,
Rotation = NextFloat() * MathF.Tau,
Emissive = 2.6f,
ColorStart = swarmCol,
ColorEnd = new Color(0.55f, 0.28f, 0.88f, 0f),
Lifetime = 0.085f
});
break;
}
}
}
@ -873,9 +983,187 @@ public partial class ParticlePool : Node3D
});
SpawnSparkBurst(pos, normal, 4, new Color(0.55f, 0.92f, 1.0f, 0.98f), 12f);
break;
case WeaponVisualClass.GaussRail:
EmitImpactDustPlume(pos, normal, groundTint, count: 3, size: 1.65f);
SpawnSparkBurst(pos, normal, 6, new Color(0.30f, 0.84f, 1.0f, 0.98f), 17f);
if (!hasCam || pos.DistanceSquaredTo(camPos) <= 65f * 65f)
{
SpawnFlashLight(pos + normal * 0.35f, new Color(0.28f, 0.82f, 1.0f), 4.0f, 13f, 0.12f, priority: 6);
}
break;
case WeaponVisualClass.PlasmaPpc:
SpawnParticle(new ParticleSlot
{
Active = true,
Mode = ModeSteamFire,
Position = pos + normal * 0.2f,
Velocity = normal * 1.6f,
StartSize = 0.90f,
EndSize = 2.6f,
AspectY = 1f,
Rotation = NextFloat() * MathF.Tau,
Emissive = 3.2f,
ColorStart = new Color(0.20f, 0.88f, 1.0f, 0.95f),
ColorEnd = new Color(0.12f, 0.38f, 0.52f, 0f),
Lifetime = 0.42f
});
SpawnSparkBurst(pos, normal, 5, new Color(0.32f, 0.94f, 1.0f, 0.98f), 12.5f);
break;
case WeaponVisualClass.RocketSalvo:
EmitImpactDustPlume(pos, normal, groundTint, count: 4, size: 1.75f);
SpawnParticle(new ParticleSlot
{
Active = true,
Mode = ModeSteamFire,
Position = pos + normal * 0.25f,
Velocity = normal * 2.2f,
Gravity = -0.25f,
Drag = 1.6f,
StartSize = 0.95f,
EndSize = 2.95f,
AspectY = 1f,
Rotation = NextFloat() * MathF.Tau,
Emissive = 2.8f,
ColorStart = new Color(1.0f, 0.62f, 0.18f, 0.96f),
ColorEnd = new Color(0.28f, 0.16f, 0.12f, 0f),
Lifetime = 0.38f
});
SpawnSparkBurst(pos, normal, 5, new Color(1.0f, 0.68f, 0.22f, 0.98f), 14.5f);
if (!hasCam || pos.DistanceSquaredTo(camPos) <= 75f * 75f)
{
SpawnFlashLight(pos + normal * 0.45f, new Color(1.0f, 0.56f, 0.16f), 4.5f, 14f, 0.14f, priority: 7);
}
break;
case WeaponVisualClass.SwarmSmart:
EmitImpactDustPlume(pos, normal, groundTint, count: 2, size: 1.25f);
SpawnSparkBurst(pos, normal, 4, new Color(0.56f, 0.96f, 0.32f, 0.98f), 12f);
break;
}
}
public void EmitOrdnanceTrail(Vector3 pos, Vector3 vel, Color accentCol, bool isRocket, Vector3 camPos, bool hasCam)
{
EnsureInitialized();
if (hasCam && pos.DistanceSquaredTo(camPos) > 220f * 220f)
{
return;
}
Vector3 backVel = vel.LengthSquared() > 1f ? -vel.Normalized() * 4.5f : Vector3.Up * 1.2f;
if (isRocket)
{
SpawnParticle(new ParticleSlot
{
Active = true,
Mode = ModeMuzzleStarburst,
Position = pos,
Velocity = backVel * 0.4f,
StartSize = 0.58f,
EndSize = 0.20f,
AspectY = 1f,
Rotation = NextFloat() * MathF.Tau,
Emissive = 2.8f,
ColorStart = new Color(1.0f, 0.72f, 0.24f, 0.92f),
ColorEnd = accentCol with { A = 0f },
Lifetime = 0.12f
});
SpawnParticle(new ParticleSlot
{
Active = true,
Mode = ModeDustSmoke,
Position = pos,
Velocity = backVel * 0.25f + new Vector3(NextSigned() * 0.6f, 0.7f, NextSigned() * 0.6f),
Gravity = -0.15f,
Drag = 1.8f,
StartSize = 0.32f,
EndSize = 1.25f,
AspectY = 1f,
Rotation = NextFloat() * MathF.Tau,
AngularVel = NextSigned() * 1.4f,
Emissive = 0f,
ColorStart = new Color(0.58f, 0.54f, 0.48f, 0.46f),
ColorEnd = new Color(0.40f, 0.38f, 0.36f, 0f),
Lifetime = 0.42f
});
}
else
{
SpawnParticle(new ParticleSlot
{
Active = true,
Mode = ModeSparkStreak,
Position = pos,
Velocity = backVel * 0.25f,
StartSize = 0.24f,
EndSize = 0.08f,
AspectY = 1.4f,
Rotation = NextFloat() * MathF.Tau,
Emissive = 2.4f,
ColorStart = accentCol with { A = 0.90f },
ColorEnd = accentCol with { A = 0f },
Lifetime = 0.16f
});
}
}
public void EmitOrdnanceBurst(Vector3 pos, Color accentCol, int sparkCount, float radiusScale, Vector3 camPos, bool hasCam)
{
EnsureInitialized();
if (hasCam && pos.DistanceSquaredTo(camPos) > 220f * 220f)
{
return;
}
SpawnParticle(new ParticleSlot
{
Active = true,
Mode = ModeSteamFire,
Position = pos,
Velocity = Vector3.Up * 1.5f,
StartSize = 0.65f * radiusScale,
EndSize = 2.2f * radiusScale,
AspectY = 1f,
Rotation = NextFloat() * MathF.Tau,
Emissive = 2.8f,
ColorStart = accentCol with { A = 0.94f },
ColorEnd = new Color(0.24f, 0.16f, 0.14f, 0f),
Lifetime = 0.34f
});
SpawnSparkBurst(pos, Vector3.Up, Math.Clamp(sparkCount, 1, 8), accentCol with { A = 0.98f }, 12f * radiusScale);
}
public void EmitThermalPoolEmber(Vector3 pos, float radius, Color accentCol, Vector3 camPos, bool hasCam)
{
EnsureInitialized();
if (hasCam && pos.DistanceSquaredTo(camPos) > 150f * 150f)
{
return;
}
float ang = NextFloat() * MathF.Tau;
float r = MathF.Sqrt(NextFloat()) * MathF.Max(0.5f, radius * 0.85f);
Vector3 p = pos + new Vector3(MathF.Cos(ang) * r, 0.18f, MathF.Sin(ang) * r);
SpawnParticle(new ParticleSlot
{
Active = true,
Mode = ModeSteamFire,
Position = p,
Velocity = new Vector3(NextSigned() * 0.5f, 1.8f + NextFloat() * 1.4f, NextSigned() * 0.5f),
Gravity = -0.3f,
Drag = 1.2f,
StartSize = 0.36f,
EndSize = 0.92f,
AspectY = 1.25f,
Rotation = NextFloat() * MathF.Tau,
Emissive = 2.9f,
ColorStart = accentCol with { A = 0.88f },
ColorEnd = accentCol with { A = 0f },
Lifetime = 0.45f
});
}
private void EmitChassisExplosion(
Vector3 pos,
float massKg,