Releases: decaprime/VampireCommandFramework
v0.9.0
v0.8.4
v0.8.3
v0.8.2
Enhanced .help
with IConverterUsage
Now custom converters can implement IConverterUsage
like:
// Example of matching horses in LeadAHorseToWater
public record Horse(Entity Entity);
public class NamedHorseConverter : CommandArgumentConverter<Horse, ChatCommandContext>, IConverterUsage
{
// New:
public string Usage => $"Closest horse in {RADIUS} unit radius, first matching name if provided."
const int RADIUS =25;
...
}
public Enum HorseType {Special, Regular}
Enums and Usage in .help
Now for commands that have a Horse
argument, invoking their individual help will list the possible values of Enum i.e.
[Command("example")]
void UpdateType(ChatCommandContext ctx, Horse closest=null, HorseType type = HorseType.Regular) => ...
When running .help example
included in the response will be
Horse: Closest horse in 25 unit radius, first matching name if provided.
HorseType: Special, Regular
Enums should parse strictly
Fixed decaprime/CommunityCommands/issues/12 via framework change. This is a great bug to be reported, thank you @robotomist . The expectation is that VampireCommandFramework should handle argument matching and parsing, in this case the built in converter for Enums was letting in values that weren't valid as expected in the commands and so was fixed by #17.
What's Changed
- Enhance parameter help by @decaprime in #18
- 🐛 Resolve #16 by adding defined check for EnumConverter by @decaprime in #17
Full Changelog: v0.8.0...v0.8.2
v0.8.1
v0.8.0
Automatic pre-release of 0.8.0 for 47368fa
This is compatible with Gloomrot and BepInEx RC4 (1.668.4) . It should function similarly to 0.5.3, however this build removes hot reload, so if you were using VCF-Reloadable-Debugging
, you should consider using BloodstonePlugins and that hot reload mechanism instead now.
nuget
dotnet add package VRising.VampireCommandFramework --version 0.8.0
https://www.nuget.org/packages/VRising.VampireCommandFramework/0.8.0