@@ -1705,7 +1705,7 @@ local function apply_skip_by_preview_size(pindex, direction)
17051705
17061706 -- Check the moved count against the dimensions of the preview in hand
17071707 local stack = p .cursor_stack
1708- local width , height = BuildDimensions .get_stack_build_dimensions (stack , dirs . north )
1708+ local width , height = BuildDimensions .get_stack_build_dimensions (stack , vp : get_hand_direction () )
17091709
17101710 -- Default to cursor size if not something else
17111711 if not width or not height or (width + height <= 2 ) then
@@ -2063,60 +2063,22 @@ local function read_coords(pindex, start_phrase)
20632063
20642064 -- If there is a build preview, give its dimensions and which way they extend
20652065 local stack = game .get_player (pindex ).cursor_stack
2066+ local p_width , p_height = BuildDimensions .get_stack_build_dimensions (stack , vp :get_hand_direction ())
20662067
2067- if
2068- stack
2069- and stack .valid_for_read
2070- and stack .valid
2071- and stack .prototype .place_result ~= nil
2072- and (stack .prototype .place_result .tile_height > 1 or stack .prototype .place_result .tile_width > 1 )
2073- then
2068+ -- Tiles are always 1x1, so tile case still triggers.
2069+ if p_width and p_height and (p_width > 1 or p_height > 1 ) then
20742070 local vp = Viewpoint .get_viewpoint (pindex )
20752071 local dir = vp :get_hand_direction ()
20762072 turn_to_cursor_direction_cardinal (pindex )
20772073 local p_dir = storage .players [pindex ].player_direction
20782074
20792075 message :fragment ({ " fa.build-preview-intro" })
2080-
2081- -- Width dimension
2082- local width_tiles
2083- if dir == dirs .north or dir == dirs .south then
2084- width_tiles = stack .prototype .place_result .tile_width
2085- else
2086- width_tiles = stack .prototype .place_result .tile_height
2087- end
2088- message :fragment ({ " fa.build-preview-wide" , tostring (width_tiles ) })
2089-
2076+ message :fragment ({ " fa.build-preview-wide" , tostring (p_width ) })
20902077 -- Width direction
2091- if p_dir == dirs .east or p_dir == dirs .south or p_dir == dirs .north then
2092- message :fragment ({ " fa.build-preview-east" })
2093- elseif p_dir == dirs .west then
2094- message :fragment ({ " fa.build-preview-west" })
2095- end
2096-
2078+ message :fragment ({ " fa.build-preview-east" })
20972079 message :fragment ({ " fa.build-preview-and" })
2098-
2099- -- Height dimension
2100- local height_tiles
2101- if dir == dirs .north or dir == dirs .south then
2102- height_tiles = stack .prototype .place_result .tile_height
2103- else
2104- height_tiles = stack .prototype .place_result .tile_width
2105- end
2106- message :fragment ({ " fa.build-preview-high" , tostring (height_tiles ) })
2107-
2108- -- Height direction
2109- if p_dir == dirs .east or p_dir == dirs .south or p_dir == dirs .west then
2110- message :fragment ({ " fa.build-preview-south" })
2111- elseif p_dir == dirs .north then
2112- message :fragment ({ " fa.build-preview-north" })
2113- end
2114- elseif stack and stack .valid_for_read and stack .valid and stack .is_blueprint and stack .is_blueprint_setup () then
2115- -- Blueprints have their own data
2116- local vp = Viewpoint .get_viewpoint (pindex )
2117- local dir = vp :get_hand_direction ()
2118- local width , height = BuildDimensions .get_stack_build_dimensions (stack , dir )
2119- message :fragment ({ " fa.blueprint-preview" , tostring (width ), tostring (height ) })
2080+ message :fragment ({ " fa.build-preview-high" , tostring (p_height ) })
2081+ message :fragment ({ " fa.build-preview-south" })
21202082 elseif stack and stack .valid_for_read and stack .valid and stack .prototype .place_as_tile_result ~= nil then
21212083 -- Paving preview size
21222084 local size = vp :get_cursor_size () * 2 + 1
0 commit comments