ID:1657540
 
(See the best response by FKI.)
Code:
proc
Seasonalcheck()
set background=1
if(Season=="Winter")
for(var/turf/Landscapes/Grass/grass/G1 in world)
G1.icon='SeasonalTurf.dmi'
G1.icon_state="snow1"


Problem description:

Okay, so basically, this proc runs in World/New(), and it changes all existing Grass turf to Snow. The problem is, if there is a turf on top of it, it skips that, and doesn't run.

For example, Mountains don't cover a tile completely, but under the mountain turf there is grass. Regardless of my code, the grass doesn't change. It's not just with the mountain turf though, but any turf that is on top of grass will cause it to skip the changing of the icon and icon_state for some reason.

Is there any way to fix this?

Best response
It's due to the fact that when you place a turf on top of another turf, the latter is made the former's underlay (as in, it's not actually there as a turf anymore despite its appearance).
One turf may only occupy one x,y,z on the map. Any icons in which it 'looks' like multiple, it is actually a trick - these merge the icon states together giving the appearance of a multiple turfs, with the behavior of the most recent turf.

You would either want to make the mountains objects - or create something to rebuild the underlay.
What can I do to fix this? :(
You would make the trees /obj types and not turfs.