terraria-mods/LifeSourcesLight/LightOverrideHeartCrystal.cs
Chev 5d838fb613 LifeSourcesLight v1.1.0
- Formatted code a bit
- Updated description to include changelog section
- Added basic config to allow users to turn off the lights for each of the two tile types individually
2022-08-26 18:25:47 -07:00

21 lines
698 B
C#

using Terraria.ID;
using Terraria.ModLoader;
namespace LifeSourcesLight
{
public class LightOverrideHeartCrystal : GlobalTile
{
// Modify overall light brightness
private static readonly float LifeCrystalBrightCoefficient = 0.7f;
public override void ModifyLight(int i, int j, int type, ref float r, ref float g, ref float b)
{
if (type == TileID.Heart && LifeSourcesLight.EnableHeartCrystalLight)
{
r = (255f / 255f) * LifeCrystalBrightCoefficient;
g = (38f / 255f) * LifeCrystalBrightCoefficient;
b = (106f / 255f) * LifeCrystalBrightCoefficient;
}
}
}
}