Merge branch 'v28'

This commit is contained in:
evanpelle
2026-01-01 19:20:38 -08:00
4 changed files with 9 additions and 239 deletions
+2 -2
View File
@@ -81,8 +81,8 @@ export class MapDisplay extends LitElement {
}
.option-card.selected {
border-color: var(--primaryColor);
background: rgba(229, 57, 53, 0.1);
border-color: #4a9eff;
background: rgba(74, 158, 255, 0.1);
}
.option-card-title {
-1
View File
@@ -317,7 +317,6 @@ export const emojiTable = [
["↙️", "⬇️", "↘️", "❤️", "💔"],
["💰", "⚓", "⛵", "🏡", "🛡️"],
["🏭", "🚂", "❓", "🐔", "🐀"],
["🎁", "🌟", "🎅", "🎄", "⛄"],
] as const;
// 2d to 1d array
export const flattenedEmojiTable = emojiTable.flat();
+7 -48
View File
@@ -3,16 +3,11 @@ import { PseudoRandom } from "../PseudoRandom";
import { GameID } from "../Schemas";
import { simpleHash } from "../Util";
import { SpawnExecution } from "./SpawnExecution";
import {
COMMUNITY_FULL_ELF_NAMES,
COMMUNITY_PREFIXES,
SPECIAL_FULL_ELF_NAMES,
} from "./utils/BotNames";
import { BOT_NAME_PREFIXES, BOT_NAME_SUFFIXES } from "./utils/BotNames";
export class BotSpawner {
private random: PseudoRandom;
private bots: SpawnExecution[] = [];
private nameIndex = 0;
constructor(
private gs: Game,
@@ -23,12 +18,8 @@ export class BotSpawner {
spawnBots(numBots: number): SpawnExecution[] {
for (let i = 0; i < numBots; i++) {
const candidate = this.nextCandidateName();
const spawn = this.spawnBot(candidate.name);
if (candidate.source === "list") {
this.nameIndex++;
}
const name = this.randomBotName();
const spawn = this.spawnBot(name);
this.bots.push(spawn);
}
@@ -42,41 +33,9 @@ export class BotSpawner {
);
}
private nextCandidateName(): {
name: string;
source: "list" | "random";
} {
if (this.bots.length < 20) {
//first few usually overwritten by Nation spawn
return { name: this.getRandomElf(), source: "random" };
}
if (this.nameIndex < COMMUNITY_FULL_ELF_NAMES.length) {
return {
name: COMMUNITY_FULL_ELF_NAMES[this.nameIndex],
source: "list",
};
}
const specialOffset = COMMUNITY_FULL_ELF_NAMES.length;
if (this.nameIndex < specialOffset + SPECIAL_FULL_ELF_NAMES.length) {
return {
name: SPECIAL_FULL_ELF_NAMES[this.nameIndex - specialOffset],
source: "list",
};
}
const prefixOffset = specialOffset + SPECIAL_FULL_ELF_NAMES.length;
if (this.nameIndex < prefixOffset + COMMUNITY_PREFIXES.length) {
return {
name: `${COMMUNITY_PREFIXES[this.nameIndex - prefixOffset]} the Elf`,
source: "list",
};
}
return { name: this.getRandomElf(), source: "random" };
}
private getRandomElf(): string {
const suffixNumber = this.random.nextInt(1, 10001);
return `Elf ${suffixNumber}`;
private randomBotName(): string {
const prefixIndex = this.random.nextInt(0, BOT_NAME_PREFIXES.length);
const suffixIndex = this.random.nextInt(0, BOT_NAME_SUFFIXES.length);
return `${BOT_NAME_PREFIXES[prefixIndex]} ${BOT_NAME_SUFFIXES[suffixIndex]}`;
}
}
-188
View File
@@ -253,191 +253,3 @@ export const BOT_NAME_SUFFIXES = [
"Democracy",
"Autocracy",
];
export const COMMUNITY_FULL_ELF_NAMES = [
"evan the Creator Elf",
"iamlewis the Head Elf",
"Restart the Community Elf",
"Mr Box the Dev Elf",
"InGloriousTom the Dev Elf",
"Sheikh the First Elf",
"N0ur the Flag Elf",
"Diessel the UI Elf",
"Nikola123 the Map Elf",
"Aotumuri the Language Elf",
"Pilkey the Admin Elf",
"Mr tryout33s Elf",
"Biffeur the YT Elf",
"Enzo the YT Elf",
"Molky the YT Elf",
"FuzeIII the YT Elf",
"Node the YT Elf",
"Lumiin the YT Elf",
"youngfentanyl OFM Elf",
"Remorse the Wiki Elf",
"Lonely Millennial Twitch Elf",
"Kaizeron OFM Elf",
"Zilka OFM Elf",
"JIZK Caster Elf",
"MiraCZ the FP Elf",
"aPuddle best Elf",
"lucas the sound Elf",
"Fulayon the YT Elf",
"Drew durnell YT Elf",
"The Spiffing Brit YT Elf",
"Ultimus Rex YT Elf",
"MizuUmi the YT Elf",
];
export const SPECIAL_FULL_ELF_NAMES = [
"Santa",
"Rudolf the Reindeer",
"Frosty the Snowman",
"Hermey the Elf",
"Ivan the Elf",
"Elf on the Shelf",
"Buddy the Elf",
"Legolas",
"Elrond",
"Galadriel",
"Celeborn",
"Glorfindel",
];
export const COMMUNITY_PREFIXES = [
"The Sparkling Elf",
"Valentino",
"Mr Cube",
"Nukeman",
"Baguette Bot",
"Kiwi",
"FakeNeo",
"Toyatak",
"Readix",
"Danny",
"php",
"Redincon",
"Sachx.",
"Fuity Mctooty",
"Vimacs",
"Wraith",
"Phantom",
"Crescent",
"OF Therapist",
"Aviid",
"brunoo",
"Ezaru",
"prices",
"Santos",
"Wonder",
"Vincent",
"Smith M",
"Acer Alex",
"Controller",
"d3n0x",
"devalnor",
"FloPinguin",
"falcon",
"GlacialDrift",
"Jax",
"Killersoren",
"MiniMeTiny",
"Remissile",
"Sorikairo",
"That Otter",
"Arya",
"Nebula",
"takeser",
"Kai IL PAZZO",
"Vanon",
"Foorack",
"Abod",
"aaa4xu",
"Goblinon",
"dx",
"Pod",
"Demonessica",
"Dovg",
"Joel",
"LegitimatelyCool1",
"OxMzimzy",
"RTHOne",
"Egophobic",
"djmrFunnyMan",
"5oliloguy",
"cfsolver",
"nvm",
"Supbro",
"Mischa",
"WALMART NINJA",
"Magico",
"sidious",
"Bruny",
"Goofer",
"Backn",
"EyeSeeEm",
"TrionX",
"Theodora",
"platz1de",
"Maths Empire",
"Moha",
"SyntaxPM",
"theskeleton4393",
"juliosilvaqwerty5",
"NewHappyRabbit",
"Moki",
"Xaelor",
"NiclasWK",
"cldprv",
"r3ms",
"Tanepro193",
"gx21",
"toldinsound",
"jacks0n",
"floriankilian",
"Fibig",
"Texxter",
"pantelispantelidis",
"ap ms",
"frappa10",
"Lollosean",
"daimyo panda2",
"gafunuko",
"Jinyoon",
"Perdiccas",
"zibi",
"RinkyDinky",
"Rulfam",
"Nobody",
"Vekser",
"extraextra",
"MotivatedMonkey",
"6uzm4n",
"theangel2",
"Keevee",
"Makonede",
"grassified",
"Zjefken",
"Summers Nick",
"Marvin",
"EagleEye",
"Shahiid",
"INGSOC",
"SIG",
"Bobo",
"seekerreturns",
"SlyTy",
"Leo 21",
"FX",
"Calrathan",
"AzloD",
"SunnyBoyWTF",
"BeGj",
"tnhnblgl",
"BrunoJurkovic",
"q8gazy",
"Kipstz",
"aqw42",
"TylerHavanan",
"KerodK",
"ghisloufou",
"dxtron",
"Sii",
];