Changes

Jump to navigation Jump to search
→‎Game loop: add new events in SMAPI 2.8 beta 5
Line 271: Line 271:  
  |arg type 3 = ''method'' returns <tt>bool</tt>
 
  |arg type 3 = ''method'' returns <tt>bool</tt>
 
  |arg desc 3 = Whether <tt>e.TicksElapsed</tt> is a multiple of the given number. This is mainly useful if you want to run logic intermittently (e.g. <code>e.IsMultipleOf(30)</code> for every half-second).
 
  |arg desc 3 = Whether <tt>e.TicksElapsed</tt> is a multiple of the given number. This is mainly useful if you want to run logic intermittently (e.g. <code>e.IsMultipleOf(30)</code> for every half-second).
 +
}}
 +
{{/event
 +
|name = SaveCreating, SaveCreated
 +
|desc = Raised before/after the game creates the save file (after the new-game intro). The save won't be written until all mods have finished handling this event. This is a somewhat specialised event, since the world isn't fully initialised at this point; in most cases you should use [[#DayStarted|<tt>DayStarted</tt>]], [[#Saving|<tt>Saving</tt>]], [[#Saved|<tt>Saved</tt>]] instead.
 +
}}
 +
{{/event
 +
|name = Saving, Saved
 +
|desc = Raised before/after the game writes data to save file (except [[#SaveCreating|the initial save creation]]). The save won't be written until all mods have finished handling this event.
 +
}}
 +
{{/event
 +
|name = SaveLoading, SaveLoaded
 +
|desc = Raised before/after the game reads data from a save file and initialises the world. This event isn't raised after saving; if you want to do something at the start of each day, see [[#DayStarted|<tt>DayStarted</tt>]] instead.
 +
}}
 +
{{/event
 +
|name = DayStarted
 +
|desc = Raised after a new in-game day starts. Everything has already been initialised at this point. (To run code before the game sets up the day, see [[#DayEnding|<tt>DayEnding</tt>]] instead.)
 +
}}
 +
{{/event
 +
|name = DayEnding
 +
|desc = Raised before the game ends the current day. This happens before it starts setting up the next day and before [[#Saving|<tt>Saving</tt>]].
 
}}
 
}}
 
|}
 
|}
translators
8,445

edits

Navigation menu