Ven0maus / SOD.Common

A common library for shadows of doubt modding.
MIT License
4 stars 4 forks source link

[FEATURE] Add DDS strings helper #19

Closed Ven0maus closed 8 months ago

Ven0maus commented 8 months ago

Introduction Most visual data in game requires the text to be within the games DDS strings. This can be somewhat troublesome for a helper library that does most the work for you. Its expected than when for example you add a sync disk with name X into the game, it shows up as such and that the modder does not have to manually add the DDS files.

As a first start, I'd like to add DdsStrings helper to add these entries. Then mods can use this, and the common lib can also further use these for implementations of other helpers.

Description of the feature A method that can easily and straightforward insert/update/delete a key in a specific dictionary.

Feature usage

// Methods
Lib.DdsStrings.AddOrUpdate("evidence.syncdisks", "syncdisk_policeman", "Police officer");
Lib.DdsStrings.Delete("evidence.syncdisks", "syncdisk_policeman");

// Indexers
Lib.DdsStrings["evidence.syncdisks", "syncdisk_policeman"] = "Police offer";
Lib.DdsStrings["evidence.syncdisks", "syncdisk_policeman"] = null;

Dependencies and Prerequisites No

Implementation details As a helper class within the Lib class

Ven0maus commented 8 months ago

Implemented in 1.1.5