Log inGet started
Package

holds.module

Newest version

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

README.md

renderer.holds

The reads every renderer cell a hold pins answers the same way. A hold on a cell such as renderer.temporal (the per-frame clock) or renderer.atmospherics (the share of the air that reaches the image) names who took it and the key it was taken under, so a caller reads who holds the cell, an exclusive hold is refused for every other key, and a hold whose task ended is handed back.

  • statedOwner(options) answers the key options.owner states, or nil.
  • actor() answers the id and display name of the caller the call is attributed to.
  • ownerLabel(owner, ownerName) answers how a refusal names the holder.
  • holderIsGone(holder) answers whether the task that took a hold was cancelled or died; holdingTask() answers the task taking a hold now.
local Holds = require("modules.api.engine.renderer.holds")
assert(Holds.statedOwner({ owner = "shot" }) == "shot")
assert(Holds.ownerLabel("abc", "Ada") == "Ada (abc)")
assert(Holds.holderIsGone(nil) == false)