Changes

→‎Read assets: + map example
Line 406: Line 406:  
</source></li>
 
</source></li>
   −
<li>Read a custom tilesheet for a map from your mod folder:
+
<li>Read a map from your mod folder (will automatically fix tilesheet references):
 +
<source lang="c#">
 +
Map map = helper.Content.Load<Map>(@"assets\map.tbin", ContentSource.ModFolder);
 +
</source></li>
 +
 
 +
<li>Read a new tilesheet for a map from your mod folder:
 
<source lang="c#">
 
<source lang="c#">
 
tilesheet.ImageSource = helper.Content.GetActualAssetKey(@"assets\tilesheet.png", ContentSource.ModFolder);
 
tilesheet.ImageSource = helper.Content.GetActualAssetKey(@"assets\tilesheet.png", ContentSource.ModFolder);
 
</source></li>
 
</source></li>
   −
<li>Read an asset from game's content folder:
+
<li>Read an asset from the game's content folder:
 
<source lang="c#">
 
<source lang="c#">
 
var data = helper.Content.Load<Dictionary<int, string>>(@"Data\ObjectInformation.xnb", ContentSource.GameContent);
 
var data = helper.Content.Load<Dictionary<int, string>>(@"Data\ObjectInformation.xnb", ContentSource.GameContent);
translators
8,404

edits