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

Add Support for dropping Cargo with Parachute from an Aircraft #14276

Closed
wants to merge 2 commits into from

Conversation

MustaphaTR
Copy link
Member

@MustaphaTR MustaphaTR commented Oct 30, 2017

I'm not sure how well the code is, may need help to make it better. But well it works.

Also maybe for another PR, but i think "unloadAll" should be able to settable on .yaml, i think would be cool. ParadropCargo acts a bit wierd with unloadAll = true tho (plane stays in midair for some ticks and cargo may die because of falling on each other). So it is false with this PR.

For Testcase, to ensure everthing works fine, i added a Badger, also gave ability to use parachute to Chinook, and gave Hind Cargo but without UnloadWithParachute tag.

@reaperrr
Copy link
Contributor

OpenRA.Mods.Common/Activities/ParadropCargo.cs(24,18): error CS0414: Warning as Error: The private field `OpenRA.Mods.Common.Activities.ParadropCargo.self' is assigned but its value is never used


public override Activity Tick(Actor self)
{
var cargo = self.Trait<Cargo>();
Copy link
Member

Choose a reason for hiding this comment

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

Please assign these from the constructor (passing Actor self as a parameter to query from) instead of looking it up ever tick.

inu.Unloading(self);

var actor = cargo.Peek(self);
var spawn = self.CenterPosition;
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't appear to check for suitable drop cells...?

Copy link
Member Author

Choose a reason for hiding this comment

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

Current checks indeed doesn't seem right, but i'm not sure what exactly to do either, it makes more sense that Cargo -> CanUnload checks this, rather than ParadropCargo activity.

CanUnload already still checking for LandableTerrainTypes. I think this shouldn't be checked for them.

@MustaphaTR
Copy link
Member Author

I don't think i'm gonna work on this soon, was a pretty hacky attempt anyway.

@MustaphaTR MustaphaTR closed this Dec 30, 2017
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

3 participants