Merge branch 'develop' of dfhack/dfhack into develop

develop
lethosor 2016-11-10 14:27:31 -05:00
commit e12d68c725
6 changed files with 56 additions and 3 deletions

@ -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)

@ -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()

@ -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} )

@ -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;
}

@ -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"

@ -1 +1 @@
Subproject commit 642e493efcf8e8d803186950cd11eef3982d496e
Subproject commit 416bc28f2e25d06e7da28a5643b8a849aefddbf5