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

Conflicts:
	plugins/remotefortressreader.cpp
develop
Japa 2016-03-20 16:30:49 +05:30
commit a3ddc63836
6 changed files with 14 additions and 6 deletions

@ -97,6 +97,7 @@ Fixes
- Prevented a crash resulting from a bad civilization option
- `showmood`: Fixed name display on OS X/Linux
- `view-item-info`: Fixed density units
Misc Improvements
-----------------

@ -47,6 +47,7 @@ typedef struct interpose_s
#include "DFHack.h"
#include "Core.h"
#include "Hooks.h"
#include "SDL_events.h"
#include <iostream>
/*static const interpose_t interposers[] __attribute__ ((section("__DATA, __interpose"))) =
@ -105,7 +106,8 @@ DFhackCExport int DFH_SDL_PollEvent(SDL::Event* event)
pollevent_again:
// if SDL returns 0 here, it means there are no more events. return 0
int orig_return = SDL_PollEvent(event);
if(!orig_return || !(SDL_GetAppState() & SDL_APPINPUTFOCUS))
if(!orig_return || (!(SDL_GetAppState() & SDL_APPINPUTFOCUS) &&
(event->type == SDL::ET_KEYDOWN || event->type == SDL::ET_KEYUP)))
return 0;
// otherwise we have an event to filter
else if( event != 0 )

@ -284,6 +284,8 @@ message ViewInfo
optional int32 cursor_pos_x = 6;
optional int32 cursor_pos_y = 7;
optional int32 cursor_pos_z = 8;
optional int32 follow_unit_id = 9 [default = -1];
optional int32 follow_item_id = 10 [default = -1];
}
message MapInfo

@ -94,6 +94,7 @@ using namespace df::global;
#else
REQUIRE_GLOBAL(world);
REQUIRE_GLOBAL(gps);
REQUIRE_GLOBAL(ui);
#endif
// Here go all the command declarations...
@ -1440,6 +1441,8 @@ static command_result GetViewInfo(color_ostream &stream, const EmptyMessage *in,
out->set_cursor_pos_x(cx);
out->set_cursor_pos_y(cy);
out->set_cursor_pos_z(cz);
out->set_follow_unit_id(ui->follow_unit);
out->set_follow_item_id(ui->follow_item);
return CR_OK;
}

@ -16,10 +16,10 @@ function log_on_load(op)
-- Seasons fix for Soundsense
local seasons = {
[-1] = 'Nothing', -- worldgen
'Spring',
'Summer',
'Autumn',
'Winter'}
[0] = 'Spring',
[1] = 'Summer',
[2] = 'Autumn',
[3] = 'Winter'}
msg(seasons[df.global.cur_season]..' has arrived on the calendar.')
-- Weather fix for Soundsense

@ -92,7 +92,7 @@ function GetMatPropertiesStringList (item)
if isInList(mat_properties_for, get_textid (item)) then
append(list,"Material name: "..mat.state_name.Solid)
append(list,"Material properties: ")
append(list,"Solid density: "..mat.solid_density..'g/cm^3',1)
append(list,"Solid density: "..mat.solid_density..'kg/m^3',1)
local maxedge = mat.strength.max_edge
append(list,"Maximum sharpness: "..maxedge.." ("..maxedge/standard.strength.max_edge*100 .."%)",1)
if mat.molar_mass > 0 then