add scene management (create/delete)

This commit is contained in:
Rusty Striker 2025-07-28 18:57:20 +03:00
parent e730f9a870
commit 8f5f82ff31
Signed by: RustyStriker
GPG key ID: 87E4D691632DFF15
6 changed files with 58 additions and 0 deletions

View file

@ -136,6 +136,10 @@ class Tavern {
if (!this.connected || this.loggedIn) { return; }
this.socket.send(JSON.stringify({ create_scene: { title: title } }));
}
delete_scene = (scene) => {
if (!this.connected || this.loggedIn) { return; }
this.socket.send(JSON.stringify({ delete_scene: { scene: scene } }));
}
shutdown = () => {
if (!this.connected || this.loggedIn || !this.admin) { return; }
this.socket.send(JSON.stringify('shutdown'));