Exemplo n.º 1
0
        private static IEnumerable<MudObject> _enumerateVisibleTree(MudObject C)
        {
            if (C != null)
            {
                yield return C;

                if (C is Container)
                    foreach (var list in (C as Container).Lists)
                    {
                        if (list.Key == RelativeLocations.In && C.GetBooleanProperty("openable?") && !C.GetBooleanProperty("open?")) continue;
                        foreach (var item in list.Value)
                            foreach (var sub in _enumerateVisibleTree(item))
                                yield return sub;
                    }
            }
        }
Exemplo n.º 2
0
        private static IEnumerable <MudObject> _enumerateVisibleTree(MudObject C)
        {
            if (C != null)
            {
                yield return(C);

                if (C is Container)
                {
                    foreach (var list in (C as Container).Lists)
                    {
                        if (list.Key == RelativeLocations.In && C.GetBooleanProperty("openable?") && !C.GetBooleanProperty("open?"))
                        {
                            continue;
                        }
                        foreach (var item in list.Value)
                        {
                            foreach (var sub in _enumerateVisibleTree(item))
                            {
                                yield return(sub);
                            }
                        }
                    }
                }
            }
        }
Exemplo n.º 3
0
 public static bool IsHeavy(MudObject Object)
 {
     return Object.GetBooleanProperty("heavy?");
 }