mirror of
https://github.com/chev2/terraria-mods.git
synced 2025-10-30 08:11:37 +00:00
22 lines
664 B
C#
22 lines
664 B
C#
using Terraria;
|
|
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)
|
|
{
|
|
r = (170f / 255f) * LifeFruitBrightCoefficient;
|
|
g = (221f / 255f) * LifeFruitBrightCoefficient;
|
|
b = (43f / 255f) * LifeFruitBrightCoefficient;
|
|
}
|
|
}
|
|
}
|
|
}
|