chiark / gitweb /
script: Demonstrate that we can use the desc in a log message
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 1 May 2022 18:28:28 +0000 (19:28 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 1 May 2022 18:39:26 +0000 (19:39 +0100)
We can now improve many more messages, but I have other fish to fry ATM.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
templates/script.ts

index 982870db7e4e448cee9af7c19674c582b509b5ab..3f75b1c13dcc4d0e7be00e707572eb5ad720f53f 100644 (file)
@@ -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);