Code: Select all
log(serpent.block(data.raw))
- serpent.block() outputs nil for shared/self-referenced tables,
- Factorio's version of serpent changes nil to 0 (patch 0.18.15)
- Factorio's version of serpent
doesn't allow commentsturns comments off by default, so you don't get the --[[ref]] warning on the line in question or the --[[incomplete output with shared/self-references skipped]] comment at the end of the block
Code: Select all
log(serpent.block(data.raw.item.["bob-logistic-robot-5"]))
Code: Select all
...
["bob-logistic-robot-5"] = {
icon_size = 32,
icons = {
{icon = "__reskins-bobs__/graphics/icons/logistics/logistic-robot/logistic-robot-icon-base.png", icon_mipmaps = 4, icon_size = 64} --[[table]],
{
icon = "__reskins-bobs__/graphics/icons/logistics/logistic-robot/logistic-robot-icon-mask.png",
icon_mipmaps = 4,
icon_size = 64,
tint = 0
},
...
Code: Select all
_["bob-logistic-robot-5"].icons[2].tint = _["assembling-machine-6"].icons[2].tint