Add ship design constants in the shared module
This commit is contained in:
parent
ad9ad389b6
commit
d1e37d8fec
3 changed files with 43 additions and 0 deletions
17
common/src/data/colours.ts
Normal file
17
common/src/data/colours.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
import { IColour } from "../types/Colour";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The colours that can be used by the user to make their ship unique. Each
|
||||||
|
* player is assigned a random, unused, colour when they join the lobby.
|
||||||
|
*/
|
||||||
|
export const colours: IColour[] = [
|
||||||
|
{ name: "Green", hex: "#00aa00" },
|
||||||
|
{ name: "Blue", hex: "#0077b6" },
|
||||||
|
{ name: "Red", hex: "#cb0b0a" },
|
||||||
|
{ name: "Purple", hex: "#7400b8" },
|
||||||
|
{ name: "Orange", hex: "#faa307" },
|
||||||
|
{ name: "Light Green", hex: "#9ef01a" },
|
||||||
|
{ name: "Magenta", hex: "#b7094c" },
|
||||||
|
{ name: "Pink", hex: "#f72585" },
|
||||||
|
{ name: "Yellow", hex: "#f9c80e" },
|
||||||
|
];
|
||||||
22
common/src/data/spaceships.ts
Normal file
22
common/src/data/spaceships.ts
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
import { ISpaceship } from "../types/Spaceship";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The spaceships that are supported in the system, the "id" property **must**
|
||||||
|
* exist in the spaceship.svelte file as an icon, otherwise the "space-shuttle"
|
||||||
|
* icon will be used. The first icon in this list will be used by the server to
|
||||||
|
* assign new players' ship icon.
|
||||||
|
*/
|
||||||
|
export const spaceships: ISpaceship[] = [
|
||||||
|
{
|
||||||
|
name: "Space Shuttle",
|
||||||
|
id: "space-shuttle"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Rocket",
|
||||||
|
id: "rocket"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Sailboat",
|
||||||
|
id: "sailboat"
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
@ -4,6 +4,10 @@
|
||||||
// Algorithms
|
// Algorithms
|
||||||
export * from "./algorithms/movementDirection";
|
export * from "./algorithms/movementDirection";
|
||||||
|
|
||||||
|
// Data
|
||||||
|
export * from "./data/colours";
|
||||||
|
export * from "./data/spaceships";
|
||||||
|
|
||||||
// Data Structures
|
// Data Structures
|
||||||
export * from "./types/Colour";
|
export * from "./types/Colour";
|
||||||
export * from "./types/Spaceship";
|
export * from "./types/Spaceship";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue