Add true portable mode (#259)

This commit is contained in:
Jeod
2025-09-26 15:32:42 -04:00
committed by GitHub
parent 7b0a62c765
commit 659e9f3ce8
28 changed files with 176 additions and 96 deletions

View File

@@ -113,7 +113,7 @@ func play_sfx(stream_name = "", position := Vector2.ZERO, pitch := 1.0) -> void:
var stream = stream_name
var is_custom = false
if stream_name is String:
is_custom = sfx_library[stream_name].contains("user://custom_characters")
is_custom = sfx_library[stream_name].contains(Global.config_path.path_join("custom_characters"))
stream = import_stream(sfx_library[stream_name])
if is_custom == false:
player.stream = ResourceSetter.get_resource(stream, player)
@@ -236,7 +236,7 @@ func handle_music_override() -> void:
func create_stream_from_json(json_path := "") -> AudioStream:
if json_path.contains(".json") == false:
var path = ResourceSetter.get_pure_resource_path(json_path)
if path.contains("user://"):
if path.contains(Global.config_path):
match json_path.get_slice(".", 1):
"wav":
return AudioStreamWAV.load_from_file(ResourceSetter.get_pure_resource_path(json_path))