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

Remove TargetLocation and TargetActor from order issuing code. #13995

Merged
merged 3 commits into from Oct 15, 2017

Conversation

Projects
None yet
3 participants
@pchote
Member

pchote commented Sep 7, 2017

Teaching actors how to properly behave when ordered to interact with frozen actors is a prerequisite for TS (#11265 is a major issue for cloak generators), and something we'd like to fix in general for the next release. This is tricky right now because the Order class was never taught about Target, and frozen actor targeting is a bolted on kludge.

This PR starts the fixing this by introducing a new Order constructor that accepts a Target, and migrating all order issuing to use it. Future PRs will push this through serialization/deserialization and then order resolving.

Once this is complete we will be able to implement the changes from #13363 across several smaller (and more reviewable) PRs by porting traits/activities from ResolveFrozenActorOrder to the native Order.Target on an activity-by-activity basis.

@pchote pchote added this to the Next + 1 milestone Sep 7, 2017

@reaperrr

This comment has been minimized.

Show comment
Hide comment
@reaperrr

reaperrr Sep 7, 2017

Contributor

OpenRA.Game\OrderTest.cs(29,5): error CS0200: Property or indexer 'Order.TargetLocation' cannot be assigned to -- it is read only

Contributor

reaperrr commented Sep 7, 2017

OpenRA.Game\OrderTest.cs(29,5): error CS0200: Property or indexer 'Order.TargetLocation' cannot be assigned to -- it is read only

@pchote

This comment has been minimized.

Show comment
Hide comment
@pchote

pchote Sep 7, 2017

Member

Fixed.

Member

pchote commented Sep 7, 2017

Fixed.

@reaperrr

Couldn't find any issues

@pchote pchote requested review from RoosterDragon, abcdefg30 and rob-v Oct 15, 2017

@rob-v

rob-v approved these changes Oct 15, 2017

lgtm 👍
one question for confirmation

return new Order(order.OrderID, self, queued) { TargetActor = target.Actor };
return null;

This comment has been minimized.

@rob-v

rob-v Oct 15, 2017

Contributor

Before here was also created Order for "PortableChronoDeploy", now it is null - intentional, right?

@rob-v

rob-v Oct 15, 2017

Contributor

Before here was also created Order for "PortableChronoDeploy", now it is null - intentional, right?

This comment has been minimized.

@pchote

pchote Oct 15, 2017

Member

Yeah, this was a bug that would duplicate other order types.

@pchote

pchote Oct 15, 2017

Member

Yeah, this was a bug that would duplicate other order types.

@reaperrr reaperrr merged commit d967c56 into OpenRA:bleed Oct 15, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment