WIP: stock chat rework - #101
Conversation
|
This is amazing!
Edit: Never mind, you could just do the above using the |
Added to the PR: exports.chat:registerMode({
name = 'admin',
displayName = 'Admin',
color = '#f00',
seObject = 'chat.admin',
cb = function(source, message, cbs)
cbs.updateMessage({
template = '<b>^#FF1200[ADMIN CHAT]^7</b> {}'
})
cbs.setSeObject('chat.admin')
end
})This will show and route only to people holding the |
|
A couple of ideas:
|
|
As messages with commands start with '/' hooks don't run with them. |
|
Suggestion for a new feature: Registering suggestions via server-side scripts, you can find more info in #148. |
|
This has been merged a while ago. |
Around 2 years since the initial design document, here is some progress on reworking the existing chat resource.
A few notes:
Refactored building
It's now a TypeScript resource using Webpack/Yarn. The embedded templates have been replaced with .vue files including a separate code-behind .ts file to help with VSCode tooling support.
Building
There's no integration for resource builders yet, you'll have to build it yourself before running:
Chat modes
The most significant feature added, there's now support for chat modes.
Example script:
Similarly, there's hooks:
... and a way to disable global chat if you're so inclined:
These modes are toggled between using TAB.
Other tiny changes
~r~etc. have some minimal support, and you can add^#0099FFcolors as well now.chat-theme-gtaohas been updated, however.Lby default) with associated command.{{blah}}placeholders which take fromparamsinstead ofargs.Gotchas
chatis restarted.config.jssettings are not supported yet.~stuff yet.This is unfinished and a bunch of other features ought to be added at a later time.