Move world generation outside the engine and into mods and data files
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
// the base game's features, on top of the engine's terrain. runs in chunk workers and must give the same world every
|
||||
// time: only chunk.rng and the noise helpers, never Math.random or the time
|
||||
// the base game's features, on top of the terrain (which is data, worldgen/). runs on the server and must give the
|
||||
// same world every time: only chunk.rng, chunk.random and the noise helpers, never Math.random or the time
|
||||
import type { FeatureChunk, WorldgenContext } from "bworld/worldgen";
|
||||
import { register_trees } from "./trees.ts";
|
||||
|
||||
export function setup(gen: WorldgenContext) {
|
||||
// trees grow in vegetal_decoration, before the cactus looks for air in the last step
|
||||
register_trees(gen);
|
||||
gen.register_feature("bworld:cactus", cactus);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user