Skip to content

Commit 473ca31

Browse files
authored
Revert "v5.0.1 resource_path validation for add_translation_from_resource(resource_path: String) (#120)"
This reverts commit 1c25343.
1 parent 1c25343 commit 473ca31

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

addons/mod_loader/mod_loader.gd

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ extends Node
2626
# Most of these settings should never need to change, aside from the DEBUG_*
2727
# options (which should be `false` when distributing compiled PCKs)
2828

29-
const MODLOADER_VERSION = "5.0.1"
29+
const MODLOADER_VERSION = "5.0.0"
3030

3131
# If true, a complete array of filepaths is stored for each mod. This is
3232
# disabled by default because the operation can be very expensive, but may
@@ -40,6 +40,7 @@ const MOD_LOG_PATH := "user://mods.log"
4040
# This is where mod ZIPs are unpacked to
4141
const UNPACKED_DIR := "res://mods-unpacked/"
4242

43+
4344
# Set to true to require using "--enable-mods" to enable them
4445
const REQUIRE_CMD_LINE := false
4546

@@ -509,10 +510,6 @@ func register_global_classes_from_array(new_global_classes: Array) -> void:
509510
# file should have been created in Godot already: When you improt a CSV, such
510511
# a file will be created for you.
511512
func add_translation_from_resource(resource_path: String) -> void:
512-
if not File.new().file_exists(resource_path):
513-
ModLoaderUtils.log_fatal("Tried to load a translation resource from a file that doesn't exist. The invalid path was: %s" % [resource_path], LOG_NAME)
514-
return
515-
516513
var translation_object: Translation = load(resource_path)
517514
TranslationServer.add_translation(translation_object)
518515
ModLoaderUtils.log_info("Added Translation from Resource -> %s" % resource_path, LOG_NAME)

0 commit comments

Comments
 (0)