@@ -6,7 +6,7 @@ Description:
66 Removes specific item(s) from cargo space.
77
88 Warning: All weapon attachments/magazines in containers in container will become detached.
9- Warning: Preset weapons without non-preset parents will get their attachments readded (engine limitation).
9+ Warning: Preset weapons without non-preset parents will get their attachments re-added (engine limitation).
1010
1111Parameters:
1212 _container - Object with cargo <OBJECT>
@@ -82,7 +82,7 @@ private _containerData = [];
8282 };
8383} forEach _allItemsType ;
8484
85- // Clear cargo space and readd the items as long it's not the type in question
85+ // Clear cargo space and re-add the items as long as it's not the type in question
8686clearItemCargoGlobal _container ;
8787
8888TRACE_1(" Old cargo" ,_containerData );
@@ -135,7 +135,7 @@ private _fnc_addContents = {
135135 // Non-container item
136136 // Add with new count
137137 _container addItemCargoGlobal [_itemClass , _itemCargoOrCount - _count ]; // Silently fails on 'count < 1'
138- TRACE_2(" Readding " ,_itemClass ,_itemCargoOrCount - _count );
138+ TRACE_2(" Re-adding " ,_itemClass ,_itemCargoOrCount - _count );
139139
140140 _count = 0 ;
141141 } else {
@@ -147,17 +147,17 @@ private _fnc_addContents = {
147147 };
148148 };
149149 } else {
150- // Readd only
150+ // Re-add only
151151 if (count _x < 4 ) then {
152152 // Non-container item
153153 _container addItemCargoGlobal [_itemClass , _itemCargoOrCount ];
154- TRACE_2(" Readding " ,_itemClass ,_itemCargoOrCount );
154+ TRACE_2(" Re-adding " ,_itemClass ,_itemCargoOrCount );
155155 } else {
156156 // Container item
157- // Save all containers for finding the one we readd after this
157+ // Save all containers for finding the one we re-add after this
158158 private _addedContainers = ((everyContainer _container ) apply {_x select 1 }) - everyBackpack _container ;
159159
160- // Readd
160+ // Re-add
161161 private _addedContainer = [_itemClass ] call CBA_fnc_getNonPresetClass ;
162162 _container addItemCargoGlobal [_addedContainer , 1 ];
163163
0 commit comments