Add selection_box_offsets to rail-signal prototype

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
User avatar
snouz
Long Handed Inserter
Long Handed Inserter
Posts: 53
Joined: Sun Jan 03, 2021 6:01 pm
Contact:

Add selection_box_offsets to rail-signal prototype

Post by snouz »

WHAT

Adding/moving selection_box_offsets from RailChainSignal to RailSignalBase

WHY

There's no reason to have this property in RailChainSignal but not RailSignal. Currently, when you offset the selection box (so the median point is not 0,0), the box rotates for the 4 main directions (N,E,S,W), but for the diagonals, it default to north. Illustration:
Image Image
(in this example: selection_box = {{-1.6, -0.8}, {0.01, 0.8}}, so north is offset to the left)

Solution is to bring in "selection_box_offsets", which already exists in RailChainSignal only:
selection_box_offsets = {
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0}
},
Planet Moshine, GUI Unifier + 17 mods, contributed graphically and otherwise to 70+ mods
Post Reply

Return to “Modding interface requests”