Chat Mode

The Initial commit for Chat Mode, the nickname part of the UI is missing other than that it should be fully functional. To use Chat Mode effectively you first input a small dialogue (Can be around 6 lines 3 of your own inputs and 3 of the character) formatted as Name : it will then automate the actions needed to chat properly. During this mode single line mode is forced on, and Trim Incomplete Sentences is forced off.
This commit is contained in:
henk717
2021-12-26 01:51:32 +01:00
parent 14e5fcd355
commit d234f67a90
3 changed files with 61 additions and 3 deletions

View File

@ -108,6 +108,9 @@ var allowedit = true; // Whether clicking on chunks will edit them
var action_mode = 0; // 0: story, 1: action
var adventure = false;
// Chatmode
var chatmode = false;
//=================================================================//
// METHODS
//=================================================================//
@ -1164,6 +1167,10 @@ function setadventure(state) {
}
}
function setchatmode(state) {
chatmode = state;
}
function autofocus(event) {
if(connected) {
event.target.focus();
@ -2145,6 +2152,11 @@ $(document).ready(function(){
$("#setadventure").prop('checked', msg.data).change();
// Update adventure state
setadventure(msg.data);
} else if(msg.cmd == "updatechatmode") {
// Update toggle state
$("#setchatmode").prop('checked', msg.data).change();
// Update chatmode state
setchatmode(msg.data);
} else if(msg.cmd == "updatedynamicscan") {
// Update toggle state
$("#setdynamicscan").prop('checked', msg.data).change();