diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 8546c6e89..0e4c8f999 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -141,7 +141,7 @@ if (BUILD_SUPPORTED) DFHACK_PLUGIN(prospector prospector.cpp) DFHACK_PLUGIN(power-meter power-meter.cpp LINK_LIBRARIES lua) DFHACK_PLUGIN(regrass regrass.cpp) - DFHACK_PLUGIN(RemoteFortressReader remotefortressreader.cpp proto/RemoteFortressReader.proto PROTOBUFS RemoteFortressReader) + add_subdirectory(remotefortressreader) DFHACK_PLUGIN(rename rename.cpp LINK_LIBRARIES lua PROTOBUFS rename) add_subdirectory(rendermax) DFHACK_PLUGIN(resume resume.cpp) diff --git a/plugins/Plugins.cmake b/plugins/Plugins.cmake index 4871c1f0c..fe167ccb3 100644 --- a/plugins/Plugins.cmake +++ b/plugins/Plugins.cmake @@ -76,6 +76,7 @@ MACRO(DFHACK_PLUGIN) SET(PLUGIN_PROTOCPP) FOREACH(pbuf ${PLUGIN_PROTOBUFS}) SET(PLUGIN_SOURCES ${PLUGIN_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/proto/${pbuf}.pb.cc) + SET(PLUGIN_SOURCES ${PLUGIN_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/proto/${pbuf}.proto) SET(PLUGIN_PROTOCPP ${PLUGIN_PROTOCPP} ${CMAKE_CURRENT_SOURCE_DIR}/proto/${pbuf}.pb.cc) ENDFOREACH() diff --git a/plugins/remotefortressreader/CMakeLists.txt b/plugins/remotefortressreader/CMakeLists.txt new file mode 100644 index 000000000..0b84d8905 --- /dev/null +++ b/plugins/remotefortressreader/CMakeLists.txt @@ -0,0 +1,36 @@ +PROJECT (remotefortressreader) +# A list of source files +SET(PROJECT_SRCS + remotefortressreader.cpp +) +# A list of headers +SET(PROJECT_HDRS + +) +#proto files to include. +SET(PROJECT_PROTO + ../../proto/RemoteFortressReader +) + +SET_SOURCE_FILES_PROPERTIES( ${PROJECT_HDRS} PROPERTIES HEADER_FILE_ONLY TRUE) + +# mash them together (headers are marked as headers and nothing will try to compile them) +LIST(APPEND PROJECT_SRCS ${PROJECT_HDRS}) + +#linux +IF(UNIX) + add_definitions(-DLINUX_BUILD) + SET(PROJECT_LIBS + # add any extra linux libs here + ${PROJECT_LIBS} + ) +# windows +ELSE(UNIX) + SET(PROJECT_LIBS + # add any extra windows libs here + ${PROJECT_LIBS} + $(NOINHERIT) + ) +ENDIF(UNIX) +# this makes sure all the stuff is put in proper places and linked to dfhack +DFHACK_PLUGIN(RemoteFortressReader ${PROJECT_SRCS} LINK_LIBRARIES ${PROJECT_LIBS} PROTOBUFS ${PROJECT_PROTO} ) diff --git a/plugins/remotefortressreader.cpp b/plugins/remotefortressreader/remotefortressreader.cpp similarity index 99% rename from plugins/remotefortressreader.cpp rename to plugins/remotefortressreader/remotefortressreader.cpp index 4caa8e55f..d1803dc0b 100644 --- a/plugins/remotefortressreader.cpp +++ b/plugins/remotefortressreader/remotefortressreader.cpp @@ -145,6 +145,8 @@ static command_result GetPlantRaws(color_ostream &stream, const EmptyMessage *in static command_result CopyScreen(color_ostream &stream, const EmptyMessage *in, ScreenCapture *out); static command_result PassKeyboardEvent(color_ostream &stream, const KeyboardEvent *in); static command_result SendDigCommand(color_ostream &stream, const DigCommand *in); +static command_result SetPauseState(color_ostream & stream, const SingleBool * in); +static command_result GetPauseState(color_ostream & stream, const EmptyMessage * in, SingleBool * out); void CopyItem(RemoteFortressReader::Item * NetItem, df::item * DfItem); @@ -250,6 +252,8 @@ DFhackCExport RPCService *plugin_rpcconnect(color_ostream &) svc->addFunction("CopyScreen", CopyScreen); svc->addFunction("PassKeyboardEvent", PassKeyboardEvent); svc->addFunction("SendDigCommand", SendDigCommand); + svc->addFunction("SetPauseState", SetPauseState); + svc->addFunction("GetPauseState", GetPauseState); return svc; } @@ -3008,3 +3012,15 @@ static command_result SendDigCommand(color_ostream &stream, const DigCommand *in mc.WriteAll(); return CR_OK; } + +static command_result SetPauseState(color_ostream &stream, const SingleBool *in) +{ + DFHack::World::SetPauseState(in->value()); + return CR_OK; +} + +static command_result GetPauseState(color_ostream &stream, const EmptyMessage *in, SingleBool *out) +{ + out->set_value(World::ReadPauseState()); + return CR_OK; +} \ No newline at end of file diff --git a/plugins/ruby/CMakeLists.txt b/plugins/ruby/CMakeLists.txt index 6b5e62c66..f7d35433a 100644 --- a/plugins/ruby/CMakeLists.txt +++ b/plugins/ruby/CMakeLists.txt @@ -38,7 +38,7 @@ ELSE() ${RUBYLIB}.gz "81db54a8b8b3090c94c6ae2147d30b8f" ${RUBYLIB} - "8a8564418aebddef3dfee1e96690e713") + "8568db86a202b803ad7616c53b25bf75") ELSE() DOWNLOAD_FILE_UNZIP("https://github.com/DFHack/dfhack-bin/releases/download/0.43.05/win32-libruby187.dll.gz" "gz" diff --git a/plugins/stonesense b/plugins/stonesense index 642e493ef..416bc28f2 160000 --- a/plugins/stonesense +++ b/plugins/stonesense @@ -1 +1 @@ -Subproject commit 642e493efcf8e8d803186950cd11eef3982d496e +Subproject commit 416bc28f2e25d06e7da28a5643b8a849aefddbf5