ThemModdingHerds.TFHRES
1.3.1
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package ThemModdingHerds.TFHRES --version 1.3.1
NuGet\Install-Package ThemModdingHerds.TFHRES -Version 1.3.1
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.3.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ThemModdingHerds.TFHRES --version 1.3.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ThemModdingHerds.TFHRES, 1.3.1"
#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.3.1 // Install ThemModdingHerds.TFHRES as a Cake Tool #tool nuget:?package=ThemModdingHerds.TFHRES&version=1.3.1
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 | 257 | 11/10/2024 | |
1.3.6 | 81 | 11/9/2024 | |
1.3.5 | 94 | 11/9/2024 | |
1.3.4 | 95 | 11/9/2024 | |
1.3.3 | 95 | 11/9/2024 | |
1.3.2 | 85 | 11/9/2024 | |
1.3.1 | 89 | 11/9/2024 | |
1.3.0 | 101 | 11/5/2024 | |
1.2.0 | 161 | 2/12/2024 | |
1.1.1 | 174 | 12/25/2023 | |
1.1.0 | 155 | 12/25/2023 | |
1.0.2 | 150 | 12/23/2023 | |
1.0.1 | 157 | 12/22/2023 | |
1.0.0 | 143 | 12/22/2023 |