From c23f50e5a68f3b8786cf5e84bd805cab52853260 Mon Sep 17 00:00:00 2001 From: Maruno17 Date: Tue, 15 Jun 2021 19:23:50 +0100 Subject: [PATCH] Fixed being unable to extract plugin messages to translate them, fixed AI bug with Natural Gift and no item, fixed bad code when checking a trainer's party for a mon with a given type --- Data/Scripts/001_Technical/003_Intl_Messages.rb | 16 +++++++++++++++- .../002_Move/006_Move_Effects_080-0FF.rb | 10 ++++++---- .../015_Trainers and player/001_Trainer.rb | 2 +- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/Data/Scripts/001_Technical/003_Intl_Messages.rb b/Data/Scripts/001_Technical/003_Intl_Messages.rb index 7aec32454..7f8b21799 100644 --- a/Data/Scripts/001_Technical/003_Intl_Messages.rb +++ b/Data/Scripts/001_Technical/003_Intl_Messages.rb @@ -32,6 +32,19 @@ def pbSetTextMessages scr=Zlib::Inflate.inflate(script[2]) pbAddRgssScriptTexts(texts,scr) end + if safeExists?("Data/PluginScripts.rxdata") + plugin_scripts = load_data("Data/PluginScripts.rxdata") + for plugin in plugin_scripts + for script in plugin[2] + if Time.now.to_i - t >= 5 + t = Time.now.to_i + Graphics.update + end + scr = Zlib::Inflate.inflate(script[1]).force_encoding(Encoding::UTF_8) + pbAddRgssScriptTexts(texts,scr) + end + end + end # Must add messages because this code is used by both game system and Editor MessageTypes.addMessagesAsHash(MessageTypes::ScriptTexts,texts) commonevents = load_data("Data/CommonEvents.rxdata") @@ -250,7 +263,8 @@ def pbGetText(infile) raise _INTL("Section {1} has an odd number of entries (section was recognized as a hash because its first line is not a number)",name) end end - i=0;loop do break unless i