Skip to content

Commit

Permalink
Merge branch 'master' into pr/590
Browse files Browse the repository at this point in the history
  • Loading branch information
PabstMirror committed Nov 13, 2024
2 parents 526683d + 58f70c8 commit 9167289
Show file tree
Hide file tree
Showing 29 changed files with 816 additions and 97 deletions.
5 changes: 5 additions & 0 deletions addons/aceEdits/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# ACE Edits (aceEdits)

A mod that adds changes to ACE that could be a part of ACE, but aren't. Including small feature additions, function overwrites, and other changes.
## Current Items
- Interact to pick up weapons when they are close enough to a body, for when weapon holders get placed in unreachable areas.
1 change: 1 addition & 0 deletions addons/aceEdits/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_interaction"};
skipWhenMissingDependencies = 1;
author = "Potato";
authors[] = {"Lambda.Tiger"};
authorUrl = "https://github.com/BourbonWarfare/POTATO";
Expand Down
2 changes: 1 addition & 1 deletion addons/armor_modifier_ace/functions/fnc_setClassArmor.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ if (false in (_armorArray apply {_x isEqualType 0})) exitWith {
};

_this set [1, _hitPoint];
[QGVAR(updateClassArmor), _this] call CBA_fnc_globalEventJIP;
[QGVAR(updateClassArmor), _this, "AMA_JIPID_" + _classname + _hitPoint] call CBA_fnc_globalEventJIP;
2 changes: 1 addition & 1 deletion addons/armor_modifier_ace/functions/fnc_setUnitArmor.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ if (false in (_armorArray apply {_x isEqualType 0})) exitWith {

_this set [1, _hitPoint];
private _jipID = [QGVAR(updateUnitArmor), _this] call CBA_fnc_globalEventJIP;
[_jipID, _unit] call CBA_fnc_removeGlobalEventJIP;
[_jipID, _unit, "AMA_JIPID_" + (getObjectID _unit) + _hitPoint] call CBA_fnc_removeGlobalEventJIP;
5 changes: 4 additions & 1 deletion addons/briefing/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ if (hasInterface) then {
if (isNull _unit || {!local _unit}) exitWith {};
[_unit] call FUNC(addIntentToZeus);
}] call CBA_fnc_addEventHandler;
["potato_safeStartOff", {
[player, 0] call FUNC(addOrbat);
}] call CBA_fnc_addEventHandler;
};
["CBA_settingsInitialized", {
INFO_2("Briefing Settings: Credits: [%1] Orbat: [%2]",GVAR(brief_addCredits),GVAR(brief_addOrbat)); // Remove Me if no problems found
Expand All @@ -27,7 +30,7 @@ if (hasInterface) then {
} forEach allGroups;
}, []] call CBA_fnc_execNextFrame;
};

["unit", {
TRACE_1("playerChanged eh",ace_player);
[
Expand Down
26 changes: 21 additions & 5 deletions addons/briefing/functions/fnc_addOrbat.sqf
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Author: PabstMirror
* Function used to add the order of battle to player's diary
* Function used to add the order of battle to player's diary, or update a
* previously added orbat.
*
* Arguments:
* 0: Unit to add to the OrBat to <OBJECT>
Expand All @@ -16,9 +17,9 @@
TRACE_1("params",_this);

_this spawn {
uiSleep 10;
params ["_unit", ["_delay", 10, [123]]];
uiSleep _delay;

params ["_unit"];
TRACE_1("",_unit);

private _diaryBuilder = [];
Expand All @@ -37,13 +38,28 @@ _this spawn {
_diaryBuilder pushBack format ["<font color='%1' size='16'>%2</font>", _color, (groupId _x)];
{
private _color = _colorSelectArray select (_unit == _x);
private _xIcon = getText (configFile >> "CfgVehicles" >> typeOf (vehicle _x) >> "icon");
private _xIcon = getText (configFile >> "CfgVehicles" >> typeOf _x >> "icon");
private _image = getText (configFile >> "CfgVehicleIcons" >> _xIcon);
_diaryBuilder pushBack format ["<img image='%1' width='16' height='16'/><font color='%2' size='14'>%3</font>", _image, _color, (name _x)];
} forEach (units _x);
};
};
} forEach allGroups;

_unit createDiaryRecord ["diary", ["ORBAT", _diaryBuilder joinString "<br/>"]];
private _diaryEntries = _unit allDiaryRecords "diary";
// find and replace existing orbat pages
private _newDiaryEntryText = _diaryBuilder joinString "<br/>";
private _noOrbatFound = true;
{
_x params ["_idx", "_title", "", "", "", "", "", "", "_record"];
if (_title == "ORBAT") then {
_unit setDiaryRecordText [["diary", _record], ["ORBAT", _newDiaryEntryText]];
_noOrbatFound = false;
};
} forEach _diaryEntries;

// if we didn't find and replace, add one
if (_noOrbatFound) then {
_unit createDiaryRecord ["diary", ["ORBAT", _newDiaryEntryText]];
};
};
1 change: 1 addition & 0 deletions addons/customGear/$PBOPREFIX$
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
z\potato\addons\customGear
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class Mode_FullAuto;

class CfgWeapons {
// Adds C7, C7GL, and C7A2, C7A2
class CUP_arifle_M16A1E1;
class GVAR(c7): CUP_arifle_M16A1E1 {
class potato_fauxC7_c7: CUP_arifle_M16A1E1 {
author = "Potato";
displayName = "C7";
modes[] = {"Single","FullAuto","Burst_medium","single_medium_optics1","single_medium_optics2"};
Expand All @@ -27,12 +27,12 @@ class CfgWeapons {
};
};
class CUP_arifle_M16A1GL;
class GVAR(c7GL): CUP_arifle_M16A1GL {
class potato_fauxC7_c7GL: CUP_arifle_M16A1GL {
author = "Potato";
displayName = "C7 M203";
};
class CUP_arifle_M16A4_Base;
class GVAR(c7a2): CUP_arifle_M16A4_Base {
class potato_fauxC7_c7a2: CUP_arifle_M16A4_Base {
author = "Potato";
displayName = "C7A2";
modes[] = {"Single","FullAuto","Burst_medium","single_medium_optics1","single_medium_optics2"};
Expand All @@ -57,7 +57,7 @@ class CfgWeapons {
};
};
class CUP_arifle_M16A4_GL;
class GVAR(c7a2GL): CUP_arifle_M16A4_GL {
class potato_fauxC7_c7a2GL: CUP_arifle_M16A4_GL {
author = "Potato";
displayName = "C7A2 M203";
modes[] = {"Single","FullAuto","Burst_medium","single_medium_optics1","single_medium_optics2"};
Expand All @@ -81,4 +81,21 @@ class CfgWeapons {
maxRangeProbab = 0.05;
};
};
};

// Adds MG5 in 7.62x51mm
class MMG_01_tan_F;
class potato_fauxMG5_MG5: MMG_01_tan_F {
author = "Potato";
displayName = "H&K MG5";
descriptionShort = "General Purpose Machine Gun<br />Caliber: 7.62x51 mm";
baseWeapon = "potato_fauxMG5_MG5";
recoil = "CUP_MG3_recoil";
magazineWell[] = {"CBA_762x51_LINKS"};
magazines[] = {
"CUP_120Rnd_TE4_LRT4_Red_Tracer_762x51_Belt_M",
"CUP_120Rnd_TE4_LRT4_White_Tracer_762x51_Belt_M",
"CUP_120Rnd_TE4_LRT4_Green_Tracer_762x51_Belt_M",
"CUP_120Rnd_TE4_LRT4_Yellow_Tracer_762x51_Belt_M"
};
};
};
9 changes: 9 additions & 0 deletions addons/customGear/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Custom Gear (customGear)

A mod that serves as a place to put custom gear retextures, new gear items, and gear conversions (ie. vests converted to backpacks).

## Current Items

- Converts some CUP vests (BAF Mk4 belt/webbing, RUAF Smersh in Olive and Coyote) to backpacks

- Adds re-config'd weapons (C7s + variants, MG5, soon-to-be KAC LAMG)
17 changes: 17 additions & 0 deletions addons/customGear/config.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#include "script_component.hpp"

class CfgPatches {
class ADDON {
units[] = {};
weapons[] = { "potato_fauxC7_c7", "potato_fauxC7_c7GL", "potato_fauxC7_c7a2", "potato_fauxC7_c7a2GL", "potato_fauxMG5_MG5" };
magazines[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = { "potato_core" };
author = "Potato";
authors[] = {"PabstMirror", "AACO"};
authorUrl = "https://github.com/BourbonWarfare/POTATO";
VERSION_CONFIG;
};
};

#include "CfgVehicles.hpp"
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#define COMPONENT fauxMG5
#define COMPONENT customGear
#include "\z\potato\addons\core\script_mod.hpp"

// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define ENABLE_PERFORMANCE_COUNTERS

#ifdef DEBUG_ENABLED_FAUXMG5
#ifdef DEBUG_ENABLED_CUSTOMGEAR
#define DEBUG_MODE_FULL
#endif

Expand Down
Loading

0 comments on commit 9167289

Please sign in to comment.