Log inGet started
World

Snowline Pass: Alpine Mountains and Pine Forest to Walk, with a Mountain Builder

README.md

AlpineProps

The alpineProps registry: every alpine kind (58 of them: conifers, dead trees, shrubs, grasses, flowers, rocks, cliffs, huts and trail props) is registered here, and through it also in forestProps' Props, so forestKit's ForestRender draws and collides alpine props the same way it does forest ones. The AlpineProp, Cabin, Signpost and PropGallery components and the catalogs call it, and game code calls it to list kinds or get draws.

local AP = require("alpineProps.AlpineProps")
for _, k in AP.kinds() do print(k, AP.info(k).category) end
local parts = AP.parts("spruce", { age = "veteran", season = "summer", snow = true, lod = 0 })  -- { { mesh, material, part } }
  • AP.kinds() lists every kind in registration order; AP.kindsOf(category) those of one category (tree, deadtree, log, bush, grass, flower, rock, cliff, structure).
  • AP.info(kind) returns the catalog entry: category, variants, radius, height, collider, surface, and for trees ages and byAge.
  • AP.parts(kind, opts) returns the draws. Opts are age, season, look, variant, lod (0-2), seed and snow; snow defaults to season == "winter", and age = "old" reads as "veteran".
  • AP.normalize(kind, opts) returns forestProps-normalised opts plus snow. AP.register(entry, partsFn) adds or replaces a kind, which is how the catalogs (ConiferCatalog, FloraCatalog, RockCatalog, StructureCatalog) plug in; they load on first use.
  • AP.AGES, AP.SEASONS and AP.LOOKS hold the accepted values.