diff --git a/Subsurface/Source/Events/ArtifactEvent.cs b/Subsurface/Source/Events/ArtifactEvent.cs index 966d95126..12363481a 100644 --- a/Subsurface/Source/Events/ArtifactEvent.cs +++ b/Subsurface/Source/Events/ArtifactEvent.cs @@ -10,6 +10,11 @@ namespace Barotrauma private Item item; private int state; + + public override string ToString() + { + return "ScriptedEvent (" + (itemPrefab==null ? "null" : itemPrefab.Name) + ")"; + } public ArtifactEvent(XElement element) : base(element) diff --git a/Subsurface/Source/Events/MonsterEvent.cs b/Subsurface/Source/Events/MonsterEvent.cs index 72efb309f..aa9122064 100644 --- a/Subsurface/Source/Events/MonsterEvent.cs +++ b/Subsurface/Source/Events/MonsterEvent.cs @@ -14,6 +14,11 @@ namespace Barotrauma private bool spawnDeep; + public override string ToString() + { + return "ScriptedEvent (" + characterFile + ")"; + } + public MonsterEvent(XElement element) : base (element) { @@ -33,7 +38,7 @@ namespace Barotrauma private void SpawnMonsters() { WayPoint randomWayPoint = WayPoint.GetRandom(SpawnType.Enemy); - + int amount = Rand.Range(minAmount, maxAmount, false); monsters = new Character[amount]; diff --git a/Subsurface/Source/Events/ScriptedEvent.cs b/Subsurface/Source/Events/ScriptedEvent.cs index f7485e102..703dd4f70 100644 --- a/Subsurface/Source/Events/ScriptedEvent.cs +++ b/Subsurface/Source/Events/ScriptedEvent.cs @@ -64,6 +64,11 @@ namespace Barotrauma get { return difficulty; } } + public override string ToString() + { + return "ScriptedEvent ("+name+")"; + } + public ScriptedEvent(XElement element) { name = ToolBox.GetAttributeString(element, "name", ""); diff --git a/Subsurface/Source/Events/TaskManager.cs b/Subsurface/Source/Events/TaskManager.cs index 9642bbe0a..93d59e9c4 100644 --- a/Subsurface/Source/Events/TaskManager.cs +++ b/Subsurface/Source/Events/TaskManager.cs @@ -65,6 +65,7 @@ namespace Barotrauma while (tries < 5) { ScriptedEvent scriptedEvent = ScriptedEvent.LoadRandom(rand); + DebugConsole.Log("Created scripted event "+scriptedEvent.ToString()); if (scriptedEvent==null || scriptedEvent.Difficulty > totalDifficulty) { tries++; diff --git a/Subsurface/Source/GameSettings.cs b/Subsurface/Source/GameSettings.cs index b55abd8a9..afd8776a4 100644 --- a/Subsurface/Source/GameSettings.cs +++ b/Subsurface/Source/GameSettings.cs @@ -119,8 +119,8 @@ namespace Barotrauma GraphicsHeight = 678; MasterServerUrl = ""; - - SelectedContentPackage = new ContentPackage(""); + + SelectedContentPackage = ContentPackage.list.Any() ? ContentPackage.list[0] : new ContentPackage(""); return; } @@ -138,7 +138,10 @@ namespace Barotrauma //FullScreenEnabled = ToolBox.GetAttributeBool(graphicsMode, "fullscreen", true); var windowModeStr = ToolBox.GetAttributeString(graphicsMode, "displaymode", "Fullscreen"); - if (Enum.TryParse(windowModeStr, out windowMode)); + if (!Enum.TryParse(windowModeStr, out windowMode)) + { + windowMode = WindowMode.Fullscreen; + } MasterServerUrl = ToolBox.GetAttributeString(doc.Root, "masterserverurl", ""); @@ -218,7 +221,8 @@ namespace Barotrauma new XAttribute("masterserverurl", MasterServerUrl), new XAttribute("autocheckupdates", AutoCheckUpdates), new XAttribute("musicvolume", musicVolume), - new XAttribute("soundvolume", soundVolume)); + new XAttribute("soundvolume", soundVolume), + new XAttribute("verboselogging", VerboseLogging)); if (WasGameUpdated) {