ScriptedEvent debug logging, saving VerboseLogging option, using the first loaded contentpackage if no contentpackage has been selected

This commit is contained in:
Regalis
2016-04-23 17:28:11 +03:00
parent 14ef736176
commit 1a96159bdb
5 changed files with 25 additions and 5 deletions
@@ -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)
+6 -1
View File
@@ -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];
@@ -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", "");
+1
View File
@@ -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++;