Skip to content

update:更新了新的旅商常驻代码#1131

Merged
ACaiCat merged 2 commits intoUnrealMultiple:masterfrom
AX-17:master
Apr 7, 2026
Merged

update:更新了新的旅商常驻代码#1131
ACaiCat merged 2 commits intoUnrealMultiple:masterfrom
AX-17:master

Conversation

@AX-17
Copy link
Copy Markdown
Contributor

@AX-17 AX-17 commented Apr 7, 2026

update:更新了新的旅商常驻代码

Summary by Sourcery

更新 RealTime 插件,使用 Terraria 的 UnspawnTravelNPC 钩子来保持旅行商人永久存在,并更新插件版本元数据。

新功能:

  • 确保旅行商人成为永久居民,并定期刷新其商品库存。

增强内容:

  • 将基于反射的 UnspawnTravelNPC 钩子替换为官方的 Terraria On 钩子 API。
  • 明确并扩展英文版 README 中关于时间同步、事件、天气、NPC 行为、PVP,以及旅行商人行为的说明。
  • 将更新日志提升到 2.7 版本,记录新的旅行商人常驻特性及相关优化。
Original summary in English

Summary by Sourcery

Update the RealTime plugin to use Terraria's UnspawnTravelNPC hook for keeping the traveling merchant permanently present and bump the plugin version metadata.

New Features:

  • Ensure the traveling merchant becomes a permanent resident with periodically refreshed inventory.

Enhancements:

  • Replace reflection-based hooking of UnspawnTravelNPC with the official Terraria On hook API.
  • Clarify and expand English README descriptions of time sync, events, weather, NPC behavior, PVP, and traveling merchant behavior.
  • Update changelog to version 2.7 noting the new traveling merchant residency feature and related optimizations.

@AX-17 AX-17 requested a review from a team as a code owner April 7, 2026 03:17
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.

Hey - 我发现了 1 个问题

给 AI Agent 的提示
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="src/RealTime/README.en-US.md" line_range="10" />
<code_context>
+- Local time will be synchronized every 8 seconds, so there may be brief moments when the server time does not match the local time. 
+- Blood Moon and Solar Eclipse will automatically end 20 minutes after starting; Frost Moon and Halloween will automatically end 40 minutes after starting. 
+- Fisherman quests and moon phases refresh every 24 minutes. 
+- Since NPCs do not spawn at night, the Elder and the Moon Worship Cultists check every 24 minutes, and if they do not exist, one will be summoned at the dungeon. 
+- Random daytime weather feature updates every 10 minutes. 
+- Nighttime NPC settlement feature. 
</code_context>
<issue_to_address>
**issue (typo):** 请澄清并修正有关上古之人和月之崇拜邪教徒那句话的语法问题。

请重新表述这句话,以明确主语并修正语法。例如:"Since NPCs do not spawn at night, the Elder and Moon Worship Cultists are checked every 24 minutes, and if they do not exist, one will be summoned at the dungeon." 请根据实际的游戏行为和术语适当调整措辞。

```suggestion
- Since NPCs do not spawn at night, the Elder and the Moon Worship Cultists are checked every 24 minutes, and if they do not exist, one will be summoned at the dungeon. 
```
</issue_to_address>

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

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="src/RealTime/README.en-US.md" line_range="10" />
<code_context>
+- Local time will be synchronized every 8 seconds, so there may be brief moments when the server time does not match the local time. 
+- Blood Moon and Solar Eclipse will automatically end 20 minutes after starting; Frost Moon and Halloween will automatically end 40 minutes after starting. 
+- Fisherman quests and moon phases refresh every 24 minutes. 
+- Since NPCs do not spawn at night, the Elder and the Moon Worship Cultists check every 24 minutes, and if they do not exist, one will be summoned at the dungeon. 
+- Random daytime weather feature updates every 10 minutes. 
+- Nighttime NPC settlement feature. 
</code_context>
<issue_to_address>
**issue (typo):** Clarify and fix grammar in the sentence about the Elder and Moon Worship Cultists.

Please rephrase this to clarify the subject and fix the grammar. For example: "Since NPCs do not spawn at night, the Elder and Moon Worship Cultists are checked every 24 minutes, and if they do not exist, one will be summoned at the dungeon." Adjust the wording to best match the actual in‑game behavior and terminology.

```suggestion
- Since NPCs do not spawn at night, the Elder and the Moon Worship Cultists are checked every 24 minutes, and if they do not exist, one will be summoned at the dungeon. 
```
</issue_to_address>

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.

- Local time will be synchronized every 8 seconds, so there may be brief moments when the server time does not match the local time.
- Blood Moon and Solar Eclipse will automatically end 20 minutes after starting; Frost Moon and Halloween will automatically end 40 minutes after starting.
- Fisherman quests and moon phases refresh every 24 minutes.
- Since NPCs do not spawn at night, the Elder and the Moon Worship Cultists check every 24 minutes, and if they do not exist, one will be summoned at the dungeon.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

issue (typo): 请澄清并修正有关上古之人和月之崇拜邪教徒那句话的语法问题。

请重新表述这句话,以明确主语并修正语法。例如:"Since NPCs do not spawn at night, the Elder and Moon Worship Cultists are checked every 24 minutes, and if they do not exist, one will be summoned at the dungeon." 请根据实际的游戏行为和术语适当调整措辞。

Suggested change
- Since NPCs do not spawn at night, the Elder and the Moon Worship Cultists check every 24 minutes, and if they do not exist, one will be summoned at the dungeon.
- Since NPCs do not spawn at night, the Elder and the Moon Worship Cultists are checked every 24 minutes, and if they do not exist, one will be summoned at the dungeon.
Original comment in English

issue (typo): Clarify and fix grammar in the sentence about the Elder and Moon Worship Cultists.

Please rephrase this to clarify the subject and fix the grammar. For example: "Since NPCs do not spawn at night, the Elder and Moon Worship Cultists are checked every 24 minutes, and if they do not exist, one will be summoned at the dungeon." Adjust the wording to best match the actual in‑game behavior and terminology.

Suggested change
- Since NPCs do not spawn at night, the Elder and the Moon Worship Cultists check every 24 minutes, and if they do not exist, one will be summoned at the dungeon.
- Since NPCs do not spawn at night, the Elder and the Moon Worship Cultists are checked every 24 minutes, and if they do not exist, one will be summoned at the dungeon.

@ACaiCat ACaiCat added this pull request to the merge queue Apr 7, 2026
Merged via the queue into UnrealMultiple:master with commit d400623 Apr 7, 2026
3 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.

2 participants