Fix issue #38: Implement tokens on maps
All checks were successful
Test / test (push) Successful in 2s

This commit is contained in:
Gitea OpenCode Agent
2026-10-14 18:41:17 +00:00
parent ef343dbdd8
commit d567b5d171
12 changed files with 826 additions and 17 deletions

View File

@@ -19,6 +19,14 @@ const MapSchema = new Schema({
x: { type: Number, default: 0 },
y: { type: Number, default: 0 }
}],
// Actors dragged onto the map to stand on it as tokens. x/y are image pixels of the centre of the
// token, like a pin, and the viewer keeps them snapped onto a grid cell so a token sits where the
// square it stands in is.
tokens: [{
actor: { type: Schema.Types.ObjectId, ref: 'Actor', required: true },
x: { type: Number, default: 0 },
y: { type: Number, default: 0 }
}],
campaign: {
type: Schema.Types.ObjectId,
ref: 'Campaign',