Skip to content
Snippets Groups Projects
Commit 9b47f828 authored by svornost's avatar svornost
Browse files

Ignore partners who aren't present in the penthouse census. Automatic RA runs...

Ignore partners who aren't present in the penthouse census.  Automatic RA runs when adding new slaves could crash because the slave's partner wasn't added yet.
parent dfa0d77c
No related branches found
No related tags found
1 merge request!10421Fixes
......@@ -220,7 +220,7 @@ globalThis.penthouseCensus = function() {
return false; // lives in dojo
} else if (slave.relationship >= 4) {
const partner = getSlave(slave.relationshipTarget);
if (assignmentVisible(partner) && partner.ID < slave.ID && partner.rules.living === "luxurious") {
if (partner && assignmentVisible(partner) && partner.ID < slave.ID && partner.rules.living === "luxurious") {
return false; // living with partner, who is already assigned a room (always allocate a room to the partner with the lower ID)
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment