LuaSurface#can_place_entity : name is an EntityID

User avatar
hgschmie
Fast Inserter
Fast Inserter
Posts: 114
Joined: Tue Feb 06, 2024 5:18 am
Contact:

LuaSurface#can_place_entity : name is an EntityID

Post by hgschmie »

In https://lua-api.factorio.com/latest/cla ... ace_entity, the `name` parameter is an EntityID

For https://lua-api.factorio.com/latest/cla ... ace_entity, `name` is documented as string. But it actually is an EntityID, one can pass an entity in there (ignoring the angry squiggly yellow lines in VSCode) and it works.

This seems to be a documentation problem, the actual functionality is fine.
Bilka
Factorio Staff
Factorio Staff
Posts: 3385
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: LuaSurface#can_place_entity : name is an EntityID

Post by Bilka »

Thanks, fixed for 2.0.42, also for LuaSurface::can_fast_replace.
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 “Resolved Requests”