Package dev.deepcore.challenge.session
Class PrepSettingsService
java.lang.Object
dev.deepcore.challenge.session.PrepSettingsService
Applies prep GUI settings mutations with related normalization rules.
-
Constructor Summary
ConstructorsConstructorDescriptionPrepSettingsService(ChallengeManager challengeManager, Runnable syncWorldRules, Runnable applySharedVitalsIfEnabled) Creates a prep settings service. -
Method Summary
Modifier and TypeMethodDescriptionvoidsetHealthRefill(boolean enabled) Sets health refill state and enforces mutual exclusion with half-heart mode.voidsetInitialHalfHeart(boolean enabled) Sets initial-half-heart state and enforces mutual exclusion with health refill.voidtoggleComponent(ChallengeComponent component) Toggles a challenge component and applies dependent updates.
-
Constructor Details
-
PrepSettingsService
public PrepSettingsService(ChallengeManager challengeManager, Runnable syncWorldRules, Runnable applySharedVitalsIfEnabled) Creates a prep settings service.- Parameters:
challengeManager- challenge manager for component state mutationssyncWorldRules- action that reapplies world rule stateapplySharedVitalsIfEnabled- action that reapplies shared-vitals state when enabled
-
-
Method Details
-
toggleComponent
Toggles a challenge component and applies dependent updates.- Parameters:
component- challenge component to toggle
-
setHealthRefill
public void setHealthRefill(boolean enabled) Sets health refill state and enforces mutual exclusion with half-heart mode.- Parameters:
enabled- true to enable health refill
-
setInitialHalfHeart
public void setInitialHalfHeart(boolean enabled) Sets initial-half-heart state and enforces mutual exclusion with health refill.- Parameters:
enabled- true to enable initial-half-heart mode
-