New tweak: civ-view-agreement

develop
lethosor 2014-09-28 13:13:01 -04:00
parent eef86bc501
commit 425d81ea2d
5 changed files with 47 additions and 1 deletions

@ -4,6 +4,8 @@ DFHack future
- import-priority-category: Allows changing the priority of all goods in a
category when discussing an import agreement with the liaison
- manager-quantity: Removes the limit of 30 jobs per manager order
- civ-view-agreement: Fixes overlapping text on the "view agreement" screen
DFHack 0.40.13-r1
Internals:

@ -2002,7 +2002,11 @@ category when discussing an import agreement with the liaison</p>
</td>
</tr>
<tr class="field"><th class="field-name" colspan="2">manager-quantity:</th></tr>
<tr class="field"><td>&nbsp;</td><td class="field-body"><p class="first last">Removes the limit of 30 jobs per manager order</p>
<tr class="field"><td>&nbsp;</td><td class="field-body"><p class="first">Removes the limit of 30 jobs per manager order</p>
</td>
</tr>
<tr class="field"><th class="field-name" colspan="2">civ-view-agreement:</th></tr>
<tr class="field"><td>&nbsp;</td><td class="field-body"><p class="first last">Fixes overlapping text on the &quot;view agreement&quot; screen</p>
</td>
</tr>
</tbody>

@ -1285,6 +1285,7 @@ Subcommands that persist until disabled or DF quit:
:import-priority-category: Allows changing the priority of all goods in a
category when discussing an import agreement with the liaison
:manager-quantity: Removes the limit of 30 jobs per manager order
:civ-view-agreement: Fixes overlapping text on the "view agreement" screen
fix-armory

@ -74,6 +74,7 @@
#include "tweaks/adamantine-cloth-wear.h"
#include "tweaks/advmode-contained.h"
#include "tweaks/civ-agreement-ui.h"
#include "tweaks/craft-age-wear.h"
#include "tweaks/farm-plot-select.h"
#include "tweaks/fast-heat.h"
@ -162,6 +163,8 @@ DFhackCExport command_result plugin_init (color_ostream &out, std::vector <Plugi
" tweak import-priority-category [disable]\n"
" When meeting with a liaison, makes Shift+Left/Right arrow adjust\n"
" the priority of an entire category of imports.\n"
" tweak civ-view-agreement\n"
" Fixes overlapping text on the \"view agreement\" screen\n"
" tweak craft-age-wear [disable]\n"
" Makes cloth and leather items wear out at the correct rate (bug 6003).\n"
" tweak adamantine-cloth-wear [disable]\n"
@ -176,6 +179,8 @@ DFhackCExport command_result plugin_init (color_ostream &out, std::vector <Plugi
TWEAK_HOOK("advmode-contained", advmode_contained_hook, feed);
TWEAK_HOOK("civ-view-agreement", civ_agreement_view_hook, render);
TWEAK_HOOK("craft-age-wear", craft_age_wear_hook, ageItem);
TWEAK_HOOK("farm-plot-select", farm_select_hook, feed);

@ -0,0 +1,34 @@
#include "df/meeting_event.h"
#include "df/viewscreen_entityst.h"
using namespace std;
using namespace df::enums;
using namespace DFHack::Gui;
using namespace DFHack::Screen;
#define DLOG DFHack::Core::getInstance().getConsole().printerr
struct civ_agreement_view_hook : df::viewscreen_entityst {
typedef df::viewscreen_entityst interpose_base;
DEFINE_VMETHOD_INTERPOSE(void, render, ())
{
INTERPOSE_NEXT(render)();
if (page == 2)
{
fillRect(Pen(0, 0, ' '), 2, 22, 22, 22);
int x, y;
getWindowSize(x, y);
x = 2;
y -= 3;
OutputString(COLOR_LIGHTGREEN, x, y, getKeyDisplay(interface_key::CHANGETAB));
OutputString(COLOR_WHITE, x, y, " to change modes.");
x = 2;
y++;
OutputString(COLOR_LIGHTGREEN, x, y, getKeyDisplay(interface_key::SELECT));
OutputString(COLOR_WHITE, x, y, ": View agreement");
}
}
};
IMPLEMENT_VMETHOD_INTERPOSE(civ_agreement_view_hook, render);