1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-11-25 22:32:18 +02:00

Minor fix

This commit is contained in:
Gerkiz
2025-01-17 11:59:30 +01:00
parent 5a961cb732
commit b475dc449d
3 changed files with 10 additions and 14 deletions

View File

@@ -2371,7 +2371,7 @@ local function on_marked_for_deconstruction(event)
if player.controller_type == defines.controllers.remote then if player.controller_type == defines.controllers.remote then
entity.cancel_deconstruction(player.force, player) entity.cancel_deconstruction(player.force, player)
player.print("You cannot deconstruct while in remove view!", { r = 1, g = 0.5, b = 0.5 }) player.print("You cannot deconstruct while in remote view!", { r = 1, g = 0.5, b = 0.5 })
end end
end end

View File

@@ -491,6 +491,7 @@ local function on_gui_click(event)
end end
if get_top_frame(player) then if get_top_frame(player) then
local info = get_top_frame(player) local info = get_top_frame(player)
local info_button = get_top_frame_custom(player, main_button_name)
local wd = get_top_frame_custom(player, 'wave_defense') local wd = get_top_frame_custom(player, 'wave_defense')
local diff = get_top_frame_custom(player, Difficulty.top_button_name) local diff = get_top_frame_custom(player, Difficulty.top_button_name)
@@ -502,6 +503,9 @@ local function on_gui_click(event)
diff.visible = false diff.visible = false
end end
info.visible = false info.visible = false
if info_button then
info_button.sprite = 'utility/expand'
end
return return
elseif wd and not wd.visible then elseif wd and not wd.visible then
for _, child in pairs(player.gui.left.children) do for _, child in pairs(player.gui.left.children) do
@@ -525,6 +529,9 @@ local function on_gui_click(event)
diff.visible = true diff.visible = true
end end
info.visible = true info.visible = true
if info_button then
info_button.sprite = 'utility/collapse'
end
return return
end end
else else

View File

@@ -76,20 +76,9 @@ function is_game_modded()
return false return false
end end
local space_age_mods = {
['space-age'] = true,
['elevated-rails'] = true,
['quality'] = true,
}
function has_space_age() function has_space_age()
local active_mods = script.active_mods local active_mods = script.active_mods['space-age'] ~= nil
for mod_name, _ in pairs(active_mods) do if active_mods then return true end
if space_age_mods[mod_name] then
return true
end
end
return false return false
end end