Repository navigation
feat(items): add the talisman of mobility - #1458
icheat2win wants to merge 1 commit into
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 51 |
| Duplication | 16 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6b4b1796e7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e2eb87bf26
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| public override string Name => PlugInName; | ||
|
|
||
| /// <inheritdoc /> | ||
| public override string Description => PlugInDescription; |
There was a problem hiding this comment.
Return localized resources from the update metadata properties
In a German or Chinese admin-panel session, this update still appears in English: Updates.razor.cs forwards the update's Name and Description properties directly, so the localized [Display] attribute is not consulted on the update-selection page. The translations added in this commit therefore do not reach the page where operators decide whether to install this optional update. docs/CODING_RULES.md rule 10 requires localized plugin names and descriptions; return the corresponding resource properties from both overrides instead of the English constants.
AGENTS.md reference: AGENTS.md:L16-L17
Useful? React with 👍 / 👎.
| return false; | ||
| } | ||
|
|
||
| SetValue(player, character, Stats.MobilityTalismanMap, 0); |
There was a problem hiding this comment.
Preserve the bookmark for other half-used talismans
When a character uses two full talismans once before returning with either, both items reach durability 1 and share the character's latest bookmark. Returning with the first talisman clears that shared bookmark, so the second subsequently fails in GetSavedGateAsync and cannot perform its remaining use unless another unused talisman saves a location. Retain the bookmark for other half-used talismans, or prevent multiple outstanding saves rather than silently invalidating another item's paid return use.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
I think that's acceptable for now.
Prevent consuming a second talisman while there is still one with 1 durability in the inventory.
| var map = await player.GameContext.GetMapAsync((ushort)mapNumber).ConfigureAwait(false); | ||
| return new ExitGate | ||
| { | ||
| Map = map?.Definition ?? mapDefinition, |
There was a problem hiding this comment.
Resolve an available map host before accepting the return gate
If the saved map remains active in configuration but its hosting server is stopped, a character on another server gets a null result from GetMapAsync, yet this fallback still produces a usable gate. The caller then clears the bookmark and consumes the talisman, while PlayerMapTransitions.ClientReadyAfterMapChangeAsync cannot locate the destination and warps the character to its home map instead. Check for an available local or remote host before accepting the gate, leaving the bookmark and item intact when none is available.
Useful? React with 👍 / 👎.
sven-n
left a comment
There was a problem hiding this comment.
This PR conflicts with current master, so I can't merge it. Please rebase it onto master. These files conflict:
src/GameLogic/Properties/PlugInResources.Designer.cssrc/GameLogic/Properties/PlugInResources.resxsrc/Persistence/Initialization/Properties/ItemNames.Designer.cssrc/Persistence/Initialization/Properties/ItemNames.de.resxsrc/Persistence/Initialization/Properties/ItemNames.resxsrc/Persistence/Initialization/Properties/ItemNames.zh-CN.resxtests/MUnique.OpenMU.Persistence.Initialization.Tests/ItemStatProfilesDataTest.cs
Most of them are resource files (.resx / .Designer.cs) which other merged PRs also extended. When you resolve them, keep the entries of both sides, and regenerate the designer file instead of merging it by hand. I'll review it in full once it's rebased.
Generated by Claude Code
dab398d to
9015939
Compare
sven-n
left a comment
There was a problem hiding this comment.
Thanks for the rebase. Unfortunately, #1504 was merged in the meantime and regenerated GameLogic/Properties/PlugInResources.Designer.cs, so this PR conflicts again (PlugInResources.*, PlayerMessage.*). Please rebase once more: keep the entries of both sides in the .resx files, then regenerate the designer instead of merging it by hand.
Your five item PRs (#1458, #1461, #1464, #1470, #1471) all add to the same resource files, so they conflict with each other too. Each merge will make the others conflict again. I'll merge whichever is rebased and green first.
Code feedback for this one:
- Localization:
AddTalismanOfMobilityUpdatePlugIn.Name/Descriptionreturn the English constantsPlugInName/PlugInDescription, although theDisplayattribute points to resources. Please return the resources, likeAddTalismanOfResurrectionUpdatePlugInin #1461 does (rule 10). - Map requirements on return:
GetSavedGateAsynconly checks that the saved map is active. If the character no longer fulfills its requirements (e.g. no wings for Icarus), it's warped there anyway. Please checkmapDefinition.TryGetRequirementError(player, out _)before warping, as the Talisman of Resurrection does, and keep the talisman unused in that case.
Generated by Claude Code
Part of MUnique#1339 The first use saves the place of the character, the second one warps it back. The place is stored in stat attributes of the character. An optional update adds the item and puts the shop packages on sale. Rebased onto master: this is the change of the earlier commits in one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011xNc76CH3CGWUp5r4XmXWK
9015939 to
54949af
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 54949af202
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (new CashShopItems(context, gameConfiguration).CreateTalismanOfMobility() is { } talisman) | ||
| { | ||
| ItemRules.Apply([talisman]); |
There was a problem hiding this comment.
Apply rules when the cash-shop update already created the talisman
When upgrading a pre-cash-shop database with both optional updates selected, AddCashShopUpdatePlugIn.ApplyAsync runs first and now creates the talisman through CashShopItems.Initialize(). Consequently, CreateTalismanOfMobility() returns null here and skips the rule application. The mandatory item-rule update runs before the cash-shop update, so the talisman retains the model's permissive defaults for trading, dropping and NPC/personal-store sales, unlike a freshly initialized database. Apply the restrictions to the talisman created by the earlier update too, and cover this upgrade sequence to satisfy docs/CODING_RULES.md rule 4's cumulative-repair requirement.
AGENTS.md reference: AGENTS.md:L16-L17
Useful? React with 👍 / 👎.
Part of #1339
The first use saves the place of the character, the second one warps it back. The place is stored in stat attributes of the character. An optional update adds the item and puts the shop packages on sale.
Claude-Session: https://claude.ai/code/session_011xNc75fJTee8EPxDxQxuGi