Skip to content

Commit

Permalink
Probably a faster way and much cleaner #170
Browse files Browse the repository at this point in the history
  • Loading branch information
CreepPork committed Dec 2, 2017
1 parent 6b60263 commit f0983fe
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,18 @@ private _addedObjects = 0;
private _allCuratorObjectsAfter = curatorEditableObjects (getAssignedCuratorLogic player);
if (_addObject) then
{
_addedObjects = count (_objectsToProcess select {(_x in _allCuratorObjectsAfter && !(_x in _allCuratorObjectsBefore)) && !isNull _x});
//_addedObjects = count (_objectsToProcess select {(_x in _allCuratorObjectsAfter && !(_x in _allCuratorObjectsBefore)) && !isNull _x});
if (!(_allCuratorObjectsBefore isEqualTo _allCuratorObjectsAfter)) then
{
_addedObjects = count (_allCuratorObjectsAfter - _allCuratorObjectsBefore);
};
}
else
{
_addedObjects = count (_objectsToProcess select {(_x in _allCuratorObjectsBefore && !(_x in _allCuratorObjectsAfter)) && !isNull _x && _x != _logic});
if (!(_allCuratorObjectsBefore isEqualTo _allCuratorObjectsAfter)) then
{
_addedObjects = count (_allCuratorObjectsBefore - _allCuratorObjectsAfter);
};
};

private _displayText = [localize "STR_ADD_OBJEKTE_TO_ZEUS", localize "STR_REMOVED_OBJEKTE_FROM_ZEUS"] select (_dialogResult select 0);
Expand Down

0 comments on commit f0983fe

Please sign in to comment.