From cec993a2f567821a85d78917d0685e888895300c Mon Sep 17 00:00:00 2001 From: Moritz Schmidt Date: Mon, 20 Jul 2020 14:38:39 +0200 Subject: [PATCH 1/5] move population/exclusion modules * rename exclusion/population zone modules "add" X -> X * move corresponding functions legacy -> common --- README.md | 12 ++++++------ addons/{legacy => common}/CfgVehicles.hpp | 12 ++++++------ addons/common/XEH_PREP.hpp | 11 ++++++++++- addons/common/config.cpp | 1 + .../functions/fnc_addExclusionZone.sqf | 0 .../functions/fnc_addPopulationZone.sqf | 0 .../functions/fnc_clearExclusionZones.sqf | 0 .../functions/fnc_clearPopulationZones.sqf | 0 .../functions/fnc_getExclusionZones.sqf | 0 .../functions/fnc_getPopulationZones.sqf | 0 .../functions/fnc_isInPopulatedZone.sqf | 7 +++---- .../functions/fnc_module_exclusionZone.sqf} | 0 .../functions/fnc_module_populationZone.sqf} | 0 addons/legacy/XEH_PREP.hpp | 10 ---------- addons/legacy/config.cpp | 1 - addons/legacy/functions/fnc_arrayContains.sqf | 13 ------------- addons/legacy/functions/fnc_findSpawnPosition.sqf | 2 +- addons/legacy/functions/fnc_setupZeusModules.sqf | 4 ++-- addons/patrol/functions/fnc_taskPatrol.spec.sqf | 12 ++++++------ .../patrol/functions/fnc_taskPatrolFindWaypoint.sqf | 2 +- .../functions/fnc_taskPatrolFindWaypoints.spec.sqf | 10 +++++----- 21 files changed, 41 insertions(+), 56 deletions(-) rename addons/{legacy => common}/CfgVehicles.hpp (85%) rename addons/{legacy => common}/functions/fnc_addExclusionZone.sqf (100%) rename addons/{legacy => common}/functions/fnc_addPopulationZone.sqf (100%) rename addons/{legacy => common}/functions/fnc_clearExclusionZones.sqf (100%) rename addons/{legacy => common}/functions/fnc_clearPopulationZones.sqf (100%) rename addons/{legacy => common}/functions/fnc_getExclusionZones.sqf (100%) rename addons/{legacy => common}/functions/fnc_getPopulationZones.sqf (100%) rename addons/{legacy => common}/functions/fnc_isInPopulatedZone.sqf (61%) rename addons/{legacy/functions/fnc_module_addExclusionZone.sqf => common/functions/fnc_module_exclusionZone.sqf} (100%) rename addons/{legacy/functions/fnc_module_addPopulationZone.sqf => common/functions/fnc_module_populationZone.sqf} (100%) delete mode 100644 addons/legacy/functions/fnc_arrayContains.sqf diff --git a/README.md b/README.md index fae51a55..ed2c7aa6 100644 --- a/README.md +++ b/README.md @@ -79,11 +79,11 @@ vehicles | ["C_Van_01_fuel_F", "C_Hatchback_01_F", "C_Offroad_02 ## 3DEN modules -### add exclusion zone +### exclusion zone Blacklist an area for civs by syncing it to a trigger. -### add population zone +### population zone Whitelist an area for civs by syncing it to a trigger. @@ -176,7 +176,7 @@ Parameter | Explanation backpacks | Array - All classnames of clothes that civilians may wear. probability | Number - Probability that civilian will wear a backpack. Default: 0.5. -### grad_civs_voyage_fnc_setVehicles +### grad_civs_cars_fnc_setVehicles Sets all vehicles that civilians may drive. Overwrites value from CBA settings. Execute globally #### Syntax @@ -197,17 +197,17 @@ Parameter | Explanation debugCivState | Bool - Debug mode on/off. -### grad_civs_legacy_fnc_addExclusionZone and grad_civs_legacy_fnc_addPopulationZone +### grad_civs_common_fnc_addExclusionZone and grad_civs_common_fnc_addPopulationZone Prevent civilians from entering areas. -Optionally whitelist areas using `[_area] call grad_civs_legacy_fnc_addPopulationZone` , then forbid parts of them using `[_area] call grad_civs_legacy_fnc_addExclusionZone` . +Optionally whitelist areas using `[_area] call grad_civs_common_fnc_addPopulationZone` , then forbid parts of them using `[_area] call grad_civs_common_fnc_addExclusionZone` . *known issues: pathing through area is not checked. To minimize that problem, define exclusionZones with large diameter.* #### Syntax -`[_trigger] call grad_civs_legacy_fnc_addExclusionZone;` +`[_trigger] call grad_civs_common_fnc_addExclusionZone;` ## Development diff --git a/addons/legacy/CfgVehicles.hpp b/addons/common/CfgVehicles.hpp similarity index 85% rename from addons/legacy/CfgVehicles.hpp rename to addons/common/CfgVehicles.hpp index 66e3ef51..adc2bcf0 100644 --- a/addons/legacy/CfgVehicles.hpp +++ b/addons/common/CfgVehicles.hpp @@ -9,13 +9,13 @@ class CfgVehicles }; class ModuleDescription {}; }; - class GVAR(addPopulationZone): Module_F + class GVAR(PopulationZone): Module_F { scope = 2; // visible in editor - displayName = "add population zone"; + displayName = "population zone"; icon = ""; // Map icon. Delete this entry to use the default icon category = QEGVAR(main,modules); - function = QFUNC(module_addPopulationZone); + function = QFUNC(module_populationZone); functionPriority = 0; // first to execute isGlobal = 1; isTriggerActivated = 0; @@ -29,13 +29,13 @@ class CfgVehicles sync[] = {}; // Array of synced entities (can contain base classes) }; }; - class GVAR(addExclusionZone): Module_F + class GVAR(ExclusionZone): Module_F { scope = 2; // visible in editor - displayName = "add exclusion zone"; + displayName = "exclusion zone"; icon = ""; // Map icon. Delete this entry to use the default icon category = QEGVAR(main,modules); - function = QFUNC(module_addExclusionZone); + function = QFUNC(module_exclusionZone); functionPriority = 0; // first to execute isGlobal = 1; isTriggerActivated = 0; diff --git a/addons/common/XEH_PREP.hpp b/addons/common/XEH_PREP.hpp index 627183c2..8c1233a7 100644 --- a/addons/common/XEH_PREP.hpp +++ b/addons/common/XEH_PREP.hpp @@ -1,4 +1,13 @@ +PREP(addExclusionZone); +PREP(addPopulationZone); PREP(augmentStateMachine); -PREP(registerCivTaskType); PREP(civGetState); +PREP(clearExclusionZones); +PREP(clearPopulationZones); +PREP(getExclusionZones); +PREP(getPopulationZones); +PREP(isInPopulatedZone); +PREP(module_exclusionZone); +PREP(module_populationZone); PREP(parseCsv); +PREP(registerCivTaskType); diff --git a/addons/common/config.cpp b/addons/common/config.cpp index 6a47f0e8..d851c36a 100644 --- a/addons/common/config.cpp +++ b/addons/common/config.cpp @@ -13,3 +13,4 @@ class CfgPatches { }; #include "CfgEventHandlers.hpp" +#include "CfgVehicles.hpp" diff --git a/addons/legacy/functions/fnc_addExclusionZone.sqf b/addons/common/functions/fnc_addExclusionZone.sqf similarity index 100% rename from addons/legacy/functions/fnc_addExclusionZone.sqf rename to addons/common/functions/fnc_addExclusionZone.sqf diff --git a/addons/legacy/functions/fnc_addPopulationZone.sqf b/addons/common/functions/fnc_addPopulationZone.sqf similarity index 100% rename from addons/legacy/functions/fnc_addPopulationZone.sqf rename to addons/common/functions/fnc_addPopulationZone.sqf diff --git a/addons/legacy/functions/fnc_clearExclusionZones.sqf b/addons/common/functions/fnc_clearExclusionZones.sqf similarity index 100% rename from addons/legacy/functions/fnc_clearExclusionZones.sqf rename to addons/common/functions/fnc_clearExclusionZones.sqf diff --git a/addons/legacy/functions/fnc_clearPopulationZones.sqf b/addons/common/functions/fnc_clearPopulationZones.sqf similarity index 100% rename from addons/legacy/functions/fnc_clearPopulationZones.sqf rename to addons/common/functions/fnc_clearPopulationZones.sqf diff --git a/addons/legacy/functions/fnc_getExclusionZones.sqf b/addons/common/functions/fnc_getExclusionZones.sqf similarity index 100% rename from addons/legacy/functions/fnc_getExclusionZones.sqf rename to addons/common/functions/fnc_getExclusionZones.sqf diff --git a/addons/legacy/functions/fnc_getPopulationZones.sqf b/addons/common/functions/fnc_getPopulationZones.sqf similarity index 100% rename from addons/legacy/functions/fnc_getPopulationZones.sqf rename to addons/common/functions/fnc_getPopulationZones.sqf diff --git a/addons/legacy/functions/fnc_isInPopulatedZone.sqf b/addons/common/functions/fnc_isInPopulatedZone.sqf similarity index 61% rename from addons/legacy/functions/fnc_isInPopulatedZone.sqf rename to addons/common/functions/fnc_isInPopulatedZone.sqf index 92a147ae..283639a9 100644 --- a/addons/legacy/functions/fnc_isInPopulatedZone.sqf +++ b/addons/common/functions/fnc_isInPopulatedZone.sqf @@ -10,13 +10,12 @@ private _populationZones = [] call FUNC(getPopulationZones); private _exclusionZones = [] call FUNC(getExclusionZones); private _inAnyPopulationZone = if (count _populationZones == 0) then { - true + true; // "there is no population zone" defaults to "*everywhere* is population zone" } else { - // TODO uhm… how about [] findIf {} != -1 ? - [_populationZones, {_position inArea (_this#0)}] call FUNC(arrayContains) + _populationZones findIf {_position inArea _x} != -1; }; if (!_inAnyPopulationZone) exitWith {false}; -private _inAnyExclusionZone = [_exclusionZones, {_position inArea (_this#0)}] call FUNC(arrayContains); +private _inAnyExclusionZone = _exclusionZones findIf {_position inArea (_x)} != -1; !_inAnyExclusionZone diff --git a/addons/legacy/functions/fnc_module_addExclusionZone.sqf b/addons/common/functions/fnc_module_exclusionZone.sqf similarity index 100% rename from addons/legacy/functions/fnc_module_addExclusionZone.sqf rename to addons/common/functions/fnc_module_exclusionZone.sqf diff --git a/addons/legacy/functions/fnc_module_addPopulationZone.sqf b/addons/common/functions/fnc_module_populationZone.sqf similarity index 100% rename from addons/legacy/functions/fnc_module_addPopulationZone.sqf rename to addons/common/functions/fnc_module_populationZone.sqf diff --git a/addons/legacy/XEH_PREP.hpp b/addons/legacy/XEH_PREP.hpp index 14a38436..67fe62b1 100644 --- a/addons/legacy/XEH_PREP.hpp +++ b/addons/legacy/XEH_PREP.hpp @@ -1,13 +1,8 @@ PREP(addCivInteractions); -PREP(addExclusionZone); -PREP(addPopulationZone); -PREP(arrayContains); PREP(checkHonkingOnCivilian); PREP(checkWeaponOnCivilianPerception); PREP(checkWeaponOnCivilianPointer); PREP(clearCurrentlyThinking); -PREP(clearExclusionZones); -PREP(clearPopulationZones); PREP(compare); PREP(customActivity_reverse); PREP(deleteIfDamaged); @@ -27,9 +22,7 @@ PREP(forceEmotionSpeed); PREP(forcePanicSpeed); PREP(formatNowPlusSeconds); PREP(getCurrentlyThinking); -PREP(getExclusionZones); PREP(getGlobalCivs); -PREP(getPopulationZones); PREP(handleAnimation); PREP(handleGestureGo); PREP(handleGestureStop); @@ -43,11 +36,8 @@ PREP(interact_carryOnAction); PREP(interact_carryOnCondition); PREP(isInDistanceFromOtherPlayers); PREP(isInHouse); -PREP(isInPopulatedZone); PREP(isPlayerHonking); PREP(mapMarkers); -PREP(module_addExclusionZone); -PREP(module_addPopulationZone); PREP(nowPlusSeconds); PREP(playerLoop); PREP(reverse_abort); diff --git a/addons/legacy/config.cpp b/addons/legacy/config.cpp index c52feb44..9a4079d2 100644 --- a/addons/legacy/config.cpp +++ b/addons/legacy/config.cpp @@ -13,4 +13,3 @@ class CfgPatches { }; #include "CfgEventHandlers.hpp" -#include "CfgVehicles.hpp" diff --git a/addons/legacy/functions/fnc_arrayContains.sqf b/addons/legacy/functions/fnc_arrayContains.sqf deleted file mode 100644 index 820f1a2d..00000000 --- a/addons/legacy/functions/fnc_arrayContains.sqf +++ /dev/null @@ -1,13 +0,0 @@ -#include "..\script_component.hpp" - -params [ - ["_arr", []], - ["_discriminator", {}] -]; - -if ((count _arr) == 0) exitWith {false}; - -{ - private _result = [_x, _forEachIndex] call _discriminator; - if (_result) exitWith {true}; false -} forEach _arr diff --git a/addons/legacy/functions/fnc_findSpawnPosition.sqf b/addons/legacy/functions/fnc_findSpawnPosition.sqf index d023b6c6..3d319304 100644 --- a/addons/legacy/functions/fnc_findSpawnPosition.sqf +++ b/addons/legacy/functions/fnc_findSpawnPosition.sqf @@ -57,7 +57,7 @@ private _result = { [_allPlayers, _candidate, _minDistance] call FUNC(isInDistanceFromOtherPlayers) } && { - [getPos _candidate] call FUNC(isInPopulatedZone) + [getPos _candidate] call EFUNC(common,isInPopulatedZone) } ) exitWith { LOG_1("found spawn position %1", _candidate); diff --git a/addons/legacy/functions/fnc_setupZeusModules.sqf b/addons/legacy/functions/fnc_setupZeusModules.sqf index fafd4209..fa534581 100644 --- a/addons/legacy/functions/fnc_setupZeusModules.sqf +++ b/addons/legacy/functions/fnc_setupZeusModules.sqf @@ -19,7 +19,7 @@ }; private _marker = _areaMarkersAtPos select (_minDistanceAndIndex#1); - [_marker] call FUNC(addExclusionZone); + [_marker] call EFUNC(common,addExclusionZone); _marker setMarkerBrushLocal "BORDER"; _marker setMarkerColorLocal "ColorUNKNOWN"; } @@ -44,7 +44,7 @@ }; private _marker = _areaMarkersAtPos select (_minDistanceAndIndex#1); - [_marker] call FUNC(addPopulationZone); + [_marker] call EFUNC(common,addPopulationZone); _marker setMarkerBrushLocal "BORDER"; _marker setMarkerColorLocal "ColorCIV"; } diff --git a/addons/patrol/functions/fnc_taskPatrol.spec.sqf b/addons/patrol/functions/fnc_taskPatrol.spec.sqf index 6f4614ac..3e03584b 100644 --- a/addons/patrol/functions/fnc_taskPatrol.spec.sqf +++ b/addons/patrol/functions/fnc_taskPatrol.spec.sqf @@ -1,6 +1,6 @@ ["a civilian", { - call grad_civs_legacy_fnc_clearExclusionZones; + call grad_civs_common_fnc_clearExclusionZones; private _group = createGroup [civilian, true]; _group setCombatMode "GREEN"; private _pos = [0, 0, 0]; @@ -98,15 +98,15 @@ private _trgW = createTrigger ["EmptyDetector", (getPos _civ) vectorAdd [-250, 150, 0]]; _trgW setTriggerArea [150, 250, 0, true]; - [_trgW] call grad_civs_legacy_fnc_addExclusionZone; + [_trgW] call grad_civs_common_fnc_addExclusionZone; private _trgS = createTrigger ["EmptyDetector", (getPos _civ) vectorAdd [0, -250, 0]]; _trgS setTriggerArea [200, 150, 0, true]; - [_trgS] call grad_civs_legacy_fnc_addExclusionZone; + [_trgS] call grad_civs_common_fnc_addExclusionZone; private _trgE = createTrigger ["EmptyDetector", (getPos _civ) vectorAdd [250, 150, 0]]; _trgE setTriggerArea [150, 250, 0, true]; - [_trgE] call grad_civs_legacy_fnc_addExclusionZone; + [_trgE] call grad_civs_common_fnc_addExclusionZone; [_civ] }, @@ -134,7 +134,7 @@ format ["waypoint %1 at %2 is not in exclusion zone at %3 (%4)", _forEachIndex, _x, getPos _exclusionZone, triggerArea _exclusionZone] ] call grad_testing_fnc_assertFalse; } forEach _waypointPositions; - } forEach (call grad_civs_legacy_fnc_getExclusionZones); + } forEach (call grad_civs_common_fnc_getExclusionZones); } ], ["will avoid crossing exclusion zones", @@ -145,7 +145,7 @@ ] ] ], - grad_civs_legacy_fnc_clearExclusionZones + grad_civs_common_fnc_clearExclusionZones ] ], { diff --git a/addons/patrol/functions/fnc_taskPatrolFindWaypoint.sqf b/addons/patrol/functions/fnc_taskPatrolFindWaypoint.sqf index 0f8ecc90..6d9174e2 100644 --- a/addons/patrol/functions/fnc_taskPatrolFindWaypoint.sqf +++ b/addons/patrol/functions/fnc_taskPatrolFindWaypoint.sqf @@ -38,7 +38,7 @@ for "_i" from 1 to _maxTries do { _searchPosition }; - private _inPopulatedZone = [_searchPosition] call EFUNC(legacy,isInPopulatedZone); + private _inPopulatedZone = [_searchPosition] call EFUNC(common,isInPopulatedZone); if (_inPopulatedZone) exitWith { LOG_1("position %1 is not in exclusionzone, return it", _searchPosition); _waypointPosition = _searchPosition; diff --git a/addons/patrol/functions/fnc_taskPatrolFindWaypoints.spec.sqf b/addons/patrol/functions/fnc_taskPatrolFindWaypoints.spec.sqf index b0524a00..bf21b28f 100644 --- a/addons/patrol/functions/fnc_taskPatrolFindWaypoints.spec.sqf +++ b/addons/patrol/functions/fnc_taskPatrolFindWaypoints.spec.sqf @@ -2,15 +2,15 @@ { private _trgW = createTrigger ["EmptyDetector", [-250, 150, 0]]; _trgW setTriggerArea [150, 250, 0, true]; - [_trgW] call grad_civs_legacy_fnc_addExclusionZone; + [_trgW] call grad_civs_common_fnc_addExclusionZone; private _trgS = createTrigger ["EmptyDetector", [0, -250, 0]]; _trgS setTriggerArea [200, 150, 0, true]; - [_trgS] call grad_civs_legacy_fnc_addExclusionZone; + [_trgS] call grad_civs_common_fnc_addExclusionZone; private _trgE = createTrigger ["EmptyDetector", [250, 150, 0]]; _trgE setTriggerArea [150, 250, 0, true]; - [_trgE] call grad_civs_legacy_fnc_addExclusionZone; + [_trgE] call grad_civs_common_fnc_addExclusionZone; }, [ ["when a patrol path is created", @@ -37,7 +37,7 @@ format ["waypoint %1 at %2 is not in exclusion zone at %3 (%4)", _forEachIndex, _x, getPos _exclusionZone, triggerArea _exclusionZone] ] call grad_testing_fnc_assertFalse; } forEach _positions; - } forEach (call grad_civs_legacy_fnc_getExclusionZones); + } forEach (call grad_civs_common_fnc_getExclusionZones); } ], ["will avoid crossing exclusion zones", @@ -48,7 +48,7 @@ ] ] ], - grad_civs_legacy_fnc_clearExclusionZones + grad_civs_common_fnc_clearExclusionZones ] call grad_testing_fnc_executeTest; ["GIVEN a point and no exclusion zones WHEN a patrol path is created", From 964019ac6f0398bc60969d1ae146cab74a2f8c55 Mon Sep 17 00:00:00 2001 From: Moritz Schmidt Date: Mon, 20 Jul 2020 20:09:40 +0200 Subject: [PATCH 2/5] icons for all Eden modules --- addons/common/CfgVehicles.hpp | 4 ++-- .../common/ui/icon_module_exclusion_zone_ca.paa | Bin 0 -> 5625 bytes .../common/ui/icon_module_population_zone_ca.paa | Bin 0 -> 5625 bytes addons/transit/CfgVehicles.hpp | 4 ++-- .../transit/ui/icon_module_transit_sink_ca.paa | Bin 0 -> 5625 bytes .../transit/ui/icon_module_transit_source_ca.paa | Bin 0 -> 5625 bytes 6 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 addons/common/ui/icon_module_exclusion_zone_ca.paa create mode 100644 addons/common/ui/icon_module_population_zone_ca.paa create mode 100644 addons/transit/ui/icon_module_transit_sink_ca.paa create mode 100644 addons/transit/ui/icon_module_transit_source_ca.paa diff --git a/addons/common/CfgVehicles.hpp b/addons/common/CfgVehicles.hpp index adc2bcf0..6980bed7 100644 --- a/addons/common/CfgVehicles.hpp +++ b/addons/common/CfgVehicles.hpp @@ -13,7 +13,7 @@ class CfgVehicles { scope = 2; // visible in editor displayName = "population zone"; - icon = ""; // Map icon. Delete this entry to use the default icon + icon = QPATHTOF(ui\icon_module_population_zone_ca.paa); category = QEGVAR(main,modules); function = QFUNC(module_populationZone); functionPriority = 0; // first to execute @@ -33,7 +33,7 @@ class CfgVehicles { scope = 2; // visible in editor displayName = "exclusion zone"; - icon = ""; // Map icon. Delete this entry to use the default icon + icon = QPATHTOF(ui\icon_module_exclusion_zone_ca.paa); category = QEGVAR(main,modules); function = QFUNC(module_exclusionZone); functionPriority = 0; // first to execute diff --git a/addons/common/ui/icon_module_exclusion_zone_ca.paa b/addons/common/ui/icon_module_exclusion_zone_ca.paa new file mode 100644 index 0000000000000000000000000000000000000000..84a1d9500764a12e1d99d8474af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=d|%WD5WahXm2Ms@vz1f!G0dkVR~g~KN@dRtlj<@H98?UlSn zxjbdaOQneYO3w%Rg2O$C{jKDWHl9dU&WrU8Cibrw?@RQ3dj%iQZk=d$B{}K&Be$>g zmo{JYd|=kmIOdk?8-l;v=apOP*?H_fU5fzF#TwSozyBM5!}eGfgfLC_Otu8hI?u=t}!eyzhtH-O)iTc zh)p11^wBcP(vH|fs64HfSLeu>@h6FvID-Y_LpjnbmulyHTb_n~u;IL+NAS!l4oCo3 zPoa4VhLD3$LAGZ~%B6<3`auV)9FDi4LUJSC0Y75bPUMgC2JIuChEHYts9=!HVn?ay zSN!31$7xvUq*DY%jtc5DRpP6XycNne`h!EPV#g#HbC0bOnZ6C}e;}FteIH0S8OHEP z<9@!4_<^zksy!wrLcSQPbB8+|Fy2;BKyu5BX-fRINd1qm5RCWf&1@N~oUQ7=`pVX$ zxmTQue?s=%gL_S*XYg=^+V~g_pLm|#j5*f)D{}aealVr#*|;1CCSN{=__1C#%-4#8 zS?eiIBg9etf*1o@eY>r43BLIFb%A96(t_)FY)84k@=f9dqXm~u7C%8;virx&4Kl|1 zGdZ;hacE!ZXS(gaYccLL+#bXU)EVcI>&yC4?w9rSf^6T$#^)qkM zV!U#`gf-HA*JgY5ZCT%BBSsvF{j5%NAe+u*$^Cg6=MPRDwLVA|A9gIcH7=hfV|>f= zDEY9VyxVZpDJ_6HFX_{m;;C-}9|{vZlid|2i86n*>$tuZfAmPO3Z1YZkT*jIrD zGDBk1&^10RxA{fMzB{Wie-FTEG;1Led5Mx~2T*<*-5N=%gl%58Pf5Fp(zVi0Z(OYT z98c>@zG77a()_$>Uc*!wQNjMJ#rh{%W_k0#?iU$m)wx4970p}y=PYG4q?i~ZWB>ieDen+x88!u; JWm#3^=RYGP7ES;F literal 0 HcmV?d00001 diff --git a/addons/common/ui/icon_module_population_zone_ca.paa b/addons/common/ui/icon_module_population_zone_ca.paa new file mode 100644 index 0000000000000000000000000000000000000000..9870880803dbde7cdb176425b71d23f0d6074cd1 GIT binary patch literal 5625 zcmeHLZ)g-p6o0qo%;wtA2(}-p;ii|MNBp27O|?eu4olJlrBZDX#1AnLgc$u$5ZfTG zXRBBHCx2)|BW-U9emMG}sI3b^1=E&*$Z4=28cFnu7Ae?L?FDSW>-0CfH@mY-Yq20C zn#nBOFZ14;_j~i^&FqGGTU%<&`nK0oRYb%&Z?N&!)W!<7$Jes9u%z?(DK^ zMYa1k%qjiqQqtZ0Fy0aNYA2-pOpnjvt5(MiYxgbBUz@DUm%nG`YI^>6PyvVR=i)1O`Z%|haj26WH=`>+4t z)JXImx|Dz1_>U|{y+NzFD3X;wajl`U6rJ8UrOTDQzz>uPCq*NAKb5@`G>{*(B0pm z`OUjj9F(8K5BI*qh!NongZtWFL}50V51Vj79cNHcvG^R}V#tc-V%XEOew?|#yn*Y# zs;_H?V!z0ZtVYjVZQgNr@1A9x3x9Qe$*qIs@!on|lYtG>r%%lAW1TeBKD=dq%zW|; z?(|T4;OF#Um9Wo9(|Kq*0X?w zz7&iv==T`1j28J(2=G%Nr5pDA4EFh13ZanL{t0?RpUY#k$TiSY=K~$X!|+8kb-e=f zGZtgZdqf%QaLX8fBW`H%v83d??`8sZEq91lj`fxyl(Cclr;K6!0`tQ==JOAPUb{Kk z(Sk1L>%6$;)9=tFR^_!IKLkJ>7vcA?5Jpqt5zI#sPEIQqu3!1ldxF2PA1#$9FO|PJ z_fPYa4h7d9ghg|)$R`yGfToO#;sj^npzuDk<1jClI^0V6-WaYw#RdSUl_!e%{5Kd;iO%=G zlpetC8S^6!b-(m)AGc2*ggpy^K-hH1B#CZgw|}4h#NJJm&*$$@`g-GrjBSRRnwqXr ty6^4uG2m-=MR1Gs^0$o}ooOiEL{<1hJfDBj`fc>^F1rX&JPtw8{stfa?yvv= literal 0 HcmV?d00001 diff --git a/addons/transit/CfgVehicles.hpp b/addons/transit/CfgVehicles.hpp index 1d99c080..fa09c5c3 100644 --- a/addons/transit/CfgVehicles.hpp +++ b/addons/transit/CfgVehicles.hpp @@ -15,7 +15,7 @@ class CfgVehicles { scope = 2; // visible in editor displayName = "Transit Traffic Source"; - icon = ""; // Map icon. Delete this entry to use the default icon + icon = QPATHTOF(ui\icon_module_transit_source_ca.paa); category = QEGVAR(main,modules); function = QFUNC(module_transitSource); functionPriority = 0; // first to execute @@ -64,7 +64,7 @@ class CfgVehicles { scope = 2; // visible in editor displayName = "Transit Traffic Sink"; - icon = ""; // Map icon. Delete this entry to use the default icon + icon = QPATHTOF(ui\icon_module_transit_sink_ca.paa); category = QEGVAR(main,modules); function = QFUNC(module_transitSink); functionPriority = 0; // first to execute diff --git a/addons/transit/ui/icon_module_transit_sink_ca.paa b/addons/transit/ui/icon_module_transit_sink_ca.paa new file mode 100644 index 0000000000000000000000000000000000000000..ae7ab5f26767d33b4ce93a7e8fc7b5f80ef4eeab GIT binary patch literal 5625 zcmds54@{Kj8GqjI?t>5En)%Ss5d7=E&( zWVwd87QZ{}06WtGUQ+@7hTr>pG|&K0gKV1ifU!I&xG5amG?Q}xuUD1jYr(a@@tx*9 zh{-gbT9r%|)3|u2yk*hwhk;SP{KEc7DdAN#5aUDG>-BmJj3fHkjWio>dTz3-wVXKu0IIPQ673#sxM*z0~1ab-hxOdl-zC*re9(hR(Q z%s+6H_s}HqL~--8%j&*B*z0k-&HQI*!OEFPfyQN3RiEoce;8|w&*u=bECkD3&MWL1 zYP2YaY~i=Z{Xg@QVAY($YVbuA3JPe{LnaxdlHh#-#5Nz$kz{zbn($PTterU{vjVq^hf?=V0Gk9V|2ylVI4D> zgIg+q$r@p@pY(-;y8chgZ|NW2Zj7A19x?QB8%QCT)NWvFsj%;>gmJz)>*n3(ZGDH| z@uNwGym`Oxm;W|!wOCz&b)*lsOC1>-LGC^H)%h>o=Z_pOiX7Lmrr9qSR{SWqR_q_1 zr&k-pV2(77^MSIu9JiED@@`6SrhLA1-|6be$?BLqW53*ccYc&^H-msv?a=1gG^(lVM_OVyqZ;aqajI(?Bo8|x4FqdCxSAO3v@;A{p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(*-SS0IBt5e7G{r@l>L=T-9x^stLzz}xr3 zmMLo@*a-zbm%nt0;a>ES@qg{i2S1-NJ`K9T2S7)5A zP_<9w>Nuov>;)8Q-)zno^&v}()SfRH)fc18YZ=W=A>4}F;ugnr&fc3FnBF>EtVkBR zO{Xm>(CV@&t!P@!Dg}K(1L&n~c;lgtt*5gvJF%Z%gQ_KS`io{98NM|ATT2h;M}gT_ wcJ4xNSgWuFBAOk8zfD_A+W;v`wpg)X<9_}M8m7L)UKhQ|`n|d9(RO_P1$D(cyZ`_I literal 0 HcmV?d00001 diff --git a/addons/transit/ui/icon_module_transit_source_ca.paa b/addons/transit/ui/icon_module_transit_source_ca.paa new file mode 100644 index 0000000000000000000000000000000000000000..47a9760947e315b9c02d3a215138965502193bf6 GIT binary patch literal 5625 zcmdT|ZBSI_6+ZXgy|9AF)wtCOQWoXQXht-OI%%>OY&1lOcj8_liMGqy%+RqYF|k85 zmKBU2?L=0kRhvevNs~-wY=9s1V>-B?qcU1a>$F2c2NJcyC>0cw1zq;-Iq%)O;?kB< zlT34GcjWQ?I?p-hea^Wnvt`S&olBOj%C-Q&fddD&a9o(3Pnh9Dcv*JdQo=$AuUxux zg^JjN-<=A;p2+||wE_GMzhiq;PyuiU`QBx6OhZX~LrDT-0J?6Ih_7Hj8N>b$>hVF%9u2A|7A%xUjo6 zuDw=%l?yEn+(1)upQXW%CcJo|JJWCXY%z+r#Tsj{oz14A9vd#rb5P zj@M^2K4Tqc(qctSR-n;u2SJeFWPoDTpJc}Cq22}4uVros<+lZL@n*29$!(!=E$K&y zOV)C|KsvS&{#%FtyS(`~=6>IKALs9@jxzBNUPKHot`9g!rlE|7%J~Oj_PC1 z4^sZ*RiqI{f84j8uv7u}&@le1y95v+r;fOG}yAgU|8@N*yT(#bB z%ok(^nm8XOsDxGAFDiDpzK&f_E_Dx}Z|Q0Di}*}vEAKm99yo2<$1D?zee&b8O&pnD zqw#0(lUgf&%=Ncf?mnf6HIFoaNrqP{hY&n@v}TSU(F?h5gAOuOeL& zGiiTK`(O0LU~ljTC^(1Y%L6A&d*iQe{gdPN2RO;FSLgySir-y)6{?5h$oMlj8=s3y z&GpkG*N+ir^qr~U$A|3sGv1Hkn8DLxUFbYi3qbw2n4(zu`MQb~|0L#1Z6d$FSbi|~ zjn$@or_VWve>nb2o*bxR_%X*L=YQSsp8Y$A+Ny>)e+{2YSea4K@Y{$L48+*KQvCbA zYw}$6>;pJ)hwM+n{@uWps4R@tC}F&daC}%FDmpl} zo8v4ML^~Mwmv)fX(0S(l)wS4LSsVJ7?&0|?+ zN@;lpKULH8$a)ot#oe{i^VkB@dKn8$LNBWsUSGEFW;eJ;L-CU?)@HO%46LMn(4zU^ z3YPSg-1QGo{|mYR3D@e2X1OsOIGJONgsHAX-Igq^S|nGJJ=~v#a@z?B9yUgE4}ukEWAiWi6-6X^x&Mp&ho=3 z{uwzcV&`F;U$?c5il)A*@c!Fyd<}!eUX)2Ye+^^c6I08MT05B~+2hh62*2}A%N-9L zeoL|-FTl12+u&mo+V|E}m(K%zpOO7>_!>hp%pm&bgcA+>bba+`Ze>w|0#T|;>je}T z2J`!xn%v*&q%e9^7rMbEjq@5Z7ZVrvayIBFdmD3$$~1sAcxr9n z`Cu2}xHz=$rHP6#MEpC^V;*>5k%J6X z=i!}+Br9~jR=DcEWksQ%0?9482Vw4m-5q|nVv~iYAe4#oCvLnzxKKS28#{-t)tkPv z&+#-ajZEX{;FU&or=4eJ99+BW0>T#+mH{r-Oj6# z6+0~zU;qXu9qP3_L*C8*f7~AH8xu+4`(Ihj(HC{{*0i?VJDr literal 0 HcmV?d00001 From 35437ae295bdaa4c6cd56fda13a4b4981ca0b946 Mon Sep 17 00:00:00 2001 From: Moritz Schmidt Date: Mon, 20 Jul 2020 20:12:13 +0200 Subject: [PATCH 3/5] omfg remove debug output --- addons/legacy/functions/fnc_handleAnimation.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/legacy/functions/fnc_handleAnimation.sqf b/addons/legacy/functions/fnc_handleAnimation.sqf index 99ec43d1..4ca4d57b 100644 --- a/addons/legacy/functions/fnc_handleAnimation.sqf +++ b/addons/legacy/functions/fnc_handleAnimation.sqf @@ -2,7 +2,7 @@ params ["_unit", "_animation"]; -systemChat format["_animation: %1", _animation]; +// systemChat format["_animation: %1", _animation]; if ((toLower _animation) in ["gesturefreeze", "ace_gestures_hold", "ace_gestures_holdstandlowered"]) exitWith { [_unit] call FUNC(handleGestureStop); From 519bfb2175db7e3ade8ebe375d4fe747f0e1c9c6 Mon Sep 17 00:00:00 2001 From: Moritz Schmidt Date: Mon, 20 Jul 2020 20:12:20 +0200 Subject: [PATCH 4/5] remove comment --- addons/gta/functions/fnc_registerPlayerTheftHandler.sqf | 6 ------ 1 file changed, 6 deletions(-) diff --git a/addons/gta/functions/fnc_registerPlayerTheftHandler.sqf b/addons/gta/functions/fnc_registerPlayerTheftHandler.sqf index 6449ca70..e7397d5c 100644 --- a/addons/gta/functions/fnc_registerPlayerTheftHandler.sqf +++ b/addons/gta/functions/fnc_registerPlayerTheftHandler.sqf @@ -81,9 +81,3 @@ player addEventHandler [ [GVAR(stolenVehiclePfh)] call CBA_fnc_removePerFrameHandler; } ]; - - -// TEST -//["grad_civs_vehicleTheft", { -// systemChat format ["%1 has been stolen by %2", _this#0, _this#1]; -//}] call CBA_fnc_addEventHandler; From 0ec47631782ae0bbb0e98ece1af4270f873d61f3 Mon Sep 17 00:00:00 2001 From: Moritz Schmidt Date: Mon, 20 Jul 2020 20:30:21 +0200 Subject: [PATCH 5/5] oops. tolerate default array values from editboxes. shit is weird, i thought they only ever returned string?? --- addons/common/functions/fnc_parseCsv.sqf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/common/functions/fnc_parseCsv.sqf b/addons/common/functions/fnc_parseCsv.sqf index c58d91f6..ee829d62 100644 --- a/addons/common/functions/fnc_parseCsv.sqf +++ b/addons/common/functions/fnc_parseCsv.sqf @@ -1,12 +1,14 @@ #include "..\script_component.hpp" /* - parse list of strings + parse list of strings into an array. tolerates arrays, will return input value in that case */ params [ - ["_rawValue", "", [""]] + ["_rawValue", "", ["", []]] ]; +if (_rawValue isEqualType []) exitWith { _rawValue }; + private _delimiter = ","; private _firstChar = _rawValue select [0, 1];