Sometimes it’s difficult to define what is a metaphor and what isn’t. The word “shell” has many uses– a nutshell, an eggshell, the shell of a turtle or a clam or a bullet– but they’re all considered equally literal because the meaning of “shell” (at least currently) is seen to be very broad: “a hard outer covering.”
Yet, presumably, one of those uses came first; presumably there was a time when only one type of hard outer covering was called a shell. For instance, if the shell of an egg was the first thing to be called a shell, did people consider it a metaphor when the next thing (a nutshell, perhaps) was given that name?
When someone took the word “battery,” back when it only meant “beating” “or “bombardment,” and used it to refer to a group of weapons, was that a metaphor? Perhaps not, since weapons are used for battering. When someone took that meaning and used it for a cluster of power cells, was that a metaphor? Perhaps not, since by then the word “battery” may have begun to refer generally to a group of objects. Yet you can’t really say that “battery” for “beating” and “battery” for “power cells” are literal in the same way. Language is sometimes so counterintuitive…