I'm setting both of them identically:Error while running setup for entity prototype "lamp-flip-dot" (lamp): next_upgrade target (switch-flip-dot) must have the same collision mask.
Code: Select all
lamp_entity.collision_mask = data.raw["lamp"]["small-lamp"].collision_mask
switch_entity.collision_mask = data.raw["lamp"]["small-lamp"].collision_mask
Code: Select all
log(serpent.block(data.raw["lamp"]["small-lamp"].collision_mask))
log(serpent.block(data.raw["lamp"]["lamp-flip-dot"].collision_mask))
log(serpent.block(data.raw["power-switch"]["switch-flip-dot"].collision_mask))
Code: Select all
2.080 Script @__flip-dots__/data.lua:9: nil
2.080 Script @__flip-dots__/data.lua:10: nil
2.080 Script @__flip-dots__/data.lua:11: nil
2.352 Script @__flip-dots__/data-final-fixes.lua:29: nil
2.352 Script @__flip-dots__/data-final-fixes.lua:30: nil
2.352 Script @__flip-dots__/data-final-fixes.lua:31: nil
https://lua-api.factorio.com/latest/typ ... ector.html
data.raw["lamp"]["small-lamp"].collision_mask = {layers = {item = true, meltable = true, object = true, player = true, water_tile = true, is_object = true, is_lower_object = true}}
Then like before I copied the small lamp's collision mask to my flip dots. This allows the mod to load.
It doesn't seem like I should have to modify the small-lamp to make it work. So I wonder if this is a bug in the game in that "nil" is somehow a valid value for the collision_mask but the check to verify that two masks are the same doesn't work when they're both nil, or perhaps the lamp is supposed to have a collision mask but it doesn't. So should I just set the collision mask to that example or should I submit a bug report about this? I don't really know Lua so I'm not all that confident that I know what I'm doing here.