Added seed selection screen

This commit is contained in:
2025-12-15 17:10:25 +03:00
parent e94d59718e
commit 5b8c59d67f
8 changed files with 201 additions and 24 deletions
+3 -9
View File
@@ -1,8 +1,7 @@
class_name GameData
extends Resource
const SEED_CHARS := "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
const DEFAULT_SEED_LENGTH := 16
@export var game_seed: String
@@ -11,13 +10,8 @@ const DEFAULT_SEED_LENGTH := 16
@export var current_sector_index: int
func randomize() -> void:
var seed_chars_length := SEED_CHARS.length()
for i in range(DEFAULT_SEED_LENGTH):
var index := randi_range(1, seed_chars_length) - 1
game_seed += SEED_CHARS[index]
func reset() -> void:
game_seed = ""
current_area_index = 0
current_stage_index = 0
current_sector_index = 0