seems like a decent restore before I broke everything earlier
This commit is contained in:
@@ -4,7 +4,7 @@ extends Node
|
||||
@export var generate_playlist_now = false
|
||||
@export var checksum_test = false
|
||||
@export var load_playlist_from_file = false
|
||||
@export var maps_in_rotation : Array[String] = []
|
||||
@export var maps_in_rotation : Array[level_resource] = []
|
||||
@export var gamemodes_in_rotation : Array[gamemode]= []
|
||||
@export var levels_per_round : int = 5
|
||||
@export var rounds_per_match : int = 3
|
||||
@@ -33,14 +33,16 @@ func generate_playlist() -> void:
|
||||
for i in rounds_per_match:
|
||||
var round = []
|
||||
for x in levels_per_round:
|
||||
var gamemode_path = gamemodes_in_rotation.pick_random().resource_path
|
||||
var level_selection = maps_in_rotation.pick_random()
|
||||
var level_details = {
|
||||
"map" : maps_in_rotation.pick_random(),
|
||||
"gamemode" : gamemodes_in_rotation.pick_random()
|
||||
"level_path" : level_selection.level_path,
|
||||
"level_name" : level_selection.level_name,
|
||||
"gamemode_path" : gamemode_path
|
||||
}
|
||||
round.append(level_details)
|
||||
matches.append(round)
|
||||
playlist.append(matches)
|
||||
print("PLAYLIST : ", playlist)
|
||||
|
||||
save_playlist(playlist)
|
||||
generate_playlist_now = false
|
||||
@@ -75,9 +77,6 @@ func load_playlist():
|
||||
GameGlobals.playlist_test = playlist
|
||||
GameGlobals.current_match = playlist[0]
|
||||
file.close()
|
||||
print("PLAYLIST: ")
|
||||
print("------------------------------------------------------------------------------------")
|
||||
print(playlist)
|
||||
else:
|
||||
print("no data saved, generating new playlist...")
|
||||
generate_playlist()
|
||||
|
||||
Reference in New Issue
Block a user