Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions source.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ local function loadWithTimeout(url: string, timeout: number?): ...any

local timeoutThread = task.delay(timeout, function()
if not requestCompleted then
warn(`Request for {url} timed out after {timeout} seconds`)
warn("Request for " .. url .. " timed out after " .. tostring(timeout) .. " seconds")
task.cancel(requestThread)
result = "Request timed out"
requestCompleted = true
Expand All @@ -64,7 +64,7 @@ local function loadWithTimeout(url: string, timeout: number?): ...any
task.cancel(timeoutThread)
end
if not success then
warn(`Failed to process {url}: {result}`)
warn("Failed to process " .. tostring(url) .. ": " .. tostring(result))
end
return if success then result else nil
end
Expand Down Expand Up @@ -92,12 +92,12 @@ local settingsTable = {
-- Overridden settings always take precedence over settings in the configuration file, and are cleared if the user changes the setting in the UI
local overriddenSettings: { [string]: any } = {} -- For example, overriddenSettings["System.rayfieldOpen"] = "J"
local function overrideSetting(category: string, name: string, value: any)
overriddenSettings[`{category}.{name}`] = value
overriddenSettings[category .. "." .. name] = value
end

local function getSetting(category: string, name: string): any
if overriddenSettings[`{category}.{name}`] ~= nil then
return overriddenSettings[`{category}.{name}`]
if overriddenSettings[category .. "." .. name] ~= nil then
return overriddenSettings[category .. "." .. name]
elseif settingsTable[category][name] ~= nil then
return settingsTable[category][name].Value
end
Expand Down Expand Up @@ -810,7 +810,7 @@ local function getIcon(name : string): {id: number, imageRectSize: Vector2, imag
local sizedicons = Icons['48px']
local r = sizedicons[name]
if not r then
error(`Lucide Icons: Failed to find icon by the name of "{name}"`, 2)
error("Lucide Icons: Failed to find icon by the name of \"" .. name .. "\"", 2)
end

local rirs = r[2]
Expand Down Expand Up @@ -1190,7 +1190,7 @@ local function Hide(notify: boolean?)
if useMobilePrompt then
RayfieldLibrary:Notify({Title = "Interface Hidden", Content = "The interface has been hidden, you can unhide the interface by tapping 'Show'.", Duration = 7, Image = 4400697855})
else
RayfieldLibrary:Notify({Title = "Interface Hidden", Content = `The interface has been hidden, you can unhide the interface by tapping {getSetting("General", "rayfieldOpen")}.`, Duration = 7, Image = 4400697855})
RayfieldLibrary:Notify({Title = "Interface Hidden", Content = "The interface has been hidden, you can unhide the interface by tapping " .. tostring(getSetting("General", "rayfieldOpen")) .. ".", Duration = 7, Image = 4400697855})
end
end

Expand Down Expand Up @@ -1494,7 +1494,7 @@ local function updateSetting(category: string, setting: string, value: any)
return
end
settingsTable[category][setting].Value = value
overriddenSettings[`{category}.{setting}`] = nil -- If user changes an overriden setting, remove the override
overriddenSettings[category .. "." .. setting] = nil -- If user changes an overriden setting, remove the override
saveSettings()
end

Expand Down