mirror of
https://github.com/evennia/evennia.git
synced 2026-03-24 16:56:32 +01:00
fix bug with adding duplicate knowntypes
This commit is contained in:
parent
4b961f08e0
commit
712b2ea216
1 changed files with 9 additions and 1 deletions
|
|
@ -383,6 +383,14 @@ let goldenlayout = (function () {
|
|||
// Public
|
||||
//
|
||||
|
||||
//
|
||||
// helper accessor for other plugins to add new known-message types
|
||||
var addKnownType = function (newtype) {
|
||||
if( knownTypes.includes(newtype) == false ) {
|
||||
knownTypes.push(newtype);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
//
|
||||
|
|
@ -526,7 +534,7 @@ let goldenlayout = (function () {
|
|||
onKeydown: onKeydown,
|
||||
onText: onText,
|
||||
getGL: function () { return myLayout; },
|
||||
addKnownType: function (newtype) { knownTypes.push(newtype); },
|
||||
addKnownType: addKnownType,
|
||||
}
|
||||
}());
|
||||
window.plugin_handler.add("goldenlayout", goldenlayout);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue