Skip to content

Commit

Permalink
Merge pull request #1254 from Vdauphin/Add-days_from_beginning
Browse files Browse the repository at this point in the history
Add: Show the number of days since mission start
  • Loading branch information
Vdauphin authored Dec 3, 2021
2 parents 65102e3 + 3f119c1 commit 9b42f09
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 10 deletions.
2 changes: 2 additions & 0 deletions =BTC=co@30_Hearts_and_Minds.Altis/core/def/mission.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -688,3 +688,5 @@ btc_flag_textures = [
//Respawn
btc_body_bagTicketPlayer = 1;
btc_body_enemyTicket = 1;

btc_startDate = [2035, 6, 24, 12, 15];
11 changes: 10 additions & 1 deletion =BTC=co@30_Hearts_and_Minds.Altis/core/fnc/respawn/intro.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@ if !(isNil "btc_veh_respawnable_1") then {
_array pushBack ['\A3\ui_f\data\map\vehicleicons\iconhelicopter_ca.paa', [0.7, 0, 0,1], getPos btc_veh_respawnable_1, 1.1, 1.1, 0, localize "STR_BTC_HAM_INTRO_ONLYRESPAWN", 1]; //Only Respawnable
};

[getMarkerPos "btc_base", localize "STR_BTC_HAM_INTRO_LOADINGTXT", 20, 30, 240, 0, _array, 0] call BIS_fnc_establishingShot;
waitUntil {time > 0}; //Wait for date synchronisation

private _startingDate = btc_startDate select [0, 3];
private _date = date select [0, 3];
private _days = (_date vectorDiff _startingDate) vectorDotProduct [365, 30.5, 1];
[
getMarkerPos "btc_base",
format [localize "STR_BTC_HAM_INTRO_LOADINGTXT", round _days],
20, 30, 240, 0, _array, 0
] call BIS_fnc_establishingShot;

enableSaving [false, false];
5 changes: 2 additions & 3 deletions =BTC=co@30_Hearts_and_Minds.Altis/core/init_server.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ if (btc_db_load && {profileNamespace getVariable [format ["btc_hm_%1_db", worldN

[] call btc_cache_fnc_init;

private _date = date;
_date set [3, btc_p_time];
setDate _date;
btc_startDate set [3, btc_p_time];
setDate btc_startDate;

{
_x setVariable ["btc_EDENinventory", _x call btc_log_fnc_inventoryGet];
Expand Down
12 changes: 6 additions & 6 deletions =BTC=co@30_Hearts_and_Minds.Altis/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@
<French>Seul à réapparaitre</French>
</Key>
<Key ID="STR_BTC_HAM_INTRO_LOADINGTXT">
<Original>Base overview. Loading ...</Original>
<Spanish>Vista de la Base. Cargando ...</Spanish>
<German>Basisübersicht. Lade ...</German>
<Portuguese>Visão geral da base. Carregando...</Portuguese>
<Chinesesimp>基地总览. 加载中 ...</Chinesesimp>
<French>Aperçu de la base. Chargement en cours ...</French>
<Original>Day %1. Base overview.</Original>
<Spanish>Day %1. Vista de la Base.</Spanish>
<German>Day %1. Basisübersicht.</German>
<Portuguese>Day %1. Visão geral da base.</Portuguese>
<Chinesesimp>Day %1. 基地总览.</Chinesesimp>
<French>Jour %1. Aperçu de la base.</French>
</Key>
</Container>
</Package>
Expand Down

0 comments on commit 9b42f09

Please sign in to comment.