|
|
@ -775,7 +775,9 @@ function PlannerOverlay:onInput(keys)
|
|
|
|
local filters = get_cur_filters()
|
|
|
|
local filters = get_cur_filters()
|
|
|
|
local num_filters = #filters
|
|
|
|
local num_filters = #filters
|
|
|
|
local choose = self.subviews.choose:getOptionValue()
|
|
|
|
local choose = self.subviews.choose:getOptionValue()
|
|
|
|
if choose > 0 then
|
|
|
|
if choose == 0 then
|
|
|
|
|
|
|
|
self:place_building(get_placement_data())
|
|
|
|
|
|
|
|
else
|
|
|
|
local bounds = get_selected_bounds()
|
|
|
|
local bounds = get_selected_bounds()
|
|
|
|
self:save_placement()
|
|
|
|
self:save_placement()
|
|
|
|
local autoselect = choose == 2
|
|
|
|
local autoselect = choose == 2
|
|
|
@ -806,7 +808,7 @@ function PlannerOverlay:onInput(keys)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end,
|
|
|
|
end,
|
|
|
|
on_cancel=function()
|
|
|
|
on_cancel=function()
|
|
|
|
for i,scr in pairs(active_screens) do
|
|
|
|
for _,scr in pairs(active_screens) do
|
|
|
|
scr:dismiss()
|
|
|
|
scr:dismiss()
|
|
|
|
end
|
|
|
|
end
|
|
|
|
df.global.game.main_interface.bottom_mode_selected = df.main_bottom_mode_type.BUILDING_PLACEMENT
|
|
|
|
df.global.game.main_interface.bottom_mode_selected = df.main_bottom_mode_type.BUILDING_PLACEMENT
|
|
|
@ -820,8 +822,6 @@ function PlannerOverlay:onInput(keys)
|
|
|
|
active_screens[idx] = selection_screen:show()
|
|
|
|
active_screens[idx] = selection_screen:show()
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
else
|
|
|
|
|
|
|
|
self:place_building(get_placement_data())
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
return true
|
|
|
|
return true
|
|
|
|
elseif not is_choosing_area() then
|
|
|
|
elseif not is_choosing_area() then
|
|
|
|