1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-01-26 03:52:22 +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
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

View File

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

View File

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