Coming soon toSteam
Modding docsAPI 1

Module · Scripting core

content

Content definitions: things this mod adds to the game (blocks, maps, effects …). Usually declared as JSON files in mod.json; content.register does the same from a script.

content.get(type: string, fullId: string): table?

The definition data for a full id, or nil.

content.list(type: string): string[]

Full ids of every definition of a type, from every mod.

content.register(type: string, definition: any): string

Registers a definition and returns its full id ("your.mod-id:local-id").

local id = content.register("blocks", { id = "heavy-cube", name = "Heavy Cube", base = "Cube", mass = 40 })

content.types(): string[]

The content types this game accepts.