-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhide-me.lua
More file actions
43 lines (38 loc) · 891 Bytes
/
hide-me.lua
File metadata and controls
43 lines (38 loc) · 891 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
function onload()
local gm = self.getGMNotes()
if gm == "" then
self.setGMNotes("true")
gm = "true"
end
if gm == "true" then
self.addContextMenuItem("[2ECC40]Visible[-]", hideMe)
else
self.addContextMenuItem("[FF4136]Invisible[-]", showMe)
end
end
function hideMe()
self.setGMNotes("false")
self.setInvisibleTo(
{
"White",
"Brown",
"Red",
"Orange",
"Yellow",
"Green",
"Teal",
"Blue",
"Purple",
"Pink",
"Grey"
}
)
self.clearContextMenu()
self.addContextMenuItem("[FF4136]Invisible[-]", showMe)
end
function showMe()
self.setGMNotes("true")
self.setInvisibleTo({})
self.clearContextMenu()
self.addContextMenuItem("[2ECC40]Visible[-]", hideMe)
end