Ludeon Forums

RimWorld => Bugs => Topic started by: System.Linq on December 27, 2016, 01:49:41 PM

Title: Gay colonists rarely hit on each other
Post by: System.Linq on December 27, 2016, 01:49:41 PM
Here's the code that governs sexuality from InteractionWorker_RomanceAttempt:


float num7 = (initiator.gender != recipient.gender != (initiator.story.traits.HasTrait(TraitDefOf.Gay) != recipient.story.traits.HasTrait(TraitDefOf.Gay))) ? 1f : 0.15f;


Here's the resultant truth table:
(http://puu.sh/t2IOz/d60c8119db.png)
x = Initiator is male
y = Recipient is male
z = Initiator is gay
a = Recipient is gay

When s is true, pawns will hit on each other. When z^a is true, only one of them is gay. When it's false, both of them are straight OR (crucially) both of them are gay, as you can see in the final row. The result is that, as in the final row, when both are male and both are gay, both get the reduced 15% rate to hit on each other.

This bug means that gay colonists are once again doomed to hit endlessly on straight colonists (and straight colonists will hit on gay colonists if they find them attractive, ironically), but two gay people will very rarely end up together. This does not seem like intended behavior, more likely an unforeseen consequence of trying to adopt an elegant equation to govern straight-gay interaction.

It should look like this:


float num7 = (initiator.gender == recipient.gender) ? ((initiator.story.traits.HasTrait(TraitDefOf.Gay)) ? 1f : 0.15f) : ((!initiator.story.traits.HasTrait(TraitDefOf.Gay)) ? 1f : 0.15f);
Title: Re: [A16] Gay colonists won't hit on each other
Post by: Tynan on January 09, 2017, 02:55:13 PM
Darn, it is a bug. Will fix. Thanks.
Title: Re: Gay colonists rarely hit on each other
Post by: ison on January 13, 2017, 11:24:28 AM
Fixed, thanks.