Ejemplo n.º 1
0
        private void Begin()
        {
            var skip    = (GrassControlPlugin._settingsInstance.SkipPregenerateWorldSpaces ?? "").Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
            var skipSet = new HashSet <string>(StringComparer.OrdinalIgnoreCase);

            foreach (var x in skip)
            {
                skipSet.Add(x);
            }

            var only    = (GrassControlPlugin._settingsInstance.OnlyPregenerateWorldSpaces ?? "").Trim().Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
            var onlySet = new HashSet <string>(StringComparer.OrdinalIgnoreCase);

            foreach (var x in only)
            {
                string sy = x.Trim();
                if (sy.Length != 0)
                {
                    onlySet.Add(x);
                }
            }

            var all = NetScriptFramework.SkyrimSE.DataHandler.Instance.GetAllFormsByType(NetScriptFramework.SkyrimSE.FormTypes.WorldSpace);

            foreach (var f in all)
            {
                var ws = (NetScriptFramework.SkyrimSE.TESWorldSpace)f;

                string name = ws.EditorId;

                if (onlySet.Count != 0)
                {
                    if (name == null || !onlySet.Contains(name))
                    {
                        continue;
                    }
                }
                else if ((name != null && skipSet.Contains(name)))
                {
                    continue;
                }

                TotalWS++;

                if (HasDone(KeyWS, name))
                {
                    DoneWS++;
                    continue;
                }

                var t = new GidFileWorldGenerateTask(this, ws, name);
                this.WorldTodo.Add(t);
            }
        }
Ejemplo n.º 2
0
 internal GidFileCellGenerateTask(GidFileWorldGenerateTask parent, int x, int y)
 {
     this.Parent = parent;
     this.X      = x;
     this.Y      = y;
 }