Изменения

м
Замена текста — «(e.g. » на «(''e.g.,'' »
Строка 355: Строка 355:  
==Advanced==
 
==Advanced==
 
===Compare asset names===
 
===Compare asset names===
You can't compare asset names directly because they depend on the current OS (e.g. <samp>Characters/Abigail</samp> versus <samp>Characters\Abigail</samp>) and they're case-insensitive (e.g. <samp>Characters/ABIGAIL</samp>).
+
You can't compare asset names directly because they depend on the current OS (''e.g.,'' <samp>Characters/Abigail</samp> versus <samp>Characters\Abigail</samp>) and they're case-insensitive (''e.g.,'' <samp>Characters/ABIGAIL</samp>).
   −
To check for an exact match when you have an <samp>IAssetData</samp> instance (e.g. from the content API), just call <code>asset.AssetNameEquals("Characters/Abigail")</code> and SMAPI will normalize the asset names internally.
+
To check for an exact match when you have an <samp>IAssetData</samp> instance (''e.g.,'' from the content API), just call <code>asset.AssetNameEquals("Characters/Abigail")</code> and SMAPI will normalize the asset names internally.
    
If you need to check manually, you should normalize the asset names using [[Modding:Modder Guide/APIs/Utilities#File paths|<samp>PathUtilities</samp>]] and compare case-insensitively. For example:
 
If you need to check manually, you should normalize the asset names using [[Modding:Modder Guide/APIs/Utilities#File paths|<samp>PathUtilities</samp>]] and compare case-insensitively. For example:
Строка 398: Строка 398:     
===Patch helper for custom assets===
 
===Patch helper for custom assets===
A patch helper provides utility methods for editing a given asset (e.g. to merge maps or resize an image).
+
A patch helper provides utility methods for editing a given asset (''e.g.,'' to merge maps or resize an image).
    
You can get a patch helper for arbitrary data. For example, this loads two map files and merges them:
 
You can get a patch helper for arbitrary data. For example, this loads two map files and merges them: