From f3048abd86959e2237fac4e5742ac20c03dffac5 Mon Sep 17 00:00:00 2001 From: Maruno17 Date: Tue, 27 Apr 2021 22:17:25 +0100 Subject: [PATCH] Fixed bug when getting a partner's back sprite --- Data/Scripts/010_Data/002_PBS data/012_TrainerType.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Data/Scripts/010_Data/002_PBS data/012_TrainerType.rb b/Data/Scripts/010_Data/002_PBS data/012_TrainerType.rb index a0cab59d9c..58b25260a3 100644 --- a/Data/Scripts/010_Data/002_PBS data/012_TrainerType.rb +++ b/Data/Scripts/010_Data/002_PBS data/012_TrainerType.rb @@ -21,7 +21,7 @@ def self.check_file(tr_type, path, optional_suffix = "", suffix = "") tr_type_data = self.try_get(tr_type) return nil if tr_type_data.nil? # Check for files - if !optional_suffix.empty? + if optional_suffix && !optional_suffix.empty? ret = path + tr_type_data.id.to_s + optional_suffix + suffix return ret if pbResolveBitmap(ret) end @@ -49,7 +49,7 @@ def self.player_front_sprite_filename(tr_type) end def self.back_sprite_filename(tr_type) - return self.check_file(tr_type, "Graphics/Trainers/", nil, "_back") + return self.check_file(tr_type, "Graphics/Trainers/", "", "_back") end def self.player_back_sprite_filename(tr_type)