From abf960d00662b937d5e3d41bf59861292b78950f Mon Sep 17 00:00:00 2001 From: Kelly Kinkade Date: Mon, 31 Aug 2026 18:28:27 -0500 Subject: [PATCH] change coord's constructor to use signed values because they are --- library/include/df/custom/coord.methods.inc | 4 ++-- library/modules/Maps.cpp | 2 +- plugins/filltraffic.cpp | 3 ++- plugins/stonesense | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/library/include/df/custom/coord.methods.inc b/library/include/df/custom/coord.methods.inc index 77dbb766e3..9f1eede717 100644 --- a/library/include/df/custom/coord.methods.inc +++ b/library/include/df/custom/coord.methods.inc @@ -1,5 +1,5 @@ -coord(const coord2d &c, uint16_t _z) : x(c.x), y(c.y), z(_z) {} -coord(uint16_t _x, uint16_t _y, uint16_t _z) : x(_x), y(_y), z(_z) {} +coord(const coord2d &c, int16_t _z) : x(c.x), y(c.y), z(_z) {} +coord(int16_t _x, int16_t _y, int16_t _z) : x(_x), y(_y), z(_z) {} operator coord2d() const { return coord2d(x,y); } diff --git a/library/modules/Maps.cpp b/library/modules/Maps.cpp index 95ab00b2d7..d1ada62db6 100644 --- a/library/modules/Maps.cpp +++ b/library/modules/Maps.cpp @@ -1594,7 +1594,7 @@ void Maps::addBlockColumns(int32_t new_height) df::tiletype::OpenSpace); // Set block positions properly (based on prior air layer) - air_block->map_pos = last_air_block->map_pos + df::coord{0, 0, uint16_t(count + 1)}; + air_block->map_pos = last_air_block->map_pos + df::coord{0, 0, int16_t(count + 1)}; air_block->region_pos = last_air_block->region_pos; // Copy other potentially important metadata from prior air diff --git a/plugins/filltraffic.cpp b/plugins/filltraffic.cpp index 23952d8ac2..b1fa075483 100644 --- a/plugins/filltraffic.cpp +++ b/plugins/filltraffic.cpp @@ -27,9 +27,10 @@ command_result restrictLiquid(color_ostream &out, std::vector & par command_result restrictIce(color_ostream &out, std::vector & params); //Forward Declarations for Utility Functions +constexpr auto coord_max = std::numeric_limits::max(); command_result setAllMatching(color_ostream &out, checkTile checkProc, DFCoord minCoord = DFCoord(0, 0, 0), - DFCoord maxCoord = DFCoord(0xFFFF, 0xFFFF, 0xFFFF)); + DFCoord maxCoord = DFCoord(coord_max, coord_max, coord_max)); void allHigh(DFCoord coord, MapExtras::MapCache & map); void allNormal(DFCoord coord, MapExtras::MapCache & map); diff --git a/plugins/stonesense b/plugins/stonesense index de2cd37da6..40bfcddb94 160000 --- a/plugins/stonesense +++ b/plugins/stonesense @@ -1 +1 @@ -Subproject commit de2cd37da6e64d8b53523e873889b82b6182b6a5 +Subproject commit 40bfcddb9413801a80f3f2e500cc418e40c3143b