class_name SurfaceMaterial

enum Type {
	UNKNOWN,
	GRUNK,
	PLASTIC,
	METAL,
}

const METAL_MATERIAL_GROUP := "MetalMaterial"
const PLASTIC_MATERIAL_GROUP := "PlasticMaterial"


static func material_for_collider(collider: Node) -> SurfaceMaterial.Type:
	if collider:
		if collider is GunkNode:
			return Type.GRUNK
		if collider.is_in_group(METAL_MATERIAL_GROUP):
			return Type.METAL
		if collider.is_in_group(PLASTIC_MATERIAL_GROUP):
			return Type.PLASTIC
	return Type.UNKNOWN
