mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-23 07:10:41 +00:00
Fix #718 incomplete table_bonus condition
This commit is contained in:
@@ -53,7 +53,7 @@ export function FancyMenu({ placeholder, relative, class: clazz, getResults, chi
|
||||
}
|
||||
}, [setActive, inputRef])
|
||||
|
||||
return <div class={`px-1 ${relative ? 'relative' : ''}`}>
|
||||
return <div class={`${relative ? 'relative' : ''}`}>
|
||||
<div onClick={open}>
|
||||
{children}
|
||||
</div>
|
||||
|
||||
@@ -591,6 +591,9 @@ const LootConditions: Record<string, (params: any) => LootCondition> = {
|
||||
},
|
||||
survives_explosion: () => () => true,
|
||||
table_bonus: ({ chances }) => (ctx) => {
|
||||
if (!chances) {
|
||||
return false
|
||||
}
|
||||
const level = 0 // TODO: get enchantment level from tool
|
||||
const chance = chances[clamp(level, 0, chances.length - 1)]
|
||||
return ctx.random.nextFloat() < chance
|
||||
|
||||
@@ -476,6 +476,9 @@ const LootConditions: Record<string, (params: any) => LootCondition> = {
|
||||
},
|
||||
survives_explosion: () => () => true,
|
||||
table_bonus: ({ chances }) => (ctx) => {
|
||||
if (!chances) {
|
||||
return false
|
||||
}
|
||||
const level = 0 // TODO: get enchantment level from tool
|
||||
const chance = chances[clamp(level, 0, chances.length - 1)]
|
||||
return ctx.random.nextFloat() < chance
|
||||
|
||||
@@ -184,7 +184,7 @@ nav li {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
margin: 0 16px;
|
||||
margin: 0 12px;
|
||||
fill: var(--nav);
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
|
||||
Reference in New Issue
Block a user