proc Night() for(var/turf/T in world)//for all turfs if(T.icon_state == "night")//if its night turf T.icon_state = ""//make them day else//if its day T.icon_state = "night"//make the icons night for(var/obj/O in world)//for all obj if(O.icon_state == "night")//if its a night icon O.icon_state = ""//make them day else//if its day O.icon_state = "night"//make the icons night for(var/area/A in world)//for all area if(A.icon_state == "night")//if its a night icon A.icon_state = ""//make them day else//if its day A.icon_state = "night"//make the icons night for(var/mob/M in world)//for all mobs if(!M.client)//if its an npc if(M.night==1)//if its night M.night = 0//make it day else//otherwise M.night = 1//its night spawn(1200)//20 min Night()//again world New()// at the creation of the world ..() spawn(1) Night()//calls the night proc
Ok this is my night proc. I have one problem though. My game is uses a menu, and withing the dmi file for it there are tons of icons states icluding letters numbers and the menu backround itself. I figure if i made a night version so instead of menu.dmi i could make one nightmenu.dmi. Is there anyway that wthin this proc wherever it says 'menu.dmi' at night its replaced with 'nightmenu.dmi'. I was thinking defining a macro for each but im not to sure about going and doing that, any help?
This should work, but I havn't tested it.
-=Ken=-