Skip to content

Commit

Permalink
Warn of biome ID re-allocation when unregistering or clearing biomes (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
paramat authored Feb 3, 2020
1 parent 4eb3baa commit b14aa1c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions doc/lua_api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4098,6 +4098,9 @@ Call these functions only at load time!
* `minetest.unregister_biome(name)`
* Unregisters the biome from the engine, and deletes the entry with key
`name` from `minetest.registered_biomes`.
* Warning: This alters the biome to biome ID correspondences, so any
decorations or ores using the 'biomes' field must afterwards be cleared
and re-registered.
* `minetest.register_decoration(decoration definition)`
* Returns an integer object handle uniquely identifying the registered
decoration on success. To get the decoration ID, use
Expand All @@ -4112,12 +4115,15 @@ Call these functions only at load time!
* If the function is called when loading the mod, and `name` is a relative
path, then the current mod path will be prepended to the schematic
filename.
* `minetest.clear_registered_ores()`
* Clears all ores currently registered.
* `minetest.clear_registered_biomes()`
* Clears all biomes currently registered.
* Warning: Clearing and re-registering biomes alters the biome to biome ID
correspondences, so any decorations or ores using the 'biomes' field must
afterwards be cleared and re-registered.
* `minetest.clear_registered_decorations()`
* Clears all decorations currently registered.
* `minetest.clear_registered_ores()`
* Clears all ores currently registered.
* `minetest.clear_registered_schematics()`
* Clears all schematics currently registered.

Expand Down

0 comments on commit b14aa1c

Please sign in to comment.