diff --git a/README.ko.md b/README.ko.md index fd39ffe1f0c4..1954268f4704 100644 --- a/README.ko.md +++ b/README.ko.md @@ -1,7 +1,7 @@ # 카타클리즘: 밝은 밤
- + [![en][icon-en]][en] [![ko][icon-ko]][ko] @@ -105,11 +105,11 @@ 게임 내에서 `Submit a bug report on github`를 실행하여 이슈를 제출할 수 있습니다. -| 1. 옵션 (ESC) -> 디버그 메뉴 (a) | 2. 정보 (i) | -| :------------------------------: | :--------------------------: | -| ![](doc/img/readme-bug1.png) | ![](doc/img/readme-bug2.png) | -| 3. 버그 리포트 제출 (U) | 4. 이슈 링크가 생성됩니다 | -| ![](doc/img/readme-bug3.png) | ![](doc/img/readme-bug4.png) | +| 1. 옵션 (ESC) -> 디버그 메뉴 (a) | 2. 정보 (i) | +| :-----------------------------------------------------------: | :-----------------------------------------------------------: | +| ![](doc/src/content/docs/en/contributing/img/readme-bug1.png) | ![](doc/src/content/docs/en/contributing/img/readme-bug2.png) | +| 3. 버그 리포트 제출 (U) | 4. 이슈 링크가 생성됩니다 | +| ![](doc/src/content/docs/en/contributing/img/readme-bug3.png) | ![](doc/src/content/docs/en/contributing/img/readme-bug4.png) | `버전 및 환경 설정(Version and configuration)` 항목이 채워진 이슈가 브라우저에서 열립니다. diff --git a/README.md b/README.md index e03b4a2754b5..b8c8b6ce59bc 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,10 @@ # Cataclysm: Bright Nights
- - -[![en][icon-en]][en] [![ko][icon-ko]][ko] +
-[en]: ./README.md -[icon-en]: https://img.shields.io/badge/lang-en-red?style=flat-square -[ko]: ./README.ko.md -[icon-ko]: https://img.shields.io/badge/lang-ko-orange?style=flat-square - Cataclysm: Bright Nights is a roguelike with sci-fi elements set in a post-apocalyptic world. While some have described it as a "zombie game", there is far more to Cataclysm than that. Struggle @@ -107,11 +100,11 @@ be submitted via debug menu. Run `Submit a bug report on github` inside the game to submit an issue. -| 1. open Options (ESC) -> Debug Menu (a) | 2. open Info (i) | -| :-------------------------------------: | :------------------------------: | -| ![](doc/img/readme-bug1.png) | ![](doc/img/readme-bug2.png) | -| 3. Submit a bug report on github (U) | 4. An link to issue is generated | -| ![](doc/img/readme-bug3.png) | ![](doc/img/readme-bug4.png) | +| 1. open Options (ESC) -> Debug Menu (a) | 2. open Info (i) | +| :-----------------------------------------------------------: | :-----------------------------------------------------------: | +| ![](doc/src/content/docs/en/contributing/img/readme-bug1.png) | ![](doc/src/content/docs/en/contributing/img/readme-bug2.png) | +| 3. Submit a bug report on github (U) | 4. An link to issue is generated | +| ![](doc/src/content/docs/en/contributing/img/readme-bug3.png) | ![](doc/src/content/docs/en/contributing/img/readme-bug4.png) | It will open a bug report on browser with `Version and configuration` filled in. diff --git a/deno.lock b/deno.lock index 0d4e19d722f5..44bab227cdb6 100644 --- a/deno.lock +++ b/deno.lock @@ -1,6 +1,95 @@ { "version": "2", "remote": { - "https://deno.land/std@0.201.0/collections/chunk.ts": "f82c52a82ad9338018570c42f6de0fb132fcb14914c31a444e360ac104d7b55b" + "https://deno.land/std@0.201.0/assert/_constants.ts": "8a9da298c26750b28b326b297316cdde860bc237533b07e1337c021379e6b2a9", + "https://deno.land/std@0.201.0/assert/_diff.ts": "1a3c044aedf77647d6cac86b798c6417603361b66b54c53331b312caeb447aea", + "https://deno.land/std@0.201.0/assert/_format.ts": "a69126e8a469009adf4cf2a50af889aca364c349797e63174884a52ff75cf4c7", + "https://deno.land/std@0.201.0/assert/assert.ts": "9a97dad6d98c238938e7540736b826440ad8c1c1e54430ca4c4e623e585607ee", + "https://deno.land/std@0.201.0/assert/assert_equals.ts": "d8ec8a22447fbaf2fc9d7c3ed2e66790fdb74beae3e482855d75782218d68227", + "https://deno.land/std@0.201.0/assert/assertion_error.ts": "4d0bde9b374dfbcbe8ac23f54f567b77024fb67dbb1906a852d67fe050d42f56", + "https://deno.land/std@0.201.0/assert/equal.ts": "9f1a46d5993966d2596c44e5858eec821859b45f783a5ee2f7a695dfc12d8ece", + "https://deno.land/std@0.201.0/fmt/colors.ts": "87544aa2bc91087bb37f9c077970c85bfb041b48e4c37356129d7b450a415b6f", + "https://deno.land/std@0.201.0/front_matter/mod.ts": "f4a40ed1d5c41af2e664a661879c9dc0c9ca49199f6406da8b62c0aa2a2fb640", + "https://deno.land/std@0.201.0/front_matter/yaml.ts": "a681fbff79b9641379b1ceda27308b6e83ca5d26a1bcfe669cd1289fc3692ac7", + "https://deno.land/std@0.201.0/fs/_util.ts": "fbf57dcdc9f7bc8128d60301eece608246971a7836a3bb1e78da75314f08b978", + "https://deno.land/std@0.201.0/fs/walk.ts": "a16146724a6aaf9efdb92023a74e9805195c3469900744ce5de4113b07b29779", + "https://deno.land/std@0.201.0/path/_basename.ts": "057d420c9049821f983f784fd87fa73ac471901fb628920b67972b0f44319343", + "https://deno.land/std@0.201.0/path/_constants.ts": "e49961f6f4f48039c0dfed3c3f93e963ca3d92791c9d478ac5b43183413136e0", + "https://deno.land/std@0.201.0/path/_dirname.ts": "355e297236b2218600aee7a5301b937204c62e12da9db4b0b044993d9e658395", + "https://deno.land/std@0.201.0/path/_extname.ts": "eaaa5aae1acf1f03254d681bd6a8ce42a9cb5b7ff2213a9d4740e8ab31283664", + "https://deno.land/std@0.201.0/path/_format.ts": "4a99270d6810f082e614309164fad75d6f1a483b68eed97c830a506cc589f8b4", + "https://deno.land/std@0.201.0/path/_from_file_url.ts": "6eadfae2e6f63ad9ee46b26db4a1b16583055c0392acedfb50ed2fc694b6f581", + "https://deno.land/std@0.201.0/path/_interface.ts": "6471159dfbbc357e03882c2266d21ef9afdb1e4aa771b0545e90db58a0ba314b", + "https://deno.land/std@0.201.0/path/_is_absolute.ts": "05dac10b5e93c63198b92e3687baa2be178df5321c527dc555266c0f4f51558c", + "https://deno.land/std@0.201.0/path/_join.ts": "815f5e85b042285175b1492dd5781240ce126c23bd97bad6b8211fe7129c538e", + "https://deno.land/std@0.201.0/path/_normalize.ts": "a19ec8706b2707f9dd974662a5cd89fad438e62ab1857e08b314a8eb49a34d81", + "https://deno.land/std@0.201.0/path/_os.ts": "d932f56d41e4f6a6093d56044e29ce637f8dcc43c5a90af43504a889cf1775e3", + "https://deno.land/std@0.201.0/path/_parse.ts": "0f9b0ff43682dd9964eb1c4398610c4e165d8db9d3ac9d594220217adf480cfa", + "https://deno.land/std@0.201.0/path/_relative.ts": "27bdeffb5311a47d85be26d37ad1969979359f7636c5cd9fcf05dcd0d5099dc5", + "https://deno.land/std@0.201.0/path/_resolve.ts": "7a3616f1093735ed327e758313b79c3c04ea921808ca5f19ddf240cb68d0adf6", + "https://deno.land/std@0.201.0/path/_to_file_url.ts": "a141e4a525303e1a3a0c0571fd024552b5f3553a2af7d75d1ff3a503dcbb66d8", + "https://deno.land/std@0.201.0/path/_to_namespaced_path.ts": "0d5f4caa2ed98ef7a8786286df6af804b50e38859ae897b5b5b4c8c5930a75c8", + "https://deno.land/std@0.201.0/path/_util.ts": "4e191b1bac6b3bf0c31aab42e5ca2e01a86ab5a0d2e08b75acf8585047a86221", + "https://deno.land/std@0.201.0/path/basename.ts": "bdfa5a624c6a45564dc6758ef2077f2822978a6dbe77b0a3514f7d1f81362930", + "https://deno.land/std@0.201.0/path/common.ts": "ee7505ab01fd22de3963b64e46cff31f40de34f9f8de1fff6a1bd2fe79380000", + "https://deno.land/std@0.201.0/path/dirname.ts": "b6533f4ee4174a526dec50c279534df5345836dfdc15318400b08c62a62a39dd", + "https://deno.land/std@0.201.0/path/extname.ts": "62c4b376300795342fe1e4746c0de518b4dc9c4b0b4617bfee62a2973a9555cf", + "https://deno.land/std@0.201.0/path/format.ts": "110270b238514dd68455a4c54956215a1aff7e37e22e4427b7771cefe1920aa5", + "https://deno.land/std@0.201.0/path/from_file_url.ts": "9f5cb58d58be14c775ec2e57fc70029ac8b17ed3bd7fe93e475b07280adde0ac", + "https://deno.land/std@0.201.0/path/glob.ts": "593e2c3573883225c25c5a21aaa8e9382a696b8e175ea20a3b6a1471ad17aaed", + "https://deno.land/std@0.201.0/path/is_absolute.ts": "0b92eb35a0a8780e9f16f16bb23655b67dace6a8e0d92d42039e518ee38103c1", + "https://deno.land/std@0.201.0/path/join.ts": "31c5419f23d91655b08ec7aec403f4e4cd1a63d39e28f6e42642ea207c2734f8", + "https://deno.land/std@0.201.0/path/mod.ts": "6e1efb0b13121463aedb53ea51dabf5639a3172ab58c89900bbb72b486872532", + "https://deno.land/std@0.201.0/path/normalize.ts": "6ea523e0040979dd7ae2f1be5bf2083941881a252554c0f32566a18b03021955", + "https://deno.land/std@0.201.0/path/parse.ts": "be8de342bb9e1924d78dc4d93c45215c152db7bf738ec32475560424b119b394", + "https://deno.land/std@0.201.0/path/posix.ts": "0a1c1952d132323a88736d03e92bd236f3ed5f9f079e5823fae07c8d978ee61b", + "https://deno.land/std@0.201.0/path/relative.ts": "8bedac226afd360afc45d451a6c29fabceaf32978526bcb38e0c852661f66c61", + "https://deno.land/std@0.201.0/path/resolve.ts": "133161e4949fc97f9ca67988d51376b0f5eef8968a6372325ab84d39d30b80dc", + "https://deno.land/std@0.201.0/path/separator.ts": "40a3e9a4ad10bef23bc2cd6c610291b6c502a06237c2c4cd034a15ca78dedc1f", + "https://deno.land/std@0.201.0/path/to_file_url.ts": "00e6322373dd51ad109956b775e4e72e5f9fa68ce2c6b04e4af2a6eed3825d31", + "https://deno.land/std@0.201.0/path/to_namespaced_path.ts": "1b1db3055c343ab389901adfbda34e82b7386bcd1c744d54f9c1496ee0fd0c3d", + "https://deno.land/std@0.201.0/path/win32.ts": "8b3f80ef7a462511d5e8020ff490edcaa0a0d118f1b1e9da50e2916bdd73f9dd", + "https://deno.land/std@0.201.0/yaml/_error.ts": "b59e2c76ce5a47b1b9fa0ff9f96c1dd92ea1e1b17ce4347ece5944a95c3c1a84", + "https://deno.land/std@0.201.0/yaml/_loader/loader.ts": "63ec7f0a265dbbabc54b25a4beefff7650e205160a2d75c7d8f8363b5f84851a", + "https://deno.land/std@0.201.0/yaml/_loader/loader_state.ts": "0841870b467169269d7c2dfa75cd288c319bc06f65edd9e42c29e5fced91c7a4", + "https://deno.land/std@0.201.0/yaml/_mark.ts": "dcd8585dee585e024475e9f3fe27d29740670fb64ebb970388094cad0fc11d5d", + "https://deno.land/std@0.201.0/yaml/_state.ts": "ef03d55ec235d48dcfbecc0ab3ade90bfae69a61094846e08003421c2cf5cfc6", + "https://deno.land/std@0.201.0/yaml/_type/binary.ts": "24d49614463a7339a8a16d894919c2ec18a10588ae360ec352093b60e2cc8b0d", + "https://deno.land/std@0.201.0/yaml/_type/bool.ts": "5bfa75da84343d45347b521ba4e5aeace9fe6f53447405290d53315a3fc20e66", + "https://deno.land/std@0.201.0/yaml/_type/float.ts": "056bd3cb9c5586238b20517511014fb24b0e36f98f9f6073e12da308b6b9808a", + "https://deno.land/std@0.201.0/yaml/_type/function.ts": "ff574fe84a750695302864e1c31b93f12d14ada4bde79a5f93197fc33ad17471", + "https://deno.land/std@0.201.0/yaml/_type/int.ts": "563ad074f0fa7aecf6b6c3d84135bcc95a8269dcc15de878de20ce868fd773fa", + "https://deno.land/std@0.201.0/yaml/_type/map.ts": "7b105e4ab03a361c61e7e335a0baf4d40f06460b13920e5af3fb2783a1464000", + "https://deno.land/std@0.201.0/yaml/_type/merge.ts": "8192bf3e4d637f32567917f48bb276043da9cf729cf594e5ec191f7cd229337e", + "https://deno.land/std@0.201.0/yaml/_type/mod.ts": "060e2b3d38725094b77ea3a3f05fc7e671fced8e67ca18e525be98c4aa8f4bbb", + "https://deno.land/std@0.201.0/yaml/_type/nil.ts": "606e8f0c44d73117c81abec822f89ef81e40f712258c74f186baa1af659b8887", + "https://deno.land/std@0.201.0/yaml/_type/omap.ts": "cfe59a294726f5cea705c39a61fd2b08199cf48f4ccd6b040cb550ec0f38d0a1", + "https://deno.land/std@0.201.0/yaml/_type/pairs.ts": "0032fdfe57558d21696a4f8cf5b5cfd1f698743177080affc18629685c905666", + "https://deno.land/std@0.201.0/yaml/_type/regexp.ts": "1ce118de15b2da43b4bd8e4395f42d448b731acf3bdaf7c888f40789f9a95f8b", + "https://deno.land/std@0.201.0/yaml/_type/seq.ts": "95333abeec8a7e4d967b8c8328b269e342a4bbdd2585395549b9c4f58c8533a2", + "https://deno.land/std@0.201.0/yaml/_type/set.ts": "f28ba44e632ef2a6eb580486fd47a460445eeddbdf1dbc739c3e62486f566092", + "https://deno.land/std@0.201.0/yaml/_type/str.ts": "a67a3c6e429d95041399e964015511779b1130ea5889fa257c48457bd3446e31", + "https://deno.land/std@0.201.0/yaml/_type/timestamp.ts": "706ea80a76a73e48efaeb400ace087da1f927647b53ad6f754f4e06d51af087f", + "https://deno.land/std@0.201.0/yaml/_type/undefined.ts": "94a316ca450597ccbc6750cbd79097ad0d5f3a019797eed3c841a040c29540ba", + "https://deno.land/std@0.201.0/yaml/_utils.ts": "26b311f0d42a7ce025060bd6320a68b50e52fd24a839581eb31734cd48e20393", + "https://deno.land/std@0.201.0/yaml/parse.ts": "1fbbda572bf3fff578b6482c0d8b85097a38de3176bf3ab2ca70c25fb0c960ef", + "https://deno.land/std@0.201.0/yaml/schema.ts": "96908b78dc50c340074b93fc1598d5e7e2fe59103f89ff81e5a49b2dedf77a67", + "https://deno.land/std@0.201.0/yaml/schema/core.ts": "fa406f18ceedc87a50e28bb90ec7a4c09eebb337f94ef17468349794fa828639", + "https://deno.land/std@0.201.0/yaml/schema/default.ts": "0047e80ae8a4a93293bc4c557ae8a546aabd46bb7165b9d9b940d57b4d88bde9", + "https://deno.land/std@0.201.0/yaml/schema/extended.ts": "0784416bf062d20a1626b53c03380e265b3e39b9409afb9f4cb7d659fd71e60d", + "https://deno.land/std@0.201.0/yaml/schema/failsafe.ts": "d219ab5febc43f770917d8ec37735a4b1ad671149846cbdcade767832b42b92b", + "https://deno.land/std@0.201.0/yaml/schema/json.ts": "5f41dd7c2f1ad545ef6238633ce9ee3d444dfc5a18101e1768bd5504bf90e5e5", + "https://deno.land/std@0.201.0/yaml/schema/mod.ts": "4472e827bab5025e92bc2eb2eeefa70ecbefc64b2799b765c69af84822efef32", + "https://deno.land/std@0.201.0/yaml/type.ts": "1aabb8e0a3f4229ce0a3526256f68826d9bdf65a36c8a3890ead8011fcba7670", + "https://deno.land/x/asynciter@0.0.18/asynciter.ts": "8b0a25e426e0c747dadb15123c450e676b389ac24b480fb075a61f971ebdc673", + "https://deno.land/x/asynciter@0.0.18/collect.ts": "dea80ad4df11603912cad276a211671d67539dbcf7e627de99d11b2dd90a66fe", + "https://deno.land/x/asynciter@0.0.18/concurrent-map.ts": "8503926d0801981d2041127f5966cb34878ee54ca21a1a85e1e0727950311eaf", + "https://deno.land/x/asynciter@0.0.18/filter.ts": "a82a1a1bc952d62b5f45048887382d9d05bdcf4f5f29b876e50607b66a83e866", + "https://deno.land/x/asynciter@0.0.18/first.ts": "cf5e9924b4aecc98ff5358e260cca5aadba052d060b7d33793749e84169b8aa4", + "https://deno.land/x/asynciter@0.0.18/flatten.ts": "354be48cd754e5277b237c4dfb4ce98f177b40f3975b671ba70603a4c3d52a2e", + "https://deno.land/x/asynciter@0.0.18/for-each.ts": "213a0aa26439edc20fbf6350c3f0ccb38187a0b41875fa0e973a3eaf154aeae1", + "https://deno.land/x/asynciter@0.0.18/map.ts": "862688e7ad18d96011aab9be0bf98cea98ac26fe2a8872373bceb6cbb9fea89e", + "https://deno.land/x/asynciter@0.0.18/mod.ts": "03c709ac8604e86af0f6277bafef611aa317d9f5cf2e54b97671354e0c9f22d5", + "https://deno.land/x/asynciter@0.0.18/reduce.ts": "e3a7bbb52626f445c502eee237c5f5f71c8a220b614e2cf93276c23386964737" } } diff --git a/doc/astro.config.ts b/doc/astro.config.ts index 0418ca447f42..3d60ba33bad1 100644 --- a/doc/astro.config.ts +++ b/doc/astro.config.ts @@ -49,7 +49,7 @@ export default defineConfig({ navbar: { json: { label: "JSON", - link: "/json/explanation/json_style", + link: "/json/tutorial/modding", translations: { "ko-KR": "JSON 모딩" }, items: docModes("json"), }, @@ -61,7 +61,7 @@ export default defineConfig({ }, dev: { label: "Engine", - link: "/dev/guides/building/building", + link: "/dev/guides/building/cmake", translations: { "ko-KR": "게임 엔진" }, items: docModes("dev"), }, diff --git a/doc/remark.ts b/doc/remark.ts index a05848b28290..3984d371c5c0 100644 --- a/doc/remark.ts +++ b/doc/remark.ts @@ -15,7 +15,7 @@ const removeSuffix = (url: string) => url.replace(suffix, "") export const fixRelativeLinks = () => (tree: Root) => visit(tree, "link", (node) => { - node.url = relativeUrl(removeSuffix(node.url)) + node.url = relativeUrl(removeSuffix(node.url)).toLowerCase() }) /** diff --git a/doc/src/content/docs/en/contributing/CONTRIBUTING.md b/doc/src/content/docs/en/contributing/CONTRIBUTING.md index f2ef8f52fc65..33fbc9c1e53b 100644 --- a/doc/src/content/docs/en/contributing/CONTRIBUTING.md +++ b/doc/src/content/docs/en/contributing/CONTRIBUTING.md @@ -73,13 +73,12 @@ For more information: ## Documentation -

- - -

+ ### Doxygen Comments @@ -95,6 +94,8 @@ Use the following template for commenting classes: * Lengthy description with many words. (optional) */ class foo { + +} ``` Use the following template for commenting functions: @@ -225,7 +226,7 @@ to explain the problem your PR is solving in full detail. ### All PRs should have a `"Summary"` line Summary is a one-line description of your change that will be extracted and added to the project -changelog at +changelog at https://github.com/cataclysmbnteam/Cataclysm-BN/blob/upload/data/changelog.txt The format is: `SUMMARY: Category "description"` @@ -234,14 +235,14 @@ Performance, Infrastructure, Build, I18N. Example: `SUMMARY: Content "Adds new mutation category 'Mouse'"` -See the [Changelog Guidelines](./changelog.md) for explanations of the categories. +See the [Changelog Guidelines](./changelog) for explanations of the categories. ### Closing issues using keywords One more thing: when marking your PR as closing, fixing, or resolving issues, please include this somewhere in the description: -``` +```md - {keyword} #{issue} ``` @@ -264,11 +265,11 @@ slightly faster. ### closing multiple issues at once -``` +```md - {keyword} #{issue}, {keyword} #{issue} ``` -See for more. +See https://help.github.com/articles/closing-issues-using-keywords for more. ## Tooling support diff --git a/doc/img/contributing-doxy1.png b/doc/src/content/docs/en/contributing/img/contributing-doxy1.png similarity index 100% rename from doc/img/contributing-doxy1.png rename to doc/src/content/docs/en/contributing/img/contributing-doxy1.png diff --git a/doc/img/contributing-doxy2.png b/doc/src/content/docs/en/contributing/img/contributing-doxy2.png similarity index 100% rename from doc/img/contributing-doxy2.png rename to doc/src/content/docs/en/contributing/img/contributing-doxy2.png diff --git a/doc/img/readme-bug1.png b/doc/src/content/docs/en/contributing/img/readme-bug1.png similarity index 100% rename from doc/img/readme-bug1.png rename to doc/src/content/docs/en/contributing/img/readme-bug1.png diff --git a/doc/img/readme-bug2.png b/doc/src/content/docs/en/contributing/img/readme-bug2.png similarity index 100% rename from doc/img/readme-bug2.png rename to doc/src/content/docs/en/contributing/img/readme-bug2.png diff --git a/doc/img/readme-bug3.png b/doc/src/content/docs/en/contributing/img/readme-bug3.png similarity index 100% rename from doc/img/readme-bug3.png rename to doc/src/content/docs/en/contributing/img/readme-bug3.png diff --git a/doc/img/readme-bug4.png b/doc/src/content/docs/en/contributing/img/readme-bug4.png similarity index 100% rename from doc/img/readme-bug4.png rename to doc/src/content/docs/en/contributing/img/readme-bug4.png diff --git a/doc/img/readme-title.png b/doc/src/content/docs/en/contributing/img/readme-title.png similarity index 100% rename from doc/img/readme-title.png rename to doc/src/content/docs/en/contributing/img/readme-title.png diff --git a/doc/src/content/docs/en/dev/explanation/POINTS_COORDINATES.md b/doc/src/content/docs/en/dev/explanation/POINTS_COORDINATES.md index cffdaa35de89..03d45fb2abcc 100644 --- a/doc/src/content/docs/en/dev/explanation/POINTS_COORDINATES.md +++ b/doc/src/content/docs/en/dev/explanation/POINTS_COORDINATES.md @@ -75,8 +75,8 @@ coordinates do. The z coordinate is relative to the vehicle origin. ## Point types To work with these coordinate systems we have a variety of types. These are defined in -[`coordinates.h`](../../json/src/coordinates.h). For example, we have `point_abs_ms` for absolute map-square -coordinates. The three parts of the type name are _dimension_ `_` _origin_ `_` _scale_. +[`coordinates.h`](../../json/src/coordinates.h). For example, we have `point_abs_ms` for absolute +map-square coordinates. The three parts of the type name are _dimension_ `_` _origin_ `_` _scale_. - **dimension** is either `point` for two-dimensional or `tripoint` for three-dimensional. - **origin** specifies what the value is relative to, and can be: diff --git a/doc/src/content/docs/en/index.mdx b/doc/src/content/docs/en/index.mdx index 68986b01d553..064e00ff983f 100644 --- a/doc/src/content/docs/en/index.mdx +++ b/doc/src/content/docs/en/index.mdx @@ -8,7 +8,7 @@ hero: file: ../../../assets/icon.svg actions: - text: Read the Guide - link: ./dev/guides/building/cmake + link: ./json/tutorial/modding icon: right-arrow variant: primary - text: Join the official Discord @@ -22,7 +22,7 @@ import { Card, CardGrid } from '@astrojs/starlight/components' - Mod the game using [JSON](json/reference/loading_order) and [Lua](./lua/guides/modding). + Mod the game using [JSON](json/tutorial/modding) and [Lua](lua/guides/modding). Translate the [base game](i18n/tutorial/transifex) and [custom mods](i18n/guides/mods). diff --git a/doc/src/content/docs/en/json/reference/JSON_INFO.md b/doc/src/content/docs/en/json/reference/JSON_INFO.md index 8f2884f20a04..e13f6d147b20 100644 --- a/doc/src/content/docs/en/json/reference/JSON_INFO.md +++ b/doc/src/content/docs/en/json/reference/JSON_INFO.md @@ -24,7 +24,7 @@ that's working you should be able to easily jump to the definition of any entity positioning your cursor over an id and hitting the appropriate key combination. - In Vim, this feature exists by default, and you can jump to a definition using - [`\^\]`](http://vimdoc.sourceforge.net/htmldoc/tagsrch.html#tagsrch.txt). + [`^\]`](http://vimdoc.sourceforge.net/htmldoc/tagsrch.html#tagsrch.txt). - In Notepad++ go to "Plugins" -> "Plugins Admin" and enable the "TagLEET" plugin. Then select any id and press Alt+Space to open the references window. @@ -180,9 +180,9 @@ This section describes properties and formatting applied to all of the JSON file A few properties are applicable to most if not all json files and do not need to be described for each json file. These properties are: -| Identifier | Description | -| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| type | The type of object this json entry is describing. Setting this entry to 'armor' for example means the game will expect properties specific to armor in that entry. Also ties in with 'copy-from' (see below), if you want to inherit properties of another object, it must be of the same tipe. | +| Identifier | Description | +| ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| type | The type of object this json entry is describing. Setting this entry to 'armor' for example means the game will expect properties specific to armor in that entry. Also ties in with 'copy-from' (see below), if you want to inherit properties of another object, it must be of the same tipe. | | [copy-from](./items/JSON_INHERITANCE) | The identifier of the item you wish to copy properties from. This allows you to make an exact copy of an item **of the same type** and only provide entries that should change from the item you copied from. | | [extends](./items/JSON_INHERITANCE) | Modders can add an "extends" field to their definition to append entries to a list instead of overriding the entire list. | | [delete](./items/JSON_INHERITANCE) | Modders can also add a "delete" field that removes elements from lists instead of overriding the entire list. | diff --git a/doc/src/content/docs/en/json/reference/VEHICLES_JSON.md b/doc/src/content/docs/en/json/reference/VEHICLES_JSON.md index c0179767ce0c..77319dac0463 100644 --- a/doc/src/content/docs/en/json/reference/VEHICLES_JSON.md +++ b/doc/src/content/docs/en/json/reference/VEHICLES_JSON.md @@ -1,5 +1,5 @@ --- -title: Vehicle prototypes JSON file contents +title: Vehicle prototypes --- Vehicle prototypes are used to spawn stock vehicles. After a vehicle has been spawned, it is saved diff --git a/doc/src/content/docs/en/json/reference/creatures/BASECAMP.md b/doc/src/content/docs/en/json/reference/creatures/BASECAMP.md index ac7d3a335456..d3d6a61ae109 100644 --- a/doc/src/content/docs/en/json/reference/creatures/BASECAMP.md +++ b/doc/src/content/docs/en/json/reference/creatures/BASECAMP.md @@ -6,7 +6,7 @@ Basecamps leverage many existing aspects of JSON data such as recipes and mapgen to be familiar with those: - [JSON info](../JSON_INFO) has information on common fields for recipes -- [mapgen](../map/mapgen), see section 3 about `update_mapgen` +- [mapgen](../../reference/map/mapgen), see section 3 about `update_mapgen` # Adding alternate basecamp upgrade paths diff --git a/doc/src/content/docs/en/json/reference/creatures/MARTIALART_JSON.md b/doc/src/content/docs/en/json/reference/creatures/MARTIALART_JSON.md index 332e460af3e3..136090c48e8d 100644 --- a/doc/src/content/docs/en/json/reference/creatures/MARTIALART_JSON.md +++ b/doc/src/content/docs/en/json/reference/creatures/MARTIALART_JSON.md @@ -1,5 +1,5 @@ --- -title: Martial arts and techniques JSON file contents +title: Martial arts & techniques --- ### Martial arts diff --git a/doc/src/content/docs/en/json/reference/creatures/MISSIONS_JSON.md b/doc/src/content/docs/en/json/reference/creatures/MISSIONS_JSON.md index b51b197f8fb5..cbc117dd28b5 100644 --- a/doc/src/content/docs/en/json/reference/creatures/MISSIONS_JSON.md +++ b/doc/src/content/docs/en/json/reference/creatures/MISSIONS_JSON.md @@ -108,8 +108,8 @@ player's current kill count that must be killed to complete the mission. ### goal_condition For "MGOAL_CONDITION", defines the condition that must be satisified for the mission to be -considered complete. Conditions are explained in more detail in [NPCs.md](./NPCs), and are used -here in exactly the same way. +considered complete. Conditions are explained in more detail in [NPCs.md](./NPCs), and are used here +in exactly the same way. ### dialogue diff --git a/doc/src/content/docs/en/json/reference/creatures/MONSTERS.md b/doc/src/content/docs/en/json/reference/creatures/MONSTERS.md index e849795d5616..b3a353b685b6 100644 --- a/doc/src/content/docs/en/json/reference/creatures/MONSTERS.md +++ b/doc/src/content/docs/en/json/reference/creatures/MONSTERS.md @@ -110,7 +110,8 @@ List of scenttype_id ignored by this monster. scent_types are defined in scent_t (string) Symbol and color representing monster in-game. The symbol must be a UTF-8 string, that is exactly -one console cell width (may be several Unicode characters). See [COLOR.md](../graphics/COLOR) for details. +one console cell width (may be several Unicode characters). See [COLOR.md](../graphics/COLOR) for +details. ## "size" diff --git a/doc/src/content/docs/en/json/reference/items/RELICS.md b/doc/src/content/docs/en/json/reference/items/RELICS.md index 2f596a226f3d..742d1ca98cc6 100644 --- a/doc/src/content/docs/en/json/reference/items/RELICS.md +++ b/doc/src/content/docs/en/json/reference/items/RELICS.md @@ -29,15 +29,15 @@ optional): ```json { -"type": "time", // Defines what resource is consumed. Default: time -"req": "none", // Defines under what conditions recharge works. Default: none (no special requirements) -"field": "fd_blood", // Field type to be consumed with 'field' recharge type -"trap": "tr_portal", // Trap type to be consumed with 'trap' recharge type -"interval": "5 minutes", // Interval at which the recharge check is done. Default: 1 second -"int_min": 1, // Min intensity of related 'type' effect. Default: 0 -"int_min": 5, // Max intensity of related 'type' effect. Default: 0 -"rate": 2, // Amount of charges restored when recharge operation succeeds. Default: 0 -"message": "Your body decays!", // Optional message to print on success + "type": "time", // Defines what resource is consumed. Default: time + "req": "none", // Defines under what conditions recharge works. Default: none (no special requirements) + "field": "fd_blood", // Field type to be consumed with 'field' recharge type + "trap": "tr_portal", // Trap type to be consumed with 'trap' recharge type + "interval": "5 minutes", // Interval at which the recharge check is done. Default: 1 second + "int_min": 1, // Min intensity of related 'type' effect. Default: 0 + "int_min": 5, // Max intensity of related 'type' effect. Default: 0 + "rate": 2, // Amount of charges restored when recharge operation succeeds. Default: 0 + "message": "Your body decays!" // Optional message to print on success } ``` diff --git a/doc/src/content/docs/en/json/guides/GUIDE_COMESTIBLES.md b/doc/src/content/docs/en/json/reference/items/comestibles_file_location.md similarity index 98% rename from doc/src/content/docs/en/json/guides/GUIDE_COMESTIBLES.md rename to doc/src/content/docs/en/json/reference/items/comestibles_file_location.md index baf1a3b8e15f..e1854e4d7a8f 100644 --- a/doc/src/content/docs/en/json/guides/GUIDE_COMESTIBLES.md +++ b/doc/src/content/docs/en/json/reference/items/comestibles_file_location.md @@ -1,5 +1,5 @@ --- -title: Guide to add Comestibles +title: File location for Comestibles --- There are a large number of files in `json/items/comestibles`, and this guide will help you decide diff --git a/doc/src/content/docs/en/json/reference/map/OVERMAP.md b/doc/src/content/docs/en/json/reference/map/OVERMAP.md index 8a92483820cb..b5bde1e4142b 100644 --- a/doc/src/content/docs/en/json/reference/map/OVERMAP.md +++ b/doc/src/content/docs/en/json/reference/map/OVERMAP.md @@ -198,7 +198,7 @@ referenced overmap terrains (e.g. the `_north` version for all). | `id` | Unique id. | | `name` | Name for the location shown in game. | | `sym` | Symbol used when drawing the location, like `"F"` (or you may use an ASCII value like `70`). | -| `color` | Color to draw the symbol in. See [COLOR.md](../graphics/COLOR). | +| `color` | Color to draw the symbol in. See [COLOR.md](../graphics/COLOR). | | `looks_like` | Id of another overmap terrain to be used for the graphical tile, if this doesn't have one. | | `connect_group` | Specify that this overmap terrain might be graphically connected to its neighbours, should a tileset wish to. It will connect to any other `overmap_terrain` with the same `connect_group`. | | `see_cost` | Affects player vision on overmap. Higher values obstruct vision more. | diff --git a/doc/src/content/docs/en/json/reference/map/REGION_SETTINGS.md b/doc/src/content/docs/en/json/reference/map/REGION_SETTINGS.md index 0aa5df954171..1cb82d894434 100644 --- a/doc/src/content/docs/en/json/reference/map/REGION_SETTINGS.md +++ b/doc/src/content/docs/en/json/reference/map/REGION_SETTINGS.md @@ -487,18 +487,18 @@ The **weather** section defines the base weather attributes used for the region. ### Fields -| Identifier | Description | -| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `spring_temp` | Mid spring temperature for the region in degrees Celsius | -| `summer_temp` | Mid summer temperature for the region in degrees Celsius | -| `autumn_temp` | Mid autumn temperature for the region in degrees Celsius | -| `winter_temp` | Mid winter temperature for the region in degrees Celsius | -| `base_humidity` | Base humidity for the region in relative humidity % | -| `base_pressure` | Base pressure for the region in millibars. | -| `base_acid` | Base acid for the region in ? units. Value >= 1 is considered acidic. | -| `base_wind` | Base wind for the region in mph units. Roughly the yearly average. | -| `base_wind_distrib_peaks` | How high the wind peaks can go. Higher values produce windier days. | -| `base_wind_season_variation` | How the wind varies with season. Lower values produce more variation | +| Identifier | Description | +| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `spring_temp` | Mid spring temperature for the region in degrees Celsius | +| `summer_temp` | Mid summer temperature for the region in degrees Celsius | +| `autumn_temp` | Mid autumn temperature for the region in degrees Celsius | +| `winter_temp` | Mid winter temperature for the region in degrees Celsius | +| `base_humidity` | Base humidity for the region in relative humidity % | +| `base_pressure` | Base pressure for the region in millibars. | +| `base_acid` | Base acid for the region in ? units. Value >= 1 is considered acidic. | +| `base_wind` | Base wind for the region in mph units. Roughly the yearly average. | +| `base_wind_distrib_peaks` | How high the wind peaks can go. Higher values produce windier days. | +| `base_wind_season_variation` | How the wind varies with season. Lower values produce more variation | | `weather_types` | Ids of the weather types allowed in this region. First value will be the default weather type. Declaration order will affect weather selection, see [WEATHER_TYPE.md](WEATHER_TYPE) for details. | ### Example diff --git a/doc/src/content/docs/en/json/reference/map/MAPGEN.md b/doc/src/content/docs/en/json/reference/map/mapgen.md similarity index 100% rename from doc/src/content/docs/en/json/reference/map/MAPGEN.md rename to doc/src/content/docs/en/json/reference/map/mapgen.md diff --git a/doc/src/content/docs/en/json/tutorial/MODDING.md b/doc/src/content/docs/en/json/tutorial/MODDING.md index 45fcbcf5762a..5dabe909cfde 100644 --- a/doc/src/content/docs/en/json/tutorial/MODDING.md +++ b/doc/src/content/docs/en/json/tutorial/MODDING.md @@ -79,12 +79,12 @@ otherwise, there are no restrictions on what you can put where. ### JSON_INFO.md -It's worth reading [JSON_INFO.md](../reference/JSON_INFO) to get a comprehensive list of everything you can do -with these mods. The rest of this document will have a few examples to copy and paste, but it is by -no means comprehensive. The base game's data is also defined in the same way as any mod you write, -so taking a look through the game's json files (in `data/json`) can also teach you a lot. If the -game finds any issues in your JSON syntax when you try to load a game world, it will spit out an -error message, and you won't be able to load that game until the issue is fixed. +It's worth reading [JSON_INFO.md](../reference/JSON_INFO) to get a comprehensive list of everything +you can do with these mods. The rest of this document will have a few examples to copy and paste, +but it is by no means comprehensive. The base game's data is also defined in the same way as any mod +you write, so taking a look through the game's json files (in `data/json`) can also teach you a lot. +If the game finds any issues in your JSON syntax when you try to load a game world, it will spit out +an error message, and you won't be able to load that game until the issue is fixed. ### Adding a scenario @@ -169,8 +169,8 @@ Police Officer profession: ### Adding an item -Items are where you really want to read the [JSON_INFO](../reference/JSON_INFO) file, just because there's so -much that you can do with them, and every category of item is a little bit different. +Items are where you really want to read the [JSON_INFO](../reference/JSON_INFO) file, just because +there's so much that you can do with them, and every category of item is a little bit different. diff --git a/doc/src/content/docs/ko/contributing/CONTRIBUTING.md b/doc/src/content/docs/ko/contributing/CONTRIBUTING.md index 2d2662268797..9f363e8535f4 100644 --- a/doc/src/content/docs/ko/contributing/CONTRIBUTING.md +++ b/doc/src/content/docs/ko/contributing/CONTRIBUTING.md @@ -76,8 +76,8 @@ title: 기여하기 ## 공식 문서

- - + +

자동 생성된 문서를 [깃허브 페이지](https://cataclysmbnteam.github.io/Cataclysm-BN)에서 읽을 수 diff --git a/tools/front_matter.ts b/tools/front_matter.ts new file mode 100644 index 000000000000..cd0cadb6116a --- /dev/null +++ b/tools/front_matter.ts @@ -0,0 +1,41 @@ +/** + * Converts first heading into frontmatter. + */ + +import * as frontmatter from "https://deno.land/std@0.201.0/front_matter/yaml.ts" +import { walk } from "https://deno.land/std@0.201.0/fs/walk.ts" +import { asynciter } from "https://deno.land/x/asynciter@0.0.18/mod.ts" + +export const consumeFirstHeading = (lines: string[]): { heading: string; lines: string[] } => { + // consume all empty lines with regex + const spaces = lines.findIndex((line) => !line.match(/^\s*$/)) ?? 0 + // split into frontmatter and content + + const [frontmatter, ...content] = lines.slice(spaces) + return { heading: frontmatter.replace(/^#+\s*/, ""), lines: content } +} + +export const toFrontmatter = (text: string): string => { + if (frontmatter.test(text)) { + return text + } + + const lines = text.split("\n") + + const { heading, lines: content } = consumeFirstHeading(lines) + return /*md*/ `\ +--- +title: ${heading} +--- +${content.join("\n")} +` +} + +if (import.meta.main) { + await asynciter(walk("doc/src/content", { exts: ["md"], includeDirs: false })) + .map(({ path }) => path) + .concurrentUnorderedMap(async (path) => ({ path, text: await Deno.readTextFile(path) })) + .filter(({ text }) => !frontmatter.test(text)) + .concurrentUnorderedMap(({ path, text }) => Deno.writeTextFile(path, toFrontmatter(text))) + .collect() +} diff --git a/tools/front_matter_test.ts b/tools/front_matter_test.ts new file mode 100644 index 000000000000..895d9c134fd5 --- /dev/null +++ b/tools/front_matter_test.ts @@ -0,0 +1,40 @@ +import { assertEquals } from "https://deno.land/std@0.201.0/assert/assert_equals.ts" +import { consumeFirstHeading, toFrontmatter } from "./front_matter.ts" + +const input = /*md*/ ` + +## Foo asdf + +bar + +### baz + +qux +` +const output = /*md*/ `\ +--- +title: Foo asdf +--- + +bar + +### baz + +qux + +` +Deno.test("first heading is found and consumed", () => { + const result = consumeFirstHeading(input.split("\n")) + assertEquals(result, { + heading: "Foo asdf", + lines: ["", "bar", "", "### baz", "", "qux", ""], + }) +}) +Deno.test("first heading is converted to frontmatter", () => { + const result = toFrontmatter(input) + assertEquals(result, output) +}) +Deno.test("function is idempotent", () => { + const result = toFrontmatter(output) + assertEquals(result, output) +})