Update READMEs

This commit is contained in:
2026-04-15 18:40:59 +02:00
parent 5284911ace
commit 2bc81a73fd
6 changed files with 130 additions and 79 deletions

View File

@@ -43,7 +43,7 @@ func is_valid() -> bool # Has valid id and requirements
func get_requirements() -> Array[GoalRequirementData] # Access requirements
```
**Note:** State-dependent methods (`is_met()`, `get_progress()`, `get_summary_text()`) have been moved to `LevelGameState` for proper decoupling.
**Note:** State-dependent methods (`is_goal_met()`, `get_goal_progress()`, `get_goal_requirement_summary()`) are implemented in `LevelGameState` for proper decoupling.
## GoalRequirementData
@@ -68,7 +68,7 @@ func get_amount() -> BigNumber # Required amount
func has_valid_amount() -> bool # Amount is non-negative
```
**Note:** State-dependent methods (`is_met()`, `get_progress()`, `get_summary_text()`) have been moved to `LevelGameState` for proper decoupling.
**Note:** State-dependent methods (`is_met()`, `get_progress()`, `get_summary_text()`) are implemented in `LevelGameState` for proper decoupling.
### Progress Calculation
@@ -93,7 +93,7 @@ This means reaching 50% progress on a 1e100 goal requires ~1e50 currency.
```gdscript
func _on_currency_changed(currency_id, new_amount):
game_state.evaluate_all_goals()
evaluate_all_goals()
```
### Completion Flow
@@ -167,8 +167,8 @@ signal goal_progress_changed(goal_id: StringName, progress: float)
## Integration Points
### With GameState
- Goals auto-discovered from `res://sandbox/goals/`
### With LevelGameState
- Goals registered from `GoalCatalogue` assigned to `LevelGameState`
- Completion state saved to JSON
- Buff unlock goals checked automatically
@@ -178,15 +178,15 @@ signal goal_progress_changed(goal_id: StringName, progress: float)
@export var unlock_goal: GoalData
# When goal completes, buff auto-unlocks:
GameState._try_unlock_buff_from_goal(buff)
level_game_state._try_unlock_buff_from_goal(buff)
```
### With Prestige
- Goal completion state persists through prestige
- Reset via `GameState.reset_for_prestige()`
- Reset via `LevelGameState.reset_for_prestige()`
## See Also
- `core/game_state.gd` - Goal state management
- `generator/currency_generator_data.gd` - Generator unlock goals
- `generator/generator_buff_data.gd` - Buff unlock goals
- `core/level_game_state.gd` - Goal state management
- `core/generator/currency_generator_data.gd` - Generator unlock goals
- `core/generator/generator_buff_data.gd` - Buff unlock goals