mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Added config params for white/blacklisting digging (#5898)
* Added config params for white/blacklisting digging * changed to canDig option * Update README.md * Update fnc_canDig.sqf
This commit is contained in:
parent
801afb3061
commit
ead5fb4a5e
@ -24,8 +24,14 @@ if ((getPosATL _unit) select 2 > 0.05 || // Walking on objects, such as building
|
||||
) exitWith {false};
|
||||
|
||||
private _surfaceClass = (surfaceType _posASL) select [1];
|
||||
private _surfaceType = getText (configFile >> "CfgSurfaces" >> _surfaceClass >> "soundEnviron");
|
||||
private _surfaceDust = getNumber (configFile >> "CfgSurfaces" >> _surfaceClass >> "dust");
|
||||
private _config = configFile >> "CfgSurfaces" >> _surfaceClass;
|
||||
private _surfaceType = getText (_config >> "soundEnviron");
|
||||
private _surfaceDust = getNumber (_config >> "dust");
|
||||
|
||||
TRACE_2("Surface",_surfaceType,_surfaceDust);
|
||||
|
||||
!(_surfaceType in DIG_SURFACE_BLACKLIST) && {(_surfaceDust >= 0.1) || {_surfaceType in DIG_SURFACE_WHITELIST}}
|
||||
if (isNumber (_config >> "ACE_canDig")) then {
|
||||
getNumber (_config >> "ACE_canDig") // return
|
||||
} else {
|
||||
!(_surfaceType in DIG_SURFACE_BLACKLIST) && {(_surfaceDust >= 0.1) || {_surfaceType in DIG_SURFACE_WHITELIST}} // return
|
||||
};
|
||||
|
@ -4,6 +4,16 @@ ace_trenches
|
||||
Adds item 'ACE_entrenchingtool'
|
||||
Adds 2 trenches; Envelope - Small & Envelop - Big
|
||||
|
||||
### Whitelist surfaces for digging
|
||||
Single surfaces can be whitelisted by adding `ACE_canDig = 1` into `CfgSurfaces`.
|
||||
Example:
|
||||
```cpp
|
||||
class CfgSurfaces {
|
||||
class myAwesomeSurface {
|
||||
ACE_canDig = 1;
|
||||
};
|
||||
};
|
||||
```
|
||||
|
||||
## Maintainers
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user