v0.2.0: item pickups hold their toast for 5.5s
Toast durations are now per-toast (addToast third arg); passive item and active item pickups display for 5.5s instead of the default 2.5s. Cache v=43.
This commit is contained in:
1 parent
64ac53434b
commit
7d33e36c1e
8 files changed
+31
-31
No files matched your search
+2
-2
@@ -172,10 +172,10 @@ function giveItem(iid) {
|
||||
item.apply(p.stats, p);
|
||||
p.items[iid] = lvl + 1;
|
||||
if (lvl > 0) {
|
||||
addToast(item.name + ' ' + romanNum(lvl + 1), 'UPGRADED — ' + item.desc);
|
||||
addToast(item.name + ' ' + romanNum(lvl + 1), 'UPGRADED — ' + item.desc, 5.5);
|
||||
spawnText(p.x, p.y - 14, 'UPGRADED!', '#ffd060');
|
||||
} else {
|
||||
addToast(item.name, item.desc);
|
||||
addToast(item.name, item.desc, 5.5);
|
||||
spawnText(p.x, p.y - 14, item.name.toUpperCase(), ITEM_RARITY[item.rarity].color);
|
||||
}
|
||||
if (item.rarity === 'legendary') Sfx.curse(); else Sfx.item();
|
||||
|
||||
Reference in new issue
Block a user