diff --git a/src/core/intent.ts b/src/core/intent.ts index 1bd5690..232470d 100644 --- a/src/core/intent.ts +++ b/src/core/intent.ts @@ -26,8 +26,7 @@ export type Intent = ; function dynamiteableCell(cell: CellContents): boolean { - // XXX more things should be dynamiteable (#108) - return cell.t == 'tile' || (cell.t == 'bonus' && cell.bonus.t == 'block'); + return cell.t == 'tile' || (cell.t == 'bonus' && (cell.bonus.t != 'empty')); } export function getIntentOfMouseDown(tool: Tool, wp: WidgetPoint, button: number, mods: Set, hoverCell: CellContents, pinned: boolean): Intent { diff --git a/src/core/state-helpers.ts b/src/core/state-helpers.ts index a99071c..7a53b9b 100644 --- a/src/core/state-helpers.ts +++ b/src/core/state-helpers.ts @@ -200,7 +200,8 @@ export function checkValid(state: CoreState): CoreState { s.animations = animations; // XXX: is this the right place to do this? - s.currentTool = 'pointer'; + if (state.currentTool != 'dynamite') + s.currentTool = 'pointer'; }); }