Skip to content

Commit fee7a31

Browse files
DomT602Jason2605
andauthored
Reveal objects rework (#603)
* Initial commit * Player tag change * Remove tabs * Missing paycheck message Co-authored-by: Jason_000 <Jason2605@users.noreply.github.com>
1 parent 4956654 commit fee7a31

8 files changed

Lines changed: 25 additions & 28 deletions

File tree

Altis_Life.Altis/config/Config_SpyGlass.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ class SpyGlass {
323323
{ "luce_1", "SCRIPT" }, { "life_bail_amount", "SCALAR" }, { "life_canpay_bail", "BOOL" }, { "hc_life", "SCALAR" }, { "life_fnc_requestclientid", "OBJECT" }, { "life_hc_isactive", "BOOL" }, { "ton_fnc_playtime_values", "ARRAY" }, { "ton_fnc_playtime_values_request", "ARRAY" }, { "hc_1", "OBJECT" }, { "hc_life", "BOOL" }, { "rscdisplaympinterrupt_respawntime", "SCALAR" }, { "bis_dynamictext_spawn_8", "SCRIPT" },
324324
{ "life_my_gang", "OBJECT" }, {"am_exit","SCALAR"}, { "life_garage_sp", "ARRAY" }, { "life_garage_sp", "STRING" }, { "0", "ARRAY" }, { "life_oldvestitems", "ARRAY" }, { "life_shop_cam", "OBJECT" }, { "life_oldclothes", "STRING" }, { "life_cmenu_lock", "BOOL" }, { "life_oldhat", "STRING" }, { "life_oldvest", "STRING" }, { "life_oldglasses", "STRING" }, { "life_oldbackpackitems","ARRAY"},
325325
{"life_oldbackpack","STRING"}, { "rscnotification_data", "ARRAY" }, { "life_curwep_h", "STRING" }, { "carshop_lux_1", "OBJECT" }, { "life_olduniformitems", "ARRAY" }, { "bis_fnc_setvehiclemass_fsm", "SCALAR" }, { "life_3dPreview_light", "OBJECT" }, { "life_3dPreview_camera", "OBJECT" }, { "life_3dPreview_object", "OBJECT" },
326-
{ "life_pos_attach", "ARRAY" }, { "life_inv_", "SCALAR" }, { "life_markers", "BOOL" }, { "life_markers_active", "BOOL" }, { "life_frozen", "BOOL" }, { "life_settings_revealobjects", "BOOL" }, { "life_inv_rooster", "SCALAR" }, { "station_shop_09", "OBJECT" }, { "station_shop_08", "OBJECT" }, { "station_shop_07", "OBJECT" }, { "station_shop_06", "OBJECT" }, { "station_shop_04", "OBJECT" }, { "life_disable_getout", "BOOL" },
326+
{ "life_pos_attach", "ARRAY" }, { "life_inv_", "SCALAR" }, { "life_markers", "BOOL" }, { "life_markers_active", "BOOL" }, { "life_frozen", "BOOL" }, { "life_inv_rooster", "SCALAR" }, { "station_shop_09", "OBJECT" }, { "station_shop_08", "OBJECT" }, { "station_shop_07", "OBJECT" }, { "station_shop_06", "OBJECT" }, { "station_shop_04", "OBJECT" }, { "life_disable_getout", "BOOL" },
327327
{ "bis_taskenhancements_3d", "BOOL" }, { "life_settings_enablenewsbroadcast", "BOOL" }, { "life_settings_enablesidechannel", "BOOL" }, { "life_isknocked", "BOOL" }, { "life_settings_viewdistancecar", "SCALAR" }, { "life_save_gear", "ARRAY" }, { "life_settings_viewdistanceair", "SCALAR" }, { "life_disable_getin", "BOOL" }, { "life_god", "BOOL" }, { "station_shop_3", "OBJECT" }, { "station_shop_2", "OBJECT" },
328328
{ "station_shop_1", "OBJECT" }, { "station_shop_24", "OBJECT" }, { "station_shop_23", "OBJECT" }, { "station_shop_22", "OBJECT" }, { "station_shop_21", "OBJECT" }, { "station_shop_20", "OBJECT" }, { "life_settings_viewdistancefoot", "SCALAR" }, { "life_settings_tagson", "BOOL" }, { "station_shop_19", "OBJECT" }, { "bis_taskenhancements_enable", "BOOL" }, { "station_shop_18", "OBJECT" }, { "station_shop_17", "OBJECT" },
329329
{ "life_container_activeobj", "OBJECT" }, { "station_shop_16", "OBJECT" }, { "station_shop_15", "OBJECT" }, { "station_shop_14", "OBJECT" }, { "station_shop_13", "OBJECT" }, { "station_shop_12", "OBJECT" }, { "station_shop_11", "OBJECT" }, { "station_shop_10", "OBJECT" }, { "life_progress", "DISPLAY" }, { "life_veh_shop", "ARRAY" }, { "bis_fnc_feedback_deltadamage", "SCALAR" }, { "life_clothing_store", "STRING" },
@@ -351,7 +351,7 @@ class SpyGlass {
351351
{ "db_async_active", "BOOL" }, { "life_removewanted", "BOOL" }, { "life_redgull_effect", "SCALAR" }, { "life_id_playertags", "STRING" }, { "life_delivery_in_progress", "BOOL" }, { "life_inv_ornate", "SCALAR" }, { "fed_bank", "OBJECT" }, { "bis_uncblur", "SCALAR" }, { "life_inv_tunaraw", "SCALAR" }, { "license_civ_medmarijuana", "BOOL" }, { "life_inv_mullet", "SCALAR" }, { "life_vdair", "SCALAR" },
352352
{ "life_inv_diamondcut", "SCALAR" }, { "bis_suffblur", "SCALAR" }, { "license_civ_salt", "BOOL" }, { "life_carryweight", "SCALAR" }, { "life_server_isready", "BOOL" }, { "hq_lt_1", "OBJECT" }, { "life_inv_catsharkraw", "SCALAR" }, { "heroin_processor", "OBJECT" }, { "life_respawn_timer", "SCALAR" }, { "carshop1_2", "OBJECT" }, { "hq_desk_1", "OBJECT" }, { "carshop1_3", "OBJECT" },
353353
{ "bis_blendcoloralpha", "SCALAR" }, { "life_vdcar", "SCALAR" }, { "db_async_extralock", "BOOL" }, { "life_clothing_purchase", "ARRAY" }, { "license_civ_driver", "BOOL" }, { "license_civ_ggst1", "BOOL" }, { "license_civ_ggst2", "BOOL" }, { "license_civ_ggst3", "BOOL" }, { "vhe_fnc_grua", "CODE" }, { "vhe_fnc_initgrua", "CODE" }, { "vhe_fnc_sirenasems", "CODE" }, { "vhe_fnc_sirenas", "CODE" }, { "reb_1_4", "OBJECT" },
354-
{ "ggs_shop", "OBJECT" }, { "reb_helicopter_1", "OBJECT" }, { "reb_helicopter_2", "OBJECT" }, { "life_inv_spikestrip", "SCALAR" }, { "license_civ_heroin", "BOOL" }, { "life_inv_waterbottle", "SCALAR" }, { "bis_oldlifestate", "STRING" }, { "life_inv_ornateraw", "SCALAR" }, { "life_id_revealobjects", "STRING" }, { "h1_3", "OBJECT" }, { "bis_pp_burnparams", "ARRAY" },
354+
{ "ggs_shop", "OBJECT" }, { "reb_helicopter_1", "OBJECT" }, { "reb_helicopter_2", "OBJECT" }, { "life_inv_spikestrip", "SCALAR" }, { "license_civ_heroin", "BOOL" }, { "life_inv_waterbottle", "SCALAR" }, { "bis_oldlifestate", "STRING" }, { "life_inv_ornateraw", "SCALAR" }, { "life_id_revealobjects", "SCALAR" }, { "life_id_playertags", "SCALAR" }, { "h1_3", "OBJECT" }, { "bis_pp_burnparams", "ARRAY" },
355355
{ "life_session_completed", "BOOL" }, { "license_civ_gun", "BOOL" }, { "license_cop_cair", "BOOL" }, { "bis_stackedeventhandlers_oneachframe", "ARRAY" }, { "bis_teamswitched", "BOOL" }, { "life_inv_rabbitraw", "SCALAR" }, { "life_inv_defibrillator", "SCALAR" }, { "life_inv_toolkit", "SCALAR" }, { "life_gear", "ARRAY" }, { "life_istazed", "BOOL" }, { "life_net_dropped", "BOOL"},
356356
{ "life_shop_npc", "OBJECT" }, { "life_shop_type", "STRING" }, { "life_deathcamera", "OBJECT" }, { "life_corpse", "OBJECT" }, { "life_admin_debug", "BOOL" }, { "bis_fnc_camera_target", "OBJECT" }, { "bis_fnc_camera_cam", "OBJECT" }, { "bis_fnc_camera_acctime", "SCALAR" }, { "bis_fnc_shownotification_process", "SCRIPT" }, { "bis_fnc_shownotification_counter", "SCALAR" }, { "bis_fnc_shownotification_queue", "ARRAY" },
357357
{ "life_action_spikestrippickup", "SCALAR" }, { "life_container_active", "BOOL" }, { "life_cur_task", "TASK" }, { "life_cur_task", "OBJECT" }, { "life_enablenewsbroadcast", "BOOL" }, { "life_enablesidechannel", "BOOL" }, { "life_fed_scam", "OBJECT" }, { "life_coprecieve", "OBJECT" }, { "life_chopshop", "STRING" }, {"life_civ_position","ARRAY"}, {"life_is_alive","BOOL"}, {"finishedloop","BOOL"}, {"life_fnc_wantedcrimes","CODE"},

Altis_Life.Altis/core/configuration.sqf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ life_firstSpawn = true;
4747
//Settings
4848
life_settings_enableNewsBroadcast = profileNamespace getVariable ["life_enableNewsBroadcast", true];
4949
life_settings_enableSidechannel = profileNamespace getVariable ["life_enableSidechannel", true];
50-
life_settings_tagson = profileNamespace getVariable ["life_settings_tagson", true];
51-
life_settings_revealObjects = profileNamespace getVariable ["life_settings_revealObjects", true];
5250
life_settings_viewDistanceFoot = profileNamespace getVariable ["life_viewDistanceFoot", 1250];
5351
life_settings_viewDistanceCar = profileNamespace getVariable ["life_viewDistanceCar", 1250];
5452
life_settings_viewDistanceAir = profileNamespace getVariable ["life_viewDistanceAir", 1250];

Altis_Life.Altis/core/fn_survival.sqf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ private _fnc_paycheck = {
5959
} else {
6060
systemChat localize "STR_MissedPay";
6161
};
62+
systemChat format [localize "STR_FSM_Paycheck",(getNumber(missionConfigFile >> "Life_Settings" >> "paycheck_period"))];
6263
};
6364

6465
//Setup the time-based variables.

Altis_Life.Altis/core/functions/fn_playerTags.sqf

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,23 @@
66
Description:
77
Adds the tags above other players heads when close and have visible range.
88
*/
9-
if (!life_settings_tagson) exitWith {};
10-
private ["_ui","_units","_masks"];
119
#define iconID 78000
1210
#define scale 0.8
1311

1412
if (visibleMap || {!alive player} || {dialog}) exitWith {
1513
500 cutText["","PLAIN"];
1614
};
1715

18-
_ui = uiNamespace getVariable ["Life_HUD_nameTags",displayNull];
16+
private _ui = uiNamespace getVariable ["Life_HUD_nameTags",displayNull];
1917
if (isNull _ui) then {
2018
500 cutRsc["Life_HUD_nameTags","PLAIN"];
2119
_ui = uiNamespace getVariable ["Life_HUD_nameTags",displayNull];
2220
};
2321

24-
_units = nearestObjects[(visiblePosition player),["CAManBase","Land_Pallet_MilBoxes_F","Land_Sink_F"],50];
22+
private _units = nearestObjects[(visiblePosition player),["CAManBase","Land_Pallet_MilBoxes_F","Land_Sink_F"],50];
2523
_units = _units - [player];
2624

27-
_masks = LIFE_SETTINGS(getArray,"clothing_masks");
25+
private _masks = LIFE_SETTINGS(getArray,"clothing_masks");
2826

2927
private _index = -1;
3028
{

Altis_Life.Altis/core/functions/fn_revealObjects.sqf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
99
Can be taxing on low-end systems or AMD CPU users.
1010
*/
11-
if (!life_settings_revealObjects) exitWith {};
12-
1311
private _objects = nearestObjects[visiblePositionASL player, ["Land_CargoBox_V1_F","Land_BottlePlastic_V1_F","Land_TacticalBacon_F","Land_Can_V3_F","Land_CanisterFuel_F","Land_Money_F","Land_Suitcase_F","CAManBase"], 15];
1412
{
1513
player reveal _x;

Altis_Life.Altis/core/init.sqf

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,12 @@ diag_log "[Life Client] Past Settings Init";
7676

7777
0 cutText ["","BLACK IN"];
7878

79-
addMissionEventHandler ["EachFrame", life_fnc_playerTags];
80-
addMissionEventHandler ["EachFrame", life_fnc_revealObjects];
79+
if (profileNamespace getVariable ["life_settings_revealObjects",true]) then {
80+
LIFE_ID_PlayerTags = addMissionEventHandler ["EachFrame", life_fnc_playerTags];
81+
};
82+
if (profileNamespace getVariable ["life_settings_revealObjects",true]) then {
83+
LIFE_ID_RevealObjects = addMissionEventHandler ["EachFrame", life_fnc_revealObjects];
84+
};
8185

8286
if (LIFE_SETTINGS(getNumber,"enable_fatigue") isEqualTo 0) then {player enableFatigue false;};
8387
if (LIFE_SETTINGS(getNumber,"pump_service") isEqualTo 1) then {

Altis_Life.Altis/core/pmenu/fn_s_onCheckedChange.sqf

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,30 @@
66
Description:
77
Switching it up and making it prettier..
88
*/
9-
private ["_option","_state"];
10-
_option = _this select 0;
11-
_state = _this select 1;
9+
params [
10+
["_option","",[""]],
11+
["_state",0,[0]]
12+
];
13+
if (_option isEqualTo "") exitWith {};
1214

13-
switch (_option) do {
15+
switch _option do {
1416
case "tags": {
1517
if (_state isEqualTo 1) then {
16-
life_settings_tagson = true;
1718
profileNamespace setVariable ["life_settings_tagson",true];
19+
LIFE_ID_PlayerTags = addMissionEventHandler ["EachFrame", life_fnc_playerTags];
1820
} else {
19-
life_settings_tagson = false;
2021
profileNamespace setVariable ["life_settings_tagson",false];
22+
removeMissionEventHandler ["EachFrame",LIFE_ID_PlayerTags];
2123
};
2224
};
2325

2426
case "objects": {
2527
if (_state isEqualTo 1) then {
26-
life_settings_revealObjects = true;
2728
profileNamespace setVariable ["life_settings_revealObjects",true];
28-
LIFE_ID_RevealObjects = ["LIFE_RevealObjects","onEachFrame","life_fnc_revealObjects"] call BIS_fnc_addStackedEventHandler;
29+
LIFE_ID_RevealObjects = addMissionEventHandler ["EachFrame", life_fnc_revealObjects];
2930
} else {
30-
life_settings_revealObjects = false;
3131
profileNamespace setVariable ["life_settings_revealObjects",false];
32-
[LIFE_ID_RevealObjects,"onEachFrame"] call BIS_fnc_removeStackedEventHandler;
32+
removeMissionEventHandler ["EachFrame",LIFE_ID_RevealObjects];
3333
};
3434
};
3535

Altis_Life.Altis/core/pmenu/fn_settingsMenu.sqf

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,12 @@ ctrlSetText[2922, format ["%1", life_settings_viewDistanceAir]];
2424
} forEach [[2901,life_settings_viewDistanceFoot],[2911,life_settings_viewDistanceCar],[2921,life_settings_viewDistanceAir]];
2525

2626

27-
if (isNil "life_settings_revealObjects") then {
27+
if (isNil "life_settings_enableNewsBroadcast") then {
2828
life_settings_enableNewsBroadcast = profileNamespace setVariable ["life_enableNewsBroadcast",true];
2929
life_settings_enableSidechannel = profileNamespace setVariable ["life_enableSidechannel",true];
30-
life_settings_tagson = profileNamespace setVariable ["life_settings_tagson",true];
31-
life_settings_revealObjects = profileNamespace setVariable ["life_settings_revealObjects",true];
3230
};
3331

3432
CONTROL(2900,2971) cbSetChecked life_settings_enableSidechannel;
3533
CONTROL(2900,2973) cbSetChecked life_settings_enableNewsBroadcast;
36-
CONTROL(2900,2970) cbSetChecked life_settings_tagson;
37-
CONTROL(2900,2972) cbSetChecked life_settings_revealObjects;
34+
CONTROL(2900,2970) cbSetChecked (profileNamespace getVariable ["life_settings_tagson",true]);
35+
CONTROL(2900,2972) cbSetChecked (profileNamespace getVariable ["life_settings_revealObjects",true]);

0 commit comments

Comments
 (0)