Move world generation outside the engine and into mods and data files
This commit is contained in:
@@ -10,7 +10,6 @@ import {
|
||||
literal,
|
||||
word,
|
||||
} from "$/common/commands.ts";
|
||||
import { estimate_biome } from "$/common/worldgen/overworld.ts";
|
||||
import { test_game } from "./helpers.ts";
|
||||
|
||||
interface Source {
|
||||
@@ -172,6 +171,6 @@ Deno.test("/locatebiome says where the nearest biome of a kind is", async () =>
|
||||
|
||||
const answer = say("/locatebiome bworld:plains");
|
||||
const [x, , z] = answer.match(/at (-?\d+) (-?\d+) (-?\d+)/)!.slice(1).map(Number);
|
||||
assertEquals(estimate_biome(game.world.seed, x, z).biome, "bworld:plains");
|
||||
assertEquals(game.world.estimate_biome(x, z).biome, "bworld:plains");
|
||||
assert(say("/locatebiome bworld:nowhere").includes("There's no biome bworld:nowhere"));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user