2 new tags for hiding the shield bar or recharge shields
-
Pips.HideIfNoStrengthcan be used to hide the shield's pip frame if theStrengthis 0. -
PoweredBycan be used to control the self-heal of the shield. If the owner has no structures from this list then the shield won't self-heal.
[SOMESHIELDTYPE] ; ShieldType name PoweredBy= ; List of BuildingType names Pips.HideIfNoStrength=false ; boolean
Summary by CodeRabbit
- New Features
- Shields now have a self-healing feature, enabled by specific building types.
- Shields' pip frame will now be hidden if the strength is zero.
- Bug Fixes
- Adjustments made for building weapons, info tip, and reveal production cameo positioning.
- Added support for
TurretOffsetfor SHP vehicles.
- Documentation
- Updated documentation to reflect new and enhanced logics for shields.
- Credits
- Acknowledged the contribution of an unspecified contributor for the new shield features.
## Walkthrough
The recent changes primarily focus on enhancing the shield functionality in the game. New properties have been introduced to control the self-healing of shields, hide the shield's pip frame when the strength is zero, and specify the buildings that enable self-healing. These changes have been implemented across various files, including documentation, source code, and credits.
## Changes
| File(s) | Summary |
| --- | --- |
| `CREDITS.md`, `docs/New-or-Enhanced-Logics.md`, `docs/Whats-New.md` | Added and documented new properties for shields: `SelfHealing.EnabledBy`, `Pips.HideIfNoStrength`, and `PoweredBy`. Also mentioned various fixes and enhancements. |
| `src/New/Entity/ShieldClass.cpp` | Introduced a new member variable `IsPoweredBy` and function `PoweredByCheck` to handle the power status of the shield. Modified existing functions to accommodate the new properties. |
| `src/New/Type/ShieldTypeClass.cpp`, `src/New/Type/ShieldTypeClass.h` | Added new properties to the `ShieldTypeClass`: `SelfHealing_EnabledBy`, `Pips_HideIfNoStrength`, and `Pips_HideIfNoStrength`. These properties are loaded from an INI file and serialized. |
## Poem
> 🍂 As the leaves fall, the shields rise, 🛡️
>
> With strength unseen by mortal eyes. 👀
>
> Healing themselves, hiding their pips, 🌟
>
> Powered by buildings, giving enemies slips. 🏢
>
> On this day, we celebrate the code, 🎉
>
> A rabbit's journey on the open road. 🐇
>
> So here's to changes, big and small, 🥂
>
> In the spirit of autumn, we embrace them all. 🍁
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Tips
Chat
There are 3 ways to chat with CodeRabbit:
:bangbang: IMPORTANT Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:@coderabbitai generate unit testing code for this file.@coderabbitai modularize this function.
- PR comments: Tag
@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:@coderabbitai generate interesting stats about this repository and render them as a table.@coderabbitai show all the console.log statements in this repository.@coderabbitai read src/utils.ts and generate unit testing code.@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.@coderabbitai help me debug CodeRabbit configuration file.
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (invoked as PR comments)
@coderabbitai pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository.@coderabbitai full reviewto do a full review from scratch and review all the files again.@coderabbitai summaryto regenerate the summary of the PR.@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai configurationto show the current CodeRabbit configuration for the repository.@coderabbitai helpto get help.
Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
CodeRabbit Configration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile to the root of your repository. - Please see the configuration documentation for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.
Nightly build for this pull request:
- compiled-dll-2f1eef338e52c36dc9e919ba3ce216ad795f210c.zip These artifacts will expire in 90 days and will not be available for download after that time.
This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build.
@coderabbitai review
@coderabbitai review
PoweredBy as a name is extremely misleading considering it only affects SelfHealing. It should be made clear it is only self-healing related if it is to stay like that.
SelfHealing.EnabledBy ?
SelfHealing.EnabledBy ?
Much more appropriate.
EDIT: Technically probably also currently doable without bespoke logic using the Warhead modifiers to enable self-healing. Possible that there's some edge-cases where they don't behave quite identically depending on the exact numbers put in though.
Applied the tag rename "SelfHealing.EnabledBy"
The current implementation also disables shield regen / respawn when the buildings are depowered or deactivated, so I'd open this discussion to see whether there's a need to support this case: disabling regen / respawn when these buildings (and to an extent, Technos) are existed no matter their stats.