diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_createMissionMarkers.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_createMissionMarkers.sqf index 05f5629..3181d9a 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_createMissionMarkers.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_createMissionMarkers.sqf @@ -61,4 +61,4 @@ if (toUpper(_markerType) in ["ELLIPSE","RECTANGLE"]) then // not an Icon .... //diag_log format["_fnc_createMarkers: case of ICON: _markers = %1",_markers]; }; -_markers +_markers \ No newline at end of file diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_findSafePosn.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_findSafePosn.sqf index 6162ee1..ebf2333 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_findSafePosn.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_findSafePosn.sqf @@ -99,6 +99,7 @@ while { !_validspot} do _count = _count - 1; _slope = _slope + 0.02; uiSleep 0.1; // to give the server a chance to handle other jobs for a moment + diag_log format["_findSafePosn: _count = %1 | _slope = %2 | _coords = %3",_count,_slope,_coords]; } else { //uiSleep 1; @@ -175,6 +176,7 @@ while { !_validspot} do }; }; + //diag_log format["_fnc_findSafePosn: _coords = %1 | _flatCoords = %2 | _searchCenter = %3 | _angle %4 | _count = %5 | _validSpot = %6",_coords,_flatCoords,_searchCenter,_angle,_count,_validspot]; }; diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_garrisonBuilding_relPosSystem.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_garrisonBuilding_relPosSystem.sqf index a35c1e6..2969fbc 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_garrisonBuilding_relPosSystem.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_garrisonBuilding_relPosSystem.sqf @@ -22,6 +22,10 @@ params["_center", ["_sideArms",[]] ]; +{ + diag_log format["_fnc_garrisonBuilding_relPosSystem: _this %1 = %2",_forEachIndex,_this select _forEachIndex]; +}forEach _this; + if (_weaponList isEqualTo []) then {_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout}; if (_sideArms isEqualTo []) then {_sideArms = [_aiDifficultyLevel] call blck_fnc_selectAISidearms}; if (_uniforms isEqualTo []) then {_uniforms = [_aiDifficultyLevel] call blck_fnc_selectAIUniforms}; diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin.pbo b/@blckeagls_EDEN/addons/3EDEN_plugin.pbo index 0809a60..8af2660 100644 Binary files a/@blckeagls_EDEN/addons/3EDEN_plugin.pbo and b/@blckeagls_EDEN/addons/3EDEN_plugin.pbo differ diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin.pbo.bak b/@blckeagls_EDEN/addons/3EDEN_plugin.pbo.bak deleted file mode 100644 index 0e447ec..0000000 Binary files a/@blckeagls_EDEN/addons/3EDEN_plugin.pbo.bak and /dev/null differ diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_buildingContainer.sqf b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_buildingContainer.sqf index a61f190..e15af7a 100644 --- a/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_buildingContainer.sqf +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_buildingContainer.sqf @@ -8,17 +8,16 @@ params["_u",["_category","House"]]; private _pos = getPosASL _u; private _building = objNull; private _surfacesAbove = lineInterSectsSurfaces [_pos, [_pos select 0, _pos select 1, (_pos select 2) + 100],_u,_u,true,10]; -//diag_log format["_surfacesAbove = %1",_surfacesAbove]; + { if ((_x select 2) isKindOf _category && !(_x isEqualTo _u)) exitWith {_building = (_x select 2)}; } forEach _surfacesAbove; if (_building isEqualTo objNull) then { private _surfacesBelow = lineInterSectsSurfaces [_pos, [_pos select 0, _pos select 1, (_pos select 2) - 10],_u,_u,true,100]; - //diag_log format["_surfacesBelow = %1",_surfacesBelow]; { if ((_x select 2) isKindOf _category && !(_x isEqualTo _u)) exitWith {_building = (_x select 2)}; } forEach _surfacesBelow; }; -//diag_log format["_fn_buildingContainer: _u = %1 | _building = %2",_u,_building]; + _building \ No newline at end of file diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_configureGarrisonATL.sqf b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_configureGarrisonATL.sqf index 5410554..0643dab 100644 --- a/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_configureGarrisonATL.sqf +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_configureGarrisonATL.sqf @@ -1,9 +1,12 @@ +/* + blckeagls 3EDEN Editor Plugin + by Ghostrider-GRG- + Copyright 2020 + +*/ - - -private _building = _this select 0; -private _CENTER = _this select 1; +params["_building","_center"]; private _pos = getPosATL _building; private _garrisonedBuildings = missionNamespace getVariable["blck_garrisonedBuildings",[]]; private _count = 0; @@ -13,6 +16,7 @@ private _buildingGarrisonATL = []; private _configuredStatics = []; private _configuredUnits = []; private _statics = nearestObjects[getPosATL _building,["StaticWeapon"],sizeOf (typeOf _building)]; +private _units = nearestObjects[getPosATL _building,["Man"],sizeOf (typeOf _building)] select {(vehicle _x) isEqualTo _x}; private _lineBreak = toString [10]; { @@ -20,11 +24,9 @@ private _lineBreak = toString [10]; { private _isInside = [_x] call blck3DEN_fnc_isInside; private _container = [_x] call blck3DEN_fnc_buildingContainer; - //diag_log format["evaluating building %1 static %2 isInside = %3 container = %4",_building,_x,_isInside,_container]; if (_isInside && (_container isEqualTo _building)) then { _configuredStatics pushBackUnique _x; - //diag_log format["Building %1 | buildingPos %2 | _pos %3",typeOf _x, getPosATL _x,_pos]; _staticsText pushBack [format['%1',typeOf _x],(getPosATL _x) vectorDiff (_pos),getDir _x]; }; }; @@ -32,7 +34,6 @@ private _lineBreak = toString [10]; _staticsText joinString _lineBreak; // Since this is run from the editor we do not have to worry about units running off from their original locations -private _units = nearestObjects[getPosATL _building,["Man"],sizeOf (typeOf _building)] select {(vehicle _x) isEqualTo _x}; { if !(_x in _configuredUnits) then { @@ -47,14 +48,12 @@ private _units = nearestObjects[getPosATL _building,["Man"],sizeOf (typeOf _buil } forEach _units; _unitsText joinString _lineBreak; -//diag_log format["_staticsText for building %1 = %2",_building,_staticsText]; -//diag_log format["_unitsText for building %1 = %2",_building,_unitsText]; if !((_staticsText isEqualTo []) && (_unitsText isEqualTo [])) then { _buildingGarrisonATL = [ format["%1", typeOf _building], - (getPosATL _building) vectorDiff _pos, + (getPosATL _building) vectorDiff _center, getDir _building, true, true, @@ -62,5 +61,12 @@ if !((_staticsText isEqualTo []) && (_unitsText isEqualTo [])) then _unitsText ]; }; -//diag_log format["_buildingGarrisonATL = %1",_buildingGarrisonATL]; -[_buildingGarrisonATL,_configuredStatics,_configuredUnits] + +private "_return"; +if (_buildingGarrisonATL isEqualTo []) then +{ + _return = []; +} else { + _return = [_buildingGarrisonATL,_configuredStatics,_configuredUnits]; +}; +_return diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_createGarrisonMarker.sqf b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_createGarrisonMarker.sqf new file mode 100644 index 0000000..4f244e1 --- /dev/null +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_createGarrisonMarker.sqf @@ -0,0 +1,19 @@ +/* + blckeagls 3EDEN Editor Plugin + by Ghostrider-GRG- + Copyright 2020 + +*/ + +params["_object"]; + +private _marker = create3DENEntity ["object","Sign_Arrow_Large_Yellow_F",getPos _object]; +private _markerPos = getPos _object; +private _bbr = boundingBoxReal _object; +_p1 = _bbr select 0; +_p2 = _bbr select 1; +_height = abs ((_p2 select 2) - (_p1 select 2)); +_marker setPosATL [_markerPos select 0, _markerPos select 1, (_markerPos select 2) + _height]; +_object setVariable ["marker",_marker]; + +true \ No newline at end of file diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_createLootMarker.sqf b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_createLootMarker.sqf new file mode 100644 index 0000000..5f2f091 --- /dev/null +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_createLootMarker.sqf @@ -0,0 +1,20 @@ +/* + blckeagls 3EDEN Editor Plugin + by Ghostrider-GRG- + Copyright 2020 + +*/ + +params["_object"]; + +private _marker = create3DENEntity ["object","Sign_Arrow_Large_Green_F",getPos _object]; +private _markerPos = getPos _object; +private _bbr = boundingBoxReal _object; +_p1 = _bbr select 0; +_p2 = _bbr select 1; +_height = abs ((_p2 select 2) - (_p1 select 2)); +_marker setPosATL [_markerPos select 0, _markerPos select 1, (_markerPos select 2) + _height]; +_object setVariable ["marker",_marker]; + +true + diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_display.sqf b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_display.sqf index 7e74fb2..6cf873b 100644 --- a/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_display.sqf +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_display.sqf @@ -1,4 +1,9 @@ - +/* + blckeagls 3EDEN Editor Plugin + by Ghostrider-GRG- + Copyright 2020 + +*/ params["_message"]; // As found in fn_3DENExportTerrainBuilder.sqf diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_displayGarrisonMarkers.sqf b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_displayGarrisonMarkers.sqf new file mode 100644 index 0000000..a6071ff --- /dev/null +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_displayGarrisonMarkers.sqf @@ -0,0 +1,30 @@ +/* + blckeagls 3EDEN Editor Plugin + by Ghostrider-GRG- + Copyright 2020 + +*/ +params["_state"]; +all3DENEntities params ["_objects"]; +_objects = _objects select {_x getVariable["garrisoned",false]}; + +missionNameSpace setVariable["blck_displayGarrisonMarkerOn",_state]; +{ + if (_state) then // if the request was to show the markers then .... + { + private _marker = _x getVariable["marker",""]; + diag_log format["_x = %1 | _marker = %2",_x,_marker]; + if (_marker isEqualto "") then + { + [_x] call blck3DEN_fnc_createGarrisonMarker; + [_x] call blck3DEN_fnc_setEventHandlers; + }; + } else { + blck_displayGarrisonMarkerOn = false; + if !(_x getVariable["marker",""] isEqualTo "") then + { + [_x] call blck3DEN_fnc_removeMarker; + }; + }; + +} forEach _objects; diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_displayLootMarkers.sqf b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_displayLootMarkers.sqf new file mode 100644 index 0000000..aa1ad0c --- /dev/null +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_displayLootMarkers.sqf @@ -0,0 +1,27 @@ +/* + blckeagls 3EDEN Editor Plugin + by Ghostrider-GRG- + Copyright 2020 + +*/ +params["_state"]; +all3DENEntities params ["_objects"]; +_objects = _objects select {_x getVariable ["lootVehicle",false]}; + +missionNamespace setVariable["blck_displayLootMarkerOn",_state]; +{ + if (_state) then // if the request was to show the markers then .... + { + if (_x getVariable["marker",""] isEqualto "") then + { + [_x] call blck3DEN_fnc_createLootMarker; + [_x] call blck3DEN_fnc_setEventHandlers; + }; + } else { + if !(_x getVariable["marker",""] isEqualTo "") then + { + [_x] call blck3DEN_fnc_removeMarker; + }; + }; + +} forEach _objects; \ No newline at end of file diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_endMessage.sqf b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_endMessage.sqf index 97d8c6e..aff7298 100644 --- a/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_endMessage.sqf +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_endMessage.sqf @@ -1,4 +1,9 @@ - +/* + blckeagls 3EDEN Editor Plugin + by Ghostrider-GRG- + Copyright 2020 + +*/ params["_end"]; missionNamespace setVariable["blck_endMessage",_end]; diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_getGarrisonInfo.sqf b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_getGarrisonInfo.sqf index c5c01ba..50c6a7c 100644 --- a/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_getGarrisonInfo.sqf +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_getGarrisonInfo.sqf @@ -1,19 +1,29 @@ - -private _object = get3DENSelected "object" select {((typeOf _x) isKindOf "House") && [_x] call BIS_fnc_isBuildingEnterable}; +/* + blckeagls 3EDEN Editor Plugin + by Ghostrider-GRG- + Copyright 2020 + +*/ +private _objects = get3DENSelected "object"; private "_message"; - switch (count _objecct) do +diag_log format["getGarrisonInfo: _object = %1",format["%1",_object]]; + if (_objects isEqualTo []) then { - case 0: {_message = "No Enterable Buildings selected"}; - case 1: { - if (_object getVariable["garrisoned",false]) then - { - _message = format["Building %1 IS Garrisoned",typeOf _object]; + _message = "No Buildings Selected"; +} else { + if (count _objects == 1) then + { + if ((_objects select 0) getVariable["garrisoned",false]) then + { + _message = format["Building %1 IS Garrisoned",typeOf (_objects select 0)]; } else { - _message = format["Building %1 is NOT Garrisoned",typeOf _object]; + _message = format["Building %1 is NOT Garrisoned",typeOf (_objects select 0)]; }; - }; - default {_message = "Select a single building then try again"}; - }; - [_message,"Status"] call BIS_fnc_3DENShowMessage; + } else { + _message = format["Select a single building then try again"]; + }; +}; systemChat _message; - diag_log _message; \ No newline at end of file + diag_log _message; + [_message,"Status"] call BIS_fnc_3DENShowMessage; + diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_getLootVehicleInfo.sqf b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_getLootVehicleInfo.sqf index d096d5f..7a3bfc6 100644 --- a/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_getLootVehicleInfo.sqf +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_getLootVehicleInfo.sqf @@ -1,22 +1,31 @@ -private _objects = get3DENSelected "object" select {(typeOf _x) isKindOf "Car"}; +/* + blckeagls 3EDEN Editor Plugin + by Ghostrider-GRG- + Copyright 2020 + +*/ +private _objects = get3DENSelected "object" select {(typeOf _x) isKindOf "Car" || (typeOf _x) isKindOf "Ship" || (typeOf _x) isKindOf "ThingX"}; private "_message"; -switch (count _objects) do -{ - case 0: {_message = "Select a vehicle and try again"}; - case 1: { + if (_objects isEqualTo []) then + { + _message = "No Cars/Ships/ThingX Selected"; +} else { + if (count _objects == 1) then + { if ((_objects select 0) getVariable["lootvehicle",false]) then { - _message = format["Vehicle %1 IS a loot vehicle",typeOf (_objects select 0)]; + _message = format["Vehicle %1 IS a Loot Vehicle",typeOf (_objects select 0)]; } else { - _message = format["Vehicle %1 is NOT a loot vehicle",typeOf (_objects select 0)]; + _message = format["Vehicle %1 is NOT a Loot Vehicle",typeOf (_objects select 0)]; }; + } else { + _message = format["% Vehicles Selected. Select a single vehicle then try again",count _objects]; }; - default {_message = "Select a single vehicle and try again"}; }; - -[_message,"Status"] call BIS_fnc_3DENShowMessage; - systemChat _message; diag_log _message; +[_message,"Status"] call BIS_fnc_3DENShowMessage; + + diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_initializeAttributes.sqf b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_initializeAttributes.sqf index 9bee0fb..f76c05f 100644 --- a/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_initializeAttributes.sqf +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_initializeAttributes.sqf @@ -13,5 +13,7 @@ missionNamespace setVariable["blck_endState",getText(configFile >> "CfgBlck3DEN" missionNamespace setVariable["blck_startMessage","TODO: Add a start message"]; missionNamespace setVariable["blck_endMessage","TODO: Add an end message"]; missionNamespace setVariable["blck_missionLocations","random"]; +missionNameSpace setVariable["blck_displayGarrisonMarkerOn",false]; +missionNamespace setVariable["blck_displayLootMarkerOn",false]; diag_log format["Mission Attributes Initialized for blckeagls at time %1",diag_tickTime]; \ No newline at end of file diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_isInfantry.sqf b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_isInfantry.sqf index 72bf045..62fccec 100644 --- a/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_isInfantry.sqf +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_isInfantry.sqf @@ -8,5 +8,4 @@ private _u = _this select 0; private _isInfantry = if ((_u isKindOf "Man") && (vehicle _u) isEqualTo _u) then {true} else {false}; - //diag_log format["_fn_isInfantry: _isInfantry = %1",_isInfantry]; _isInfantry \ No newline at end of file diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_onDrag.sqf b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_onDrag.sqf new file mode 100644 index 0000000..0231da8 --- /dev/null +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_onDrag.sqf @@ -0,0 +1,13 @@ +/* + blckeagls 3EDEN Editor Plugin + by Ghostrider-GRG- + Copyright 2020 + +*/ +params["_object"]; +if !(_object getVariable["marker",""] isEqualTo "") then +{ + private _marker = _object getVariable["marker",""]; + private _markerPos = getPosATL _object; + _marker setPosATL[_markerPos select 0, _markerPos select 1, (_markerPos select 2) + sizeOf _object]; +}; \ No newline at end of file diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_onRegistered.sqf b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_onRegistered.sqf new file mode 100644 index 0000000..855bed8 --- /dev/null +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_onRegistered.sqf @@ -0,0 +1,28 @@ +/* + blckeagls 3EDEN Editor Plugin + by Ghostrider-GRG- + Copyright 2020 + +*/ + +params["_object"]; + +switch (true) do +{ + case ((typeOf _object) isKindOf "ThingX" && blck_displayLootMarkerOn): { + if !(_object getVariable["lootVehicle",""] isEqualTo "") then + { + [_object] call blck3DEN_fnc_createLootMarker; + [_object] call blck3DEN_fnc_setEventHandlers; + }; + }; + case ((typeOf _object) isKindOf "House" && blck_displayGarrisonMarkerOn): { + if !(_object getVariable["garrisoned",""] isEqualTo "") then + { + [_object] call blck3DEN_fnc_createGarrisonMarker; + [_object] call blck3DEN_fnc_setEventHandlers; + }; + }; +}; + + diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_onUnregister.sqf b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_onUnregister.sqf new file mode 100644 index 0000000..2697b27 --- /dev/null +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_onUnregister.sqf @@ -0,0 +1,14 @@ +/* + blckeagls 3EDEN Editor Plugin + by Ghostrider-GRG- + Copyright 2020 + +*/ +params["_object"]; +if !(_object getvariable["marker",""] isEqualTo "") then +{ + [_object] call blck3DEN_fnc_removeMarker; + _object setVariable ["marker",nil]; + //_object setVariable ["lootVehicle",nil]; + //_object setVariable ["garrisoned",nil]; +}; diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_removeMarker.sqf b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_removeMarker.sqf new file mode 100644 index 0000000..0d60cfb --- /dev/null +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_removeMarker.sqf @@ -0,0 +1,18 @@ +/* + blckeagls 3EDEN Editor Plugin + by Ghostrider-GRG- + Copyright 2020 + +*/ + +params["_object"]; + +private _marker = _object getVariable["marker",""]; +if !(_marker isEqualTo "") then +{ + private _id = get3DENEntityID _marker; + delete3DENEntities [_id]; + _object setVariable["marker",nil]; +}; + +true \ No newline at end of file diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_setEventHandlers.sqf b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_setEventHandlers.sqf new file mode 100644 index 0000000..e807bdb --- /dev/null +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_setEventHandlers.sqf @@ -0,0 +1,14 @@ +/* + blckeagls 3EDEN Editor Plugin + by Ghostrider-GRG- + Copyright 2020 + +*/ +params["_object"]; + +_object removeAllEventHandlers "UnregisteredFromWorld3DEN"; +_object removeAllEventHandlers "RegisteredToWorld3DEN"; +_object removeAllEventHandlers "Dragged3DEN"; +_object addEventHandler ["Dragged3DEN",{_this call blck3DEN_fnc_onDrag;}]; +_object addEventHandler ["UnregisteredFromWorld3DEN",{_this call blck3DEN_fnc_onUnregister;}]; +_object addEventHandler ["RegisteredToWorld3DEN", {_this call blck3DEN_fnc_onRegistered;}]; \ No newline at end of file diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_setGarrison.sqf b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_setGarrison.sqf index 268fb11..926134a 100644 --- a/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_setGarrison.sqf +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_setGarrison.sqf @@ -1,26 +1,47 @@ - +/* + blckeagls 3EDEN Editor Plugin + by Ghostrider-GRG- + Copyright 2020 + +*/ params["_state"]; +private _markersStateON = missionNamespace getVariable["blck_displayGarrisonMarkerOn",false]; +[false] call blck3DEN_fnc_displayGarrisonMarkers; private _objects = get3DENSelected "object" select {(typeOf _x) isKindOf "House"}; +private "_message"; if (_objects isEqualTo []) exitWith { - _m = "Select one or more buildings to configure"; - systemChat _m; + _message = "Select one or more buildings to configure"; + systemChat _message; + diag_log _message; + [_message,"Status"] call BIS_fnc_3DENShowMessage; }; { if ([_x] call BIS_fnc_isBuildingEnterable) then { _x setVariable["garrisoned",_state]; - _m = format["building of type %1 had garrison state set to %2",typeOf _x,_state]; - systemChat _m; - diag_log _m; + _message = format["building of type %1 had garrison state set to %2",typeOf _x,_state]; + systemChat _message; + diag_log _message; + if (blck_displayGarrisonMarkerOn) then + { + [_x] call blck3DEN_fnc_createGarrisonedMarker; + [_x] call blck3DEN_fnc_setEventHandlers; + }; } else { - _m = format["Object type %1 ignored: only enterable buildings can be garrisoned",typeOf _x]; - systemChat _x; - diag_log _x; + _message = format["Object type %1 ignored: only enterable buildings can be garrisoned",typeOf _x]; + systemChat _message; + diag_log _message; + [_message,"Status"] call BIS_fnc_3DENShowMessage; }; } forEach _objects; -_m = format["Garrison State of %1 buildings updated to %2",count _objects,_state]; -systemChat _m; \ No newline at end of file +_message = format["Garrison State of %1 buildings updated to %2",count _objects,_state]; +systemChat _message; +if (_markersStateON) then +{ + [true] call blck3DEN_fnc_displayGarrisonMarkers; +}; +[_message,"Status"] call BIS_fnc_3DENShowMessage; \ No newline at end of file diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_setLootVehicle.sqf b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_setLootVehicle.sqf index 27f574a..d624ad5 100644 --- a/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_setLootVehicle.sqf +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_setLootVehicle.sqf @@ -1,22 +1,49 @@ +/* + blckeagls 3EDEN Editor Plugin + by Ghostrider-GRG- + Copyright 2020 + + sets a flag stored through setVariable for each selected object that meets the filter criteria + only objects of type "Car"or "ThingX" are allowed. +*/ + params["_state"]; -private _objects = get3DENSelected "object" select {(typeOf _x) isKindOf "Car"}; +private _markerStateON = missionNameSpace getVariable["blck_displayLootMarkerOn",false]; +[false] call blck3DEN_fnc_displayLootMarkers; +private "_message"; +private _objects = get3DENSelected "object" select {(typeOf _x) isKindOf "Car" || (typeOf _x) isKindOf "Ship"}; // if (_objects isEqualTo []) exitWith { - _m = "Select one or more vehicles to configure"; - systemChat _m; + _message = "Select one or more vehicles or items of type ThingX to configure"; + systemChat _message; }; { - if ((typeOf _x) isKindOf "Car") then + if ((typeOf _x) isKindOf "Car" || (typeOf _x) isKindOf "Ship") then { _x setVariable["lootvehicle",_state]; - _m = format["Vehicle type %1 set to Loot Vehilce = %1",typeOf _x,_state]; - systemChat _m; - diag_log _m; + if (blck_displayLootMarkerOn && _state) then + { + [_x] call blck3DEN_fnc_createLootMarker; + [_x] call blck3DEN_fnc_setEventHandlers; + } else { + if !(_state) then + { + [_x] call blck3DEN_fnc_removeLootMarker; + }; + }; + _message = format["Vehicle type %1 set to Loot Vehicle = %1",typeOf _x,_state]; + systemChat _message; + diag_log _message; } else { - _m = format["Object with type %1 ignored:: only objects of type Car can be used as loot vehicles",typeOf _x]; - diag_log _m; - systemChat _m; + _message = format["Object with type %1 ignored:: only objects of type Car can be used as loot vehicles",typeOf _x]; + diag_log _message; + systemChat _message; }; } forEach _objects; -_m = format["Loot Vehicle State of %1 vehicles updated to %2",count _objects,_state]; + +if (_markerStateON) then +{ + [true] call blck3DEN_fnc_displayLootMarkers; +}; +_message = format["Loot Vehicle State of %1 objects updated to %2",count _objects,_state]; systemChat _m; \ No newline at end of file diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_updateObjects.sqf b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_updateObjects.sqf index dbdf17a..033239d 100644 --- a/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_updateObjects.sqf +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_updateObjects.sqf @@ -1,4 +1,9 @@ - +/* + blckeagls 3EDEN Editor Plugin + by Ghostrider-GRG- + Copyright 2020 + +*/ private _objects = get3DENSelected "object"; private _markers select {(typeOf _x) = _markerType}; { diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/Export/Untitled-1.txt b/@blckeagls_EDEN/addons/3EDEN_plugin/Export/Untitled-1.txt index d1d19da..6b9c321 100644 --- a/@blckeagls_EDEN/addons/3EDEN_plugin/Export/Untitled-1.txt +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/Export/Untitled-1.txt @@ -1,51 +1,148 @@ -class CfgVehicles -{ - class Object - { - class AttributeCategories - { - class LandVehicle; - class blckLandVehicle: LandVehicle; - { - class Attributes - { - class blckLootVehicle - { - // https://community.bistudio.com/wiki/Eden_Editor:_Configuring_Attributes#Scenario - displayName = "Loot Vehicle"; - toolTip = "Enable/Disable Use as Loot Vehicle"; - property = "blckLootVehicle"; - control = "Edit"; - expression = "_this setVariable['%s',_value];"; - defaultValue = 'false'; - unique = 0; - validate = "BOOL"; - typeName = "BOOL"; - }; - }; - }; - class Static; - class blckHouse: Static - { - class Attributes - { - class blckGarison - { - // https://community.bistudio.com/wiki/Eden_Editor:_Configuring_Attributes#Scenario - displayName = "Garison Building"; - toolTip = "Enable/Disable ?Garisoned Building"; - property = "blckGarison"; - control = "Edit"; - expression = "_this setVariable['%s',_value];"; - defaultValue = 'false'; - unique = 0; - validate = "BOOL"; - typeName = "BOOL"; - }; - }; - }; - }; - }; -}; \ No newline at end of file +/* + Dynamic Mission Generated + Using 3DEN Plugin for blckeagls + dynamicMission.sqf generated:: blckeagls 3DEN Plugin Version 0 : Build 5 : Build Date 09/19/20 + By Ghostrider-GRG- +*/ + +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; + +_defaultMissionLocations = []; +_markerType = ["ELLIPSE",[250,250],"SOLID"]; +_markerColor = "COLORRED"; +_startMsg = "TODO: Change approiately"; +_endMsg = "TODO: Change Appropriately"; +_markerMissionName = "TODO: Update appropriately"; +_crateLoot = blck_BoxLoot_Blue; +_lootCounts = blck_lootCountsBlue; + +_garrisonedBuildings_BuildingPosnSystem = [ + +]; + +_garrisonedBuilding_ATLsystem = [ + ["Land_Cargo_Patrol_V3_F",[0,0,0],45,true,true,[["O_GMG_01_high_F",[0.533447,-1.45142,4.34404],229.902]],[]], + ["Land_Cargo_Patrol_V3_F",[0,0,0],90,true,true,[["O_GMG_01_high_F",[-0.669434,-1.43628,4.34404],272.772]],[]], + ["Land_Cargo_HQ_V3_F",[0,0,0],269.183,true,true,[["O_Mortar_01_F",[4.13428,-1.79297,3.12652],0]],[[[-1.19116,2.72095,3.12796],0]]], + ["Land_Cargo_Patrol_V3_F",[0,0,0],179.749,true,true,[["O_GMG_01_high_F",[-1.22046,0.542969,4.34404],0]],[]] +]; + +_missionLandscape = [ + ["Land_HBarrier_Big_F",[-1.98413,-1.92993,-4.76837e-007],45,true,true], + ["Land_HBarrier_Big_F",[3.98779,-7.51294,-4.76837e-007],45,true,true], + ["Land_HBarrier_Big_F",[-7.52954,12.9387,-4.76837e-007],270,true,true], + ["Land_HBarrier_Big_F",[-7.65234,21.4033,-4.76837e-007],90,true,true], + ["Land_HBarrier_5_F",[24.321,15.1624,-4.76837e-007],270,true,true], + ["Land_HBarrier_Big_F",[25.2722,-3.87012,-4.76837e-007],328.551,true,true], + ["Land_HBarrier_Big_F",[20.9385,18.7275,-4.76837e-007],180,true,true], + ["Land_HBarrier_Big_F",[18.2209,-8.25903,-4.76837e-007],330,true,true], + ["Land_HBarrier_Big_F",[10.5823,-10.2063,-4.76837e-007],0,true,true], + ["Land_HBarrier_Big_F",[34.0476,6.36035,-4.76837e-007],299.181,true,true], + ["Land_Cargo_House_V3_F",[11.125,-4.1167,-4.76837e-007],180,true,true], + ["Land_Cargo_House_V3_F",[33.6809,29.3313,-4.76837e-007],90.6682,true,true], + ["Land_HBarrier_Big_F",[17.3999,23.9451,-4.76837e-007],90,true,true], + ["Land_HBarrier_Big_F",[3.64941,26.885,-4.76837e-007],0,true,true], + ["Land_HBarrier_Big_F",[29.6377,37.4236,-4.76837e-007],225,true,true], + ["Land_HBarrier_Big_F",[12.1257,27.1333,-4.76837e-007],1.36604e-005,true,true], + ["Land_HBarrier_Big_F",[36.0908,34.8279,-4.76837e-007],0,true,true], + ["Land_HBarrier_Big_F",[22.8857,39.9236,-4.76837e-007],180,true,true], + ["Land_HBarrier_Big_F",[37.969,13.8748,-4.76837e-007],299.181,true,true], + ["Land_HBarrier_Big_F",[39.5908,21.3279,-4.76837e-007],270,true,true], + ["Land_HBarrier_Big_F",[39.4658,29.7029,-4.76837e-007],90,true,true], + ["Land_HBarrier_Big_F",[-4.69336,26.6685,-4.76837e-007],0,true,true], + ["Land_HBarrier_Big_F",[14.4446,39.6458,-4.76837e-007],180,true,true], + ["Land_HBarrier_5_F",[16.6345,47.3489,-4.76837e-007],180.149,true,true], + ["Land_HBarrier_5_F",[11.1445,47.3962,-4.76837e-007],180.149,true,true], + ["Land_HBarrier_5_F",[18.7251,43.8938,-4.76837e-007],269.822,true,true], + ["Land_HBarrier_5_F",[7.49487,45.4861,-4.76837e-007],124.084,true,true], + ["Land_Cargo_House_V3_F",[33.5195,22.5332,-4.76837e-007],90.6682,true,true], + ["Land_HBarrier_Big_F",[-6.20093,4.80859,-4.76837e-007],75.8618,true,true], + ["RoadCone_L_F",[9.69141,6.51465,-4.76837e-007],0,true,true], + ["Land_Cargo40_military_green_F",[-3.2334,35.5225,-4.76837e-007],45.5098,true,true], + ["Land_Cargo20_grey_F",[-7.22656,32.293,-4.76837e-007],44.3033,true,true], + ["Land_Cargo20_grey_F",[-13.3616,30.4897,-4.76837e-007],0,true,true], + ["Land_Cargo20_grey_F",[26.2278,-12.2869,-4.76837e-007],6.20739,true,true], + ["Land_Cargo20_grey_F",[39.1899,4.03271,-4.76837e-007],272.936,true,true], + ["Land_Canteen_F",[36.6631,46.6692,-4.76837e-007],0,true,true], + ["Land_PaperBox_01_open_boxes_F",[30.7021,49.6111,-4.76837e-007],0,true,true] +]; + +_simpleObjects = [ + +]; + +_missionLootVehicles = [ + +]; + +_missionPatrolVehicles = [ + ["O_LSV_02_armed_F",[24.1306,-41.168,0],87.1292,75,75], + ["O_LSV_02_armed_F",[12.8894,74.8223,-4.76837e-007],87.7224,75,75] +]; + +_submarinePatrolParameters = [ + +]; + +_airPatrols = [ + +]; + +_missionEmplacedWeapons = [ + ["O_HMG_01_high_F",[9.55957,44.0073,-4.76837e-007],0], + ["O_HMG_01_high_F",[21.7991,15.363,-4.76837e-007],0] +]; + +_missionGroups = [ + [[16.9512,1.75757,0.00143862],3,6,"Blue",30,45], + [[8.01904,18.9385,3.12796],3,6,"Blue",30,45], + [[23.6782,30.5142,0.00143862],3,6,"Blue",30,45], + [[30.0935,9.90186,0.00143862],3,6,"Blue",30,45], + [[-0.340576,10.3516,0.00143862],3,6,"Blue",30,45] +]; + +_scubaGroupParameters = [ + +]; + +_missionLootBoxes = [ + ["Land_Pallet_MilBoxes_F",[-3.88013,11.6785,-4.76837e-007],_crateLoot,_lootCounts,0] +]; + +/* + Use the parameters below to customize your mission - see the template or blck_configs.sqf for details about each them +*/ +_chanceHeliPatrol = blck_chanceHeliPatrolBlue; +_noChoppers = blck_noPatrolHelisBlue; +_missionHelis = blck_patrolHelisBlue; +_chancePara = blck_chanceParaBlue; +_noPara = blck_noParaBlue; +_paraTriggerDistance = 400; +_paraSkill = 'Blue'; +_chanceLoot = 0.0; +_paraLoot = blck_BoxLoot_Blue; +_paraLootCounts = blck_lootCountsBlue; +_missionLandscapeMode = "precise"; +_uniforms = blck_SkinList; +_headgear = blck_headgear; +_vests = blck_vests; +_backpacks = blck_backpacks; +_sideArms = blck_Pistols; +_spawnCratesTiming = "atMissionSpawnGround"; +_loadCratesTiming = "atMissionSpawn"; +_endCondition = "allKilledOrPlayerNear"; +_minNoAI = blck_MinAI_Blue; +_maxNoAI = blck_MaxAI_Blue; +_noAIGroups = blck_AIGrps_Blue; +_noVehiclePatrols = blck_SpawnVeh_Blue; +_noEmplacedWeapons = blck_SpawnEmplaced_Blue; +_minNoAI = blck_MinAI_Blue; +_maxNoAI = blck_MaxAI_Blue; +_noAIGroups = blck_AIGrps_Blue; +_noVehiclePatrols = blck_SpawnVeh_Blue; +_noEmplacedWeapons = blck_SpawnEmplaced_Blue; + +#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf"; \ No newline at end of file diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/Export/fn_exportDynamic.sqf b/@blckeagls_EDEN/addons/3EDEN_plugin/Export/fn_exportDynamic.sqf index 806d835..56d1a5b 100644 --- a/@blckeagls_EDEN/addons/3EDEN_plugin/Export/fn_exportDynamic.sqf +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/Export/fn_exportDynamic.sqf @@ -23,26 +23,6 @@ lootVehicleVariableName = getText(configFile >> "CfgBlck3DEN" >> "configs" >> " buildingPosGarrisonVariableName = getText(configFile >> "CfgBlck3DEN" >> "configs" >> "buildingPosGarrisonVariableName"); buildingATLGarrisionVariableName = getText(configFile >> "CfgBlck3DEN" >> "configs" >> "buildingATLGarrisionVariableName"); -/* -{ - diag_log format["param %1 = %2",_forEachIndex,_x]; -} forEach [ - objectAtMissionCenter, - blck_minAI, - blck_maxAI, - minPatrolRadius, - maxPatrolRadius, - maxVehiclePatrolRadius, - aircraftPatrolRadius, - oddsOfGarison, - maxGarrisonStatics, - typesGarrisonStatics, - blck_MissionDifficulty, - lootVehicleVariableName, - buildingPosGarrisonVariableName, - buildingATLGarrisionVariableName -];*/ - CENTER = [0,0,0]; diag_log format["Dynamic Export called at %1",diag_tickTime]; @@ -115,11 +95,11 @@ if !(_markers isEqualTo []) then { _m1 = _markers select 0; _markerType = (_m1 get3DENAttribute "itemClass") select 0; - _markerShape = (_m1 get3DENAttribute "markerType") select 0; + //_markerShape = (_m1 get3DENAttribute "markerType") select 0; _markerColor = (_m1 get3DENAttribute "baseColor") select 0; _markerText = (_m1 get3DENAttribute "text") select 0; if !(_markerText isEqualTo "") then {blck_dynamicmarkerMissionName = _markerText}; - _markerBrush = (_m1 get3DENAttribute "markerBrush") select 0; + _markerBrush = (_m1 get3DENAttribute "brush") select 0; _markerPos = (_m1 get3DENAttribute "position") select 0; _markerSize = (_m1 get3DENAttribute "size2") select 0; _markerText = (_m1 get3DENAttribute "text") select 0; @@ -136,11 +116,11 @@ if !(_markers isEqualTo []) then diag_log format[" More than one marker was found; only the first marker was processed"]; }; } else { - _markerType = "mil_square"; - _markerShape = "null"; - _markerSize = "[0,0]"; + _markerType = "ELLIPSE"; + //_markerShape = "ELLIPSE"; + _markerSize = "[250,250]"; _markerColor = "COLORRED"; - _markerBrush = "null"; + _markerBrush = "SOLID"; if !(_objects isEqualTo []) then { CENTER = getPosATL (_objects select 0); @@ -149,7 +129,6 @@ if !(_markers isEqualTo []) then }; diag_log format[" No marker was found, using default values and position for mission center position"]; }; -diag_log format["_m1 = %1 | _type = %2 | _shape = %3 | _size = %4 | _color = %5 | _brush = %6 | _text = %7",_m1,_markerType,_markerShape,_markerSize,_markerColor,_markerBrush,_markerText]; if (CENTER isEqualTo [0,0,0]) then { @@ -163,49 +142,56 @@ private _garisonedUnits = []; private _landscape = _objects select{ !(isSimpleObject _x) && - ((typeOf _x) isKindOf "Static") + ((typeOf _x) isKindOf "Static" || ( (typeOf _x) isKindOf "ThingX")) && + !((typeOf _x) isKindOf "ReammoBox_F") && + !(_x getVariable["isLootContainer",false]) && + !((typeOf _x) isKindOf "Helper_Base_F") }; -private _garisonedPos = []; -private _helpers = _objects select {((typeOf _x) isEqualTo garisonMarkerObject)}; -diag_log format["garisonMarkerObject = %1 | _helpers = %2",garisonMarkerObject,_helpers]; -{ - if ([_x] call blck3DEN_fnc_isInside) then - { - _building = [_x] call blck3DEN_fnc_buildingContainer; - _garisonedBuildings pushbackunique _building; - // data structure ["building Classname",[/*building pos*/],/*building dir*/,/*odds of garrison*/, /*Max Statics*/,/*types statics*/,/*max units*/], - // 1 2 3 4 5 6 7 8 9 - _garisonedPos pushBack format[' ["%1",%2,%3,%4,%5,%6,%7,%8,%9]',typeOf _building,(getPosATL _building) vectorDiff CENTER,getDir _building, 'true','true',oddsOfGarrison,maxGarrisonStatics,typesGarrisonStatics,maxGarrisonUnits]; - }; -} forEach _helpers; -//diag_log format["CENTER = %1 | _landscape = %2",CENTER,_landscape]; -private _garrisonATL = []; -{ - _atl = [_x,CENTER] call blck3DEN_fnc_configureGarrisonATL; - // format["_fnc_exportDynamic: _building = %1 | _atl = %2",_x,_atl]; - //diag_log format["_fnc_exportDynamic: typeName _atl = %1",typeName _atl]; - if (typeName _atl isEqualTo "STRING") then {diag_log format["_fnc_exportDynamic: length _atl = %1 | _atl = '' is %2",count _atl, _atl isEqualTo ""]}; - if !(_atl isEqualTo []) then { - if !((_atl select 0) isEqualTo []) then - { - _garrisonATL pushBack (_atl select 0); - _garisonedBuildings pushBack _x; - _garisonedStatics append (_atl select 1); - _garisonedUnits append (_atl select 2) - //diag_log format["_fnc_exportDynamic: garrisoned building added: %1",_atl]; - }; +private _garisonedPos = []; + +diag_log format["_exportDynamic (174): count _landscape = %1",count _landscape]; +for "_i" from 1 to (count _landscape) do +{ + if (isNull _building) exitWith {}; + private _building = _landscape deleteAt 0; + diag_log format ["_garrisonedPos: evaluating _building %1 | ;garrisoned = %2'",_building,_building getVariable["garrisoned",false]]; + if (_building getVariable["garrisoned",false]) then + { + _garisonedPos pushBack format[' ["%1",%2,%3,%4,%5,%6,%7,%8,%9]',typeOf _building,(getPosATL _building) vectorDiff CENTER,getDir _building, 'true','true',oddsOfGarrison,maxGarrisonStatics,typesGarrisonStatics,maxGarrisonUnits]; + } else { + _landscape pushBack _building; }; -} forEach _landscape; +}; + +private _garrisonATL = []; +for "_i" from 1 to (count _landscape) do +{ + if (isNull _building) exitWith {}; + private _building = _landscape deleteAt 0; + _atl = [_building,CENTER] call blck3DEN_fnc_configureGarrisonATL; + if (_atl isEqualTo []) then { + _landscape pushBack _building; + } else { + _garrisonATL pushBack (format[" %1",_atl select 0]); + _garisonedBuildings pushBack _building; + _garisonedStatics append (_atl select 1); + _garisonedUnits append (_atl select 2); + }; +}; diag_log format["_garrisonATL = %1",_garrisonATL]; private _missionLandscape = []; +for "_i" from 1 to (count _landscape) do { - if !(_x in _garisonedBuildings) then + private _building = _landscape deleteAt 0; + if (isNull _building) exitWith {}; + diag_log format["typeOf _x = %1 | _x isMarker = %2",typeOf _building,_building getVariable["marker",false]]; + if !(_building getVariable["marker",false]) then { - _missionLandscape pushBack format[' ["%1",%2,%3,%4,%5]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x, 'true','true']; + _missionLandscape pushBack format[' ["%1",%2,%3,%4,%5]',typeOf _building,(getPosATL _building) vectorDiff CENTER,getDir _building, 'true','true']; }; -}forEach _landscape; +}; private _simpleObjects = _objects select {isSimpleObject _x}; diag_log format["_simpleObjects = %1",_simpleObjects]; @@ -218,7 +204,7 @@ private _missionLootVehicles = []; private _lootVehicles = _objects select { ((typeOf _x) isKindOf "AllVehicles") && !((typeOf _x) isKindOf "Man") && - (_x get3DENAttribute "name" isEqualTo lootVehicleVariableName) + (_x getVariable["lootvehicle",false]) }; diag_log format["_lootVehicles = %1",_lootVehicles]; { @@ -229,7 +215,7 @@ _missionPatrolVehicles = []; private _patrolVehicles = _objects select { (((typeOf _x) isKindOf "Car") || ((typeOf _x) isKindOf "Tank") || ((typeOf _x) isKindOf "Ship")) && !((typeOf _x) isKindOf "SDV_01_base_F") && - !(_x in _lootVehicles) + !(_x getVariable["lootvehicle",false]) }; diag_log format["_patrolVehicles = %1",_patrolVehicles]; { @@ -289,7 +275,7 @@ private _scubaGroups = []; } forEach _scuba; private _lootContainers = []; -private _ammoBoxes = _objects select { +private _ammoBoxes = _objects select { // "ReammoBox_F" (((typeOf _x) isKindOf "ReammoBox") || ((typeOf _x) isKindOf "ReammoBox_F")) }; diag_log format["_ammoBoxes = %1",_ammoboxes]; diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/Export/fn_exportStatic.sqf b/@blckeagls_EDEN/addons/3EDEN_plugin/Export/fn_exportStatic.sqf index ca3dab0..84e9d94 100644 --- a/@blckeagls_EDEN/addons/3EDEN_plugin/Export/fn_exportStatic.sqf +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/Export/fn_exportStatic.sqf @@ -89,11 +89,11 @@ if !(_markers isEqualTo []) then { _m1 = _markers select 0; _markerType = (_m1 get3DENAttribute "itemClass") select 0; - _markerShape = (_m1 get3DENAttribute "markerType") select 0; + //_markerShape = (_m1 get3DENAttribute "markerType") select 0; _markerColor = (_m1 get3DENAttribute "baseColor") select 0; _markerText = (_m1 get3DENAttribute "text") select 0; if !(_markerText isEqualTo "") then {blck_dynamicmarkerMissionName = _markerText}; - _markerBrush = (_m1 get3DENAttribute "markerBrush") select 0; + _markerBrush = (_m1 get3DENAttribute "brush") select 0; _markerPos = (_m1 get3DENAttribute "position") select 0; _markerSize = (_m1 get3DENAttribute "size2") select 0; _markerText = (_m1 get3DENAttribute "text") select 0; @@ -103,7 +103,7 @@ if !(_markers isEqualTo []) then */ } else { _markerType = "mil_square"; - _markerShape = ""; + //_markerShape = ""; _markerSize = [0,0]; _markerColor = "COLORRED"; _markerBrush = ""; diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/config.cpp b/@blckeagls_EDEN/addons/3EDEN_plugin/config.cpp index 5c8ba4a..9c2ece5 100644 --- a/@blckeagls_EDEN/addons/3EDEN_plugin/config.cpp +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/config.cpp @@ -52,8 +52,8 @@ class CfgBlck3DEN class CfgVersion { version = 1.0; - build = 3; - date = "08/23/20"; + build = 5; + date = "09/19/20"; }; }; diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/defines.h b/@blckeagls_EDEN/addons/3EDEN_plugin/defines.h index 034f2a8..7b08db5 100644 --- a/@blckeagls_EDEN/addons/3EDEN_plugin/defines.h +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/defines.h @@ -44,27 +44,32 @@ class CfgFunctions class Core { file = "3EDEN_plugin\Core"; - class help {}; + class about {}; + class buildingContainer {}; + class configureGarrisonATL {}; + class createLootMarker {}; + class createGarrisonMarker {}; + class display {}; + class displayGarrisonMarkers {}; + class displayLootMarkers {}; class getGarrisonInfo {}; class getLootVehicleInfo {}; - class getMissionGarrisonInfo {}; - class getMissionLootVehicleInfo {}; + class help {}; class initializeAttributes {}; class isInfantry {}; class isInside {}; - class buildingContainer {}; - class display {}; + class loadCratesTiming {}; + class onDrag {}; + class onRegistered {}; + class onUnregister {}; + class removeMarker {}; class setDifficulty {}; class setCompletionMode {} class setGarrison {}; class setLootVehicle {}; class setSpawnLocations {}; class spawnCratesTiming {}; - class loadCratesTiming {}; - class endMessage {}; - class startMessage {}; - class configureGarrisonATL {}; class versionInfo {}; }; }; @@ -85,7 +90,7 @@ class cfg3DEN { OnMissionLoad = "call blck3DEN_fnc_initializeAttributes"; OnMissionNew = "call blck3DEN_fnc_initializeAttributes"; - onHistoryChange = "call blck3DEN_fnc_updateObjects"; + //onHistoryChange = "call blck3DEN_fnc_updateObjects"; }; }; @@ -110,24 +115,6 @@ class cfg3DEN }; }; - class blck_garison: Combo - { - class Value - { - text = "Set Garison State"; - items[] = {"No_Garison","Has_garison"}; - }; - class no_garison - { - text = "No Garison"; - //action = "_this setVariable['garison',0];"; - }; - class has_garison - { - text = "Has Garison"; - //action = "_this setVariable['garison',1];"; - }; - }; }; @@ -148,24 +135,7 @@ class cfg3DEN class CfgVehicles { - class House; - class blck_House: House - { - class Attributes - { - class blck_garisoned - { - displayName = "Garrison"; - toolTip = "Define Garrisoned Buildings"; - control = "blck_garison"; - - expression = "_this setVariable ['garrisoned',_value];"; - defaultValue = false; - unique = 0; - }; - }; - }; }; class ctrlMenuStrip; @@ -175,67 +145,6 @@ class display3DEN { class Controls { - /* - class ContextMenu: ctrlMenu - { - class Items - { - items[] += { - "blck_markLootVehicle", - "blck_markGarisonBuildingPos" - }; - class blck_markLootVehicle - { - text = "Designate Loot Vehicles"; - value = false; - //action = "systemChat 'value toggled'"; - conditionShow = "selectedObject"; - items[] = { - "blck_clearLootVehicle", - "blck_designateLootVehicle" - }; - }; - class blck_clearLootVehicle - { - text = "Clear Loot Vehicle Settings"; - value = false; - action = "[false] call blck3DEN_fnc_setLootVehicleStatus"; - }; - class blck_deisgnateLootVehicle - { - text = "Desinate Loot Vehicle"; - value = true; - action = "[true] call blck3DEN_fnc_setLootVehicleStatus"; - }; - - class blck_markGarisonBuildingPos - { - text = "Designate Garisoned Buildings"; - value = false; - conditionShow = "selectedObject"; - items[] = { - "blck_clearGarisonSettings", - "blck_designateGarisonedBuilding" - }; - }; - class blck_clearGarisonSettings - { - text = "Clear Garison Settings"; - value = false; - conditionShow = "selectedObject"; - action = "[false] call blck3DEN_fnc_setGarison"; - }; - class blck_designateGarisonedBuilding - { - text = "Set as Garisoned Building"; - value = true; - conditionShow = "SelectedObject"; - action = "[true] call blck3DEN_fnc_setGarison"; - }; - - }; - }; - */ class MenuStrip: ctrlMenuStrip { @@ -258,12 +167,12 @@ class display3DEN "blckMissionLocation", "blckSeparator", "blck_setGarrison", - "blck_getGarrisonInfo", - "blck_getMissionGarrisonInfo", + //"blck_getGarrisonInfo", + //"blck_getMissionGarrisonInfo", "blckSeparator", "blck_markLootVehicle", - "blck_getLootVehicleInfo", - "blck_getMissionLootVehicleInfo", + //"blck_getLootVehicleInfo", + //"blck_getMissionLootVehicleInfo", "blckSeparator", "blckSaveStaticMission", "blckSaveDynamicMission", @@ -420,35 +329,6 @@ class display3DEN action = "['atMissionCompletion'] call blck3DEN_fnc_loadCratesTiming"; }; - /* - ///////////////////////////// - class blckMissionMessages - { - text = "Set timing for loading crates"; - items[] = { - "blckStartMessage", - "blckEndMessage" - }; - }; - // ["Title","Default","ctrlControlsGroupNoScrollbars","ctrlControlsGroup","ctrlDefault"] - class Edit; - class blckEdit: Edit - { - control = "Edit"; - value = ""; - }; - class blckStartMessage: blckEdit - { - text = "Misstion Start Message"; - action = "[_value] call blck3DEN_startMessage"; - }; - class blckEndMessage: blckEdit - { - text = "Mission End Message"; - action = "[_value] call blck3DEN_endMessage"; - }; - */ - class blckMissionLocation { text = "Toggle Random or Fixed Location"; @@ -470,16 +350,26 @@ class display3DEN action = "['fixed'] call blck3DEN_fnc_setSpawnLocations"; }; + /////////////////////////////////////////////////////// + class blck_setGarrison { - text = "Set as Garrisoned Building"; + text = "Garrisoned Building Settings"; toolTip = "Set garrison status of selected buildings"; items[] = { - "blck_isGarrisoned", - "blck_clearGarrisoned", - "blck_getGarrisonInfo" + "blck_setGarrisonedState", + "blck_getGarrisonInfo", + "blck_garrisonMarkers" }; }; + class blck_setGarrisonedState + { + items[] = { + "blck_isGarrisoned", + "blck_clearGarrisoned" + }; + text = "Garrison Settings"; + }; class blck_isGarrisoned { text = "Garrison Building"; @@ -498,46 +388,79 @@ class display3DEN { text = "Get Building Garrisoned Setting"; toolTip = "Get the selected buildings garrisoned flag"; - value = 0; action = "call blck3DEN_fnc_getGarrisonInfo"; }; - class getMissionGarrisonInfo + class blck_garrisonMarkers { - text = "Get garrison flag for selected buildings"; - toolTip = "The garrisoned flag state will be displayed for selected bulidings"; - value = 0; - action = "call blck3DEN_fnc_getMissionGarrisonInfo"; + items[] = { + "blck_GarrisonMarkersOn", + "blck_GarrisonMarkersOff" + }; + text = "Toggle markers over garrisoned buildings"; }; + class blck_GarrisonMarkersOn + { + text = "Display Markers over Garrisoned Buildings"; + action = "[true] call blck3DEN_fnc_displayGarrisonMarkers"; + }; + class blck_GarrisonMarkersOff + { + text = "Hide Markers over Garrisoned Buildings"; + action = "[false] call blck3DEN_fnc_displayGarrisonMarkers"; + }; + + /////////////////////////////////////////////////////////////// class blck_markLootVehicle { - text = "Designate Loot Vehicles"; - value = false; - //action = "systemChat 'value toggled'"; - conditionShow = "selectedObject"; + text = "Loot Vehicle Settings"; items[] = { - "blck_clearLootVehicle", - "blck_designateLootVehicle" + "blck_designateLootVehicleState", + "blck_getLootVehicleInfo", + "blck_displayLootMarkers" }; }; - class blck_clearLootVehicle + class blck_designateLootVehicleState + { + items[] = { + "blck_setAsLootVehicle", + "blck_clearLootVehicleFlag" + }; + text = "Loot Vehicle Settings"; + }; + class blck_clearLootVehicleFlag { text = "Clear Loot Vehicle Settings"; - value = false; action = "[false] call blck3DEN_fnc_setLootVehicle"; }; - class blck_designateLootVehicle + class blck_setAsLootVehicle { text = "Desinate Loot Vehicle"; - value = true; action = "[true] call blck3DEN_fnc_setLootVehicle"; }; class blck_getLootVehicleInfo { text = "Get setting for selected vehicle"; - value = 0; action = "call blck3DEN_fnc_getLootVehicleInfo"; - }; + }; + class blck_displayLootMarkers + { + items[] = { + "blck_lootMarkersOn", + "blck_lootMarkersOff" + }; + text = "Toggle Loot Vehicle Markers"; + }; + class blck_lootMarkersOn + { + text = "Mark Loot Vehicles / Objects"; + action = "[true] call blck3DEN_fnc_displayLootMarkers"; + }; + class blck_lootMarkersOff + { + text = "Hide Markers of Loot Vehicles / Objects"; + action = "[false] call blck3DEN_fnc_displayLootMarkers"; + }; ///////////////////////////// class blckSaveStaticMission {