From 1c3ea000e1c26a88a3e27a5f5f951dc70bcb4295 Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Sat, 28 May 2022 15:56:49 -0700 Subject: [PATCH] Trim trailing whitespace --- docs/Lua API.rst | 6 +++--- library/include/modules/Gui.h | 4 ++-- library/modules/Gui.cpp | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/Lua API.rst b/docs/Lua API.rst index 8ec347bef..efd963c03 100644 --- a/docs/Lua API.rst +++ b/docs/Lua API.rst @@ -1020,7 +1020,7 @@ Fortress mode where ``df.report_zoom_type.Generic`` skips recentering and enforces valid view bounds (the same as x = -30000,) ``df.report_zoom_type.Item`` brings the position onscreen without centering, and ``df.report_zoom_type.Unit`` centers the screen on the position. Default zoom type is ``df.report_zoom_type.Item``. - + * ``dfhack.gui.revealInDwarfmodeMap(pos)`` Centers the view on the given position, which can be a ``df.coord`` instance @@ -1096,11 +1096,11 @@ Announcements Takes a ``df.report_init`` (see: `structure definition `_) and a string and processes them just like DF does. Can also be built from parameters instead of a ``report_init``. Setting ``is_sparring`` to *true* means the report will be added to sparring logs (if applicable) rather than hunting or combat. - + The announcement will not display if units are involved and the player can't see them (or hear, for adventure mode sound announcement types.) Text is parsed using ``&`` as an escape character, with ``&r`` adding a blank line (equivalent to ``\n \n``,) ``&&`` being just ``&``, and any other combination causing neither character to display. - + If you want a guaranteed announcement without parsing, use ``dfhack.gui.showAutoAnnouncement`` instead. Other diff --git a/library/include/modules/Gui.h b/library/include/modules/Gui.h index c7f857a1d..0d2f1c210 100644 --- a/library/include/modules/Gui.h +++ b/library/include/modules/Gui.h @@ -126,12 +126,12 @@ namespace DFHack // Show an announcement with effects determined by announcements.txt DFHACK_EXPORT void showAutoAnnouncement(df::announcement_type type, df::coord pos, std::string message, int color = 7, bool bright = true, df::unit *unit1 = NULL, df::unit *unit2 = NULL); - + // Process an announcement exactly like DF would, which might result in no announcement DFHACK_EXPORT bool autoDFAnnouncement(df::report_init r, std::string message); DFHACK_EXPORT bool autoDFAnnouncement(df::announcement_type type, df::coord pos, std::string message, int color = 7, bool bright = true, df::unit *unit1 = NULL, df::unit *unit2 = NULL, bool is_sparring = false); - + /* * Cursor and window coords */ diff --git a/library/modules/Gui.cpp b/library/modules/Gui.cpp index 35c6ca8a5..90e6b41b1 100644 --- a/library/modules/Gui.cpp +++ b/library/modules/Gui.cpp @@ -1962,7 +1962,7 @@ void Gui::recenterViewscreen(int32_t x, int32_t y, int32_t z, df::report_zoom_ty *df::global::window_x = clip_range(new_win_x, 0, (world->map.x_count - w)); *df::global::window_y = clip_range(new_win_y, 0, (world->map.y_count - h)); *df::global::window_z = clip_range(new_win_z, 0, (world->map.z_count - 1)); - + ui_sidebar_menus->minimap.need_render = true; ui_sidebar_menus->minimap.need_scan = true; @@ -1975,7 +1975,7 @@ void Gui::pauseRecenter(int32_t x, int32_t y, int32_t z, bool pause) return; resetDwarfmodeView(pause); - + if (x != -30000) recenterViewscreen(x, y, z, report_zoom_type::Item);