Skip to content

Commit

Permalink
Always allow to pay for free objects
Browse files Browse the repository at this point in the history
  • Loading branch information
veteran29 committed May 8, 2019
1 parent 1fcbaf5 commit 4fba305
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ params [
["_fuel", 0, [0]]
];

// Can always pay if there is no price
if ([_supplies, _ammo, _fuel] isEqualTo [0,0,0]) exitWith {true};

// Exit if no location is given
if (_location isEqualTo "") exitWith {false};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
File: fn_build_confirmSingle.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2018-11-29
Last Update: 2019-05-04
Last Update: 2019-05-09
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html
Public: No
Expand All @@ -31,7 +31,7 @@ _createParams params ["_className", "_pos", "_dir", "_justBuild"];
private _fob = _player getVariable ["KPLIB_fob", ""];

if !(([_fob] + _price) call KPLIB_fnc_resources_pay) exitWith {
[format ["Not enough resources to build: %1 at: %2", _className, _fob], "BUILD"] call KPLIB_fnc_common_log;
[format ["Not enough resources to build: %1 at: '%2', price: %3", _className, _fob, _price], "BUILD"] call KPLIB_fnc_common_log;
["KPLIB_build_not_enough_resources", [_className], _player] call CBA_fnc_targetEvent;
};

Expand Down

0 comments on commit 4fba305

Please sign in to comment.