This commit is contained in:
2026-03-27 00:21:40 +01:00
parent 2743fd314a
commit ebc9325b53
13 changed files with 26 additions and 34 deletions

View File

@@ -7,7 +7,7 @@ extends Node
#1: GEMS_CURRENCY_ID,
#}
const CURRENCY_DIRECTORY_PATH: String = "res://idles/currencies"
const CURRENCY_DIRECTORY_PATH: String = "res://sandbox/currencies"
const CURRENCY_RESOURCE_EXTENSIONS: PackedStringArray = ["tres", "res"]
var _currency_by_id: Dictionary = {}

View File

@@ -37,7 +37,7 @@ const HUGE_COST_EXPONENT: int = 1000000
@export var run_multiplier: float = 1.0
## Reference to generator UI
@onready var info_generator_container: GeneratorPanel = $GeneratorPanel
@export var info_generator_container: GeneratorPanel
## True while the pointer is inside the generator Area2D.
var _mouse_entered: bool = false

View File

@@ -3,32 +3,8 @@
[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"]
[ext_resource type="Texture2D" uid="uid://bgtt3wu43tajh" path="res://icon.svg" id="4_ruf1h"]
[ext_resource type="PackedScene" uid="uid://ckos7f22pnmyh" path="res://generator_container.tscn" id="5_bb14m"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_y5m1q"]
size = Vector2(128, 128)
[node name="CurrencyGenerator" type="Node2D" unique_id=967969064]
script = ExtResource("1_4n4ca")
currency = ExtResource("2_5tmvy")
data = ExtResource("3_wx13b")
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=807584513]
texture = ExtResource("4_ruf1h")
[node name="Area2D" type="Area2D" parent="." unique_id=707349247]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D" unique_id=1572620025]
shape = SubResource("RectangleShape2D_y5m1q")
[node name="GeneratorPanel" parent="." unique_id=1129190041 node_paths=PackedStringArray("_generator") instance=ExtResource("5_bb14m")]
visible = false
offset_left = 33.0
offset_top = -65.0
offset_right = 474.0
offset_bottom = 200.5
_generator = NodePath("..")
[connection signal="mouse_entered" from="Area2D" to="." method="_on_area_2d_mouse_entered"]
[connection signal="mouse_exited" from="Area2D" to="." method="_on_area_2d_mouse_exited"]

View File

@@ -1,6 +1,6 @@
[gd_scene format=3 uid="uid://ckos7f22pnmyh"]
[ext_resource type="Script" uid="uid://es14nqk6vrrk" path="res://generator_container.gd" id="1_8wouw"]
[ext_resource type="Script" uid="uid://es14nqk6vrrk" path="res://core/generator/generator_container.gd" id="1_8wouw"]
[node name="GeneratorContainer" type="PanelContainer" unique_id=1451609580]
anchors_preset = 8

View File

@@ -32,7 +32,7 @@ var last_reset_time: int = 0
func _ready() -> void:
if config == null:
config = load("res://idles/prestige/primary_prestige.tres") as Resource
config = load("res://sandbox/prestige/primary_prestige.tres") as Resource
if not _is_config_valid():
push_warning("PrestigeManager has invalid or missing config; prestige is disabled.")

View File

@@ -11,8 +11,8 @@ extends HBoxContainer
var _currency_id: StringName = &""
func _ready() -> void:
if currency == null:
currency = CurrencyDatabase.get_currency_resource(GameState.GOLD_CURRENCY_ID)
#if currency == null:
#currency = CurrencyDatabase.get_currency_resource(GameState.GOLD_CURRENCY_ID)
if currency == null:
push_warning("CurrencyTile '%s' has no currency configured." % String(name))
return

View File

@@ -1,15 +1,17 @@
[gd_scene format=3 uid="uid://btkxru2gdjsgc"]
[ext_resource type="Script" uid="uid://sp67wcb6s5nw" path="res://currency_label.gd" id="1_0hv07"]
[ext_resource type="Texture2D" uid="uid://d3nymghus6x3" path="res://sandbox/tiny_swords/UI Elements/UI Elements/Icons/Icon_03.png" id="2_otq0d"]
[node name="CurrencyTile" type="HBoxContainer" unique_id=1440583137]
theme_override_constants/separation = 12
script = ExtResource("1_0hv07")
[node name="CurrencyIcon" type="TextureRect" parent="." unique_id=935299369]
visible = false
custom_minimum_size = Vector2(20, 20)
layout_mode = 2
texture = ExtResource("2_otq0d")
expand_mode = 2
stretch_mode = 5
[node name="Label" type="Label" parent="." unique_id=89234840]

View File

@@ -2,7 +2,7 @@
[ext_resource type="Script" uid="uid://coasop1lyw5rh" path="res://docs/museums/big_number_museum.gd" id="1_muwei"]
[ext_resource type="PackedScene" uid="uid://btkxru2gdjsgc" path="res://currency_tile.tscn" id="2_a7k0t"]
[ext_resource type="PackedScene" uid="uid://ckos7f22pnmyh" path="res://generator_container.tscn" id="2_h2bxk"]
[ext_resource type="PackedScene" uid="uid://ckos7f22pnmyh" path="res://core/generator/generator_container.tscn" id="2_h2bxk"]
[node name="BigNumberMuseum" type="Control" unique_id=1249411984]
layout_mode = 3

View File

@@ -13,6 +13,7 @@ max_level = 4
unlock_goal = ExtResource("3_bsqao")
effect_increment = 1.0
cost_currency = ExtResource("2_0j56j")
base_cost_mantissa = 8.0
cost_multiplier = 1.55
base_cost_mantissa = 2.5
base_cost_exponent = 1
cost_multiplier = 2.0
resource_target_currency = ExtResource("2_0j56j")

View File

@@ -17,6 +17,7 @@ purchase_currency = ExtResource("3_rptf4")
unlock_goal = ExtResource("6_ffn26")
unlock_goal_behavior = 1
initial_cost = 1.0
coefficient = 1.0
initial_productivity = 20.0
buffs = Array[ExtResource("1_ffn26")]([ExtResource("2_rptf4")])
metadata/_custom_type_script = "uid://b00tqsuhxdy0d"

View File

@@ -0,0 +1,12 @@
[gd_resource type="Resource" script_class="CurrencyGeneratorData" format=3 uid="uid://nfq4erycp7vy"]
[ext_resource type="Script" uid="uid://dnhocfsuvmeyb" path="res://core/generator/generator_buff_data.gd" id="1_s017t"]
[ext_resource type="Script" uid="uid://b00tqsuhxdy0d" path="res://core/generator/currency_generator_data.gd" id="2_2rq43"]
[resource]
script = ExtResource("2_2rq43")
id = &"monastery"
name = "Monastery"
starts_unlocked = false
starts_available = false
metadata/_custom_type_script = "uid://b00tqsuhxdy0d"