Automatically load classic mode trainer if missing in another game mode

This commit is contained in:
infinitefusion
2024-07-05 18:24:27 -04:00
parent 8c80c9db35
commit 116323d8e8
9 changed files with 5 additions and 2 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -5,8 +5,8 @@
#==============================================================================# #==============================================================================#
module Settings module Settings
# The version of your game. It has to adhere to the MAJOR.MINOR.PATCH format. # The version of your game. It has to adhere to the MAJOR.MINOR.PATCH format.
GAME_VERSION = '6.2.2' GAME_VERSION = '6.2.3'
GAME_VERSION_NUMBER = "6.2.2" GAME_VERSION_NUMBER = "6.2.3"
POKERADAR_LIGHT_ANIMATION_RED_ID = 17 POKERADAR_LIGHT_ANIMATION_RED_ID = 17
POKERADAR_LIGHT_ANIMATION_GREEN_ID = 18 POKERADAR_LIGHT_ANIMATION_GREEN_ID = 18

View File

@@ -18,6 +18,9 @@ def pbLoadTrainer(tr_type, tr_name, tr_version = 0)
raise _INTL("Trainer type {1} does not exist.", tr_type) if !tr_type_data raise _INTL("Trainer type {1} does not exist.", tr_type) if !tr_type_data
tr_type = tr_type_data.id tr_type = tr_type_data.id
trainer_data = getTrainersDataMode.try_get(tr_type, tr_name, tr_version) trainer_data = getTrainersDataMode.try_get(tr_type, tr_name, tr_version)
if !trainer_data
trainer_data = GameData::Trainer.try_get(tr_type, tr_name, tr_version)
end
return (trainer_data) ? trainer_data.to_trainer : nil return (trainer_data) ? trainer_data.to_trainer : nil
end end

Binary file not shown.