aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-09-14 17:56:54 -0700
committerAdam Soltys <[email protected]>2026-09-14 17:56:54 -0700
commit13b3e9d0272b3ab8aed26b15cd8db6177a5e9400 (patch)
tree85ac10023c3501d0264d160afed60c74da80c258
parent3b633767bf14510453c89867d1e2adf8c1dd7ca8 (diff)
downloadcoinosv3-server-13b3e9d0272b3ab8aed26b15cd8db6177a5e9400.tar.gz
coinosv3-server-13b3e9d0272b3ab8aed26b15cd8db6177a5e9400.zip
A gift made for one head can be put straight on it.
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01QYJfZ4A1TDCEY4Foq3CApR
-rw-r--r--names/server.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/names/server.js b/names/server.js
index 881fce7..ed44ad3 100644
--- a/names/server.js
+++ b/names/server.js
@@ -1205,9 +1205,11 @@ Bun.serve({
// giftable but never sold: the beta hard hat, and the knight's helm
if (!(hat in HAT_PRICES) && !['construction', 'knight'].includes(hat)) return json({ error: 'no such hat' }, 400);
const net = hatNetOf(b.net);
- grantHat(pk, hat, net, { equip: false });
+ // the operator may say the gift goes straight on the head (a hat made
+ // for this one person); by default it only crowns a bare one
+ grantHat(pk, hat, net, { equip: b.equip === true });
persist();
- log(`hat gifted: ${hat} (${net}) to ${pk.slice(0, 12)}`);
+ log(`hat gifted: ${hat} (${net}) to ${pk.slice(0, 12)}${b.equip === true ? ', worn' : ''}`);
return json(hatRec(pk, net));
}