| 58 | Random::MersenneRNG rng; |
| 59 | |
| 60 | bool isUnitMoodable (df::unit *unit) |
| 61 | { |
| 62 | if (!Units::isCitizen(unit)) |
| 63 | return false; |
| 64 | if (!unit->status2.limbs_grasp_count) |
| 65 | return false; |
| 66 | if (unit->mood != mood_type::None) |
| 67 | return false; |
| 68 | if (!ENUM_ATTR(profession,moodable,unit->profession)) |
| 69 | return false; |
| 70 | if (!Units::casteFlagSet(unit->race, unit->caste, caste_raw_flags::STRANGE_MOODS)) |
| 71 | return false; |
| 72 | return true; |
| 73 | } |
| 74 | |
| 75 | df::job_skill getMoodSkill (df::unit *unit) |
| 76 | { |