Skip to content

Commit 114f4e4

Browse files
Update build.lua
related to issue #5012 Quickfort blueprints can't place bridges over stairs The previous code is more restrictive than vanilla UI. In-game, bridges may be placed in any supported position with a walkable, adjacent tile, including over any kind of stair. In-game, floor hatches, grates, and bars do not require an adjacent floor for placement. Initially I thought these changes may be too simple to be correct, but upon further study and testing, I can find no issues. These changes are in keeping with the 'mission statement' from the original dev found in the top comment of the build.ua file: "In general, we enforce the same rules as the in-game UI for allowed placement of buildings (e.g. beds have to be inside, doors have to be adjacent to a wall, etc.). A notable exception is that we allow constructions and machine components to be designated regardless of whether they are reachable or currently supported. This allows the user to designate an entire floor of an above-ground building or an entire power system without micromanagement."
1 parent 036ddb3 commit 114f4e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/quickfort/build.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ local function is_valid_tile_bridge(pos, db_entry, b)
139139
(dir == T_direction.Right and pos.x == b.pos.x+b.width-1) then
140140
return is_valid_tile_has_space(pos)
141141
end
142-
return is_valid_tile_has_space_or_is_ramp(pos)
142+
return is_valid_tile_machine(pos)
143143
end
144144

145145
-- although vanilla allows constructions to be built on top of constructed
@@ -213,7 +213,7 @@ local function is_tile_coverable(pos)
213213
shape ~= df.tiletype_shape.STAIR_DOWN) then
214214
return false
215215
end
216-
return is_tile_floor_adjacent(pos)
216+
return true
217217
end
218218

219219
--

0 commit comments

Comments
 (0)