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

Method PushProtectedUnit

plugins/autobutcher.cpp:323–336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

321 }
322
323 void PushProtectedUnit(df::unit *unit) {
324 if(Units::isFemale(unit)) {
325 if(Units::isBaby(unit) || Units::isChild(unit))
326 fk_prot++;
327 else
328 fa_prot++;
329 }
330 else { //treat sex n/a like it was male
331 if(Units::isBaby(unit) || Units::isChild(unit))
332 mk_prot++;
333 else
334 ma_prot++;
335 }
336 }
337
338 void ClearUnits() {
339 fk_prot = fa_prot = mk_prot = ma_prot = 0;

Callers 1

autobutcher_cycleFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected