Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Reflection;
- using System.Text;
- using Newtonsoft.Json;
- using Newtonsoft.Json.Converters;
- using UnityEngine;
- using Oxide.Core;
- using System.Linq;
- namespace Oxide.Plugins
- {
- // Enjoy my dudes ;)
- [Info("InstaSmeltV2", "Jojolepro", "2.0.0")]
- class InstaSmeltV2 : HurtworldPlugin
- {
- const string InternalTemperatureKeyName = "EntityStats/Effects/Body Temperature";
- void Loaded()
- {
- EntityFluidEffectKey k = RuntimeHurtDB.Instance.GetAll<EntityFluidEffectKey>().FirstOrDefault(e=>e.NameKey == InternalTemperatureKeyName);
- if (k == null)
- {
- Puts("Couln't find the EntityFluidEffectKey for Internal Temperature, cancelling...");
- return;
- }
- foreach (var l in RuntimeHurtDB.Instance.GetAll<ItemGeneratorStaticAsset>())
- {
- 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 >= 300)
- {
- t.RequiredDuration = 0;
- t.TransitionStack = true;
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement