feat: luascript getGlobal(Chat)Var support
setGlobal(Chat)Var needs to be studied too.
This commit is contained in:
@@ -1278,7 +1278,7 @@ function basicMatcher (p1:string,matcherArg:matcherArg,vars:{[key:string]:string
|
||||
}
|
||||
case 'getglobalvar':{
|
||||
return getGlobalChatVar(v)
|
||||
}
|
||||
} // setglobalvar cbs support?
|
||||
case 'button':{
|
||||
return `<button class="button-default" risu-trigger="${arra[2]}">${arra[1]}</button>`
|
||||
}
|
||||
@@ -2235,6 +2235,10 @@ export function getGlobalChatVar(key:string){
|
||||
return DBState.db.globalChatVariables[key] ?? 'null'
|
||||
}
|
||||
|
||||
export function setGlobalChatVar(key:string, value:bool){ // TODO: check globalChatVariables possible type
|
||||
DBState.db.globalChatVariables[key] = value
|
||||
}
|
||||
|
||||
export function setChatVar(key:string, value:string){
|
||||
const selectedChar = get(selectedCharID)
|
||||
if(!DBState.db.characters[selectedChar].chats[DBState.db.characters[selectedChar].chatPage].scriptstate){
|
||||
|
||||
Reference in New Issue
Block a user