Log inGet started
Package

spots.module

README.md

spots

Every kind of hiding spot, as plain data. A HidingSpot's kind picks one entry; changing that one field turns a barrel into a haystack and everything follows: model, prompt, motion, sound, peek exposure, capacity, body room and how long a guard takes to check it.

Thirteen built-in kinds: barrel, crates, haystack, strawBales, reeds, wardrobe, crawlSpace, well, curtain, hayCart, foldingScreen, log, bush, plus aliases (closet, porch, shrub, byobu, ...).

local Spots = require("concealKit.spots")   -- also Hide.spots
Spots.get("barrel")          -- the resolved entry (a copy): defaults, then its base chain, then itself
Spots.kinds()                -- every kind, in catalogue order
Spots.find({ tag = "forest" })   -- also { bodies = true }, { motion = "crawl" }
Spots.define("coffin", { base = "wardrobe", label = "Coffin", verb = "Lie in" })
Spots.tune("bush", { peekExposure = 0.2 })

Also exists(name), aliases(), canonical(name) and DEFAULTS. Entry fields: label, verb, exitVerb, motion (climb, crawl, slip, burrow, step), model, height, footprint, hidePoint, standPoint, capacity, bodies, peekExposure, checkTime, sound, fx, view, surface, collide, tags. Used by HidingSpot, StealthPlayer, the guard brain and Hide.spot. Define and tune on every peer.