Posts: 166 Joined: Sun Mar 22 2009, 06:53AM Registered Member #4938
Your intentions are good but it doesn't seem like a very practical approach. What if tomorrow comes out an all new "caves_something" map which should have an entirely different image? And what about many other maps with variants which are not named "caves", "farm" or "rrbridge", should they be added to lgsl_class.php too? In my humble opinion, editing core php scripts within LGSL may be fine for a connaisseur like yourself, but sounds like a bad idea for the average user. The easy way to link multiple map names to the same map image is probably this (only if you run on LINUX): make a symlink for each map variant pointing to the same image name. In your case, you need to type the following into the Linux console, from within the images folder:
ln -s m01_caves.jpg m01_caves_day_.jpg
Basically, this will create a shortcut m01_caves_day_.jpg pointing to the same image m01_caves.jpg, working exactly like having 2 separate images but with less space occupied on the harddrive. You will need to have shell access to the webserver to do that, unless your ftp client or cpanel can also create symlinks. I'm not sure if shortcuts on Windows systems can do the same trick as symlinks on Linux, but one could try it and get back here to report...
In the main, most missions/mapnames were named after the maps. If not, I still needed a map image or to do as you've suggested.
I did it this way because it does not require you to have another map image, or know the mission/mapname I was faced with having to create as many as 10 identical images not to mention having to work out how many under_scores to get it to show up eg: