-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathinfo_nodes.lua
More file actions
27 lines (24 loc) · 808 Bytes
/
info_nodes.lua
File metadata and controls
27 lines (24 loc) · 808 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
PLUGIN.name = 'Nodes'
PLUGIN.description = 'Comment areas'
PLUGIN.author = 'Bilwin'
function PLUGIN:SetupAreaProperties()
ix.area.AddType('comment')
ix.area.AddProperty('comment', ix.type.string, '')
end
if (CLIENT) then
function PLUGIN:OnAreaChanged(oldID, newID)
if LocalPlayer():GetMoveType() == MOVETYPE_NOCLIP then return; end
local storedData = ix.area.stored[newID]
for id, data in pairs(ix.area.stored) do
if id == newID && data.type == 'comment' then
hook.Run('EnteredCommentArea', data)
end
end
end
function PLUGIN:EnteredCommentArea(data)
local text = data.properties.comment
if text && text ~= '' then
chat.AddText(color_white, text)
end
end
end