From 4b68abd963031a28e19a8cd2f626e8ba91427b0b Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 3 May 2019 18:48:40 +0900 Subject: [PATCH] =?UTF-8?q?=E5=89=B2=E3=81=A3=E3=81=9F=E4=BD=99=E3=82=8A?= =?UTF-8?q?=E3=82=92=E6=B1=82=E3=82=81=E3=82=8B=E9=96=A2=E6=95=B0=E3=82=92?= =?UTF-8?q?MisskeyPages=E3=81=AB=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- locales/ja-JP.yml | 4 ++++ src/misc/aiscript/evaluator.ts | 1 + src/misc/aiscript/index.ts | 1 + 3 files changed, 6 insertions(+) diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 5d85819d54..6aac41c7d8 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1982,6 +1982,10 @@ pages: _divide: arg1: "A" arg2: "B" + remind: "÷ 割った余り" + _remind: + arg1: "A" + arg2: "B" eq: "AとBが同じ" _eq: arg1: "A" diff --git a/src/misc/aiscript/evaluator.ts b/src/misc/aiscript/evaluator.ts index 2bc866dc43..6beb320442 100644 --- a/src/misc/aiscript/evaluator.ts +++ b/src/misc/aiscript/evaluator.ts @@ -160,6 +160,7 @@ export class ASEvaluator { subtract: (a: number, b: number) => a - b, multiply: (a: number, b: number) => a * b, divide: (a: number, b: number) => a / b, + remind: (a: number, b: number) => a % b, strLen: (a: string) => a.length, strPick: (a: string, b: number) => a[b - 1], strReplace: (a: string, b: string, c: string) => a.split(b).join(c), diff --git a/src/misc/aiscript/index.ts b/src/misc/aiscript/index.ts index 711cfb41eb..1ce09b7bdb 100644 --- a/src/misc/aiscript/index.ts +++ b/src/misc/aiscript/index.ts @@ -57,6 +57,7 @@ export const funcDefs: Record