mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Add more schema badges
This commit is contained in:
parent
13503a11b2
commit
6a2997693b
4
docs/.vscode/extensions.json
vendored
4
docs/.vscode/extensions.json
vendored
@ -1,4 +0,0 @@
|
||||
{
|
||||
"recommendations": ["astro-build.astro-vscode"],
|
||||
"unwantedRecommendations": []
|
||||
}
|
||||
11
docs/.vscode/launch.json
vendored
11
docs/.vscode/launch.json
vendored
@ -1,11 +0,0 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"command": "./node_modules/.bin/astro dev",
|
||||
"name": "Development server",
|
||||
"request": "launch",
|
||||
"type": "node-terminal"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -160,7 +160,7 @@ You can load your XML file to your planet by doing adding the following to your
|
||||
### Entry Layout
|
||||
|
||||
By default, entries in rumor mode are laid out by rows, where each row is one planet. This will not make for a perfect
|
||||
layout, so you can use the `entryPositions` property in your star system config to change them
|
||||
layout, so you can use the `entryPositions` property in your star system config to change them.
|
||||
For example, if I want to change an entry with the ID of `EXAMPLE_ENTRY` and another with the ID of `EXAMPLE_ENTRY_2`:
|
||||
|
||||
```json
|
||||
@ -184,7 +184,7 @@ For example, if I want to change an entry with the ID of `EXAMPLE_ENTRY` and ano
|
||||
}
|
||||
```
|
||||
|
||||
To help with this, download the unity explorer mod and manually position entries, then simply use the dev tools to dump all the entries to a json string you can copy and paste into your config.
|
||||
To help with this, download the unity explorer mod and manually position entries (they're located under `Ship_Body/Module_Cabin/Systems_Cabin/ShipLogPivot/ShipLog/ShipLogPivot/ShipLogCanvas/MapMode/ScaleRoot/PanRoot`), then simply use the dev tools to dump all the entries to a json string you can copy and paste into your config.
|
||||
|
||||

|
||||
_A set of entries laid out with auto mode_
|
||||
@ -210,12 +210,10 @@ would be `EXAMPLE_ENTRY_ALT.png`.
|
||||
|
||||
### Curiosity Colors
|
||||
|
||||
Colors for each curiosity is given in a list, so if I wanted the curiosity `EXAMPLE_ENTRY` to have a color of blue:
|
||||
Colors for each curiosity is given in a list **within the star system config**, so if I wanted the curiosity `EXAMPLE_ENTRY` to have a color of blue:
|
||||
|
||||
```json
|
||||
{
|
||||
"ShipLog": {
|
||||
"xmlFile": "planets/example.xml",
|
||||
"curiosities": [
|
||||
{
|
||||
"id": "EXAMPLE_ENTRY",
|
||||
@ -233,7 +231,6 @@ Colors for each curiosity is given in a list, so if I wanted the curiosity `EXAM
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@ -123,7 +123,18 @@ export const SchemaTools = {
|
||||
getAdditionalBadges: (schema: Schema) => {
|
||||
switch (schema.internalSchema.type) {
|
||||
case "JSON":
|
||||
return [];
|
||||
const internalSchema = schema.internalSchema.val;
|
||||
const badges = [];
|
||||
if (internalSchema.minimum !== undefined) {
|
||||
badges.push(`Minimum: ${internalSchema.minimum}`);
|
||||
}
|
||||
if (internalSchema.maximum !== undefined) {
|
||||
badges.push(`Maximum: ${internalSchema.maximum}`);
|
||||
}
|
||||
if (internalSchema.default !== undefined) {
|
||||
badges.push(`Default: ${internalSchema.default}`);
|
||||
}
|
||||
return badges;
|
||||
case "XML":
|
||||
const node = schema.internalSchema.val;
|
||||
if (node.name === "xs:complexType") return [];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user