summaryrefslogtreecommitdiff
path: root/src/client/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/scripts')
-rw-r--r--src/client/scripts/create-aiscript-env.ts2
-rw-r--r--src/client/scripts/hpml/lib.ts34
2 files changed, 18 insertions, 18 deletions
diff --git a/src/client/scripts/create-aiscript-env.ts b/src/client/scripts/create-aiscript-env.ts
index 863cfadb8d..f6429ba923 100644
--- a/src/client/scripts/create-aiscript-env.ts
+++ b/src/client/scripts/create-aiscript-env.ts
@@ -20,7 +20,7 @@ export function createAiScriptEnv(vm, opts) {
title: title.value,
text: text.value,
});
- return confirm.canceled ? values.FALSE : values.TRUE
+ return confirm.canceled ? values.FALSE : values.TRUE;
}),
'Mk:api': values.FN_NATIVE(async ([ep, param, token]) => {
apiRequests++;
diff --git a/src/client/scripts/hpml/lib.ts b/src/client/scripts/hpml/lib.ts
index eaa237b734..9708581a11 100644
--- a/src/client/scripts/hpml/lib.ts
+++ b/src/client/scripts/hpml/lib.ts
@@ -26,23 +26,23 @@ export function initLib(hpml: Hpml) {
const canvas = hpml.canvases[id.value];
const ctx = canvas.getContext('2d');
return values.OBJ(new Map([
- ['clear_rect', values.FN_NATIVE(([x, y, width, height]) => { ctx.clearRect(x.value, y.value, width.value, height.value) })],
- ['fill_rect', values.FN_NATIVE(([x, y, width, height]) => { ctx.fillRect(x.value, y.value, width.value, height.value) })],
- ['stroke_rect', values.FN_NATIVE(([x, y, width, height]) => { ctx.strokeRect(x.value, y.value, width.value, height.value) })],
- ['fill_text', values.FN_NATIVE(([text, x, y, width]) => { ctx.fillText(text.value, x.value, y.value, width ? width.value : undefined) })],
- ['stroke_text', values.FN_NATIVE(([text, x, y, width]) => { ctx.strokeText(text.value, x.value, y.value, width ? width.value : undefined) })],
- ['set_line_width', values.FN_NATIVE(([width]) => { ctx.lineWidth = width.value })],
- ['set_font', values.FN_NATIVE(([font]) => { ctx.font = font.value })],
- ['set_fill_style', values.FN_NATIVE(([style]) => { ctx.fillStyle = style.value })],
- ['set_stroke_style', values.FN_NATIVE(([style]) => { ctx.strokeStyle = style.value })],
- ['begin_path', values.FN_NATIVE(() => { ctx.beginPath() })],
- ['close_path', values.FN_NATIVE(() => { ctx.closePath() })],
- ['move_to', values.FN_NATIVE(([x, y]) => { ctx.moveTo(x.value, y.value) })],
- ['line_to', values.FN_NATIVE(([x, y]) => { ctx.lineTo(x.value, y.value) })],
- ['arc', values.FN_NATIVE(([x, y, radius, startAngle, endAngle]) => { ctx.arc(x.value, y.value, radius.value, startAngle.value, endAngle.value) })],
- ['rect', values.FN_NATIVE(([x, y, width, height]) => { ctx.rect(x.value, y.value, width.value, height.value) })],
- ['fill', values.FN_NATIVE(() => { ctx.fill() })],
- ['stroke', values.FN_NATIVE(() => { ctx.stroke() })],
+ ['clear_rect', values.FN_NATIVE(([x, y, width, height]) => { ctx.clearRect(x.value, y.value, width.value, height.value); })],
+ ['fill_rect', values.FN_NATIVE(([x, y, width, height]) => { ctx.fillRect(x.value, y.value, width.value, height.value); })],
+ ['stroke_rect', values.FN_NATIVE(([x, y, width, height]) => { ctx.strokeRect(x.value, y.value, width.value, height.value); })],
+ ['fill_text', values.FN_NATIVE(([text, x, y, width]) => { ctx.fillText(text.value, x.value, y.value, width ? width.value : undefined); })],
+ ['stroke_text', values.FN_NATIVE(([text, x, y, width]) => { ctx.strokeText(text.value, x.value, y.value, width ? width.value : undefined); })],
+ ['set_line_width', values.FN_NATIVE(([width]) => { ctx.lineWidth = width.value; })],
+ ['set_font', values.FN_NATIVE(([font]) => { ctx.font = font.value; })],
+ ['set_fill_style', values.FN_NATIVE(([style]) => { ctx.fillStyle = style.value; })],
+ ['set_stroke_style', values.FN_NATIVE(([style]) => { ctx.strokeStyle = style.value; })],
+ ['begin_path', values.FN_NATIVE(() => { ctx.beginPath(); })],
+ ['close_path', values.FN_NATIVE(() => { ctx.closePath(); })],
+ ['move_to', values.FN_NATIVE(([x, y]) => { ctx.moveTo(x.value, y.value); })],
+ ['line_to', values.FN_NATIVE(([x, y]) => { ctx.lineTo(x.value, y.value); })],
+ ['arc', values.FN_NATIVE(([x, y, radius, startAngle, endAngle]) => { ctx.arc(x.value, y.value, radius.value, startAngle.value, endAngle.value); })],
+ ['rect', values.FN_NATIVE(([x, y, width, height]) => { ctx.rect(x.value, y.value, width.value, height.value); })],
+ ['fill', values.FN_NATIVE(() => { ctx.fill(); })],
+ ['stroke', values.FN_NATIVE(() => { ctx.stroke(); })],
]));
}),
'MkPages:chart': values.FN_NATIVE(([id, opts]) => {