LuaRendering .draw_xyz { target = "construction preview of player 1" }

Post Reply
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5201
Joined: Tue Jul 12, 2016 9:03 am
Contact:

LuaRendering .draw_xyz { target = "construction preview of player 1" }

Post by eradicator »

What?

The ability to specify that a custom render should be at the position of a players current construction preview, and only visible to that one player. (This is different from the precise cursor position, as buildings snap to the tile grid.)

Why?

To allow custom construction overlays. I.e. a turrent will show it's range while building, but if i have i.e. a "lumberjack" (scripted assembling-machine) that only works near trees, then i have no way of showing the buildings effective range before it is placed. With the new LuaRendering system it would be trivial for a mod to manage such an overlay via on_player_cursor_stack_changed.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Bilka
Factorio Staff
Factorio Staff
Posts: 2790
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: LuaRendering .draw_xyz { target = "construction preview of player 1" }

Post by Bilka »

I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Post Reply

Return to “Implemented mod requests”