Ejemplo n.º 1
0
 public GizmoEntry(int snoID, PluginGizmoType objectType, string internalname = "", GizmoTargetTypes targettype = GizmoTargetTypes.None)
     : base(snoID)
 {
     InternalName    = internalname;
     _objectType     = objectType;
     GizmotargetType = targettype;
 }
Ejemplo n.º 2
0
 public GizmoEntry(int snoID, PluginGizmoType objectType, string internalname = "", GizmoTargetTypes targettype = GizmoTargetTypes.None, int interactRange = -1, int collisionRadius = -1)
     : base(snoID)
 {
     InternalName    = internalname;
     _objectType     = objectType;
     GizmotargetType = targettype;
     InteractRange   = interactRange;
     CollisionRadius = collisionRadius;
 }
Ejemplo n.º 3
0
        public DebugEntry(int snoid, string name, PluginActorType actortype, PluginGizmoType gizmotype = PluginGizmoType.None)
        {
            SNOID = snoid;
            Name = name;
            ActorType = actortype;
            GizmoType = gizmotype;

            if (ActorType == PluginActorType.Item)
                DroppedItemType = ItemFunc.DetermineDroppedItemType(Name, SNOID);
        }
Ejemplo n.º 4
0
        public DebugEntry(int snoid, string name, PluginActorType actortype, PluginGizmoType gizmotype = PluginGizmoType.None)
        {
            SNOID     = snoid;
            Name      = name;
            ActorType = actortype;
            GizmoType = gizmotype;

            if (ActorType == PluginActorType.Item)
            {
                DroppedItemType = ItemFunc.DetermineDroppedItemType(Name, SNOID);
            }
        }
Ejemplo n.º 5
0
 public GizmoEntry(int snoID, PluginGizmoType objectType, string internalname = "", GizmoTargetTypes targettype = GizmoTargetTypes.None, int interactRange = -1, int collisionRadius = -1)
     : base(snoID)
 {
     InternalName = internalname;
     _objectType = objectType;
     GizmotargetType = targettype;
     InteractRange = interactRange;
     CollisionRadius = collisionRadius;
 }
Ejemplo n.º 6
0
        private static string _ConvertDebugEntries(string s)
        {
            string[]          delimiter    = new string[] { "<DebugEntry>\r\n" };
            string[]          entryStrings = s.TrimStart().Split(delimiter, StringSplitOptions.RemoveEmptyEntries);
            List <DebugEntry> Entries      = new List <DebugEntry>();


            foreach (var entryString in entryStrings)
            {
                string[] splitStrings = entryString.Split(Convert.ToChar("\n"));

                string sSnoID = splitStrings.FirstOrDefault(str => str.TrimStart().StartsWith("<SNOID>"));
                if (sSnoID == null)
                {
                    return(String.Empty);
                }
                sSnoID = ExtractDataFromXMLTag(sSnoID);
                if (sSnoID == String.Empty)
                {
                    return(String.Empty);
                }
                int iSNOID = Convert.ToInt32(sSnoID);

                string sActorType = splitStrings.FirstOrDefault(str => str.TrimStart().StartsWith("<ActorType>"));
                if (sActorType == null)
                {
                    return(String.Empty);
                }
                sActorType = ExtractDataFromXMLTag(sActorType);
                if (sActorType == String.Empty)
                {
                    return(String.Empty);
                }
                var ActorType = (PluginActorType)Enum.Parse(typeof(PluginActorType), sActorType);

                string name = splitStrings.FirstOrDefault(str => str.TrimStart().StartsWith("<Name>"));
                if (name == null)
                {
                    return(String.Empty);
                }
                name = ExtractDataFromXMLTag(name);
                if (name == String.Empty)
                {
                    return(String.Empty);
                }

                PluginGizmoType gizmotype = PluginGizmoType.None;
                if (ActorType == PluginActorType.Gizmo)
                {
                    string sGizmoType = splitStrings.FirstOrDefault(str => str.TrimStart().StartsWith("<GizmoType>"));
                    if (sGizmoType == null)
                    {
                        return(String.Empty);
                    }
                    sGizmoType = ExtractDataFromXMLTag(sGizmoType);
                    if (sGizmoType == String.Empty)
                    {
                        return(String.Empty);
                    }
                    gizmotype = (PluginGizmoType)Enum.Parse(typeof(PluginGizmoType), sGizmoType);
                }

                Entries.Add(new DebugEntry(iSNOID, name, ActorType, gizmotype));

                //string returnString = "";
                //if (ActorType == ActorType.Item)
                //{
                //	returnString = "new DroppedItemEntry(" + sSnoID + ", ";

                //	PluginDroppedItemTypes itemtype = ItemFunc.DetermineDroppedItemType(name, iSNOID);
                //	returnString = returnString + "PluginDroppedItemTypes." + itemtype.ToString() + @", """ + name + @"""),";
                //}
                //else if (ActorType == ActorType.Gizmo)
                //{
                //	returnString = "new GizmoEntry(" + sSnoID + ", ";


                //	returnString = returnString + "GizmoType." + sGizmoType + @", """ + name + @"""),";
                //}



                //finalString = finalString + returnString + "\r\n";
            }


            string finalString = String.Empty;

            foreach (var entry in Entries.OrderBy(e => e.DroppedItemType))
            {
                finalString = finalString + entry.ReturnCacheEntryString() + "\r\n";
            }

            return(finalString);
        }
Ejemplo n.º 7
0
 public GizmoStringEntry(string name, PluginGizmoType objectType)
     : base(name)
 {
     _objectType = objectType;
 }
Ejemplo n.º 8
0
 public GizmoStringEntry(string name, PluginGizmoType objectType)
     : base(name)
 {
     _objectType = objectType;
 }