Tooltip api

This commit is contained in:
2026-11-05 23:06:37 -03:00
parent 9bc8fd992a
commit 34f001285d
15 changed files with 264 additions and 81 deletions
+4
View File
@@ -255,3 +255,7 @@ ctx.items.sell_value(id, data); // the same for a stack with this data, with a f
player.give_item("bworld:carrot", 3); // what doesn't fit drops at their feet
player.exchange_held({ id: "bworld:bucket", count: 1, data }); // one of the held item becomes this
```
Client and shared scripts have `ctx.items.sell_value(id, data)` too, worked out the same way with that side's
[fluid rules](../resources/fluids.md#rules), so a client can show what a full bottle of juice is worth, like the base
game's [tooltip line](../gui/index.md#item-tooltips) does.