private int GetConstraintHashForThing(Thing thing) { int hash = thing.def.shortHash; if (thing.Stuff != null) unchecked { hash += thing.Stuff.shortHash * 31; } return hash; }