f19e7b187e
Numismatics' x8 uniform chain isn't intuitive. Mod values are hardcoded so we cant fix the ratios, but we can put the conversion table directly on each coins tooltip via KubeJS ItemEvents.tooltip. Players hover any coin -> see how it relates to the others + a hint to use Bank Teller for on-the-fly conversion. ~25 lines, ItemEvents.tooltip hot path is cached per item-id so no performance concern.
25 lines
1.1 KiB
JavaScript
25 lines
1.1 KiB
JavaScript
// Brass & Sigil — Numismatics coin tooltip helper
|
|
//
|
|
// Numismatics' uniform x8 denomination chain (spur=1, bevel=8, cog=64,
|
|
// crown=512, sun=4096) isn't intuitive at a glance -- people expect
|
|
// real-world ratios like 1p/10p/20p/50p/£1. Mod values are hardcoded,
|
|
// so the next-best thing is putting the conversion crib right on each
|
|
// coin's tooltip.
|
|
//
|
|
// Players hover any coin and instantly see how it relates to the other
|
|
// denominations + a reminder that Bank Teller blocks convert on demand.
|
|
|
|
const CRIBS = {
|
|
'numismatics:spur': [ '= 1 Spur (base unit)', 'Bank Teller block converts.' ],
|
|
'numismatics:bevel': [ '= 8 Spurs', 'Bank Teller block converts.' ],
|
|
'numismatics:cog': [ '= 64 Spurs (8 Bevels)', 'Bank Teller block converts.' ],
|
|
'numismatics:crown': [ '= 512 Spurs (8 Cogs, 64 Bevels)', 'Bank Teller block converts.' ],
|
|
'numismatics:sun': [ '= 4096 Spurs (8 Crowns)', 'Bank Teller block converts.' ],
|
|
};
|
|
|
|
ItemEvents.tooltip(event => {
|
|
for (const id in CRIBS) {
|
|
event.add(id, CRIBS[id].map(line => Text.aqua(line)));
|
|
}
|
|
});
|