[feat] themedesc for classic

This commit is contained in:
kwaroran
2023-07-21 01:15:11 +09:00
parent af47d76f48
commit ab4dbb6cac
3 changed files with 6 additions and 4 deletions

View File

@@ -103,6 +103,7 @@ export const languageEnglish = {
theme: "Select your theme",
themeDescWifulike: "Not suitable for mobile",
themeDescWifuCut: "Suitable for mobile",
themeDescClassic: "Suitable for All devices",
texttheme: "Select your text color",
inputName: "Lastly, Input your Nickname."
},

View File

@@ -103,7 +103,7 @@
<button class="hover:text-green-500 transition-colors flex flex-col items-start" on:click={() => {
$DataBase.theme = ''
step += 1
}}><span>• Standard Risu</span>
}}><span>• Standard Risu ({language.setup.themeDescClassic})</span>
<img class="w-3/4 mt-2" src="/ss2.webp" alt="example"></button>
<button class="hover:text-green-500 transition-colors flex flex-col items-start" on:click={() => {
$DataBase.theme = 'waifu'

View File

@@ -61,7 +61,9 @@ export function processScriptFull(char:character|groupChat, data:string, mode:Sc
for (const script of scripts){
if(script.type === mode){
const reg = new RegExp(script.in, script.ableFlag ? script.flag : 'g')
let outScript = script.out.replaceAll("$n", "\n")
let outScript2 = script.out.replaceAll("$n", "\n")
let outScript = risuChatParser(outScript2.replace(dreg, "$&"), {chatID: chatID, db:db})
if(outScript.startsWith('@@')){
if(reg.test(data)){
if(outScript.startsWith('@@emo ')){
@@ -131,12 +133,11 @@ export function processScriptFull(char:character|groupChat, data:string, mode:Sc
}
}
else{
let mOut = risuChatParser(outScript.replace(dreg, "$&"), {chatID: chatID, db:db})
if(randomness.test(data)){
const list = data.split('|||')
data = list[Math.floor(Math.random()*list.length)];
}
data = risuChatParser(data.replace(reg, mOut), {chatID: chatID, db:db})
data = risuChatParser(data.replace(reg, outScript), {chatID: chatID, db:db})
}
}
}