diff --git a/docfx/docs/TruckLib.ScsMap/map-class.md b/docfx/docs/TruckLib.ScsMap/map-class.md index ef30641..107697b 100644 --- a/docfx/docs/TruckLib.ScsMap/map-class.md +++ b/docfx/docs/TruckLib.ScsMap/map-class.md @@ -23,6 +23,17 @@ Map map = Map.Open(@"E:\SteamLibrary\steamapps\common\Euro Truck Simulator 2\ext If you would like to load specific sectors only, use the optional `sectors` parameter. It expects a list or array of [sector coordinates](xref:TruckLib.ScsMap.SectorCoordinate). +There is an additional overload which allows loading a map directly from a .scs file using a +[`IHashFsReader`](~/docs/TruckLib.HashFs/hashfs.md): + +```cs +using TruckLib.HashFs; +using TruckLib.ScsMap; + +IHashFsReader reader = HashFsReader.Open("base_map.scs"); +Map map = Map.Open("/map/europe.mbd", reader); +``` + ## Saving a map To save a map, call the [`Save`](xref:TruckLib.ScsMap.Map.Save*) method of the map object. The map will be written to the specified directory. diff --git a/docfx/docs/TruckLib.Sii/sii.md b/docfx/docs/TruckLib.Sii/sii.md index e1223df..4882928 100644 --- a/docfx/docs/TruckLib.Sii/sii.md +++ b/docfx/docs/TruckLib.Sii/sii.md @@ -23,7 +23,18 @@ of the included files are relative to. (`Open` resolves this automatically.) SiiFile sii = SiiFile.Load(siiStr, "/path/where/included/files/are/located"); ``` -If an included file does not exist, `FileNotFoundException` is thrown. +If an included file does not exist, `FileNotFoundException` is thrown unless the `ignoreMissingIncludes` parameter is set to true. + +There are additional overloads which allow loading a .sii file directly from a .scs file using a +[`IHashFsReader`](~/docs/TruckLib.HashFs/hashfs.md): + +```cs +using TruckLib.HashFs; +using TruckLib.Sii; + +IHashFsReader reader = HashFsReader.Open("def.scs"); +SiiFile sii = SiiFile.Open("/def/country.sii", reader); +``` ### Data types * Numbers which have a decimal component are parsed to `float`; numbers without will be the smallest of