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

Method apply

plugins/manipulator.cpp:729–743  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

727 }
728
729 void apply(UnitInfo* u)
730 {
731 if (!mask && name.size() > 0)
732 unit_ops::set_profname(u, name);
733
734 for (size_t i = 0; i < NUM_COLUMNS; i++)
735 {
736 df::unit_labor labor = columns[i].labor;
737 bool status = hasLabor(labor);
738
739 if (!mask || status) {
740 u->unit->status.labors[labor] = status;
741 }
742 }
743 }
744
745 void fromUnit(UnitInfo* u)
746 {

Callers 2

select_professionMethod · 0.45

Calls 2

set_profnameFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected