Skip to content

Commit

Permalink
kloker: add patch for dfhack v47.05
Browse files Browse the repository at this point in the history
  • Loading branch information
McArcady authored and McArcady committed Apr 8, 2021
1 parent 5a2351f commit eaaf2a2
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 12 deletions.
2 changes: 2 additions & 0 deletions .config
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ CT_DFHACK=y
CT_DFHACK_VERSION="0.47.05-r1"
CT_TWBT=y
CT_TWBT_VERSION="04705"
CT_KLOKER=y
CT_KLOKER_VERSION="master"
CT_GRAPHICS=y
CT_GRAPHICS_VERSION="47.04"
CT_THERAPIST=y
Expand Down
10 changes: 10 additions & 0 deletions patches/dfhack/default/200-activate-kloker.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- a/plugins/CMakeLists.txt 2021-04-05 17:47:01.148189093 +0200
+++ b/plugins/CMakeLists.txt 2021-04-05 17:49:44.366894564 +0200
@@ -134,6 +134,7 @@
dfhack_plugin(isoworldremote isoworldremote.cpp PROTOBUFS isoworldremote)
dfhack_plugin(jobutils jobutils.cpp)
add_subdirectory(labormanager)
+ dfhack_plugin(kloker kloker.cpp)
dfhack_plugin(lair lair.cpp)
dfhack_plugin(liquids liquids.cpp Brushes.h LINK_LIBRARIES lua)
dfhack_plugin(luasocket luasocket.cpp LINK_LIBRARIES clsocket lua dfhack-tinythread)
20 changes: 20 additions & 0 deletions patches/kloker/default/100-fix-for-dfhack-47-05.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--- a/plugins/kloker.cpp 2021-04-05 18:21:05.240235124 +0200
+++ b/plugins/kloker.cpp 2021-04-08 21:00:39.721671597 +0200
@@ -44,7 +44,8 @@
#include "df/nemesis_record.h"
#include "df/historical_entity.h"
#include "df/historical_figure.h"
#include "df/historical_figure_info.h"
+#include "df/historical_figure_relationships.h"
#include "df/histfig_hf_link.h"
#include "df/histfig_hf_link_type.h"
#include "df/activity_event.h"
@@ -6155,7 +6155,7 @@
rg += ",Gods " + cur->godline;
int rn = rg.size(), dn = ds.size();

- if (rn + dn > to_lim) {
+ if ((rn + dn > to_lim) && (to_lim - rn >= 3)) {
ds.resize(to_lim - rn - 3);
ds += ".. ";
dn = ds.size();
10 changes: 0 additions & 10 deletions patches/kloker/default/100-fix-includes.patch

This file was deleted.

4 changes: 2 additions & 2 deletions scripts/build/kloker.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Install DFHack plugin Kloker

get_kloker_description() {
echo "Kloker (ex-Cavern Keeper) v${CT_KLOKER_VERSION}"
echo "Kloker (ex-Cavern Keeper)"
}
get_kloker_credits() {
echo "Andrew Strain"
Expand All @@ -10,7 +10,7 @@ get_kloker_url() {
echo "https://github.com/strainer/cavekeeperdf"
}
get_kloker_license() {
echo
echo -n
}

# Download
Expand Down

0 comments on commit eaaf2a2

Please sign in to comment.