Changes

Jump to navigation Jump to search
→‎Events (SMAPI 3.0): + world events
Line 317: Line 317:  
  |arg type 3 = <tt>int</tt>
 
  |arg type 3 = <tt>int</tt>
 
  |arg desc 3 = The previous and current scroll value, cumulative since the game started. Mods should generally use <tt>e.Delta</tt> instead.
 
  |arg desc 3 = The previous and current scroll value, cumulative since the game started. Mods should generally use <tt>e.Delta</tt> instead.
 +
}}
 +
|}
 +
 +
===World===
 +
<tt>this.Helper.Events.World</tt> has events raised when the in-game world changes in some way.
 +
 +
{| class="wikitable"
 +
|-
 +
! event
 +
! summary
 +
{{/event
 +
|name = <tt>LocationListChanged</tt>
 +
|desc = Raised after a game location is added or removed (including building interiors).
 +
 +
|arg name 1 = <tt>e.Added</tt>
 +
|arg type 1 = <tt>IEnumerable&lt;GameLocation&gt;</tt>
 +
|arg desc 1 = A list of locations added since the last update tick.
 +
 +
|arg name 2 = <tt>e.Removed</tt>
 +
|arg type 2 = <tt>IEnumerable&lt;GameLocation&gt;</tt>
 +
|arg desc 2 = A list of locations removed since the last update tick.
 +
}}
 +
 +
{{/event
 +
|name = <tt>BuildingListChanged</tt>
 +
|desc = Raised after buildings are added/removed in any location.
 +
 +
|arg name 1 = <tt>e.Location</tt>
 +
|arg type 1 = <tt>GameLocation</tt>
 +
|arg desc 1 = The location which changed.
 +
 +
|arg name 2 = <tt>e.Added</tt>
 +
|arg type 2 = <tt>IEnumerable&lt;Building&gt;</tt>
 +
|arg desc 2 = A list of buildings added since the last update tick.
 +
 +
|arg name 3 = <tt>e.Removed</tt>
 +
|arg type 3 = <tt>IEnumerable&lt;Building&gt;</tt>
 +
|arg desc 3 = A list of buildings removed since the last update tick.
 +
}}
 +
{{/event
 +
|name = <tt>DebrisListChanged</tt>
 +
|desc = Raised after debris is added/removed in any location (including dropped or spawned floating items).
 +
 +
|arg name 1 = <tt>e.Location</tt>
 +
|arg type 1 = <tt>GameLocation</tt>
 +
|arg desc 1 = The location which changed.
 +
 +
|arg name 2 = <tt>e.Added</tt>
 +
|arg type 2 = <tt>IEnumerable&lt;Debris&gt;</tt>
 +
|arg desc 2 = A list of debris added since the last update tick.
 +
 +
|arg name 3 = <tt>e.Removed</tt>
 +
|arg type 3 = <tt>IEnumerable&lt;Debris&gt;</tt>
 +
|arg desc 3 = A list of debris removed since the last update tick.
 +
}}
 +
{{/event
 +
|name = <tt>LargeTerrainFeatureListChanged</tt>
 +
|desc = Raised after large terrain features (like bushes) are added/removed in any location.
 +
 +
|arg name 1 = <tt>e.Location</tt>
 +
|arg type 1 = <tt>GameLocation</tt>
 +
|arg desc 1 = The location which changed.
 +
 +
|arg name 2 = <tt>e.Added</tt>
 +
|arg type 2 = <tt>IEnumerable&lt;LargeTerrainFeature&gt;</tt>
 +
|arg desc 2 = A list of large terrain features added since the last update tick.
 +
 +
|arg name 3 = <tt>e.Removed</tt>
 +
|arg type 3 = <tt>IEnumerable&lt;LargeTerrainFeature&gt;</tt>
 +
|arg desc 3 = A list of large terrain features removed since the last update tick.
 +
}}
 +
{{/event
 +
|name = <tt>NpcListChanged</tt>
 +
|desc = Raised after NPCs are added/removed in any location (including villagers, horses, Junimos, monsters, and pets).
 +
 +
|arg name 1 = <tt>e.Location</tt>
 +
|arg type 1 = <tt>GameLocation</tt>
 +
|arg desc 1 = The location which changed.
 +
 +
|arg name 2 = <tt>e.Added</tt>
 +
|arg type 2 = <tt>IEnumerable&lt;NPC&gt;</tt>
 +
|arg desc 2 = A list of NPCs added since the last update tick.
 +
 +
|arg name 3 = <tt>e.Removed</tt>
 +
|arg type 3 = <tt>IEnumerable&lt;NPC&gt;</tt>
 +
|arg desc 3 = A list of NPCs removed since the last update tick.
 +
}}
 +
{{/event
 +
|name = <tt>ObjectListChanged</tt>
 +
|desc = Raised after objects are added/removed in any location (including machines, furniture, fences, etc). For floating items, see <tt>DebrisListChanged</tt>.
 +
 +
|arg name 1 = <tt>e.Location</tt>
 +
|arg type 1 = <tt>GameLocation</tt>
 +
|arg desc 1 = The location which changed.
 +
 +
|arg name 2 = <tt>e.Added</tt>
 +
|arg type 2 = <tt>IEnumerable&lt;KeyValuePair&lt;Vector2, Object&gt;&gt;</tt>
 +
|arg desc 2 = A list of [[Modding:Modder Guide/Game Fundamentals#Tiles|tile coordinate]] + object pairs added since the last update tick.
 +
 +
|arg name 3 = <tt>e.Removed</tt>
 +
|arg type 3 = <tt>IEnumerable&lt;KeyValuePair&lt;Vector2, Object&gt;&gt;</tt>
 +
|arg desc 3 = A list of [[Modding:Modder Guide/Game Fundamentals#Tiles|tile coordinate]] + object pairs removed since the last update tick.
 +
}}
 +
{{/event
 +
|name = <tt>TerrainFeatureListChanged</tt>
 +
|desc = Raised after terrain features are added/removed in any location (including trees, hoed dirt, and flooring). For bushes, see <tt>LargeTerrainFeatureListChanged</tt>.
 +
 +
|arg name 1 = <tt>e.Location</tt>
 +
|arg type 1 = <tt>GameLocation</tt>
 +
|arg desc 1 = The location which changed.
 +
 +
|arg name 2 = <tt>e.Added</tt>
 +
|arg type 2 = <tt>IEnumerable&lt;KeyValuePair&lt;Vector2, TerrainFeature&gt;&gt;</tt>
 +
|arg desc 2 = A list of [[Modding:Modder Guide/Game Fundamentals#Tiles|tile coordinate]] + terrain feature pairs added since the last update tick.
 +
 +
|arg name 3 = <tt>e.Removed</tt>
 +
|arg type 3 = <tt>IEnumerable&lt;KeyValuePair&lt;Vector2, TerrainFeature&gt;&gt;</tt>
 +
|arg desc 3 = A list of [[Modding:Modder Guide/Game Fundamentals#Tiles|tile coordinate]] + terrain feature pairs removed since the last update tick.
 
}}
 
}}
 
|}
 
|}
translators
8,441

edits

Navigation menu