Add direct unsellable override and SellingAnim support - #2370
Open
frg2089 wants to merge 10 commits into
Open
Conversation
Signed-off-by: 舰队的偶像-岛风酱! <frg2089@outlook.com>
Signed-off-by: 舰队的偶像-岛风酱! <frg2089@outlook.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends Phobos’s TechnoType selling behavior by adding (1) a per-type sell animation hookable via artmd.ini and (2) a rulesmd.ini flag to allow “direct” selling (including sell cursor support) for TechnoTypes beyond the default docked/unit-sell constraints. It also updates the user-facing documentation and zh_CN localization to describe the new tags.
Changes:
- Added
SellingAnim(art tag) to optionally spawn a customAnimTypewhen a techno is sold. - Added
Unsellable.Direct(rules tag) to permit direct selling and force the sell cursor action in sell mode. - Updated docs, credits, and zh_CN translations to reflect the new features.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Misc/Hooks.BugFixes.cpp | Implements sell eligibility override, sell-cursor action override hook, and sell animation spawn on event execution. |
| src/Ext/TechnoType/Body.h | Adds new TechnoTypeExt fields for SellingAnim and Unsellable_Direct. |
| src/Ext/TechnoType/Body.cpp | Reads the new INI tags and serializes them for save/load persistence. |
| docs/Whats-New.md | Adds release notes entries referencing the new features and tags. |
| docs/New-or-Enhanced-Logics.md | Documents SellingAnim and Unsellable.Direct usage and placement. |
| docs/locale/zh_CN/LC_MESSAGES/Whats-New.po | Adds zh_CN translations for the new Whats-New entries. |
| docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po | Adds zh_CN translations for the new documentation sections. |
| docs/locale/zh_CN/LC_MESSAGES/CREDITS.po | Updates (partially) zh_CN credits translation strings impacted by the new feature credit entries. |
| CREDITS.md | Adds credits for the new features (with formatting changes to the contributor block). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
TaranDahl
requested changes
Aug 26, 2026
TaranDahl
left a comment
Contributor
There was a problem hiding this comment.
Do not use AI description on the main page.
You can simply copy the doc.
Signed-off-by: 舰队的偶像-岛风酱! <frg2089@outlook.com>
Signed-off-by: 舰队的偶像-岛风酱! <frg2089@outlook.com>
TaranDahl
approved these changes
Aug 26, 2026
frg2089
commented
Aug 26, 2026
Comment on lines
+3199
to
+3209
| auto location = pTechno->Location; | ||
| if (rtti == AbstractType::Infantry) | ||
| { | ||
| location.X -= 128; | ||
| location.Y -= 128; | ||
| } | ||
| else | ||
| { | ||
| location.X &= ~0xFF; | ||
| location.Y &= ~0xFF; | ||
| } |
Contributor
Author
TaranDahl
reviewed
Aug 26, 2026
…hno\Hooks.Misc.cpp Signed-off-by: 舰队的偶像-岛风酱! <frg2089@outlook.com>
Signed-off-by: 舰队的偶像-岛风酱! <frg2089@outlook.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What kind of change is this?
Skip Changelog).Skip Changelog,Skip Docs).Skip Docs).Skip Changelog,Skip Docs,Skip Credits).Description
Directly sellable TechnoTypes
Unsellable.Directcan be set to true to directly allow the TechnoType to be sold and ensure that the sell cursor is displayed in sell mode.In
rulesmd.ini:Custom animation when selling TechnoTypes
SellingAnimcan be used to play an additional custom animation when a TechnoType is sold.In
artmd.ini: