Files
CalamityModPublic/Dusts/AbsorberDust.cs
T
Xyk 4fa5b6c9d4 Lighting and particle adjustments
Added a nolight function for the GenericBloom particle

Adjusted Absorber dust light and sprite

Adjusted Arc Nova Diffuser's charge light so its green and scales with how charged it is

Adjusted Arc Nova Diffuser's charge shot to stop trying to spawn particles offscreen
2023-10-01 20:46:09 -07:00

37 lines
980 B
C#

using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Dusts
{
public class AbsorberDust : ModDust
{
public override void OnSpawn(Dust dust)
{
dust.velocity.Y = Main.rand.Next(-10, 6) * 0.1f;
dust.velocity.X *= 0.3f;
dust.scale *= 0.7f;
}
public override bool MidUpdate(Dust dust)
{
if (!dust.noGravity)
{
dust.velocity.Y += 0.05f;
}
if (!dust.noLight)
{
float strength = dust.scale * 1.8f;
Vector3 DustLight = new Vector3(0.149f, 0.245f, 0.195f);
Lighting.AddLight(dust.position, DustLight * strength);
}
return true;
}
public override Color? GetAlpha(Dust dust, Color lightColor)
{
return new Color(lightColor.R, lightColor.G, lightColor.B, 25);
}
}
}