Large refactor and code cleanup.

This commit is contained in:
Anna Rose Wiggins 2024-07-30 22:58:23 -04:00
parent 8b4cc23bb0
commit c92490fc91
7 changed files with 66 additions and 45 deletions

27
abase-properties.lua Normal file
View file

@ -0,0 +1,27 @@
-- functions for retrieving and modifying layer properties
extKey = "annabunches/abase"
local function IsIgnored(layer)
return layer.properties(extKey).ignored
end
local function IsMerged(layer)
return layer.isGroup and layer.properties(extKey).merged
end
local function SetIgnored(layer, ignore)
layer.properties(extKey).ignored = ignore
end
local function SetMerged(layer, merge)
if not layer.isGroup then return end
layer.properties(extKey).merged = merge
end
local export = {
IsIgnored = IsIgnored,
IsMerged = IsMerged,
SetIgnored = SetIgnored,
SetMerged = SetMerged,
}
return export