Conversation
4c69c5e to
441b265
Compare
OpenRA.Mods.Common/Traits/Buildings/TransformsIntoLinkClientManager.cs
Outdated
Show resolved
Hide resolved
441b265 to
4fd1598
Compare
4fd1598 to
fcd74b5
Compare
OpenRA.Mods.Common/Traits/Buildings/TransformsIntoLinkClientManager.cs
Outdated
Show resolved
Hide resolved
OpenRA.Mods.Common/Traits/Buildings/TransformsIntoLinkClientManager.cs
Outdated
Show resolved
Hide resolved
|
|
||
| [Desc("Host actor type(s) leading to the condition being granted. Leave empty for allowing all hosts by default.")] | ||
| public readonly HashSet<string> DockHostNames = null; | ||
| public readonly HashSet<string> LinkHostNames = null; |
There was a problem hiding this comment.
Shouldn't this be using link types rather than actor names?
There was a problem hiding this comment.
Yes, that was one of the issues yet to be solved. Linked and Unlinked notifications don't provide a link type, and adding it is easier said than done
|
|
||
| [Desc("Client actor type(s) leading to the condition being granted. Leave empty for allowing all clients by default.")] | ||
| public readonly HashSet<string> DockClientNames = null; | ||
| public readonly HashSet<string> LinkClientNames = null; |
| WPos DockPosition { get; } | ||
| int DockWait { get; } | ||
| WAngle DockAngle { get; } | ||
| WPos LinkPosition { get; } |
There was a problem hiding this comment.
These really should move out of the link interface and into the docking implementation.
There was a problem hiding this comment.
It's used by FindAndDeliverResources to search resources closest to the refinery, by CarryableHarvester to order carryalls to, and LinkExts to search for the closest Link
There was a problem hiding this comment.
In other words, it's exposed for outside traits to interact with the process of moving to the link or finding the closest link
There was a problem hiding this comment.
Again, having a single LinkPosition is not correct for all potential types of link host. The interface should be abstracting the actions, not the implementation details (e.g. units should MoveWithinRange of a proximity host and not Move to a specific point).
There was a problem hiding this comment.
Sure, but I don't know the best way to do it. This can be iterated on in the future
There was a problem hiding this comment.
Isn't the problem then that FindAndDeliverResources depends on Link and not Dock?
| public override bool CanLinkTo(Actor hostActor, ILinkHost host, bool forceEnter = false, bool ignoreOccupancy = false) | ||
| { | ||
| return base.CanLinkTo(hostActor, host, forceEnter, ignoreOccupancy) | ||
| && (self.Owner == hostActor.Owner || (ignoreOccupancy && self.Owner.IsAlliedWith(hostActor.Owner))); |
There was a problem hiding this comment.
Wouldn't it make more sense to require force enter to unload at an allied refinery?
There was a problem hiding this comment.
why? Imo you should be able just directly order the harvester. IgnoreOccupancy is used for manual orders
|
The "link" interfaces still expose a lot of docking-specific things. If this really can't be fixed then I think it would be best to abandon the idea of renaming to link and just stick with docking: the abstraction issues remain, but at least it won't have the silly names. |
972b7e0 to
1c6d0b2
Compare
1c6d0b2 to
46ae665
Compare
46ae665 to
055f617
Compare
idea abandoned. Incase we decide otherwise this is the commit d082518 |
055f617 to
b7c4bff
Compare
pchote
left a comment
There was a problem hiding this comment.
LGTM. The controversial parts have been removed, and this is a clear improvement (focusing on bugfixes) over current bleed. Scope creeps/bugfixes can be handled in followup PRs.
Fixes #21027
supersedes #21067
Continued progress #20168
Changes taken from #20667
Changes taken from #20665
I've reduced the amount of changes to make the new docking system good enough for release
All changes contained here either have been discussed on github or discord or bug reports were submitted to discord or github