public void Setup(GameState state) { SecurityArea = new RestrictedAccessZone(state.ConfigData); SecurityArea.PromotePlayer += SecurityArea_PromotePlayer; SecurityArea.Set(state); StagingArea = new StagingZone(state.ConfigData); StagingArea.PromotePlayer += this.StagingArea_PromotePlayer; StagingArea.Set(state); }
// World Contents public Server(ServerConfig cfg) { NetworkMessage.IsOnServer = true; if (cfg.LogFile == string.Empty) { cfg.LogFile = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "default_log.txt"); } Logger.SetLogFilePath(cfg.LogFile); Logger.LogLevel = cfg.LogLevel; Logger.Log0("Server startup"); ConfigData = cfg; State.Init(ConfigData); State.Players.ServerHost = this; SetTeamSelector(null); SetupAPI(); SetupConfig(); SetupBZDB(); SetupWorld(); UpdatePublicListServer(); SecurityArea = new RestrictedAccessZone(ConfigData); SecurityArea.PromotePlayer += SecurityArea_PromotePlayer; SecurityArea.Set(State); StagingArea = new StagingZone(ConfigData); StagingArea.PromotePlayer += this.StagingArea_PromotePlayer; StagingArea.Set(State); GameZone = new GamePlayZone(this); GameZone.UpdatePublicListServer += new EventHandler((s, e) => UpdatePublicListServer()); GameZone.Set(State); RegisterProcessorEvents(); }