static void Postfix(IntVec3 pos, Map map) { if (!ZTribbleSettings.flagShipChunk) { return; } if (Rand.Chance(0.85f)) { return; } Pawn tribble = PawnGenerator.GeneratePawn(PawnKindDef.Named("ZTrib_Tribble"), null); GenSpawn.Spawn(tribble, pos, map); TribbleUtility.ResetInterval(map); }
static void Postfix(Thing toGive, int countToGive, Pawn playerNegotiator) { if (!ZTribbleSettings.flagTradeship) { return; } if (Rand.Chance(0.9f)) { return; } Map map = playerNegotiator.Map; IntVec3 loc = DropCellFinder.TradeDropSpot(map); PawnKindDef tribbleKind = PawnKindDef.Named("ZTrib_Tribble"); Pawn tribble = PawnGenerator.GeneratePawn(tribbleKind); // spawn extra drop pod containing tribble TradeUtility.SpawnDropPod(loc, map, tribble); TribbleUtility.ResetInterval(map); }