diff --git a/Docs/modoptions.png b/Docs/modoptions.png new file mode 100644 index 00000000..6d76140c Binary files /dev/null and b/Docs/modoptions.png differ diff --git a/PLib/README.md b/PLib/README.md index 981bdedc..1c66842d 100644 --- a/PLib/README.md +++ b/PLib/README.md @@ -112,6 +112,7 @@ If a property is of a user-defined type, PLib will check the public properties o If a valid localization string key name is used for `displaytext` (such as `STRINGS.YOURMOD.OPTIONS.YOUROPTION`), the localized value of that string from the strings database is used as the display text. To support types not in the predefined list, the `[DynamicOption(Type)]` attribute can be added to specify the type of an `IOptionsEntry` handler class that can display the specified type. +If the type used as the handler has a constructor with the same signature as one of the predefined options entry classes, the arguments matching those parameters will be passed to it. #### Categories @@ -169,7 +170,7 @@ public sealed class ModLoad : KMod.UserMod2 This is how it looks in the mod menu: -![mod menu example screenshot](https://i.imgur.com/1S1i9ru.png) +![mod menu example screenshot](https://github.com/peterhaneve/ONIMods/raw/PLib4.13/Docs/modoptions.png) ## Actions @@ -185,7 +186,8 @@ If multiple mods register the same action identifier, only the first will receiv The returned `PAction` object has a `GetKAction` method which can be used to retrieve an `Action` that works in standard Klei functions. The `PKeyBinding` is used to specify the default key binding. -Note that the game can change the values in the `Action` enum. Instead of using the built-in `Action.NumActions` to denote "no action", consider using `PAction.MaxAction` instead which will use the correct value at runtime if necessary. +Note that the game can change the values in the `Action` enum. +Instead of using the built-in `Action.NumActions` to denote "no action", consider using `PAction.MaxAction` instead which will use the correct value at runtime if necessary. ## Lighting diff --git a/PLibCore/PVersion.cs b/PLibCore/PVersion.cs index 4dbda642..5f2a0098 100644 --- a/PLibCore/PVersion.cs +++ b/PLibCore/PVersion.cs @@ -25,6 +25,6 @@ public static class PVersion { /// /// The PLib version. /// - public const string VERSION = "4.12.2.0"; + public const string VERSION = "4.13.0.0"; } }