Decouple everything from globals
This commit is contained in:
18
docs/gyms/tiny_sword/buffs/farm_auto_flux_buff.tres
Normal file
18
docs/gyms/tiny_sword/buffs/farm_auto_flux_buff.tres
Normal file
@@ -0,0 +1,18 @@
|
||||
[gd_resource type="Resource" script_class="GeneratorBuffData" format=3 uid="uid://cg7os1rfknw05"]
|
||||
|
||||
[ext_resource type="Resource" uid="uid://bxg2au0ijp242" path="res://docs/gyms/tiny_sword/currencies/food.tres" id="1_qy8mo"]
|
||||
[ext_resource type="Resource" uid="uid://w4u1hddplb4e" path="res://docs/gyms/tiny_sword/currencies/gold.tres" id="2_pac24"]
|
||||
[ext_resource type="Script" uid="uid://dnhocfsuvmeyb" path="res://core/generator/generator_buff_data.gd" id="3_t5xb7"]
|
||||
[ext_resource type="Resource" uid="uid://bo463s6jt0ep7" path="res://docs/gyms/tiny_sword/goals/gold_total_13k_goal.tres" id="4_r8eth"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("3_t5xb7")
|
||||
id = &"farm_auto_flux"
|
||||
text = "Farm Dynamo"
|
||||
max_level = 10
|
||||
unlock_goal = ExtResource("4_r8eth")
|
||||
effect_increment = 1.0
|
||||
cost_currency = ExtResource("1_qy8mo")
|
||||
base_cost_mantissa = 100.0
|
||||
cost_multiplier = 1.7
|
||||
resource_target_currency = ExtResource("2_pac24")
|
||||
19
docs/gyms/tiny_sword/buffs/forestry_auto_flux_buff.tres
Normal file
19
docs/gyms/tiny_sword/buffs/forestry_auto_flux_buff.tres
Normal file
@@ -0,0 +1,19 @@
|
||||
[gd_resource type="Resource" script_class="GeneratorBuffData" format=3 uid="uid://kamgujbqqhg3"]
|
||||
|
||||
[ext_resource type="Resource" uid="uid://bxg2au0ijp242" path="res://docs/gyms/tiny_sword/currencies/food.tres" id="1_pdm0x"]
|
||||
[ext_resource type="Resource" uid="uid://w4u1hddplb4e" path="res://docs/gyms/tiny_sword/currencies/gold.tres" id="2_rnlmu"]
|
||||
[ext_resource type="Script" uid="uid://dnhocfsuvmeyb" path="res://core/generator/generator_buff_data.gd" id="3_y6252"]
|
||||
[ext_resource type="Resource" uid="uid://bo463s6jt0ep7" path="res://docs/gyms/tiny_sword/goals/gold_total_13k_goal.tres" id="4_y6252"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("3_y6252")
|
||||
id = &"forestry_auto_flux"
|
||||
text = "Forest Dynamo
|
||||
"
|
||||
max_level = 10
|
||||
unlock_goal = ExtResource("4_y6252")
|
||||
effect_increment = 1.0
|
||||
cost_currency = ExtResource("1_pdm0x")
|
||||
base_cost_mantissa = 250.0
|
||||
cost_multiplier = 1.7
|
||||
resource_target_currency = ExtResource("2_rnlmu")
|
||||
19
docs/gyms/tiny_sword/buffs/gold_auto_flux_buff.tres
Normal file
19
docs/gyms/tiny_sword/buffs/gold_auto_flux_buff.tres
Normal file
@@ -0,0 +1,19 @@
|
||||
[gd_resource type="Resource" script_class="GeneratorBuffData" format=3 uid="uid://c3op2mqy02sow"]
|
||||
|
||||
[ext_resource type="Resource" uid="uid://bxg2au0ijp242" path="res://docs/gyms/tiny_sword/currencies/food.tres" id="1_j3saa"]
|
||||
[ext_resource type="Resource" uid="uid://w4u1hddplb4e" path="res://docs/gyms/tiny_sword/currencies/gold.tres" id="2_hvfo8"]
|
||||
[ext_resource type="Script" uid="uid://dnhocfsuvmeyb" path="res://core/generator/generator_buff_data.gd" id="3_bwcdh"]
|
||||
[ext_resource type="Resource" uid="uid://ik7t0r3su633" path="res://docs/gyms/tiny_sword/goals/gold_total_30_goal.tres" id="4_f52il"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("3_bwcdh")
|
||||
id = &"gold_auto_flux"
|
||||
target_ids = Array[StringName]([&"goldmine"])
|
||||
text = "Gold Dynamo"
|
||||
max_level = 10
|
||||
unlock_goal = ExtResource("4_f52il")
|
||||
effect_increment = 1.0
|
||||
cost_currency = ExtResource("1_j3saa")
|
||||
base_cost_mantissa = 25.0
|
||||
cost_multiplier = 1.7
|
||||
resource_target_currency = ExtResource("2_hvfo8")
|
||||
20
docs/gyms/tiny_sword/buffs/gold_click_buff.tres
Normal file
20
docs/gyms/tiny_sword/buffs/gold_click_buff.tres
Normal file
@@ -0,0 +1,20 @@
|
||||
[gd_resource type="Resource" script_class="GeneratorBuffData" format=3 uid="uid://dlq2ke6i2pfob"]
|
||||
|
||||
[ext_resource type="Resource" uid="uid://w4u1hddplb4e" path="res://docs/gyms/tiny_sword/currencies/gold.tres" id="1_8h747"]
|
||||
[ext_resource type="Script" uid="uid://dnhocfsuvmeyb" path="res://core/generator/generator_buff_data.gd" id="2_aejsu"]
|
||||
[ext_resource type="Resource" uid="uid://ik7t0r3su633" path="res://docs/gyms/tiny_sword/goals/gold_total_30_goal.tres" id="3_aejsu"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_aejsu")
|
||||
id = &"gold_click_focus"
|
||||
target_ids = Array[StringName]([&"goldmine"])
|
||||
kind = 1
|
||||
text = "Gold Clicker!"
|
||||
max_level = 4
|
||||
unlock_goal = ExtResource("3_aejsu")
|
||||
effect_increment = 1.0
|
||||
cost_currency = ExtResource("1_8h747")
|
||||
base_cost_mantissa = 2.5
|
||||
base_cost_exponent = 1
|
||||
cost_multiplier = 2.0
|
||||
resource_target_currency = ExtResource("1_8h747")
|
||||
21
docs/gyms/tiny_sword/buffs/spawn_worker_buff.tres
Normal file
21
docs/gyms/tiny_sword/buffs/spawn_worker_buff.tres
Normal file
@@ -0,0 +1,21 @@
|
||||
[gd_resource type="Resource" script_class="GeneratorBuffData" format=3 uid="uid://bjc6qmvr7pe12"]
|
||||
|
||||
[ext_resource type="Resource" uid="uid://w4u1hddplb4e" path="res://docs/gyms/tiny_sword/currencies/gold.tres" id="1_we7j4"]
|
||||
[ext_resource type="Resource" uid="uid://dfxk30o34qe2s" path="res://docs/gyms/tiny_sword/currencies/worker.tres" id="2_s45cj"]
|
||||
[ext_resource type="Script" uid="uid://dnhocfsuvmeyb" path="res://core/generator/generator_buff_data.gd" id="3_tgtcn"]
|
||||
[ext_resource type="Resource" uid="uid://ik7t0r3su633" path="res://docs/gyms/tiny_sword/goals/gold_total_30_goal.tres" id="4_kqmci"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("3_tgtcn")
|
||||
id = &"summon_worker"
|
||||
kind = 2
|
||||
text = "Summon Worker
|
||||
"
|
||||
unlock_goal = ExtResource("4_kqmci")
|
||||
effect_increment = 1.0
|
||||
cost_currency = ExtResource("1_we7j4")
|
||||
base_cost_mantissa = 200.0
|
||||
cost_multiplier = 1.15
|
||||
resource_target_currency = ExtResource("2_s45cj")
|
||||
resource_purchase_base_mantissa = 1.0
|
||||
resource_purchase_increment_multiplier = 1.0
|
||||
14
docs/gyms/tiny_sword/buffs/ts_buff_catalogue.tres
Normal file
14
docs/gyms/tiny_sword/buffs/ts_buff_catalogue.tres
Normal file
@@ -0,0 +1,14 @@
|
||||
[gd_resource type="Resource" script_class="BuffCatalogue" format=3 uid="uid://bgmj3lep0wmtf"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dnhocfsuvmeyb" path="res://core/generator/generator_buff_data.gd" id="1_up80l"]
|
||||
[ext_resource type="Resource" uid="uid://dlq2ke6i2pfob" path="res://docs/gyms/tiny_sword/buffs/gold_click_buff.tres" id="2_dtvfl"]
|
||||
[ext_resource type="Script" uid="uid://ctc5yjlnvi0ok" path="res://core/buff_catalogue.gd" id="2_iuxc1"]
|
||||
[ext_resource type="Resource" uid="uid://c3op2mqy02sow" path="res://docs/gyms/tiny_sword/buffs/gold_auto_flux_buff.tres" id="3_0bb41"]
|
||||
[ext_resource type="Resource" uid="uid://bjc6qmvr7pe12" path="res://docs/gyms/tiny_sword/buffs/spawn_worker_buff.tres" id="4_hnq3m"]
|
||||
[ext_resource type="Resource" uid="uid://cg7os1rfknw05" path="res://docs/gyms/tiny_sword/buffs/farm_auto_flux_buff.tres" id="5_mii30"]
|
||||
[ext_resource type="Resource" uid="uid://kamgujbqqhg3" path="res://docs/gyms/tiny_sword/buffs/forestry_auto_flux_buff.tres" id="6_k5yi4"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_iuxc1")
|
||||
buffs = Array[ExtResource("1_up80l")]([ExtResource("2_dtvfl"), ExtResource("3_0bb41"), ExtResource("4_hnq3m"), ExtResource("5_mii30"), ExtResource("6_k5yi4")])
|
||||
metadata/_custom_type_script = "uid://ctc5yjlnvi0ok"
|
||||
@@ -4,7 +4,7 @@
|
||||
[ext_resource type="Texture2D" uid="uid://cry4arn00kgrt" path="res://docs/gyms/tiny_sword/buildings/castle/Castle.png" id="1_tgvch"]
|
||||
[ext_resource type="PackedScene" uid="uid://dlidx2x0otpjg" path="res://core/prestige/prestige_panel.tscn" id="3_l7gct"]
|
||||
[ext_resource type="Script" uid="uid://cpfmctd4xsfho" path="res://docs/gyms/tiny_sword/buildings/castle/test_buff.gd" id="4_l7gct"]
|
||||
[ext_resource type="Resource" uid="uid://bjc6qmvr7pe12" path="res://docs/gyms/buffs/spawn_worker.tres" id="5_s3a5k"]
|
||||
[ext_resource type="Resource" uid="uid://bjc6qmvr7pe12" path="res://docs/gyms/tiny_sword/buffs/spawn_worker_buff.tres" id="5_s3a5k"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_tgvch"]
|
||||
size = Vector2(312, 198)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
extends PanelContainer
|
||||
|
||||
@export var buff_data: GeneratorBuffData
|
||||
@export var game_state: LevelGameState
|
||||
|
||||
@onready var _label: Label = $HBoxContainer/Label
|
||||
@onready var _button: Button = $HBoxContainer/Button
|
||||
@@ -19,9 +20,10 @@ func _ready() -> void:
|
||||
_button.disabled = true
|
||||
|
||||
_button.pressed.connect(_on_button_pressed)
|
||||
GameState.buff_level_changed.connect(_on_buff_level_changed)
|
||||
GameState.buff_unlocked_changed.connect(_on_buff_unlocked_changed)
|
||||
GameState.currency_changed.connect(_on_currency_changed)
|
||||
if game_state:
|
||||
game_state.buff_level_changed.connect(_on_buff_level_changed)
|
||||
game_state.buff_unlocked_changed.connect(_on_buff_unlocked_changed)
|
||||
game_state.currency_changed.connect(_on_currency_changed)
|
||||
_update_ui()
|
||||
|
||||
|
||||
@@ -35,9 +37,9 @@ func _on_button_pressed() -> void:
|
||||
return
|
||||
|
||||
var cost: BigNumber = buff_data.get_cost_for_level(_current_level)
|
||||
if GameState.spend_currency_by_id(cost_currency_id, cost):
|
||||
if game_state and game_state.spend_currency_by_id(cost_currency_id, cost):
|
||||
var next_level: int = _current_level + 1
|
||||
GameState.set_buff_level(buff_data.id, next_level)
|
||||
game_state.set_buff_level(buff_data.id, next_level)
|
||||
_apply_buff_effect(buff_data, next_level)
|
||||
_current_level = next_level
|
||||
_update_ui()
|
||||
@@ -54,15 +56,17 @@ func _apply_buff_effect(buff: GeneratorBuffData, level: int) -> void:
|
||||
return
|
||||
|
||||
var purchased_amount: BigNumber = buff.get_resource_purchase_amount_for_level(level)
|
||||
if purchased_amount.mantissa > 0.0:
|
||||
GameState.add_currency_by_id(target_currency_id, purchased_amount)
|
||||
if purchased_amount.mantissa > 0.0 and game_state:
|
||||
game_state.add_currency_by_id(target_currency_id, purchased_amount)
|
||||
|
||||
|
||||
func _resolve_buff_target_currency_id(buff: GeneratorBuffData) -> StringName:
|
||||
if buff.resource_target_currency == null:
|
||||
return &""
|
||||
|
||||
return CurrencyDatabase.get_currency_id(buff.resource_target_currency)
|
||||
if game_state == null:
|
||||
return &""
|
||||
return game_state.get_currency_id(buff.resource_target_currency)
|
||||
|
||||
|
||||
func _on_buff_level_changed(buff_id: StringName, new_level: int) -> void:
|
||||
@@ -82,7 +86,7 @@ func _update_ui() -> void:
|
||||
if buff_data == null:
|
||||
return
|
||||
|
||||
if not GameState.is_buff_unlocked(buff_data.id):
|
||||
if game_state and not game_state.is_buff_unlocked(buff_data.id):
|
||||
_button.disabled = true
|
||||
_button.text = "Locked"
|
||||
return
|
||||
@@ -93,7 +97,7 @@ func _update_ui() -> void:
|
||||
var cost_currency_id: StringName = _resolve_buff_cost_currency_id(buff_data)
|
||||
if cost_currency_id != &"":
|
||||
var cost: BigNumber = buff_data.get_cost_for_level(_current_level)
|
||||
var current_amount: BigNumber = GameState.get_currency_amount_by_id(cost_currency_id)
|
||||
var current_amount: BigNumber = game_state.get_currency_amount_by_id(cost_currency_id) if game_state else BigNumber.from_float(0.0)
|
||||
can_buy = can_buy and (current_amount.is_greater_than(cost) or current_amount.is_equal_to(cost))
|
||||
|
||||
_button.disabled = not can_buy
|
||||
@@ -109,4 +113,6 @@ func _resolve_buff_cost_currency_id(buff: GeneratorBuffData) -> StringName:
|
||||
if buff.cost_currency == null:
|
||||
return &""
|
||||
|
||||
return CurrencyDatabase.get_currency_id(buff.cost_currency)
|
||||
if game_state == null:
|
||||
return &""
|
||||
return game_state.get_currency_id(buff.cost_currency)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
[gd_scene format=3 uid="uid://djedqovgngrx5"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://jeoiinukrrsp" path="res://core/generator/currency_generator.tscn" id="1_rvsna"]
|
||||
[ext_resource type="Resource" uid="uid://bxg2au0ijp242" path="res://docs/gyms/currencies/food.tres" id="2_djlc5"]
|
||||
[ext_resource type="Resource" uid="uid://d08h51y0pnsnf" path="res://docs/gyms/generators/farm.tres" id="3_82rmq"]
|
||||
[ext_resource type="Resource" uid="uid://bxg2au0ijp242" path="res://docs/gyms/tiny_sword/currencies/food.tres" id="2_djlc5"]
|
||||
[ext_resource type="Resource" uid="uid://d08h51y0pnsnf" path="res://docs/gyms/tiny_sword/buildings/farm/farm_generator.tres" id="3_82rmq"]
|
||||
[ext_resource type="Texture2D" uid="uid://dfdh8r03sj7qv" path="res://docs/gyms/tiny_sword/buildings/farm/House1.png" id="4_djlc5"]
|
||||
[ext_resource type="PackedScene" uid="uid://ckos7f22pnmyh" path="res://core/generator/generator_container.tscn" id="5_82rmq"]
|
||||
|
||||
|
||||
25
docs/gyms/tiny_sword/buildings/farm/farm_generator.tres
Normal file
25
docs/gyms/tiny_sword/buildings/farm/farm_generator.tres
Normal file
@@ -0,0 +1,25 @@
|
||||
[gd_resource type="Resource" script_class="CurrencyGeneratorData" format=3 uid="uid://d08h51y0pnsnf"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dnhocfsuvmeyb" path="res://core/generator/generator_buff_data.gd" id="1_cl7uf"]
|
||||
[ext_resource type="Resource" uid="uid://cg7os1rfknw05" path="res://docs/gyms/tiny_sword/buffs/farm_auto_flux_buff.tres" id="2_bbypn"]
|
||||
[ext_resource type="Resource" uid="uid://dfxk30o34qe2s" path="res://docs/gyms/tiny_sword/currencies/worker.tres" id="3_bbypn"]
|
||||
[ext_resource type="Script" uid="uid://b00tqsuhxdy0d" path="res://core/generator/currency_generator_data.gd" id="4_0kvfm"]
|
||||
[ext_resource type="Resource" uid="uid://cts0407h130d6" path="res://docs/gyms/tiny_sword/goals/gold_total_1300_goal.tres" id="5_qiy1b"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("4_0kvfm")
|
||||
id = &"farm"
|
||||
name = "Farm"
|
||||
starts_unlocked = false
|
||||
starts_available = false
|
||||
initial_owned = 1
|
||||
purchase_currency = ExtResource("3_bbypn")
|
||||
unlock_goal = ExtResource("5_qiy1b")
|
||||
unlock_goal_behavior = 1
|
||||
initial_cost = 1.0
|
||||
coefficient = 1.0
|
||||
initial_time = 3.0
|
||||
initial_revenue = 60.0
|
||||
initial_productivity = 20.0
|
||||
buffs = Array[ExtResource("1_cl7uf")]([ExtResource("2_bbypn")])
|
||||
metadata/_custom_type_script = "uid://b00tqsuhxdy0d"
|
||||
@@ -1,8 +1,8 @@
|
||||
[gd_scene format=3 uid="uid://cf01wvy3f17i"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://jeoiinukrrsp" path="res://core/generator/currency_generator.tscn" id="1_7j1xc"]
|
||||
[ext_resource type="Resource" uid="uid://bgsk8h4w80h45" path="res://docs/gyms/currencies/wood.tres" id="2_23x2t"]
|
||||
[ext_resource type="Resource" uid="uid://v6hjoa2vky5k" path="res://docs/gyms/generators/forestry.tres" id="3_pby1g"]
|
||||
[ext_resource type="Resource" uid="uid://bgsk8h4w80h45" path="res://docs/gyms/tiny_sword/currencies/wood.tres" id="2_23x2t"]
|
||||
[ext_resource type="Resource" uid="uid://v6hjoa2vky5k" path="res://docs/gyms/tiny_sword/buildings/forestry/forestry_generator.tres" id="3_pby1g"]
|
||||
[ext_resource type="Texture2D" uid="uid://doxauaa3vn3lm" path="res://docs/gyms/tiny_sword/buildings/forestry/House3.png" id="4_5yp33"]
|
||||
[ext_resource type="PackedScene" uid="uid://ckos7f22pnmyh" path="res://core/generator/generator_container.tscn" id="5_rh3m6"]
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
[gd_resource type="Resource" script_class="CurrencyGeneratorData" format=3 uid="uid://v6hjoa2vky5k"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dnhocfsuvmeyb" path="res://core/generator/generator_buff_data.gd" id="1_mgk3v"]
|
||||
[ext_resource type="Resource" uid="uid://dfxk30o34qe2s" path="res://docs/gyms/tiny_sword/currencies/worker.tres" id="2_fs80u"]
|
||||
[ext_resource type="Resource" uid="uid://kamgujbqqhg3" path="res://docs/gyms/tiny_sword/buffs/forestry_auto_flux_buff.tres" id="2_mgk3v"]
|
||||
[ext_resource type="Resource" uid="uid://bo463s6jt0ep7" path="res://docs/gyms/tiny_sword/goals/gold_total_13k_goal.tres" id="4_mgk3v"]
|
||||
[ext_resource type="Script" uid="uid://b00tqsuhxdy0d" path="res://core/generator/currency_generator_data.gd" id="4_rij12"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("4_rij12")
|
||||
id = &"forestry"
|
||||
name = "Forestry"
|
||||
starts_unlocked = false
|
||||
starts_available = false
|
||||
initial_owned = 1
|
||||
purchase_currency = ExtResource("2_fs80u")
|
||||
unlock_goal = ExtResource("4_mgk3v")
|
||||
unlock_goal_behavior = 1
|
||||
initial_cost = 1.0
|
||||
coefficient = 1.0
|
||||
initial_productivity = 20.0
|
||||
buffs = Array[ExtResource("1_mgk3v")]([ExtResource("2_mgk3v")])
|
||||
metadata/_custom_type_script = "uid://b00tqsuhxdy0d"
|
||||
@@ -1,10 +1,10 @@
|
||||
[gd_scene format=3 uid="uid://brgkkw2n3o1ox"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://jeoiinukrrsp" path="res://core/generator/currency_generator.tscn" id="1_dgq4l"]
|
||||
[ext_resource type="Resource" uid="uid://w4u1hddplb4e" path="res://docs/gyms/currencies/gold.tres" id="2_d2x03"]
|
||||
[ext_resource type="Resource" uid="uid://w4u1hddplb4e" path="res://docs/gyms/tiny_sword/currencies/gold.tres" id="2_d2x03"]
|
||||
[ext_resource type="PackedScene" uid="uid://ckos7f22pnmyh" path="res://core/generator/generator_container.tscn" id="2_lnbxc"]
|
||||
[ext_resource type="Texture2D" uid="uid://bqf6yhtsnmjad" path="res://docs/gyms/tiny_sword/buildings/gold_mine/Gold Stone 6.png" id="2_n0fgx"]
|
||||
[ext_resource type="Resource" uid="uid://dliilvvjvksk1" path="res://docs/gyms/generators/gold_mine.tres" id="2_sbi6i"]
|
||||
[ext_resource type="Resource" uid="uid://dliilvvjvksk1" path="res://docs/gyms/tiny_sword/buildings/gold_mine/gold_mine_generator.tres" id="2_sbi6i"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_sbi6i"]
|
||||
size = Vector2(82, 84)
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
[gd_resource type="Resource" script_class="CurrencyGeneratorData" format=3 uid="uid://dliilvvjvksk1"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dnhocfsuvmeyb" path="res://core/generator/generator_buff_data.gd" id="1_1ni3y"]
|
||||
[ext_resource type="Resource" uid="uid://dlq2ke6i2pfob" path="res://docs/gyms/tiny_sword/buffs/gold_click_buff.tres" id="2_cnabh"]
|
||||
[ext_resource type="Resource" uid="uid://dfxk30o34qe2s" path="res://docs/gyms/tiny_sword/currencies/worker.tres" id="2_j1lw5"]
|
||||
[ext_resource type="Resource" uid="uid://c3op2mqy02sow" path="res://docs/gyms/tiny_sword/buffs/gold_auto_flux_buff.tres" id="3_baaj7"]
|
||||
[ext_resource type="Script" uid="uid://b00tqsuhxdy0d" path="res://core/generator/currency_generator_data.gd" id="3_cnabh"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("3_cnabh")
|
||||
id = &"goldmine"
|
||||
name = "Gold Mine"
|
||||
purchase_currency = ExtResource("2_j1lw5")
|
||||
initial_cost = 1.0
|
||||
coefficient = 1.0
|
||||
initial_productivity = 20.0
|
||||
buffs = Array[ExtResource("1_1ni3y")]([ExtResource("2_cnabh"), ExtResource("3_baaj7")])
|
||||
metadata/_custom_type_script = "uid://b00tqsuhxdy0d"
|
||||
10
docs/gyms/tiny_sword/currencies/food.tres
Normal file
10
docs/gyms/tiny_sword/currencies/food.tres
Normal file
@@ -0,0 +1,10 @@
|
||||
[gd_resource type="Resource" script_class="Currency" format=3 uid="uid://bxg2au0ijp242"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://dkt4s1eyw8puy" path="res://sandbox/tiny_swords/UI Elements/UI Elements/Icons/Icon_04.png" id="1_4u6o6"]
|
||||
[ext_resource type="Script" uid="uid://dtgqjf3bl7pm8" path="res://core/currency/currency.gd" id="2_anstu"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_anstu")
|
||||
id = &"food"
|
||||
display_name = "Food"
|
||||
icon = ExtResource("1_4u6o6")
|
||||
10
docs/gyms/tiny_sword/currencies/gold.tres
Normal file
10
docs/gyms/tiny_sword/currencies/gold.tres
Normal file
@@ -0,0 +1,10 @@
|
||||
[gd_resource type="Resource" script_class="Currency" format=3 uid="uid://w4u1hddplb4e"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://d3nymghus6x3" path="res://sandbox/tiny_swords/UI Elements/UI Elements/Icons/Icon_03.png" id="1_n656e"]
|
||||
[ext_resource type="Script" uid="uid://dtgqjf3bl7pm8" path="res://core/currency/currency.gd" id="2_vohw6"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_vohw6")
|
||||
id = &"gold"
|
||||
display_name = "Gold"
|
||||
icon = ExtResource("1_n656e")
|
||||
13
docs/gyms/tiny_sword/currencies/ts_currency_catalogue.tres
Normal file
13
docs/gyms/tiny_sword/currencies/ts_currency_catalogue.tres
Normal file
@@ -0,0 +1,13 @@
|
||||
[gd_resource type="Resource" script_class="CurrencyCatalogue" format=3 uid="uid://iqphilgfp2i7"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dtgqjf3bl7pm8" path="res://core/currency/currency.gd" id="1_501l6"]
|
||||
[ext_resource type="Script" uid="uid://621tus0uvbrd" path="res://core/currency/currency_catalogue.gd" id="2_hmju3"]
|
||||
[ext_resource type="Resource" uid="uid://w4u1hddplb4e" path="res://docs/gyms/tiny_sword/currencies/gold.tres" id="2_ucsji"]
|
||||
[ext_resource type="Resource" uid="uid://dfxk30o34qe2s" path="res://docs/gyms/tiny_sword/currencies/worker.tres" id="3_7hx6u"]
|
||||
[ext_resource type="Resource" uid="uid://bxg2au0ijp242" path="res://docs/gyms/tiny_sword/currencies/food.tres" id="4_c77gh"]
|
||||
[ext_resource type="Resource" uid="uid://bgsk8h4w80h45" path="res://docs/gyms/tiny_sword/currencies/wood.tres" id="5_gyp05"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_hmju3")
|
||||
currencies = Array[ExtResource("1_501l6")]([ExtResource("2_ucsji"), ExtResource("3_7hx6u"), ExtResource("4_c77gh"), ExtResource("5_gyp05")])
|
||||
metadata/_custom_type_script = "uid://621tus0uvbrd"
|
||||
10
docs/gyms/tiny_sword/currencies/wood.tres
Normal file
10
docs/gyms/tiny_sword/currencies/wood.tres
Normal file
@@ -0,0 +1,10 @@
|
||||
[gd_resource type="Resource" script_class="Currency" format=3 uid="uid://bgsk8h4w80h45"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://bovjusa7o0l1m" path="res://sandbox/tiny_swords/UI Elements/UI Elements/Icons/Icon_02.png" id="1_gm6cf"]
|
||||
[ext_resource type="Script" uid="uid://dtgqjf3bl7pm8" path="res://core/currency/currency.gd" id="2_jj4s4"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_jj4s4")
|
||||
id = &"wood"
|
||||
display_name = "Wood"
|
||||
icon = ExtResource("1_gm6cf")
|
||||
11
docs/gyms/tiny_sword/currencies/worker.tres
Normal file
11
docs/gyms/tiny_sword/currencies/worker.tres
Normal file
@@ -0,0 +1,11 @@
|
||||
[gd_resource type="Resource" script_class="Currency" format=3 uid="uid://dfxk30o34qe2s"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://bx7tj1rd3vo3a" path="res://sandbox/tiny_swords/UI Elements/UI Elements/Icons/Icon_05.png" id="1_cbwhh"]
|
||||
[ext_resource type="Script" uid="uid://dtgqjf3bl7pm8" path="res://core/currency/currency.gd" id="1_ovrsl"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_ovrsl")
|
||||
id = &"worker"
|
||||
display_name = "Worker"
|
||||
icon = ExtResource("1_cbwhh")
|
||||
metadata/_custom_type_script = "uid://dtgqjf3bl7pm8"
|
||||
24
docs/gyms/tiny_sword/goals/gold_350k_wood_20k_goal.tres
Normal file
24
docs/gyms/tiny_sword/goals/gold_350k_wood_20k_goal.tres
Normal file
@@ -0,0 +1,24 @@
|
||||
[gd_resource type="Resource" script_class="GoalData" format=3 uid="uid://b6gb6vk0kgxnw"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://r4js5eajolio" path="res://core/goals/goal_requirement_data.gd" id="1_68ddp"]
|
||||
[ext_resource type="Resource" uid="uid://w4u1hddplb4e" path="res://docs/gyms/tiny_sword/currencies/gold.tres" id="2_2b0j8"]
|
||||
[ext_resource type="Resource" uid="uid://bgsk8h4w80h45" path="res://docs/gyms/tiny_sword/currencies/wood.tres" id="3_7tb0t"]
|
||||
[ext_resource type="Script" uid="uid://dx4kmh33rrkpy" path="res://core/goals/goal_data.gd" id="4_20y5g"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_tvl3d"]
|
||||
script = ExtResource("1_68ddp")
|
||||
currency = ExtResource("2_2b0j8")
|
||||
amount_mantissa = 3.5
|
||||
amount_exponent = 5
|
||||
|
||||
[sub_resource type="Resource" id="Resource_hyry2"]
|
||||
script = ExtResource("1_68ddp")
|
||||
currency = ExtResource("3_7tb0t")
|
||||
amount_mantissa = 2.0
|
||||
amount_exponent = 4
|
||||
metadata/_custom_type_script = "uid://r4js5eajolio"
|
||||
|
||||
[resource]
|
||||
script = ExtResource("4_20y5g")
|
||||
id = &"gold_350k_wood_20k"
|
||||
requirements = Array[ExtResource("1_68ddp")]([SubResource("Resource_tvl3d"), SubResource("Resource_hyry2")])
|
||||
16
docs/gyms/tiny_sword/goals/gold_total_1300_goal.tres
Normal file
16
docs/gyms/tiny_sword/goals/gold_total_1300_goal.tres
Normal file
@@ -0,0 +1,16 @@
|
||||
[gd_resource type="Resource" script_class="GoalData" format=3 uid="uid://cts0407h130d6"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://r4js5eajolio" path="res://core/goals/goal_requirement_data.gd" id="1_pahmu"]
|
||||
[ext_resource type="Resource" uid="uid://w4u1hddplb4e" path="res://docs/gyms/tiny_sword/currencies/gold.tres" id="2_oek0g"]
|
||||
[ext_resource type="Script" uid="uid://dx4kmh33rrkpy" path="res://core/goals/goal_data.gd" id="3_3fgtm"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_tvl3d"]
|
||||
script = ExtResource("1_pahmu")
|
||||
currency = ExtResource("2_oek0g")
|
||||
amount_mantissa = 1.3
|
||||
amount_exponent = 3
|
||||
|
||||
[resource]
|
||||
script = ExtResource("3_3fgtm")
|
||||
id = &"gold_total_1300"
|
||||
requirements = Array[ExtResource("1_pahmu")]([SubResource("Resource_tvl3d")])
|
||||
16
docs/gyms/tiny_sword/goals/gold_total_13k_goal.tres
Normal file
16
docs/gyms/tiny_sword/goals/gold_total_13k_goal.tres
Normal file
@@ -0,0 +1,16 @@
|
||||
[gd_resource type="Resource" script_class="GoalData" format=3 uid="uid://bo463s6jt0ep7"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://r4js5eajolio" path="res://core/goals/goal_requirement_data.gd" id="1_hj5d1"]
|
||||
[ext_resource type="Resource" uid="uid://w4u1hddplb4e" path="res://docs/gyms/tiny_sword/currencies/gold.tres" id="2_w5qg8"]
|
||||
[ext_resource type="Script" uid="uid://dx4kmh33rrkpy" path="res://core/goals/goal_data.gd" id="3_daoxn"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_tvl3d"]
|
||||
script = ExtResource("1_hj5d1")
|
||||
currency = ExtResource("2_w5qg8")
|
||||
amount_mantissa = 1.3
|
||||
amount_exponent = 4
|
||||
|
||||
[resource]
|
||||
script = ExtResource("3_daoxn")
|
||||
id = &"gold_total_13k"
|
||||
requirements = Array[ExtResource("1_hj5d1")]([SubResource("Resource_tvl3d")])
|
||||
16
docs/gyms/tiny_sword/goals/gold_total_30_goal.tres
Normal file
16
docs/gyms/tiny_sword/goals/gold_total_30_goal.tres
Normal file
@@ -0,0 +1,16 @@
|
||||
[gd_resource type="Resource" script_class="GoalData" format=3 uid="uid://ik7t0r3su633"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://r4js5eajolio" path="res://core/goals/goal_requirement_data.gd" id="1_udubw"]
|
||||
[ext_resource type="Resource" uid="uid://w4u1hddplb4e" path="res://docs/gyms/tiny_sword/currencies/gold.tres" id="2_lde8k"]
|
||||
[ext_resource type="Script" uid="uid://dx4kmh33rrkpy" path="res://core/goals/goal_data.gd" id="3_ilpcf"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_v4v16"]
|
||||
script = ExtResource("1_udubw")
|
||||
currency = ExtResource("2_lde8k")
|
||||
amount_mantissa = 30.0
|
||||
|
||||
[resource]
|
||||
script = ExtResource("3_ilpcf")
|
||||
id = &"gold_total_30"
|
||||
requirements = Array[ExtResource("1_udubw")]([SubResource("Resource_v4v16")])
|
||||
unlock_behavior = 0
|
||||
12
docs/gyms/tiny_sword/goals/ts_goal_catalogue.tres
Normal file
12
docs/gyms/tiny_sword/goals/ts_goal_catalogue.tres
Normal file
@@ -0,0 +1,12 @@
|
||||
[gd_resource type="Resource" script_class="GoalCatalogue" format=3 uid="uid://cgt1mjir1v4br"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dx4kmh33rrkpy" path="res://core/goals/goal_data.gd" id="1_6p6ue"]
|
||||
[ext_resource type="Script" uid="uid://bfbp4mo8ys5p8" path="res://core/goal_catalogue.gd" id="2_84pbn"]
|
||||
[ext_resource type="Resource" uid="uid://ik7t0r3su633" path="res://docs/gyms/tiny_sword/goals/gold_total_30_goal.tres" id="2_xvtf2"]
|
||||
[ext_resource type="Resource" uid="uid://cts0407h130d6" path="res://docs/gyms/tiny_sword/goals/gold_total_1300_goal.tres" id="3_wb626"]
|
||||
[ext_resource type="Resource" uid="uid://bo463s6jt0ep7" path="res://docs/gyms/tiny_sword/goals/gold_total_13k_goal.tres" id="4_3oaoj"]
|
||||
[ext_resource type="Resource" uid="uid://b6gb6vk0kgxnw" path="res://docs/gyms/tiny_sword/goals/gold_350k_wood_20k_goal.tres" id="5_or88d"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_84pbn")
|
||||
goals = Array[ExtResource("1_6p6ue")]([ExtResource("2_xvtf2"), ExtResource("3_wb626"), ExtResource("4_3oaoj"), ExtResource("5_or88d")])
|
||||
10
docs/gyms/tiny_sword/prestige/primary_prestige.tres
Normal file
10
docs/gyms/tiny_sword/prestige/primary_prestige.tres
Normal file
@@ -0,0 +1,10 @@
|
||||
[gd_resource type="Resource" script_class="PrestigeConfig" format=3 uid="uid://dwmfvmusfskk6"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://w34t58rpkoui" path="res://core/prestige/prestige_config.gd" id="1_3tg3a"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_3tg3a")
|
||||
id = &"ascension"
|
||||
prestige_currency_id = &"ascension"
|
||||
source_currency_id = &"gold"
|
||||
threshold_exponent = 6
|
||||
@@ -1,19 +1,37 @@
|
||||
[gd_scene format=3 uid="uid://dadeowsvaywpp"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cv2132o4hi7q3" path="res://core/level_game_state.gd" id="1_tma5j"]
|
||||
[ext_resource type="PackedScene" uid="uid://brgkkw2n3o1ox" path="res://docs/gyms/tiny_sword/buildings/gold_mine/gold_mine.tscn" id="2_2j2oc"]
|
||||
[ext_resource type="Resource" uid="uid://iqphilgfp2i7" path="res://docs/gyms/tiny_sword/currencies/ts_currency_catalogue.tres" id="2_dwrof"]
|
||||
[ext_resource type="PackedScene" uid="uid://cl05bdri38mxf" path="res://docs/gyms/tiny_sword/buildings/castle/castle.tscn" id="3_5ru58"]
|
||||
[ext_resource type="Resource" uid="uid://bgmj3lep0wmtf" path="res://docs/gyms/tiny_sword/buffs/ts_buff_catalogue.tres" id="3_wl838"]
|
||||
[ext_resource type="Resource" uid="uid://cgt1mjir1v4br" path="res://docs/gyms/tiny_sword/goals/ts_goal_catalogue.tres" id="4_x77df"]
|
||||
[ext_resource type="Script" uid="uid://srkiu4qe8s2m" path="res://core/prestige/prestige_manager.gd" id="5_x77df"]
|
||||
[ext_resource type="Resource" uid="uid://dwmfvmusfskk6" path="res://docs/gyms/tiny_sword/prestige/primary_prestige.tres" id="6_xnhlc"]
|
||||
[ext_resource type="PackedScene" uid="uid://btkxru2gdjsgc" path="res://currency_tile.tscn" id="7_0cs5o"]
|
||||
[ext_resource type="Resource" uid="uid://w4u1hddplb4e" path="res://docs/gyms/currencies/gold.tres" id="9_1363k"]
|
||||
[ext_resource type="Resource" uid="uid://w4u1hddplb4e" path="res://docs/gyms/tiny_sword/currencies/gold.tres" id="9_1363k"]
|
||||
[ext_resource type="PackedScene" uid="uid://djedqovgngrx5" path="res://docs/gyms/tiny_sword/buildings/farm/farm.tscn" id="10_1lv5i"]
|
||||
[ext_resource type="Resource" uid="uid://dfxk30o34qe2s" path="res://docs/gyms/currencies/worker.tres" id="10_i1cck"]
|
||||
[ext_resource type="Resource" uid="uid://dfxk30o34qe2s" path="res://docs/gyms/tiny_sword/currencies/worker.tres" id="10_i1cck"]
|
||||
[ext_resource type="PackedScene" uid="uid://dirvi76rkoowf" path="res://goals_debug_ui.tscn" id="10_qifrv"]
|
||||
[ext_resource type="Resource" uid="uid://bxg2au0ijp242" path="res://docs/gyms/currencies/food.tres" id="11_hskcg"]
|
||||
[ext_resource type="Resource" uid="uid://bxg2au0ijp242" path="res://docs/gyms/tiny_sword/currencies/food.tres" id="11_hskcg"]
|
||||
[ext_resource type="PackedScene" uid="uid://cf01wvy3f17i" path="res://docs/gyms/tiny_sword/buildings/forestry/forestry.tscn" id="11_pyqyw"]
|
||||
[ext_resource type="Resource" uid="uid://bgsk8h4w80h45" path="res://docs/gyms/currencies/wood.tres" id="12_l6a68"]
|
||||
[ext_resource type="Resource" uid="uid://bgsk8h4w80h45" path="res://docs/gyms/tiny_sword/currencies/wood.tres" id="12_l6a68"]
|
||||
[ext_resource type="PackedScene" uid="uid://rejxvjwybkll" path="res://sandbox/tiny_swords/Terrain/Resources/Wood/Trees/tree_1.tscn" id="14_0cs5o"]
|
||||
|
||||
[node name="TinySwords" type="Node" unique_id=498237642]
|
||||
|
||||
[node name="LevelGameState" type="Node" parent="." unique_id=1257082478]
|
||||
script = ExtResource("1_tma5j")
|
||||
currency_catalogue = ExtResource("2_dwrof")
|
||||
buff_catalogue = ExtResource("3_wl838")
|
||||
goal_catalogue = ExtResource("4_x77df")
|
||||
save_file_path = "user://tiny_sword_save.json"
|
||||
|
||||
[node name="PrestigeManager" type="Node" parent="LevelGameState" unique_id=1019028144 node_paths=PackedStringArray("game_state")]
|
||||
script = ExtResource("5_x77df")
|
||||
config = ExtResource("6_xnhlc")
|
||||
game_state = NodePath("..")
|
||||
|
||||
[node name="World" type="Node2D" parent="." unique_id=2118297724]
|
||||
|
||||
[node name="ForestProps" type="Node2D" parent="World" unique_id=649424542]
|
||||
@@ -66,32 +84,36 @@ anchors_preset = 0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
|
||||
[node name="GoldCurrencyTile" parent="UI" unique_id=1440583137 instance=ExtResource("7_0cs5o")]
|
||||
[node name="GoldCurrencyTile" parent="UI" unique_id=1440583137 node_paths=PackedStringArray("game_state") instance=ExtResource("7_0cs5o")]
|
||||
layout_mode = 0
|
||||
offset_right = 160.0
|
||||
offset_bottom = 31.0
|
||||
currency = ExtResource("9_1363k")
|
||||
game_state = NodePath("../../LevelGameState")
|
||||
|
||||
[node name="WorkerCurrencyTile" parent="UI" unique_id=1164876942 instance=ExtResource("7_0cs5o")]
|
||||
[node name="WorkerCurrencyTile" parent="UI" unique_id=1164876942 node_paths=PackedStringArray("game_state") instance=ExtResource("7_0cs5o")]
|
||||
layout_mode = 0
|
||||
offset_top = 32.0
|
||||
offset_right = 160.0
|
||||
offset_bottom = 63.0
|
||||
currency = ExtResource("10_i1cck")
|
||||
game_state = NodePath("../../LevelGameState")
|
||||
|
||||
[node name="FoodCurrencyTile" parent="UI" unique_id=1814936562 instance=ExtResource("7_0cs5o")]
|
||||
[node name="FoodCurrencyTile" parent="UI" unique_id=1814936562 node_paths=PackedStringArray("game_state") instance=ExtResource("7_0cs5o")]
|
||||
layout_mode = 0
|
||||
offset_top = 63.0
|
||||
offset_right = 160.0
|
||||
offset_bottom = 94.0
|
||||
currency = ExtResource("11_hskcg")
|
||||
game_state = NodePath("../../LevelGameState")
|
||||
|
||||
[node name="WoodCurrencyTile" parent="UI" unique_id=338003163 instance=ExtResource("7_0cs5o")]
|
||||
[node name="WoodCurrencyTile" parent="UI" unique_id=338003163 node_paths=PackedStringArray("game_state") instance=ExtResource("7_0cs5o")]
|
||||
layout_mode = 0
|
||||
offset_top = 94.0
|
||||
offset_right = 160.0
|
||||
offset_bottom = 125.0
|
||||
currency = ExtResource("12_l6a68")
|
||||
game_state = NodePath("../../LevelGameState")
|
||||
|
||||
[node name="GoalsDebugUI" parent="UI" unique_id=1494700185 instance=ExtResource("10_qifrv")]
|
||||
layout_mode = 1
|
||||
|
||||
Reference in New Issue
Block a user