mirror of
https://github.com/YouHaveTrouble/DiscipleOfLand.git
synced 2026-05-12 06:26:56 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c652821b85 | |||
| 44c2ec5b25 | |||
| 3ff7d43086 | |||
| 521da22993 | |||
| 3e26ee2559 |
+141
@@ -0,0 +1,141 @@
|
|||||||
|
# How to contribute
|
||||||
|
|
||||||
|
All meaningful contributions are welcome. If you're not sure about something,
|
||||||
|
open an issue or [join the discord server](https://discord.youhavetrouble.me/)
|
||||||
|
to talk it out.
|
||||||
|
|
||||||
|
## Reporting issues
|
||||||
|
|
||||||
|
If you find a bug or unexpected behavior, open an issue. Include information about
|
||||||
|
how to reproduce the issue, and any relevant error messages from your browser's
|
||||||
|
console.
|
||||||
|
|
||||||
|
## Pull requests
|
||||||
|
PLEASE OPEN AN ISSUE OR DISCUSS ON DISCORD BEFORE MAKING A PULL REQUEST.
|
||||||
|
|
||||||
|
Noone likes to waste time on a PR that won't be accepted, so please ask first!
|
||||||
|
|
||||||
|
## Inputting data
|
||||||
|
|
||||||
|
Entire project is data-driven and contributions can be made either via pull request or
|
||||||
|
submitting a json file with the data formatted as described below. If anything's unclear,
|
||||||
|
[ask on discord](https://discord.youhavetrouble.me/).
|
||||||
|
|
||||||
|
### Items
|
||||||
|
You can see the existing data [here](https://github.com/YouHaveTrouble/DiscipleOfLand/blob/master/public/data/items.json).
|
||||||
|
Item data adheres to following json schema:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"type": "object",
|
||||||
|
"patternProperties": {
|
||||||
|
"^[a-zA-Z0-9-]+$": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": { "type": "string" },
|
||||||
|
"level": { "type": "integer" },
|
||||||
|
"stars": { "type": "integer" },
|
||||||
|
"perception": { "type": "integer" }
|
||||||
|
},
|
||||||
|
"required": ["name", "level"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"additionalProperties": false
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
### Zones
|
||||||
|
You can see the existing data [here](https://github.com/YouHaveTrouble/DiscipleOfLand/blob/master/public/data/zones.json).
|
||||||
|
Zone data adheres to following json schema:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"type": "object",
|
||||||
|
"patternProperties": {
|
||||||
|
"^[a-zA-Z0-9-]+$": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"en": { "type": "string" }
|
||||||
|
},
|
||||||
|
"required": ["en"]
|
||||||
|
},
|
||||||
|
"aetherytes": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"position": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"x": { "type": "number" },
|
||||||
|
"y": { "type": "number" }
|
||||||
|
},
|
||||||
|
"required": ["x", "y"]
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"en": { "type": "string" }
|
||||||
|
},
|
||||||
|
"required": ["en"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["position", "name"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["name", "aetherytes"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"additionalProperties": false
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Nodes
|
||||||
|
You can see the existing data [here](https://github.com/YouHaveTrouble/DiscipleOfLand/blob/master/public/data/nodes.json).
|
||||||
|
Node data adheres to following json schema:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"job": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["botanist", "miner"]
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["unspoiled", "legendary"]
|
||||||
|
},
|
||||||
|
"position": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"zone": { "type": "string" },
|
||||||
|
"x": { "type": "number" },
|
||||||
|
"y": { "type": "number" }
|
||||||
|
},
|
||||||
|
"required": ["zone", "x", "y"]
|
||||||
|
},
|
||||||
|
"times": {
|
||||||
|
"type": "array",
|
||||||
|
"items": { "type": "string", "pattern": "^\\d{2}:\\d{2}-\\d{2}:\\d{2}$" },
|
||||||
|
"minItems": 2,
|
||||||
|
"maxItems": 2
|
||||||
|
},
|
||||||
|
"items": {
|
||||||
|
"type": "array",
|
||||||
|
"items": { "type": "string" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["job", "type", "position", "times", "items"]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
`times` is an array of two strings representing the time the node is available in Eorzea time.
|
||||||
|
First value is the time the node becomes available, second value is the time the node disappears.
|
||||||
|
|
||||||
|
`items` elements are ids corresponding to the items in the items.json file.
|
||||||
|
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "discipleofland",
|
"name": "discipleofland",
|
||||||
"version": "0.0.7",
|
"version": "0.0.9",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -36,6 +36,7 @@
|
|||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
<p>v{{ version }}</p>
|
<p>v{{ version }}</p>
|
||||||
|
<p><a href="https://github.com/YouHaveTrouble/DiscipleOfLand/blob/master/CONTRIBUTING.MD">Need YOUR help to input node, item and zone data!</a></p>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -227,7 +228,13 @@ nav {
|
|||||||
}
|
}
|
||||||
footer {
|
footer {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
padding: 1rem 0.25rem;
|
||||||
|
gap: 0.5rem;
|
||||||
|
p {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -135,8 +135,7 @@ export default defineComponent({
|
|||||||
watch: {
|
watch: {
|
||||||
filters: {
|
filters: {
|
||||||
handler(newFilters) {
|
handler(newFilters) {
|
||||||
const filters = new Filters(newFilters);
|
window.localStorage.setItem("filters", newFilters.serialize());
|
||||||
window.localStorage.setItem("filters", filters.serialize());
|
|
||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ export default defineComponent(
|
|||||||
let filters: Filters | null = null;
|
let filters: Filters | null = null;
|
||||||
let filtersString = window.localStorage.getItem("filters");
|
let filtersString = window.localStorage.getItem("filters");
|
||||||
if (filtersString === null) {
|
if (filtersString === null) {
|
||||||
window.localStorage.setItem("filters", JSON.stringify(new Filters()));
|
window.localStorage.setItem("filters", new Filters().serialize());
|
||||||
filtersString = window.localStorage.getItem("filters");
|
filtersString = window.localStorage.getItem("filters");
|
||||||
}
|
}
|
||||||
if (filtersString === null) {
|
if (filtersString === null) {
|
||||||
|
|||||||
+25
-10
@@ -18,7 +18,13 @@ export default class Filters {
|
|||||||
) {
|
) {
|
||||||
this.minLevel = data?.minLevel || 91;
|
this.minLevel = data?.minLevel || 91;
|
||||||
this.maxLevel = data?.maxLevel || 100;
|
this.maxLevel = data?.maxLevel || 100;
|
||||||
const jobData = data?.jobs || [Job.BOTANIST, Job.MINER];
|
let jobData = [
|
||||||
|
Job.BOTANIST.toLowerCase(),
|
||||||
|
Job.MINER.toLowerCase()
|
||||||
|
];
|
||||||
|
if (data?.jobs && Array.isArray(data?.jobs) && data?.jobs?.length > 0) {
|
||||||
|
jobData = data.jobs;
|
||||||
|
}
|
||||||
|
|
||||||
for (const job of jobData) {
|
for (const job of jobData) {
|
||||||
const parsedJob = jobFromString(job);
|
const parsedJob = jobFromString(job);
|
||||||
@@ -26,24 +32,33 @@ export default class Filters {
|
|||||||
this.jobs.add(parsedJob);
|
this.jobs.add(parsedJob);
|
||||||
}
|
}
|
||||||
|
|
||||||
const nodeTypeData = data?.nodeTypes || [
|
let nodeTypeData = [
|
||||||
NodeType.UNSPOILED,
|
NodeType.UNSPOILED.toLowerCase(),
|
||||||
];
|
];
|
||||||
|
if (data?.nodeTypes && Array.isArray(data?.nodeTypes) && data?.nodeTypes?.length > 0) {
|
||||||
for (const nodeType of nodeTypeData) {
|
nodeTypeData = data.nodeTypes;
|
||||||
const parsedNodeType = nodeTypeFromString(nodeType);
|
|
||||||
if (!parsedNodeType) continue;
|
|
||||||
this.nodeTypes.add(parsedNodeType);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Array.isArray(nodeTypeData)) {
|
||||||
|
for (const nodeType of nodeTypeData) {
|
||||||
|
const parsedNodeType = nodeTypeFromString(nodeType);
|
||||||
|
if (!parsedNodeType) continue;
|
||||||
|
this.nodeTypes.add(parsedNodeType);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
serialize(): string {
|
serialize(): string {
|
||||||
|
const serializedJobs = Array.from(this.jobs);
|
||||||
|
const serializedNodeTypes = Array.from(this.nodeTypes);
|
||||||
|
|
||||||
return JSON.stringify({
|
return JSON.stringify({
|
||||||
minLevel: this.minLevel,
|
minLevel: this.minLevel,
|
||||||
maxLevel: this.maxLevel,
|
maxLevel: this.maxLevel,
|
||||||
jobs: Array.from(this.jobs).map(job => job),
|
jobs: serializedJobs,
|
||||||
nodeTypes: Array.from(this.nodeTypes).map(nodeType => nodeType),
|
nodeTypes: serializedNodeTypes,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user