Exemple #1
0
        public static bool FromXml(Version version, XElement config, ObjectsMap map, out NodeMarkup markup)
        {
            var nodeId = config.GetAttrValue <ushort>(nameof(Id));

            while (map.TryGetValue(new ObjectId()
            {
                Node = nodeId
            }, out ObjectId targetNode))
            {
                nodeId = targetNode.Node;
            }

            try
            {
                markup = MarkupManager.NodeManager.Get(nodeId);
                markup.FromXml(version, config, map);
                return(true);
            }
            catch (Exception error)
            {
                Mod.Logger.Error($"Could not load node #{nodeId} markup", error);
                markup = null;
                return(false);
            }
        }
Exemple #2
0
 protected MarkupLine(NodeMarkup markup, MarkupPoint first, MarkupPoint second, bool update = true) : this(markup, new MarkupPointPair(first, second), update)
 {
 }