public override bool InheritInteractionsFrom(Gizmo other)
        {
            Command_LoadPit command_LoadToTransporter = (Command_LoadPit)other;

            if (command_LoadToTransporter.transComp.parent.def != this.transComp.parent.def)
            {
                return(false);
            }
            if (this.transporters == null)
            {
                this.transporters = new List <CompPit>();
            }
            this.transporters.Add(command_LoadToTransporter.transComp);
            return(false);
        }
Example #2
0
        public override IEnumerable <Gizmo> CompGetGizmosExtra()
        {
            foreach (Gizmo g in base.CompGetGizmosExtra())
            {
                yield return(g);
            }
            if (!prisonerthrowingdone)
            {
                Command_LoadPit loadGroup = new Command_LoadPit();
                int             selectedTransportersCount = 0;
                for (int i = 0; i < Find.Selector.NumSelected; i++)
                {
                    Thing thing = Find.Selector.SelectedObjectsListForReading[i] as Thing;
                    if (thing != null && thing.def == this.parent.def)
                    {
                        CompLaunchable compLaunchable = thing.TryGetComp <CompLaunchable>();
                        if (compLaunchable == null || (compLaunchable.FuelingPortSource != null && compLaunchable.FuelingPortSourceHasAnyFuel))
                        {
                            selectedTransportersCount++;
                        }
                    }
                }
                loadGroup.defaultLabel = "PD_ThrowPrisoner".Translate();
                loadGroup.defaultDesc  = "PD_ThrowPrisonerDesc".Translate();
                loadGroup.icon         = CompPit.LoadCommandTex;
                loadGroup.transComp    = this;


                yield return(loadGroup);
            }

            Command_Action PD_ChangeAspectTentacled = new Command_Action();

            PD_ChangeAspectTentacled.action = delegate
            {
                Messages.Message("PD_ConsecratingCthulhu".Translate(), this.parent, MessageTypeDefOf.CautionInput, true);
                this.buildingGod = "cthulhu";
                DoSmokePuff();
                Graphic graphic = this.parent.Graphic;
            };
            PD_ChangeAspectTentacled.defaultLabel = "PD_ConsecrateCthulhu".Translate();
            PD_ChangeAspectTentacled.defaultDesc  = "PD_ConsecrateCthulhuDesc".Translate();
            PD_ChangeAspectTentacled.icon         = TentacledAspectTex;
            yield return(PD_ChangeAspectTentacled);

            Command_Action PD_ChangeAspectCats = new Command_Action();

            PD_ChangeAspectCats.action = delegate
            {
                Messages.Message("PD_ConsecratingBast".Translate(), this.parent, MessageTypeDefOf.CautionInput, true);
                this.buildingGod = "bast";
                DoSmokePuff();
                Graphic graphic = this.parent.Graphic;
            };
            PD_ChangeAspectCats.defaultLabel = "PD_ConsecrateBast".Translate();
            PD_ChangeAspectCats.defaultDesc  = "PD_ConsecrateBastDesc".Translate();
            PD_ChangeAspectCats.icon         = CatAspectTex;
            yield return(PD_ChangeAspectCats);

            Command_Action PD_ChangeAspectBones = new Command_Action();

            PD_ChangeAspectBones.action = delegate
            {
                Messages.Message("PD_ConsecratingBones".Translate(), this.parent, MessageTypeDefOf.CautionInput, true);
                this.buildingGod = "bones";
                DoSmokePuff();
                Graphic graphic = this.parent.Graphic;
            };
            PD_ChangeAspectBones.defaultLabel = "PD_ConsecrateBones".Translate();
            PD_ChangeAspectBones.defaultDesc  = "PD_ConsecrateBonesDesc".Translate();
            PD_ChangeAspectBones.icon         = BoneAspectTex;
            yield return(PD_ChangeAspectBones);

            Command_Action PD_ChangeAspectNone = new Command_Action();

            PD_ChangeAspectNone.action = delegate
            {
                Messages.Message("PD_UnConsecrating".Translate(), this.parent, MessageTypeDefOf.CautionInput, true);
                this.buildingGod = "none";
                DoSmokePuff();
                Graphic graphic = this.parent.Graphic;
            };
            PD_ChangeAspectNone.defaultLabel = "PD_UnConsecrate".Translate();
            PD_ChangeAspectNone.defaultDesc  = "PD_UnConsecrateDesc".Translate();
            PD_ChangeAspectNone.icon         = NormalAspectTex;
            yield return(PD_ChangeAspectNone);

            yield break;
        }