local data = NewRaycastWeaponBase._update_stats_values

function NewRaycastWeaponBase:_update_stats_values()
    data(self)

    local cus_stats = managers.weapon_factory:get_custom_stats_from_weapon(self._factory_id, self._blueprint)
    for part_id, stats in pairs (cus_stats) do
        if tweak_data.weapon.factory.parts[part_id].type ~= "ammo" then
            if stats.can_shoot_through_enemy ~= nil then
                self._can_shoot_through_enemy = stats.can_shoot_through_enemy
            end
            if stats.can_shoot_through_shield ~= nil then
                self._can_shoot_through_shield = stats.can_shoot_through_shield
            end
            if stats.can_shoot_through_wall ~= nil then
                self._can_shoot_through_wall = stats.can_shoot_through_wall
            end
        end
    end
end
