MCPcopy Create free account
hub / github.com/DFHack/dfhack / impregnate

Function impregnate

plugins/pet-uncapper.cpp:42–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40};
41
42bool impregnate(df::unit* female, df::unit* male) {
43 if (!female || !male)
44 return false;
45 if (female->pregnancy_genes)
46 return false;
47
48 df::unit_genes* preg = new df::unit_genes;
49 *preg = male->appearance.genes;
50 female->pregnancy_genes = preg;
51 female->pregnancy_timer = config.get_int(CONFIG_PREG_TIME);
52 female->pregnancy_caste = male->caste;
53 return true;
54}
55
56void impregnateMany(color_ostream &out, bool verbose = false) {
57 // mark that we have recently run

Callers 1

impregnateManyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected