-
Notifications
You must be signed in to change notification settings - Fork 737
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5953 from acemod/arsenal-main-menu
add ace arsenal button to main menu
- Loading branch information
Showing
21 changed files
with
628 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
class RscStandardDisplay; | ||
class RscDisplayMain: RscStandardDisplay { | ||
class controls { | ||
class GroupSingleplayer: RscControlsGroupNoScrollbars { | ||
class Controls; | ||
}; | ||
class GroupTutorials: GroupSingleplayer { | ||
h = "(6 * 1.5) * (pixelH * pixelGrid * 2)"; | ||
|
||
class Controls: Controls { | ||
class Bootcamp; | ||
class VRTraining; | ||
class Arsenal; | ||
class GVAR(mission): Arsenal { | ||
idc = -1; | ||
text = CSTRING(Mission); | ||
tooltip = CSTRING(Mission_tooltip); | ||
y = "(3 * 1.5) * (pixelH * pixelGrid * 2) + (pixelH)"; | ||
onbuttonclick = QUOTE(playMission [ARR_2('','PATHTOF(missions\Arsenal.VR)')]); | ||
animTextureNormal = QPATHTOF(data\buttonMissionMainMenu_ca.paa) | ||
animTextureDisabled = QPATHTOF(data\buttonMissionMainMenu_ca.paa) | ||
animTextureOver = QPATHTOF(data\buttonMissionMainMenuHover_ca.paa) | ||
animTextureFocused = QPATHTOF(data\buttonMissionMainMenuHover_ca.paa) | ||
animTexturePressed = QPATHTOF(data\buttonMissionMainMenu_ca.paa) | ||
animTextureDefault = QPATHTOF(data\buttonMissionMainMenu_ca.paa) | ||
}; | ||
class FieldManual: Bootcamp { | ||
y = "(4 * 1.5) * (pixelH * pixelGrid * 2) + (pixelH)"; | ||
}; | ||
class CommunityGuides: Bootcamp { | ||
y = "(5 * 1.5) * (pixelH * pixelGrid * 2) + (pixelH)"; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
class Extended_PreInit_EventHandlers { | ||
class ADDON { | ||
init = QUOTE(call compile preprocessFileLineNumbers 'XEH_preInit.sqf'); | ||
}; | ||
}; | ||
|
||
class Extended_PostInit_EventHandlers { | ||
class ADDON { | ||
init = QUOTE(call compile preprocessFileLineNumbers 'XEH_postInit.sqf'); | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
#include "script_component.hpp" | ||
#include "\z\ace\addons\arsenal\defines.hpp" | ||
#include "\a3\ui_f\hpp\defineDIKCodes.inc" | ||
|
||
enableSaving [false, false]; | ||
cba_diagnostic_projectileMaxLines = 10; | ||
|
||
[QGVAR(displayOpened), { | ||
private _player = player; | ||
|
||
// player pose | ||
[{ | ||
switch (true) do { | ||
case (primaryWeapon _this != ""): { | ||
_this switchMove "amovpercmstpslowwrfldnon"; | ||
}; | ||
case (handgunWeapon _this != ""): { | ||
_this switchMove "amovpercmstpslowwpstdnon"; | ||
}; | ||
default { | ||
_this switchMove "amovpercmstpsnonwnondnon"; | ||
}; | ||
}; | ||
}, _player] call CBA_fnc_execNextFrame; | ||
|
||
// hide everything except the player | ||
{ | ||
_x enableSimulation false; | ||
_x hideObject true; | ||
} forEach (allMissionObjects "" - [_player]); | ||
|
||
_player call CBA_fnc_removeUnitTrackProjectiles; | ||
_player setFatigue 0; | ||
|
||
// Esc to close mission | ||
{ | ||
private _display = findDisplay IDD_ace_arsenal; | ||
|
||
_display displayAddEventHandler ["KeyDown", { | ||
params ["_display", "_key", "_shift"]; | ||
|
||
if (_key isEqualTo DIK_ESCAPE && {!_shift}) then { | ||
[_display] spawn { | ||
disableSerialization; | ||
params ["_display"]; | ||
|
||
private _return = [ | ||
localize "str_sure", | ||
localize "str_a3_rscdisplaymain_buttonexit", | ||
true, false, | ||
_display, false, true | ||
] call BIS_fnc_GUImessage; | ||
|
||
if (_return) then { | ||
profileNamespace setVariable [QGVAR(missionLastLoadout), getUnitLoadout player]; | ||
_display closeDisplay 2; | ||
findDisplay 46 closeDisplay 0; | ||
}; | ||
}; | ||
true | ||
}; | ||
}]; | ||
|
||
private _buttonClose = _display displayCtrl IDC_menuBarClose; | ||
_buttonClose ctrlSetText localize "str_a3_rscdisplayarsenal_buttonok"; | ||
} call CBA_fnc_execNextFrame; | ||
}] call CBA_fnc_addEventHandler; | ||
|
||
[QGVAR(displayClosed), { | ||
private _player = player; | ||
|
||
// unhide everthing | ||
{ | ||
_x enableSimulation true; | ||
_x hideObject false; | ||
} forEach allMissionObjects ""; | ||
|
||
// update VR unit gear | ||
{ | ||
private _unit = _x; | ||
|
||
removeVest _unit; | ||
_unit addVest vest _player; | ||
|
||
removeBackpack _unit; | ||
_unit addBackpack backpack _player; | ||
|
||
removeHeadgear _unit; | ||
_unit addHeadgear headgear _player; | ||
|
||
removeGoggles _unit; | ||
_unit addGoggles goggles _player; | ||
|
||
removeAllWeapons _unit; | ||
_unit addWeapon primaryWeapon _player; | ||
{ | ||
_unit addPrimaryWeaponItem _x; | ||
} forEach primaryWeaponItems _player; | ||
|
||
_unit addWeapon secondaryWeapon _player; | ||
|
||
{ | ||
_unit addSecondaryWeaponItem _x; | ||
} forEach secondaryWeaponItems _player; | ||
|
||
_unit addWeapon handgunWeapon _player; | ||
{ | ||
_unit addHandgunItem _x; | ||
} forEach handgunItems _player; | ||
} forEach (entities [["B_Soldier_VR_F", "O_Soldier_VR_F", "I_Soldier_VR_F"], [], true]); | ||
|
||
_player call CBA_fnc_addUnitTrackProjectiles; | ||
}] call CBA_fnc_addEventHandler; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#include "script_component.hpp" | ||
|
||
PREP(onPause); | ||
PREP(createTarget); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include "script_component.hpp" | ||
|
||
dev = "commy2"; | ||
author = ECSTRING(common,ACETeam); | ||
|
||
onLoadName = CSTRING(Mission); | ||
overviewText = CSTRING(Mission_overview); | ||
overviewPicture = "logo_ca.paa"; | ||
|
||
briefing = 0; | ||
debriefing = 0; | ||
enableDebugConsoleSP = 1; | ||
|
||
doneKeys[] = {"BIS_Arsenal.Map_VR_done"}; | ||
onPauseScript[] = {QFUNC(onPause)}; | ||
|
||
#include "CfgEventHandlers.hpp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#include "script_component.hpp" | ||
|
||
params ["_type", "_position", ["_group", grpNull], "_varName"]; | ||
private _player = player; | ||
|
||
if (isNull _group) then { | ||
_group = creategroup east; | ||
}; | ||
|
||
private _target = _group createUnit [_type, [10,10,0], [], 0, "NONE"]; | ||
|
||
if (isNil "_varName") then { | ||
_varName = _target call BIS_fnc_netId; | ||
}; | ||
|
||
_target setPos _position; | ||
_target setDir (_position getDir _player); | ||
_target doWatch position _player; | ||
_target addRating -10e10; | ||
_target setUnitPos "UP"; | ||
_target setBehaviour "CARELESS"; | ||
_target setCombatMode "BLUE"; | ||
_target setSpeedMode "LIMITED"; | ||
_target disableAI "TARGET"; | ||
_target disableAI "AUTOTARGET"; | ||
_target allowFleeing 0; | ||
_target setSpeaker "BASE"; | ||
|
||
[{ | ||
params ["_target", "_time"]; | ||
|
||
if (speaker _target == "BASE") exitWith {time > _time}; | ||
_target setSpeaker "BASE"; | ||
false | ||
}, {}, [_target, time + 1]] call CBA_fnc_waitUntilAndExecute; | ||
|
||
_player reveal [_target, 4]; | ||
|
||
_target addVest vest _player; | ||
_target addBackpack backpack _player; | ||
_target addHeadgear headgear _player; | ||
_target addGoggles goggles _player; | ||
_target addWeapon primaryWeapon _player; | ||
_target addWeapon secondaryWeapon _player; | ||
_target addWeapon handgunWeapon _player; | ||
|
||
_target setVehicleVarName _varName; | ||
missionNamespace setvariable [_varName, _target]; | ||
|
||
_target switchMove "amovpercmstpslowwrfldnon"; | ||
_target setVariable ["origin", _position]; | ||
|
||
_target addEventHandler ["killed", { | ||
params ["_target"]; | ||
private _position = _target getVariable ["origin", position _target]; | ||
private _varName = vehicleVarName _target; | ||
|
||
[_target, true] spawn BIS_fnc_VREffectKilled; | ||
|
||
[{isNull (_this select 0)}, { | ||
(_this select 1) call FUNC(createTarget); | ||
}, [_target, [typeOf _target, _position, group _target, _varName]]] call CBA_fnc_waitUntilAndExecute; | ||
}]; | ||
|
||
_target call BIS_fnc_VRHitpart; | ||
_target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#include "script_component.hpp" | ||
|
||
params ["_display"]; | ||
|
||
private _ctrlButtonAbort = _display displayCtrl 104; | ||
_ctrlButtonAbort ctrlSetText localize LSTRING(Mission); | ||
_ctrlButtonAbort ctrlSetTooltip localize LSTRING(ReturnToArsenal); | ||
|
||
_ctrlButtonAbort ctrlSetEventHandler ["ButtonClick", { | ||
params ["_control"]; | ||
ctrlParent _control closeDisplay 2; | ||
{[player, player, true] call FUNC(openBox)} call CBA_fnc_execNextFrame; | ||
true | ||
} call EFUNC(common,codeToString)]; | ||
|
||
true |
Oops, something went wrong.