Cleanup and planning
This commit is contained in:
@@ -1,10 +1,6 @@
|
||||
[gd_scene format=3 uid="uid://jeoiinukrrsp"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dtbxopw6ulhl8" path="res://core/generator/currency_generator.gd" id="1_4n4ca"]
|
||||
[ext_resource type="Resource" uid="uid://brqaojindcxa5" path="res://idles/currencies/magic.tres" id="2_5tmvy"]
|
||||
[ext_resource type="Resource" uid="uid://co0mcc2kvcpo5" path="res://idles/generators/orb.tres" id="3_wx13b"]
|
||||
|
||||
[node name="CurrencyGenerator" type="Node2D" unique_id=967969064]
|
||||
script = ExtResource("1_4n4ca")
|
||||
currency = ExtResource("2_5tmvy")
|
||||
data = ExtResource("3_wx13b")
|
||||
|
||||
@@ -10,6 +10,7 @@ enum BuffKind {
|
||||
const HUGE_EXPONENT: int = 1000000
|
||||
|
||||
@export var id: StringName = &""
|
||||
@export var target_ids: Array[StringName] = []
|
||||
@export var kind: BuffKind = BuffKind.AUTO_PRODUCTION_MULTIPLIER
|
||||
@export_multiline var text: String = ""
|
||||
@export var icon: Texture2D
|
||||
@@ -35,6 +36,18 @@ const HUGE_EXPONENT: int = 1000000
|
||||
@export var resource_purchase_base_exponent: int = 0
|
||||
@export var resource_purchase_increment_multiplier: float = 1.2
|
||||
|
||||
func targets_generator(generator_id: StringName) -> bool:
|
||||
if target_ids.is_empty():
|
||||
return false
|
||||
|
||||
if target_ids.has("*"):
|
||||
return true
|
||||
|
||||
return target_ids.has(generator_id)
|
||||
|
||||
func get_target_generators() -> Array[StringName]:
|
||||
return target_ids.duplicate()
|
||||
|
||||
func has_unlock_goal() -> bool:
|
||||
if unlock_goal == null:
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user