Skip to content
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

Implement ammo-dependent turret art for TD Mobile SAM #8814

Merged
merged 2 commits into from Aug 1, 2015

Conversation

reaperrr
Copy link
Contributor

Another result of my work on TDX.

Mobile SAM (SSM in original game) now changes turret art depending on current amount of ammo. Uses AmmoPool.

Had to change the weapon's reload behavior to give this more limelight, so this might need some balance testing in addition to regular reviewing.

Closes #7493.

@@ -377,16 +377,12 @@ Patriot:
RateOfTurn: 20
Speed: 341
RangeLimit: 30
Angle: 88
Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't the removal of this trigger the circling-missile behaviour on directly above targets?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The Missile projectile doesn't have the Angle property. This is a bogus leftover (possibly from when this still was the SSM and the weapon used the Bullet projectile).

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, right, nevermind then.

@reaperrr
Copy link
Contributor Author

Updated.

@GraionDilach
Copy link
Contributor

Looks alright to me. 👍

{
ammoPool = self.TraitsImplementing<AmmoPool>().FirstOrDefault(a => a.Info.Name == info.AmmoPoolName);
if (ammoPool == null)
throw new InvalidOperationException("Actor type '" + self.Info.Name + "' does not define an ammo pool for its reloading turret.");
Copy link
Member

Choose a reason for hiding this comment

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

I suggest "an" → "a valid" because somebody may have specified a pool name with a typo.

@pchote
Copy link
Member

pchote commented Aug 1, 2015

Works well ingame, so 👍 after fixing those two minor nits.

@reaperrr
Copy link
Contributor Author

reaperrr commented Aug 1, 2015

Updated.

@Mailaender
Copy link
Member

Needs a rebase.

@reaperrr
Copy link
Contributor Author

reaperrr commented Aug 1, 2015

Rebased.

if (reloadStages >= 0)
ammoSuffix = (currentAmmo * reloadStages / ammoPool.Info.Ammo).ToString();

var newSequence = NormalizeSequence(self, sequence + ammoSuffix);
Copy link
Member

Choose a reason for hiding this comment

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

Those constructs are not lint testable. Just an observation.

@Mailaender
Copy link
Member

Works as promised. ✅

Mailaender added a commit that referenced this pull request Aug 1, 2015
Implement ammo-dependent turret art for TD Mobile SAM
@Mailaender Mailaender merged commit 7066254 into OpenRA:bleed Aug 1, 2015
@Mailaender
Copy link
Member

Changelog

@reaperrr reaperrr deleted the ssm-tur branch October 21, 2015 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants