Closed edwardspec closed 5 years ago
This was intentional. The items were mostly used without a need to have descriptions, so they were added by another function call in all cases when they were actually displayed. Furthermore, after the change, the items are not needed to be stored in a WML variable.
If didn't properly determine where they were needed and where not, please tell me about it.
WML variable does seem to be still used in some places in the code:
$ git grep -F '.description' | grep item_list
utils/global_events.cfg:$item_list.object[$k].description"
utils/global_events.cfg:$item_list.object[$k].description"
utils/global_events.cfg:$item_list.object[$k].description"
utils/global_events.cfg:$item_list.object[$k].description"}
utils/global_events.cfg:$item_list.object[$k].description"}
utils/items.cfg: output=item_list.object[$item_number].description
utils/items.cfg: message= _"$item_list.object[$item_number].description
utils/items.cfg: message="$item_list.object[$item_number].description
utils/items.cfg: value="$item_list.object[$item_number].description
utils/utils.cfg: {VARIABLE description $item_list.object[$j].description}
Exact impact (if any) is unknown. May be related to screenshot of https://github.com/Dugy/Legend_of_the_Invincibles/pull/225#issuecomment-451794435
1) Start Gladiators. 2) Equip any item. 3) There will be no description near "Remove item" option:
To reproduce, type
loti.item.type[100].description
in Lua console.Expected result: description of Cunctator's sword. Actual result: nil.
[describe_object] in GENERATE_ITEM_LIST macro (items.cfg) was calculating the descriptions (and saving them in
item_list
array), but after commit 56698d063b8ab470f1ec2d5d492e33006c84620e,item_list
is no longer used and all descriptions in_reload()
arenil
.Possible solution: store calculated descriptions in array, reuse this array in _reload().