I am working on making my forcefield mod compatible with 0.17 when I noticed different types of wall do not connect to each other.
I am making a duplicate of the stone wall and adding a tint to them, other than changing graphics, they are identical.
When I connect the walls up to themselves, they connect: When trying to connect different types of walls to each other it doesn't work, however different types of gates will act as one: And as last, gates do connect to other types of walls:
 So it seems only a wall-wall connection between different types doesn't seem to work. However Klonan thought it had something to do with the collision box, but I'm not changing them from vanilla walls:
  So it seems only a wall-wall connection between different types doesn't seem to work. However Klonan thought it had something to do with the collision box, but I'm not changing them from vanilla walls:
Code: Select all
-- __ForceFields2__/prototypes/entity/forcefield-builder.lua
function forceFieldWallEntity(color)
  local settings = require("prototypes/settings")[color]
  local forceFieldWall = util.table.deepcopy(data.raw["wall"]["stone-wall"])
  forceFieldWall.name                   = string.format(settings.name, "wall", color)
  forceFieldWall.icon_size              = nil
  forceFieldWall.icon                   = nil
  forceFieldWall.icons                  = LSlib.entity.getIcons("wall", "stone-wall", nil, nil, settings.colorTint)
  forceFieldWall.flags = forceFieldWall.flags or {}
  table.insert(forceFieldWall.flags, "not-repairable")
  forceFieldWall.minable                = {hardness = 0.2, mining_time = 1,
                                           result = (settings.manualPlaceable and forceFieldWall.name or nil),}
  forceFieldWall.mined_sound            = nil
  forceFieldWall.fast_replaceable_group = nil
  forceFieldWall.order                  = "a[items]-f[forcefields]"
  forceFieldWall.subgroup               = "forcefield"
  forceFieldWall.max_health             = settings.properties.maxHealth
  forceFieldWall.resistances            = settings.resistances
  local tint = settings.colorTint   -- add tint to wall
  for pictureName,picture in pairs(forceFieldWall.pictures) do
    -- https://wiki.factorio.com/Prototype/Wall#pictures
    if pictureName == "water_connection_patch" or pictureName == "gate_connection_patch" then
      local tempPicture                    = LSlib.entity.addTintToSprite4Way(picture, tint)
      forceFieldWall.pictures[pictureName] = LSlib.entity.removeShadowFromSprite4Way(tempPicture)
    else
      local tempPicture                    = LSlib.entity.addTintToSpriteVariation(picture, tint)
      forceFieldWall.pictures[pictureName] = LSlib.entity.removeShadowsFromSpriteVariation(tempPicture)
    end
  end
  data:extend{forceFieldWall}
end
Kind regards
lovely_santa



