Skip to content

Commit

Permalink
Remove references to stdlib functions as part of an ongoing effort to…
Browse files Browse the repository at this point in the history
… remove stdlib.
  • Loading branch information
notnotmelon committed Jan 22, 2024
1 parent 9df1679 commit 8728a4f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/caravan/caravan-global-gui.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require 'caravan-gui-shared'
local Table = require('__stdlib__/stdlib/utils/table')
local close_button_name = 'click_close_global_gui'

local function add_titlebar(gui, caption, close_button_name)
Expand Down Expand Up @@ -30,7 +29,10 @@ local function add_titlebar(gui, caption, close_button_name)
end

function Caravan.has_any_caravan_at_all()
return Table.any(global.caravans, Caravan.validity_check)
for _, caravan in pairs(global.caravans) do
if Caravan.validity_check(caravan) then return true end
end
return false
end

local function instantiate_main_frame(player)
Expand Down

0 comments on commit 8728a4f

Please sign in to comment.