Add final progression to tiny sword, fixes and tweeks required

This commit is contained in:
2026-05-15 00:47:38 +02:00
parent 66666defcb
commit 738381a16b
43 changed files with 1127 additions and 339 deletions

View File

@@ -0,0 +1,25 @@
extends Node2D
const UNLOCK_GOAL_ID: StringName = &"gold_total_1300"
@onready var _sprite: Sprite2D = $Sprite2D
@onready var _area: Area2D = $Area2D
@onready var _game_state: LevelGameState = find_parent("LevelGameState")
func _ready() -> void:
_sprite.visible = false
_area.monitoring = false
_game_state.goal_completed.connect(_on_goal_completed)
if _game_state.is_goal_completed(UNLOCK_GOAL_ID):
_unlock()
func _on_goal_completed(goal_id: StringName) -> void:
if goal_id == UNLOCK_GOAL_ID:
_unlock()
func _unlock() -> void:
_sprite.visible = true
_area.monitoring = true

View File

@@ -0,0 +1 @@
uid://dnsblnjy82goo

View File

@@ -1,6 +1,7 @@
[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="Script" path="res://docs/gyms/tiny_sword/buildings/farm/farm.gd" id="1_script"]
[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"]
@@ -10,6 +11,7 @@
size = Vector2(106, 157)
[node name="Farm" type="Node2D" unique_id=283335851]
script = ExtResource("1_script")
[node name="CurrencyGenerator" parent="." unique_id=967969064 node_paths=PackedStringArray("info_generator_container") instance=ExtResource("1_rvsna")]
currency = ExtResource("2_djlc5")