Add new resource for testing
This commit is contained in:
@@ -493,10 +493,10 @@ func _resolve_buff_cost_currency_id(buff: GeneratorBuffData) -> StringName:
|
|||||||
return GameState.get_currency_id(cost_currency)
|
return GameState.get_currency_id(cost_currency)
|
||||||
|
|
||||||
func _resolve_purchase_currency() -> Currency:
|
func _resolve_purchase_currency() -> Currency:
|
||||||
if data != null and data.purchase_currency != null:
|
if data == null:
|
||||||
return data.purchase_currency
|
return null
|
||||||
|
|
||||||
return currency
|
return data.purchase_currency
|
||||||
|
|
||||||
func _resolve_buff_target_currency_id(buff: GeneratorBuffData) -> StringName:
|
func _resolve_buff_target_currency_id(buff: GeneratorBuffData) -> StringName:
|
||||||
if buff == null:
|
if buff == null:
|
||||||
|
|||||||
@@ -24,10 +24,10 @@ shape = SubResource("RectangleShape2D_y5m1q")
|
|||||||
|
|
||||||
[node name="GeneratorPanel" parent="." unique_id=1129190041 node_paths=PackedStringArray("_generator") instance=ExtResource("5_bb14m")]
|
[node name="GeneratorPanel" parent="." unique_id=1129190041 node_paths=PackedStringArray("_generator") instance=ExtResource("5_bb14m")]
|
||||||
visible = false
|
visible = false
|
||||||
offset_left = 64.0
|
offset_left = 33.0
|
||||||
offset_top = -64.0
|
offset_top = -65.0
|
||||||
offset_right = 505.0
|
offset_right = 474.0
|
||||||
offset_bottom = 201.5
|
offset_bottom = 200.5
|
||||||
_generator = NodePath("..")
|
_generator = NodePath("..")
|
||||||
|
|
||||||
[connection signal="mouse_entered" from="Area2D" to="." method="_on_area_2d_mouse_entered"]
|
[connection signal="mouse_entered" from="Area2D" to="." method="_on_area_2d_mouse_entered"]
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://jeoiinukrrsp" path="res://core/generator/currency_generator.tscn" id="1_6pne4"]
|
[ext_resource type="PackedScene" uid="uid://jeoiinukrrsp" path="res://core/generator/currency_generator.tscn" id="1_6pne4"]
|
||||||
[ext_resource type="Resource" uid="uid://bnhqk8b31mm4e" path="res://idles/currencies/knowledge.tres" id="2_8qilt"]
|
[ext_resource type="Resource" uid="uid://bnhqk8b31mm4e" path="res://idles/currencies/knowledge.tres" id="2_8qilt"]
|
||||||
|
[ext_resource type="Resource" uid="uid://l0pn6mlcer7t" path="res://idles/currencies/spirit.tres" id="2_jlqd0"]
|
||||||
[ext_resource type="Resource" uid="uid://04pmc034qupd" path="res://idles/generators/library.tres" id="3_4ly0e"]
|
[ext_resource type="Resource" uid="uid://04pmc034qupd" path="res://idles/generators/library.tres" id="3_4ly0e"]
|
||||||
[ext_resource type="Resource" uid="uid://cythfovqgqlyh" path="res://idles/currencies/wood.tres" id="4_2xpf5"]
|
[ext_resource type="Resource" uid="uid://cythfovqgqlyh" path="res://idles/currencies/wood.tres" id="4_2xpf5"]
|
||||||
[ext_resource type="PackedScene" uid="uid://btkxru2gdjsgc" path="res://currency_tile.tscn" id="4_6ri4a"]
|
[ext_resource type="PackedScene" uid="uid://btkxru2gdjsgc" path="res://currency_tile.tscn" id="4_6ri4a"]
|
||||||
@@ -13,7 +14,7 @@
|
|||||||
[node name="GeneratorGym" type="Node2D" unique_id=1219373683]
|
[node name="GeneratorGym" type="Node2D" unique_id=1219373683]
|
||||||
|
|
||||||
[node name="MagicGenerator" parent="." unique_id=967969064 instance=ExtResource("1_6pne4")]
|
[node name="MagicGenerator" parent="." unique_id=967969064 instance=ExtResource("1_6pne4")]
|
||||||
position = Vector2(249, 301)
|
position = Vector2(262, 301)
|
||||||
|
|
||||||
[node name="KnowledgeGenerator" parent="." unique_id=2139088546 instance=ExtResource("1_6pne4")]
|
[node name="KnowledgeGenerator" parent="." unique_id=2139088546 instance=ExtResource("1_6pne4")]
|
||||||
visible = false
|
visible = false
|
||||||
@@ -24,7 +25,7 @@ press_buys_generator = false
|
|||||||
|
|
||||||
[node name="WoodGenerator" parent="." unique_id=29858558 instance=ExtResource("1_6pne4")]
|
[node name="WoodGenerator" parent="." unique_id=29858558 instance=ExtResource("1_6pne4")]
|
||||||
visible = false
|
visible = false
|
||||||
position = Vector2(969, 304)
|
position = Vector2(1046, 626)
|
||||||
currency = ExtResource("4_2xpf5")
|
currency = ExtResource("4_2xpf5")
|
||||||
data = ExtResource("5_u3cug")
|
data = ExtResource("5_u3cug")
|
||||||
press_buys_generator = false
|
press_buys_generator = false
|
||||||
@@ -41,18 +42,25 @@ offset_right = 160.0
|
|||||||
offset_bottom = 31.0
|
offset_bottom = 31.0
|
||||||
currency = ExtResource("5_dl3gy")
|
currency = ExtResource("5_dl3gy")
|
||||||
|
|
||||||
|
[node name="SpiritCurrencyTile" parent="UI" unique_id=797237056 instance=ExtResource("4_6ri4a")]
|
||||||
|
layout_mode = 0
|
||||||
|
offset_top = 32.0
|
||||||
|
offset_right = 160.0
|
||||||
|
offset_bottom = 63.0
|
||||||
|
currency = ExtResource("2_jlqd0")
|
||||||
|
|
||||||
[node name="KnowledgeCurrencyTile" parent="UI" unique_id=1977342362 instance=ExtResource("4_6ri4a")]
|
[node name="KnowledgeCurrencyTile" parent="UI" unique_id=1977342362 instance=ExtResource("4_6ri4a")]
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
offset_top = 28.0
|
offset_top = 63.0
|
||||||
offset_right = 160.0
|
offset_right = 160.0
|
||||||
offset_bottom = 59.0
|
offset_bottom = 94.0
|
||||||
currency = ExtResource("2_8qilt")
|
currency = ExtResource("2_8qilt")
|
||||||
|
|
||||||
[node name="WoodCurrencyTile" parent="UI" unique_id=1210103101 instance=ExtResource("4_6ri4a")]
|
[node name="WoodCurrencyTile" parent="UI" unique_id=1210103101 instance=ExtResource("4_6ri4a")]
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
offset_top = 59.0
|
offset_top = 94.0
|
||||||
offset_right = 160.0
|
offset_right = 160.0
|
||||||
offset_bottom = 90.0
|
offset_bottom = 125.0
|
||||||
currency = ExtResource("4_2xpf5")
|
currency = ExtResource("4_2xpf5")
|
||||||
|
|
||||||
[node name="GoalsDebugUI" parent="UI" unique_id=4710697 instance=ExtResource("7_7i63j")]
|
[node name="GoalsDebugUI" parent="UI" unique_id=4710697 instance=ExtResource("7_7i63j")]
|
||||||
|
|||||||
@@ -153,7 +153,10 @@ func _refresh_generator_ui() -> void:
|
|||||||
|
|
||||||
_owned_value.text = str(_generator.owned)
|
_owned_value.text = str(_generator.owned)
|
||||||
if can_interact:
|
if can_interact:
|
||||||
var purchase_currency_name: String = GameState.get_currency_name(_generator.get_purchase_currency_id())
|
var purchase_currency_id: StringName = _generator.get_purchase_currency_id()
|
||||||
|
var purchase_currency_name: String = GameState.get_currency_name(purchase_currency_id)
|
||||||
|
if purchase_currency_name.is_empty():
|
||||||
|
purchase_currency_name = "Unconfigured"
|
||||||
_next_cost_value.text = "%s %s" % [_generator.get_next_cost().to_string_suffix(2), purchase_currency_name]
|
_next_cost_value.text = "%s %s" % [_generator.get_next_cost().to_string_suffix(2), purchase_currency_name]
|
||||||
else:
|
else:
|
||||||
_next_cost_value.text = "-"
|
_next_cost_value.text = "-"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
[ext_resource type="Script" uid="uid://es14nqk6vrrk" path="res://generator_container.gd" id="1_8wouw"]
|
[ext_resource type="Script" uid="uid://es14nqk6vrrk" path="res://generator_container.gd" id="1_8wouw"]
|
||||||
|
|
||||||
[node name="GeneratorContainer" type="MarginContainer" unique_id=1253142977]
|
[node name="GeneratorContainer" type="PanelContainer" unique_id=1451609580]
|
||||||
anchors_preset = 8
|
anchors_preset = 8
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
anchor_top = 0.5
|
anchor_top = 0.5
|
||||||
@@ -14,11 +14,14 @@ offset_right = 132.0
|
|||||||
offset_bottom = 87.5
|
offset_bottom = 87.5
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
theme_override_constants/margin_left = 20
|
|
||||||
script = ExtResource("1_8wouw")
|
script = ExtResource("1_8wouw")
|
||||||
|
|
||||||
[node name="PanelContainer" type="PanelContainer" parent="." unique_id=1868446780]
|
[node name="PanelContainer" type="MarginContainer" parent="." unique_id=370221865]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
theme_override_constants/margin_left = 20
|
||||||
|
theme_override_constants/margin_top = 20
|
||||||
|
theme_override_constants/margin_right = 20
|
||||||
|
theme_override_constants/margin_bottom = 20
|
||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer" unique_id=1139263929]
|
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer" unique_id=1139263929]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
@@ -78,7 +81,5 @@ text = "Buffs"
|
|||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_override_constants/separation = 4
|
theme_override_constants/separation = 4
|
||||||
|
|
||||||
[connection signal="mouse_entered" from="." to="." method="_on_mouse_entered"]
|
|
||||||
[connection signal="mouse_exited" from="." to="." method="_on_mouse_exited"]
|
|
||||||
[connection signal="pressed" from="PanelContainer/VBoxContainer/HBoxContainerGenerators/BuyOneButton" to="." method="_on_buy_pressed"]
|
[connection signal="pressed" from="PanelContainer/VBoxContainer/HBoxContainerGenerators/BuyOneButton" to="." method="_on_buy_pressed"]
|
||||||
[connection signal="pressed" from="PanelContainer/VBoxContainer/HBoxContainerGenerators/BuyMaxButton" to="." method="_on_buy_max_pressed"]
|
[connection signal="pressed" from="PanelContainer/VBoxContainer/HBoxContainerGenerators/BuyMaxButton" to="." method="_on_buy_max_pressed"]
|
||||||
|
|||||||
20
idles/buffs/orb_summon_spirit.tres
Normal file
20
idles/buffs/orb_summon_spirit.tres
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
[gd_resource type="Resource" script_class="GeneratorBuffData" format=3 uid="uid://coi7k1cx4p4hr"]
|
||||||
|
|
||||||
|
[ext_resource type="Resource" uid="uid://brqaojindcxa5" path="res://idles/currencies/magic.tres" id="1_aawxd"]
|
||||||
|
[ext_resource type="Resource" uid="uid://l0pn6mlcer7t" path="res://idles/currencies/spirit.tres" id="2_0eqxt"]
|
||||||
|
[ext_resource type="Script" uid="uid://dnhocfsuvmeyb" path="res://core/generator/generator_buff_data.gd" id="3_0ov1n"]
|
||||||
|
[ext_resource type="Resource" uid="uid://qyxct5gbrxwa" path="res://idles/goals/magic_total_30.tres" id="4_ifsqd"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("3_0ov1n")
|
||||||
|
id = &"summon_spirit"
|
||||||
|
kind = 2
|
||||||
|
text = "Summon Spirit"
|
||||||
|
unlock_goal = ExtResource("4_ifsqd")
|
||||||
|
effect_increment = 1.0
|
||||||
|
cost_currency = ExtResource("1_aawxd")
|
||||||
|
base_cost_mantissa = 200.0
|
||||||
|
cost_multiplier = 1.15
|
||||||
|
resource_target_currency = ExtResource("2_0eqxt")
|
||||||
|
resource_purchase_base_mantissa = 1.0
|
||||||
|
resource_purchase_increment_multiplier = 1.0
|
||||||
9
idles/currencies/spirit.tres
Normal file
9
idles/currencies/spirit.tres
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
[gd_resource type="Resource" script_class="Currency" format=3 uid="uid://l0pn6mlcer7t"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://dtgqjf3bl7pm8" path="res://core/currency/currency.gd" id="1_m14p5"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_m14p5")
|
||||||
|
id = &"spirit"
|
||||||
|
display_name = "Spirit"
|
||||||
|
metadata/_custom_type_script = "uid://dtgqjf3bl7pm8"
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
[ext_resource type="Script" uid="uid://dnhocfsuvmeyb" path="res://core/generator/generator_buff_data.gd" id="1_ffn26"]
|
[ext_resource type="Script" uid="uid://dnhocfsuvmeyb" path="res://core/generator/generator_buff_data.gd" id="1_ffn26"]
|
||||||
[ext_resource type="Resource" uid="uid://mvgfe3nc7uwa" path="res://idles/buffs/bigger_forest.tres" id="2_rptf4"]
|
[ext_resource type="Resource" uid="uid://mvgfe3nc7uwa" path="res://idles/buffs/bigger_forest.tres" id="2_rptf4"]
|
||||||
[ext_resource type="Resource" uid="uid://brqaojindcxa5" path="res://idles/currencies/magic.tres" id="4_rpydf"]
|
[ext_resource type="Resource" uid="uid://l0pn6mlcer7t" path="res://idles/currencies/spirit.tres" id="3_rptf4"]
|
||||||
[ext_resource type="Script" uid="uid://b00tqsuhxdy0d" path="res://core/generator/currency_generator_data.gd" id="5_43n1y"]
|
[ext_resource type="Script" uid="uid://b00tqsuhxdy0d" path="res://core/generator/currency_generator_data.gd" id="5_43n1y"]
|
||||||
[ext_resource type="Resource" uid="uid://bmlhoeasl7xor" path="res://idles/goals/magic_total_13k.tres" id="6_ffn26"]
|
[ext_resource type="Resource" uid="uid://bmlhoeasl7xor" path="res://idles/goals/magic_total_13k.tres" id="6_ffn26"]
|
||||||
|
|
||||||
@@ -13,9 +13,10 @@ name = "Forestry"
|
|||||||
starts_unlocked = false
|
starts_unlocked = false
|
||||||
starts_available = false
|
starts_available = false
|
||||||
initial_owned = 1
|
initial_owned = 1
|
||||||
purchase_currency = ExtResource("4_rpydf")
|
purchase_currency = ExtResource("3_rptf4")
|
||||||
unlock_goal = ExtResource("6_ffn26")
|
unlock_goal = ExtResource("6_ffn26")
|
||||||
initial_cost = 200.0
|
unlock_goal_behavior = 1
|
||||||
|
initial_cost = 1.0
|
||||||
initial_productivity = 20.0
|
initial_productivity = 20.0
|
||||||
buffs = Array[ExtResource("1_ffn26")]([ExtResource("2_rptf4")])
|
buffs = Array[ExtResource("1_ffn26")]([ExtResource("2_rptf4")])
|
||||||
metadata/_custom_type_script = "uid://b00tqsuhxdy0d"
|
metadata/_custom_type_script = "uid://b00tqsuhxdy0d"
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
[gd_resource type="Resource" script_class="CurrencyGeneratorData" format=3 uid="uid://04pmc034qupd"]
|
[gd_resource type="Resource" script_class="CurrencyGeneratorData" format=3 uid="uid://04pmc034qupd"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://dnhocfsuvmeyb" path="res://core/generator/generator_buff_data.gd" id="1_jemvk"]
|
[ext_resource type="Script" uid="uid://dnhocfsuvmeyb" path="res://core/generator/generator_buff_data.gd" id="1_jemvk"]
|
||||||
[ext_resource type="Resource" uid="uid://brqaojindcxa5" path="res://idles/currencies/magic.tres" id="2_b1n9q"]
|
|
||||||
[ext_resource type="Resource" uid="uid://tu63jy51yigb" path="res://idles/buffs/library_auto_flux.tres" id="2_fcbji"]
|
[ext_resource type="Resource" uid="uid://tu63jy51yigb" path="res://idles/buffs/library_auto_flux.tres" id="2_fcbji"]
|
||||||
|
[ext_resource type="Resource" uid="uid://l0pn6mlcer7t" path="res://idles/currencies/spirit.tres" id="3_fcbji"]
|
||||||
[ext_resource type="Script" uid="uid://b00tqsuhxdy0d" path="res://core/generator/currency_generator_data.gd" id="3_xj12v"]
|
[ext_resource type="Script" uid="uid://b00tqsuhxdy0d" path="res://core/generator/currency_generator_data.gd" id="3_xj12v"]
|
||||||
[ext_resource type="Resource" uid="uid://c4mkxj4ubhsi0" path="res://idles/goals/magic_total_1300.tres" id="4_1h03m"]
|
[ext_resource type="Resource" uid="uid://c4mkxj4ubhsi0" path="res://idles/goals/magic_total_1300.tres" id="4_1h03m"]
|
||||||
|
|
||||||
@@ -13,10 +13,11 @@ name = "Library"
|
|||||||
starts_unlocked = false
|
starts_unlocked = false
|
||||||
starts_available = false
|
starts_available = false
|
||||||
initial_owned = 1
|
initial_owned = 1
|
||||||
purchase_currency = ExtResource("2_b1n9q")
|
purchase_currency = ExtResource("3_fcbji")
|
||||||
unlock_goal = ExtResource("4_1h03m")
|
unlock_goal = ExtResource("4_1h03m")
|
||||||
unlock_goal_behavior = 1
|
unlock_goal_behavior = 1
|
||||||
initial_cost = 60.0
|
initial_cost = 1.0
|
||||||
|
coefficient = 1.0
|
||||||
initial_time = 3.0
|
initial_time = 3.0
|
||||||
initial_revenue = 60.0
|
initial_revenue = 60.0
|
||||||
initial_productivity = 20.0
|
initial_productivity = 20.0
|
||||||
|
|||||||
@@ -4,14 +4,16 @@
|
|||||||
[ext_resource type="Script" uid="uid://dnhocfsuvmeyb" path="res://core/generator/generator_buff_data.gd" id="1_t6lg0"]
|
[ext_resource type="Script" uid="uid://dnhocfsuvmeyb" path="res://core/generator/generator_buff_data.gd" id="1_t6lg0"]
|
||||||
[ext_resource type="Resource" uid="uid://ceugcxmassmpk" path="res://idles/buffs/orb_auto_flux.tres" id="2_x505b"]
|
[ext_resource type="Resource" uid="uid://ceugcxmassmpk" path="res://idles/buffs/orb_auto_flux.tres" id="2_x505b"]
|
||||||
[ext_resource type="Resource" uid="uid://6i3fcygusuqf" path="res://idles/buffs/orb_click_focus.tres" id="3_fsxdm"]
|
[ext_resource type="Resource" uid="uid://6i3fcygusuqf" path="res://idles/buffs/orb_click_focus.tres" id="3_fsxdm"]
|
||||||
[ext_resource type="Resource" uid="uid://brqaojindcxa5" path="res://idles/currencies/magic.tres" id="4_jpwus"]
|
[ext_resource type="Resource" uid="uid://coi7k1cx4p4hr" path="res://idles/buffs/orb_summon_spirit.tres" id="4_5v0af"]
|
||||||
|
[ext_resource type="Resource" uid="uid://l0pn6mlcer7t" path="res://idles/currencies/spirit.tres" id="4_jpwus"]
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_c6y77")
|
script = ExtResource("1_c6y77")
|
||||||
id = &"Magic"
|
id = &"Magic"
|
||||||
name = "Magic Orb"
|
name = "Magic Orb"
|
||||||
purchase_currency = ExtResource("4_jpwus")
|
purchase_currency = ExtResource("4_jpwus")
|
||||||
initial_cost = 200.0
|
initial_cost = 1.0
|
||||||
|
coefficient = 1.0
|
||||||
initial_productivity = 20.0
|
initial_productivity = 20.0
|
||||||
buffs = Array[ExtResource("1_t6lg0")]([ExtResource("2_x505b"), ExtResource("3_fsxdm")])
|
buffs = Array[ExtResource("1_t6lg0")]([ExtResource("2_x505b"), ExtResource("3_fsxdm"), ExtResource("4_5v0af")])
|
||||||
metadata/_custom_type_script = "uid://b00tqsuhxdy0d"
|
metadata/_custom_type_script = "uid://b00tqsuhxdy0d"
|
||||||
|
|||||||
18
idles/generators/spirit_factory.tres
Normal file
18
idles/generators/spirit_factory.tres
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
[gd_resource type="Resource" script_class="CurrencyGeneratorData" format=3 uid="uid://ri1ggb756753"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://dnhocfsuvmeyb" path="res://core/generator/generator_buff_data.gd" id="1_tgm58"]
|
||||||
|
[ext_resource type="Script" uid="uid://b00tqsuhxdy0d" path="res://core/generator/currency_generator_data.gd" id="2_1qpvc"]
|
||||||
|
[ext_resource type="Resource" uid="uid://brqaojindcxa5" path="res://idles/currencies/magic.tres" id="2_chq14"]
|
||||||
|
[ext_resource type="Resource" uid="uid://qyxct5gbrxwa" path="res://idles/goals/magic_total_30.tres" id="4_tj1lt"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("2_1qpvc")
|
||||||
|
id = &"spirit_factory"
|
||||||
|
name = "Spirit Factory"
|
||||||
|
starts_unlocked = false
|
||||||
|
starts_available = false
|
||||||
|
purchase_currency = ExtResource("2_chq14")
|
||||||
|
unlock_goal = ExtResource("4_tj1lt")
|
||||||
|
unlock_goal_behavior = 1
|
||||||
|
initial_cost = 200.0
|
||||||
|
metadata/_custom_type_script = "uid://b00tqsuhxdy0d"
|
||||||
Reference in New Issue
Block a user