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

Function logistics_setFeature

plugins/logistics.cpp:845–854  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

843}
844
845static bool logistics_setFeature(color_ostream &out, bool enabled, string feature) {
846 DEBUG(control, out).print("entering logistics_setFeature (enabled={}, feature={})\n",
847 enabled, feature);
848 if (feature != "autoretrain")
849 return false;
850 config.set_bool(CONFIG_TRAIN_PARTIAL, enabled);
851 if (is_enabled && enabled)
852 logistics_cycle(out, false);
853 return true;
854}
855
856static bool logistics_getFeature(color_ostream &out, string feature) {
857 DEBUG(control, out).print("entering logistics_getFeature (feature={})\n", feature);

Callers

nothing calls this directly

Calls 2

logistics_cycleFunction · 0.85
printMethod · 0.45

Tested by

no test coverage detected