Closed VorTechnix closed 1 month ago
See: https://api.minetest.net/escape-sequences/ for colorize documentation.
nice, this sounds like just the thing we need too. And colour! Oh gosh yes.
Maybe just the e.g.. [WEA]
prefix or something coloured and then the message based on the level (i..e your sub functions?) if MT supports that?
Maybe just the e.g.. [WEA] prefix or something coloured and then the message based on the level (i..e your sub functions?) if MT supports that?
That's the current plan!
I'll implement a demo function //test notify
#119
Finished base implementation (https://github.com/sbrl/Minetest-WorldEditAdditions/commit/2f1332739e4190d47c3fb4f7663f105966d71e02). Still need to implement silencing.
Fully implemented with silencing and WE compatibility (c86319d94ef778a896c32bc96f8e467ebe0e84ba and 0076010f35edde62bc5f45f132b945d9d92a135f)
Problem
We need our own notify_player function to stop our dependency on WorldEdit for this.
Solution
wea_core.notify(<player name>,<message>[,<message type/color>])
Message Types:
error
(red),warn
(yellow),ok
(green),info
(blue),none
(white)Sub functions:
notify.error
,notify.warn
,notify.ok
,notify.info
,notify.error
Options
Implement as an emitter so that other operations can be called when notify is triggered.
Additional Context
minetest.colorize
is a thing.