How PlayerLightConfig works
_isLight = data.ContainsKey("Light"); // same as isLight
if (isLight)
{
lightConfig = new PlayerSpotLightConfig(data); // Data is the whole Asset Data file(.dat/.asset)
}
public PlayerSpotLightConfig(DatDictionary data)
{
isEnabled = data.ParseBool("SpotLight_Enabled", defaultValue: true);
range = data.ParseFloat("SpotLight_Range", 64f);
angle = data.ParseFloat("SpotLight_Angle", 90f);
intensity = data.ParseFloat("SpotLight_Intensity", 1.3f);
color = data.LegacyParseColor("SpotLight_Color", new Color32(245, 223, 147, byte.MaxValue));
}
if theres the Light flag in the data file it will search for SpotLight_Enabled, SpotLight_Range, SpotLight_Angle, SpotLight_Intensity, SpotLight_Color Default color: ██
Sources
SDG.Unturned/PlayerSpotLightConfig.cs
SDG.Unturned/ItemMeleeAsset.cs