From 9b03519f87a1062603cfac2b48df98c48427c317 Mon Sep 17 00:00:00 2001 From: usysrc Date: Tue, 21 Jan 2025 14:42:14 -0300 Subject: [PATCH] feat: :sparkles: add entry point configuration for customizable file loading --- lick.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lick.lua b/lick.lua index 34002de..d940a4e 100644 --- a/lick.lua +++ b/lick.lua @@ -15,6 +15,7 @@ lick.updateAllFiles = false -- include files in watchlist for changes lick.clearPackages = false -- clear all packages in package.loaded on file change lick.defaultFile = "main.lua" -- default file to load lick.fileExtensions = { ".lua" } -- file extensions to watch +lick.entryPoint = "main.lua" -- entry point for the game, if empty, all files are reloaded -- local variables local drawok_old, updateok_old, loadok_old @@ -116,8 +117,14 @@ local function checkFileUpdate() package.loaded[k] = nil end end + + if lick.entryPoint ~= "" then + reloadFile(lick.entryPoint) + end for _, file in ipairs(working_files) do - reloadFile(file) + if lick.entryPoint == "" then + reloadFile(file) + end local info = love.filesystem.getInfo(file) last_modified[file] = info.modtime end