Juice sell price
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
// the box next to the mouse saying what an item is, like minecraft's: its name, the fluid in it, what it's worth, then
|
||||
// its lore
|
||||
import { EverythingRegistry, ItemRegistry } from "$/common/everything_registry.ts";
|
||||
import { contained_fluid, type ItemStack } from "$/common/inventory.ts";
|
||||
import { contained_fluid, type ItemStack, sell_value } from "$/common/inventory.ts";
|
||||
import { display_name } from "$/common/utils.ts";
|
||||
import { fluid_rules } from "$/client/fluid_rules.ts";
|
||||
import { canvas, draw_text, draw_texture_region, measure_text, type Texture } from "$/client/renderer/mod.ts";
|
||||
@@ -49,8 +49,9 @@ export function item_tooltip(item: ItemStack): TooltipLine[] {
|
||||
if (info?.food) {
|
||||
lines.push({ text: `Restores ${info.food.nutrition} hunger`, color: FOOD_COLOR });
|
||||
}
|
||||
if (info?.base_sell_value !== undefined) {
|
||||
lines.push({ icon: VALUE_ICON, text: `${info.base_sell_value}`, color: VALUE_COLOR });
|
||||
const value = sell_value(item.type_id, item.data, fluid_rules);
|
||||
if (value !== undefined) {
|
||||
lines.push({ icon: VALUE_ICON, text: `${value}`, color: VALUE_COLOR });
|
||||
}
|
||||
const static_lore = info?.lore;
|
||||
for (const lore of [static_lore, item.lore]) {
|
||||
|
||||
Reference in New Issue
Block a user