コード例 #1
0
        // Token: 0x06000001 RID: 1 RVA: 0x00002050 File Offset: 0x00000250
        public override void DoEffect(Pawn usedBy)
        {
            base.DoEffect(usedBy);

            var pk = WarframeStaticMethods.GetAllWarframeKind().RandomElement();

            if (pk != null)
            {
                var wf = WarframeStaticMethods.GetWarframePawn(pk);
                GenSpawn.Spawn(wf, usedBy.Position, usedBy.Map);
            }

            usedBy.story.traits.GainTrait(new Trait(TraitDef.Named("Warframe_Trait")));
            FinishInstantly();
        }
コード例 #2
0
        public override void Tick()
        {
            base.Tick();
            if (curState == CraftState.Crafting && this.TryGetComp <CompPowerTrader>().PowerOn)
            {
                if (this.TryGetComp <CompRefuelable>().Fuel >= fuelCost)
                {
                    ticks++;
                    if (ticks % 120 == 0)
                    {
                        FleckMaker.ThrowMicroSparks(Position.ToVector3(), Map);
                        //SoundDefOf.FloatMenu_Open.PlayOneShot(this);
                    }

                    if (ticks >= oneDayTicks)
                    {
                        curState = CraftState.Done;
                    }
                }
            }

            if (curState != CraftState.Done)
            {
                return;
            }

            ticks = 0;
            var pawn   = WarframeStaticMethods.GetWarframePawn(nowCraftKind);
            var loc    = CellFinder.RandomClosewalkCellNear(Position, Map, 2);
            var unused = (Pawn)GenSpawn.Spawn(pawn, loc, Map);

            SoundDefOf.TinyBell.PlayOneShotOnCamera();
            this.TryGetComp <CompRefuelable>().ConsumeFuel(fuelCost);
            nowCraftKind = null;
            curState     = CraftState.Stop;
            Head         = null;
            Body         = null;
            Inside       = null;
        }
コード例 #3
0
 private Pawn getNewWF()
 {
     return(WarframeStaticMethods.GetWarframePawn(nowWarframeKind));
 }