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
Prevent movement pausing at invalid position. #17214
Conversation
The unit still slides back when you give move orders during pickup. I also noticed that due to the unit stopping later, the carryall often passes the harvester and has to turn around. |
Fixed the sliding when given orders during pickup. The carryall passing the harvester probably has to do with the |
Fix works for D2K carryall/harvester and RA thieves without obvious issues. |
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 looks generally like a good direction forward, and I may follow this up with a fix for #17211 (if only because it simplifies what I plan to write in the playtest news post).
2d4065b
to
87089b8
Compare
|
||
return true; | ||
var mobile = self.TraitOrDefault<Mobile>(); |
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.
Can we include the // HACK
comment above here too?
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.
Even when we can trust CurrentMovementTypes
we would probably want to check FromCell
and ToCell
anyway, because in that way we are also checking if we are actually on the grid.
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.
Can we put that in the comment then? 😄
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've created a new IsMovingBetweenCells
property to make this more self-documenting and separated from the internal implementation of Mobile
.
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.
Good idea. Can we please cache mobile
here from Created
, though?
It turns out that we can't just queue I have tried to fix this with 257b4b0 but have hit a roadblock with ChildActivity issues ( |
Those issues should be fixed now. |
Okay. Final attempt, different approach: Now |
Adding mobile-docking functionality to What was your objection to the approach I presented above? It turns out that the two issues were both simple oversights, and I fixed them for comparison in f291727 |
The new version removes the |
The reason for adding support for moving targets to So, as far as I'm concerned this fixes the issue at hand while simultaneously dealing with an oversight from #16509. The That said, your fixed version of the initial approach works just as well for now and I understand if you are reluctant to redo #17221 on short notice. So the question for me is if you want to aim #17221 for stable? (It is unclear to me if that is your intention). If that is the case, I would agree to go with your solution for stable and aim the |
I wasn't planning to since it doesn't affect any of the shipped mods, but on the other hand the changes for #17211 are relatively simple and it would be a nice feature for modders. I could get behind aiming that for prep and retargeting this for Next + 1. My main motivation wrt the prep branch is to not merge another big refactor that may regress other things (in this case aircraft in general). |
Swapping with #17221 on the milestone. |
Ok. Closing for now to avoid confusion. Will open a new PR specifically for the land changes after things have calmed down with respect to the playtest. |
Fixes #17209
Reverts #17189 and provides a proper fix for #17043 instead that still allows units to finish moving to a valid position before being halted by the thief/hijacker.
This also prevents a potential glitch if the carryall would be too quick to allow the unit to properly finish moving after locking. This same logic would also be needed for #17211, so this PR already brings us halfway on that.