Files
idle/core/goals/goal_data.gd
Michele Rossi 81a4058b04 systems rework: buffs, prestige graph, research, modular architecture
Decouples core systems from centralized globals in favor of catalogue-based architecture and data-driven content.

   Key changes:
   - Prestige: node-based buff tech tree, graph panel, progress bar
   - Research: multi-worker system, per-generator research, xp generation
   - Ascension: meta-currency layer via multi-currency prestige resets
   - Buffs: refactored as generator-independent via catalogues
   - UI: currency panel, edge-scrolling camera + zoom, current-goal panel
   - Alchemy Tower: crafting building with recipe/cost system
   - Testing: 7 test suites (ascension, prestige, research, goals)
   - Content: migrated from hardcoded idles/ to gym format (tiny_sword)
2026-05-07 20:36:21 +00:00

35 lines
672 B
GDScript

class_name GoalData
extends Resource
enum UnlockBehavior {
AUTOMATIC,
MANUAL,
}
@export var id: StringName = &""
@export var requirements: Array[GoalRequirementData] = []
@export var unlock_behavior: UnlockBehavior = UnlockBehavior.MANUAL
func has_id() -> bool:
return not String(id).strip_edges().is_empty()
func get_requirements() -> Array[GoalRequirementData]:
return requirements.duplicate()
func is_valid() -> bool:
if not has_id():
return false
if requirements.is_empty():
return false
for req in requirements:
if req == null:
continue
if req.get_currency() == null:
continue
if not req.has_valid_amount():
continue
return true