[0.14]David WM's Timelapse crudely updated by script kiddie
Posted: Mon May 22, 2017 12:03 am
I decided to post this crude hack of the Timelapse mod here because it was a pain to get working in 0.14 (so if you're really desperate to get it working and are even less adept at getting broken 0.12 mod code working in newer versions than I am ...which is probably unlikely if you're here to read this go ahead and grab it.) The code hack is really pretty dumb and crufty, which is why I'm not posting a pull request or attempting to upload it to the portal.
Changes:
1. The "seed" and "ticks" parts of the screenshot filename have been replaced with "MuddyAt" because the line accessing was causing a crash and was commented out, and because the modpack is called "Muddy Mountains". This will have the side effect of causing screenshots to get overwritten if you play an older game with screenshots enabled and then play a newer game with screenshots enabled in the same Factorio installation (I had this problem in the Badlands back in 0.12 because I tended to play with the same seed anyway.)
2. The mod does not print a console message for each screenshot. I have no idea why, but game.player.print(string) causes 0.14 to crash (player is nil) when it is happening within script.on_event(defines.on_tick). All of the other console print commands (which are responses to timelapse console commands such as /c remote.call("timelapse", "active")) work fine.
Changes:
1. The "seed" and "ticks" parts of the screenshot filename have been replaced with "MuddyAt" because the line accessing was causing a crash and was commented out, and because the modpack is called "Muddy Mountains". This will have the side effect of causing screenshots to get overwritten if you play an older game with screenshots enabled and then play a newer game with screenshots enabled in the same Factorio installation (I had this problem in the Badlands back in 0.12 because I tended to play with the same seed anyway.)
2. The mod does not print a console message for each screenshot. I have no idea why, but game.player.print(string) causes 0.14 to crash (player is nil) when it is happening within script.on_event(defines.on_tick). All of the other console print commands (which are responses to timelapse console commands such as /c remote.call("timelapse", "active")) work fine.