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

Changed the order of claiming bed and approaching it. #744

Closed
wants to merge 1 commit into from

Conversation

Taranchuk
Copy link
Contributor

In vanilla pawns are claiming beds before approaching them so multiple pawns will know the owner before claiming. The PR should fix the issues with claiming double beds.

@Taranchuk
Copy link
Contributor Author

Alternatively, the job could be simply removed and the claiming bed logic could be just moved to the sleep job (the same way the game operates), but I'm not sure if this change is welcome.

@OrionFive
Copy link
Owner

I'm also not a fan of guests claiming the beds before they approach them. This used to work fine before the other PR. I don't see why this needs to be changed now. There must be a better fix.

@Taranchuk
Copy link
Contributor Author

Well, it's how the game operates with colonists. They claim beds only when are searching for sleep jobs and before pathing to them. And if not change the logic, then multiple bed spot support for guests is not possible to make. So we can't have guest couples sleeping with the same bed or in other mod cases, bunk beds where multiple people can sleep together on the same building.

@Taranchuk
Copy link
Contributor Author

In this mod I'm trying to add a support for Hospitality, this mod was designed with Hospitality in mind. Unfortunately, the way how Hospitality assign guest beds makes it impossible unless we change this.
https://github.com/Taranchuk/Bunk-Beds

@OrionFive
Copy link
Owner

I like the bunk bed idea.
But I'm not willing to compromise on how guests claim beds (go there, claim the bed). So we have to find a different way to fix it.

@Taranchuk
Copy link
Contributor Author

Well, it will be tough to find another fix. Because with group beds, the pawns have to get to know the other owners before the job is even issued so they can know if they can share the bed. The game solves this with instant bed claiming. We could solve this by reserving a bed when making a bed claim job. With this, other pawns will either look for other beds or the claim job will not be assigned until the beds are unreserved.

@OrionFive
Copy link
Owner

The way Hospitality solves it is by going to an available bed. If it has been claimed in the meantime, it should try to find a new bed, where sharing is possible. No reserving required.

@OrionFive
Copy link
Owner

I'm looking into it right now, maybe I can find a fix. Because most of Hospitality's bed code is made with multiple bed users in mind (it used to work fine in the past).

@Taranchuk
Copy link
Contributor Author

You could check it with the Bunk Beds mod. Before my PR guests wouldn't share bunk beds while colonists can share the bunk beds fine

@OrionFive
Copy link
Owner

The main issue I see right now is that Ideology forbids most pawns from sharing a bed. I'll try it with Bunk Beds, assuming it modifies this restriction.

@OrionFive
Copy link
Owner

OrionFive commented Mar 12, 2023

I think the issue is that with Bunk Beds it works, but it doesn't without. I'm still trying to verify that, though.

@Taranchuk
Copy link
Contributor Author

Bunk Beds will just allow everyone to share bunk beds. It also has some harmony patches, but nothing that changes the way how sharing works.

@OrionFive
Copy link
Owner

Turns out that I can't reproduce the issue with or without bunk beds.
So there must be another factor at play. Maybe a mod or a specific circumstance.
Ideology is a factor, because some ideologies find it fine that pawns share a bed while others don't.
But I can't get them to stand around.

@OrionFive
Copy link
Owner

I'm gonna wait for the users who reported the issue to provide logs.

@OrionFive OrionFive closed this Mar 12, 2023
@Taranchuk
Copy link
Contributor Author

I think you could reproduce the issues if you have a lot of visitors arriving at your base.

@OrionFive
Copy link
Owner

I tried it with varying amounts of beds and "visitor group (max)" which sends 16 at once.

@OrionFive
Copy link
Owner

Okay, Ideology is the issue. The "Free Lovin" trait restricts who will sleep in the same bed together.
If the first person claiming the bed has a strict Ideology and the second a free one, the second can still claim the bed, but the first will then refuse to sleep in it.
So what's needed is an added check for each Owner's Ideology when someone wants to claim the bed. However, for bunk beds this wouldn't apply so maybe we'll need a patch or something.

@OrionFive
Copy link
Owner

I made issue #747 regarding this.

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.

2 participants