🔴 DisciplinesTab: canProceedDiscipline called with wrong arguments
#52
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
File:
src/lib/game/stores/discipline-slice.ts, line 61The function
canProceedDisciplineinsrc/lib/game/utils/discipline-math.ts(line 65) expects 3 arguments:But the store call passes only 2 arguments (
id: stringandgameState), passing a string where aDisciplineDefinitionobject is expected, and omitting thedisciplineStateparameter entirely.Impact: Runtime crash —
discipline.manaTypewill fail on a string value. Discipline activation will never work correctly.Fix: Look up the discipline definition and state before calling:
[priority: 5] CRASH/BLOCKER — canProceedDiscipline called with wrong arguments, crashes DisciplinesTab.
Fixed: In discipline-slice.ts
activate(), now correctly looks updiscState = s.disciplines[id]and passes(def, discState, gameState)tocanProceedDiscipline()instead of(id, gameState).