Log inGet started
Package

applicable.interface

Newest version

This package holds more than this page lists. See all of its files in its world.

README.md

contract

The shared half of applicable. Every call of apply, setEnabled and drop on an asset whose type implements the interface passes through gate, which checks the owner, the values against asset.schema, and opts.enabled; keeps one record per application (the values the owner stated and whether it is on); calls the type with the asset's own values and what the owner stated laid over them; and checks the returned ApplyState (status, heldBy, notice).

local Apply = require("@builtin::interfaces.applicable.contract")
Apply.values(self, owner)   -- the values the application receives
Apply.stated(self, owner)   -- what the owner stated, sparse
Apply.restate(guid?)        -- apply the records again

After an edit/play flip, a render-device rebuild and an edit of an applied asset, the contract applies every record of the asset again, and each type puts back what of its effect is gone.