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
Conversation
@@ -377,16 +377,12 @@ Patriot: | |||
RateOfTurn: 20 | |||
Speed: 341 | |||
RangeLimit: 30 | |||
Angle: 88 |
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.
Wouldn't the removal of this trigger the circling-missile behaviour on directly above targets?
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.
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).
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.
Ah, right, nevermind then.
Updated. |
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."); |
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.
I suggest "an" → "a valid" because somebody may have specified a pool name with a typo.
Works well ingame, so 👍 after fixing those two minor nits. |
72e2970
to
d3887da
Compare
Updated. |
Needs a rebase. |
Rebased. |
if (reloadStages >= 0) | ||
ammoSuffix = (currentAmmo * reloadStages / ammoPool.Info.Ammo).ToString(); | ||
|
||
var newSequence = NormalizeSequence(self, sequence + ammoSuffix); |
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.
Those constructs are not lint testable. Just an observation.
Works as promised. ✅ |
Implement ammo-dependent turret art for TD Mobile SAM
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.