From 3f119c1a1085cf8b55f66a5d389736860ad7b78b Mon Sep 17 00:00:00 2001 From: Vdauphin Date: Wed, 1 Dec 2021 00:06:55 +0100 Subject: [PATCH] show the number of days since mission start --- .../core/def/mission.sqf | 2 ++ .../core/fnc/respawn/intro.sqf | 11 ++++++++++- .../core/init_server.sqf | 5 ++--- =BTC=co@30_Hearts_and_Minds.Altis/stringtable.xml | 12 ++++++------ 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/core/def/mission.sqf b/=BTC=co@30_Hearts_and_Minds.Altis/core/def/mission.sqf index 9f5e51b09..ab29bb7b2 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/core/def/mission.sqf +++ b/=BTC=co@30_Hearts_and_Minds.Altis/core/def/mission.sqf @@ -688,3 +688,5 @@ btc_flag_textures = [ //Respawn btc_body_bagTicketPlayer = 1; btc_body_enemyTicket = 1; + +btc_startDate = [2035, 6, 24, 12, 15]; diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/respawn/intro.sqf b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/respawn/intro.sqf index 7cf4f5145..d698db0f0 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/respawn/intro.sqf +++ b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/respawn/intro.sqf @@ -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]; diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/core/init_server.sqf b/=BTC=co@30_Hearts_and_Minds.Altis/core/init_server.sqf index b4731713f..68819a64c 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/core/init_server.sqf +++ b/=BTC=co@30_Hearts_and_Minds.Altis/core/init_server.sqf @@ -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]; diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/stringtable.xml b/=BTC=co@30_Hearts_and_Minds.Altis/stringtable.xml index 5a9d92ebb..173e06590 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/stringtable.xml +++ b/=BTC=co@30_Hearts_and_Minds.Altis/stringtable.xml @@ -83,12 +83,12 @@ Seul à réapparaitre - Base overview. Loading ... - Vista de la Base. Cargando ... - Basisübersicht. Lade ... - Visão geral da base. Carregando... - 基地总览. 加载中 ... - Aperçu de la base. Chargement en cours ... + Day %1. Base overview. + Day %1. Vista de la Base. + Day %1. Basisübersicht. + Day %1. Visão geral da base. + Day %1. 基地总览. + Jour %1. Aperçu de la base.