Hi VaccumTube,
thanks a lot for your input.
Do you know what "includeData=true" does exactly?
What Ido use is
local CId = (game.interface.getEntities({ radius = 1e100 }, { type = "CONSTRUCTION" }))
for j = 1, #CId do
local id = CId[j]
print(commonapi.dmp (game.interface.getEntity (id)))
end
(I don't really know why "j" by the way, I simply seen it like that in a tutorial)
And it seems to output the same result, for a Quarry eg.
{
baseEdges = {},
baseNodes = {},
dateBuilt = {
day = 1,
month = 1,
year = 1915
},
depots = {},
fileName = "industry/quarry.con",
id = 128044,
name = "Pueblo Quarry",
params = {
autoUpgrade = 1,
inputEnabled = 1,
paramX = 0,
paramY = 0,
productionLevel = 0,
seed = 23,
year = 1925
},
particleSystems = { 128304, 128453, 128454, 128455 },
position = { -2834.4162597656, -13413.927734375, 7.1891117095947 },
simBuildings = { 128303 },
stations = {},
townBuildings = {},
transf = { -0.47138538956642, -0.88192731142044, 0, 0, 0.88192731142044, -0.47138538956642, 0, 0, 0, 0, 1, 0, -2827.3454589844, -13411.0546875, 4.9164047241211, 1 },
type = "CONSTRUCTION"
}
Alles anzeigen
Here is what I believe is a town's industrial building :
{
baseEdges = {},
baseNodes = {},
dateBuilt = {
day = 1,
month = 1,
year = 1915
},
depots = {},
fileName = "building/era_a/ind_1_4x4_01.con",
id = 125663,
name = "no name",
params = {
capacity = 8,
cargoTypes = { "CONSTRUCTION_MATERIALS" },
depth = 40,
parcelFace = { { -15.9970703125, -0.00048828125, 0.24740314483643 }, { -7.998046875, 0.00048828125, 0.09761905670166 }, { 0, 0, 0 }, { 7.9990234375, 0, -0.026755094528198 }, { 15.9970703125, -0.00048828125, -0.026755094528198 }, { 15.998046875, 31.99951171875, -0.026755094528198 }, { 7.9990234375, 31.99951171875, -0.026755094528198 }, { 0, 32, 0 }, { -7.998046875, 32.00048828125, 0.09761905670166 }, { -15.9970703125, 31.99951171875, 0.24740314483643 } },
seed = -41848,
upgrade = true,
width = 40
},
particleSystems = { 128296, 128297 },
personCapacity = {
capacity = 8,
type = "INDUSTRIAL"
},
position = { -1026.4289550781, -11538.791992188, 8.5431528091431 },
simBuildings = {},
stations = {},
townBuildings = { 125664 },
transf = { -0.6730283498764, -0.73961669206619, 0, 0, 0.73961669206619, -0.6730283498764, 0, 0, 0, 0, 1, 0, -1038.2624511719, -11528.0234375, 3.8167681694031, 1 },
type = "CONSTRUCTION"
}
Alles anzeigen
As you did mention, simBuildings does have an ID in the first case, a production facility, while it's empty in the second, a workplace.
The opposite for townBuildings.
I've also noticed that non production industries have "name = "no name",".
I'll lookup in the files if I can find some simBuildings id soemwhere.
What industries on your test map "didn't produce anything and didn't have any entries of Cargotype in their simbuilding table."?
Would you have an stdout or even a savegame?
Cheers