i'm making a mod that lets you change all existing logistic groups in one ui, but i can't figure out how to access them.
even if i wanted to give some entity all logistic groups to access them there, i wouldn't know what the strings are for:
https://lua-api.factorio.com/latest/cla ... dd_section
ideas ?
get list of all existing logistic sections?
get list of all existing logistic sections?
creator of 55 mods
My api requests/suggestions: ui relative for overlay||Grenade arc||Player Modifiers||textbox::selection||Singleplayer RCON||disable car's ground sounds
My api requests/suggestions: ui relative for overlay||Grenade arc||Player Modifiers||textbox::selection||Singleplayer RCON||disable car's ground sounds
Re: get list of all existing logistic sections?
Few days ago I had a similar problem, this is how I got it from an entity.
Now we need something to get all entities,"logistic-container", "cargo-landing-pad" or "space-platform-hub" got a requestpoint.
I think going through all entities can be achieved by these;
game.surfaces
Surface.find_entities_filtered
https://lua-api.factorio.com/latest/cla ... s_filtered
There might be easier ways, but this will definitly work
Code: Select all
local RequestPoint = CurrentEntity.get_requester_point()
if RequestPoint then
for Index, Section in ipairs( RequestPoint.sections) do
-- Groups can be shared between entities, so you might want to do something with it
local IsGroup = Section.group and Section.group ~= ""
if Section.filters then
for Index2=1, #Section.filters do
-- Slot is one request, contaisn all data
local Slot = Section.get_slot(Index2)
end
end
end
end
I think going through all entities can be achieved by these;
game.surfaces
Surface.find_entities_filtered
https://lua-api.factorio.com/latest/cla ... s_filtered
There might be easier ways, but this will definitly work
Re: get list of all existing logistic sections?
yeah i was trying to find a way around scanning all logistic points on all surfaces or caching every entity the player opens
creator of 55 mods
My api requests/suggestions: ui relative for overlay||Grenade arc||Player Modifiers||textbox::selection||Singleplayer RCON||disable car's ground sounds
My api requests/suggestions: ui relative for overlay||Grenade arc||Player Modifiers||textbox::selection||Singleplayer RCON||disable car's ground sounds