@adatechnology/game-vehicles-fleet 1.0.0 → 2.0.0
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/README.md +4 -0
- package/dist/index.d.ts +57 -1
- package/dist/index.global.js +2228 -6
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +2228 -6
- package/dist/index.js.map +1 -1
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -122,3 +122,7 @@ const carro = kit.build('compact_hatch', 'damaged')
|
|
|
122
122
|
Todo o texto em português fica em `src/locales/pt-BR.json`, exatamente como no original. Os ids antigos continuam semeando o visual e o dano, então cada
|
|
123
123
|
veículo sai idêntico ao original (os testes comparam hashes gerados pelo código original). O que é do jogo (zumbis, horda, sangue, placa ZMB) ficou de fora;
|
|
124
124
|
veja "Left for the game adapter". A tabela completa de nomes antigos e novos está em [MIGRATION.md](MIGRATION.md).
|
|
125
|
+
|
|
126
|
+
## Measurements, paint and design cards
|
|
127
|
+
|
|
128
|
+
`fleetDims(id)` (length, width, height in metres as the team measured them), `paintPalettes` and `paletteOf(group)` (13 civil colours and 5 military), `colorFromSeed(seed, palette)` (the same seed gives the same colour; number or text), `fleetStats(id)` (six 0-10 ratings, noise radius, top speed) and `fleetCard(id)` (the design card texts, Brazilian Portuguese). The data are JSON files in `src/data/` written by `tools/vehicles-catalog` from the team's Frota Leve and Frota pages.
|
package/dist/index.d.ts
CHANGED
|
@@ -3412,4 +3412,60 @@ interface FleetContext {
|
|
|
3412
3412
|
label(key: string): FleetLabel;
|
|
3413
3413
|
}
|
|
3414
3414
|
|
|
3415
|
-
|
|
3415
|
+
/** Length, width and height of a vehicle in metres, as the team measured the full-detail build in the output frame (front = length). */
|
|
3416
|
+
interface FleetDims {
|
|
3417
|
+
length: number;
|
|
3418
|
+
width: number;
|
|
3419
|
+
height: number;
|
|
3420
|
+
}
|
|
3421
|
+
/** The measured size of a fleet vehicle (Frota Leve `DIMS`). The data lives in `data/dims.json`, written by `tools/vehicles-catalog`. */
|
|
3422
|
+
declare const fleetDims: (id: FleetVehicleId | string) => FleetDims | undefined;
|
|
3423
|
+
/** Every measured size by vehicle id. */
|
|
3424
|
+
declare const allFleetDims: () => Readonly<Record<string, FleetDims>>;
|
|
3425
|
+
|
|
3426
|
+
/** `[hex, weight]` pairs: a weighted colour table. */
|
|
3427
|
+
type PaintPalette = ReadonlyArray<readonly [string, number]>;
|
|
3428
|
+
/** The two palettes of the team: realistic civilian colours (13) and military greens and sands (5). Data in `data/paint.json`. */
|
|
3429
|
+
declare const paintPalettes: {
|
|
3430
|
+
readonly civil: PaintPalette;
|
|
3431
|
+
readonly military: PaintPalette;
|
|
3432
|
+
};
|
|
3433
|
+
/** The palette a vehicle is painted from: military vehicles take the military one. */
|
|
3434
|
+
declare const paletteOf: (group: FleetGroupId | string) => PaintPalette;
|
|
3435
|
+
/**
|
|
3436
|
+
* A colour picked from a weighted palette by a seed (a number or any string): the same seed gives the same colour, on every machine.
|
|
3437
|
+
* Port of `corDaSemente` (frota-leve.js 14177-14186).
|
|
3438
|
+
*/
|
|
3439
|
+
declare const colorFromSeed: (seed: number | string, palette?: PaintPalette) => string;
|
|
3440
|
+
|
|
3441
|
+
/** The design ratings of a vehicle in the Frota document: six 0-10 ratings, the radius its noise carries and its top speed. */
|
|
3442
|
+
interface FleetStats {
|
|
3443
|
+
speed: number;
|
|
3444
|
+
acceleration: number;
|
|
3445
|
+
handling: number;
|
|
3446
|
+
toughness: number;
|
|
3447
|
+
load: number;
|
|
3448
|
+
consumption: number;
|
|
3449
|
+
/** Metres the engine noise carries. */
|
|
3450
|
+
noiseRadius: number;
|
|
3451
|
+
maxSpeedKmh: number;
|
|
3452
|
+
}
|
|
3453
|
+
/** The texts of a vehicle's design card (the team wrote them in Brazilian Portuguese). */
|
|
3454
|
+
interface FleetCard {
|
|
3455
|
+
name: string;
|
|
3456
|
+
kind: string;
|
|
3457
|
+
description: string;
|
|
3458
|
+
inspiredBy: string;
|
|
3459
|
+
seats: string;
|
|
3460
|
+
tank: string;
|
|
3461
|
+
efficiency: string;
|
|
3462
|
+
fuel: string;
|
|
3463
|
+
autonomy: string;
|
|
3464
|
+
tags: string[];
|
|
3465
|
+
}
|
|
3466
|
+
/** Design ratings by vehicle id (data in `data/stats.json`, written by `tools/vehicles-catalog`). */
|
|
3467
|
+
declare const fleetStats: (id: FleetVehicleId | string) => FleetStats | undefined;
|
|
3468
|
+
/** The design card in Brazilian Portuguese; other languages are not translated yet. */
|
|
3469
|
+
declare const fleetCard: (id: FleetVehicleId | string) => FleetCard | undefined;
|
|
3470
|
+
|
|
3471
|
+
export { type FleetCard, type FleetContext, type FleetDims, type FleetFuel, type FleetGroupId, type FleetLabel, type FleetOptions, type FleetScenarioId, type FleetShared, type FleetStats, type FleetVehicleId, type PaintPalette, agricultural, air, allFleetDims, cars, colorFromSeed, createFleetPack, createScenarios, en as enLocale, fleetCard, fleetDims, fleetGroupIds, fleetGroups, fleetPack, fleetStats, fleetVehicleIds, heavy, installFleet, legacyGlassLabels, legacyScenarioSeeds, legacyVehicleSeeds, legacyZoneIds, military, motorcycles, paintPalettes, paletteOf, pickups, ptBR as ptBrLocale, scenarioIds, suvs, vans, version, water };
|