Skip to content
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

fix: find bales in missions #144

Merged
merged 4 commits into from
Dec 27, 2024
Merged

fix: find bales in missions #144

merged 4 commits into from
Dec 27, 2024

Conversation

pvaiko
Copy link
Contributor

@pvaiko pvaiko commented Dec 27, 2024

Bales in missions now have owner 0 (AccessHandler.EVERYONE), so check for that as well.

Bales in missions now have owner 0 (AccessHandler.EVERYONE),
so check for that as well.
@pvaiko pvaiko self-assigned this Dec 27, 2024
@pvaiko pvaiko linked an issue Dec 27, 2024 that may be closed by this pull request
if not object.mountObject and object:getOwnerFarmId() == self.vehicle:getOwnerFarmId() and
self:isBaleOnField(bale) then
if not object.mountObject and
(object:getOwnerFarmId() == AccessHandler.EVERYONE or
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could use the following function to check the access?
Should also check the AccessHandler.EVERYONE permission. g_currentMission.accessHandler:canFarmAccess(self.vehicle:getOwnerFarmId(), object)

Peter Vaiko added 2 commits December 27, 2024 11:48
There really is no reason to avoid the target bale,
we want to hit it with the baler/wrapper anyway.
@Tensuko Tensuko merged commit 7afa211 into main Dec 27, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ballen wickler
3 participants