Skip to content

Commit

Permalink
Add fleet manager
Browse files Browse the repository at this point in the history
  • Loading branch information
Perlkonig committed Sep 24, 2024
1 parent 9b7760c commit 3777107
Show file tree
Hide file tree
Showing 16 changed files with 375 additions and 67 deletions.
11 changes: 11 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"plugins": ["prettier-plugin-svelte"],
"svelteStrictMode": true,
"svelteAllowShorthand": false,
"svelteIndentScriptAndStyle": true,
"tabWidth": 4,
"singleQuote": false,
"trailingComma": "es5",
"svelteBracketNewLine": true,
"svelteSortOrder": "options-scripts-markup-styles"
}
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [v3.7.0] - 2024-09-24

### Added

* There is now a rudimentary fleet manager, which includes basic import/export and a standalone HTML view one could customize. This involved significant changes to the underlying rendering code. Please let me know if something does not work as you expect.

## [v3.6.0] - 2024-06-14

### Added
Expand Down
68 changes: 45 additions & 23 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ftshipbuilder",
"private": true,
"version": "3.6.0",
"version": "3.7.0",
"description": "A web-based tool for generating valid Full Thrust ships",
"author": "Aaron Dalton <aaron@daltons.ca> (https://www.perlkonig.com)",
"license": "MIT",
Expand All @@ -28,6 +28,8 @@
"@types/robust-point-in-polygon": "^1.0.2",
"chai": "^4.3.7",
"mocha": "^10.2.0",
"prettier": "^3.3.3",
"prettier-plugin-svelte": "^3.2.6",
"svelte": "^3.58.0",
"svelte-check": "^3.2.0",
"svelte-preprocess": "^5.0.3",
Expand All @@ -40,7 +42,7 @@
"@zerodevx/svelte-toast": "^0.9.3",
"canvg": "^4.0.1",
"fast-xml-parser": "^4.2.0",
"ftlibship": "github:perlkonig/ftLibShip#v2.3.0",
"ftlibship": "github:perlkonig/ftLibShip#v2.4.0",
"lz-string": "^1.5.0",
"nanoid": "^4.0.2",
"robust-point-in-polygon": "^1.0.3",
Expand Down
5 changes: 5 additions & 0 deletions src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import Nav from "./components/Nav.svelte";
import { SvelteToast } from '@zerodevx/svelte-toast'
import { onMount } from "svelte";
import Fleet from "./components/Fleet.svelte";
const optionsToast = {};
Expand Down Expand Up @@ -43,6 +44,10 @@
<div class="container">
<SSD/>
</div>
<hr>
<div>
<Fleet/>
</div>
</main>

<footer class="footer">
Expand Down
2 changes: 1 addition & 1 deletion src/components/Builder.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@
<div class="field">
<label class="label" for="hull">Hull strength</label>
<div class="control">
<input id="hull" class="input" type="number" placeholder="Hull strength" bind:value={$ship.hull.points} max="{$ship.mass}">
<input name="hull" class="input" type="number" placeholder="Hull strength" bind:value={$ship.hull.points} max="{$ship.mass}">
</div>
{#if $ship.hull.points < ($ship.mass * 0.1)}
<p class="help is-danger">Hull strength must be at least 10% of total mass.</p>
Expand Down
Loading

0 comments on commit 3777107

Please sign in to comment.