Simplify coin tooltips + include sprocket #37
@@ -1,24 +1,22 @@
|
|||||||
// Brass & Sigil — Numismatics coin tooltip helper
|
// Brass & Sigil — Numismatics coin tooltip helper
|
||||||
//
|
//
|
||||||
// Numismatics' uniform x8 denomination chain (spur=1, bevel=8, cog=64,
|
// Numismatics ships its own "Value: N spurs" tooltip on each coin --
|
||||||
// crown=512, sun=4096) isn't intuitive at a glance -- people expect
|
// don't duplicate that. The one piece players need that ISN'T there is:
|
||||||
// real-world ratios like 1p/10p/20p/50p/£1. Mod values are hardcoded,
|
// where do I convert these? Answer: Bank Teller block. Add that hint
|
||||||
// so the next-best thing is putting the conversion crib right on each
|
// to each of the 6 coin denominations (spur, bevel, sprocket, cog,
|
||||||
// coin's tooltip.
|
// crown, sun -- including sprocket which we missed in v0.22.1).
|
||||||
//
|
|
||||||
// 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 = {
|
const COIN_IDS = [
|
||||||
'numismatics:spur': [ '= 1 Spur (base unit)', 'Bank Teller block converts.' ],
|
'numismatics:spur',
|
||||||
'numismatics:bevel': [ '= 8 Spurs', 'Bank Teller block converts.' ],
|
'numismatics:bevel',
|
||||||
'numismatics:cog': [ '= 64 Spurs (8 Bevels)', 'Bank Teller block converts.' ],
|
'numismatics:sprocket',
|
||||||
'numismatics:crown': [ '= 512 Spurs (8 Cogs, 64 Bevels)', 'Bank Teller block converts.' ],
|
'numismatics:cog',
|
||||||
'numismatics:sun': [ '= 4096 Spurs (8 Crowns)', 'Bank Teller block converts.' ],
|
'numismatics:crown',
|
||||||
};
|
'numismatics:sun',
|
||||||
|
];
|
||||||
|
|
||||||
ItemEvents.modifyTooltips(event => {
|
ItemEvents.modifyTooltips(event => {
|
||||||
for (const id in CRIBS) {
|
COIN_IDS.forEach(function(id) {
|
||||||
event.add(id, CRIBS[id].map(line => Text.aqua(line)));
|
event.add(id, Text.aqua('Right-click a Bank Teller block to convert denominations.'));
|
||||||
}
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"$schema": "Brass-and-Sigil pack.lock.json - generated, do not edit by hand unless you know what you are doing",
|
"$schema": "Brass-and-Sigil pack.lock.json - generated, do not edit by hand unless you know what you are doing",
|
||||||
"name": "Brass and Sigil",
|
"name": "Brass and Sigil",
|
||||||
"version": "0.22.3",
|
"version": "0.22.4",
|
||||||
"minecraft": "1.21.1",
|
"minecraft": "1.21.1",
|
||||||
"loader": {
|
"loader": {
|
||||||
"type": "neoforge",
|
"type": "neoforge",
|
||||||
|
|||||||
Reference in New Issue
Block a user