Factorissimo 3


Factorissimo adds factory buildings to Factorio. Place them down, walk in, build your factories inside! Now updated for space age!

Content
9 days ago
1.1 - 2.0
92.7K
Logistics

b Bug with remote API and Krastorio 2

1 year, 3 months ago

Hi, I have a strange bug with Krastorio 2.
remote.call('factorissimo', 'get_factory_by_building', entity)
returns nil for the entity {name = "factory-1", type = "storage-tank"}
but only if Krastorio 2 ist installed.
Any idea to fix this? Thx

9 months ago

entity expects a LuaEntity not a table.

In order to fix this you must supply a reference to a luaentity such as by game.player.selected (which will give whichever you have hovered)

7 months ago
(updated 7 months ago)

when I call get_factory_by_building, it is this not always game.player.selected.
I need any entity I specify independend of player selection, calculated by distance. or similar
if i remember correctly after 7 months ;-) i wanted the building in which there is a specific chest (by foreach)