Transport Fever 2

Transport Fever 2

Yeol's Senseless Industries
GordonDry 12. sep. 2021 kl. 13:49
Also clone loading animation entries when adding new cargo types by script?
For example, this structure is not fully cloned:

compartments = { { { { capacity = 19, customCargoModels = { configurations = { { slotLevels = { { }, { 0, }, { 1, }, { 2, }, { 3, }, }, }, }, }, type = "COAL", }, }, { { capacity = 19, customCargoModels = { configurations = { { slotLevels = { { }, { 4, }, { 5, }, { 6, }, { 7, }, }, }, }, }, type = "STONE", }, }, }, },

customCargoModels / configurations / slotLevels is ignored by senselessCB.lua

Is it even possible to clone that by script when adding new cargo types?
< >
Viser 1-1 af 1 kommentarer
GordonDry 21. sep. 2021 kl. 15:23 
Yes, I should be ashamed because the solution is so simple ...

...
local foundStonecustomCargoModels = null

...
foundStonecustomCargoModels = data.metadata.transportVehicle.compartments[j][k].customCargoModels
...
table.insert(data.metadata.transportVehicle.compartments, { { type = "LIMESTONE", capacity = foundStoneCapacity, cargoBay = foundStoneCargobay, customCargoModels = foundStonecustomCargoModels } })


Stuff like that.
< >
Viser 1-1 af 1 kommentarer
Per side: 1530 50