refactor(features): extract dice system to standalone module
Extract dice rolling functionality from modals.js into dedicated feature module at src/systems/features/dice.js. This includes: - rollDice() - core rolling logic with animation - executeRollCommand() - dice notation parser - updateDiceDisplay() - sidebar display updates - clearDiceRoll() - clear last roll - addDiceQuickReply() - quick reply integration Also fixes ES6 module binding issue with pendingDiceRoll by adding getPendingDiceRoll() getter function in state.js to ensure correct value retrieval across module boundaries. Reduces modals.js from 568 to 499 lines (-69 lines). Creates dice.js with 113 lines of focused dice functionality.
This commit is contained in:
@@ -151,6 +151,10 @@ export function setPendingDiceRoll(roll) {
|
||||
pendingDiceRoll = roll;
|
||||
}
|
||||
|
||||
export function getPendingDiceRoll() {
|
||||
return pendingDiceRoll;
|
||||
}
|
||||
|
||||
export function setPanelContainer($element) {
|
||||
$panelContainer = $element;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user