mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-11 14:01:49 +00:00
Merge branch 'dev' into generated-pcm-stream
This commit is contained in:
commit
4f675dde27
56 changed files with 609 additions and 242 deletions
|
|
@ -2,7 +2,14 @@ local events = {
|
|||
handlers = {}
|
||||
}
|
||||
|
||||
local __parse_path = parse_path
|
||||
local __pack_is_installed = pack.is_installed
|
||||
|
||||
function events.on(event, func)
|
||||
local prefix = __parse_path(event)
|
||||
if prefix ~= "core" and not __pack_is_installed(prefix) then
|
||||
error("pack prefix required")
|
||||
end
|
||||
if events.handlers[event] == nil then
|
||||
events.handlers[event] = {}
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue