-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat!: add reclamation
and improve fight
, roguelike
, copilot
commands
#313
Conversation
1b0332a
to
62f2fc1
Compare
reclamation
and improve fight
, roguelike
, copilot
commands
2ad6ad3
to
457ea81
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #313 +/- ##
==========================================
+ Coverage 63.14% 65.58% +2.44%
==========================================
Files 42 44 +2
Lines 3392 3560 +168
==========================================
+ Hits 2142 2335 +193
+ Misses 1250 1225 -25 ☔ View full report in Codecov by Sentry. |
5f452f3
to
15351bb
Compare
pub struct ReclamationParams { | ||
/// Theme of the reclamation algorithm | ||
theme: Theme, | ||
/// Mode of the reclamation algorithm | ||
/// | ||
/// 0: build and restart again and again. **This mode will discard all the progress**. | ||
/// 1: craft some products and fall back to the previous checkpoint. | ||
#[arg(short = 'm', long, default_value = "1", verbatim_doc_comment)] | ||
mode: i32, | ||
/// Tool to craft in mode 1 | ||
#[arg(short = 'C', long)] | ||
tool_to_craft: Option<String>, | ||
/// Mode to increase the number of tools to craft | ||
/// | ||
/// 0: increase the number by clicking the button. | ||
/// 1: increase the number by holding the button. | ||
#[arg(long, default_value = "0", verbatim_doc_comment)] | ||
increase_mode: i32, | ||
/// Number of craft each batch | ||
#[arg(long, default_value = "16")] | ||
num_craft_batches: i32, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Alan-Charred 老师,麻烦看看生息演算的参数和 help 有没有问题。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
内容完全没有问题!感谢!
这个注释是可以直接作为help的文字吗?我脑海中是以下文字,您看着改改。(我对rust不太熟悉,也不懂输出结构好不好看。
话说,是不是increase_mode
和 num_craft_batches
应该像tool_to_craft
一样有个option?哦它们有默认值。
如果可以,还请后续加一个检查,如果tool_to_craft
为空的话,报个错。
我们其实是希望能给它一个“荧光棒”作为默认值,但是我不确定 cli 是否要支持多语言。您看看怎么办比较好?
/// Reclamation Algorithm theme
///
/// Tales: Tales Within the Sand
#[arg(short = 't', long, default_value = "Tales", verbatim_doc_comment)]
theme: String,
/// Reclamation Algorithm task mode
///
/// 0: farm prosperity points by repeatedly entering and exiting stages.
/// **This task mode should only be used when no save exists**.
/// **Using it with an active save may result in losing your progress**.
/// 1: farm prosperity points by crafting tools.
/// **This task mode should only be used when you already have a save and can craft certain tools**.
/// **Using it may result in losing your progress after last calculation day**.
/// **It is recommend to start task from a new calculation day**.
#[arg(short = 'm', long, default_value = "1", verbatim_doc_comment)]
mode: i32,
/// Name of tool to craft in mode 1
#[arg(short = 'C', long)]
tool_to_craft: Option<String>,
/// Method to interactive with the add button when increasing the crafting quantity
///
/// 0: increase the number by clicking the button.
/// 1: increase the number by holding the button.
#[arg(long, default_value = "0", verbatim_doc_comment)]
increase_mode: i32,
/// Number of batches in each game run, with each batch containing 99 items
#[arg(long, default_value = "16")]
num_craft_batches: i32,
草好像对theme的描写有点问题,我得去改改文档。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
感谢,不过这个 help 好像暂时不支持用 **
来加粗,我来研究一下怎么给 help 加上格式。另外 theme 不用 String 而是 ValueEnum, 这样可以生成补全和可选项。
double_check_collapsal_paradigms: bool, | ||
/// A list of expected collapsal paradigms | ||
#[arg(short = 'P', long)] | ||
expected_collapsal_paradigms: Vec<String>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Alan-Charred 如果你对肉鸽也比较熟悉的话,可以看一下肉鸽的。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
啊,我不知道默认值这边您是怎么处理的,
/// Collapsal paradigm related parameters
/// Whether to check collapsal paradigms
#[arg(long)]
check_collapsal_paradigms: bool,
/// Whether to double check collapsal paradigms
#[arg(long)]
double_check_collapsal_paradigms: bool,
/// A list of expected collapsal paradigms
#[arg(short = 'P', long)]
expected_collapsal_paradigms: Vec<String>,
这段里,check_collapsal_paradigms 和 double_check_collapsal_paradigms,在 mode=5时是默认开启的,在其他模式下也可以打开。🤔️感觉要描述得太多了。不知道有没有可能,对于一些高级选项,就留下个文档地址供大家自行学习。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
新增的关于坍缩范式的参数我看了没问题。
其他一些参数。。。这个stop_at_final_boss
怎么好像也没进文档?@status102 老师您也来看一眼。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
啊,我不知道默认值这边您是怎么处理的,
/// Collapsal paradigm related parameters /// Whether to check collapsal paradigms #[arg(long)] check_collapsal_paradigms: bool, /// Whether to double check collapsal paradigms #[arg(long)] double_check_collapsal_paradigms: bool, /// A list of expected collapsal paradigms #[arg(short = 'P', long)] expected_collapsal_paradigms: Vec<String>,
这段里,check_collapsal_paradigms 和 double_check_collapsal_paradigms,在 mode=5时是默认开启的,在其他模式下也可以打开。🤔️感觉要描述得太多了。不知道有没有可能,对于一些高级选项,就留下个文档地址供大家自行学习。
那就 mode 5 默认开启,去掉这两个选项,然后在这种情况下让 expected_collapsal_paradigms 需要提供至少一个选项。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好好,这样好。虽然 expected_collapsal_paradigms 在中文下有默认值(4个稀有坍缩范式),但是外服我没弄。所以还是让用户必须填写吧。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
新增的关于坍缩范式的参数我看了没问题。
其他一些参数。。。这个stop_at_final_boss
怎么好像也没进文档?@status102 老师您也来看一眼。
没看到有啥问题,也可能漏了没看到
Features:
reclamation
sub-command.fight
androguelike
sub-commands with additional parameters.ssscopilot
is now an individual sub-command for SSS, separate fromcopilot
.copilot
can now handle multiple files, sets, and accepts extra parameters.Others:
Breaking Changes:
copilot
sub-command; use thessscopilot
sub-command instead.TODO: