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

Method save_from_unit

plugins/manipulator.cpp:793–802  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

791 });
792 }
793 void save_from_unit(UnitInfo *unit)
794 {
795 ProfessionTemplate t = {
796 unit_ops::get_profname(unit)
797 };
798
799 t.fromUnit(unit);
800 t.save(professions_folder);
801 reload();
802 }
803
804private:
805 void _load(const std::string &path, bool library) {

Callers 1

feedMethod · 0.80

Calls 3

get_profnameFunction · 0.85
fromUnitMethod · 0.80
saveMethod · 0.45

Tested by

no test coverage detected