Experimental

An early preview: docs, the API and the dashboard may change or break.

Report a problem
Module

@std/crops

Crops that grow on the wall clock, woken once per stage boundary and redrawn as blocks.

local crops = require("@std/crops")

Functions

crops.bed<P>(options: crops.BedOptions<P>) -> crops.Bed<P>
#
crops.boost(plant: crops.Plant, crop: crops.Crop, seconds: number, now: number?) -> boolean
#
crops.fold(growth: crops.Growth, now: number?)
#
crops.new(rate: number, now: number?) -> crops.Growth
#
crops.pick(plant: crops.Plant, crop: crops.Crop, now: number?) -> crops.Picked?
#
crops.progress(plant: crops.Plant, crop: crops.Crop, now: number?) -> number
#
crops.ripe(plant: crops.Plant, crop: crops.Crop, now: number?) -> boolean
#
crops.ripen(plant: crops.Plant, crop: crops.Crop, now: number?) -> boolean
#
crops.secondsLeft(plant: crops.Plant, crop: crops.Crop, now: number?) -> number
#
crops.setRate(growth: crops.Growth, rate: number, now: number?)
#
crops.stage(plant: crops.Plant, crop: crops.Crop, now: number?) -> number
#
crops.target(plant: crops.Plant, crop: crops.Crop) -> number
#
crops.untilNextStage(plant: crops.Plant, crop: crops.Crop, now: number?) -> number?
#
crops.value(growth: crops.Growth, now: number?) -> number
#

Types