terraria-mods/LifeSourcesLight/LightOverrideLifeFruit.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
688 B
C#

using Terraria.ID;
using Terraria.ModLoader;
namespace LifeSourcesLight
{
public class LightOverrideLifeFruit : GlobalTile
{
// Modify overall light brightness
private static readonly float LifeFruitBrightCoefficient = 0.7f;
public override void ModifyLight(int i, int j, int type, ref float r, ref float g, ref float b)
{
if (type == TileID.LifeFruit && LifeSourcesLight.EnableLifeFruitLight)
{
r = (170f / 255f) * LifeFruitBrightCoefficient;
g = (221f / 255f) * LifeFruitBrightCoefficient;
b = (43f / 255f) * LifeFruitBrightCoefficient;
}
}
}
}