New building functions, vanilla building checks

DZE_RequiredItemsCheck returns bool, displays an error of all the tools
the player is missing to build the item.

DZE_BuildChecks returns array of bools, canBuild and if the item is a
plotPole.  Also has the ability to check if the player has required
tools to build using DZE_RequiredItemsCheck.

The vanilla build script still needs to be modified to work over water
and allow players to place floating objects, but now uses plot checks.
It would be easiest to just modify the configs to use the epoch building
scripts instead.

fnc_getSetPos now accepts a position as the second element of the input
array. the object will be set to this position if it is used. This
change requires no code updates

Note: scripts with build and/or tool checks should be updated to use the
new functions
This commit is contained in:
icomrade
2016-04-27 14:30:05 -04:00
parent bb66b4446c
commit 7ea9a270f2
5 changed files with 153 additions and 210 deletions

View File

@@ -2,7 +2,11 @@
private "_pos";
_thingy = _this select 0;
_pos = getPosASL _thingy;
if ((count _this) > 1) then {
_pos = _this select 1;
} else {
_pos = getPosASL _thingy;
};
if (surfaceIsWater _pos) then {
_thingy setPosASL _pos;