Skip to content

Commit

Permalink
Explicitly note that data at the top of the template is bundled
Browse files Browse the repository at this point in the history
  • Loading branch information
regginator committed Dec 17, 2023
1 parent f838466 commit 0efc7f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lune/lib/BundleModel.luau
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ local StringUtils = LuneUtils.StringUtils

local LuaEncode = require("libraries/LuaEncode")

local Version = require("data/Version")

-- Init script template for codegen (in this, we'll maintain 5.1 *syntax* compat
-- for optional compilation to vanilla Lua 5.1x bytecode format)
local InitScriptTemplate = require("data/Template")

local Version = require("data/Version")

local ClassNameIdKeys = {
Folder = 1,
ModuleScript = 2,
Expand Down Expand Up @@ -179,7 +179,7 @@ local function BundleModel(modelData: string | {roblox.Instance}, envName: strin
local LineOffsets = {}
if LineDebugging then
-- Starts at line 6, where the first closure func start should be
local CurrentLineOffset = ExtraLinesToOffset + 6
local CurrentLineOffset = ExtraLinesToOffset + 8

for RefId, LineCount in ClosureSourceLineCounts do
LineOffsets[RefId] = CurrentLineOffset
Expand Down
2 changes: 2 additions & 0 deletions lune/lib/data/Template.luau
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
-- With that being said, this explains the weird cflow in some parts

return [[
-- ++++++++ WAX BUNDLED DATA BELOW ++++++++ --
-- Will be used later for getting flattened globals
local ImportGlobals
Expand Down

0 comments on commit 0efc7f4

Please sign in to comment.