Skip to content

Commit

Permalink
Validation fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
hbjydev committed Sep 6, 2024
1 parent 66f57af commit 810152a
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 17 deletions.
2 changes: 1 addition & 1 deletion addons/modules/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class CfgVehicles {
isTriggerActivated = 0;
curatorInfoType = "RscDisplayAttributeAudioModule";
class Attributes : AttributesBase {
class ModuleDescription : ModuleDescription {};
class ModuleDescription : ModuleDescription {};
};
class ModuleDescription : ModuleDescription {
description[] = {
Expand Down
16 changes: 8 additions & 8 deletions addons/modules/config.cpp
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
#include "script_component.hpp"

class CfgPatches {
class ADDON {
class ADDON {
name = COMPONENT_NAME;
units[] = {
QGVAR(moduleResupply),
QGVAR(moduleTeleport)
};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
units[] = {
QGVAR(moduleResupply),
QGVAR(moduleTeleport)
};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = { "pmcs_common" };
author = ECSTRING(common,PMCSTeam);
authors[] = {"hbjydev"};
url = ECSTRING(main,url);
VERSION_CONFIG;
};
};
};

#include "CfgEventHandlers.hpp"
Expand Down
13 changes: 8 additions & 5 deletions addons/modules/functions/fnc_moduleResupply.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,26 @@

params ["_logic"];

private _magCount = 10;
private _primaryMagCount = 10;
private _secondaryMagCount = 15;
private _handgunMagCount = 10;
private _binocularMagCount = 2;

private _resupplyBox = "Box_NATO_Wps_F" createVehicle position _logic;
private _magazines = createHashMapFromArray [];

{
private _pm = primaryWeaponMagazine _x;
if (!_pm in _magazines) then { _magazines set [_pm, _magCount]; };
if (!_pm in _magazines) then { _magazines set [_pm, _primaryMagCount]; };

private _sm = secondaryWeaponMagazine _x;
if (!_sm in _magazines) then { _magazines set [_sm, _magCount]; };
if (!_sm in _magazines) then { _magazines set [_sm, _secondaryMagCount]; };

private _hm = handgunMagazine _x;
if (!_hm in _magazines) then { _magazines set [_hm, _magCount]; };
if (!_hm in _magazines) then { _magazines set [_hm, _handgunMagCount]; };

private _bm = binocularMagazine _x;
if (!_bm in _magazines) then { _magazines set [_bm, _magCount]; };
if (!_bm in _magazines) then { _magazines set [_bm, _binocularMagCount]; };
} forEach blufor countSide allPlayers;

{
Expand Down
4 changes: 2 additions & 2 deletions addons/modules/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
#include "\z\pmcs\addons\main\script_mod.hpp"

#ifdef DEBUG_ENABLED_MODULES
#define DEBUG_MODE_FULL
#define DEBUG_MODE_FULL
#endif

#ifdef DEBUG_SETTINGS_MODULES
#define DEBUG_SETTINGS DEBUG_SETTINGS_MODULES
#define DEBUG_SETTINGS DEBUG_SETTINGS_MODULES
#endif

#include "\z\pmcs\addons\main\script_macros.hpp"
1 change: 0 additions & 1 deletion addons/modules/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<Key ID="STR_PMCS_Modules_Resupply_Description1">
<English>Get all ammunition for everyone's guns and generate a crate with 10 of each of them.</English>
</Key>

<Key ID="STR_PMCS_Modules_Teleport">
<English>ACE Teleport</English>
</Key>
Expand Down

0 comments on commit 810152a

Please sign in to comment.