aboutsummaryrefslogtreecommitdiffstats
path: root/names
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
commit082fc2e4005387697f77e485ae1c783ed3203e91 (patch)
treef65ff403c4424645b5bec7f189b61bb96961db39 /names
parent0cb8524ceac9d3ed70dbc9ce9a169b64ddfe55d1 (diff)
downloadcoinosv3-082fc2e4005387697f77e485ae1c783ed3203e91.tar.gz
coinosv3-082fc2e4005387697f77e485ae1c783ed3203e91.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
Diffstat (limited to 'names')
-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));
}