Exemple #1
0
        private void textToSpeech(On.RoR2.Chat.orig_AddPickupMessage orig, CharacterBody body, string pickupToken, Color32 pickupColor, uint pickupQuantity)
        {
            Chat.PlayerPickupChatMessage pickupMessage = new Chat.PlayerPickupChatMessage
            {
                subjectCharacterBody = body,
                baseToken            = "PLAYER_PICKUP",
                pickupToken          = pickupToken,
                pickupColor          = pickupColor,
                pickupQuantity       = pickupQuantity
            };

            string text = pickupMessage.ConstructChatString();

            synthesizer.Speak(text);

            orig(body, pickupToken, pickupColor, pickupQuantity);
        }
Exemple #2
0
 private static string FixZeroItemCount(On.RoR2.Chat.PlayerPickupChatMessage.orig_ConstructChatString orig,
                                        Chat.PlayerPickupChatMessage self)
 {
     self.pickupQuantity = Math.Max(1u, self.pickupQuantity);
     return(orig(self));
 }
 private string PlayerPickupChatMessage_ConstructChatString(On.RoR2.Chat.PlayerPickupChatMessage.orig_ConstructChatString orig, Chat.PlayerPickupChatMessage self)
 {
     throw new NotImplementedException();
 }