--credits to Indestructible Log Walls for the Code
--Just expanded it for Metal Fences

local old_onBigWiredFence = ISBlacksmithMenu.onBigWiredFence
ISBlacksmithMenu.onBigWiredFence = function(...)
    local old_fenceNew = ISWoodenWall.new
    ISWoodenWall.new = function(...)
        local wall2 = old_fenceNew(...)
        wall2.isThumpable = false
		--This baby ^ right here is what makes it invincible
        return wall2
    end
    old_onBigWiredFence(...)
    ISWoodenWall.new = old_fenceNew
end

local old_onDoubleMetalDoor = ISBlacksmithMenu.onDoubleMetalDoor
ISBlacksmithMenu.onDoubleMetalDoor = function(...)
    local old_doorNew = ISDoubleDoor.new
    ISDoubleDoor.new = function(...)
        local door1 = old_doorNew(...)
        door1.isThumpable = false
		--This baby ^ right here is what makes it invincible
        return door1
    end
    old_onDoubleMetalDoor(...)
    ISDoubleDoor.new = old_doorNew
end

--if you want to expand this to cover More Buildings
--navigate to steamapps\workshop\content\108600\515555911\mods\MoreBuilds\media\lua\server\BuildingObjects
--Find ISHighMetalFence.lua
--Find function ISHighMetalFence:addPart(x, y, z, north, sprite)
--add self.javaObject:setIsThumpable(false) after line 28, which should be after "self.javaObject:setThumpSound("ZombieThumpMetal")"
--???
--Profit