Skip to content

feat(AutoUseSpMedication): 支持仅使用即将过期的应急理智加强剂#1593

Merged
MistEO merged 1 commit intoMaaEnd:v2from
amingnn:feat/AutoUseSpMedication
Mar 25, 2026
Merged

feat(AutoUseSpMedication): 支持仅使用即将过期的应急理智加强剂#1593
MistEO merged 1 commit intoMaaEnd:v2from
amingnn:feat/AutoUseSpMedication

Conversation

@amingnn
Copy link
Copy Markdown

@amingnn amingnn commented Mar 25, 2026

背景

原有逻辑每次固定使用一颗应急理智加强剂,无法只使用过期药,

变更内容

新增两个独立开关:

UseRegularSpMedication(默认开启)

  • 开:找到应急理智加强剂时使用一颗
  • 关:跳过普通应急理智加强剂

UseAllExpireSoonSpMedication(默认关闭)

  • 开:使用所有时限小于三天(时限变红)的应急理智加强剂
  • 关:跳过过期药

Summary by Sourcery

为自动使用特殊理智药物新增可配置选项,包括仅消耗临期物品的支持。

新功能:

  • 在 AutoUseSpMedication 流水线中,引入单独的开关,用于控制使用常规特殊理智药物以及使用所有即将过期的特殊理智药物。

增强:

  • 更新 AutoUseSpMedication 任务和流水线配置,使其遵循新的药物使用开关设置。

文档:

  • 为新的 AutoUseSpMedication 配置选项,在所有支持的语言中新增本地化 UI 文本。
Original summary in English

Summary by Sourcery

Add configurable options to control automatic use of special sanity medication, including support for consuming only items that are close to expiry.

New Features:

  • Introduce separate switches for using regular special sanity medication and using all soon-to-expire special sanity medication in the AutoUseSpMedication pipeline.

Enhancements:

  • Update AutoUseSpMedication task and pipeline configuration to respect the new medication usage switches.

Documentation:

  • Add localized UI strings for the new AutoUseSpMedication configuration options in all supported languages.

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

你好——我给出了一些高层次的反馈:

  • 建议在流水线/任务逻辑中进一步澄清并强制规范 UseRegularSpMedicationUseAllExpireSoonSpMedication 之间的交互关系(例如:当二者都启用或都禁用时会发生什么),从而让行为是确定的、且易于理解。
  • 对于 UseAllExpireSoonSpMedication 的阈值(“剩余时间 < 3 天 / 变红”),请确保实现中使用与游戏内 UI 相同的边界条件和时间源,尤其要考虑恰好剩余 3 天、以及不同时区等边界情况。
面向 AI Agent 的提示
Please address the comments from this code review:

## Overall Comments
- Consider clarifying and enforcing the interaction between `UseRegularSpMedication` and `UseAllExpireSoonSpMedication` in the pipeline/task logic (e.g., what happens when both are enabled or both disabled) so the behavior is deterministic and easy to reason about.
- For the `UseAllExpireSoonSpMedication` threshold ("time limit < 3 days / turns red"), make sure the implementation uses the same boundary condition and time source as the in-game UI, especially for edge cases like exactly 3 days remaining or time zone differences.

Sourcery 对开源项目是免费的——如果你觉得我们的评审有帮助,欢迎分享 ✨
帮我变得更有用!请在每条评论上点击 👍 或 👎,我会根据你的反馈来改进后续的评审。
Original comment in English

Hey - I've left some high level feedback:

  • Consider clarifying and enforcing the interaction between UseRegularSpMedication and UseAllExpireSoonSpMedication in the pipeline/task logic (e.g., what happens when both are enabled or both disabled) so the behavior is deterministic and easy to reason about.
  • For the UseAllExpireSoonSpMedication threshold ("time limit < 3 days / turns red"), make sure the implementation uses the same boundary condition and time source as the in-game UI, especially for edge cases like exactly 3 days remaining or time zone differences.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider clarifying and enforcing the interaction between `UseRegularSpMedication` and `UseAllExpireSoonSpMedication` in the pipeline/task logic (e.g., what happens when both are enabled or both disabled) so the behavior is deterministic and easy to reason about.
- For the `UseAllExpireSoonSpMedication` threshold ("time limit < 3 days / turns red"), make sure the implementation uses the same boundary condition and time source as the in-game UI, especially for edge cases like exactly 3 days remaining or time zone differences.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@MistEO MistEO merged commit d49e6cc into MaaEnd:v2 Mar 25, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants