Replace playstyle rules with free-text custom rules markdown field
Remove hardcoreMode, setModeOnly, and bossTeamMatch toggles which had no mechanical impact on the tracker. Replace them with a customRules markdown field so users can document their own rules (especially useful for genlockes). Add react-markdown + remark-gfm for rendering and @tailwindcss/typography for prose styling. The custom rules display is collapsible and hidden by default. Also simplifies the BossDefeatModal by removing the Lost result and attempts counter, and always shows boss team size in the level cap bar. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -9,8 +9,9 @@ interface RuleBadgesProps {
|
||||
export function RuleBadges({ rules }: RuleBadgesProps) {
|
||||
const enabledRules = RULE_DEFINITIONS.filter((def) => rules[def.key])
|
||||
const allowedTypes = rules.allowedTypes ?? []
|
||||
const hasCustomRules = (rules.customRules ?? '').trim().length > 0
|
||||
|
||||
if (enabledRules.length === 0 && allowedTypes.length === 0) {
|
||||
if (enabledRules.length === 0 && allowedTypes.length === 0 && !hasCustomRules) {
|
||||
return <span className="text-sm text-text-tertiary">No rules enabled</span>
|
||||
}
|
||||
|
||||
@@ -23,9 +24,7 @@ export function RuleBadges({ rules }: RuleBadgesProps) {
|
||||
className={`px-2 py-0.5 rounded-full text-xs font-medium ${
|
||||
def.category === 'core'
|
||||
? 'bg-blue-900/40 text-blue-300 light:bg-blue-100 light:text-blue-700'
|
||||
: def.category === 'variant'
|
||||
? 'bg-amber-900/40 text-amber-300 light:bg-amber-100 light:text-amber-700'
|
||||
: 'bg-purple-900/40 text-purple-300 light:bg-purple-100 light:text-purple-700'
|
||||
: 'bg-amber-900/40 text-amber-300 light:bg-amber-100 light:text-amber-700'
|
||||
}`}
|
||||
>
|
||||
{def.name}
|
||||
@@ -42,6 +41,14 @@ export function RuleBadges({ rules }: RuleBadgesProps) {
|
||||
))}
|
||||
</span>
|
||||
)}
|
||||
{hasCustomRules && (
|
||||
<span
|
||||
title={rules.customRules}
|
||||
className="px-2 py-0.5 rounded-full text-xs font-medium bg-purple-900/40 text-purple-300 light:bg-purple-100 light:text-purple-700"
|
||||
>
|
||||
Custom Rules
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user