namespace Oxide.Plugins { [Info("ComfortableTemperature", "Styles", "1.0.1")] public class ComfortableTemperature : CovalencePlugin { private const string PermComfortableTempUse = "comfortabletemperature.use"; private const float ColdThreshold = 10f; private const float HotThreshold = 30f; private const float ComfortableTemperature = 20f; private void Init() { permission.RegisterPermission(PermComfortableTempUse, this); } private object OnRunPlayerMetabolism(PlayerMetabolism metabolism, BasePlayer player, float delta) { if (!permission.UserHasPermission(player.UserIDString, PermComfortableTempUse)) return null; if (metabolism.temperature.value < ColdThreshold || metabolism.temperature.value > HotThreshold) { metabolism.temperature.value = ComfortableTemperature; } return null; } } }