Merge pull request #3297 from myk002/myk_buildingplan_rollers

[buidlingplan] fixed size limit calculations for rollers
develop
Myk 2023-04-24 14:13:01 -07:00 committed by GitHub
commit 1abd8cd086
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

@ -36,6 +36,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences:
## New Plugins
## Fixes
- `buildingplan`: fixed size limit calculations for rollers
## Misc Improvements
- `buildingplan`: planner panel is minimized by default and now remembers minimized state

@ -34,9 +34,10 @@ local function get_selection_size_limits()
or btype == df.building_type.RoadPaved
or btype == df.building_type.RoadDirt then
return {w=31, h=31}
elseif btype == df.building_type.AxleHorizontal
or btype == df.building_type.Rollers then
elseif btype == df.building_type.AxleHorizontal then
return uibs.direction == 1 and {w=1, h=31} or {w=31, h=1}
elseif btype == df.building_type.Rollers then
return (uibs.direction == 1 or uibs.direction == 3) and {w=31, h=1} or {w=1, h=31}
end
end