View > Skip animations makes every roll instant (Shift-click still does it for one roll). A roll with a question now animates up to it and on after the answer, instead of jumping to the end. Pause and question pop-ups fade and grow in unless the roll skips animations. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
20 lines
609 B
GDScript
20 lines
609 B
GDScript
class_name SkipAnimations
|
|
extends RefCounted
|
|
## The "Skip animations" setting (View ▾): every roll shows its result at once,
|
|
## with no flicker, beads or pop-up motion. Shift-click does the same for one roll.
|
|
|
|
const SETTING := "skip_animations"
|
|
|
|
## Used when there is no state store (tests that build a bare Main).
|
|
static var _skip_mem := false
|
|
|
|
|
|
static func on(m: Main) -> bool:
|
|
return bool(m.state.get_setting(SETTING, false)) if m and m.state else _skip_mem
|
|
|
|
|
|
static func set_on(m: Main, value: bool) -> void:
|
|
_skip_mem = value
|
|
if m and m.state:
|
|
m.state.set_setting(SETTING, value)
|
|
m.state.save()
|