Skip to content
This repository has been archived by the owner on Sep 11, 2023. It is now read-only.

Ruleset API

João Cardoso edited this page Mar 22, 2017 · 9 revisions

Registering Rulesets

Addon.Rules:New(id, name, icon, func)

Accessing Rulesets

Addon.Rules:Get(id)

{
  id = 'myrule',
  name = 'My Ruleset',
  icon = 'banana.tga',
  func = 
  children = {
     {
        id = 'myrule/subset',
        name = 'My Subset',
        icon = 'apple.tga',
        func = ,
        children = {}
     }
  }
}

Addon.Rules:Iterate()

Returns an iterator over all registered rules. In our example case, this would include both My Ruleset and My Subset.

Addon.Rules:IterateParents()

Returns an iterator over all registered rules at the top level of the hierarchy. In our example case, this would include only My Ruleset.

Wildpants 👖

For Users
FAQ
Existing Plugins
Search Syntax

For Developers
Ruleset API
Custom Events
Sorting Items

Clone this wiki locally