Skip to content

Commit b031229

Browse files
committed
Merge branch '0.34.11-r5'
2 parents 7ec1d58 + 46e4528 commit b031229

File tree

12 files changed

+537
-149
lines changed

12 files changed

+537
-149
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ endif()
5959

6060
# set up versioning.
6161
set(DF_VERSION "0.34.11")
62-
SET(DFHACK_RELEASE "r4" CACHE STRING "Current release revision.")
62+
SET(DFHACK_RELEASE "r5" CACHE STRING "Current release revision.")
6363

6464
set(DFHACK_VERSION "${DF_VERSION}-${DFHACK_RELEASE}")
6565
add_definitions(-DDFHACK_VERSION="${DFHACK_VERSION}")

Contributors.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ <h1 class="title">Contributors</h1>
364364
<li>RossM &lt;<a class="reference external" href="mailto:Ross&#64;Gnome">Ross&#64;Gnome</a>&gt;</li>
365365
<li>Tom Prince &lt;<a class="reference external" href="mailto:tom.prince&#64;ualberta.net">tom.prince&#64;ualberta.net</a>&gt;</li>
366366
<li>Jared Adams &lt;<a class="reference external" href="mailto:jaxad0127&#64;gmail.com">jaxad0127&#64;gmail.com</a>&gt;</li>
367-
<li>expwnent &lt;<a class="reference external" href="mailto:q309185&#64;gmail.com">q309185&#64;gmail.com</a>&gt;</li>
367+
<li>expwnent</li>
368368
<li>Erik Youngren &lt;<a class="reference external" href="mailto:artanis.00&#64;gmail.com">artanis.00&#64;gmail.com</a>&gt;</li>
369369
<li>Espen Wiborg &lt;<a class="reference external" href="mailto:espen.wiborg&#64;telio.no">espen.wiborg&#64;telio.no</a>&gt;</li>
370370
<li>Tim Walberg &lt;<a class="reference external" href="mailto:twalberg&#64;comcast.net">twalberg&#64;comcast.net</a>&gt;</li>
@@ -401,6 +401,7 @@ <h1 class="title">Contributors</h1>
401401
<li>Caldfir &lt;<a class="reference external" href="mailto:caldfir&#64;hotmail.com">caldfir&#64;hotmail.com</a>&gt;</li>
402402
<li>Antalia &lt;<a class="reference external" href="mailto:tamarakorr&#64;gmail.com">tamarakorr&#64;gmail.com</a>&gt;</li>
403403
<li>Angus Mezick &lt;<a class="reference external" href="mailto:amezick&#64;gmail.com">amezick&#64;gmail.com</a>&gt;</li>
404+
<li>PeridexisErrant &lt;<a class="reference external" href="mailto:PeridexisErrant&#64;gmail.com">PeridexisErrant&#64;gmail.com</a>&gt;</li>
404405
</ul>
405406
<p>And those are the cool people who made <strong>stonesense</strong>.</p>
406407
<ul class="simple">

Contributors.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ The following is a list of people who have contributed to **DFHack**.
2424
- RossM <Ross@Gnome>
2525
- Tom Prince <[email protected]>
2626
- Jared Adams <[email protected]>
27-
- expwnent <[email protected]>
27+
- expwnent
2828
- Erik Youngren <[email protected]>
2929
- Espen Wiborg <[email protected]>
3030
- Tim Walberg <[email protected]>

NEWS

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
DFHack future
22

3+
The future has not yet happened. Stay tuned!
4+
5+
DFHack v0.34.11-r5
6+
37
Internals:
48
- support for calling a lua function via a protobuf request (demonstrated by dfhack-run --lua).
59
- support for basic filesystem operations (e.g. chdir, mkdir, rmdir, stat) in C++ and Lua
@@ -8,7 +12,6 @@ DFHack future
812
- Lua API for running arbitrary DFHack commands
913
- support for multiple raw/init.d/*.lua init scripts in one save.
1014
- eventful now has a more friendly way of making custom sidebars
11-
- new plugin: building-hacks. Allows to add custom functionality and/or animations to buildings.
1215
- on Linux and OSX the console now supports moving the cursor back and forward by a whole word.
1316

1417
New scripts:
@@ -21,7 +24,6 @@ DFHack future
2124
- dfstatus: show an overview of critical stock quantities, including food, drinks, wood, and bars.
2225

2326
New commands:
24-
- move the 'grow', 'extirpate' and 'immolate' commands as 'plant' subcommands
2527
- 'plant create' - spawn a new shrub under the cursor
2628
- command-prompt: a dfhack command prompt in df.
2729

@@ -34,8 +36,11 @@ DFHack future
3436
- rendermax: replace the renderer with something else. Most interesting is "rendermax light"- a lighting engine for df.
3537
- stockflow (by eswald): queues manager jobs of the configured type based on the state of a stockpile.
3638
- embark-tools: implementations of Embark Anywhere, Nano Embark, and a few other embark-related utilities
39+
- building-hacks: Allows to add custom functionality and/or animations to buildings.
40+
- petcapRemover: triggers pregnancies in creatures so that you can effectively raise the default pet population cap from the default 50
3741

3842
Misc improvements:
43+
- plant: move the 'grow', 'extirpate' and 'immolate' commands as 'plant' subcommands
3944
- digfort: improved csv parsing, add start() comment handling
4045
- exterminate: allow specifying a caste (exterminate gob:male)
4146
- createitem: in adventure mode it now defaults to the controlled unit as maker.

Readme.html

Lines changed: 141 additions & 123 deletions
Large diffs are not rendered by default.

Readme.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1397,6 +1397,8 @@ Subcommands that persist until disabled or DF quit:
13971397

13981398
:adamantine-cloth-wear: Prevents adamantine clothing from wearing out while being worn (bug 6481).
13991399

1400+
:confirm-embark: Adds a prompt before embarking (on the "prepare carefully" screen).
1401+
14001402
fix-armory
14011403
----------
14021404

@@ -2068,6 +2070,20 @@ Tools:
20682070
* ``sand``: Displays an indicator when sand is present in the currently-selected area, similar to the default clay/stone indicators.
20692071
* ``sticky``: Maintains the selected local area while navigating the world map
20702072

2073+
petcapRemover
2074+
-------------
2075+
2076+
This plugin allows you to remove or raise the pet population cap. In vanilla DF, pets will not reproduce unless the population is below 50 and the number of children of that species is below a certain percentage. This plugin allows removing the second restriction and removing or raising the first. Pets still require PET or PET_EXOTIC tags in order to reproduce. Type help petcapRemover for exact usage. In order to make population more stable and avoid sudden population booms as you go below the raised population cap, this plugin counts pregnancies toward the new population cap. It can still go over, but only in the case of multiple births.
2077+
2078+
`petcapRemover`
2079+
cause pregnancies now and schedule the next check
2080+
`petcapRemover every n`
2081+
set how often in ticks the plugin checks for possible pregnancies
2082+
`petcapRemover cap n`
2083+
set the new cap to n. if n = 0, no cap
2084+
`petcapRemover pregtime n`
2085+
sets the pregnancy duration to n ticks. natural pregnancies are 300000 ticks for the current race and 200000 for everyone else
2086+
20712087
misery
20722088
------
20732089
When enabled, every new negative dwarven thought will be multiplied by a factor (2 by default).

library/include/modules/Filesystem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ enum _filetype {
182182
namespace DFHack {
183183
namespace Filesystem {
184184
DFHACK_EXPORT bool chdir (std::string path);
185-
DFHACK_EXPORT char * getcwd ();
185+
DFHACK_EXPORT std::string getcwd ();
186186
DFHACK_EXPORT bool mkdir (std::string path);
187187
DFHACK_EXPORT bool rmdir (std::string path);
188188
DFHACK_EXPORT bool stat (std::string path, STAT_STRUCT &info);

library/modules/Filesystem.cpp

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,18 @@ bool DFHack::Filesystem::chdir (std::string path)
5454
return !(bool)::chdir(path.c_str());
5555
}
5656

57-
char * DFHack::Filesystem::getcwd ()
57+
std::string DFHack::Filesystem::getcwd ()
5858
{
5959
char *path;
6060
char buf[LFS_MAXPATHLEN];
61-
if ((path = ::getcwd(buf, LFS_MAXPATHLEN)) == NULL)
62-
return NULL;
63-
else
64-
return path;
61+
std::string result = "";
62+
#ifdef _WIN32
63+
if ((path = ::_getcwd(buf, LFS_MAXPATHLEN)) != NULL)
64+
#else
65+
if ((path = ::getcwd(buf, LFS_MAXPATHLEN)) != NULL)
66+
#endif
67+
result = buf;
68+
return result;
6569
}
6670

6771
bool DFHack::Filesystem::mkdir (std::string path)
@@ -88,7 +92,7 @@ bool DFHack::Filesystem::rmdir (std::string path)
8892
}
8993

9094
#ifdef _WIN32
91-
_filetype *mode2type (unsigned short mode) {
95+
_filetype mode2type (unsigned short mode) {
9296
#else
9397
_filetype mode2type (mode_t mode) {
9498
#endif

plugins/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ if (BUILD_SUPPORTED)
167167
DFHACK_PLUGIN(command-prompt command-prompt.cpp)
168168
DFHACK_PLUGIN(building-hacks building-hacks.cpp LINK_LIBRARIES lua)
169169
DFHACK_PLUGIN(embark-tools embark-tools.cpp)
170+
DFHACK_PLUGIN(petcapRemover petcapRemover.cpp)
170171
endif()
171172

172173
# this is the skeleton plugin. If you want to make your own, make a copy and then change it

0 commit comments

Comments
 (0)