mirror of
https://github.com/chev2/terraria-mods.git
synced 2025-12-02 06:05:37 +00:00
- 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
21 lines
688 B
C#
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;
|
|
}
|
|
}
|
|
}
|
|
}
|