.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
|
||||
end
|
||||
|
||||
function SetSettingsPrefix(settings, prefix)
|
||||
settings.labelprefix = string.format("[%s] ", prefix)
|
||||
end
|
||||
|
||||
-- Copy settings with a optional label prefix.
|
||||
function CopySettings(settings, prefix)
|
||||
local n = TableDeepCopy(settings)
|
||||
if prefix ~= nil then
|
||||
n.labelprefix = string.format("[%s] ", prefix)
|
||||
SetSettingsPrefix(n, prefix)
|
||||
end
|
||||
return n
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue