Skip to content

Commit

Permalink
Merge pull request #87 from OverlordZorn/csc-hotfix-2
Browse files Browse the repository at this point in the history
CSC - Fix: Reference between entry and Default maintained, causing the "links" array referenced across all entries
  • Loading branch information
OverlordZorn authored Nov 10, 2024
2 parents e758094 + a859e85 commit c978632
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 3 deletions.
22 changes: 22 additions & 0 deletions .hemtt/missions/CSC.Altis/init.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,28 @@ params [



] // Hashmap of additional parameters that can be changed optionally
] call cvo_csc_fnc_register;
[
"ACE Medical Box 2", // Name
[
["ace_banana", 169],
["ace_suture", 169],
["ACE_painkillers", 169]
], // Array of Items to be filled into - Default: []
[
// ["somebackpackclassname", 420]
], // Array of Backpacks to be filled into - Default: []
createHashMapFromArray [
["airdrop_pos_start", [10000,10000,100]],
["box_empty", false],
["box_class", "ACE_medicalSupplyCrate_advanced"],
["airframe_class", "B_T_VTOL_01_vehicle_F"],
["normal_mode", "AIRDROP"],
["airdrop_targetMode", "TARGET"]



] // Hashmap of additional parameters that can be changed optionally
] call cvo_csc_fnc_register;

Expand Down
Binary file modified .hemtt/missions/CSC.Altis/mission.sqm
Binary file not shown.
4 changes: 3 additions & 1 deletion addons/csc/functions/fn_link.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ if (_target isEqualTo "404") exitWith {ZRN_LOG_MSG(No target provided);};

private _cat = [_catName] call FUNC(catalog);
if (_cat isEqualTo "404") exitWith {ZRN_LOG_MSG_1(Catalog not found,_catName);};
private _links = _cat get _entryName getOrDefault ["links", []];
private _links = _cat get _entryName getOrDefault ["links", [[],[]]];

ZRN_LOG_1(_links);


// Check if zeus is enabled for this catalog already - if not - create zeus action and attach it to zeus.
Expand Down
2 changes: 1 addition & 1 deletion addons/csc/functions/fn_register.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ private _entry = _cat getOrDefault [_entryName, "404"];
if (_entry isEqualTo "404") then {

_entry = createHashMapFromArray [ ["entryName", _entryName] ];
_entry merge [(_cat get "Default Entry"), false];
_entry merge [+ (_cat get "Default Entry"), false];
};

_entry set ["items", _items];
Expand Down
2 changes: 1 addition & 1 deletion addons/main/script_version.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#define MAJOR 1
#define MINOR 3
#define PATCH 1
#define BUILD 64
#define BUILD 65


// #define VERSION MACROS
Expand Down

0 comments on commit c978632

Please sign in to comment.