mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Prepend new dialogue options to top of list
This commit is contained in:
parent
630ee9e375
commit
2e18d7bca6
@ -102,10 +102,12 @@ namespace NewHorizons.Builder.Props
|
||||
// We just have to merge the dialogue options
|
||||
var dialogueOptions = newDialogueNode.GetChildNode("DialogueOptionsList").GetChildNodes("DialogueOption");
|
||||
var existingDialogueOptionsList = existingNode.GetChildNode("DialogueOptionsList");
|
||||
var firstNode = existingDialogueOptionsList.ChildNodes[0];
|
||||
foreach (XmlNode node in dialogueOptions)
|
||||
{
|
||||
var importedNode = existingDialogueOptionsList.OwnerDocument.ImportNode(node, true);
|
||||
existingDialogueOptionsList.AppendChild(importedNode);
|
||||
// We add them to the start because normally the last option is to return to menu or exit
|
||||
existingDialogueOptionsList.PrependChild(importedNode);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user