Skip to content

Commit

Permalink
Add direct arsenal access mission parameter
Browse files Browse the repository at this point in the history
Closes #822
  • Loading branch information
Wyqer committed Aug 25, 2020
1 parent 5d7fb86 commit 8d413bf
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 11 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* Added: CSAT Ghex arsenal preset. Thanks to [lkvk](https://github.com/lkvk)
* Added: AAF arsenal preset. Thanks to [lkvk](https://github.com/lkvk)
* Added: LDF arsenal preset. Thanks to [lkvk](https://github.com/lkvk)
* Added: Mission parameter for direct arsenal access without KPLIB Loadout Dialog.
* Removed: T-14 from RHS AFRF preset.
* Fixed: Sector monitor got stuck after sector cap was reached until restarting the server.
* Fixed: Civilian Informant side mission didn't worked due to script error.
Expand Down
8 changes: 8 additions & 0 deletions Missionframework/scripts/client/actions/open_arsenal.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
if (KPLIB_directArsenal) exitWith {
if (KP_liberation_ace && KP_liberation_arsenal_type) then {
[player, player, false] call ace_arsenal_fnc_openBox;
} else {
["Open", false] spawn BIS_fnc_arsenal;
};
};

load_loadout = 0;
edit_loadout = 0;
respawn_loadout = 0;
Expand Down
5 changes: 5 additions & 0 deletions Missionframework/scripts/shared/fetch_params.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ if(isServer) then {
GET_PARAM_BOOL(KP_liberation_fog_param, "VanillaFog", 1);
GET_PARAM(GRLIB_resources_multiplier, "ResourcesMultiplier", 3);
GET_PARAM_BOOL(KP_liberation_arsenal_type, "ArsenalType", 0);
GET_PARAM_BOOL(KPLIB_directArsenal, "DirectArsenal", 0);
GET_PARAM_BOOL(KP_liberation_playermenu, "PlayerMenu", 1);
GET_PARAM(KP_liberation_victoryCondition, "VictoryCondition", 0);

Expand Down Expand Up @@ -303,6 +304,10 @@ if (!isDedicated && hasInterface) then {
_value = if (KP_liberation_arsenal_type) then {localize "STR_PARAMS_ARSENAL_ACE";} else {localize "STR_PARAMS_ARSENAL_BI";};
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];

_param = localize "STR_PARAMS_DIRECTARSENAL";
_value = if (KPLIB_directArsenal) then {localize "STR_PARAMS_ENABLED";} else {localize "STR_PARAMS_DISABLED";};
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];

_param = localize "STR_PARAMS_PLAYERMENU";
_value = if (KP_liberation_playermenu) then {localize "STR_PARAMS_PLAYERMENU_KP";} else {localize "STR_PARAMS_PLAYERMENU_GREUH";};
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
Expand Down
26 changes: 15 additions & 11 deletions Missionframework/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,41 @@
License: MIT License - http://www.opensource.org/licenses/MIT

Localization contributors:
English | Updated: 0.96.8
English | Updated: 0.96.7a
KP Liberation Dev Team - https://github.com/KillahPotatoes

Chinese Simplified | Updated: pre 0.96.8
Chinese Simplified | Updated: pre 0.96.7a
Nercon - https://github.com/nercon

Chinese Traditional | Updated: pre 0.96.8
Chinese Traditional | Updated: pre 0.96.7a
dustin902001 - https://github.com/dustin902001
John M. Rodriguez - https://github.com/KOEI5113

French | Updated: pre 0.96.8
French | Updated: pre 0.96.7a
zbug - https://github.com/GreuhZbug

German | Updated: 0.96.8
German | Updated: 0.96.7a
Wyqer - https://github.com/Wyqer

Italian | Updated: pre 0.96.8
Italian | Updated: pre 0.96.7a
k4s0 - https://github.com/k4s0

Portuguese | Updated: pre 0.96.8
Portuguese | Updated: pre 0.96.7a
NomadRomeo - https://github.com/NomadRomeo
AngusDLX - https://github.com/AngusDLX

Russian | Updated: pre 0.96.8
Russian | Updated: pre 0.96.7a
_KOC_ - Constantin.rogozin@ya.ru
Dj_Haski - https://github.com/DjHaski

Spanish | Updated: pre 0.96.8
Spanish | Updated: pre 0.96.7a
amunoz20 - https://github.com/amunoz20
regiregi22 - https://github.com/regiregi22

Turkish | Updated: pre 0.96.8
Turkish | Updated: pre 0.96.7a
Carbneth - https://github.com/Carbneth

Czech | Updated: 0.96.8
Czech | Updated: 0.96.7a
MJVEVERUSKA - https://github.com/MJVEVERUSKA
-->
<Project name="Liberation">
Expand Down Expand Up @@ -7005,6 +7005,10 @@
<German>Nun ist die Fabrik dafür bereit, um Ressourcen zu produzieren. Benutze die Mausrad-Aktion, um das Produktionsinterface zu öffnen und die Produktion in der eroberten Fabrik zu starten.&lt;br/&gt;Detailliertere Informationen über das Produktionsinterface findest du in unserem &lt;a href="https://github.com/KillahPotatoes/KP-Liberation/wiki/EN_Production"&gt;Wiki&lt;/a&gt;.</German>
<Czech>Nyní je továrna připravena začít vyrábět zdroje. Pomocí akce rolovacího kolečka otevřete výrobní rozhraní a začněte vyrábět v právě dobyté továrně.&lt;br/&gt; Podrobnější informace o rozhraní naleznete v našem &lt;a href="https://github.com/KillahPotatoes/KP-Liberation/wiki/EN_Production"&gt;Wiki&lt;/a&gt;.</Czech>
</Key>
<Key ID="STR_PARAMS_DIRECTARSENAL">
<Original>Direct arsenal access without KPLIB Loadout Dialog</Original>
<German>Direkter Arsenalzugang ohne KPLIB Loadout Dialog</German>
</Key>
</Package>

<Package name="KPPLM">
Expand Down
6 changes: 6 additions & 0 deletions Missionframework/ui/mission_params.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,12 @@ class Params {
texts[] = {$STR_PARAMS_ARSENAL_BI, $STR_PARAMS_ARSENAL_ACE};
default = 0;
};
class DirectArsenal {
title = $STR_PARAMS_DIRECTARSENAL;
values[] = {0, 1};
texts[] = {$STR_PARAMS_DISABLED, $STR_PARAMS_ENABLED};
default = 0;
};
class PlayerMenu {
title = $STR_PARAMS_PLAYERMENU;
values[] = {0, 1};
Expand Down

0 comments on commit 8d413bf

Please sign in to comment.