Add generator buffs (additional test required)

This commit is contained in:
2026-03-15 10:06:43 +01:00
parent 7b58c36414
commit 278b073501
19 changed files with 691 additions and 21 deletions

View File

@@ -28,6 +28,22 @@ extends Resource
@export var click_exponent: int = 0
@export var click_cooldown_seconds: float = 0.2
## Data-driven buffs purchasable for this generator.
@export var buffs: Array[GeneratorBuffData] = []
func find_buff(buff_id: StringName) -> GeneratorBuffData:
var expected_id: String = String(buff_id).strip_edges()
if expected_id.is_empty():
return null
for buff in buffs:
if buff == null:
continue
if String(buff.id) == expected_id:
return buff
return null
## Returns cost of next generator
func cost_next(owned: int) -> float:
return cost_for_amount(owned, 1)