Allow writing to LuaCustomChartTag::position

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Pi-C
Smart Inserter
Smart Inserter
Posts: 1764
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Allow writing to LuaCustomChartTag::position

Post by Pi-C »

Moving a LuaCustomChartTag around is easy for players (click on the tag, then on the button next to the trash-can icon), but impossible for mods:

Currently, if we want to move a LuaCustomChartTag, we cannot simply change its position because LuaCustomChartTag::position is a read-only value. Instead, we have to destroy the existing tag and recreate it on the new position. This is not really efficient, because the game has to deal with more objects and will also raise more events (on_chart_tag_removed and on_chart_tag_added vs. just on_chart_tag_modified).

As players are allowed to move a chart tag, I suppose the game must already have a way to modify the chart tag position. Could you make LuaCustomChartTag::position writable, please, so that mods can move chart tags as well?
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
Post Reply

Return to “Modding interface requests”