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

Method CoreService

library/RemoteTools.cpp:656–685  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

654}
655
656CoreService::CoreService() :
657 suspend_depth{0},
658 coreSuspender{nullptr}
659{
660
661 // These 2 methods must be first, so that they get id 0 and 1
662 addMethod("BindMethod", &CoreService::BindMethod, SF_DONT_SUSPEND | SF_ALLOW_REMOTE);
663 addMethod("RunCommand", &CoreService::RunCommand, SF_DONT_SUSPEND);
664
665 // Add others here:
666 addMethod("CoreSuspend", &CoreService::CoreSuspend, SF_DONT_SUSPEND | SF_ALLOW_REMOTE);
667 addMethod("CoreResume", &CoreService::CoreResume, SF_DONT_SUSPEND | SF_ALLOW_REMOTE);
668
669 addMethod("RunLua", &CoreService::RunLua);
670
671 // Functions:
672 addFunction("GetVersion", GetVersion, SF_DONT_SUSPEND | SF_ALLOW_REMOTE);
673 addFunction("GetDFVersion", GetDFVersion, SF_DONT_SUSPEND | SF_ALLOW_REMOTE);
674
675 addFunction("GetWorldInfo", GetWorldInfo, SF_ALLOW_REMOTE);
676
677 addFunction("ListEnums", ListEnums, SF_CALLED_ONCE | SF_DONT_SUSPEND | SF_ALLOW_REMOTE);
678 addFunction("ListJobSkills", ListJobSkills, SF_CALLED_ONCE | SF_DONT_SUSPEND | SF_ALLOW_REMOTE);
679
680 addFunction("ListMaterials", ListMaterials, SF_CALLED_ONCE | SF_ALLOW_REMOTE);
681 addFunction("ListUnits", ListUnits, SF_ALLOW_REMOTE);
682 addFunction("ListSquads", ListSquads, SF_ALLOW_REMOTE);
683
684 addFunction("SetUnitLabors", SetUnitLabors, SF_ALLOW_REMOTE);
685}
686
687CoreService::~CoreService()
688{

Callers

nothing calls this directly

Calls 2

addMethodFunction · 0.85
addFunctionFunction · 0.85

Tested by

no test coverage detected