Ejemplo n.º 1
0
        public static bool TryDoSpawn(this HediffComp_RandySpawnUponDeath comp, Thing thing, int randomQuantity)
        {
            if (thing.Negligible())
            {
                if (comp.MyDebug)
                {
                    Log.Warning("TryDoSpawn - negligeable");
                }
                return(false);
            }

            if (comp.HasChosenPawn)
            {
                if (comp.MyDebug)
                {
                    Log.Warning("TryDoSpawn -> TrySpawnPawn");
                }
                return(comp.TrySpawnPawn(thing, randomQuantity));
            }
            else if (comp.HasChosenThing)
            {
                if (comp.MyDebug)
                {
                    Log.Warning("TryDoSpawn -> TrySpawnPawn");
                }
                return(comp.TrySpawnThing(thing, randomQuantity));
            }

            return(false);
        }