Skip to content

Commit

Permalink
docs: format and improve bug report form (#217)
Browse files Browse the repository at this point in the history
* chore: simplify tasks

* chore: do not wrap proses in markdown

* style: format markdowns

* style: format typescript

* chore: do not reveal kotlin on vscode

* chore(github): console usage guide

* chore(github): bug report language dropdown
  • Loading branch information
scarf005 authored Aug 5, 2023
1 parent affee6d commit 4e3caba
Show file tree
Hide file tree
Showing 18 changed files with 110 additions and 133 deletions.
47 changes: 40 additions & 7 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,37 @@ body:
value: |
## Thanks for reaching out!
please make sure that you're
- using consise title (e.g:`Amplified Shoot The Moon uses 3 energy instead of 2`).
Please make sure that you're
- using concise title (e.g:`Amplified Shoot The Moon uses 3 energy instead of 2`).
- using the latest version of this mod.
- using minimal set of mods enabled to reproduce the bug.
## Console
To make reproducing bugs easier, please use basemod's **[Console](https://alexdriedger.github.io/SlayTheSpireModding/docs/console)** command, surrounded with backtick (`` ` ``) for each steps.
### How to enable and use console
![mods](https://user-images.githubusercontent.com/54838975/233089827-1382b9f7-74ea-4261-b020-0605964cc784.png)
1. Visit `Mods` in the main menu.
![basemod](https://user-images.githubusercontent.com/54838975/233089870-e4f712dd-318c-4abc-9518-380cd448b206.png)
2. Click `BaseMod`.
3. Click `Enable dev console` and `Enable Autocompletion`.
![console usage example](https://github-production-user-asset-6210df.s3.amazonaws.com/54838975/258566362-aee9fd69-4ace-4482-b345-2fc8b87ab1c2.png)
4. Open console using (`` ` ``) key (the key right below ESC key which also has `~`).
5. Use console command to reproduce the bug.
- type: textarea
attributes:
label: How to reproduce
description: >
To make reproducing bugs easier, please use basemod's
**[Console](https://alexdriedger.github.io/SlayTheSpireModding/docs/console)**
command, surrounded with backtick (\`) for each steps.
Screenshot or Videos are also welcome.
description: Console steps that reliably reproduce the bug. Screenshot or Videos are also welcome.
placeholder: |
1. Start a new game with Marisa.
2. `fight Lagavulin`
Expand All @@ -33,6 +51,21 @@ body:
validations:
required: true

- type: dropdown
attributes:
label: Game language
description: Which language were you using in the game?
multiple: false
options:
- English (ENG)
- French (FRA)
- Japanese (JPN)
- Korean (KOR)
- Simplified Chinese (ZHS)
- Traditional Chinese (ZHT)
validations:
required: true

- type: textarea
attributes:
label: Crash log
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

- name: validate schema
continue-on-error: true
run: deno task schema:validate
run: deno task l10n validate

- name: json syntax check
uses: limitusus/json-syntax-check@v1
Expand Down
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,8 @@
],
"url": "./src/main/resources/localization/schemas/potions.json"
}
]
],
"explorer.autoRevealExclude": {
"src/main/kotlin": true
}
}
10 changes: 3 additions & 7 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

## Touhou Project

This project is a fan work based on Touhou Project and follows
[Touhou Project Fan Work Guidelines][touhou].
This project is a fan work based on Touhou Project and follows [Touhou Project Fan Work Guidelines][touhou].

## File Hierarchy

Expand All @@ -25,9 +24,7 @@ Source code of this project is licensed under [MIT][mit].

#### Images(`img/`)

With the confirmation from former project lead
([@lf201014](https:github.com/lf201014)), project resources are licensed under
[CC BY-NC-SA 4.0][cc-by-nc-sa].
With the confirmation from former project lead ([@lf201014](https:github.com/lf201014)), project resources are licensed under [CC BY-NC-SA 4.0][cc-by-nc-sa].

Project resources includes, but not limited to:

Expand All @@ -39,8 +36,7 @@ Project resources includes, but not limited to:

#### Audio(`audio/`)

`/master-spark.ogg` is modified from
<https://freesound.org/people/Jacoder23/sounds/577081/>
`/master-spark.ogg` is modified from <https://freesound.org/people/Jacoder23/sounds/577081/>

[mit]: LICENSES/MIT.txt
[touhou]: LICENSES/Touhou.md
Expand Down
38 changes: 8 additions & 30 deletions LICENSES/Touhou.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ original url: <https://touhou-project.news/guidelines_en/>

(UPDATE:November 10, 2020)

**In short, you may simply use your common sense if you're an individual or
group (as opposed to a legal person) creating Fan Content (stuff you make based
on Touhou Project) just for fun.** **However, your Fan Content has to comply
with the following rules:**
**In short, you may simply use your common sense if you're an individual or group (as opposed to a legal person) creating Fan Content (stuff you make based on Touhou Project) just for fun.** **However, your Fan Content has to comply with the following rules:**

#### Your Fan Content should always have:

Expand All @@ -17,18 +14,15 @@ with the following rules:**

- Anything that means to harm Touhou Project's reputation.
- Anything that infringes upon other intellectual property.
- Anything that means to mistake your Fan Content as one of the official Touhou
Project titles.
- Anything that means to mistake your Fan Content as one of the official Touhou Project titles.
- Anything that is extracted from official Touhou Project games.
- Ending scenes from official Touhou Project games.
- Anything that means to advertise personal beliefs beyond the bounds of
fiction.
- Anything that means to advertise personal beliefs beyond the bounds of fiction.
- Other Touhou Fan Content without the creator's permission.
- Excessive sexual content that is considered unlawful.
- Anything that promotes hatred against individuals or groups.

Though not relevant to Fan Content, posting or modifying photos of ZUN himself
without ZUN's permission is prohibited.
Though not relevant to Fan Content, posting or modifying photos of ZUN himself without ZUN's permission is prohibited.

#### Distribution

Expand All @@ -47,34 +41,18 @@ Examples (includes but not limited to):
- Touhou Digital Music Distribution
- Local events with admission fees on an individual scale

Browser games and mobile games can only be released as free-to-play games. Other
forms of monetizations such as in-app advertisement and ad removal as an in-app
purchase are allowed. Fan-made video content, including let's play videos, may
be uploaded through video-sharing platforms alike. If you have obtained an
explicit license from Team Shanghai Alice, please clarify such an association in
your Fan Content. You are solely responsible for any troubles caused by your Fan
Content. Under no circumstances will Team Shanghai Alice be held responsible for
any damages. If you are a legal person creating Fan Content as a business
activity, please contact us.
Browser games and mobile games can only be released as free-to-play games. Other forms of monetizations such as in-app advertisement and ad removal as an in-app purchase are allowed. Fan-made video content, including let's play videos, may be uploaded through video-sharing platforms alike. If you have obtained an explicit license from Team Shanghai Alice, please clarify such an association in your Fan Content. You are solely responsible for any troubles caused by your Fan Content. Under no circumstances will Team Shanghai Alice be held responsible for any damages. If you are a legal person creating Fan Content as a business activity, please contact us.

### Disclaimer

The intention of this guideline is to provide fan creators with a brief
understanding of dos and don'ts in a lenient manner. We do not answer any
questions from individuals or groups regarding these guidelines and Fan Content
policy. We may contact you directly if we consider your Fan Content to be a
serious violation of our guidelines. We reserve the right to update this
guideline without any notices.
The intention of this guideline is to provide fan creators with a brief understanding of dos and don'ts in a lenient manner. We do not answer any questions from individuals or groups regarding these guidelines and Fan Content policy. We may contact you directly if we consider your Fan Content to be a serious violation of our guidelines. We reserve the right to update this guideline without any notices.

### About previous guidelines

Previous guidelines provided by ZUN are still considered as effective. For
details that are not included in this guideline, please consult previous
guidelines linked below.
Previous guidelines provided by ZUN are still considered as effective. For details that are not included in this guideline, please consult previous guidelines linked below.

- [Relevant Pages of Team Shanghai Alice's Fan Content Policy (Mr. Takker's website)](http://takker6.tada-katsu.com/t-081.html)
- [Details regarding "One-day Permission" and business activity (published on Dec. 10th, 2008)](https://kourindou.exblog.jp/9178184/)
- [Contact Form for Legal Person (published on Feb. 14th, 2011)](https://kourindou.exblog.jp/14218252/)

Special thanks to Mr. Takker for hosting Touhou Project creator guidelines ever
since.
Special thanks to Mr. Takker for hosting Touhou Project creator guidelines ever since.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,15 @@
<h1>Marisa: Continued</h1>
</div>

a [re-continued][original] mod for [**Slay the Spire**][sts], which adds
**[Marisa Kirisame][marisa]** from Touhou Project as a playable character.
a [re-continued][original] mod for [**Slay the Spire**][sts], which adds **[Marisa Kirisame][marisa]** from Touhou Project as a playable character.

> **Note**
> _**Marisa:** Continued_ is a fork of [STS_ThMod_MRS][original-github]
> mod. Credits goes to the original authors.
> **Note**
>
> _**Marisa:** Continued_ is a fork of [STS_ThMod_MRS][original-github] mod. Credits goes to the original authors.
> **Warning**
> Due to life issues, this project is **currently not reciving active maintenance**.
> While I will review PRs as soon as possible, please note that I may not be able to dedicate much time on this project. Consequently, issues may not be addressed in a timely manner. I apologize for the inconvenience.
>
> Due to life issues, this project is **currently not recieving active maintenance**. While I will review PRs as soon as possible, please note that I may not be able to dedicate much time on this project. Consequently, issues may not be addressed in a timely manner. I apologize for the inconvenience.
## New features

Expand Down Expand Up @@ -84,8 +83,9 @@ subscribe [ModTheSpire][modthespire] and [BaseMod][basemod].

#### Compile from source

> **Warning** development environment is only tested on linux. may not work for
> other OS
> **Warning**
>
> development environment is only tested on linux. may not work for other OS
git clone repository `https://github.com/scarf005/Marisa.git`

Expand Down
11 changes: 6 additions & 5 deletions deno.jsonc
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"tasks": {
"schema": "deno task --cwd localization/ schema",
"schema:vscode": "deno task --cwd localization/ schema:vscode",
"schema:validate": "deno task --cwd localization/ validate",
"schema:fmt": "deno task --cwd localization/ fmt",
"l10n": "deno task --cwd localization/",
"link": "deno run --allow-read --allow-write --allow-env ./scripts/link/mod.ts"
},
"exclude": ["src/main/kotlin/", "src/main/resources/img", "build/"],
"fmt": { "options": { "semiColons": false } },
"fmt": {
"semiColons": false,
"lineWidth": 100,
"proseWrap": "never"
},
"compilerOptions": { "exactOptionalPropertyTypes": true }
}
44 changes: 20 additions & 24 deletions scripts/link/hardlink.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
import { join } from "https://deno.land/std@0.183.0/path/mod.ts"
import { brightRed } from "https://deno.land/std@0.183.0/fmt/colors.ts"
import { resolve } from "https://deno.land/std@0.183.0/path/mod.ts"
import { magenta } from "https://deno.land/std@0.183.0/fmt/colors.ts"
import { brightRed, magenta } from "https://deno.land/std@0.183.0/fmt/colors.ts"
import { join, resolve } from "https://deno.land/std@0.183.0/path/mod.ts"

import promiseObject from "https://deno.land/x/promise_object@v0.10.0/index.ts"

import { match, P } from "npm:ts-pattern"

import { parse } from "https://deno.land/std@0.183.0/path/mod.ts"
import { hardlink, inode } from "./inode.ts"
import { fmt, Logger } from "./logger.ts"
import { noop } from "./noop.ts"
import { parse } from "https://deno.land/std@0.183.0/path/win32.ts"

export type LinkMeta = {
from: string
Expand All @@ -20,17 +18,16 @@ export type LinkMeta = {
isHardLinked: boolean
}

const hardLinkMeta =
(from: string) => async (to: string): Promise<LinkMeta> => {
const target = join(to, parse(from).base)
const { fromIno, targetIno } = await promiseObject({
fromIno: inode(from)(),
targetIno: inode(target)(),
})
const isHardLinked = fromIno === targetIno
const hardLinkMeta = (from: string) => async (to: string): Promise<LinkMeta> => {
const target = join(to, parse(from).base)
const { fromIno, targetIno } = await promiseObject({
fromIno: inode(from)(),
targetIno: inode(target)(),
})
const isHardLinked = fromIno === targetIno

return { from, target, fromIno, targetIno, isHardLinked }
}
return { from, target, fromIno, targetIno, isHardLinked }
}

// deno-fmt-ignore
export type LinkAction =
Expand All @@ -49,14 +46,13 @@ export const createHardLink: LinkAction = (log) => (from) => async (target) => {
// deno-fmt-ignore
type ForceCreateLinkTo =
(l: Logger) => (a: LinkAction) => (f: string) => (t: string) => Promise<void>
export const forceCreateLinkTo: ForceCreateLinkTo =
(log) => (action) => (from) => async (to) => {
const meta = await hardLinkMeta(from)(to)
const doHardLink = (target: string) => action(log)(from)(target)
export const forceCreateLinkTo: ForceCreateLinkTo = (log) => (action) => (from) => async (to) => {
const meta = await hardLinkMeta(from)(to)
const doHardLink = (target: string) => action(log)(from)(target)

fmt(log)(meta)
fmt(log)(meta)

await match(meta)
.with({ isHardLinked: false, target: P.select() }, doHardLink)
.otherwise(noop)
}
await match(meta)
.with({ isHardLinked: false, target: P.select() }, doHardLink)
.otherwise(noop)
}
6 changes: 1 addition & 5 deletions scripts/link/logger.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import {
brightGreen,
brightRed,
brightYellow,
} from "https://deno.land/std@0.183.0/fmt/colors.ts"
import { brightGreen, brightRed, brightYellow } from "https://deno.land/std@0.183.0/fmt/colors.ts"

import { c, p } from "https://deno.land/x/copb@v1.0.1/mod.ts"

Expand Down
10 changes: 3 additions & 7 deletions src/main/resources/localization/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,15 @@ directories below are named after the language code used in the game.

### Schema generation

running `deno run -A schema.ts` will generate a [json schema][json-schema] file
and [zod object][zod] in `schemas/` directory based on localizations in `ENG`
directory.
running `deno run -A schema.ts` will generate a [json schema][json-schema] file and [zod object][zod] in `schemas/` directory based on localizations in `ENG` directory.

### Schema Validation

run `deno run -A validate.ts` to check if all localization files are valid using
schemas generated from [schema generation](#schema-generation)
run `deno run -A validate.ts` to check if all localization files are valid using schemas generated from [schema generation](#schema-generation)

### Vscode json schema generation

running `deno run -A vscode.ts` will populate `settings.json` file with schema
paths that will validate json files in vscode.
running `deno run -A vscode.ts` will populate `settings.json` file with schema paths that will validate json files in vscode.

[json-schema]: https://json-schema.org
[zod]: https://zod.dev
6 changes: 2 additions & 4 deletions src/main/resources/localization/deno.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
"tasks": {
"schema": "deno run -A schema.ts",
"schema:vscode": "deno run -A vscode.ts",
"validate": "deno run -A validate.ts",
"fmt": "deno fmt schemas/"
},
"fmt": { "options": { "semiColons": false } }
"validate": "deno run -A validate.ts"
}
}
4 changes: 1 addition & 3 deletions src/main/resources/localization/dirEntries.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ import { assertEquals } from "https://deno.land/std@0.178.0/testing/asserts.ts"
import { dirEntries } from "./dirEntries.ts"

Deno.test(async function testDirEntries() {
const path = Deno.cwd().endsWith("localization")
? "."
: "src/main/resources/localization"
const path = Deno.cwd().endsWith("localization") ? "." : "src/main/resources/localization"

const entries = (await dirEntries(`${path}/ENG`))
.map((x) => x.name)
Expand Down
7 changes: 2 additions & 5 deletions src/main/resources/localization/dprint.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import {
createFromBuffer,
GlobalConfiguration,
} from "https://deno.land/x/dprint@0.2.0/mod.ts"
import { join } from "https://deno.land/std@0.178.0/path/mod.ts"
import * as log from "https://deno.land/std@0.178.0/log/mod.ts"
import { join } from "https://deno.land/std@0.178.0/path/mod.ts"
import { createFromBuffer, GlobalConfiguration } from "https://deno.land/x/dprint@0.2.0/mod.ts"
import { projectRoot } from "./common.ts"

const globalConfig: GlobalConfiguration = {
Expand Down
8 changes: 2 additions & 6 deletions src/main/resources/localization/editVariables.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import type { Entry } from "npm:type-fest"
import { brightGreen, brightRed, brightYellow } from "https://deno.land/std@0.183.0/fmt/colors.ts"
import { Command } from "https://deno.land/x/cliffy@v0.25.7/command/mod.ts"
import {
brightGreen,
brightRed,
brightYellow,
} from "https://deno.land/std@0.183.0/fmt/colors.ts"
import type { Entry } from "npm:type-fest"

import cardsEng from "./ENG/cards.json" assert { type: "json" }
import cardsFra from "./FRA/cards.json" assert { type: "json" }
Expand Down
Loading

0 comments on commit 4e3caba

Please sign in to comment.