mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fixed: max litter scalar array, have internal values.
This commit is contained in:
parent
20740679cc
commit
aad8d6b785
@ -79,7 +79,11 @@ class ACE_Settings {
|
||||
displayName = "$STR_ACE_Medical_litterSimulationDetail";
|
||||
description = "$STR_ACE_Medical_litterSimulationDetail_Desc";
|
||||
typeName = "SCALAR";
|
||||
value = 500;
|
||||
|
||||
value = 3;
|
||||
values[] = {"Off", "Low", "Medium", "High", "Ultra"};
|
||||
_values[] = { 0, 50, 100, 1000, 5000 };
|
||||
|
||||
isClientSettable = 1;
|
||||
};
|
||||
class GVAR(litterCleanUpDelay) {
|
||||
|
@ -4,7 +4,7 @@
|
||||
if(!hasInterface) exitWith { false };
|
||||
|
||||
PARAMS_3(_litterClass,_position,_direction);
|
||||
private["_litterObject"];
|
||||
private["_litterObject", "_maxLitterCount"];
|
||||
|
||||
if (isNil QGVAR(allCreatedLitter)) then {
|
||||
GVAR(allCreatedLitter) = [];
|
||||
@ -14,7 +14,8 @@ if (isNil QGVAR(allCreatedLitter)) then {
|
||||
_litterObject = _litterClass createVehicleLocal _position;
|
||||
_litterObject setDir _direction;
|
||||
|
||||
if((count GVAR(allCreatedLitter)) > GVAR(litterSimulationDetail) ) then {
|
||||
_maxLitterCount = getArray (configFile >> "ACE_Settings" >> QGVAR(litterSimulationDetail) >> "_values") select GVAR(litterSimulationDetail);
|
||||
if((count GVAR(allCreatedLitter)) > _maxLitterCount ) then {
|
||||
// gank the first litter object, and spawn ours.
|
||||
private["_oldLitter"];
|
||||
_oldLitter = GVAR(allCreatedLitter) deleteAt 0;
|
||||
|
Loading…
Reference in New Issue
Block a user