Remove trigger code mode

This commit is contained in:
kwaroran
2024-09-16 03:17:53 +09:00
parent 19b3e17619
commit 12f9c86366
2 changed files with 0 additions and 32 deletions

View File

@@ -656,25 +656,6 @@
} }
} }
}}>{language.blockMode}</button> }}>{language.blockMode}</button>
<button class="bg-bgcolor py-1 rounded-md text-sm px-2" class:ring-1={currentChar.data?.triggerscript?.[0]?.effect?.[0]?.type === 'triggercode'} on:click|stopPropagation={async () => {
if(currentChar.type === 'character' && currentChar.data?.triggerscript?.[0]?.effect?.[0]?.type !== 'triggercode'){
if(currentChar.data?.triggerscript && currentChar.data?.triggerscript.length > 0){
const t = await alertConfirm(language.triggerSwitchWarn)
if(!t){
return
}
}
currentChar.data.triggerscript = [{
comment: "",
type: "start",
conditions: [],
effect: [{
type: "triggercode",
code: ""
}]
}]
}
}}>{language.codeMode}</button>
<button class="bg-bgcolor py-1 rounded-md text-sm px-2" class:ring-1={currentChar.data?.triggerscript?.[0]?.effect?.[0]?.type === 'triggerlua'} on:click|stopPropagation={async () => { <button class="bg-bgcolor py-1 rounded-md text-sm px-2" class:ring-1={currentChar.data?.triggerscript?.[0]?.effect?.[0]?.type === 'triggerlua'} on:click|stopPropagation={async () => {
if(currentChar.type === 'character' && currentChar.data?.triggerscript?.[0]?.effect?.[0]?.type !== 'triggerlua'){ if(currentChar.type === 'character' && currentChar.data?.triggerscript?.[0]?.effect?.[0]?.type !== 'triggerlua'){
if(currentChar.data?.triggerscript && currentChar.data?.triggerscript.length > 0){ if(currentChar.data?.triggerscript && currentChar.data?.triggerscript.length > 0){

View File

@@ -498,19 +498,6 @@ export async function runTrigger(char:character,mode:triggerMode, arg:{
setVar(effect.inputVar, res) setVar(effect.inputVar, res)
break break
} }
case 'triggercode':{
const triggerCodeResult = await risuCommandParser(effect.code,{
chara:char,
lowLevelAccess: trigger.lowLevelAccess,
funcName: mode
})
if(triggerCodeResult['__stop_chat__'] === '1'){
stopSending = true
}
break
}
case 'triggerlua':{ case 'triggerlua':{
const triggerCodeResult = await runLua(effect.code,{ const triggerCodeResult = await runLua(effect.code,{
lowLevelAccess: trigger.lowLevelAccess, lowLevelAccess: trigger.lowLevelAccess,