The question you need to ask yourself is: How would you add the shading at runtime? Maybe make a little test program that draws 4 sprites in a square and changes the shading. If it works the way you imagine it being, sure, do it in code.
This is not generally possible in a 2D tile based engine. The computer just sees a bunch of flat colors, and can’t tell which of those are texture, and which are shading.
At the least, you would have to create extra assets: Mask overlays containing the edges of your sprites in all 4 cardinal directions, I‘d try. Then you could tint those masks light or dark and draw them at 20% alpha on top of a sprite. To lighten/ darken the requisite parts.
The question you‘ll have to ask yourself is: Is it more work to do this shading in the directions you need manually, or to create fewer masks and write code to do it at play-time?
Also, figure out how you can „cheat“ with your lighting. Do you really need all directions, or can you maybe get away with drawing only a few (maybe even only 2, from left or from right), and then blending the two. E.g. if you are 1/3rd from a light on the right and 2/3rds from one on the left, could you composite „lit from right“ with 66% alpha over „lit from left“?
Also, could you maybe get away with a fixed shading and just draw bright radial gradients (again, at a low opacity like 20%) around every light source?
Could you maybe use a hybrid approach of the above approaches?