using System.Collections.Generic; using Newtonsoft.Json; using UnityEngine; namespace Oxide.Plugins { [Info("FreeCandles", "mals", "0.1.2")] [Description("Allows Candles to not burn down so quickly")] class FreeCandles : RustPlugin { void OnEntitySpawned(Candle candle) { candle.SetFlag(BaseEntity.Flags.On, false); candle.lifeTimeSeconds = 999999999999f; candle.burnRate = 0.0f; candle.SetFlag(BaseEntity.Flags.On, true); candle.SendNetworkUpdateImmediate(); } void OnServerInitialized() { Candle[] candles = UnityEngine.Object.FindObjectsOfType() as Candle[]; foreach (Candle candle in candles) { candle.SetFlag(BaseEntity.Flags.On, false); candle.lifeTimeSeconds = 999999999999f; candle.burnRate = 0.0f; candle.SetFlag(BaseEntity.Flags.On, true); candle.SendNetworkUpdateImmediate(); } } } }