Transport Fever 2

Transport Fever 2

Yeol's Senseless Industries
GordonDry 2021 年 9 月 12 日 下午 1: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?
< >
目前顯示第 1-1 則留言,共 1
GordonDry 2021 年 9 月 21 日 下午 3: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.
< >
目前顯示第 1-1 則留言,共 1
每頁顯示: 1530 50