AGPLv3 license

This commit is contained in:
2026-10-12 15:09:22 -03:00
parent c1dd0e62a8
commit 48c6f0ec1d
263 changed files with 1446 additions and 0 deletions
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// artifacts: items worn in curios slots that change the wearer's attributes, see mods/artifacts
import { assertEquals } from "@std/assert";
import { ATTRIBUTES } from "$/server/game/entity/attributes.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// the base game's block and item behavior: hoeing, chests, furnaces, crops and the watering can
import { assert, assertEquals } from "@std/assert";
import { BlockRegistry, EverythingRegistry, ItemRegistry } from "$/common/everything_registry.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// biomes are data, worldgen/biomes/<name>.json in a mod. see common/worldgen/biomes.ts
import { assert, assertEquals } from "@std/assert";
import { CYCLE_TICKS } from "$/common/time.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
import { assert, assertEquals } from "@std/assert";
import { bake_model, block_variant, BUILTIN_MODELS, type ModelJson, resolve_texture } from "$/common/block_models.ts";
import { block_from_json } from "$/common/mod_data.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// what a client guesses about blocks waits for the server's block_ack before the server's word replaces it, like
// minecraft's BlockStatePredictionHandler, so clicking fast doesn't flicker. see client/level/block_predictions.ts
import { assertEquals } from "@std/assert";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
import { assert, assertAlmostEquals, assertEquals } from "@std/assert";
import { BUILTIN_MODELS, type ModelJson } from "$/common/block_models.ts";
import {
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// .bmod files: packing mods, reading them back, and the server loading a folder of them
import { assert, assertEquals, assertRejects, assertStringIncludes, assertThrows } from "@std/assert";
import { zipSync } from "fflate";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// a game with a worldgen pool, and ticking it like a client loads chunks, for tests/chunk_loading_test.ts and
// tools/chunk_loading_bench.ts
import { type WorkerPort, WorldgenPool } from "$/server/game/worldgen_pool.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// with a worldgen pool, chunks players are sent are generated in its workers: a player that teleports somewhere new
// gets every chunk around them, the same as the game would make them, without the game generating them itself. see
// GameServer.use_worldgen_pool
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// the server sends the world in whole chunks, like minecraft java: nearest first, in batches the client paces, and
// only to players who can see them
import { assert, assertEquals } from "@std/assert";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
import { assertEquals } from "@std/assert";
import { join } from "@std/path";
import { CLIENT_MANIFEST, client_manifest, sha256, update_client } from "$/desktop/client_updates.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
import { assert, assertEquals, assertThrows } from "@std/assert";
import {
argument,
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// farmer's delight's cooking pot: cooks its recipes over a lit furnace, and serves meals into bowls
import { assert, assertEquals } from "@std/assert";
import { ItemStack } from "$/common/inventory.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// the crab pot: a block with a model converted from fishermen's trap's fish trap
import { assert, assertEquals } from "@std/assert";
import { type BlockRegistry, EverythingRegistry } from "$/common/everything_registry.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// curios: accessory slots for items in the curios tags, next to the player's inventory, see
// mods/bworld/scripts/curios.ts
import { assert, assertEquals } from "@std/assert";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// farmer's delight's cutting board: holds a stack of anything, shows it on top, and a knife cuts it one at a time
import { assert, assertEquals } from "@std/assert";
import { get_state_value } from "$/common/utils.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// doors: two blocks tall, facing the way the player looks, opened from either half, broken as one
import { assertEquals } from "@std/assert";
import { Container, ItemStack } from "$/common/inventory.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// engine access: mods importing bworld/engine and hooking the engine's methods. see docs/modding/misc/engine.md
import { assert, assertEquals, assertStringIncludes, assertThrows } from "@std/assert";
import { clear_hooks, expose_engine, hook, loading_mod } from "$/common/hooks.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// entities are lit from the light the chunk worker sends back with each mesh, one byte per block: block << 4 | sky
import { assertEquals } from "@std/assert";
import { BlockRegistry, EverythingRegistry } from "$/common/everything_registry.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
import { assert, assertAlmostEquals, assertEquals } from "@std/assert";
import { ItemStack } from "$/common/inventory.ts";
import { Attribute, ATTRIBUTES } from "$/server/game/entity/attributes.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// farming: crops grow one stage every morning at 06:00 if their farmland was watered the day before, like stardew
// valley, with minecraft's rules for where crops stand and what they drop
import { assert, assertEquals } from "@std/assert";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// features are code or data, and use each other: data features with types and modifiers scripts register, scripts
// placing data features. they run by step, then mod, data before code. see docs/modding/worldgen/index.md
import { assert, assertEquals, assertRejects } from "@std/assert";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
import { assert, assertEquals } from "@std/assert";
import { Container, ItemStack } from "$/common/inventory.ts";
import { CRAFTING_RESULT_SLOT } from "$/common/protocol.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// fishing: throw the hook into water, wait for a bite, reel it in before it gets away
import { assert, assertAlmostEquals, assertEquals } from "@std/assert";
import { EverythingRegistry, ItemRegistry } from "$/common/everything_registry.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
import { assert, assertEquals } from "@std/assert";
import { GameLoop, LoopClock } from "$/server/game/game_loop.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// the golden fixture's hashes, shared by the tests that check generation against it: worldgen_golden_test.ts,
// worldgen_bundle_test.ts and worldgen_pool_test.ts. hashed by name, since numeric ids move whenever a block is added
import { AIR, ID_MASK } from "$/common/constants.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// the player in the inventory turns to look at the mouse
import { assert, assertEquals } from "@std/assert";
import { gui_player_faces, gui_player_pose } from "$/client/rendering/gui_player.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
import { assert, assertEquals } from "@std/assert";
import { PROTOCOL_VERSION } from "$/common/protocol.ts";
import { TICKS_PER_SECOND } from "$/common/constants.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
import { resolve, toFileUrl } from "@std/path";
import { EverythingRegistry } from "$/common/everything_registry.ts";
import { load_and_check, load_order } from "$/tools/check_mods.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
import { assert, assertEquals } from "@std/assert";
import { CRAFTING_RESULT_SLOT, PLAYER_MENU_CRAFTING } from "$/common/protocol.ts";
import { ItemStack } from "$/common/inventory.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// dropped items are drawn 3d like minecraft's: the sprite front and back, and a side face on every exposed pixel edge
import { assert, assertEquals } from "@std/assert";
import { extrude_item, type ItemQuad } from "$/client/rendering/item_model.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// liquids flowing on the server, like minecraft's water: out from a source, down past edges, and draining away
import { assert, assertEquals } from "@std/assert";
import { type BlockRegistry, EverythingRegistry } from "$/common/everything_registry.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// which way liquid flows and how it pushes what's in it, like minecraft's FlowingFluid.getFlow
import { assert, assertAlmostEquals, assertEquals } from "@std/assert";
import { type Body, liquid_flow, type LiquidInCell, push_by_liquid } from "$/common/physics.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// liquids: blocks with "liquid", drawn like luanti's with surfaces that slope down to where they flow
import { assert, assertAlmostEquals, assertEquals } from "@std/assert";
import {
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
import { assert, assertAlmostEquals, assertEquals, assertFalse } from "@std/assert";
import { LocalPlayer } from "$/client/entity/local_player.ts";
import { InputManager } from "$/client/input_manager.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// loot tables: rolling them, checking them, and the game using them for blocks, mobs and scripts
import { assert, assertEquals, assertThrows } from "@std/assert";
import { EverythingRegistry, type ItemRegistry } from "$/common/everything_registry.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// mobs mods define in entities/<name>.json, drawn with a bedrock model from models/<name>.geo.json
import { assert, assertEquals, assertStringIncludes } from "@std/assert";
import { entity_model_from_geo, validate_entity } from "$/common/mod_data.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
import { assert, assertEquals } from "@std/assert";
import { AIR, CHUNK_HEIGHT } from "$/common/constants.ts";
import { BlockRegistry, EverythingRegistry, ItemRegistry } from "$/common/everything_registry.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
import { assert, assertEquals, assertThrows } from "@std/assert";
import { check_mods } from "$/tools/check_mods.ts";
import { MAX_TEXTURE_SIZE } from "$/common/constants.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// "monster" entities go after players and whoever hurts them, like undergarden's rotwalker, see mods/undergarden
import { assert, assertEquals } from "@std/assert";
import { create_entity } from "$/server/game/entity/entity_types.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// monsters spawning on their own in the dark near players, like undergarden's rotwalkers, see natural_spawner.ts and
// mods/undergarden/worldgen/spawns.json
import { assert, assertEquals } from "@std/assert";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
import { assert, assertAlmostEquals, assertEquals } from "@std/assert";
import { eyes_in_water, in_water, move_body } from "$/common/physics.ts";
import { type BlockRegistry, is_liquid_block, LIQUID_DEFAULTS } from "$/common/everything_registry.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// the recipe viewer mod reads every mod's recipes, its own types included
import { assert, assertEquals } from "@std/assert";
import { category_name } from "../mods/recipe_viewer/scripts/categories.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// blocks, entities, players and the world tell scripts their biome's season, see docs/modding/worldgen/biomes.md
import { assertEquals } from "@std/assert";
import type { ServerContext } from "$/common/mod_api/server.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
import { assertEquals, assertThrows } from "@std/assert";
import { server_address } from "$/client/handshake.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
import { assert, assertEquals } from "@std/assert";
import { copy_dir, menu_data, menu_items, opened_menu, sent_block, test_game } from "./helpers.ts";
import type { WorldSave } from "$/server/game/saves.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// shared scripts' block rules run on clients too, so what a client shows the moment it places, breaks or right clicks
// a block is what the server ends up with
import { assertEquals } from "@std/assert";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// shift clicking a slot moves its stack to the other part of the screen, like minecraft's quick move
import { assertEquals } from "@std/assert";
import { CRAFTING_RESULT_SLOT, PLAYER_MENU_CRAFTING } from "$/common/protocol.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
import { assertEquals } from "@std/assert";
import { encode_skin } from "$/server/game/skins.ts";
import { PROTOCOL_VERSION } from "$/common/protocol.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// swimming as the server sees it: each player's client says when they're swimming, which gives them the short box
// and low eyes, and tells everyone else. how they swim is the client's, see local_player_test.ts
import { assert, assertAlmostEquals, assertEquals, assertNotEquals } from "@std/assert";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// tags: lists of blocks, items, entities or biomes that every mod can add to, see docs/modding/resources/tags.md
import { assert, assertEquals, assertThrows } from "@std/assert";
import { Container, ItemStack } from "$/common/inventory.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// the renderer skips chunks outside the view and faces pointing away from the camera, but must never skip one it
// would have shown
import { assert, assertEquals } from "@std/assert";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// the terrain is data: noises, density functions, noise settings and biome sources in mods' worldgen folders, see
// docs/modding/worldgen/terrain.md. tests/worldgen_golden_test.ts checks the base game's makes the same world
import { assert, assertEquals, assertRejects } from "@std/assert";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
import { assertEquals } from "@std/assert";
import { TextInput } from "$/client/gui/widgets.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// animated textures: textures/<name>.json, carrying it through .bmod files, and playing it a tick at a time
import { assertEquals, assertThrows } from "@std/assert";
import { zipSync } from "fflate";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
import { assert, assertEquals } from "@std/assert";
import { clock, CYCLE_TICKS, DAY_TICKS, daylight, format_clock, is_day, NIGHT_TICKS } from "$/common/time.ts";
import { test_game } from "./helpers.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// blocks with a "tint" are drawn in their biome's grass or foliage color, blended across biome edges, or a fixed one. water is its biome's water color
import { assert, assertEquals } from "@std/assert";
import { BlockRegistry, EverythingRegistry } from "$/common/everything_registry.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
import { assert, assertEquals } from "@std/assert";
import { Container, ItemStack } from "$/common/inventory.ts";
import { CRAFTING_RESULT_SLOT } from "$/common/protocol.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// health, hunger and saturation, with minecraft's rules
import { assert, assertAlmostEquals, assertEquals } from "@std/assert";
import { MAX_HEALTH, Vitals } from "$/server/game/vitals.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// waterlogging, like minecraft's: a fence holds a water source, which flows out of it, can be bucketed in and out, and
// is left behind when the fence is broken
import { assert, assertEquals } from "@std/assert";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
import { assert, assertEquals, assertRejects } from "@std/assert";
import { CHUNK_AREA, CHUNK_SIZE } from "$/common/constants.ts";
import { Container, ItemStack } from "$/common/inventory.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
import { assert, assertEquals } from "@std/assert";
import { AIR_ID } from "$/common/protocol.ts";
import { CHUNK_AREA } from "$/common/constants.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// how long generating chunks takes, on one thread. moving the terrain from code to data was held to 15% slower here,
// and cost about 9% (144.5 to 157.7 ms on the machine it was measured on). deno task bench
import { generate_raw_chunk } from "$/common/generation.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// the bundle is everything generation reads, so a worker sent it generates what the game does. see
// common/worldgen_bundle.ts
import { assert, assertEquals } from "@std/assert";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// the base game's worldgen features, see mods/bworld/scripts/worldgen.ts
import { assert, assertEquals } from "@std/assert";
import { CHUNK_AREA, CHUNK_HEIGHT, CHUNK_SIZE, ID_MASK } from "$/common/constants.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// world generation gives the same world block for block, release after release: a save only keeps what players
// changed, so any change to what generation makes changes every existing world (docs/modding_plan.md, rule 2).
// this generates chunks for a few seeds and compares them with tests/fixtures/worldgen_golden.json.
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// chunks generated in worldgen workers are the ones the game would generate, in any order and with any number of
// workers. see server/game/worldgen_pool.ts
import { assert, assertEquals } from "@std/assert";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
import { assert, assertEquals } from "@std/assert";
import { CHUNK_AREA, CHUNK_HEIGHT, SEA_LEVEL } from "$/common/constants.ts";
import { generate_raw_chunk } from "$/common/generation.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// the worm bin: one worm_binable item in its input makes 5 more of it every morning, into its output
import { assert, assertEquals } from "@std/assert";
import { CYCLE_TICKS } from "$/common/time.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// what players wear is drawn on their parts, moving with them, see client/rendering/worn_renderer.ts
import { assertAlmostEquals, assertEquals, assertNotEquals } from "@std/assert";
import { entity_model_from_geo } from "$/common/mod_data.ts";