Factorissimo2


Factorissimo adds factory buildings to Factorio. Place them down, walk in, build your factories inside!

Content
2 years ago
0.14 - 1.1
208K

i Remote interface

1 year, 10 months ago

Hello,
I'm working on a mod, which will have some additional functionality if Factorissimo2 is also present. However, for that I need to be able to get the surface and position of the factory interior of a specific factory building. So I'd like to suggest adding a remote interface for it, so other mods can access this information.

Could be something like:

remote.add_interface("Factorissimo2", {
    get_factory_interior_pos = function(entity_unit_number)
        local factory = global.factories_by_entity[entity_unit_number] 
        return {surface_name = factory.inside_surface.name, x = inside_x, y = inside_y}
    end,
})

(probably needs some additional checking for the existence of those fields)

Would help me a lot!

New response