Skip to content

Commit

Permalink
Adjusted the notification for reaching the time limit to use paradigm…
Browse files Browse the repository at this point in the history
… notification
  • Loading branch information
FightKnight441 committed Sep 10, 2024
1 parent f059cff commit d01e591
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/functions/basebuilding/fn_resupplybuilding.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ private _supplyConsumptionRate = _supplySource getVariable ["para_g_supply_consu

private _proposedSuppliesSum = _currentSupplies + _supplies;
private _proposedRemainingTimeSeconds = _proposedSuppliesSum / _supplyConsumptionRate;
private _maxTimeLimit = 7200; // max time limit a building can have -2 hours in seconds
private _maxTimeLimit = 7200; // max time limit a building can have, 2 hours in seconds

// Check if the current lifetime would exceed the time limit
if ( _proposedRemainingTimeSeconds >= _maxTimeLimit) then {
// if the supplies that are being added will exceed 2 hours for the building, trim the supplies so that it only reaches 2 hours max. This will still consume the item!!!
_supplies = (_maxTimeLimit * _supplyConsumptionRate) - _currentSupplies;

hint "Time limit has reached its max, item still consumed.";
//this hint is important, it will notfiy players that the time limit has reached max, and adding any more items will just consume them without adding time
// notify players that time limit has been reached and item was still consumed
["TaskFailed",["",localize "STR_para_build_maxtimereached"]] call para_c_fnc_show_notification;
};


Expand Down

0 comments on commit d01e591

Please sign in to comment.