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 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

This comment has been minimized.

Copy link
Contributor

reaperrr commented Oct 30, 2017

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

@MustaphaTR MustaphaTR force-pushed the MustaphaTR:paradrop-aircraft branch from a629b7b to 8dec5cb Oct 31, 2017
@MustaphaTR MustaphaTR force-pushed the MustaphaTR:paradrop-aircraft branch from 8dec5cb to aa29eaa Nov 13, 2017
@MustaphaTR MustaphaTR force-pushed the MustaphaTR:paradrop-aircraft branch from aa29eaa to 3aba424 Nov 13, 2017

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

This comment has been minimized.

Copy link
@pchote

pchote Nov 15, 2017

Member

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;

This comment has been minimized.

Copy link
@pchote

pchote Nov 15, 2017

Member

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

This comment has been minimized.

Copy link
@MustaphaTR

MustaphaTR Nov 16, 2017

Author Member

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

This comment has been minimized.

Copy link
Member Author

MustaphaTR commented Dec 30, 2017

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
3 participants
You can’t perform that action at this time.