ThemModdingHerds.TFHRES
1.4.0
dotnet add package ThemModdingHerds.TFHRES --version 1.4.0
NuGet\Install-Package ThemModdingHerds.TFHRES -Version 1.4.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ThemModdingHerds.TFHRES" Version="1.4.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ThemModdingHerds.TFHRES --version 1.4.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ThemModdingHerds.TFHRES, 1.4.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ThemModdingHerds.TFHRES as a Cake Addin #addin nuget:?package=ThemModdingHerds.TFHRES&version=1.4.0 // Install ThemModdingHerds.TFHRES as a Cake Tool #tool nuget:?package=ThemModdingHerds.TFHRES&version=1.4.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Them's Fightin' Herds Resource reader/writer
A library for reading/writing .tfhres
files from Them's Fightin' Herds
Usage
Getting items
using ThemModdingHerds.Resource;
using ThemModdingHerds.Resource.Data;
Database database = Database.Open(pathToTfhresFile);
// get all CachedImage records
List<CachedImage> images = database.ReadCachedImage();
// read the 20th CachedImage (might return null if the item does not exist)
CacheImage? image = database.ReadCachedImage(20);
Updating items
using ThemModdingHerds.Resource;
using ThemModdingHerds.Resource.Data;
Database database = Database.Open(pathToTfhresFile);
// imagine we got this CachedImage "image" from "database.ReadCachedImage(long)" and it's not null
image.Height = 100; // Change property
database.Update(image); // update one item
database.Update(images); // update a list of items (images is a IEnumable)
database.Upsert(image); // updates if item with same id exists otherwise adds the item
Adding new item(s)
using ThemModdingHerds.Resource;
using ThemModdingHerds.Resource.Data;
Database database = Database.Open(pathToTfhresFile);
// the HiberliteId property isn't required
CachedTextfile textfile = new()
{
Shortname = "deez nuts",
SourceFile = "very/cool/path",
TextData = Encoding.UTF8.GetBytes("hah, gottem")
};
// add item to databse. this also be a list of the same item type
database.Insert(textfile);
Merge Databases
Database result = database.Merge(otherDatabase); // keep in mind it returns a new database, it does not modify the variable
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Microsoft.Data.Sqlite (>= 8.0.10)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
1.4.0 | 241 | 11/10/2024 | |
1.3.6 | 67 | 11/9/2024 | |
1.3.5 | 80 | 11/9/2024 | |
1.3.4 | 82 | 11/9/2024 | |
1.3.3 | 82 | 11/9/2024 | |
1.3.2 | 72 | 11/9/2024 | |
1.3.1 | 78 | 11/9/2024 | |
1.3.0 | 87 | 11/5/2024 | |
1.2.0 | 150 | 2/12/2024 | |
1.1.1 | 163 | 12/25/2023 | |
1.1.0 | 150 | 12/25/2023 | |
1.0.2 | 139 | 12/23/2023 | |
1.0.1 | 146 | 12/22/2023 | |
1.0.0 | 138 | 12/22/2023 |