From: Ian Jackson Date: Mon, 18 Apr 2022 15:17:50 +0000 (+0100) Subject: JS: Add a comment about PieceInfo vs SessionPieceLoadJson X-Git-Tag: otter-1.1.0~473 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=f6e208965d01d0544648f9572d814ddc955d2668;p=otter.git JS: Add a comment about PieceInfo vs SessionPieceLoadJson I made a bug due to not realising this needed to be updated too. Maybe at some point the common bits should be combined, at least on the Rust side. Signed-off-by: Ian Jackson --- diff --git a/templates/script.ts b/templates/script.ts index ab2f3e76..ee920fcd 100644 --- a/templates/script.ts +++ b/templates/script.ts @@ -67,6 +67,8 @@ type UoRecord = UoDescription & { type ZCoord = string; +// On load, starts from SessionPieceLoadJson (Rust-only) +// On update, updated field-by-field from PreparedPieceState (Rust&JS) type PieceInfo = { held : PlayerId | null, cseq_main : number | null,