Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
peterhaneve committed Apr 30, 2023
1 parent 2af635a commit 69b21a7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Binary file added Docs/modoptions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions PLib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion PLibCore/PVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ public static class PVersion {
/// <summary>
/// The PLib version.
/// </summary>
public const string VERSION = "4.12.2.0";
public const string VERSION = "4.13.0.0";
}
}

0 comments on commit 69b21a7

Please sign in to comment.