So, I found this section, which appears to be where the Cleanliness of the house gets reduced: each slave reduces it by 1, except that shortstacks do 2/3, beastkin 4/3, and a few key races nearly twice the norm.
for person in globals.slaves: if person.away.duration == 0: if person.bodyshape == 'shortstack': globals.state.condition = -0.65 elif person.race in ['Lamia','Arachna','Centaur', 'Harpy', 'Scylla']: globals.state.condition = -1.8 elif person.race.find('Beastkin') >= 0: globals.state.condition = -1.3 else: globals.state.condition = -1.0
But then I took a closer look, and it appears that each line is setting the variable, not changing the variable. That is, the only loop that matters should be the final loop, in which the condition is set te a negative number related to that specific slave's race.
But since the mansion clearly appears to be getting dirty in a less consistent fashion, it appears that these lines do something I didn't expect. So I hunted around some more and found this:
func cond_set(value): condition += value*conditionmod if condition > 100: condition = 100 elif condition < 0: condition = 0
...which is defined as the way that this variable gets changed/set. So I take it that elsewhere in the code, "globals.state.condition = X" gets reinterpreted as "cond_set(X)"?
Related question: If I change these statements to -= X instead of = -X, how would that affect the code, if at all?