Online quest mode, fixed bug when swimming from hull to another, monitors with editable text, choosing exe in content package, monster quests, misc bugfixes

This commit is contained in:
Regalis
2015-07-30 18:52:20 +03:00
parent 5d0a453e23
commit c7dd6e55f0
53 changed files with 3477 additions and 219 deletions
+6 -2
View File
@@ -67,7 +67,7 @@ namespace Subsurface
failureMessage = ToolBox.GetAttributeString(element, "failuremessage", "");
}
public static Quest LoadRandom(Random rand)
public static Quest LoadRandom(Location[] locations, Random rand)
{
XDocument doc = ToolBox.TryLoadXml(configFile);
if (doc == null) return null;
@@ -116,7 +116,11 @@ namespace Subsurface
ConstructorInfo constructor = t.GetConstructor(new[] { typeof(XElement) });
object instance = constructor.Invoke(new object[] { element });
return (Quest)instance;
Quest quest = (Quest)instance;
quest.description = quest.description.Replace("[location1]", locations[0].Name);
quest.description = quest.description.Replace("[location2]", locations[1].Name);
return quest;
}
randomNumber -= eventProbability[i];