LoopPortal.cs 908 B

123456789101112131415161718192021222324252627282930
  1. using UnityEngine;
  2. using GadgetCore.API;
  3. using GadgetCore.API.ConfigMenu;
  4. namespace LoopPortal
  5. {
  6. [Gadget("LoopPortal")]
  7. public class LoopPortal : Gadget<LoopPortal>
  8. {
  9. public const string MOD_VERSION = "1.1"; // Set this to the version of your mod.
  10. public const string CONFIG_VERSION = "1.0"; // Increment this whenever you change your mod's config file.
  11. public override IGadgetConfigMenu GetConfigMenu() { return null; }
  12. public override string GetModDescription()
  13. {
  14. return "Adds a 4th portal to the end of every level that is guaranteed to loop to the current planet.";
  15. }
  16. protected override void Initialize()
  17. {
  18. Logger.Log("Loop Portal v" + Info.Mod.Version);
  19. Core.logger = Logger;
  20. TileInfo tile = new TileInfo(TileType.INTERACTIVE, null as Texture2D, new GameObject("port4")).Register("port4");
  21. Core.npcId = tile.GetID();
  22. }
  23. }
  24. }