From 1d02ecff6f6b1dfafc3d317c026535b532580d42 Mon Sep 17 00:00:00 2001 From: Japa Date: Tue, 3 Oct 2017 18:56:49 +0530 Subject: [PATCH] Add safe for remote flag to select default functions. --- library/RemoteTools.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/library/RemoteTools.cpp b/library/RemoteTools.cpp index 77374ea0c..763049a04 100644 --- a/library/RemoteTools.cpp +++ b/library/RemoteTools.cpp @@ -652,29 +652,29 @@ CoreService::CoreService() { suspend_depth = 0; // These 2 methods must be first, so that they get id 0 and 1 - addMethod("BindMethod", &CoreService::BindMethod, SF_DONT_SUSPEND); + addMethod("BindMethod", &CoreService::BindMethod, SF_DONT_SUSPEND | SF_ALLOW_REMOTE); addMethod("RunCommand", &CoreService::RunCommand, SF_DONT_SUSPEND); // Add others here: - addMethod("CoreSuspend", &CoreService::CoreSuspend, SF_DONT_SUSPEND); - addMethod("CoreResume", &CoreService::CoreResume, SF_DONT_SUSPEND); + addMethod("CoreSuspend", &CoreService::CoreSuspend, SF_DONT_SUSPEND | SF_ALLOW_REMOTE); + addMethod("CoreResume", &CoreService::CoreResume, SF_DONT_SUSPEND | SF_ALLOW_REMOTE); addMethod("RunLua", &CoreService::RunLua); // Functions: - addFunction("GetVersion", GetVersion, SF_DONT_SUSPEND); - addFunction("GetDFVersion", GetDFVersion, SF_DONT_SUSPEND); + addFunction("GetVersion", GetVersion, SF_DONT_SUSPEND | SF_ALLOW_REMOTE); + addFunction("GetDFVersion", GetDFVersion, SF_DONT_SUSPEND | SF_ALLOW_REMOTE); - addFunction("GetWorldInfo", GetWorldInfo); + addFunction("GetWorldInfo", GetWorldInfo, SF_ALLOW_REMOTE); - addFunction("ListEnums", ListEnums, SF_CALLED_ONCE | SF_DONT_SUSPEND); - addFunction("ListJobSkills", ListJobSkills, SF_CALLED_ONCE | SF_DONT_SUSPEND); + addFunction("ListEnums", ListEnums, SF_CALLED_ONCE | SF_DONT_SUSPEND | SF_ALLOW_REMOTE); + addFunction("ListJobSkills", ListJobSkills, SF_CALLED_ONCE | SF_DONT_SUSPEND | SF_ALLOW_REMOTE); - addFunction("ListMaterials", ListMaterials, SF_CALLED_ONCE); - addFunction("ListUnits", ListUnits); - addFunction("ListSquads", ListSquads); + addFunction("ListMaterials", ListMaterials, SF_CALLED_ONCE | SF_ALLOW_REMOTE); + addFunction("ListUnits", ListUnits, SF_ALLOW_REMOTE); + addFunction("ListSquads", ListSquads, SF_ALLOW_REMOTE); - addFunction("SetUnitLabors", SetUnitLabors); + addFunction("SetUnitLabors", SetUnitLabors, SF_ALLOW_REMOTE); } CoreService::~CoreService()