//[DebuggerHidden]
        //public override IEnumerable<Gizmo> GetGizmos()
        //{
        //    foreach (Gizmo g in base.GetGizmos())
        //    {
        //        yield return g;
        //    }
        //    if (DesignatorUtility.FindAllowedDesignator<Designator_ZoneAddStockpile_Resources>() != null)
        //    {
        //        yield return new Command_Action
        //        {
        //            action = new Action(this.MakeMatchingStockpile),
        //            hotKey = KeyBindingDefOf.Misc3,
        //            defaultDesc = "TM_CommandMakePortalStockpileDesc".Translate(),
        //            icon = ContentFinder<Texture2D>.Get("UI/Designators/ZoneCreate_Stockpile", true),
        //            defaultLabel = "TM_CommandMakePortalStockpileLabel".Translate()
        //        };
        //    }
        //}

        //public override IEnumerable<FloatMenuOption> GetFloatMenuOptions(Pawn myPawn)
        //{
        //    List<FloatMenuOption> list = new List<FloatMenuOption>();

        //    return list;
        //}

        public virtual void LaunchJobPawns()
        {
            if (this.MageList != null && this.MageList.Count > 0)
            {
                foreach (var mage in mageList)
                {
                    Pawn pawn = mage;
                    if (pawn != null && pawn.Position.IsValid && pawn.Spawned && pawn.Map != null && !pawn.Downed && !pawn.Dead)
                    {
                        if (ModCheck.Validate.GiddyUp.Core_IsInitialized())
                        {
                            ModCheck.GiddyUp.ForceDismount(pawn);
                        }
                        FlyingObject_TimeDelay flyingObject = (FlyingObject_TimeDelay)GenSpawn.Spawn(TorannMagicDefOf.FlyingObject_TimeDelay, pawn.Position, pawn.Map);
                        flyingObject.speed       = 10f;
                        flyingObject.duration    = this.activeDuration - 10;
                        flyingObject.solidTime   = .2f;
                        flyingObject.fadeInTime  = 0;
                        flyingObject.fadeOutTime = .45f;
                        flyingObject.moteScale   = 1.5f;
                        flyingObject.LaunchVaryPosition(this, pawn.Position, pawn, 0, .2f, .5f, TorannMagicDefOf.Mote_Casting, 5);
                    }
                }
            }
        }
 public virtual void LaunchIngredients()
 {
     for (int i = 0; i < this.launchableThings.Count; i++)
     {
         float stackCount = this.launchableThings[i].stackCount * (1f - MaterialCostModifier);
         //Log.Message("ingredient to launch " + launchableThings[i] + " with stack count " + launchableThings[i].stackCount);
         //ingredient.Clear();
         //if (ActiveJob.RecipeDef.ingredients[i].IsFixedIngredient)
         //{
         //    ingredient = this.Map.listerThings.ThingsOfDef(ActiveJob.RecipeDef.ingredients[i].FixedIngredient);
         //}
         //else
         //{
         //    for (int j = 0; j < this.Map.listerThings.AllThings.Count; j++)
         //    {
         //        Thing t = this.Map.listerThings.AllThings[j];
         //        if ((t.Position - this.InteractionCell).LengthHorizontal < 4 && ActiveJob.RecipeDef.ingredients[i].filter.AllowedThingDefs.Contains(t.def))
         //        {
         //            ingredient.Add(t);
         //        }
         //    }
         //}
         //if(this.magicRecipeDef.ingredients[i].FixedIngredient.smallVolume)
         //{
         //    stackCount *= 10f;
         //}
         //for (int j = 0; j < ingredient.Count; j++)
         //{
         //    if ((ingredient[j].Position - this.InteractionCell).LengthHorizontal <= 5 && launchedCount < stackCount)
         //    {
         //        int thisLaunchCount = Mathf.Clamp(ingredient[j].stackCount, 0, (int)stackCount - launchedCount);
         //        launchedCount += thisLaunchCount;
         int   launchCount = Mathf.RoundToInt(stackCount);
         Thing thing       = launchableThings[i].SplitOff(launchCount);
         GenPlace.TryPlaceThing(thing, GetCircleCenter, this.Map, ThingPlaceMode.Direct);
         FlyingObject_TimeDelay flyingObject = (FlyingObject_TimeDelay)GenSpawn.Spawn(TorannMagicDefOf.FlyingObject_TimeDelay, GetCircleCenter, this.Map);
         flyingObject.speed      = 10f;
         flyingObject.duration   = this.activeDuration - 10;
         flyingObject.stackCount = launchCount;
         flyingObject.LaunchVaryPosition(this, thing.Position, thing, 0, .8f, .8f, null, 0, 1f);
         //i--;
         //    }
         //}
     }
 }
        public void LaunchFlyingObect(IntVec3 targetCell, Pawn pawn, int force, int duration)
        {
            bool flag = targetCell != null && targetCell != default(IntVec3);

            if (flag)
            {
                if (pawn != null && pawn.Position.IsValid && pawn.Spawned && pawn.Map != null && !pawn.Downed && !pawn.Dead)
                {
                    if (ModCheck.Validate.GiddyUp.Core_IsInitialized())
                    {
                        ModCheck.GiddyUp.ForceDismount(pawn);
                    }
                    FlyingObject_TimeDelay flyingObject = (FlyingObject_TimeDelay)GenSpawn.Spawn(ThingDef.Named("FlyingObject_TimeDelay"), pawn.Position, pawn.Map);
                    flyingObject.speed    = .01f;
                    flyingObject.duration = duration;
                    flyingObject.Launch(this.casterPawn, targetCell, pawn);
                }
            }
        }