mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fixed default duration value in module init, Added error if required fields left empty, Combined 2 lines
This commit is contained in:
@ -29,8 +29,7 @@ _splittedList = [_list, ","] call BIS_fnc_splitString;
|
|||||||
_listNoWhitespace = [];
|
_listNoWhitespace = [];
|
||||||
if (_removeWhitespace) then {
|
if (_removeWhitespace) then {
|
||||||
{
|
{
|
||||||
_x = [_x] call EFUNC(common,stringRemoveWhiteSpace);
|
_listNoWhitespace pushBack ([_x] call EFUNC(common,stringRemoveWhiteSpace));
|
||||||
_listNoWhitespace pushBack _x;
|
|
||||||
} forEach _splittedList;
|
} forEach _splittedList;
|
||||||
_list = _listNoWhitespace;
|
_list = _listNoWhitespace;
|
||||||
};
|
};
|
||||||
|
@ -31,7 +31,10 @@ _objects = [_logic getVariable ["Objects", ""], true, true] call FUNC(makeList);
|
|||||||
_controllers = [_logic getVariable ["Controllers", ""], true, true] call FUNC(makeList);
|
_controllers = [_logic getVariable ["Controllers", ""], true, true] call FUNC(makeList);
|
||||||
_images = [_logic getVariable ["Images", ""], true, false] call FUNC(makeList);
|
_images = [_logic getVariable ["Images", ""], true, false] call FUNC(makeList);
|
||||||
_names = [_logic getVariable ["Names", ""], true, false] call FUNC(makeList);
|
_names = [_logic getVariable ["Names", ""], true, false] call FUNC(makeList);
|
||||||
_duration = _logic getVariable ["Duration", ""];
|
_duration = _logic getVariable ["Duration", 0];
|
||||||
|
|
||||||
|
// Exit if Images or Names fields are empty
|
||||||
|
if (_images == "" || {_names == ""}) exitWith {diag_log "[ACE] ERROR: Slideshow Module NOT Initialized: Images or Names fields can NOT be empty!"};
|
||||||
|
|
||||||
// Prepare with actions
|
// Prepare with actions
|
||||||
[_objects, _controllers, _images, _names, _duration] call FUNC(createSlideshow);
|
[_objects, _controllers, _images, _names, _duration] call FUNC(createSlideshow);
|
||||||
|
Reference in New Issue
Block a user