-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve initialization order for police stuff and allow saving loadou…
…t for respawn (#69) * Add action to save equipment for respawn * Move all vehicle spawn actions to the top of action menu * Add message after loadout is saved for respawn * Drop unused param
- Loading branch information
Showing
7 changed files
with
85 additions
and
2 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
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
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,22 @@ | ||
#include "script_component.hpp" | ||
/* | ||
* Author: 3Mydlo3 | ||
* Function initializes police station for client. Creates vehicle spawners, teleporters and arsenals. | ||
* | ||
* Arguments: | ||
* 0: Police Station Module <LOGIC> | ||
* | ||
* Return Value: | ||
* None | ||
* | ||
* Example: | ||
* None | ||
* | ||
* Public: No | ||
*/ | ||
|
||
{ | ||
[_x] call FUNC(initSaveEquipmentAction); | ||
} forEach GVAR(arsenals); | ||
|
||
call FUNC(equipmentScoreCheck); |
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,44 @@ | ||
#include "script_component.hpp" | ||
/* | ||
* Author: 3Mydlo3 | ||
* Function initializes action to save equipment for respawn on given object. | ||
* | ||
* Arguments: | ||
* 0: Object which should allow saving equipment <OBJECT> | ||
* | ||
* Return Value: | ||
* None | ||
* | ||
* Example: | ||
* None | ||
* | ||
* Public: No | ||
*/ | ||
|
||
params ["_object"]; | ||
|
||
private _condition = {side player isEqualTo WEST}; | ||
|
||
private _action = [ | ||
QGVAR(saveEquipment), | ||
LLSTRING(SaveEquipmentForRespawn), | ||
"", | ||
{ | ||
EGVAR(common,playerLoadout) = getUnitLoadout player; | ||
private _primaryWeapon = primaryWeapon player; | ||
private _launcherWeapon = secondaryWeapon player; | ||
private _handgun = handgunWeapon player; | ||
|
||
private _msg = format [LLSTRING(SavedEquipment), _primaryWeapon, _handgun, _launcherWeapon]; | ||
[QGVAR(showMessage), [_msg]] call CBA_fnc_localEvent; | ||
}, | ||
_condition, | ||
{}, [], "", 4, [false, false, false, false, false], {} | ||
] call ace_interact_menu_fnc_createAction; | ||
|
||
[ | ||
_object, | ||
0, | ||
["ACE_MainActions"], | ||
_action | ||
] call ACEFUNC(interact_menu,addActionToObject); |
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