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 more RevealDisguiseOn types and unhardcode some events #13639

Merged
merged 2 commits into from Sep 13, 2017

Conversation

Projects
None yet
4 participants
@abcdefg30
Member

abcdefg30 commented Jul 14, 2017

Events means things like Infiltration, Demolition and Unloading. That was hardcoded to only uncloak units before, but now calls an interface which can be easily implemented by custom traits.

@GraionDilach

The interfaces seem nice and I guess they will find more uses longterm even.

👍

@Mailaender

Looks good otherwise.

if (cloak != null && cloak.Info.UncloakOn.HasFlag(UncloakType.Infiltrate))
cloak.Uncloak();
foreach (var ini in notifiers)
ini.Infiltrating(self);
foreach (var t in target.TraitsImplementing<INotifyInfiltrated>())

This comment has been minimized.

@Mailaender

Mailaender Aug 31, 2017

Member

There is already a very similar interface so I suggest to either use that one or move the Infiltrating check before OnInside is triggered.

@Mailaender

Mailaender Aug 31, 2017

Member

There is already a very similar interface so I suggest to either use that one or move the Infiltrating check before OnInside is triggered.

This comment has been minimized.

@abcdefg30

abcdefg30 Sep 12, 2017

Member

This is using the traits of the target, while we want the traits of self. Moving could work, but are you sure that we don't regress anything else then? (The uncloaking also happened after checking if the infiltration is valid.)

@abcdefg30

abcdefg30 Sep 12, 2017

Member

This is using the traits of the target, while we want the traits of self. Moving could work, but are you sure that we don't regress anything else then? (The uncloaking also happened after checking if the infiltration is valid.)

This comment has been minimized.

@Mailaender

Mailaender Sep 12, 2017

Member

Oh, I see.

@Mailaender

Mailaender Sep 12, 2017

Member

Oh, I see.

@abcdefg30

This comment has been minimized.

Show comment
Hide comment
@abcdefg30

abcdefg30 Sep 12, 2017

Member

Rebased.

Member

abcdefg30 commented Sep 12, 2017

Rebased.

if (cloak != null && cloak.Info.UncloakOn.HasFlag(UncloakType.Infiltrate))
cloak.Uncloak();
foreach (var ini in notifiers)
ini.Infiltrating(self);
foreach (var t in target.TraitsImplementing<INotifyInfiltrated>())

This comment has been minimized.

@Mailaender

Mailaender Sep 12, 2017

Member

Oh, I see.

@Mailaender

Mailaender Sep 12, 2017

Member

Oh, I see.

@reaperrr reaperrr merged commit 17f7aac into OpenRA:bleed Sep 13, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@reaperrr

This comment has been minimized.

Show comment
Hide comment
@reaperrr
Contributor

reaperrr commented Sep 13, 2017

@abcdefg30 abcdefg30 deleted the abcdefg30:disguiseTypes branch Sep 13, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment