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

develop
PeridexisErrant 2015-11-10 12:20:00 +11:00
commit d17b3dba50
7 changed files with 33 additions and 10 deletions

@ -93,7 +93,7 @@ endif()
# set up versioning.
set(DF_VERSION "0.40.24")
SET(DFHACK_RELEASE "r3")
SET(DFHACK_RELEASE "r4")
set(DFHACK_VERSION "${DF_VERSION}-${DFHACK_RELEASE}")
@ -250,12 +250,13 @@ endif()
# Packaging with CPack!
SET(DFHACK_PACKAGE_SUFFIX "")
IF(UNIX)
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
string(STRIP ${GCC_VERSION} GCC_VERSION)
SET(DFHACK_PACKAGE_SUFFIX "-gcc-${GCC_VERSION}")
if(APPLE)
SET(CPACK_GENERATOR "ZIP;TBZ2")
else()
SET(CPACK_GENERATOR "TBZ2")
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
SET(DFHACK_PACKAGE_SUFFIX "-gcc-${GCC_VERSION}")
endif()
ELSEIF(WIN32)
SET(CPACK_GENERATOR "ZIP")

@ -18,6 +18,9 @@
create a link to the relevant documentation - and check that the docs are
still up to date!
When adding a new release, change "DFHack future" to the appropriate title
before releasing, and then add a new "DFHack future" section after releasing.
#########
Changelog
@ -27,8 +30,8 @@ Changelog
:depth: 2
DFHack Future
=============
DFHack 0.40.24-r4
=================
Internals
---------

@ -205,6 +205,16 @@ message MaterialList{
repeated MaterialDefinition material_list = 1;
}
message BodySizeInfo
{
optional int32 size_cur = 1;
optional int32 size_base = 2;
optional int32 area_cur = 3; /*!< size_cur^0.666 */
optional int32 area_base = 4; /*!< size_base^0.666 */
optional int32 length_cur = 5; /*!< (size_cur*10000)^0.333 */
optional int32 length_base = 6; /*!< (size_base*10000)^0.333 */
}
message UnitDefinition
{
required int32 id = 1;
@ -218,6 +228,7 @@ message UnitDefinition
optional uint32 flags2 = 9;
optional uint32 flags3 = 10;
optional bool is_soldier = 11;
optional BodySizeInfo size_info = 12;
}
message UnitList

@ -1323,7 +1323,7 @@ static command_result GetUnitList(color_ostream &stream, const EmptyMessage *in,
auto world = df::global::world;
for (int i = 0; i < world->units.all.size(); i++)
{
auto unit = world->units.all[i];
df::unit * unit = world->units.all[i];
auto send_unit = out->add_creature_list();
send_unit->set_id(unit->id);
send_unit->set_pos_x(unit->pos.x);
@ -1336,6 +1336,13 @@ static command_result GetUnitList(color_ostream &stream, const EmptyMessage *in,
send_unit->set_flags2(unit->flags2.whole);
send_unit->set_flags3(unit->flags3.whole);
send_unit->set_is_soldier(ENUM_ATTR(profession, military, unit->profession));
auto size_info = send_unit->mutable_size_info();
size_info->set_size_cur(unit->body.size_info.size_cur);
size_info->set_size_base(unit->body.size_info.size_base);
size_info->set_area_cur(unit->body.size_info.area_cur);
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);
}
return CR_OK;
}

@ -1 +1 @@
Subproject commit a0966c0e171de1ed2383b758a26d8250400ca93d
Subproject commit 571938a34669503a9dc068dc62cce40b7c6594ba

@ -203,7 +203,7 @@ function hackWish(unit)
if not descriptionok then return end
end
if args.multi then
repeat amountok,amount=script.showInputPrompt('Wish','How many do you want? (numbers only!)',COLOR_LIGHTGREEN) until tonumber(amount)
repeat amountok,amount=script.showInputPrompt('Wish','How many do you want? (numbers only!)',COLOR_LIGHTGREEN) until tonumber(amount) or not amountok
if not amountok then return end
if mattype and itemtype then
if df.item_type.attrs[itemtype].is_stackable then

@ -51,12 +51,13 @@ function createUnit(race_id, caste_id)
--df.global.world.arena_spawn.equipment.skills:insert(0,99)
--df.global.world.arena_spawn.equipment.skill_levels:insert(0,0)
df.global.gametype = 4
local old_gametype = df.global.gametype
df.global.gametype = df.game_type.DWARF_ARENA
gui.simulateInput(dfhack.gui.getCurViewscreen(), 'D_LOOK_ARENA_CREATURE')
gui.simulateInput(dfhack.gui.getCurViewscreen(), 'SELECT')
df.global.gametype = 0
df.global.gametype = old_gametype
curViewscreen.child = nil
dwarfmodeScreen:delete()