public static void ExecuteNewsTarnsmission(InteractionWorker __instance, Pawn initiator, Pawn recipient) { if (__instance is InteractionWorker_Chitchat chitchatWorker) { if (Rand.Value <= initiator.GetActualNewsSpreadChance()) { NewsSpreadUtility.SpreadNews(initiator, recipient, NewsSpreadUtility.SpreadMode.RANDOM); } } else if (__instance is InteractionWorker_DeepTalk deeptalkWorker) { if (Rand.Value <= initiator.GetActualNewsSpreadChance(5)) { NewsSpreadUtility.SpreadNews(initiator, recipient, NewsSpreadUtility.SpreadMode.DISTINCT); } } }
public static void PostFix(InteractionWorker __instance, Pawn initiator, Pawn recipient) { if (true) //if (DesynchronizedMain.NewsSpreadIsActive) { if (__instance is InteractionWorker_Chitchat chitchatWorker) { // debuggingChitChatCount++; if (Rand.Value <= initiator.GetActualNewsSpreadChance()) { NewsSpreadUtility.SpreadNews(initiator, recipient, NewsSpreadUtility.SpreadMode.RANDOM); // DesynchronizedMain.LogError(initiator + " has chit-chat with " + recipient + "; it has been the " + debuggingChitChatCount + "th chit-chat so far."); } } else if (__instance is InteractionWorker_DeepTalk deeptalkWorker) { if (Rand.Value <= initiator.GetActualNewsSpreadChance(5)) { NewsSpreadUtility.SpreadNews(initiator, recipient, NewsSpreadUtility.SpreadMode.DISTINCT); // DesynchronizedMain.LogError(initiator + " has deep talk with " + recipient + "; it has been the " + debuggingDeepTalkCount + "th deep-talk so far."); } } } }