Example #1
0
 public static void Init(CommandHandler holder)
 {
     holder.AddCommand("/about", CAbout);
     holder.AddCommand("/bring", CBring);
     holder.AddCommand("/global", CGlobal);
     holder.AddCommand("/getrank", CGetrank);
     holder.AddCommand("/players", CPlayers);
     holder.AddCommand("/ranks", CRanks);
     holder.AddCommand("/rules", CRules);
     holder.AddCommand("/commands", CCommands);
     holder.AddCommand("/cmdhelp", CCmdHelp);
     holder.AddCommand("/maps", CMaps);
     holder.AddCommand("/map", CMap);
     holder.AddCommand("/tp", Ctp);
     holder.AddCommand("/info", CInfo);
     holder.AddCommand("/model", CModel);
 }
Example #2
0
 public static void Init(CommandHandler holder)
 {
     holder.AddCommand("/bind", CBind);
     holder.AddCommand("/box", CBox);
     holder.AddCommand("/cancel", CCancel);
     holder.AddCommand("/material", CMaterial);
     holder.AddCommand("/materials", CMaterials);
     holder.AddCommand("/place", CPlace);
     holder.AddCommand("/redo", CRedo);
     holder.AddCommand("/undo", CUndo);
 }
Example #3
0
        /// <summary>
        /// Loads server settings, loads the database, and prepares the system for use.
        /// </summary>
        public static void Setup()
        {
            Setting = new PbSettingsLoader();
            TextFormats = new Text();

            SysSettings = new Settings("System.txt", ReadSystemSettings);
            Setting.RegisterFile(SysSettings);
            SysSettings.LoadFile();

            Rulesfile = new Settings("Rules.txt", ReadRules, "Settings/", false);
            Setting.RegisterFile(Rulesfile);
            Rulesfile.LoadFile();

            if (RotateLogs)
                Logger.RotateLogs();

            Permholder = new PermissionContainer();
            Rankholder = new RankContainer();
            Blockholder = new BlockContainer();
            BmContainer = new BuildMode();

            DefaultRank = Rankholder.GetRank(DefaultRank.Name);

            DB = new Database();
            Logger.Log("Database", "Database loaded.", LogType.Info);

            Nh = new NetworkHandler();
            Logger.Log("", "Core Initialized.", LogType.Info);

            Maps = new Dictionary<string, HypercubeMap>(StringComparer.InvariantCultureIgnoreCase);
            HypercubeMap.LoadMaps();

            HypercubeMap m;
            Maps.TryGetValue(MapMain, out m);

            if (m == null) {
                var mainMap = new HypercubeMap("Maps/" + MapMain + ".cw", MapMain, 128, 128, 128);
                Maps.Add(MapMain, mainMap);
                Logger.Log("Core", "Main world not found, a new one has been created.", LogType.Warning);
            }

            Commandholder = new CommandHandler();
            Fillholder = new FillContainer();

            Luahandler = new HCLua();
            Luahandler.RegisterFunctions();
            Luahandler.LoadScripts();

            Setting.SaveAll();

            FillStacks();
            ActionQueue = new ConcurrentQueue<MapAction>();
        }
Example #4
0
 public static void Init(CommandHandler holder)
 {
     holder.AddCommand("/addrank", CAddrank);
     holder.AddCommand("/ban", CBan);
     holder.AddCommand("/delrank", CDelrank);
     holder.AddCommand("/lookup", CHistory);
     holder.AddCommand("/kick", CKick);
     holder.AddCommand("/mute", CMute);
     holder.AddCommand("/pinfo", CPinfo);
     holder.AddCommand("/pushrank", CPushrank);
     holder.AddCommand("/setrank", CSetrank);
     holder.AddCommand("/stop", CStop);
     holder.AddCommand("/unban", CUnban);
     holder.AddCommand("/unmute", CUnmute);
     holder.AddCommand("/unstop", CUnstop);
     holder.AddCommand("/clickdistance", CClickDistance);
 }
Example #5
0
        public static void Init(CommandHandler holder)
        {
            holder.AddCommand("/building", CBuilding);
            holder.AddCommand("/createtp", CCreateTp);
            holder.AddCommand("/mapadd", CMapadd);
            holder.AddCommand("/mapfill", CMapfill);
            holder.AddCommand("/mapfills", CMapfills);
            holder.AddCommand("/mapinfo", CMapinfo);
            holder.AddCommand("/mapload", CMapload);
            holder.AddCommand("/mapresend", CMapresend);
            holder.AddCommand("/mapresize", CMapresize);
            holder.AddCommand("/history", CMaphistory);
            holder.AddCommand("/mapsave", CMapsave);
            holder.AddCommand("/setspawn", CSetSpawn);
            holder.AddCommand("/spawn", CSpawn);
            holder.AddCommand("/physics", CPhysics);

            holder.AddCommand("/texture", CTexture);
            holder.AddCommand("/setedge", CSetEdge);
            holder.AddCommand("/setweather", CSetWeather);
            holder.AddCommand("/setcolors", CSetColors);
        }