Issue
the user can "freely" set the label and description of items of prototype 'item-with-label' and its child prototypes.i suspect a typo in the lua binding for description and the derived documentation, since description should be a copy/paste of label with minor changes.
How to reproduce/test
- put a blueprint book, blueprint, deconstruction planner and upgrade planner in your main inventory.
Code: Select all
/c local inv = game.player.get_main_inventory() inv.clear() for k,v in pairs{"blueprint-book","blueprint","deconstruction-planner","upgrade-planner"} do inv.insert(v) end - reading/writing the custom label works:
Code: Select all
/c for k,v in pairs{"blueprint-book","blueprint","deconstruction-planner","upgrade-planner"} do local itm = game.player.get_main_inventory().find_item_stack{name=v} log(serpent.line(itm.label)) itm.label = itm.name log(serpent.line(itm.label)) end - reading/writing the custom description does not work:
Code: Select all
/c for k,v in pairs{"blueprint-book","blueprint","deconstruction-planner","upgrade-planner"} do local itm = game.player.get_main_inventory().find_item_stack{name=v} log(serpent.line(itm.custom_description)) itm.custom_description = itm.type log(serpent.line(itm.custom_description)) end
Addendum
if i am mistaken and custom_description is really something entirely else that only 'item-with-tags' provides additionally to the user set description,then this post is a scripting feature request.

