public override IEnumerable <Gizmo> GetGizmos()
 {
     foreach (Gizmo gizmo in base.GetGizmos())
     {
         yield return(gizmo);
     }
     yield return(PlantToGrowSettableUtility.SetPlantToGrowCommand(this));
 }
Beispiel #2
0
        public override IEnumerable <Gizmo> GetGizmos()
        {
            foreach (Gizmo g in this.< GetGizmos > __BaseCallProxy0())
            {
                yield return(g);
            }
            yield return(PlantToGrowSettableUtility.SetPlantToGrowCommand(this));

            yield break;
        }
        public override IEnumerable <Gizmo> GetGizmos()
        {
            using (IEnumerator <Gizmo> enumerator = base.GetGizmos().GetEnumerator())
            {
                if (enumerator.MoveNext())
                {
                    Gizmo g = enumerator.Current;
                    yield return(g);

                    /*Error: Unable to find new state assignment for yield return*/;
                }
            }
            yield return((Gizmo)PlantToGrowSettableUtility.SetPlantToGrowCommand(this));

            /*Error: Unable to find new state assignment for yield return*/;
IL_0189:
            /*Error near IL_018a: Unexpected return in MoveNext()*/;
        }
Beispiel #4
0
        public override IEnumerable <Gizmo> GetGizmos()
        {
            foreach (Gizmo g in base.GetGizmos())
            {
                yield return(g);
            }
            yield return(PlantToGrowSettableUtility.SetPlantToGrowCommand(this));

            yield return(new Command_Toggle
            {
                defaultLabel = "CommandAllowSow".Translate(),
                defaultDesc = "CommandAllowSowDesc".Translate(),
                hotKey = KeyBindingDefOf.Command_ItemForbid,
                icon = TexCommand.ForbidOff,
                isActive = (() => this.$this.allowSow),
                toggleAction = delegate
                {
                    this.$this.allowSow = !this.$this.allowSow;
                }
            });
        }
Beispiel #5
0
        public override IEnumerable <Gizmo> GetGizmos()
        {
            foreach (Gizmo gizmo in base.GetGizmos())
            {
                yield return(gizmo);
            }
            yield return(PlantToGrowSettableUtility.SetPlantToGrowCommand(this));

            Command_Toggle command_Toggle = new Command_Toggle();

            command_Toggle.defaultLabel = "CommandAllowSow".Translate();
            command_Toggle.defaultDesc  = "CommandAllowSowDesc".Translate();
            command_Toggle.hotKey       = KeyBindingDefOf.Command_ItemForbid;
            command_Toggle.icon         = TexCommand.ForbidOff;
            command_Toggle.isActive     = () => allowSow;
            command_Toggle.toggleAction = delegate
            {
                allowSow = !allowSow;
            };
            yield return(command_Toggle);
        }
            public bool MoveNext()
            {
                uint num = (uint)this.$PC;

                this.$PC = -1;
                bool flag = false;

                switch (num)
                {
                case 0u:
                    enumerator = base.< GetGizmos > __BaseCallProxy0().GetEnumerator();
                    num        = 4294967293u;
                    break;

                case 1u:
                    break;

                case 2u:
                {
                    Command_Toggle com = new Command_Toggle();
                    com.defaultLabel = "CommandAllowSow".Translate();
                    com.defaultDesc  = "CommandAllowSowDesc".Translate();
                    com.hotKey       = KeyBindingDefOf.Command_ItemForbid;
                    com.icon         = TexCommand.Forbidden;
                    com.isActive     = (() => this.allowSow);
                    com.toggleAction = delegate()
                    {
                        this.allowSow = !this.allowSow;
                    };
                    this.$current = com;
                    if (!this.$disposing)
                    {
                        this.$PC = 3;
                    }
                    return(true);
                }

                case 3u:
                    this.$PC = -1;
                    return(false);

                default:
                    return(false);
                }
                try
                {
                    switch (num)
                    {
                    }
                    if (enumerator.MoveNext())
                    {
                        g             = enumerator.Current;
                        this.$current = g;
                        if (!this.$disposing)
                        {
                            this.$PC = 1;
                        }
                        flag = true;
                        return(true);
                    }
                }
                finally
                {
                    if (!flag)
                    {
                        if (enumerator != null)
                        {
                            enumerator.Dispose();
                        }
                    }
                }
                this.$current = PlantToGrowSettableUtility.SetPlantToGrowCommand(this);
                if (!this.$disposing)
                {
                    this.$PC = 2;
                }
                return(true);
            }