AlexNisnevich/untrusted — pull request #301 by mikespook (2014-09-18 08:46:16+00:00)
Title: A modification for supporting mods

Hi, I've completed the mods supporting. I'm sure that it can work perfectly this time.

I'd like make some explanations here.

1. All 3rd part mods should be put into mods directory;
- The original level files in levels directory will be a soft-link as a `default` mod in mods;
- I made an example `The Great Wall` to show how to use mod;
- Here some modifications in source code I should explain:
- [Makefile L45,46](https://github.com/mikespook/untrusted/compare/master#diff-b67911656ef5d18c4ae36cb6741b7965R45) will detect if the mod is exist. If the use doesn't specify a mod, `default` one (in levels directory) will be used.
- [Makefile L49-51](https://github.com/mikespook/untrusted/compare/master#diff-b67911656ef5d18c4ae36cb6741b7965R49) will detect if L46 raised an error.
- [collect_levels_filename.sh](https://github.com/mikespook/untrusted/blob/f985dda47a6dbe0466a89f36a50a5678c171ef90/collect_levels_filename.sh) will collect level file names automatically, and put them into outcome(The list was hard code in game.js original. However it's not convenience for building mod).
- All this modification will not impact the process currently has. `make`, `make release` or `make runlocal` without the `mod` parameter will work as before (The soft-link must be there. If you don't like this, I can remove it with some extra verification).