coh-content-db 1.4.1 → 2.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +25 -0
- package/.github/workflows/build.yml +38 -0
- package/.github/workflows/pull-request.yml +32 -0
- package/.github/workflows/release.yml +52 -0
- package/LICENSE +24 -674
- package/README.md +74 -17
- package/dist/coh-content-db.d.ts +584 -22
- package/dist/coh-content-db.js +587 -2
- package/dist/coh-content-db.js.map +1 -0
- package/dist/coh-content-db.mjs +568 -0
- package/dist/coh-content-db.mjs.map +1 -0
- package/eslint.config.mjs +30 -0
- package/jest.config.mjs +7 -0
- package/package.json +31 -23
- package/rollup.config.mjs +27 -0
- package/src/main/api/alignment.ts +3 -0
- package/src/main/api/alternate-data.ts +22 -0
- package/src/main/api/archetype-data.ts +5 -0
- package/src/main/api/badge-data.ts +109 -0
- package/src/main/api/badge-partial-data.ts +65 -0
- package/src/main/api/badge-partial-type.ts +8 -0
- package/src/main/api/badge-type.ts +19 -0
- package/src/main/api/change.ts +14 -0
- package/src/main/api/enhancement-category.ts +30 -0
- package/src/main/api/game-map-data.ts +26 -0
- package/src/main/api/link.ts +4 -0
- package/src/main/api/plaque-type.ts +6 -0
- package/src/main/api/server-group-data.ts +65 -0
- package/src/main/api/sex.ts +3 -0
- package/src/main/api/vidiot-map-data.ts +18 -0
- package/src/main/api/vidiot-map-point-of-interest-data.ts +30 -0
- package/src/main/changelog.ts +20 -0
- package/src/main/db/alternates.ts +81 -0
- package/src/main/db/archetype.ts +14 -0
- package/src/main/db/badge-partial.ts +35 -0
- package/src/main/db/badge.ts +141 -0
- package/src/main/db/coh-content-database.ts +29 -0
- package/src/main/db/game-map.ts +33 -0
- package/src/main/db/key.ts +18 -0
- package/src/main/db/server-group.ts +112 -0
- package/src/main/db/vidiot-map-point-of-interest.ts +40 -0
- package/src/main/db/vidiot-map.ts +25 -0
- package/src/main/index.ts +33 -0
- package/src/main/util.ts +17 -0
- package/src/test/api/alignment.test.ts +31 -0
- package/src/test/api/archetype-data.fixture.ts +8 -0
- package/src/test/api/badge-data.fixture.ts +22 -0
- package/src/test/api/badge-data.test.ts +15 -0
- package/src/test/api/badge-partial-data.fixture.ts +17 -0
- package/src/test/api/badge-partial-type.test.ts +31 -0
- package/src/test/api/badge-type.test.ts +35 -0
- package/src/test/api/enhancement-category.test.ts +35 -0
- package/src/test/api/game-map-data.fixture.ts +10 -0
- package/src/test/api/plaque-type.test.ts +31 -0
- package/src/test/api/server-group-data.fixture.ts +23 -0
- package/src/test/api/server-group-data.test.ts +15 -0
- package/src/test/api/sex.test.ts +31 -0
- package/src/test/api/vidiot-map-point-of-interest.fixture.ts +10 -0
- package/src/test/api/vidiot-map.fixture.ts +9 -0
- package/src/test/changelog.test.ts +36 -0
- package/src/test/db/alternates.test.ts +223 -0
- package/src/test/db/archetype.test.ts +38 -0
- package/src/test/db/badge.test.ts +41 -0
- package/src/test/db/coh-content-database.test.ts +42 -0
- package/src/test/db/key.test.ts +22 -0
- package/src/test/db/server-group.test.ts +124 -0
- package/src/test/index.test.ts +10 -0
- package/src/test/util.test.ts +39 -0
- package/tsconfig.json +117 -0
- package/dist/_changelog.d.ts +0 -3
- package/dist/coh-content-db.nomin.js +0 -635
- package/dist/content-refence-utils.d.ts +0 -4
- package/dist/index.d.ts +0 -8
- package/dist/internal/_common.d.ts +0 -4
- package/dist/internal/archetype.d.ts +0 -10
- package/dist/internal/badge.d.ts +0 -44
- package/dist/internal/game-map.d.ts +0 -33
- package/dist/internal/server-group.d.ts +0 -24
- package/dist/types/archetype.d.ts +0 -9
- package/dist/types/badge.d.ts +0 -192
- package/dist/types/enhancement.d.ts +0 -28
- package/dist/types/game-map.d.ts +0 -47
- package/dist/types/link.d.ts +0 -4
- package/dist/types/server-group.d.ts +0 -75
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coh-content-db.mjs","sources":["../src/main/api/alignment.ts","../src/main/api/badge-partial-type.ts","../src/main/api/badge-type.ts","../src/main/api/enhancement-category.ts","../src/main/api/plaque-type.ts","../src/main/api/sex.ts","../src/main/db/key.ts","../src/main/db/archetype.ts","../src/main/db/badge-partial.ts","../src/main/db/alternates.ts","../src/main/db/badge.ts","../src/main/db/vidiot-map-point-of-interest.ts","../src/main/db/vidiot-map.ts","../src/main/db/game-map.ts","../src/main/db/server-group.ts","../src/main/db/coh-content-database.ts","../src/main/changelog.ts","../src/main/util.ts"],"sourcesContent":["export const ALIGNMENT = ['H', 'V', 'P'] as const\n\nexport type Alignment = typeof ALIGNMENT[number]\n","export const BADGE_PARTIAL_TYPE = [\n 'PLAQUE',\n 'BADGE',\n 'INVENTION',\n 'INVENTION_PLUS_ONE', // Some invention badges require you to build x of two different invention levels, 'plus one of either level'.\n] as const\n\nexport type BadgePartialType = typeof BADGE_PARTIAL_TYPE[number]\n","export const BADGE_TYPE = [\n 'EXPLORATION',\n 'HISTORY',\n 'ACCOMPLISHMENT',\n 'ACHIEVEMENT',\n 'ACCOLADE',\n 'GLADIATOR',\n 'VETERAN',\n 'PVP',\n 'INVENTION',\n 'DEFEAT',\n 'EVENT',\n 'OUROBOROS',\n 'CONSIGNMENT',\n 'DAY_JOB',\n 'AE',\n] as const\n\nexport type BadgeType = typeof BADGE_TYPE[number]\n","export const ENHANCEMENT_CATEGORY = [\n 'DEFENSE_DEBUFF',\n 'TO_HIT_DEBUFF',\n 'TAUNT',\n 'CONFUSE',\n 'HEALING',\n 'DEFENSE_BUFF',\n 'RESIST_DAMAGE',\n 'INTANGIBILITY',\n 'SLEEP',\n 'SLOW',\n 'HOLD',\n 'STUN',\n 'IMMOBILIZE',\n 'FEAR',\n 'ENDURANCE_MODIFICATION',\n 'ENDURANCE_REDUCTION',\n 'RECHARGE_REDUCTION',\n 'INTERRUPT_DURATION',\n 'ACCURACY',\n 'TO_HIT_BUFF',\n 'DAMAGE',\n 'KNOCKBACK',\n 'RUN_SPEED',\n 'JUMP',\n 'FLY_SPEED',\n 'RANGE',\n] as const\n\nexport type EnhancementCategory = typeof ENHANCEMENT_CATEGORY[number]\n","export const PLAQUE_TYPE = [\n 'WALL_PLAQUE',\n 'MONUMENT',\n]\n\nexport type PlaqueType = typeof PLAQUE_TYPE[number]\n","export const SEX = ['M', 'F'] as const\n\nexport type Sex = typeof SEX[number]\n","const INVALID_KEY_PATTERN = /[^a-z0-9-]/\n\nexport class Key {\n readonly #value: string\n\n constructor(value: string) {\n this.#validateKey(value)\n this.#value = value\n }\n\n get value(): string {\n return this.#value\n }\n\n #validateKey(key: string): void {\n if (INVALID_KEY_PATTERN.test(key)) throw new Error(`Invalid key: [${key}]; Keys can only contain lowercase characters, numbers and dashes.`)\n }\n}\n","import { Key } from './key'\nimport { ArchetypeData } from '../api/archetype-data'\n\nexport class Archetype {\n readonly key: string\n readonly name: string\n readonly description?: string\n\n constructor(data: ArchetypeData) {\n this.key = new Key(data.key).value\n this.name = data.name\n this.description = data.description\n }\n}\n","import { BadgePartialData } from '../api/badge-partial-data'\nimport { PlaqueType } from '../api/plaque-type'\nimport { BadgePartialType } from '../api/badge-partial-type'\nimport { EnhancementCategory } from '../api/enhancement-category'\nimport { Key } from './key'\n\nexport class BadgePartial {\n readonly key: string\n readonly type: BadgePartialType | string\n readonly mapKey?: string\n readonly loc?: number[]\n readonly plaqueType?: PlaqueType | string\n readonly inscription?: string\n readonly vidiotMapKey?: string\n readonly badgeKey?: string\n readonly inventionLevel?: number\n readonly inventionTypes?: (EnhancementCategory | string)[]\n readonly inventionCount?: number\n readonly notes?: string\n\n constructor(data: BadgePartialData) {\n this.key = new Key(data.key).value\n this.type = data.type\n this.mapKey = data.mapKey\n this.loc = data.loc\n this.plaqueType = data.plaqueType\n this.inscription = data.inscription\n this.vidiotMapKey = data.vidiotMapKey\n this.badgeKey = data.badgeKey\n this.inventionLevel = data.inventionLevel\n this.inventionTypes = data.inventionTypes\n this.inventionCount = data.inventionCount\n this.notes = data.notes\n }\n}\n","import { AlternateData } from '../api/alternate-data'\nimport { Sex } from '../api/sex'\nimport { Alignment } from '../api/alignment'\n\nconst ALIGNMENT_SORT: Record<string, number> = { H: 2, V: 1, P: 0 }\nconst SEX_SORT: Record<string, number> = { M: 1, F: 0 }\n\nexport class Alternates<T> {\n readonly #sortedValues: AlternateData<T>[] = []\n\n constructor(values: AlternateData<T>[]) {\n this.#sortedValues = values.sort()\n this.#sortedValues.sort((a, b) => this.#compareAlternates(a, b))\n }\n\n getValue(alignment?: Alignment | string, sex?: Sex | string): T | undefined {\n for (let index = this.#sortedValues.length; index--;) {\n const entry = this.#sortedValues[index]\n if ((entry.alignment === undefined || entry.alignment === alignment)\n && (entry.sex === undefined || entry.sex === sex)\n ) return entry.value\n }\n return undefined\n }\n\n /**\n * Get the default value for this list of alternates, the value with the highest priority and lowest specificity.\n */\n get default(): T | undefined {\n return this.#sortedValues[0]?.value\n }\n\n /**\n * Get the list of alternates sorted in canonical order (alignment then sex, low to high specificity).\n */\n get canonical(): AlternateData<T>[] {\n return this.#sortedValues\n }\n\n #compareAlternates(a: AlternateData<T>, b: AlternateData<T>): number {\n const aSpecificity = (a.alignment ? 2 : 0) + (a.sex ? 1 : 0)\n const bSpecificity = (b.alignment ? 2 : 0) + (b.sex ? 1 : 0)\n if (aSpecificity !== bSpecificity) return aSpecificity - bSpecificity // Order first by least-specific\n\n const alignmentComparison = this.#compareAlignment(a.alignment, b.alignment) // Next by alignment\n if (alignmentComparison !== 0) return alignmentComparison\n\n const sexComparison = this.#compareSex(a.sex, b.sex) // Last by sex\n if (sexComparison !== 0) return sexComparison\n\n return String(a.value).localeCompare(String(b.value))\n }\n\n #compareAlignment(a: Alignment | string | undefined, b: Alignment | string | undefined): number {\n if (a === b) return 0\n if (a === undefined && b !== undefined) return -1\n if (b === undefined && a !== undefined) return 1\n\n const aSort = a === undefined ? -1 : ALIGNMENT_SORT[a] ?? -1 // Unknown values get -1 priority\n const bSort = b === undefined ? -1 : ALIGNMENT_SORT[b] ?? -1\n\n if (aSort !== bSort) return bSort - aSort\n\n // Unknown values (not in ALIGNMENT_SORT) are sorted alphabetically\n return a?.localeCompare(b ?? '') ?? 0\n }\n\n #compareSex(a?: Sex | string | undefined, b?: Sex | string | undefined): number {\n if (a === b) return 0\n if (a === undefined && b !== undefined) return -1\n if (b === undefined && a !== undefined) return 1\n\n const aSort = SEX_SORT[a ?? -1] ?? -1 // Unknown values get -1 priority\n const bSort = SEX_SORT[b ?? -1] ?? -1\n\n if (aSort !== bSort) return bSort - aSort\n\n // Unknown values (not in SEX_SORT) are sorted alphabetically\n return a?.localeCompare(b ?? '') ?? 0\n }\n}\n","import { BadgeType } from '../api/badge-type'\nimport { Alignment } from '../api/alignment'\nimport { Link } from '../api/link'\nimport { BadgeData } from '../api/badge-data'\nimport { BadgePartial } from './badge-partial'\nimport { Key } from './key'\nimport { Alternates } from './alternates'\n\nexport class Badge {\n readonly #partialsIndex: Record<string, BadgePartial> = {}\n\n /**\n * The database key for this badge.\n */\n readonly key: string\n\n /**\n * The type of badge.\n */\n readonly type: BadgeType | string\n\n /**\n * The name of this badge.\n *\n * May vary by character sex or alignment.\n */\n readonly name: Alternates<string>\n\n /**\n * The character alignments that this badge is available to.\n */\n readonly alignment: Alignment[]\n\n /**\n * The badge text as it appears in-game. May vary by character sex or alignment.\n */\n readonly badgeText: Alternates<string>\n\n /**\n * Description of how to acquire the badge.\n *\n * Supports {@link https://www.markdownguide.org/|Markdown} format.\n */\n readonly acquisition?: string\n\n /**\n * Absolute URL to this badge's icon.\n *\n * May vary by character sex or alignment.\n */\n readonly icon: Alternates<string>\n\n /**\n * Freeform notes or tips about the badge.\n *\n * Supports {@link https://www.markdownguide.org/|Markdown} format.\n */\n readonly notes?: string\n\n /**\n * List of external links for this Badge. Wiki, forums, etc.\n */\n readonly links?: Link[]\n\n /**\n * For exploration badges, the key of the {@link GameMap} that this badge is found on.\n */\n readonly mapKey?: string\n\n /**\n * For exploration badges, the `/loc` coordinates of the badge on the in-game map.\n */\n readonly loc?: [number, number, number]\n\n /**\n * For badges that appear on a Vidiot Map, the number or letter the badge appears as.\n */\n readonly vidiotMapKey?: string\n\n /**\n * ID used with the in-game `/settitle` command to apply the badge.\n */\n readonly setTitle?: {\n /**\n * `/settitle` id.\n */\n id?: number\n /**\n * `/settitle` id if different for praetorian characters.\n */\n praetorianId?: number\n }\n\n /**\n * A description of the effect the badge will have, such as a buff or granting a temporary power.\n *\n * Supports {@link https://www.markdownguide.org/|Markdown} format.\n */\n readonly effect?: string\n\n /**\n * A list of requirements for badges that have partial fulfilment steps, such as visiting plaques for history badges, or collecting other badges for meta-badges like accolades.\n */\n readonly partials?: BadgePartial[]\n\n /**\n * Some badges are not included in the badge total count... such as Flames of Prometheus, which can be removed by redeeming it for a Notice of the Well.\n */\n readonly ignoreInTotals: boolean\n\n constructor(data: BadgeData) {\n this.key = new Key(data.key).value\n this.type = data.type\n this.name = new Alternates(data.name)\n this.alignment = data.alignment\n this.badgeText = new Alternates(data.badgeText ?? [])\n this.acquisition = data.acquisition\n this.icon = new Alternates(data.icon ?? [])\n this.notes = data.notes\n this.links = data.links\n this.mapKey = data.mapKey\n this.loc = data.loc\n this.effect = data.effect\n this.vidiotMapKey = data.vidiotMapKey\n this.setTitle = data.setTitle\n this.ignoreInTotals = data.ignoreInTotals ?? false\n\n this.partials = data.partials?.map((data) => {\n if (this.#partialsIndex[data.key] !== undefined) throw new Error(`Duplicate badge partial key [${data.key}]`)\n const badge = new BadgePartial(data)\n this.#partialsIndex[badge.key] = badge\n return badge\n })\n }\n\n getPartial(key: string): BadgePartial {\n const result = this.#partialsIndex[key]\n if (result === undefined) throw new Error(`Unknown badge partial key [${key}]`)\n return result\n }\n}\n","import { VidiotMapPointOfInterestData } from '../api/vidiot-map-point-of-interest-data'\n\nexport class VidiotMapPointOfInterest {\n /**\n * The pixel-space position of the PoI on the map graphic.\n *\n * Screen-space, pixels from top-left `[0, 0]`.\n */\n readonly pos?: [number, number]\n\n /**\n * Freeform notes about the PoI.\n *\n * Supports {@link https://www.markdownguide.org/|Markdown} format.\n */\n readonly notes?: string\n\n /**\n * If the POI is a zone transfer, the map it transfers to.\n */\n readonly mapKey?: string\n\n /**\n * If the POI is a badge, the badge.\n */\n readonly badgeKey?: string\n\n /**\n * If the POI is a partial for a badge, the partial key.\n */\n readonly badgePartialKey?: string\n\n constructor(data: VidiotMapPointOfInterestData) {\n this.pos = data.pos\n this.notes = data.notes\n this.mapKey = data.mapKey\n this.badgeKey = data.badgeKey\n this.badgePartialKey = data.badgePartialKey\n }\n}\n","import { VidiotMapData } from '../api/vidiot-map-data'\nimport { VidiotMapPointOfInterest } from './vidiot-map-point-of-interest'\n\nexport class VidiotMap {\n /**\n * URL of the map image.\n */\n readonly imageUrl: string\n\n /**\n * Name to display for the Vidiot map.\n */\n readonly name?: string\n\n /**\n * List of Points of Interest labelled on the image.\n */\n readonly pointsOfInterest?: VidiotMapPointOfInterest[]\n\n constructor(data: VidiotMapData) {\n this.imageUrl = data.imageUrl\n this.name = data.name\n this.pointsOfInterest = data.pointsOfInterest?.map(data => new VidiotMapPointOfInterest(data))\n }\n}\n","import { VidiotMap } from './vidiot-map'\nimport { Link } from '../api/link'\nimport { GameMapData } from '../api/game-map-data'\nimport { Key } from './key'\n\nexport class GameMap {\n /**\n * The database key for this map.\n */\n readonly key: string\n\n /**\n * The name of the map as it appears in-game.\n */\n readonly name: string\n\n /**\n * List of external links for this Map. Wiki, forums, etc.\n */\n readonly links?: Link[]\n\n /**\n * List of Vidiot Map assets for this map.\n */\n readonly vidiotMaps?: VidiotMap[]\n\n constructor(data: GameMapData) {\n this.key = new Key(data.key).value\n this.name = data.name\n this.links = data.links\n this.vidiotMaps = data.vidiotMaps?.map(data => new VidiotMap(data))\n }\n}\n","import { Archetype } from './archetype'\nimport { Badge } from './badge'\nimport { ServerGroupData } from '../api/server-group-data'\nimport { Key } from './key'\nimport { Change } from '../api/change'\nimport { GameMap } from './game-map'\nimport { Link } from '../api/link'\n\nexport class ServerGroup {\n readonly #archetypeIndex: Record<string, Archetype> = {}\n readonly #mapIndex: Record<string, GameMap> = {}\n readonly #badgeIndex: Record<string, Badge> = {}\n\n /**\n * The database key for this server group.\n */\n readonly key: string\n\n /**\n * Name of the server group.\n */\n readonly name: string\n\n /**\n * Description of the server group.\n *\n * Supports {@link https://www.markdownguide.org/|Markdown} format.\n */\n readonly description?: string\n\n /**\n * Repository where the db content package is maintained.\n */\n readonly repository?: string\n\n /**\n * List of external links for this Server Group. Wiki, forums, etc.\n */\n readonly links?: Link[]\n\n /**\n * List of the game server names in this server group.\n * Torchbearer, Excelsior, etc.\n */\n readonly servers: string[]\n\n /**\n * List of archetypes available in this server group.\n */\n readonly archetypes: Archetype[]\n\n /**\n * List of game maps supported by this server group.\n */\n readonly maps: GameMap[]\n\n /**\n * List of badges available on this server group.\n */\n readonly badges: Badge[]\n\n /**\n * Change log for this data package.\n */\n readonly changelog?: Change[]\n\n constructor(data: ServerGroupData) {\n this.key = new Key(data.key).value\n this.name = data.name\n this.description = data.description\n this.repository = data.repository\n this.links = data.links\n this.servers = data.servers ?? []\n this.archetypes = data.archetypes?.map((data) => {\n if (this.#archetypeIndex[data.key] !== undefined) throw new Error(`Duplicate archetype key [${data.key}]`)\n const archetype = new Archetype(data)\n this.#archetypeIndex[archetype.key] = archetype\n return archetype\n }) ?? []\n this.maps = data.maps?.map((data) => {\n if (this.#mapIndex[data.key] !== undefined) throw new Error(`Duplicate map key [${data.key}]`)\n const map = new GameMap(data)\n this.#mapIndex[map.key] = map\n return map\n }) ?? []\n this.badges = data.badges?.map((data) => {\n if (this.#badgeIndex[data.key] !== undefined) throw new Error(`Duplicate badge key [${data.key}]`)\n const badge = new Badge(data)\n this.#badgeIndex[badge.key] = badge\n return badge\n }) ?? []\n this.changelog = data.changelog\n }\n\n getArchetype(key: string): Archetype {\n const result = this.#archetypeIndex[key]\n if (result === undefined) throw new Error(`Unknown archetype key [${key}]`)\n return result\n }\n\n getMap(key: string): GameMap {\n const result = this.#mapIndex[key]\n if (result === undefined) throw new Error(`Unknown map key [${key}]`)\n return result\n }\n\n getBadge(key: string): Badge {\n const result = this.#badgeIndex[key]\n if (result === undefined) throw new Error(`Unknown badge key [${key}]`)\n return result\n }\n}\n","import { ServerGroup } from './server-group'\nimport { ServerGroupData } from '../api/server-group-data'\n\nexport class CohContentDatabase {\n readonly #serverGroups: Record<string, ServerGroup> = {}\n\n /**\n * Load a server group data package into the database.\n * @param data The data to load.\n */\n loadServerGroupData(data: ServerGroupData): void {\n this.#serverGroups[data.key] = new ServerGroup(data)\n }\n\n /**\n * Get all the server groups currently loaded in the database.\n */\n listServerGroups(): ServerGroup[] {\n return Object.values(this.#serverGroups)\n }\n\n /**\n * get a server group by key.\n * @param serverGroupKey The key.\n */\n getServerGroup(serverGroupKey: string): ServerGroup | null {\n return this.#serverGroups[serverGroupKey]\n }\n}\n","import { Change } from './api/change'\n\nexport const CHANGELOG: Change[] = [\n {\n version: '2.0.0',\n date: new Date('2025-03-12'),\n description: ''\n + '* Replaced redundant interfaces with their concrete equivalents.\\n'\n + '* Replaced enums with extensible union types; Server groups with new badge types, enhancement types, etc. can now extend them locally.\\n'\n + '* Removed the `serverGroup` property from entities to simplify the object tree; Server group context will need to be managed separately.\\n'\n + '* Standardized pluralization of some field names (name, icon).\\n'\n + '* Combined `settitle` ids into a single tuple field.\\n'\n + '* Change from GNU to The Unlicense.\\n'\n + '* Removed dependency on lodash. There are now no third-party runtime dependencies.\\n'\n + '* Moved from webpack to rollup for packaging.\\n'\n + '* Add eslint for linting.\\n'\n + '* Add jest for unit tests.\\n'\n + '* Added GitHub Actions for CI.\\n',\n },\n]\n","/**\n * Create a reference string that can be used in most text strings to display a link to the given badge.\n * @param target The badge or badge key to target.\n */\nexport function createBadgeReference(target: string | { key: string }): string {\n const key = typeof target === 'string' ? target : target.key\n return `[badge:${key}]`\n}\n\n/**\n * Create a reference string that can be used in most text strings to display a link to the given map.\n * @param target The {@link GameMap} or map key to target.\n */\nexport function createMapReference(target: string | { key: string }): string {\n const key = typeof target === 'string' ? target : target.key\n return `[map:${key}]`\n}\n"],"names":["__privateAdd","__privateMethod","__privateSet","__privateGet","__publicField","data"],"mappings":"AAAO,MAAM,SAAY,GAAA,CAAC,GAAK,EAAA,GAAA,EAAK,GAAG;;ACAhC,MAAM,kBAAqB,GAAA;AAAA,EAChC,QAAA;AAAA,EACA,OAAA;AAAA,EACA,WAAA;AAAA,EACA;AAAA;AACF;;ACLO,MAAM,UAAa,GAAA;AAAA,EACxB,aAAA;AAAA,EACA,SAAA;AAAA,EACA,gBAAA;AAAA,EACA,aAAA;AAAA,EACA,UAAA;AAAA,EACA,WAAA;AAAA,EACA,SAAA;AAAA,EACA,KAAA;AAAA,EACA,WAAA;AAAA,EACA,QAAA;AAAA,EACA,OAAA;AAAA,EACA,WAAA;AAAA,EACA,aAAA;AAAA,EACA,SAAA;AAAA,EACA;AACF;;AChBO,MAAM,oBAAuB,GAAA;AAAA,EAClC,gBAAA;AAAA,EACA,eAAA;AAAA,EACA,OAAA;AAAA,EACA,SAAA;AAAA,EACA,SAAA;AAAA,EACA,cAAA;AAAA,EACA,eAAA;AAAA,EACA,eAAA;AAAA,EACA,OAAA;AAAA,EACA,MAAA;AAAA,EACA,MAAA;AAAA,EACA,MAAA;AAAA,EACA,YAAA;AAAA,EACA,MAAA;AAAA,EACA,wBAAA;AAAA,EACA,qBAAA;AAAA,EACA,oBAAA;AAAA,EACA,oBAAA;AAAA,EACA,UAAA;AAAA,EACA,aAAA;AAAA,EACA,QAAA;AAAA,EACA,WAAA;AAAA,EACA,WAAA;AAAA,EACA,MAAA;AAAA,EACA,WAAA;AAAA,EACA;AACF;;AC3BO,MAAM,WAAc,GAAA;AAAA,EACzB,aAAA;AAAA,EACA;AACF;;ACHa,MAAA,GAAA,GAAM,CAAC,GAAA,EAAK,GAAG;;;;;;;;;;ACA5B,IAAA,MAAA,EAAA,cAAA,EAAA,cAAA;AAAA,MAAM,mBAAsB,GAAA,YAAA;AAErB,MAAM,GAAI,CAAA;AAAA,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AAA;AACzC;AAAA;AAAA;AAAA;AAAA,EAMA,eAAe,cAA4C,EAAA;AACzD,IAAO,OAAA,YAAA,CAAA,IAAA,EAAK,eAAc,cAAc,CAAA;AAAA;AAE5C;AAxBW,aAAA,GAAA,IAAA,OAAA,EAAA;;ACFJ,MAAM,SAAsB,GAAA;AAAA,EACjC;AAAA,IACE,OAAS,EAAA,OAAA;AAAA,IACT,IAAA,kBAAU,IAAA,IAAA,CAAK,YAAY,CAAA;AAAA,IAC3B,WAAa,EAAA;AAAA;AAajB;;ACfO,SAAS,qBAAqB,MAA0C,EAAA;AAC7E,EAAA,MAAM,GAAM,GAAA,OAAO,MAAW,KAAA,QAAA,GAAW,SAAS,MAAO,CAAA,GAAA;AACzD,EAAA,OAAO,UAAU,GAAG,CAAA,CAAA,CAAA;AACtB;AAMO,SAAS,mBAAmB,MAA0C,EAAA;AAC3E,EAAA,MAAM,GAAM,GAAA,OAAO,MAAW,KAAA,QAAA,GAAW,SAAS,MAAO,CAAA,GAAA;AACzD,EAAA,OAAO,QAAQ,GAAG,CAAA,CAAA,CAAA;AACpB;;;;"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import globals from 'globals'
|
|
2
|
+
import eslintPluginUnicorn from 'eslint-plugin-unicorn'
|
|
3
|
+
import stylistic from '@stylistic/eslint-plugin'
|
|
4
|
+
import tseslint from 'typescript-eslint'
|
|
5
|
+
|
|
6
|
+
/** @type {import('eslint').Linter.Config[]} */
|
|
7
|
+
export default [
|
|
8
|
+
{ files: ['**/*.{js,mjs,cjs,ts}'] },
|
|
9
|
+
{ ignores: ['.github/', '.idea/', 'coverage/', 'dist/'] },
|
|
10
|
+
{ languageOptions: { globals: globals.browser } },
|
|
11
|
+
|
|
12
|
+
...tseslint.configs.strict,
|
|
13
|
+
...tseslint.configs.stylistic,
|
|
14
|
+
{
|
|
15
|
+
rules: {
|
|
16
|
+
// eslint-disable-next-line unicorn/no-null
|
|
17
|
+
'@typescript-eslint/naming-convention': ['error', { selector: 'objectLiteralProperty', format: null }], // camelCase, but ignore object literals
|
|
18
|
+
'@typescript-eslint/explicit-member-accessibility': ['error', { accessibility: 'no-public' }], // don't use public access modifier
|
|
19
|
+
'@typescript-eslint/explicit-function-return-type': ['error'], // require all functions define their return type explicitly
|
|
20
|
+
'eqeqeq': ['error'],
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
stylistic.configs.customize({
|
|
25
|
+
flat: true,
|
|
26
|
+
semi: false,
|
|
27
|
+
}),
|
|
28
|
+
|
|
29
|
+
eslintPluginUnicorn.configs['flat/recommended'], // https://github.com/sindresorhus/eslint-plugin-unicorn/issues/2546,
|
|
30
|
+
]
|
package/jest.config.mjs
ADDED
package/package.json
CHANGED
|
@@ -1,36 +1,44 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "coh-content-db",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-rc.2",
|
|
4
4
|
"description": "City of Heroes Content Database",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
],
|
|
9
|
-
"types": "dist/index.d.ts",
|
|
10
|
-
"scripts": {
|
|
11
|
-
"build": "webpack --mode=production",
|
|
12
|
-
"watch": "webpack --mode=production --watch"
|
|
5
|
+
"homepage": "https://github.com/n15g/coh-content-db#readme",
|
|
6
|
+
"bugs": {
|
|
7
|
+
"url": "https://github.com/n15g/coh-content-db/issues"
|
|
13
8
|
},
|
|
14
9
|
"repository": {
|
|
15
10
|
"type": "git",
|
|
16
11
|
"url": "git+https://github.com/n15g/coh-content-db.git"
|
|
17
12
|
},
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
|
|
13
|
+
"license": "Unlicense",
|
|
14
|
+
"author": "N15g",
|
|
15
|
+
"main": "dist/coh-content-db.js",
|
|
16
|
+
"module": "dist/coh-content-db.mjs",
|
|
17
|
+
"types": "dist/coh-content-db.d.ts",
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "rollup --config",
|
|
20
|
+
"lint": "eslint",
|
|
21
|
+
"test": "jest --coverage",
|
|
22
|
+
"push": "git push && git push --tags",
|
|
23
|
+
"watch": "rollup --config --watch"
|
|
22
24
|
},
|
|
23
|
-
"homepage": "https://github.com/n15g/coh-content-db#readme",
|
|
24
25
|
"devDependencies": {
|
|
25
|
-
"@
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
26
|
+
"@stylistic/eslint-plugin": "^3.1.0",
|
|
27
|
+
"@stylistic/eslint-plugin-ts": "^3.1.0",
|
|
28
|
+
"@types/jest": "^29.5.14",
|
|
29
|
+
"efate": "^1.5.1",
|
|
30
|
+
"eslint": "^9.20.0",
|
|
31
|
+
"eslint-plugin-unicorn": "^56.0.1",
|
|
32
|
+
"globals": "^15.14.0",
|
|
33
|
+
"jest": "^29.7.0",
|
|
34
|
+
"rollup": "^4.34.6",
|
|
35
|
+
"rollup-plugin-dts": "^6.1.1",
|
|
36
|
+
"rollup-plugin-esbuild": "^6.2.0",
|
|
37
|
+
"ts-jest": "^29.2.5",
|
|
38
|
+
"typescript": "^5.7.3",
|
|
39
|
+
"typescript-eslint": "^8.24.0"
|
|
32
40
|
},
|
|
33
|
-
"
|
|
34
|
-
"
|
|
41
|
+
"engines": {
|
|
42
|
+
"node": ">=22"
|
|
35
43
|
}
|
|
36
44
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import esbuild from 'rollup-plugin-esbuild'
|
|
2
|
+
import { dts } from 'rollup-plugin-dts'
|
|
3
|
+
|
|
4
|
+
const name = 'coh-content-db'
|
|
5
|
+
|
|
6
|
+
// noinspection JSUnusedGlobalSymbols
|
|
7
|
+
export default [{
|
|
8
|
+
input: 'src/main/index.ts',
|
|
9
|
+
plugins: [esbuild()],
|
|
10
|
+
output: [{
|
|
11
|
+
file: `dist/${name}.js`,
|
|
12
|
+
format: 'cjs',
|
|
13
|
+
sourcemap: true,
|
|
14
|
+
}, {
|
|
15
|
+
file: `dist/${name}.mjs`,
|
|
16
|
+
format: 'es',
|
|
17
|
+
sourcemap: true,
|
|
18
|
+
}],
|
|
19
|
+
}, {
|
|
20
|
+
input: 'src/main/index.ts',
|
|
21
|
+
plugins: [dts()],
|
|
22
|
+
output: [{
|
|
23
|
+
file: `dist/${name}.d.ts`,
|
|
24
|
+
format: 'es',
|
|
25
|
+
}],
|
|
26
|
+
},
|
|
27
|
+
]
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Sex } from './sex'
|
|
2
|
+
import { Alignment } from './alignment'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Some badge values differ based on the alignment or sex of the character.
|
|
6
|
+
*/
|
|
7
|
+
export interface AlternateData<V> {
|
|
8
|
+
/**
|
|
9
|
+
* The character alignment this alternate applies to.
|
|
10
|
+
*/
|
|
11
|
+
readonly alignment?: Alignment | string
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The character sex this alternate applies to.
|
|
15
|
+
*/
|
|
16
|
+
readonly sex?: Sex | string
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* The value for this combination.
|
|
20
|
+
*/
|
|
21
|
+
readonly value: V
|
|
22
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { BadgePartialData } from './badge-partial-data'
|
|
2
|
+
import { Link } from './link'
|
|
3
|
+
import { BadgeType } from './badge-type'
|
|
4
|
+
import { AlternateData } from './alternate-data'
|
|
5
|
+
import { Alignment } from './alignment'
|
|
6
|
+
|
|
7
|
+
export interface BadgeData {
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Unique key used to reference this badge.
|
|
11
|
+
*
|
|
12
|
+
* Keys can only contain lowercase letters, numbers and hyphens (`-`).
|
|
13
|
+
*/
|
|
14
|
+
readonly key: string
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The type of badge.
|
|
18
|
+
*/
|
|
19
|
+
readonly type: BadgeType | string
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The name of this badge.
|
|
23
|
+
*
|
|
24
|
+
* If the value differs by sex or alignment, include an {@link AlternateData} for each variant.
|
|
25
|
+
*/
|
|
26
|
+
readonly name: AlternateData<string>[]
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The character alignments that this badge is available to.
|
|
30
|
+
*/
|
|
31
|
+
readonly alignment: Alignment[]
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The badge text as it appears in-game. May vary by character sex or alignment.
|
|
35
|
+
*/
|
|
36
|
+
readonly badgeText?: AlternateData<string>[]
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Description of how to acquire the badge.
|
|
40
|
+
*
|
|
41
|
+
* Supports {@link https://www.markdownguide.org/|Markdown} format.
|
|
42
|
+
*/
|
|
43
|
+
readonly acquisition?: string
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* List of absolute URLs for this badge's icons.
|
|
47
|
+
*
|
|
48
|
+
* If the value differs by sex or alignment, include an {@link AlternateData} for each variant.
|
|
49
|
+
*/
|
|
50
|
+
readonly icon?: AlternateData<string>[]
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Freeform notes or tips about the badge.
|
|
54
|
+
*
|
|
55
|
+
* Supports {@link https://www.markdownguide.org/|Markdown} format.
|
|
56
|
+
*/
|
|
57
|
+
readonly notes?: string
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* List of external links for this Badge. Wiki, forums, etc.
|
|
61
|
+
*/
|
|
62
|
+
readonly links?: Link[]
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* For exploration badges, the key of the {@link GameMapData|GameMap} that this badge is found on.
|
|
66
|
+
*/
|
|
67
|
+
readonly mapKey?: string
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* For exploration badges, the `/loc` coordinates of the badge on the in-game map.
|
|
71
|
+
*/
|
|
72
|
+
readonly loc?: [number, number, number]
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* For badges that appear on a Vidiot Map, the number or letter the badge appears as.
|
|
76
|
+
*/
|
|
77
|
+
readonly vidiotMapKey?: string
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* ID used with the in-game `/settitle` command to apply the badge.
|
|
81
|
+
*/
|
|
82
|
+
readonly setTitle?: {
|
|
83
|
+
/**
|
|
84
|
+
* `/settitle` id.
|
|
85
|
+
*/
|
|
86
|
+
id?: number
|
|
87
|
+
/**
|
|
88
|
+
* `/settitle` id if different for praetorian characters.
|
|
89
|
+
*/
|
|
90
|
+
praetorianId?: number
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* A description of the effect the badge will have, such as a buff or granting a temporary power.
|
|
95
|
+
*
|
|
96
|
+
* Supports {@link https://www.markdownguide.org/|Markdown} format.
|
|
97
|
+
*/
|
|
98
|
+
readonly effect?: string
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* A list of requirements for badges that have partial fulfilment steps, such as visiting plaques for history badges, or collecting other badges for meta-badges like accolades.
|
|
102
|
+
*/
|
|
103
|
+
readonly partials?: BadgePartialData[]
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Some badges are not included in the badge total count... such as Flames of Prometheus, which can be removed by redeeming it for a Notice of the Well.
|
|
107
|
+
*/
|
|
108
|
+
readonly ignoreInTotals?: boolean
|
|
109
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { EnhancementCategory } from './enhancement-category'
|
|
2
|
+
import { BadgePartialType } from './badge-partial-type'
|
|
3
|
+
import { PlaqueType } from './plaque-type'
|
|
4
|
+
|
|
5
|
+
export interface BadgePartialData {
|
|
6
|
+
/**
|
|
7
|
+
* Key.
|
|
8
|
+
*/
|
|
9
|
+
readonly key: string
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Type of partial.
|
|
13
|
+
*/
|
|
14
|
+
readonly type: BadgePartialType | string
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Map the partial is located on.
|
|
18
|
+
*/
|
|
19
|
+
readonly mapKey?: string
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* /loc coordinates.
|
|
23
|
+
*/
|
|
24
|
+
readonly loc?: number[]
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Is it a wall plaque or a physical monument?
|
|
28
|
+
*/
|
|
29
|
+
readonly plaqueType?: PlaqueType | string
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Plaque inscription.
|
|
33
|
+
*/
|
|
34
|
+
readonly inscription?: string
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The number or letter the partial appears as on Vidiot Maps.
|
|
38
|
+
*/
|
|
39
|
+
readonly vidiotMapKey?: string
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* The badge required for this partial.
|
|
43
|
+
*/
|
|
44
|
+
readonly badgeKey?: string
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Level of the invention required.
|
|
48
|
+
*/
|
|
49
|
+
readonly inventionLevel?: number
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* The types of enhancements required to be crafted.
|
|
53
|
+
*/
|
|
54
|
+
readonly inventionTypes?: (EnhancementCategory | string)[]
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Number of invention crafts required.
|
|
58
|
+
*/
|
|
59
|
+
readonly inventionCount?: number
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Any additional notes.
|
|
63
|
+
*/
|
|
64
|
+
readonly notes?: string
|
|
65
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export const BADGE_PARTIAL_TYPE = [
|
|
2
|
+
'PLAQUE',
|
|
3
|
+
'BADGE',
|
|
4
|
+
'INVENTION',
|
|
5
|
+
'INVENTION_PLUS_ONE', // Some invention badges require you to build x of two different invention levels, 'plus one of either level'.
|
|
6
|
+
] as const
|
|
7
|
+
|
|
8
|
+
export type BadgePartialType = typeof BADGE_PARTIAL_TYPE[number]
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export const BADGE_TYPE = [
|
|
2
|
+
'EXPLORATION',
|
|
3
|
+
'HISTORY',
|
|
4
|
+
'ACCOMPLISHMENT',
|
|
5
|
+
'ACHIEVEMENT',
|
|
6
|
+
'ACCOLADE',
|
|
7
|
+
'GLADIATOR',
|
|
8
|
+
'VETERAN',
|
|
9
|
+
'PVP',
|
|
10
|
+
'INVENTION',
|
|
11
|
+
'DEFEAT',
|
|
12
|
+
'EVENT',
|
|
13
|
+
'OUROBOROS',
|
|
14
|
+
'CONSIGNMENT',
|
|
15
|
+
'DAY_JOB',
|
|
16
|
+
'AE',
|
|
17
|
+
] as const
|
|
18
|
+
|
|
19
|
+
export type BadgeType = typeof BADGE_TYPE[number]
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface Change {
|
|
2
|
+
/**
|
|
3
|
+
* The version number in {@link http://semver.org|semver} format.
|
|
4
|
+
*/
|
|
5
|
+
version: string
|
|
6
|
+
/**
|
|
7
|
+
* Date of the change.
|
|
8
|
+
*/
|
|
9
|
+
date: Date
|
|
10
|
+
/**
|
|
11
|
+
* Description of the change in {@link https://www.markdownguide.org/|Markdown} format.
|
|
12
|
+
*/
|
|
13
|
+
description: string
|
|
14
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export const ENHANCEMENT_CATEGORY = [
|
|
2
|
+
'DEFENSE_DEBUFF',
|
|
3
|
+
'TO_HIT_DEBUFF',
|
|
4
|
+
'TAUNT',
|
|
5
|
+
'CONFUSE',
|
|
6
|
+
'HEALING',
|
|
7
|
+
'DEFENSE_BUFF',
|
|
8
|
+
'RESIST_DAMAGE',
|
|
9
|
+
'INTANGIBILITY',
|
|
10
|
+
'SLEEP',
|
|
11
|
+
'SLOW',
|
|
12
|
+
'HOLD',
|
|
13
|
+
'STUN',
|
|
14
|
+
'IMMOBILIZE',
|
|
15
|
+
'FEAR',
|
|
16
|
+
'ENDURANCE_MODIFICATION',
|
|
17
|
+
'ENDURANCE_REDUCTION',
|
|
18
|
+
'RECHARGE_REDUCTION',
|
|
19
|
+
'INTERRUPT_DURATION',
|
|
20
|
+
'ACCURACY',
|
|
21
|
+
'TO_HIT_BUFF',
|
|
22
|
+
'DAMAGE',
|
|
23
|
+
'KNOCKBACK',
|
|
24
|
+
'RUN_SPEED',
|
|
25
|
+
'JUMP',
|
|
26
|
+
'FLY_SPEED',
|
|
27
|
+
'RANGE',
|
|
28
|
+
] as const
|
|
29
|
+
|
|
30
|
+
export type EnhancementCategory = typeof ENHANCEMENT_CATEGORY[number]
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Link } from './link'
|
|
2
|
+
import { VidiotMapData } from './vidiot-map-data'
|
|
3
|
+
|
|
4
|
+
export interface GameMapData {
|
|
5
|
+
/**
|
|
6
|
+
* Unique key used to reference this badge.
|
|
7
|
+
*
|
|
8
|
+
* Keys can only contain lowercase letters, numbers and hyphens (`-`).
|
|
9
|
+
*/
|
|
10
|
+
readonly key: string
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The name of the map as it appears in-game.
|
|
14
|
+
*/
|
|
15
|
+
readonly name: string
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* List of external links for this Map. Wiki, forums, etc.
|
|
19
|
+
*/
|
|
20
|
+
readonly links?: Link[]
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* List of Vidiot Map assets for this map.
|
|
24
|
+
*/
|
|
25
|
+
readonly vidiotMaps?: VidiotMapData[]
|
|
26
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { ArchetypeData } from './archetype-data'
|
|
2
|
+
import { GameMapData } from './game-map-data'
|
|
3
|
+
import { BadgeData } from './badge-data'
|
|
4
|
+
import { Change } from './change'
|
|
5
|
+
import { Link } from './link'
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* A server group is a group or company that hosts a set of game servers, such as Homecoming (https://forums.homecomingservers.com/).
|
|
9
|
+
*/
|
|
10
|
+
export interface ServerGroupData {
|
|
11
|
+
/**
|
|
12
|
+
* Unique key used to reference this server group.
|
|
13
|
+
*
|
|
14
|
+
* Keys can only contain lowercase letters, numbers and hyphens (`-`).
|
|
15
|
+
*/
|
|
16
|
+
readonly key: string
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Name of the server group.
|
|
20
|
+
*/
|
|
21
|
+
readonly name: string
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Description of the server group.
|
|
25
|
+
*
|
|
26
|
+
* Supports {@link https://www.markdownguide.org/|Markdown} format.
|
|
27
|
+
*/
|
|
28
|
+
readonly description?: string
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Repository where the db content package is maintained.
|
|
32
|
+
*/
|
|
33
|
+
readonly repository?: string
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* List of external links for this Badge. Wiki, forums, etc.
|
|
37
|
+
*/
|
|
38
|
+
readonly links?: Link[]
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* List of the game server names in this server group.
|
|
42
|
+
* Torchbearer, Excelsior, etc.
|
|
43
|
+
*/
|
|
44
|
+
readonly servers?: string[]
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* List of archetypes available in this server group.
|
|
48
|
+
*/
|
|
49
|
+
readonly archetypes?: ArchetypeData[]
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* List of game maps supported by this server group.
|
|
53
|
+
*/
|
|
54
|
+
readonly maps?: GameMapData[]
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* List of badges available on this server group.
|
|
58
|
+
*/
|
|
59
|
+
readonly badges?: BadgeData[]
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Change log for this data package.
|
|
63
|
+
*/
|
|
64
|
+
readonly changelog?: Change[]
|
|
65
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { VidiotMapPointOfInterestData } from './vidiot-map-point-of-interest-data'
|
|
2
|
+
|
|
3
|
+
export interface VidiotMapData {
|
|
4
|
+
/**
|
|
5
|
+
* URL of the map image.
|
|
6
|
+
*/
|
|
7
|
+
readonly imageUrl: string
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Name to display for the Vidiot map.
|
|
11
|
+
*/
|
|
12
|
+
readonly name?: string
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* List of Points of Interest labelled on the image.
|
|
16
|
+
*/
|
|
17
|
+
readonly pointsOfInterest?: VidiotMapPointOfInterestData[]
|
|
18
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface VidiotMapPointOfInterestData {
|
|
2
|
+
/**
|
|
3
|
+
* The pixel-space position of the PoI on the map graphic.
|
|
4
|
+
*
|
|
5
|
+
* Screen-space, pixels from top-left `[0, 0]`.
|
|
6
|
+
*/
|
|
7
|
+
readonly pos?: [number, number]
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Freeform notes about the PoI.
|
|
11
|
+
*
|
|
12
|
+
* Supports {@link https://www.markdownguide.org/|Markdown} format.
|
|
13
|
+
*/
|
|
14
|
+
readonly notes?: string
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* If the POI is a zone transfer, the map it transfers to.
|
|
18
|
+
*/
|
|
19
|
+
readonly mapKey?: string
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* If the POI is a badge, the badge.
|
|
23
|
+
*/
|
|
24
|
+
readonly badgeKey?: string
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* If the POI is a partial for a badge, the partial key.
|
|
28
|
+
*/
|
|
29
|
+
readonly badgePartialKey?: string
|
|
30
|
+
}
|