Advertisement
Guest User

InstaSmeltV2.cs

a guest
Feb 19th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Reflection;
  5. using System.Text;
  6.  
  7. using Newtonsoft.Json;
  8. using Newtonsoft.Json.Converters;
  9. using UnityEngine;
  10. using Oxide.Core;
  11. using System.Linq;
  12.  
  13. namespace Oxide.Plugins
  14. {
  15. // Enjoy my dudes ;)
  16. [Info("InstaSmeltV2", "Jojolepro", "2.0.0")]
  17. class InstaSmeltV2 : HurtworldPlugin
  18. {
  19. const string InternalTemperatureKeyName = "EntityStats/Effects/Body Temperature";
  20. void Loaded()
  21. {
  22. EntityFluidEffectKey k = RuntimeHurtDB.Instance.GetAll<EntityFluidEffectKey>().FirstOrDefault(e=>e.NameKey == InternalTemperatureKeyName);
  23. if (k == null)
  24. {
  25. Puts("Couln't find the EntityFluidEffectKey for Internal Temperature, cancelling...");
  26. return;
  27. }
  28. foreach (var l in RuntimeHurtDB.Instance.GetAll<ItemGeneratorStaticAsset>())
  29. {
  30. var trans = l.Components.FirstOrDefault(e => e is ItemComponentTransitionConfig);
  31. if (trans != null)
  32. {
  33. var trans2 = (ItemComponentTransitionConfig)trans;
  34. foreach (var t in trans2.Transitions)
  35. {
  36. if(t.SourceEffectType == k && t.MinValue >= 300)
  37. {
  38. t.RequiredDuration = 0;
  39. t.TransitionStack = true;
  40. }
  41. }
  42. }
  43. }
  44. }
  45. }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement