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

Function SetUnitLabors

library/RemoteTools.cpp:642–654  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

640}
641
642static command_result SetUnitLabors(color_ostream &stream, const SetUnitLaborsIn *in)
643{
644 for (int i = 0; i < in->change_size(); i++)
645 {
646 auto change = in->change(i);
647 auto unit = df::unit::find(change.unit_id());
648
649 if (unit)
650 unit->status.labors[change.labor()] = change.value();
651 }
652
653 return CR_OK;
654}
655
656CoreService::CoreService() :
657 suspend_depth{0},

Callers

nothing calls this directly

Calls 1

findFunction · 0.50

Tested by

no test coverage detected