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
Conversation
|
a629b7b
to
8dec5cb
Compare
8dec5cb
to
aa29eaa
Compare
aa29eaa
to
3aba424
Compare
|
||
public override Activity Tick(Actor self) | ||
{ | ||
var cargo = self.Trait<Cargo>(); |
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.
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; |
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.
This doesn't appear to check for suitable drop cells...?
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.
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.
I don't think i'm gonna work on this soon, was a pretty hacky attempt anyway. |
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.