mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-22 23:42:59 +00:00
WE compatibility for Notify
This commit is contained in:
parent
ae5d18248f
commit
0076010f35
1 changed files with 7 additions and 5 deletions
|
@ -1,4 +1,5 @@
|
||||||
--- A player notification system for worldeditadditions.
|
--- A player notification system for worldeditadditions.
|
||||||
|
-- @module worldeditadditions_core.notify
|
||||||
local wea_c = worldeditadditions_core
|
local wea_c = worldeditadditions_core
|
||||||
|
|
||||||
-- Helper functions
|
-- Helper functions
|
||||||
|
@ -162,10 +163,11 @@ function Notify.suppress_for_function(name, func)
|
||||||
end
|
end
|
||||||
|
|
||||||
--- WorldEdit compatibility
|
--- WorldEdit compatibility
|
||||||
-- if worldedit and type(worldedit.player_notify) == "function" then
|
if worldedit and type(worldedit.player_notify) == "function" then
|
||||||
-- worldedit.player_notify = function(name, message, ntype)
|
worldedit.player_notify = function(name, message, ntype)
|
||||||
-- Notify(name, ntype, message)
|
if not ntype then ntype = "info" end
|
||||||
-- end
|
Notify(name, ntype, message)
|
||||||
-- end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return Notify
|
return Notify
|
Loading…
Reference in a new issue