mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Commenting and some stringtables
This commit is contained in:
parent
da9fc39103
commit
24bd515814
@ -12,4 +12,4 @@ class CfgSounds
|
||||
sound[] = {QUOTE(PATHTOF(sounds\magrepack_single.wav)),1,1};
|
||||
titles[] = {};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -5,7 +5,7 @@ class CfgPatches {
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common","ace_interaction"};
|
||||
requiredAddons[] = {"ace_interaction"};
|
||||
author[] = {"commy2","CAA-Picard"};
|
||||
authorUrl = "https://github.com/commy2/";
|
||||
VERSION_CONFIG;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Author: PabstMirror (based on repack from commy2, esteldunedain, Ruthberg)
|
||||
* Simulates repacking a set of magazines.
|
||||
* Returns the timing and magazines counts at every stage.
|
||||
*
|
||||
|
@ -36,6 +36,7 @@ _currentAmmoCount = [];
|
||||
};
|
||||
} forEach (magazinesAmmo ACE_player); //only inventory mags
|
||||
|
||||
//Go through mags we currently have and check off the ones we should have
|
||||
_addedMagazines = +_currentAmmoCount;
|
||||
_missingAmmo = false;
|
||||
{
|
||||
@ -49,10 +50,7 @@ _missingAmmo = false;
|
||||
};
|
||||
} forEach _lastAmmoCount;
|
||||
|
||||
if (_missingAmmo) exitWith {false}; //something removed ammo that was being repacked
|
||||
if ((count _addedMagazines) > 0) then {
|
||||
TRACE_1("Added Magazine While Repacking",_addedMagazines);
|
||||
};
|
||||
if (_missingAmmo) exitWith {false}; //something removed ammo that was being repacked (could be other players or scripts)
|
||||
|
||||
_updateMagazinesOnPlayerFnc = {
|
||||
ACE_player removeMagazines _magazineClassname; //remove inventory magazines
|
||||
@ -67,6 +65,7 @@ _updateMagazinesOnPlayerFnc = {
|
||||
if (_nextEventIsBullet) then {
|
||||
playSound QGVAR(soundMagazineFinished);
|
||||
if ((((count _simEvents) % 3) == 0) || {(count _simEvents) == 1}) then {
|
||||
//For performance - only update mags every 3 bullets (or if it's the last event)
|
||||
call _updateMagazinesOnPlayerFnc;
|
||||
};
|
||||
} else {
|
||||
|
@ -37,7 +37,7 @@ _unitMagCounts = [];
|
||||
(_unitMagCounts select _index) pushBack _xCount;
|
||||
};
|
||||
};
|
||||
} forEach magazinesAmmoFull _unit;
|
||||
} forEach (magazinesAmmoFull _unit);
|
||||
|
||||
_actions = [localize "STR_ACE_MagazineRepack_SelectMagazineMenu", localize "STR_ACE_MagazineRepack_SelectMagazine"] call EFUNC(interaction,prepareSelectMenu);
|
||||
|
||||
@ -53,7 +53,7 @@ _actions = [localize "STR_ACE_MagazineRepack_SelectMagazineMenu", localize "STR_
|
||||
_actions,
|
||||
{ [_this] call FUNC(startRepackingMagazine); },
|
||||
{
|
||||
call EFUNC(interaction,hideMenu);
|
||||
call EFUNC(interaction,hideMenu); //ToDo: Self Interaction Integration
|
||||
if !(profileNamespace getVariable [QGVAR(AutoCloseMenu), false]) then {"Default" call EFUNC(interaction,openMenuSelf)};
|
||||
}
|
||||
] call EFUNC(interaction,openSelectMenu);
|
||||
|
@ -1,6 +1,7 @@
|
||||
/*
|
||||
* Author: PabstMirror (based on repack from commy2, esteldunedain, Ruthberg)
|
||||
* Starts repacking a specific magazine classname.
|
||||
* If room in inventory, unload magazine from weapon to be repacked.
|
||||
* Precalcs all the event timings and starts the progressBar.
|
||||
*
|
||||
* Arguments:
|
||||
@ -24,7 +25,7 @@ if (isNil "_magazineClassname" || {_magazineClassname == ""}) exitWith {ERROR("B
|
||||
_unit = ACE_player;
|
||||
|
||||
[ACE_player] call EFUNC(common,goKneeling);
|
||||
call EFUNC(interaction,hideMenu);
|
||||
call EFUNC(interaction,hideMenu);//ToDo: Self Interaction Integration
|
||||
|
||||
// Calculate actual ammo to transfer during repack
|
||||
_fullMagazineCount = getNumber (configfile >> "CfgMagazines" >> _magazineClassname >> "count");
|
||||
|
@ -1,5 +1,3 @@
|
||||
#define DEBUG_MODE_FULL
|
||||
|
||||
#define COMPONENT magazinerepack
|
||||
#include "\z\ace\addons\main\script_mod.hpp"
|
||||
|
||||
|
@ -76,12 +76,18 @@
|
||||
</Key>
|
||||
<Key ID="STR_ACE_MagazineRepack_RepackComplete">
|
||||
<English>Repacking Finished</English>
|
||||
<German>Wiederverpacken Fertig</German>
|
||||
<Spanish>Reembalaje Finalizado</Spanish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_MagazineRepack_RepackInterrupted">
|
||||
<English>Repacking Interrupted</English>
|
||||
<German>Umpacken Unterbrochen</German>
|
||||
<Spanish>Reempaque Interrupted</Spanish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_MagazineRepack_RepackedMagazinesCount">
|
||||
<English>%1 Full and %2 Partial</English>
|
||||
<German>%1 Vollständigen und %2 Teilweisen</German>
|
||||
<Spanish>%1 Total y %2 Parcial</Spanish>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user