vbawol/DayZ-Epoch — pull request #1505 by raymix (2014-08-07 12:41:10+00:00)
Title: function based player_build

Hey, guys.
First of all - this addition does not (as usual) replace original player_build by default. It has to be enabled inside mission file to work.

---

**The concept:**
By default player_build is a single large function, which means if anyone of addon makers comes up with an idea for modification - they have to replace whole function with their own even if actual changes were minor. This creates incompatibility between other addons using same function.
I've split whole function into bunch of smaller nested functions which can be then simply re-precompiled later inside mission file if needed. This allows mods to launch player_build as usual and control/change nested functions externally instead. Functions receives and sends arguments for most important variables (more can be added to args ofc), which again allows for some nice tricks when modding.

Snap building is integrated with this system by default.
A working example how functions are called and args received can be found inside modular_build.sqf file.

**In short** - simply put, it's still same old system, just split into smaller chunks for full control over each part instead of whole function.