chiark / gitweb /
movehist: script: wip record
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 2 Apr 2021 19:36:01 +0000 (20:36 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 2 Apr 2021 19:36:21 +0000 (20:36 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
templates/script.ts

index 34754494f8885cdf45e143024fed7c906a2faeca..b4bf063779f8c7288bcef868a50ed987ec27e5e3 100644 (file)
@@ -48,6 +48,7 @@ type Timestamp = number; // unix time_t, will break in 285My
 type Layout = 'Portrait' | 'Landscape';
 type PieceMoveable = "No" | "IfWresting" | "Yes";
 type CompassAngle = number;
+type FaceId = number;
 
 type UoDescription = {
   kind: UoKind;
@@ -971,8 +972,22 @@ messages.SetLinks = <MessageHandler>function
   links_elem.innerHTML = msg
 }
 
-messages.MoveHistEnt = <MessageHandler>function
-(todo: object) {
+// ---------- movehist ----------
+
+type MoveHistEnt = {
+  held: PlayerId,
+  posx: [MoveHistPosx, MoveHistPosx],
+}
+type MoveHistPosx = {
+  pos: Pos,
+  angle: CompassAngle,
+  facehint: FaceId | null,
+}
+
+messages.MoveHistEnt = <MessageHandler>movehist_record;
+
+function movehist_record(ent: MoveHistEnt) {
+  
 }
 
 // ----- logs -----