Skip to content

Commit

Permalink
Fix killers stashes not emptied properly of vanilla items and having …
Browse files Browse the repository at this point in the history
…incorrect items count (#70)

* Fix stash not emptied properly

* Fix incorrect number of common items in stash
  • Loading branch information
3Mydlo3 authored Feb 15, 2024
1 parent 5230e37 commit 8ff00a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion addons/killers/functions/fnc_fillKillersStash.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ for "_y" from 0 to _itemsCount step 1 do {
private _stashAvailableCommonItemsCount = count EGVAR(equipment,killersStashCommonEquipment);
private _commonItemsCount = ceil (random 3) + floor (_stashAvailableCommonItemsCount/10);

for "_y" from 0 to _itemsCount step 1 do {
for "_y" from 0 to _commonItemsCount step 1 do {
// Add common equipment
private _newCommonItem = selectRandom EGVAR(equipment,killersStashCommonEquipment);
private _itemQuantity = ceil (random 2);
Expand Down
2 changes: 2 additions & 0 deletions addons/killers/functions/fnc_initKillersStashes.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ for "_y" from 0 to _createStatshesCount step 1 do {
private _stashPos = getPos _stash;
private _box = createVehicle ["O_CargoNet_01_ammo_F", _stashPos, [], 0, "NONE"];
clearItemCargoGlobal _box;
clearWeaponCargoGlobal _box;
clearMagazineCargoGlobal _box;
_box setVariable [QGVAR(killersStash), _stash];
_stash setVariable [QGVAR(box), _box];
_box call FUNC(fillKillersStash);
Expand Down

0 comments on commit 8ff00a2

Please sign in to comment.