.bam/functions.lua: Adding SetSettingsPrefix()
This commit is contained in:
parent
0170e8181b
commit
8082309896
1 changed files with 5 additions and 1 deletions
|
|
@ -42,11 +42,15 @@ function host_system()
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function SetSettingsPrefix(settings, prefix)
|
||||||
|
settings.labelprefix = string.format("[%s] ", prefix)
|
||||||
|
end
|
||||||
|
|
||||||
-- Copy settings with a optional label prefix.
|
-- Copy settings with a optional label prefix.
|
||||||
function CopySettings(settings, prefix)
|
function CopySettings(settings, prefix)
|
||||||
local n = TableDeepCopy(settings)
|
local n = TableDeepCopy(settings)
|
||||||
if prefix ~= nil then
|
if prefix ~= nil then
|
||||||
n.labelprefix = string.format("[%s] ", prefix)
|
SetSettingsPrefix(n, prefix)
|
||||||
end
|
end
|
||||||
return n
|
return n
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue