using System.Collections.Generic; using System.Linq; using Assets.Scripts; namespace Oxide.Plugins { [Info ("Insta Smelt", "Mr. Blue", "2.0.3")] [Description ("Smelts stacks of items at once")] class InstaSmelt : HurtworldPlugin { protected void OnServerInitialized () { EntityFluidEffectKey k = RuntimeHurtDB.Instance.GetAll ().FirstOrDefault (e => e.NameKey == "EntityStats/Effects/Storage Temperature"); if (k == null) { Puts ("Couln't find the EntityFluidEffectKey for Internal Temperature, cancelling..."); return; } foreach (var l in RuntimeHurtDB.Instance.GetAll ()) { var trans = l.Components.FirstOrDefault (e => e is ItemComponentTransitionConfig); if (trans != null) { var trans2 = (ItemComponentTransitionConfig) trans; foreach (var t in trans2.Transitions) { if (t.SourceEffectType == k && t.MinValue >= 400) { t.RequiredDuration = 0; t.TransitionStack = true; } } } } } } }