Initial Commit
This commit is contained in:
parent
cc3ba93f60
commit
fb398ae315
2 changed files with 272 additions and 2 deletions
39
README.md
39
README.md
|
@ -1,3 +1,38 @@
|
|||
# space-engineers-thrust-calculator
|
||||
# create-svelte
|
||||
|
||||
Space Engineer Thruster Calculator
|
||||
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte).
|
||||
|
||||
## Creating a project
|
||||
|
||||
If you're seeing this, you've probably already done this step. Congrats!
|
||||
|
||||
```bash
|
||||
# create a new project in the current directory
|
||||
npm create svelte@latest
|
||||
|
||||
# create a new project in my-app
|
||||
npm create svelte@latest my-app
|
||||
```
|
||||
|
||||
## Developing
|
||||
|
||||
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
|
||||
# or start the server and open the app in a new browser tab
|
||||
npm run dev -- --open
|
||||
```
|
||||
|
||||
## Building
|
||||
|
||||
To create a production version of your app:
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
|
||||
You can preview the production build with `npm run preview`.
|
||||
|
||||
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
|
||||
|
|
235
src/lib/constants.ts
Normal file
235
src/lib/constants.ts
Normal file
|
@ -0,0 +1,235 @@
|
|||
import {Map} from "svelte/reactivity";
|
||||
|
||||
export enum Grids {
|
||||
Small = "smallGrid",
|
||||
Large = "largeGrid"
|
||||
}
|
||||
|
||||
export enum ThrusterType {
|
||||
Ion = "ion",
|
||||
Atmospheric = "atmos",
|
||||
Hydrogen = "hydrogen",
|
||||
Fusion = "fusion"
|
||||
}
|
||||
|
||||
export enum ThrusterSize {
|
||||
Small = "smallThruster",
|
||||
Large = "largeThruster"
|
||||
}
|
||||
|
||||
export const thrustValues = new Map([
|
||||
[Grids.Large, new Map([
|
||||
[ThrusterType.Atmospheric, new Map([
|
||||
[ThrusterSize.Large, 4500000],
|
||||
[ThrusterSize.Small, 350000]
|
||||
])],
|
||||
[ThrusterType.Ion, new Map([
|
||||
[ThrusterSize.Large, 4320000],
|
||||
[ThrusterSize.Small, 345600]
|
||||
])],
|
||||
[ThrusterType.Fusion, new Map([
|
||||
[ThrusterSize.Large, 666],
|
||||
[ThrusterSize.Small, 666]
|
||||
])],
|
||||
[ThrusterType.Hydrogen, new Map([
|
||||
[ThrusterSize.Large, 7200000],
|
||||
[ThrusterSize.Small, 1080000]
|
||||
])]
|
||||
])],
|
||||
[Grids.Small, new Map([
|
||||
[ThrusterType.Atmospheric, new Map([
|
||||
[ThrusterSize.Large, 340000],
|
||||
[ThrusterSize.Small, 65000]
|
||||
])],
|
||||
[ThrusterType.Ion, new Map([
|
||||
[ThrusterSize.Large, 172800],
|
||||
[ThrusterSize.Small, 14400]
|
||||
])],
|
||||
[ThrusterType.Fusion, new Map([
|
||||
[ThrusterSize.Large, 666],
|
||||
[ThrusterSize.Small, 666]
|
||||
])],
|
||||
[ThrusterType.Hydrogen, new Map([
|
||||
[ThrusterSize.Large, 480000],
|
||||
[ThrusterSize.Small, 98400]
|
||||
])]
|
||||
])]
|
||||
])
|
||||
|
||||
export enum InventoryType {
|
||||
Connector = "connector",
|
||||
CargoSmall = "smallCargo",
|
||||
CargoMedium = "mediumCargo",
|
||||
CargoLarge = "largeCargo",
|
||||
}
|
||||
|
||||
export const inventorySizes = new Map([
|
||||
[Grids.Large, new Map([
|
||||
[InventoryType.CargoLarge, 421000],
|
||||
[InventoryType.CargoMedium, 0],
|
||||
[InventoryType.CargoSmall, 15625],
|
||||
[InventoryType.Connector, 8000]
|
||||
])],
|
||||
[Grids.Small, new Map([
|
||||
[InventoryType.CargoLarge, 15625],
|
||||
[InventoryType.CargoMedium, 3375],
|
||||
[InventoryType.CargoSmall, 125],
|
||||
[InventoryType.Connector, 1152]
|
||||
])],
|
||||
]);
|
||||
|
||||
export const metricModifiers: Map<number, string> = new Map([
|
||||
/*[1000000000, "G"],*/
|
||||
[1000000, "M"],
|
||||
[1000, "k"],
|
||||
[1, ""]
|
||||
])
|
||||
|
||||
export const weightPerVolume = 1/0.37;
|
||||
|
||||
export const localization = new Map([
|
||||
["space engineers", new Map([
|
||||
["en-GB", "Space Engineers"]
|
||||
])],
|
||||
["calculator", new Map([
|
||||
["en-GB", "Calculator"],
|
||||
["de-DE", "Rechner"]
|
||||
])],
|
||||
["gravity", new Map([
|
||||
["en-GB", "Gravity"],
|
||||
["de-DE", "Schwerkraft"]
|
||||
])],
|
||||
["inventory", new Map([
|
||||
["en-GB", "Inventory"],
|
||||
["de-DE", "Inventar"]
|
||||
])],
|
||||
["grid", new Map([
|
||||
["en-GB", "Grid"],
|
||||
["de-DE", "Konstrukt"]
|
||||
])],
|
||||
["size", new Map([
|
||||
["en-GB", "Size"],
|
||||
["de-DE", "Größe"]
|
||||
])],
|
||||
["small", new Map([
|
||||
["en-GB", "Small"],
|
||||
["de-DE", "Klein"]
|
||||
])],
|
||||
["large", new Map([
|
||||
["en-GB", "Large"],
|
||||
["de-DE", "Groß"]
|
||||
])],
|
||||
["add", new Map([
|
||||
["en-GB", "Add"],
|
||||
["de-DE", "Hinzufügen"]
|
||||
])],
|
||||
["liftableWeight", new Map([
|
||||
["en-GB", "Liftable Weight"],
|
||||
["de-DE", "Liftkapazität"]
|
||||
])],
|
||||
["thrust", new Map([
|
||||
["en-GB", "Thrust"],
|
||||
["de-DE", "Schub"]
|
||||
])],
|
||||
["smallGrid", new Map<string, string>([
|
||||
["en-GB", "Small"],
|
||||
["de-DE", "Klein"]
|
||||
])],
|
||||
["largeGrid", new Map<string, string>([
|
||||
["en-GB", "Large"],
|
||||
["de-DE", "Groß"]
|
||||
])],
|
||||
["smallThruster", new Map([
|
||||
["en-GB", "Small"],
|
||||
["de-DE", "Kleiner"]
|
||||
])],
|
||||
["largeThruster", new Map([
|
||||
["en-GB", "Large"],
|
||||
["de-DE", "Großer"]
|
||||
])],
|
||||
["connector", new Map([
|
||||
["en-GB", "Connector"],
|
||||
["de-DE", "Verbinder"]
|
||||
])],
|
||||
["smallCargo", new Map([
|
||||
["en-GB", "Small Cargo Container"],
|
||||
["de-DE", "Kleiner Frachtcontainer"]
|
||||
])],
|
||||
["mediumCargo", new Map([
|
||||
["en-GB", "Medium Cargo Container"],
|
||||
["de-DE", "Mittlerer Frachtcontainer"]
|
||||
])],
|
||||
["largeCargo", new Map([
|
||||
["en-GB", "Large Cargo Container"],
|
||||
["de-DE", "Großer Frachtcontainer"]
|
||||
])],
|
||||
["fusion", new Map([
|
||||
["en-GB", "Fusion"],
|
||||
["de-DE", "Fusion"]
|
||||
])],
|
||||
["hydrogen", new Map([
|
||||
["en-GB", "Hydrogen"],
|
||||
["de-DE", "Wasserstoff"]
|
||||
])],
|
||||
["ion", new Map([
|
||||
["en-GB", "Ion"],
|
||||
["de-DE", "Ionen"]
|
||||
])],
|
||||
["atmos", new Map([
|
||||
["en-GB", "Atmospheric"],
|
||||
["de-DE", "Atmosphären"]
|
||||
])],
|
||||
["addInventory", new Map([
|
||||
["en-GB", "Add Inventory"],
|
||||
["de-DE", "Inventar hinzufügen"]
|
||||
])],
|
||||
["multiplier", new Map([
|
||||
["en-GB", "multiplicator"],
|
||||
["de-DE", "Multiplikator"]
|
||||
])],
|
||||
["inventories", new Map([
|
||||
["en-GB", "inventories"],
|
||||
["de-DE", "Inventare"]
|
||||
])],
|
||||
["thrusterSettings", new Map([
|
||||
["en-GB", "Thruster Settings"],
|
||||
["de-DE", "Triebwerk Einstellungen"]
|
||||
])],
|
||||
["thrusters", new Map([
|
||||
["en-GB", "Thrusters"],
|
||||
["de-DE", "Triebwerke"]
|
||||
])],
|
||||
["thruster", new Map([
|
||||
["en-GB", "Thruster"],
|
||||
["de-DE", "Triebwerk"]
|
||||
])],
|
||||
["addThruster", new Map([
|
||||
["en-GB", "Add Thruster"],
|
||||
["de-DE", "Triebwerk Hinzufügen"]
|
||||
])],
|
||||
["inventorySettings", new Map([
|
||||
["en-GB", "Inventory Settings"],
|
||||
["de-DE", "Inventar Einstellungen"]
|
||||
])],
|
||||
["volume", new Map([
|
||||
["en-GB", "Volume"],
|
||||
["de-DE", "Volumen"]
|
||||
])],
|
||||
["title", new Map([
|
||||
["en-GB", "Space Engineers Thrust Calculator"],
|
||||
["de.DE", "Space Engineers Schub Rechner"]
|
||||
])],
|
||||
["gridSize", new Map([
|
||||
["en-GB", "Grid Size"],
|
||||
["de-DE", "Block Größe"]
|
||||
])],
|
||||
["separator", new Map([
|
||||
["en-GB", ","],
|
||||
["de-DE", "."]
|
||||
])]
|
||||
])
|
||||
|
||||
export type Thruster = {
|
||||
type: ThrusterType,
|
||||
size: ThrusterSize
|
||||
}
|
Loading…
Reference in a new issue