Skip to content

Commit

Permalink
更新示范文档
Browse files Browse the repository at this point in the history
  • Loading branch information
LingASDJ committed Apr 11, 2023
1 parent 6af5f8b commit d7dc03b
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
rustedwarfareapicode/.vitepress/dist/
7 changes: 4 additions & 3 deletions rustedwarfareapicode/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ export default defineConfig({

sidebar: [
{
text: 'Examples',
text: 'RW-API-Code',
items: [
{ text: 'Markdown Examples', link: '/markdown-examples' },
{ text: 'Runtime API Examples', link: '/api-examples' }
{ text: '主页-Home', link: '/markdown-examples' },
{ text: '核心-CORE', link: '/src/Unit/core' },
{ text: '可建造-CORE', link: '/src/Unit/canbuild' }
]
}
],
Expand Down
1 change: 1 addition & 0 deletions rustedwarfareapicode/src/Unit/canbuild.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
xx
54 changes: 54 additions & 0 deletions rustedwarfareapicode/src/Unit/core.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
outline: deep
---

# **[core]**

## 第一类-通用代码组

::: tip
以下的代码为`通用代码`,多半是必要的代码,如果不包括这些,可能在`绝大多数情况下导致错误`
:::

## name
#### name-代码简介:
代码:name 中文释义:名字 类型:字符型 隶属于:通用代码组
#### name-要点指示:


::: code-group
```user [JDSALing]
定义单位原始名称,可以是中文。
游戏使用它区分其它单位。
如果没有在[displayText或者语言文件设置显示名称],
那么它也将作为单位的显示名称。
具体描述文件位置(内部):
1.assets/translationsStrings_zh.properties
格式:units.单位名称.name=写单位显示的名称
units.单位名称.description= [[填单位显示的描述]]
```
```user [Tobby3600]
ini文件的单独定义(外部-推荐):
2.displayText: -单位的标题
displayDescription: -单位的描述
```
:::

特别提醒:`displayText支持本地化`,例如如果要写一个`多语言的单位描述`,可以通过以下例子:

#### name-演示例子

```ini
演示例子
[core]
name: Ling
displayText: English Title Text
displayText_zh:中文标题

displayDescription: -English Description
displayDescription_zh:-中文描述

```
1 change: 1 addition & 0 deletions rustedwarfareapicode/src/Unit/graphics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
xxxx

0 comments on commit d7dc03b

Please sign in to comment.