Add selection_box_offsets to rail-signal prototype

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
User avatar
snouz
Inserter
Inserter
Posts: 27
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}
},
Graphically contributed to : Bio Industries (soon) | Warehousing | MFerrari's mods | Brevven's mods | Bob Artisanal Reskins | Mining Drones | Teleporters | Emoji signals

Post Reply

Return to “Modding interface requests”