Commit Graph

13276 Commits (de1a4fb5be813594b10d3bb283c2514778aa1015)
 

Author SHA1 Message Date
Lethosor 2c106fa7a5
Merge pull request #1311 from suokko/fix_loadstock_usable_1294
stockpiles: Fix unusable and usable loading for weapon and armor
2018-06-18 21:48:50 -04:00
Pauli bcf9387ce9 Only remove jobs that were created from a designation 2018-06-18 19:57:00 +03:00
JapaMala dc367f212e Move fortress mode control stuff into a different file. 2018-06-18 22:12:52 +05:30
JapaMala 6ef85908ac Bump df version 2018-06-18 21:28:56 +05:30
Pauli 7c94620282 Add changelog entry for designation fix 2018-06-18 16:42:29 +03:00
Pauli 1b5ec7ce69 Update jobs when committing MapCache changes
The map_block->designation.{dig,smooth} are reset to zeros when a job
posting is created for the designation. The job is then used to override
the designation state in the map_block. To make the new designation set
propogate to jobs the job structure would require updating. The update
would be possible a complex operation. The simple alternative is to
remove the job and let df create a new job in the next tick.

Fixes #1229
2018-06-18 16:34:09 +03:00
Pauli 6a151353e3 Use automatic return type for index_tile 2018-06-18 16:23:57 +03:00
Pauli bb577c070f stockpiles load unusable and usable changelog entry 2018-06-14 22:27:13 +03:00
Pauli 6f7ace1f6d stockpiles: Fix unusable and usable loading for weapon and armor
Fixes #1294
2018-06-14 22:22:51 +03:00
Pauli 540a4a18ac Changelog entry for jsoncpp update 2018-06-14 21:22:37 +03:00
Pauli 0bc2b3ab1b Update toSimpleString to use a the new builder API 2018-06-14 21:20:54 +03:00
Pauli 2b79b4cce7 Use jsoncpp 1.8.4 as a submodule
This makes jsoncpp a submodule that can be build directly from git
sources. This changes depends/jsoncpp to depends/jsoncpp-sub to avoid
filename conflict if someone tries to use git bisect.

jsoncpp library name changes to jsoncpp_lib_static.

jsoncpp version is the latest tagged release.
2018-06-14 21:20:46 +03:00
lethosor ca744139f0 Update changelog (#1309) 2018-06-14 14:14:41 -04:00
lethosor 1743ad70ab Merge remote-tracking branch 'suokko/jsoncpp_int64' into develop 2018-06-14 14:13:28 -04:00
lethosor d35b6d468c Remove /std:c++11 flag
MSVC doesn't actually support this

Also actually indent the "if" block

Ref #1301, dfhack/df-structures#247
2018-06-14 13:46:39 -04:00
lethosor 93a197b3d4 Update changelog for #1297, #1307 2018-06-14 10:38:01 -04:00
lethosor 808e795960 Document new Units API functions from #1297 2018-06-14 10:37:31 -04:00
lethosor aac892c560 Adapted to changed Units functions
Squashed version of #1307

Closes #1307
2018-06-14 10:30:35 -04:00
Pauli 424028a0ae jsoncpp: Fix (U)Int64 to long int on 64bit linux
Passing a 64bit integer to Json::Value fails to find matching. Even
tough long long int is also 64bits gcc considres long long int different
to long int. But fix can't be as simple as removing an long from type
because that would reduce 32bit builds to have only 32bit maximum int
size. But standard offers fixed width integer types that can be used to
get correct underlying type depending on platform.
2018-06-14 17:24:50 +03:00
PatrikLundell cf780ce035 dead flag -> !isActive 2018-06-14 12:35:17 +02:00
PatrikLundell cac749429a dead flag -> !isActive 2018-06-14 12:34:41 +02:00
PatrikLundell 3be27a49b5 dead flag -> !isInactive 2018-06-14 12:33:18 +02:00
PatrikLundell f076d00ede dead flag -> !isActive 2018-06-14 12:32:38 +02:00
PatrikLundell b38dfe2e43 dead flag -> !isActive 2018-06-14 12:31:52 +02:00
PatrikLundell da0aa85b05 dead flag -> !isActive 2018-06-14 12:31:15 +02:00
PatrikLundell aa361f3a0d dead flag -> !isActive 2018-06-14 12:30:41 +02:00
PatrikLundell 6901c53bd5 dead flag -> !isActive 2018-06-14 12:29:48 +02:00
PatrikLundell 897a818f4c Switch to Units functions 2018-06-14 09:42:45 +02:00
Pauli 4cfdd7d92e Check if second vsnprintf does something unexpected 2018-06-13 23:33:13 +03:00
lethosor ee3a726c29 Update changelog (#1306) 2018-06-13 16:15:57 -04:00
lethosor 2c3300da1b Merge remote-tracking branch 'suokko/start_script' into develop 2018-06-13 16:14:40 -04:00
lethosor 284a842cef Fix typo (#1301) 2018-06-13 16:09:38 -04:00
lethosor 39194e5e38 Merge remote-tracking branch 'suokko/cxx14_enabling' into develop (actually c++11) 2018-06-13 16:08:41 -04:00
lethosor 3167678dfc Add #1299 to changelog 2018-06-13 16:04:47 -04:00
lethosor cddb1b59e1 title-version: move to bottom of options screen
This avoids overlapping the window border when a world is loaded
2018-06-13 15:57:13 -04:00
lethosor 133dd8c83a Merge remote-tracking branch 'suokko/ycm_defaults' into develop
Closes #1299
2018-06-13 15:50:34 -04:00
lethosor 10e6016989 Merge branch 'units_dead' into develop
Closes #1297
2018-06-13 15:38:35 -04:00
PatrikLundell 51584c2d9e Corrected isGhost 2018-06-13 15:37:45 -04:00
PatrikLundell f329774059 dead & killed flag separation
squashed 4 commits from #1297
2018-06-13 15:37:45 -04:00
lethosor 01e87ca176 Update scripts (luacheck, autounsuspend) 2018-06-12 16:40:25 -04:00
lethosor de0521e618 title-version: add to options screen 2018-06-12 16:38:53 -04:00
Pauli cfb646f576 Add gdbserver support to linux dfhack script
It use set envinronment because
* I couldn't get exec-wrapper to work correctly
* Even with shell remote gdb doesn't support spaces in arguments
2018-06-12 20:47:45 +03:00
Pauli 69b42d5ecf Support DF command line arguments with gdb 2018-06-12 20:46:22 +03:00
Pauli bbe70afa2d Add strace support to the linux dfhack script 2018-06-12 20:42:12 +03:00
lethosor 40d0d946a4 autogems: avoid crash with non-workshop links, add some logging
Also update changelog, including revflood change

Fixes #1303
2018-06-12 12:17:04 -04:00
Pauli 8f2cf3ad26 Fix printf format warnings 2018-06-11 19:57:06 +03:00
Pauli 8484b5dc8a Add parameter type checks to printf style functions
gcc supports type checks for printf parameters which can catch some hard
to reproduce bugs. Possible bugs happen when the parameter value is
intepreted differently to the variable value.

Example warnings follow
../library/LuaWrapper.cpp:1011:86: warning: format ‘%llu’ expects argument
    of type ‘long long unsigned int’, but argument 3 has type ‘uint64_t
    {aka long unsigned int}’ [-Wformat=]
../plugins/follow.cpp:159:35: warning: format not a string literal and no
    format arguments [-Wformat-security]
2018-06-11 19:27:35 +03:00
Pauli 750b0d766d Ask for c++11 because gcc 4.8 is still supported 2018-06-11 00:15:57 +03:00
Pauli 01abcb756e Request c++14 support from compilers
All platforms seems to either have compiler supporting c++14. Windows
already requires msvc2015 that supports c++14 which should make it
minimal issue to require c++14 support from all compilers because gcc
is pretty easy to upgrade.
2018-06-10 23:15:33 +03:00
Pauli 82e7b8300a Make stl_vsprintf return if there is an vsnprintf error
vsnprintf man page claims:
"If an output error is encountered, a negative value is returned."

That means we has to call vsnprintf twice at most to have whole output
written to a string. But in case of error we return an empty string.

The code also optimizes an expected common case of outputting single
line with a small stack allocated buffer. If the stack buffer is too
small then it uses std::string::resize to allocate exactly enough memory
and writes directly to std::string.

Second call could use vsprintf because memory is known to be large
enough. But I think that difference isn't detectable outside micro
benchmarks.
2018-06-10 16:23:31 +03:00