Skip to content

Commit

Permalink
Bring to front instead of killing the parent and its children
Browse files Browse the repository at this point in the history
  • Loading branch information
Quezler committed Dec 28, 2023
1 parent 83f9fbf commit 64f33cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
11 changes: 4 additions & 7 deletions mods/show-missing-bottles-for-current-research/control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,10 @@ function Flasks.update_player(player, caption)
direction = "horizontal",
ignored_by_interaction = true,
})
end

-- canceling a research causes the "press T to start a new research" to come ontop layer-wise,
-- so to bodge that we'll just remove the frame entirely when there's ever no pending research.
if not player.force.current_research then
frame.destroy()
return
else
-- canceling a research causes the "press T to start a new research" to come ontop layer-wise,
-- so to bodge that we'll just bring the frame to front when there's ever no pending research.
frame.bring_to_front()
end

local window = frame[Flasks.window_name]
Expand Down
2 changes: 1 addition & 1 deletion mods/show-missing-bottles-for-current-research/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "show-missing-bottles-for-current-research",
"title": "Show missing bottles for current research",
"description": "Research-kun why are you stuck?",
"version": "1.0.0",
"version": "1.0.1",
"author": "Quezler",
"factorio_version": "1.1",
"dependencies": [
Expand Down

0 comments on commit 64f33cc

Please sign in to comment.