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
ItemUse
from itemdata has anUsageType
ofNone
- The AttackArea from itemdata is
AllEnemies
orSingleEnemy
and GetAvaliableTargets for attackid -1 without onlyground or onlyground, but with excludeunderground causesavailabletargets
to 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
Cancel
sound is played on AudioSource 10 - currentaction is set to
BaseAction
option
is set tolastoption
selecteditem
is set to -1- DestroyHelpBox is called which sets
helpboxid
to -1 and destroyshelpbox
if 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
helpboxid
is set to -1- GotoSelect is called without overridemax
- currentchoice is set to