Пример #1
0
        public override void OrderForceTarget(LocalTargetInfo target)
        {
            CompAbilityEffect_WithDest compAbilityEffect_WithDest = ability.CompOfType <CompAbilityEffect_WithDest>();

            if (compAbilityEffect_WithDest != null && compAbilityEffect_WithDest.Props.destination == AbilityEffectDestination.Selected)
            {
                compAbilityEffect_WithDest.SetTarget(target);
            }
            else
            {
                ability.QueueCastingJob(target, null);
            }
        }
 private bool FindFreeCell(IntVec3 target, Map map, out IntVec3 result)
 {
     return(CellFinder.TryFindRandomCellNear(target, map, Mathf.RoundToInt(Props.scatterRadius) - 1, (IntVec3 cell) => CompAbilityEffect_WithDest.CanTeleportThingTo(cell, map) && GenSight.LineOfSight(cell, target, map, skipFirstCell: true), out result));
 }