Changes

Line 383: Line 383:  
:: Edit or replace part of the map. This is basically a copy & paste operation, so the source map is applied over the loaded map. For example:
 
:: Edit or replace part of the map. This is basically a copy & paste operation, so the source map is applied over the loaded map. For example:
 
:: <syntaxhighlight lang="C#">
 
:: <syntaxhighlight lang="C#">
public void Edit<T>(IAssetData asset)
+
e.Edit(asset =>
 
{
 
{
 
   var editor = asset.AsMap();
 
   var editor = asset.AsMap();
Line 389: Line 389:  
   Map sourceMap = this.Helper.ModContent.Load<Map>("custom-map.tmx");
 
   Map sourceMap = this.Helper.ModContent.Load<Map>("custom-map.tmx");
 
   editor.PatchMap(sourceMap, targetArea: new Rectangle(30, 10, 20, 20));
 
   editor.PatchMap(sourceMap, targetArea: new Rectangle(30, 10, 20, 20));
}
+
});
 
</syntaxhighlight>
 
</syntaxhighlight>
  
528

edits