public ModpackWorker(DMPGame dmpGame, Settings dmpSettings, ModWorker modWorker, NetworkWorker networkWorker, ChatWorker chatWorker, AdminSystem adminSystem) { gameDataPath = Path.Combine(KSPUtil.ApplicationRootPath, "GameData"); cacheDataPath = Path.Combine(KSPUtil.ApplicationRootPath, "DarkMultiPlayer-ModCache"); Directory.CreateDirectory(cacheDataPath); ckanDataPath = Path.Combine(KSPUtil.ApplicationRootPath, "DarkMultiPlayer.ckan"); gameDataServerCachePath = Path.Combine(KSPUtil.ApplicationRootPath, "DarkMultiPlayer-Server-GameData.txt"); gameDataClientCachePath = Path.Combine(KSPUtil.ApplicationRootPath, "DarkMultiPlayer-Client-GameData.txt"); this.dmpGame = dmpGame; this.dmpSettings = dmpSettings; this.modWorker = modWorker; this.networkWorker = networkWorker; this.chatWorker = chatWorker; this.adminSystem = adminSystem; updateAction = new NamedAction(Update); dmpGame.updateEvent.Add(updateAction); GameEvents.onGameSceneLoadRequested.Add(OnGameSceneLoadRequested); try { numHashingThreads = Environment.ProcessorCount; } catch { Console.WriteLine("Environment.ProcessorCount does not work"); } }
public Groups(DMPGame dmpGame, NetworkWorker networkWorker, Settings dmpSettings) { this.dmpGame = dmpGame; this.networkWorker = networkWorker; this.dmpSettings = dmpSettings; updateAction = new NamedAction(ProcessMessages); dmpGame.updateEvent.Add(updateAction); }
public DynamicTickWorker(DMPGame dmpGame, NetworkWorker networkWorker) { this.dmpGame = dmpGame; this.networkWorker = networkWorker; maxSecondryVesselsPerTick = MASTER_MAX_SECONDARY_VESSELS; updateAction = new NamedAction(Update); dmpGame.updateEvent.Add(updateAction); }
public GroupsWindow(DMPGame dmpGame, Settings dmpSettings, Groups groups) { this.dmpGame = dmpGame; this.dmpSettings = dmpSettings; this.groups = groups; drawAction = new NamedAction(Draw); dmpGame.drawEvent.Add(drawAction); }
public ScenarioWorker(DMPGame dmpGame, VesselWorker vesselWorker, ConfigNodeSerializer configNodeSerializer, NetworkWorker networkWorker) { this.dmpGame = dmpGame; this.vesselWorker = vesselWorker; this.configNodeSerializer = configNodeSerializer; this.networkWorker = networkWorker; updateAction = new NamedAction(Update); dmpGame.updateEvent.Add(updateAction); }
public PlayerColorWorker(DMPGame dmpGame, Settings dmpSettings, LockSystem lockSystem, NetworkWorker networkWorker) { this.dmpGame = dmpGame; this.dmpSettings = dmpSettings; this.lockSystem = lockSystem; this.networkWorker = networkWorker; updateEvent = new NamedAction(Update); dmpGame.updateEvent.Add(updateEvent); }
public FlagSyncer(DMPGame dmpGame, Settings dmpSettings, NetworkWorker networkWorker) { this.dmpGame = dmpGame; this.dmpSettings = dmpSettings; this.networkWorker = networkWorker; flagPath = Path.Combine(Path.Combine(Client.dmpClient.gameDataDir, "DarkMultiPlayer"), "Flags"); updateAction = new NamedAction(Update); dmpGame.updateEvent.Add(updateAction); }
public WarpWorker(DMPGame dmpGame, Settings dmpSettings, TimeSyncer timeSyncer, NetworkWorker networkWorker, PlayerStatusWorker playerStatusWorker) { this.dmpGame = dmpGame; this.dmpSettings = dmpSettings; this.timeSyncer = timeSyncer; this.networkWorker = networkWorker; this.playerStatusWorker = playerStatusWorker; updateAction = new NamedAction(Update); dmpGame.updateEvent.Add(updateAction); }
public PermissionsWindow(DMPGame dmpGame, Settings dmpSettings, Groups groups, Permissions permissions, LockSystem lockSystem) { this.dmpGame = dmpGame; this.dmpSettings = dmpSettings; this.groups = groups; this.permissions = permissions; this.lockSystem = lockSystem; drawAction = new NamedAction(Draw); dmpGame.drawEvent.Add(drawAction); }
public TimeSyncer(DMPGame dmpGame, NetworkWorker networkWorker, VesselWorker vesselWorker) { this.dmpGame = dmpGame; this.networkWorker = networkWorker; this.vesselWorker = vesselWorker; fixedUpdateAction = new NamedAction(FixedUpdate); dmpGame.fixedUpdateEvent.Add(fixedUpdateAction); currentSubspace = -1; requestedRate = 1f; }
public AsteroidWorker(DMPGame dmpGame, LockSystem lockSystem, NetworkWorker networkWorker, VesselWorker vesselWorker) { this.dmpGame = dmpGame; this.lockSystem = lockSystem; this.networkWorker = networkWorker; this.vesselWorker = vesselWorker; updateAction = new NamedAction(Update); this.dmpGame.updateEvent.Add(updateAction); GameEvents.onVesselCreate.Add(OnVesselCreate); }
public VesselRecorder(DMPGame dmpGame, WarpWorker warpWorker, VesselWorker vesselWorker, NetworkWorker networkWorker, Settings dmpSettings) { this.warpWorker = warpWorker; this.vesselWorker = vesselWorker; this.networkWorker = networkWorker; this.dmpSettings = dmpSettings; this.dmpGame = dmpGame; updateAction = new NamedAction(Update); dmpGame.updateEvent.Add(updateAction); }
public ScreenshotWorker(DMPGame dmpGame, Settings dmpSettings, ChatWorker chatWorker, NetworkWorker networkWorker, PlayerStatusWorker playerStatusWorker) { this.dmpGame = dmpGame; this.dmpSettings = dmpSettings; this.chatWorker = chatWorker; this.networkWorker = networkWorker; this.playerStatusWorker = playerStatusWorker; updateAction = new NamedAction(Update); drawAction = new NamedAction(Draw); dmpGame.updateEvent.Add(updateAction); dmpGame.drawEvent.Add(drawAction); }
public PlayerStatusWorker(DMPGame dmpGame, Settings dmpSettings, VesselWorker vesselWorker, LockSystem lockSystem, NetworkWorker networkWorker, Permissions permissions) { this.dmpGame = dmpGame; this.vesselWorker = vesselWorker; this.lockSystem = lockSystem; this.networkWorker = networkWorker; this.permissions = permissions; myPlayerStatus = new PlayerStatus(); myPlayerStatus.playerName = dmpSettings.playerName; myPlayerStatus.statusText = "Syncing"; updateAction = new NamedAction(Update); dmpGame.updateEvent.Add(updateAction); }
public CraftLibraryWorker(DMPGame dmpGame, Settings dmpSettings, NetworkWorker networkWorker) { this.dmpGame = dmpGame; this.dmpSettings = dmpSettings; this.networkWorker = networkWorker; savePath = Path.Combine(Path.Combine(Client.dmpClient.kspRootPath, "saves"), "DarkMultiPlayer"); vabPath = Path.Combine(Path.Combine(savePath, "Ships"), "VAB"); sphPath = Path.Combine(Path.Combine(savePath, "Ships"), "SPH"); subassemblyPath = Path.Combine(savePath, "Subassemblies"); BuildUploadList(); updateAction = new NamedAction(Update); drawAction = new NamedAction(Draw); dmpGame.updateEvent.Add(updateAction); dmpGame.drawEvent.Add(drawAction); }
public DebugWindow(DMPGame dmpGame, Settings dmpSettings, TimeSyncer timeSyncer, NetworkWorker networkWorker, VesselWorker vesselWorker, DynamicTickWorker dynamicTickWorker, WarpWorker warpWorker, VesselRecorder vesselRecorder, PosistionStatistics posistionStatistics, OptionsWindow optionsWindow, Profiler profiler) { this.dmpGame = dmpGame; this.dmpSettings = dmpSettings; this.timeSyncer = timeSyncer; this.networkWorker = networkWorker; this.vesselWorker = vesselWorker; this.dynamicTickWorker = dynamicTickWorker; this.warpWorker = warpWorker; this.vesselRecorder = vesselRecorder; this.posistionStatistics = posistionStatistics; this.optionsWindow = optionsWindow; this.profiler = profiler; updateAction = new NamedAction(Update); drawAction = new NamedAction(Draw); dmpGame.updateEvent.Add(updateAction); dmpGame.drawEvent.Add(drawAction); }
public PlayerStatusWindow(DMPGame dmpGame, Settings dmpSettings, WarpWorker warpWorker, ChatWorker chatWorker, CraftLibraryWorker craftLibraryWorker, ScreenshotWorker screenshotWorker, TimeSyncer timeSyncer, PlayerStatusWorker playerStatusWorker, OptionsWindow optionsWindow, PlayerColorWorker playerColorWorker, GroupsWindow groupsWindow, PermissionsWindow permissionsWindow) { this.dmpGame = dmpGame; this.dmpSettings = dmpSettings; this.warpWorker = warpWorker; this.chatWorker = chatWorker; this.craftLibraryWorker = craftLibraryWorker; this.screenshotWorker = screenshotWorker; this.timeSyncer = timeSyncer; this.playerStatusWorker = playerStatusWorker; this.optionsWindow = optionsWindow; this.playerColorWorker = playerColorWorker; this.groupsWindow = groupsWindow; this.permissionsWindow = permissionsWindow; updateAction = new NamedAction(Update); drawAction = new NamedAction(Draw); this.dmpGame.updateEvent.Add(updateAction); this.dmpGame.drawEvent.Add(drawAction); }
public ChatWorker(DMPGame dmpGame, Settings dmpSettings, NetworkWorker networkWorker, AdminSystem adminSystem, PlayerStatusWorker playerStatusWorker) { this.dmpGame = dmpGame; this.dmpSettings = dmpSettings; this.networkWorker = networkWorker; this.adminSystem = adminSystem; this.playerStatusWorker = playerStatusWorker; RegisterChatCommand("help", DisplayHelp, "Displays this help"); RegisterChatCommand("join", JoinChannel, "Joins a new chat channel"); RegisterChatCommand("query", StartQuery, "Starts a query"); RegisterChatCommand("leave", LeaveChannel, "Leaves the current channel"); RegisterChatCommand("part", LeaveChannel, "Leaves the current channel"); RegisterChatCommand("ping", ServerPing, "Pings the server"); RegisterChatCommand("motd", ServerMOTD, "Gets the current Message of the Day"); RegisterChatCommand("resize", ResizeChat, "Resized the chat window"); RegisterChatCommand("version", DisplayVersion, "Displays the current version of DMP"); updateAction = new NamedAction(Update); drawAction = new NamedAction(Draw); dmpGame.updateEvent.Add(updateAction); dmpGame.drawEvent.Add(drawAction); }
public VesselRangeBumper(DMPGame dmpGame) { this.dmpGame = dmpGame; this.updateEvent = new NamedAction(Update); dmpGame.updateEvent.Add(updateEvent); }