Changes

610 bytes removed ,  03:32, 28 November 2022
Line 310: Line 310:     
===Send a letter (using static content)===
 
===Send a letter (using static content)===
  −
To make uses of this class in your own project, thereby making the static mail data available, hook into the OnGameLaunch event, for example.
  −
  −
<syntaxhighlight lang="c#">
  −
    /// <summary>
  −
    /// Fires after game is launched, right before first update tick. Happens once per game session (unrelated to loading saves).
  −
    /// All mods are loaded and initialized at this point, so this is a good time to set up mod integrations.
  −
    /// </summary>
  −
    private void OnGameLaunched(object sender, GameLaunchedEventArgs e)
  −
    {
  −
        Helper.Content.AssetEditors.Add(new MyModMail());
  −
    }
  −
</syntaxhighlight>
      
Now that you have your letter loaded, it's time to send it to the player.  There are a couple different methods available to accomplish this as well, depending on your need.  Two examples are shown below.  The distinction between the two methods will be explained below:
 
Now that you have your letter loaded, it's time to send it to the player.  There are a couple different methods available to accomplish this as well, depending on your need.  Two examples are shown below.  The distinction between the two methods will be explained below:
528

edits