mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 22:24:58 +00:00
Automatically load classic mode trainer if missing in another game mode
This commit is contained in:
@@ -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
|
||||
tr_type = tr_type_data.id
|
||||
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
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user