Standard items list type confirmation handling¶
This page describes the logic SetItem has when handling a listtype of standard items.
- We first check if the item is usable. There are 2 ways in which an item may not be usable:
- Any
ItemUsefrom itemdata has anUsageTypeofNone - The AttackArea from itemdata is
AllEnemiesorSingleEnemyand GetAvaliableTargets for attackid -1 without onlyground or onlyground, but with excludeunderground causesavailabletargetsto become empty (in other words, the item affects one or all enemy party members, but there's no one above ground to be targetted)
- Any
- If the item isn't usable, ReturnToMainSelect is called which does the following:
- The
Cancelsound is played on AudioSource 10 - currentaction is set to
BaseAction optionis set tolastoptionselecteditemis set to -1- DestroyHelpBox is called which sets
helpboxidto -1 and destroyshelpboxif it existed in 0.5 seconds with shrink before setting it to null - SetMaxOptions is called
- UpdateText is called
- The
- Otherwise, if the item is usable:
- currentchoice is set to
Item - itemarea is set to the one from itemdata
helpboxidis set to -1- GotoSelect is called without overridemax
- currentchoice is set to