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
Abstract docking from Refinery & Harvester #20636
Conversation
Preview: SpaceAgeProcessing.mp4 |
8752ce5
to
86f5240
Compare
d0a30de
to
7dfff17
Compare
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.
Overall this is very well designed and cleanly written, I only made some minor suggestions to make this a bit more extensible and tidy up a few parts.
OpenRA.Mods.Common/UpdateRules/Rules/20221203/AbstractDocking.cs
Outdated
Show resolved
Hide resolved
OpenRA.Mods.Common/UpdateRules/Rules/20221203/AbstractDocking.cs
Outdated
Show resolved
Hide resolved
OpenRA.Mods.Common/UpdateRules/Rules/20221203/AbstractDocking.cs
Outdated
Show resolved
Hide resolved
OpenRA.Mods.Common/UpdateRules/Rules/20221203/AbstractDocking.cs
Outdated
Show resolved
Hide resolved
OpenRA.Mods.Common/UpdateRules/Rules/20221203/AbstractDocking.cs
Outdated
Show resolved
Hide resolved
OpenRA.Mods.Common/UpdateRules/Rules/20221203/AbstractDocking.cs
Outdated
Show resolved
Hide resolved
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.
Same feedback as with my prior review, just a few extra proposed changes.
4838c2f
to
e23d2d4
Compare
b5903c6
to
cbd81b3
Compare
cbd81b3
to
c1a3ef6
Compare
c1a3ef6
to
71cfd1a
Compare
71cfd1a
to
1fc6f6e
Compare
Please remove the test case. 1fc6f6e |
1fc6f6e
to
eaebe67
Compare
Dropped testcase and rebased |
eaebe67
to
60ba8e1
Compare
|
60ba8e1
to
5b46d5e
Compare
It was a rebase error, fixed by squashing 4th commit into the 3rd |
return true; | ||
} | ||
|
||
public virtual bool DockingPossible(BitSet<DockType> type, bool forceEnter = false) |
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.
IsDockingPossible
. Boolean members should start with is
or similar.
Also CanDock
and IsDockingPossible
seem redundant to each other.
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.
IsDockingPossible. Boolean members should start with is or similar.
sure
Also CanDock and IsDockingPossible seem redundant to each other.
They are completely different, you can read the documentation or just check out DockClientBase
@@ -170,6 +170,13 @@ public interface INotifyDockHost { void Docked(Actor self, Actor client); void U | |||
[RequireExplicitImplementation] | |||
public interface INotifyDockClient { void Docked(Actor self, Actor host); void Undocked(Actor self, Actor host); } | |||
|
|||
[RequireExplicitImplementation] | |||
public interface INotifyDockClientMoving |
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.
Why is this not part of INotifyDockClient
?
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.
Because Harvester (nor other clients) are not supposed to inherit it. It'a a notify inferface, meant for trait that wants to be notified
5b46d5e
to
f26b598
Compare
Redundant since 2013 PR: # 3407 Commit: 1eb04a7
HarvesterDockSequence -> GenericDockSequence DeliverResources -> MoveToDock
f26b598
to
6408dd5
Compare
Closes #20288
Closes #16464
Split from #20168
Supersedes #20181
Replaced search by actor name to search by
BitSet<DockType>
Linking refactored and renamed to reserving
Abstracted
DockHost
:IDockHost
fromRefinery
Abstracted
DockClientBase<>
:IDockClient
andDockClientManager
fromHarvester
Abstracted
INotifyDockClientMoving
fromINotifyHarvesterAction
There are still a lot of features than need to be added to this codebase for it to be able to absorb Rearm / Repair docking.
I advise to review commit by commit as git diff doesn't deal with file renames well