| 12345678910111213141516171819202122232425262728293031 |
- using UnityEngine;
- using GadgetCore.API;
- using GadgetCore.API.ConfigMenu;
- namespace LoopPortal
- {
- [Gadget("LoopPortal")]
- public class LoopPortal : Gadget<LoopPortal>
- {
- public const string MOD_VERSION = "1.3"; // Set this to the version of your mod.
- public const string CONFIG_VERSION = "1.0"; // Increment this whenever you change your mod's config file.
- public override IGadgetConfigMenu GetConfigMenu() { return null; }
- public override string GetModDescription()
- {
- return "Adds a 4th portal to the end of every level that is guaranteed to loop to the current planet.";
- }
- protected override void Initialize()
- {
- Logger.Log("Loop Portal v" + Info.Mod.Version);
- Core.logger = Logger;
- ItemInfo itemInfo = new ItemInfo(ItemType.GENERIC, "port4", "", null as Texture2D).Register("port4");
- TileInfo tile = new TileInfo(TileType.INTERACTIVE, null as Texture2D, new GameObject("port4"), itemInfo).Register("port4");
- Core.npcId = tile.GetID();
- }
- }
- }
|