From 78c4ebd597784050499bab2380e9d505f3ef525b Mon Sep 17 00:00:00 2001 From: ebayShopper Date: Mon, 17 Apr 2017 17:04:06 -0400 Subject: [PATCH] Add hidden gear display for force saves Vanilla commits: https://github.com/DayZMod/DayZ/commit/a4f8690404514431246d99f351aa2d9f459f65a5 https://github.com/DayZMod/DayZ/commit/9170e0f8a0c602efb44a1b419e38ea3eb0dd7f95 --- CHANGE LOG 1.0.6.2.txt | 2 + .../RscDisplay/RscDisplayGearMinimal.hpp | 237 ++++++++++++++++++ SQF/dayz_code/Configs/RscDisplay/includes.hpp | 1 + SQF/dayz_code/actions/openGear.sqf | 1 + .../compile/player_countMagazines.sqf | 21 +- .../player_countMagazinesWBackpack.sqf | 8 +- 6 files changed, 251 insertions(+), 19 deletions(-) create mode 100644 SQF/dayz_code/Configs/RscDisplay/RscDisplayGearMinimal.hpp diff --git a/CHANGE LOG 1.0.6.2.txt b/CHANGE LOG 1.0.6.2.txt index 9649b347f..ae005e6af 100644 --- a/CHANGE LOG 1.0.6.2.txt +++ b/CHANGE LOG 1.0.6.2.txt @@ -6,6 +6,8 @@ [UPDATED] Zombie pathing. Zeds should now run more direct to players. [UPDATED] The RIS attachment can be removed from the SA58_RIS_DZ now. @LunaCB [UPDATED] The player now auto rejoins their group after dropping a radio and picking it back up when dayz_requireRadio=true. @SmokeyBR +[UPDATED] Owners can no longer be removed by added friends in plot and door management. @oiad +[UPDATED] A new hidden version of the gear menu is now used for force saves so players do not see the dialog flash on screen. [FIXED] Kamaz refuel trucks no longer allow automatic refueling. #1855 @coresync2k @dreamforceinc [FIXED] Trees at POIs can be chopped down now. Other trees spawned with createVehicle can be added to dayz_treeTypes in variables.sqf to allow chopping them down. diff --git a/SQF/dayz_code/Configs/RscDisplay/RscDisplayGearMinimal.hpp b/SQF/dayz_code/Configs/RscDisplay/RscDisplayGearMinimal.hpp new file mode 100644 index 000000000..4210d2026 --- /dev/null +++ b/SQF/dayz_code/Configs/RscDisplay/RscDisplayGearMinimal.hpp @@ -0,0 +1,237 @@ +/* + createGearDialog [player, "RscDisplayGearMinimal"]; +*/ + +class RscDisplayGearMinimal +{ + idd = 106; + enableDisplay = 0; + movingEnable = 0; + + emptyGun = ""; + emptySec = ""; + emptyEq = ""; + emptyMag = ""; + emptyMag2 = ""; + emptyHGun = ""; + emptyHGunMag = ""; + class controlsBackground { + }; + class objects { + }; + class controls + { + class G_GearItems : RscControlsGroup + { + idc = 160; + x = 0.465; + y = 0.104; + w = 0.533; + h = 0.928; + + class Controls + { + delete B_Close; + delete B_Rearm; + delete B_OpenBag; + delete B_CloseBag; + delete Title; + delete SoldiersValue; + delete Pool; + delete Skill; + delete Vehicle; + delete Weapons; + delete B_Remove; + delete B_Add; + class CA_Gear_slot_item1 : RscActiveText + { + idc = 109; + x = 0; + y = 0; + w = 0.064; + h = 0.085; + style = "0x30 + 0x800"; + onMouseButtonDown = "_this call player_selectSlot;"; + soundDoubleClick[] = {"",0.1,1}; + color[] = {1,1,1,1}; + colorBackground[] = {0.84,0.8,0.72,0.2}; + colorBackgroundSelected[] = {0.84,0.8,0.72,0.2}; + colorFocused[] = {0,0,0,0}; + }; + + class CA_Gear_slot_item2 : CA_Gear_slot_item1 + { + idc = 110; + x = 0.069; + y = 0; + w = 0.064; + h = 0.085; + }; + + class CA_Gear_slot_item3 : CA_Gear_slot_item1 + { + idc = 111; + x = 0; + y = 0.091; + w = 0.064; + h = 0.085; + }; + + class CA_Gear_slot_item4 : CA_Gear_slot_item1 + { + idc = 112; + x = 0.069; + y = 0.091; + w = 0.064; + h = 0.085; + }; + + class CA_Gear_slot_item5 : CA_Gear_slot_item1 + { + idc = 113; + x = 0; + y = 0.181; + w = 0.064; + h = 0.085; + }; + + class CA_Gear_slot_item6 : CA_Gear_slot_item1 + { + idc = 114; + x = 0.069; + y = 0.181; + w = 0.064; + h = 0.085; + }; + + class CA_Gear_slot_item7 : CA_Gear_slot_item1 + { + idc = 115; + x = 0; + y = 0.272; + w = 0.064; + h = 0.085; + }; + + class CA_Gear_slot_item8 : CA_Gear_slot_item1 + { + idc = 116; + x = 0.069; + y = 0.272; + w = 0.064; + h = 0.085; + }; + + class CA_Gear_slot_item9 : CA_Gear_slot_item1 + { + idc = 117; + x = 0; + y = 0.364; + w = 0.064; + h = 0.085; + }; + + class CA_Gear_slot_item10 : CA_Gear_slot_item1 + { + idc = 118; + x = 0.069; + y = 0.364; + w = 0.064; + h = 0.085; + }; + + class CA_Gear_slot_item11 : CA_Gear_slot_item1 + { + idc = 119; + x = 0; + y = 0.457; + w = 0.064; + h = 0.085; + }; + + class CA_Gear_slot_item12 : CA_Gear_slot_item1 + { + idc = 120; + x = 0.069; + y = 0.457; + w = 0.064; + h = 0.085; + }; + + class CA_Gear_slot_handgun_item1 : CA_Gear_slot_item1 + { + idc = 122; + x = 0.138; + y = 0.559; + w = 0.064; + h = 0.085; + colorBackground[] = {0.69,0.86,0.38,0.2}; + colorBackgroundSelected[] = {0.5,0.58,0.38,0.8}; + }; + + class CA_Gear_slot_handgun_item2 : CA_Gear_slot_handgun_item1 + { + idc = 123; + x = 0.207; + y = 0.559; + w = 0.064; + h = 0.085; + }; + + class CA_Gear_slot_handgun_item3 : CA_Gear_slot_handgun_item1 + { + idc = 124; + x = 0.275; + y = 0.559; + w = 0.064; + h = 0.085; + }; + + class CA_Gear_slot_handgun_item4 : CA_Gear_slot_handgun_item1 + { + idc = 125; + x = 0.345; + y = 0.559; + w = 0.064; + h = 0.085; + }; + + class CA_Gear_slot_handgun_item5 : CA_Gear_slot_handgun_item1 + { + idc = 126; + x = 0.138; + y = 0.65; + w = 0.064; + h = 0.085; + }; + + class CA_Gear_slot_handgun_item6 : CA_Gear_slot_handgun_item1 + { + idc = 127; + x = 0.207; + y = 0.65; + w = 0.064; + h = 0.085; + }; + + class CA_Gear_slot_handgun_item7 : CA_Gear_slot_handgun_item1 + { + idc = 128; + x = 0.275; + y = 0.65; + w = 0.064; + h = 0.085; + }; + + class CA_Gear_slot_handgun_item8 : CA_Gear_slot_handgun_item1 + { + idc = 129; + x = 0.345; + y = 0.65; + w = 0.064; + h = 0.085; + }; + }; + }; + }; +}; \ No newline at end of file diff --git a/SQF/dayz_code/Configs/RscDisplay/includes.hpp b/SQF/dayz_code/Configs/RscDisplay/includes.hpp index fe732916e..875c6df77 100644 --- a/SQF/dayz_code/Configs/RscDisplay/includes.hpp +++ b/SQF/dayz_code/Configs/RscDisplay/includes.hpp @@ -1,6 +1,7 @@ #include "RscGroups.hpp" #include "RscDisplayCraftingMenu.hpp" #include "RscDisplayGear.hpp" +#include "RscDisplayGearMinimal.hpp" #include "RscDisplayGenderSelect.hpp" #include "RscDisplaySpawnSelecter.hpp" #include "RscPlayerUI.hpp" diff --git a/SQF/dayz_code/actions/openGear.sqf b/SQF/dayz_code/actions/openGear.sqf index 82b06c2a7..ca91dcf4c 100644 --- a/SQF/dayz_code/actions/openGear.sqf +++ b/SQF/dayz_code/actions/openGear.sqf @@ -8,5 +8,6 @@ _alive = alive _unit; if (_unconcious && !_inVeh && _alive) then { + DZE_GearCheckBypass = true; //Bypass gear menu checks since dialog will always open on _unit's gear player action ["Gear", _unit]; }; \ No newline at end of file diff --git a/SQF/dayz_code/compile/player_countMagazines.sqf b/SQF/dayz_code/compile/player_countMagazines.sqf index fe80eeffe..4e38bbd7d 100644 --- a/SQF/dayz_code/compile/player_countMagazines.sqf +++ b/SQF/dayz_code/compile/player_countMagazines.sqf @@ -1,22 +1,18 @@ /* -count player magazines with ammo count -value = call player_countMagazines; -return all player magazines with ammo count + count player magazines with ammo count + value = call player_countMagazines; + return all player magazines with ammo count */ + private ["_dialog","_created","_magazineArray"]; disableSerialization; -disableUserInput true; -disableUserInput true; -disableUserInput true; _dialog = findDisplay 106; _created = false; if ( isNull _dialog ) then { - //startLoadingScreen [""]; - DZE_GearCheckBypass = true; //Bypass gear menu checks since dialog will always open on player's gear - skipGearSound = true; //Don't play sound for force save - createGearDialog [player, "RscDisplayGear"]; + //Load Minimal gearMenu + createGearDialog [player, "RscDisplayGearMinimal"]; _dialog = findDisplay 106; _created = true; }; @@ -55,11 +51,6 @@ for "_i" from 122 to 129 do if ( _created ) then { closeDialog 0; - skipGearSound = false; - //endLoadingScreen; }; -disableUserInput false; -disableUserInput false; -disableUserInput false; _magazineArray \ No newline at end of file diff --git a/SQF/dayz_code/compile/player_countMagazinesWBackpack.sqf b/SQF/dayz_code/compile/player_countMagazinesWBackpack.sqf index 3d0d5f79e..56b47dd7d 100644 --- a/SQF/dayz_code/compile/player_countMagazinesWBackpack.sqf +++ b/SQF/dayz_code/compile/player_countMagazinesWBackpack.sqf @@ -1,8 +1,8 @@ /* -count player magazines with ammo count -value = call player_countMagazines; //must be called from a spawned thread (|| use spawn) -return all player magazines with ammo count -Modified to save backpack magazine count by icomrade - Base for fix by Ziellos2k + count player magazines with ammo count + value = call player_countMagazines; //must be called from a spawned thread (or use spawn) + return all player magazines with ammo count + Modified to save backpack magazine count by icomrade - Base for fix by Ziellos2k */ private ["_control","_item","_val","_max","_count","_magazineArray","_dialog"]; disableUserInput true;