Skip to content

Provider

Bankokwak edited this page May 23, 2025 · 2 revisions

Provider is a base class. To add your Provider you need to create a class who need to inherits Provider

  • Create a new class

this is a example of a provider class (with needed override):

    public class Test : Provider
    {
        public override string CategoryName { get; set; } = "Test";

        public override List<DummyAction> AddAction(ReferenceHub hub)
        {
            return new List<DummyAction>()
            {
                new DummyAction("Name button", () =>
                {
                    //Action
                })
            };
        }
        public override bool IsDirty { get; } = true or false;
    }

IsDirty set to true update name and category after click on action. See that.

If you name the action U-{name}, he can perform only 1 time even you multiselect.

And if you want a category for only a group of player you need to return a list of player with overridie TargetPlayer.

    public override List<Player> TargetPlayer()
    {
        return new List<Player>();
    }

Table of content

Development

Clone this wiki locally