From 0c666472b265f7b5b98d673ce586bb56bf550f1c Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 1 May 2022 19:28:28 +0100 Subject: [PATCH] script: Demonstrate that we can use the desc in a log message We can now improve many more messages, but I have other fish to fry ATM. Signed-off-by: Ian Jackson --- templates/script.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/script.ts b/templates/script.ts index 982870db..3f75b1c1 100644 --- a/templates/script.ts +++ b/templates/script.ts @@ -1171,7 +1171,8 @@ function drag_mousedown(e : MouseEvent, shifted: boolean) { ungrab_all_except(note_already); } if (pinned && !wresting) { - add_log_message('That piece is pinned to the table.'); + let p = pieces[c.clicked[0]!]!; + add_log_message('That piece ('+p.desc+') is pinned to the table.'); return; } grab_clicked(clicked, !wresting, multigrab); -- 2.30.2