Rewrote BP Shop code, tidied PC menu code, fixed message display bug involving instant speed and \wtnp, fixed mail vanishing bug, tweaks to other rewritten UI

This commit is contained in:
Maruno17
2024-09-27 22:10:26 +01:00
parent 48292c2a28
commit b80de83b0d
20 changed files with 967 additions and 797 deletions

View File

@@ -575,6 +575,7 @@ class Pokemon
def item=(value)
return if value && !GameData::Item.exists?(value)
@item = (value) ? GameData::Item.get(value).id : value
@mail = nil if @item.nil?
end
# Returns whether this Pokémon is holding an item. If an item id is passed,
@@ -608,6 +609,7 @@ class Pokemon
raise ArgumentError, _INTL("Invalid value {1} given", mail.inspect)
end
@mail = mail
@item = mail&.item
end
#-----------------------------------------------------------------------------