Skip to content

Commit

Permalink
bumped version, and now detail message will also sort sub-tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
Ra1ny-Yuki committed Jun 25, 2022
1 parent ddfd127 commit b1ee8fa
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 13 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@ Requires [MCDReforged](https://github.com/Fallen-Breath/MCDReforged) >= 2.1.3

`!!task list-all <task>` Show all tasks and sub-tasks

`!!task list-done <task>` Show tasks which were marked as done

`!!task add <task> [<description>]` Add a task

`!!task remove/rm/delete/del <task>` Remove a task
`!!task remove`/`rm`/`delete`/`del <task>` Remove a task

`!!task rename <old task> <new task>` Rename a task

Expand All @@ -34,13 +32,13 @@ Requires [MCDReforged](https://github.com/Fallen-Breath/MCDReforged) >= 2.1.3

`!!task undone <task>` Mark task as undone

`!!task deadline <task> <period: day>` Set deadline for the task
`!!task deadline <task> <period: day>`/`clear` Set or clear deadline for the task

`!!task player <task>` Show player task list

`!!task res[ponsible] <task> <player>` Set responsibles for this task

`!!task unres[ponsible] <task> <player>` Remove responsibles from this task
`!!task unres[ponsible] <task> <player>`/`-all` Remove responsibles from this task

PS: All the `<task>` above can be replaced by `<task>.<sub-task>` to access sub-task

Expand Down
8 changes: 3 additions & 5 deletions README_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@

`!!task list-all` 显示所有任务和它们的子任务

`!!task list-done` 显示已被标记为完成的任务列表

`!!task add <任务名称> [任务描述]` 添加任务

`!!task remove/rm/delete/rm <任务名称]>` 删除任务
`!!task remove`/`rm`/`delete`/`rm <任务名称]>` 删除任务

`!!task rename <旧任务名称> <新任务名称>` 重命名任务

Expand All @@ -34,13 +32,13 @@

`!!task undone <任务名称>` 标注任务为未完成

`!!task deadline <任务名称> <工期:日数>` 为任务设置工期
`!!task deadline <任务名称> <工期:日数>`/`clear` 为任务设置工期或者清除工期

`!!task player <任务名称>` 查阅玩家任务列表

`!!task res[ponsible] <任务名称> <玩家>` 设置任务的责任人

`!!task unres[ponsible] <任务名称> <玩家>` 移除任务的责任人
`!!task unres[ponsible] <任务名称> <玩家>`/`-all` 移除任务的责任人或者移除所有责任人

注: 上述所有 `[任务名称]` 可以用 `[任务名称].[子任务名称]` 的形式来访问子任务

Expand Down
1 change: 1 addition & 0 deletions lang/en_us.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
mcd_task:
help_msg: |
§7-----§r MCDR {name} v{ver} §7-----§r
Manage tasks in your sever easily
§d【Command Help】§r
§7{pre} overview§r Show task overview
§7{pre} help§r Show this help message
Expand Down
1 change: 1 addition & 0 deletions lang/zh_cn.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
mcd_task:
help_msg: |
§7-----§r MCDR {name} v{ver} §7-----§r
轻松地管理服务器任务
§d【指令帮助】§r
§7{pre} overview§r 显示任务概览
§7{pre} help§r 显示帮助信息
Expand Down
2 changes: 1 addition & 1 deletion mcd_task/rtext_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def info_responsibles(task: Task, indent=4):

def sub_task_title_text(task: Task, indent=4):
text = []
for sub in task.sub_tasks:
for sub in task.sorted_sub_tasks:
text.append(indent_text(indent) + title_text(sub))
if len(sub.sub_tasks) > 0:
text.append(sub_task_title_text(sub, indent + 4))
Expand Down
7 changes: 5 additions & 2 deletions mcdreforged.plugin.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"id": "mcd_task",
"version": "2.3.0-alpha.3+build.61",
"version": "2.3.0+build.62",
"name": "Task",
"description": "A plugin to show tasks of project in progress",
"description": {
"en_us": "A plugin to show tasks of project in progress",
"zh_cn": "用于展示进行中的工程任务的插件"
},
"author": [
"Pandaria",
"Ra1ny_Yuki"
Expand Down

0 comments on commit b1ee8fa

Please sign in to comment.