-
-
Notifications
You must be signed in to change notification settings - Fork 124
Units AutoDeploy/DeployBlock on Ammo depletion #1079
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
TechnoType: OnAmmoDepletion.AutoDeploy OnAmmoDepletion.DeployBlock
removed unsuccesseful building support
This reverts commit 33c8a68.
|
For now 'OnAmmoDepletion.DeployBlock=true' turns Deploy command to AreaGuard/Guard, because I couldn't figure out to save previous command. |
MortonPL
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, thank you for your contriburion. Here's a few notes on how to improve it (more in review comments):
It's a good idea to avoid nesting conditions if possible. Also, there's no need to use return at the end of a function body with no return type.
Please add an entry to CREDITS.md, docs/Whats-New.md and documentation.
Starkku
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that this is clearly aimed towards using Ares' type conversion, I do feel like messing with the deploying functionality instead of directly using type conversion using the recently implemented functionality is bit of a questionable choice, however lifting the restriction on IsSimpleDeployer would possibly allow some niche usage with vehicle to building deployers, and doing it this way allows using existing deploying animations etc. without requiring a new bespoke implementation so perhaps it is not all bad. Besides the IsSimpleDeployer thing there are a couple of smaller things and one bigger design issue I'd like to see addressed.
Co-authored-by: MortonPL <Bartm12@wp.pl>
Co-authored-by: MortonPL <Bartm12@wp.pl>
Co-authored-by: MortonPL <Bartm12@wp.pl>
Co-authored-by: MortonPL <Bartm12@wp.pl>
Co-authored-by: MortonPL <Bartm12@wp.pl>
Co-authored-by: MortonPL <Bartm12@wp.pl>
Co-authored-by: MortonPL <Bartm12@wp.pl>
Co-authored-by: MortonPL <Bartm12@wp.pl>
Co-authored-by: MortonPL <Bartm12@wp.pl>
Suggested refactoring applied
|
Heads up, if you go to |
Updated feature description
Credits and Changelog update
Co-authored-by: MortonPL <Bartm12@wp.pl>
OnAmmoDepletion_DeployBlock replaced with OnAmmoDepletion_DeployUnlockAmount
issue fixed, wrong condition
removed unnecessary functions
Implemented Hooks.Unload extension
Requires units to have:
'Ammo' > 0;
'IsSimpleDeployer=yes';
'Convert.Deploy='.
Parameters
'OnAmmoDepletion.AutoDeploy=true' - uses Deploy command on unit when Ammo gets 0.
'OnAmmoDepletion.DeployBlock=true' - all Deploy commands on unit will turn into AreaGuard/Guard if Ammo equals 0.