-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Noticed that the settings in the Cogito tab don't get saved properly. I tried to create a custom resource to save/load these, but currently it doesn't seem to be working as intended. Nothing is majorly broken with this so I'm committing this in the hopes someone can help.
- Loading branch information
1 parent
3e963a3
commit e421719
Showing
11 changed files
with
103 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[gd_resource type="Resource" script_class="CogitoSettings" load_steps=2 format=3] | ||
|
||
[ext_resource type="Script" path="res://addons/cogito/cogito_settings.gd" id="1_usejk"] | ||
|
||
[resource] | ||
script = ExtResource("1_usejk") | ||
is_logging = false | ||
scene_state_prefix = "COGITO_scene_state_" | ||
player_state_prefix = "COGITO_player_state_" | ||
default_transition_duration = 8.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
class_name CogitoSettings extends Resource | ||
|
||
const settings_path := "res://addons/cogito/" | ||
const settings_filename := "CogitoSettings" | ||
|
||
@export var is_logging: bool | ||
|
||
@export var scene_state_prefix : String | ||
@export var player_state_prefix : String | ||
|
||
@export var default_transition_duration : float | ||
|
||
#func save_settings(file_path: String) -> void: | ||
#var full_settings_filepath = settings_path + settings_filename + ".tres" | ||
#ResourceSaver.save(self, file_path, ResourceSaver.FLAG_CHANGE_PATH) | ||
#print("CogitoSettingsFile: Cogito Settings saved as ", file_path) | ||
|
||
# | ||
#func settings_exist() -> bool: | ||
##var player_state_file = str(player_state_dir + state_slot + ".res") | ||
#var full_settings_filepath = settings_path + settings_filename + ".tres" | ||
#return ResourceLoader.exists(full_settings_filepath) | ||
# | ||
# | ||
#func load_settings(state_slot : String) -> Resource: | ||
#var full_settings_filepath = settings_path + settings_filename + ".tres" | ||
#return ResourceLoader.load(full_settings_filepath, "CogitoSettings", ResourceLoader.CACHE_MODE_IGNORE) |