public static void AddDestination(string text, int index, Abstract.IModification modification = null) { if (modification != null) { DestinationsAccompanyingActions.Add(text, modification); } Destinations.Add(text, index); }
public Option OptionParseWithDo(XmlNode xmlOption, Abstract.IModification modification) { Option option = OptionsTemplate(xmlOption); if (xmlOption.Attributes["Do"] != null) { option.Do = Game.Xml.ModificationParse(xmlOption, modification, name: "Do"); } return(option); }
public static Abstract.IModification ModificationParse(XmlNode xmlNode, Abstract.IModification modification, string name = "Name") { if (xmlNode == null) { return(null); } modification.Name = StringParse(xmlNode.Attributes[name]); modification.Value = IntParse(xmlNode.Attributes["Value"]); modification.ValueString = StringParse(xmlNode.Attributes["ValueString"]); return(modification); }