OK, I think I have a solution. In your
_integrate_forces function, remove the wall colllision test and add the following code in the loop below:
for x in range(s.get_contact_count()):
var ci = s.get_contact_local_normal(x)
if (ci.dot(Vector2(0, -1)) > 0.6):
found_floor = true
floor_index = x
elif (ci.dot(Vector2(1, 0)) < 0) != get_node("charsprite").is_flipped_h():
bump = "bump"
wall_found = true
This compares the sprite's direction to the non-ground normals, and if they are opposite, the "bump" occurs. Make sure you have enough "Contacts Reported" in your RigidBody or the wall could be ignored.