SatriaCahaya
Farmhand
I wanted to send rewards to player through the mail. My method is OnSaveLoaded, i load a json file containing the mail i need and then insert the mail to the game's file using :
Game1.content.Load<Dictionary<string, string>>("Data\\Mail")[mailEntry.MailID] = mailContent;
after that i use :
Game1.mailbox.add(mailEntry.MailID);
To send the mail to the player.
It worked but it have an issue. The mail is sent on OnDayEnding event and the next day, the mail will be there. But when the player is not saving the game the next day, the mail is not there (probably because its nor loaded). On day 28, mail sent. On day 1, the mail there but if the player not saving the game on day 1. The mail is not there. Is there a way to fix this? My goal is the even if the player not saving, the mail is still there.
The reason i did this is because i need the player's data in the mail and the mail rewards are tied with the game's current year.
Game1.content.Load<Dictionary<string, string>>("Data\\Mail")[mailEntry.MailID] = mailContent;
after that i use :
Game1.mailbox.add(mailEntry.MailID);
To send the mail to the player.
It worked but it have an issue. The mail is sent on OnDayEnding event and the next day, the mail will be there. But when the player is not saving the game the next day, the mail is not there (probably because its nor loaded). On day 28, mail sent. On day 1, the mail there but if the player not saving the game on day 1. The mail is not there. Is there a way to fix this? My goal is the even if the player not saving, the mail is still there.
The reason i did this is because i need the player's data in the mail and the mail rewards are tied with the game's current year.