Files
CalamityModPublic/Waters/SulphuricDepthsWater.cs
T
enamoured_ d856d300d3 ocd water consistencies
also makes sulphuric waterfalls sprite use the same palette as the normal water
sorry if this is an annoying change but it bothered me!
still gonna wait for the water animation fix but until then, this is all i have
2024-09-04 21:32:57 -04:00

61 lines
2.2 KiB
C#

using CalamityMod.Particles;
using System;
using CalamityMod.Systems;
using CalamityMod.Tiles.Abyss;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
using Terraria.Graphics;
using CalamityMod.Dusts.WaterSplash;
using CalamityMod.Gores.WaterDroplet;
namespace CalamityMod.Waters
{
public class SulphuricDepthsWaterflow : ModWaterfallStyle { }
public class SulphuricDepthsWater : CalamityModWaterStyle
{
public static int Type { get; private set; }
public static CalamityModWaterStyle Instance { get; private set; }
public static ModWaterfallStyle WaterfallStyle { get; private set; }
public static int SplashDust { get; private set; }
public static int DropletGore { get; private set; }
public override void SetStaticDefaults()
{
Type = Slot;
Instance = this;
WaterfallStyle = ModContent.Find<ModWaterfallStyle>("CalamityMod/SulphuricDepthsWaterflow");
SplashDust = ModContent.DustType<SulphuricDepthsSplash>();
DropletGore = ModContent.GoreType<SulphuricDepthsWaterDroplet>();
}
public override void Unload()
{
Type = -1;
Instance = null;
WaterfallStyle = null;
SplashDust = 0;
DropletGore = 0;
}
public override int ChooseWaterfallStyle() => WaterfallStyle.Slot;
public override int GetSplashDust() => SplashDust;
public override int GetDropletGore() => DropletGore;
public override Color BiomeHairColor() => new Color(35, 117, 89);
public override void DrawColor(int x, int y, ref VertexColors liquidColor, bool isSlope) => ILEditing.ILChanges.SelectSulphuricWaterColor(x, y, ref liquidColor, isSlope);
public override void ModifyLight(ref readonly Tile tile, int i, int j, ref float r, ref float g, ref float b)
{
Vector3 outputColor = new Vector3(r, g, b);
if (tile.TileType != RustyChestTile.Type)
{
outputColor = Vector3.Lerp(outputColor, Color.MediumSeaGreen.ToVector3(), 0.18f);
}
r = outputColor.X;
g = outputColor.Y;
b = outputColor.Z;
}
}
}