Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
Add ToFixed to the rest of Numbers being Displayed for Consistency (o…
Browse files Browse the repository at this point in the history
…fficial-antistasi-community#2369)

Same treatment as official-antistasi-community#2321 for consistency, in theory its not needed as its probably very Rare to reach that much Personal Money/HR.
And Killed one Singleplayer Line in the process.
  • Loading branch information
Lazejun committed Jun 11, 2022
1 parent 794fe37 commit b105c74
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 18 deletions.
2 changes: 1 addition & 1 deletion A3A/addons/core/functions/Base/fn_logPerformance.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ private _performanceLog = format [
,{!isPlayer _x && !isNull (_x findNearestEnemy _x)} count allUnits
,{behaviour leader _x == "COMBAT"} count allGroups
,(server getVariable "resourcesFIA") toFixed 0
,server getVariable "hr"
,(server getVariable "hr") toFixed 0
,aggressionOccupants
,aggressionInvaders
,tierWar
Expand Down
4 changes: 2 additions & 2 deletions A3A/addons/core/functions/Base/fn_resourcesFIA.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ _resourcesFIASim = "";
if (_resourcesFIA > 0) then {_resourcesFIASim = "+"};
if ((_hr != 0) and (_resourcesFIA != 0)) then
{
_textX = format ["<t size='0.6' color='#C1C0BB'>%5 Resources.<br/> <t size='0.5' color='#C1C0BB'><br/>HR: %3%1<br/>Money: %4%2 €",_hr,_resourcesFIA,_hrSim,_resourcesFIASim,FactionGet(reb,"name")]
_textX = format ["<t size='0.6' color='#C1C0BB'>%5 Resources.<br/> <t size='0.5' color='#C1C0BB'><br/>HR: %3%1<br/>Money: %4%2 €",_hr toFixed 0,_resourcesFIA toFixed 0,_hrSim,_resourcesFIASim,FactionGet(reb,"name")]
}
else
{
if (_hr != 0) then {_textX = format ["<t size='0.6' color='#C1C0BB'>%5 Resources.<br/> <t size='0.5' color='#C1C0BB'><br/>HR: %3%1",_hr,_resourcesFIA,_hrSim,FactionGet(reb,"name")]} else {if (_resourcesFIA != 5) then {_textX = format ["<t size='0.6' color='#C1C0BB'>%5 Resources.<br/> <t size='0.5' color='#C1C0BB'><br/>Money: %4%2 €",_hr,_resourcesFIA,_hrSim,_resourcesFIASim,FactionGet(reb,"name")]}};
if (_hr != 0) then {_textX = format ["<t size='0.6' color='#C1C0BB'>%5 Resources.<br/> <t size='0.5' color='#C1C0BB'><br/>HR: %3%1",_hr toFixed 0,_resourcesFIA toFixed 0,_hrSim,FactionGet(reb,"name")]} else {if (_resourcesFIA != 5) then {_textX = format ["<t size='0.6' color='#C1C0BB'>%5 Resources.<br/> <t size='0.5' color='#C1C0BB'><br/>Money: %4%2 €",_hr toFixed 0,_resourcesFIA toFixed 0,_hrSim,_resourcesFIASim,FactionGet(reb,"name")]}};
};

if (_textX != "") then
Expand Down
19 changes: 6 additions & 13 deletions A3A/addons/core/functions/Base/fn_statistics.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,20 @@ _setText ctrlSetBackgroundColor [0,0,0,0];
private _player = player getVariable ["owner",player]; // different, if remote-controlling
private _ucovertxt = ["Off", "<t color='#1DA81D'>On</t>"] select ((captive _player) and !(_player getVariable ["incapacitated",false]));

if (!isMultiplayer) then
if (_player != theBoss) then
{
_textX = format ["<t size='0.67' shadow='2'>" + "HR: %1 | %9 Money: %2 € | Airstrikes: %5 | %7 Aggr: %3 | %8 Aggr: %4 | War Level: %6 | Undercover Mode: %10", server getVariable "hr", (server getVariable "resourcesFIA") toFixed 0,[aggressionLevelOccupants] call A3A_fnc_getAggroLevelString,[aggressionLevelInvaders] call A3A_fnc_getAggroLevelString,floor bombRuns,tierWar,FactionGet(occ,"name"),FactionGet(inv,"name"),FactionGet(reb,"name"),_ucovertxt];
private _nameC = if !(isNull theBoss) then {name theBoss} else {"None"};
_textX = format ["<t size='0.67' shadow='2'>" + "Commander: %3 | Rank: %2 | HR: %1 | Your Money: %4 € | %8 Aggr: %5 | %9 Aggr: %6 | War Level: %7 | Undercover Mode: %10", (server getVariable "hr") toFixed 0, rank _player, _nameC, (_player getVariable "moneyX") toFixed 0,[aggressionLevelOccupants] call A3A_fnc_getAggroLevelString,[aggressionLevelInvaders] call A3A_fnc_getAggroLevelString,tierWar,FactionGet(occ,"name"),FactionGet(inv,"name"),_ucovertxt];
}
else
{
if (_player != theBoss) then
if ([_player] call A3A_fnc_isMember) then
{
private _nameC = if !(isNull theBoss) then {name theBoss} else {"None"};
_textX = format ["<t size='0.67' shadow='2'>" + "Commander: %3 | Rank: %2 | HR: %1 | Your Money: %4 € | %8 Aggr: %5 | %9 Aggr: %6 | War Level: %7 | Undercover Mode: %10", server getVariable "hr", rank _player, _nameC, _player getVariable "moneyX",[aggressionLevelOccupants] call A3A_fnc_getAggroLevelString,[aggressionLevelInvaders] call A3A_fnc_getAggroLevelString,tierWar,FactionGet(occ,"name"),FactionGet(inv,"name"),_ucovertxt];
_textX = format ["<t size='0.67' shadow='2'>" + "Rank: %5 | HR: %1 | Your Money: %6 € | %11 Money: %2 € | Airstrikes: %7 | %9 Aggr: %3 | %10 Aggr: %4 | War Level: %8 | Undercover Mode: %12", (server getVariable "hr") toFixed 0, (server getVariable "resourcesFIA") toFixed 0, [aggressionLevelOccupants] call A3A_fnc_getAggroLevelString,[aggressionLevelInvaders] call A3A_fnc_getAggroLevelString,rank _player, (_player getVariable "moneyX") toFixed 0,floor bombRuns,tierWar,FactionGet(occ,"name"),FactionGet(inv,"name"),FactionGet(reb,"name"),_ucovertxt];
}
else
{
if ([_player] call A3A_fnc_isMember) then
{
_textX = format ["<t size='0.67' shadow='2'>" + "Rank: %5 | HR: %1 | Your Money: %6 € | %11 Money: %2 € | Airstrikes: %7 | %9 Aggr: %3 | %10 Aggr: %4 | War Level: %8 | Undercover Mode: %12", server getVariable "hr", (server getVariable "resourcesFIA") toFixed 0, [aggressionLevelOccupants] call A3A_fnc_getAggroLevelString,[aggressionLevelInvaders] call A3A_fnc_getAggroLevelString,rank _player, _player getVariable "moneyX",floor bombRuns,tierWar,FactionGet(occ,"name"),FactionGet(inv,"name"),FactionGet(reb,"name"),_ucovertxt];
}
else
{
_textX = format ["<t size='0.67' shadow='2'>" + "Rank: %1 | Your Money: %2 € | %3 Money: %4 € | %5 Aggr: %6 | %7 Aggr: %8 | War Level: %9 | Undercover Mode: %10",rank _player,_player getVariable "moneyX",FactionGet(reb,"name"),(server getVariable "resourcesFIA") toFixed 0, FactionGet(occ,"name"), [aggressionLevelOccupants] call A3A_fnc_getAggroLevelString, FactionGet(inv,"name"),[aggressionLevelInvaders] call A3A_fnc_getAggroLevelString,tierWar,_ucovertxt];
};
_textX = format ["<t size='0.67' shadow='2'>" + "Rank: %1 | Your Money: %2 € | %3 Money: %4 € | %5 Aggr: %6 | %7 Aggr: %8 | War Level: %9 | Undercover Mode: %10",rank _player,(_player getVariable "moneyX") toFixed 0,FactionGet(reb,"name"),(server getVariable "resourcesFIA") toFixed 0, FactionGet(occ,"name"), [aggressionLevelOccupants] call A3A_fnc_getAggroLevelString, FactionGet(inv,"name"),[aggressionLevelInvaders] call A3A_fnc_getAggroLevelString,tierWar,_ucovertxt];
};
};

Expand Down
2 changes: 1 addition & 1 deletion A3A/addons/core/functions/Save/fn_saveLoop.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,6 @@ _fuelAmountleftArray = [];

saveProfileNamespace;
savingServer = false;
_saveHintText = ["<t size='1.5'>",FactionGet(reb,"name")," Assets:<br/><t color='#f0d498'>HR: ",str _hrBackground,"<br/>Money: ",_resourcesBackground toFixed 0," €</t></t><br/><br/>Further infomation is provided in <t color='#f0d498'>Map Screen > Game Options > Persistent Save-game</t>."] joinString "";
_saveHintText = ["<t size='1.5'>",FactionGet(reb,"name")," Assets:<br/><t color='#f0d498'>HR: ",_hrBackground toFixed 0,"<br/>Money: ",_resourcesBackground toFixed 0," €</t></t><br/><br/>Further infomation is provided in <t color='#f0d498'>Map Screen > Game Options > Persistent Save-game</t>."] joinString "";
["Persistent Save",_saveHintText] remoteExec ["A3A_fnc_customHint",0,false];
Info("Persistent Save Completed");
2 changes: 1 addition & 1 deletion A3A/addons/core/functions/Save/fn_savePlayer.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ if (isMultiplayer) then
};
[_playerId, "moneyX", _totalMoney] call A3A_fnc_savePlayerStat;

Info_3("Saved player %1: %2 rank, %3 money, %4 vehicles", _playerId, rank _playerUnit, _totalMoney);
Info_3("Saved player %1: %2 rank, %3 money", _playerId, rank _playerUnit, _totalMoney toFixed 0);
};

if (!_globalSave) then { saveProfileNamespace };
Expand Down

0 comments on commit b105c74

Please sign in to comment.