Bugfixes and small additions (#109)

* Add a converter for Player charsets in metadara
* Fixed Sprite position editor not working with new shadow filenames. Also added check for custom shadows
* Fixed pbTrainerBattleCore not working with NPC Trainer argument
* Fixed typo which caused crash with old trainers.txt format
* Fixed reference to non-existent variable which crashed the trainertype editor
This commit is contained in:
Golisopod-User
2021-05-18 23:28:07 +05:30
committed by GitHub
parent 8e64bcc11b
commit 6d7bae913e
9 changed files with 48 additions and 22 deletions

View File

@@ -386,14 +386,14 @@ def pbTrainerTypeEditor
type_hash = {
:id_number => t_data.id_number,
:id => t_data.id,
:name => line[1],
:base_money => line[2],
:battle_BGM => line[3],
:victory_ME => line[4],
:intro_ME => line[5],
:gender => line[6],
:skill_level => line[7],
:skill_code => line[8]
:name => data[1],
:base_money => data[2],
:battle_BGM => data[3],
:victory_ME => data[4],
:intro_ME => data[5],
:gender => data[6],
:skill_level => data[7],
:skill_code => data[8]
}
# Add trainer type's data to records
GameData::TrainerType.register(type_hash)

View File

@@ -166,6 +166,11 @@ class SpritePositioner
pbChangeSpecies(@species)
refresh
species_data = GameData::Species.get(@species)
if pbResolveBitmap(sprintf("Graphics/Pokemon/Shadow/%s_%d", species_data.species, species_data.form)) ||
pbResolveBitmap(sprintf("Graphics/Pokemon/Shadow/%s", species_data.species))
pbMessage("This species has its own shadow sprite in Graphics/Pokemon/Shadow/. The shadow size metric cannot be edited.")
return false
end
oldval = species_data.shadow_size
cmdvals = [0]
commands = [_INTL("None")]
@@ -173,7 +178,7 @@ class SpritePositioner
i = 0
loop do
i += 1
fn = sprintf("Graphics/Pictures/Battle/battler_shadow_%d", i)
fn = sprintf("Graphics/Pokemon/Shadow/%d", i)
break if !pbResolveBitmap(fn)
cmdvals.push(i)
commands.push(i.to_s)