I’m attempting a little tweak to allow selection of multiple entities (renewable resource nodes) for transplant. The idea is to drag a selection box and have the applicable selected entities pop to the cursor in turn as though they were individually selected and the “Move Item” button was clicked.
The entity selection is done in lua, and I have a working function that results in a table containing only transplantable entities. Here’s the contents of an example table:
key value
------ ------------------------
259208 (259208 Wild silkweed)
188985 (188985 Berry Bush)
258902 (258902 Wild silkweed)
186544 (186544 Berry Bush)
259055 (259055 Wild silkweed)
I think I understand how to return the information to the js, but I have no idea in what form I need to return it such that it’s usable or can be transformed into something usable. The context in which I’ll need to use it is eg.
placeItem: function(item) {
this._placeItemOrItemType('item', 'placeItem', item);
},
Any input would be appreciated.