Merge branch 'develop' of https://github.com/dfhack/dfhack into develop

develop
lethosor 2015-11-29 18:40:08 -05:00
commit 4382198de4
3 changed files with 14 additions and 2 deletions

@ -24,8 +24,13 @@ project(dfhack)
macro(CHECK_GCC COMPILER_PATH)
execute_process(COMMAND ${COMPILER_PATH} -dumpversion OUTPUT_VARIABLE GCC_VERSION_OUT)
string(STRIP "${GCC_VERSION_OUT}" GCC_VERSION_OUT)
if (${GCC_VERSION_OUT} VERSION_LESS "4.5" OR ${GCC_VERSION_OUT} VERSION_GREATER "4.9.9")
message(SEND_ERROR "${COMPILER_PATH} version ${GCC_VERSION_OUT} cannot be used - use GCC 4.5 through 4.9")
if (${GCC_VERSION_OUT} VERSION_LESS "4.5")
message(SEND_ERROR "${COMPILER_PATH} version ${GCC_VERSION_OUT} cannot be used - use GCC 4.5 or later")
elseif (${GCC_VERSION_OUT} VERSION_GREATER "4.9.9")
# GCC 5 changes ABI name mangling to enable C++11 changes.
# This must be disabled to enable linking against DF.
# http://developerblog.redhat.com/2015/02/05/gcc5-and-the-c11-abi/
add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)
endif()
endmacro()

@ -229,6 +229,9 @@ message UnitDefinition
optional uint32 flags3 = 10;
optional bool is_soldier = 11;
optional BodySizeInfo size_info = 12;
optional string name = 13;
optional int32 blood_max = 14;
optional int32 blood_count = 15;
}
message UnitList

@ -1343,6 +1343,10 @@ static command_result GetUnitList(color_ostream &stream, const EmptyMessage *in,
size_info->set_area_base(unit->body.size_info.area_base);
size_info->set_length_cur(unit->body.size_info.length_cur);
size_info->set_length_base(unit->body.size_info.length_base);
if (unit->name.has_name)
{
send_unit->set_name(DF2UTF(Translation::TranslateName(Units::getVisibleName(unit))));
}
}
return CR_OK;
}