Juice sell price

This commit is contained in:
2026-10-26 19:32:46 -03:00
parent e729b92d20
commit e5221ba681
17 changed files with 182 additions and 47 deletions
+4
View File
@@ -45,6 +45,10 @@ Juices from different items are different fluids, so they never share a bottle o
(`bworld:glass_bottle`, 250 mB) and buckets (`bworld:bucket`, 1000 mB) hold it, and whatever makes juice reads the
component.
Juice sells for 1.2 times the items it took to make, rounded up, so it's always worth juicing something. A bottle of
juice from an item worth 30 that makes 200 mB took 1.25 of them, and sells for 45. Juice from an item without a
`base_sell_value` can't be sold.
## Hunger and Health
Hunger and health work like Minecraft's:
+1
View File
@@ -250,6 +250,7 @@ ctx.items.max_stack(id, data); // the same for a stack with this data, fewer for
ctx.items.fluid_capacity("bworld:bucket"); // how much a fluid container holds full, or undefined
ctx.items.tool("bworld:wood_pickaxe"); // "pickaxe", or undefined for items that aren't tools
ctx.items.sell_value("bworld:copper_coin"); // 1, or undefined for items without a base_sell_value
ctx.items.sell_value(id, data); // the same for a stack with this data, with a full fluid container's fluid on top
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