mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
Added method for buying a Game Corner prize item, made def _I able to replace text like _INTL
This commit is contained in:
@@ -758,8 +758,8 @@ def _ISPRINTF(*arg)
|
|||||||
return string
|
return string
|
||||||
end
|
end
|
||||||
|
|
||||||
def _I(str)
|
def _I(str, *arg)
|
||||||
return _MAPINTL($game_map.map_id, str)
|
return _MAPINTL($game_map.map_id, str, *arg)
|
||||||
end
|
end
|
||||||
|
|
||||||
def _MAPINTL(mapid, *arg)
|
def _MAPINTL(mapid, *arg)
|
||||||
|
|||||||
@@ -806,3 +806,17 @@ def pbReceiveItem(item, quantity = 1)
|
|||||||
end
|
end
|
||||||
return false # Can't add the item
|
return false # Can't add the item
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#===============================================================================
|
||||||
|
# Buying a prize item from the Game Corner
|
||||||
|
#===============================================================================
|
||||||
|
def pbBuyPrize(item, quantity = 1)
|
||||||
|
item = GameData::Item.get(item)
|
||||||
|
return false if !item || quantity < 1
|
||||||
|
item_name = (quantity > 1) ? item.name_plural : item.name
|
||||||
|
pocket = item.pocket
|
||||||
|
return false if !$bag.add(item, quantity)
|
||||||
|
pbMessage(_INTL("\\CNYou put the {1} in\\nyour Bag's <icon=bagPocket{2}>\\c[1]{3}\\c[0] pocket.",
|
||||||
|
item_name, pocket, PokemonBag.pocket_names[pocket - 1]))
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user