Example #1
0
        public override void Load()
        {
            Name        = "TerraGuard";
            Version     = "0.3";
            Author      = "bogeymanEST";
            Description = "Protection system for Terraria";
            TDSMBuild   = 24;

            registerHook(Hooks.PLAYER_COMMAND);
            registerHook(Hooks.PLAYER_TILECHANGE);
            registerHook(Hooks.PLAYER_CHEST);
            Console.WriteLine("Loading TerraGuard version " + Version);
            tePlug = HookIntoTerraEdit();
            LoadRegions();
        }
Example #2
0
        /*
         * private readonly Color cGeneral = new Color(255, 240, 20);
         * private readonly Color cError = new Color(255, 0, 0);
         */
        public TerraEdit.TerraEdit HookIntoTerraEdit()
        {
            bool found = false;

            TerraEdit.TerraEdit ret = null;
            Console.WriteLine("Hooking into TerraEdit...");
            var plug = Program.server.PluginManager.getPlugin("TerraEdit");

            if (plug != null)
            {
                Console.WriteLine("Hooked into TerraEdit!");
                ret = (TerraEdit.TerraEdit)plug;
            }
            else
            {
                Console.WriteLine("Could not find TerraEdit!");
            }
            return(ret);
        }
        public override void Load()
        {
            Name = "TerraGuard";
            Version = "0.3";
            Author = "bogeymanEST";
            Description = "Protection system for Terraria";
            TDSMBuild = 24;

            registerHook(Hooks.PLAYER_COMMAND);
            registerHook(Hooks.PLAYER_TILECHANGE);
            registerHook(Hooks.PLAYER_CHEST);
            Console.WriteLine("Loading TerraGuard version " + Version);
            tePlug = HookIntoTerraEdit();
            LoadRegions();
        }