mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 13:44:59 +00:00
Fixed def pbChooseItemFromList not storing the correct result in a Game Variable
This commit is contained in:
@@ -886,7 +886,7 @@ def pbChooseFossil(var = 0)
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Shows a list of items to choose from, with the chosen item's ID being stored
|
# Shows a list of items to choose from, with the chosen item's ID being stored
|
||||||
# in the given Global Variable. Only items which the player has are listed.
|
# in the given Game Variable. Only items which the player has are listed.
|
||||||
def pbChooseItemFromList(message, variable, *args)
|
def pbChooseItemFromList(message, variable, *args)
|
||||||
commands = []
|
commands = []
|
||||||
itemid = []
|
itemid = []
|
||||||
@@ -898,16 +898,16 @@ def pbChooseItemFromList(message, variable, *args)
|
|||||||
itemid.push(itm.id)
|
itemid.push(itm.id)
|
||||||
end
|
end
|
||||||
if commands.length == 0
|
if commands.length == 0
|
||||||
$game_variables[variable] = 0
|
$game_variables[variable] = :NONE
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
commands.push(_INTL("Cancel"))
|
commands.push(_INTL("Cancel"))
|
||||||
itemid.push(nil)
|
itemid.push(nil)
|
||||||
ret = pbMessage(message, commands, -1)
|
ret = pbMessage(message, commands, -1)
|
||||||
if ret < 0 || ret >= commands.length - 1
|
if ret < 0 || ret >= commands.length - 1
|
||||||
$game_variables[variable] = nil
|
$game_variables[variable] = :NONE
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
$game_variables[variable] = itemid[ret]
|
$game_variables[variable] = itemid[ret] || :NONE
|
||||||
return itemid[ret]
|
return itemid[ret]
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user