feat: two worlds, rooms of 40, random spawn with space

- rooms hold 40 players. a player not starting in their den arrives in
  a random room of config.spawnRooms that has space (AJ_SPAWN_ROOMS
  overrides); with every one full, the emptiest, over the cap.
- two worlds, Aldan and Congo (AJ_WORLDS sets how many): each its own
  copy of every land, dens and parties shared. a player arrives in a
  random world with space and keeps it through dens and parties.
- the settings menu's World row is back: the server sends the worlds'
  names (generic list 16) and the world list (rm), and the client asks
  for the names once at login. a buddy's "go to" leads into their
  world, whose name the buddy card shows. "Find Open World" (on by
  default) joins a full room in a world with space.
- the panels show the world with the room. the test harness pins one
  world and the township. buildVersion 60.
This commit is contained in:
Burrowdev committed 2026-10-17 23:54:46 +03:00
1 parent b813d89cfa
commit 31cbd87ff8
7 files changed
+161 -25

No files matched your search

+5 -1
View File
@@ -151,7 +151,11 @@ const postJson = (url, body) => fetch(url, {
const withServer = async (name, httpPort, gamePort, run) => {
const dataDir = fs.mkdtempSync(path.join(os.tmpdir(), "aj-test-"));
const server = spawn(process.execPath, [path.join(__dirname, "..", "server.js")], {
env: {...process.env, AJ_HTTP_PORT: httpPort, AJ_GAME_PORT: gamePort, AJ_DATA_DIR: dataDir, AJ_QUIET: "1"},
env: {...process.env, AJ_HTTP_PORT: httpPort, AJ_GAME_PORT: gamePort, AJ_DATA_DIR: dataDir, AJ_QUIET: "1",
// everyone arrives in the township, as the tests expect
AJ_SPAWN_ROOMS: process.env.AJ_SPAWN_ROOMS || "jamaa_township.room_main",
// and in the one world
AJ_WORLDS: process.env.AJ_WORLDS || "1"},
stdio: ["ignore", "pipe", "inherit"],
});
let output = "";