Added game seed indication

This commit is contained in:
2025-12-27 22:48:52 +03:00
parent eb069dbddd
commit 35983f42f2
6 changed files with 20 additions and 9 deletions
+1
View File
@@ -104,6 +104,7 @@ func _create_game_map() -> void:
_current_area_map_scene.area_data = current_area _current_area_map_scene.area_data = current_area
_current_area_map_scene.current_sector = current_sector _current_area_map_scene.current_sector = current_sector
_current_area_map_scene.selected_sector = current_sector _current_area_map_scene.selected_sector = current_sector
_current_area_map_scene.game_seed = SaveManager.game_data.game_seed
_current_area_map_scene.passage_selected.connect(_create_passage) _current_area_map_scene.passage_selected.connect(_create_passage)
+9
View File
@@ -67,6 +67,9 @@ var current_sector: SectorData = null:
var selected_sector: SectorData = null: var selected_sector: SectorData = null:
set = _set_selected_sector set = _set_selected_sector
var game_seed := "":
set = _set_game_seed
var sector_positions : Dictionary[SectorData, Vector2] = {} var sector_positions : Dictionary[SectorData, Vector2] = {}
@@ -75,6 +78,7 @@ var sector_positions : Dictionary[SectorData, Vector2] = {}
@onready var current_sector_indicator : CurrentSectorIndicator = $CurrentSectorIndicator @onready var current_sector_indicator : CurrentSectorIndicator = $CurrentSectorIndicator
@onready var selected_sector_indicator : SelectedSectorIndicator = $SelectedSectorIndicator @onready var selected_sector_indicator : SelectedSectorIndicator = $SelectedSectorIndicator
@onready var seed_label : Label = $SeedLabel
func _ready() -> void: func _ready() -> void:
@@ -227,6 +231,11 @@ func _set_selected_sector(sector: SectorData) -> void:
selected_sector_indicator.show() selected_sector_indicator.show()
func _set_game_seed(value: String) -> void:
game_seed = value
seed_label.text = game_seed
func _update_selected_sector_indicator() -> void: func _update_selected_sector_indicator() -> void:
if selected_sector == null: return if selected_sector == null: return
+10 -1
View File
@@ -1,9 +1,10 @@
[gd_scene load_steps=5 format=3 uid="uid://dqkp7nlhnb7sh"] [gd_scene load_steps=6 format=3 uid="uid://dqkp7nlhnb7sh"]
[ext_resource type="Script" uid="uid://bk8qn34w5cqmj" path="res://game/menu/map/area_map.gd" id="1_hkcry"] [ext_resource type="Script" uid="uid://bk8qn34w5cqmj" path="res://game/menu/map/area_map.gd" id="1_hkcry"]
[ext_resource type="PackedScene" uid="uid://b8qwok6v44la" path="res://game/menu/map_indicators/current_sector_indicator.tscn" id="2_fx4fd"] [ext_resource type="PackedScene" uid="uid://b8qwok6v44la" path="res://game/menu/map_indicators/current_sector_indicator.tscn" id="2_fx4fd"]
[ext_resource type="PackedScene" uid="uid://bwru7i7xetjth" path="res://game/menu/map_indicators/selected_sector_indicator.tscn" id="3_oxnrh"] [ext_resource type="PackedScene" uid="uid://bwru7i7xetjth" path="res://game/menu/map_indicators/selected_sector_indicator.tscn" id="3_oxnrh"]
[ext_resource type="PackedScene" uid="uid://chdrjc7c6bdpb" path="res://game/entities/world/background.tscn" id="4_fx4fd"] [ext_resource type="PackedScene" uid="uid://chdrjc7c6bdpb" path="res://game/entities/world/background.tscn" id="4_fx4fd"]
[ext_resource type="Theme" uid="uid://bqqtjq710luul" path="res://styles/label_theme.tres" id="5_2pr56"]
[node name="AreaMap" type="Node2D"] [node name="AreaMap" type="Node2D"]
script = ExtResource("1_hkcry") script = ExtResource("1_hkcry")
@@ -17,3 +18,11 @@ script = ExtResource("1_hkcry")
[node name="SelectedSectorIndicator" parent="." instance=ExtResource("3_oxnrh")] [node name="SelectedSectorIndicator" parent="." instance=ExtResource("3_oxnrh")]
[node name="Background" parent="." instance=ExtResource("4_fx4fd")] [node name="Background" parent="." instance=ExtResource("4_fx4fd")]
[node name="SeedLabel" type="Label" parent="."]
offset_left = 511.0
offset_top = 350.0
offset_right = 639.0
offset_bottom = 358.0
theme = ExtResource("5_2pr56")
horizontal_alignment = 2
-1
View File
@@ -1 +0,0 @@
extends Node
-1
View File
@@ -1 +0,0 @@
uid://bittd8vdqbd8r
-6
View File
@@ -1,6 +0,0 @@
[gd_scene load_steps=2 format=3 uid="uid://ceto4kvp5mr1r"]
[ext_resource type="Script" uid="uid://bittd8vdqbd8r" path="res://game/menu/map/map.gd" id="1_cjemo"]
[node name="Map" type="Node"]
script = ExtResource("1_cjemo")