- Can now mine metal scraps from Dynamic Debris vehicle wrecks using
sledgehammer.
- Can now "Search/Examine" Dynamic Debris Trash piles for loot.
- (Known issue: Dynamic Debris will respawn after server restart)
- Initial support for Malden 2035 map released with A3 1.72+.
- Fixed Admin panel corpse markers.
This commit is contained in:
vbawol 2017-06-11 12:28:23 -05:00
parent 3746aea515
commit e7092ad55d
53 changed files with 104 additions and 87 deletions

View File

@ -1,6 +1,6 @@
## [0.6.0.0] - TBA
### Added
- Support for Malden 2035.
- Initial support for Malden 2035 map released with A3 1.72+.
- Vector Base Building (uses Arrow keys by default and with SHIFT / ALT you can control the steps). @DirtySanchez & @Ignatz-Heman
- Base Building elements can be detached to walk around the Element before saving. @Ignatz-Heman
- Helper arrow to indicate door-opening direction for Base Building. @Ignatz-Heman

View File

@ -30,11 +30,11 @@ _return = false;
_config = ('CfgEpochClient' call EPOCH_returnConfig) >> "CfgWorldInteractions";
_selectedConfig = "";
if (_object isEqualType objNull) then {
if (_object isEqualType objNull && !(isNull _object)) then {
if !(_object isKindOf "All") then {
_modelInfo = getModelInfo _object;
(getModelInfo _object) params [["_modelName",""]];
// replace spaces and periods with underscores
_selectedConfig = ((_modelInfo select 0) splitString " .") joinString "_";
_selectedConfig = (_modelName splitString " .") joinString "_";
} else {
_selectedConfig = typeOf _object;
};

View File

@ -1 +1 @@
build=783;
build=788;

View File

@ -1 +1 @@
build=783;
build=788;

View File

@ -20,42 +20,45 @@ params [["_object",objNull,[objNull]],["_type",0,[0]],["_player",objNull,[objNul
if (isNull _object) exitWith{};
if !([_player, _token] call EPOCH_server_getPToken) exitWith{};
if (!(_object isKindOf "All")) then {
if (alive _object) then {
if (alive _object) then {
_config = 'CfgEpochClient' call EPOCH_returnConfig;
_payout = getArray(_config >> worldname >> "TrashClasses") param [_type, "Trash"];
_config = 'CfgEpochClient' call EPOCH_returnConfig;
_payout = getArray(_config >> worldname >> "TrashClasses") param [_type, "Trash"];
_posWH = getPosATL _player;
_posWH = getPosATL _player;
_object setdamage 1;
if (isSimpleObject _object) then {
// just remove for now, object will respawn on restart.
deleteVehicle _object;
} else {
_object setdamage 1;
};
_item = createVehicle["groundWeaponHolder", _posWH, [], 0.0, "CAN_COLLIDE"];
_item setPosATL _posWH;
_item = createVehicle["groundWeaponHolder", _posWH, [], 0.0, "CAN_COLLIDE"];
_item setPosATL _posWH;
_config = (configFile >> "CfgMainTable" >> _payout);
if (isClass _config) then {
if (random 1 < getNumber(_config >> "chance")) then {
[_item, _payout] call EPOCH_serverLootObject;
_errorMsg = "You found something!";
[_errorMsg, 5] remoteExec ['Epoch_message',_player];
};
_config = (configFile >> "CfgMainTable" >> _payout);
if (isClass _config) then {
if (random 1 < getNumber(_config >> "chance")) then {
[_item, _payout] call EPOCH_serverLootObject;
_errorMsg = "You found something!";
[_errorMsg, 5] remoteExec ['Epoch_message',_player];
};
};
if ((random 1) <= EPOCH_antagonistChanceTrash) then {
_nearPlayers = _posWH nearEntities[["Epoch_Male_F", "Epoch_Female_F"], 50];
if ((random 1) <= EPOCH_antagonistChanceTrash) then {
_nearPlayers = _posWH nearEntities[["Epoch_Male_F", "Epoch_Female_F"], 50];
if (!(_nearPlayers isEqualTo[])) then {
_target = selectRandom _nearPlayers;
if (!(_nearPlayers isEqualTo[])) then {
_target = selectRandom _nearPlayers;
_antagTable = ["Trash", "CfgMainTable", "antagonists"] call EPOCH_weightedArray;
_antagTable = ["Trash", "CfgMainTable", "antagonists"] call EPOCH_weightedArray;
_antagTableArray = _antagTable select 0;
if !(_antagTableArray isEqualTo[]) then{
_weightedArray = _antagTable select 1;
_triggerType = _antagTableArray select(selectRandom _weightedArray);
[_target, _triggerType] call EPOCH_server_triggerEvent;
};
_antagTableArray = _antagTable select 0;
if !(_antagTableArray isEqualTo[]) then{
_weightedArray = _antagTable select 1;
_triggerType = _antagTableArray select(selectRandom _weightedArray);
[_target, _triggerType] call EPOCH_server_triggerEvent;
};
};
};

View File

@ -13,37 +13,47 @@
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_looting/EPOCH_server_knockDownTree.sqf
*/
//[[[cog import generate_private_arrays ]]]
private ["_item","_lootType","_nearbyWH","_posWH"];
private ["_doPayout","_item","_lootType","_nearbyWH","_posWH"];
//[[[end]]]
params ["_object","_type","_player",["_token","",[""]] ];
if !([_player, _token] call EPOCH_server_getPToken) exitWith{};
if (isNull _object) exitWith{};
if (_player distance2D (getposATL _object) > 6) exitWith{};
_doPayout = false;
if (alive _object) then {
_posWH = getPosATL _object;
_posWH set[2, 0];
if !(_object isKindOf "All") then {
if (alive _object) then {
_posWH = getPosATL _object;
_posWH set[2, 0];
if (isSimpleObject _object) then {
// just remove for now, object will respawn on restart.
deleteVehicle _object;
_doPayout = true;
} else {
if (damage _object > 0.7) then {
_object setdamage 1;
_doPayout = true;
_lootType = "Tree";
if (_type == 1) then {
_lootType = "Bush";
};
_nearbyWH = nearestObjects[_posWH, ["groundWeaponHolder"], 2];
if !(_nearbyWH isEqualTo[]) then {
[(_nearbyWH select 0), _lootType] call EPOCH_serverLootObject;
} else {
_item = createVehicle["groundWeaponHolder", _posWH, [], 0, "CAN_COLLIDE"];
_item setPosATL _posWH;
[_item, _lootType] call EPOCH_serverLootObject;
};
} else {
_object setdamage((damage _object) + 0.25) min 1;
};
};
if (_doPayout) then {
_lootType = "Tree";
if (_type == 1) then {
_lootType = "Bush";
};
_nearbyWH = nearestObjects[_posWH, ["groundWeaponHolder"], 2];
if !(_nearbyWH isEqualTo[]) then {
[(_nearbyWH select 0), _lootType] call EPOCH_serverLootObject;
} else {
_item = createVehicle["groundWeaponHolder", _posWH, [], 0, "CAN_COLLIDE"];
_item setPosATL _posWH;
[_item, _lootType] call EPOCH_serverLootObject;
};
};
};
true

View File

@ -18,39 +18,43 @@ private ["_item","_lootables","_nearbyWH","_payout","_payoutQty","_posWH","_sele
params ["_object","_index","_player",["_token","",[""]] ];
if !([_player, _token] call EPOCH_server_getPToken) exitWith{};
if !(_object isKindOf "All") then {
if (alive _object) then {
if (alive _object) then {
_posWH = getPosATL _player;
_posWH set[2, 0];
_posWH = getPosATL _player;
_posWH set[2, 0];
// defaults
_selectedPayout = ["ItemRock", 4];
// Not Rock
if (_index >= 0) then {
_selectedPayout = ["ItemScraps", 2];
if (_index == 0) then {
_selectedPayout = ["CinderBlocks", 1];
};
} else {
_lootables = [["PartOre", 2], ["ItemRock", 4]];
_selectedPayout = selectRandom _lootables;
// defaults
_selectedPayout = ["ItemRock", 4];
// Not Rock
if (_index >= 0) then {
_selectedPayout = ["ItemScraps", 2];
if (_index == 0) then {
_selectedPayout = ["CinderBlocks", 1];
};
} else {
_lootables = [["PartOre", 2], ["ItemRock", 4]];
_selectedPayout = selectRandom _lootables;
};
_payout = _selectedPayout select 0;
_payoutQty = _selectedPayout select 1;
_payout = _selectedPayout select 0;
_payoutQty = _selectedPayout select 1;
_object setdamage ((damage _object) + (1/_payoutQty)) min 1;
if (isSimpleObject _object) then {
// just remove for now, object will respawn on restart.
deleteVehicle _object;
} else {
_object setdamage ((damage _object) + (1/_payoutQty)) min 1;
};
_nearbyWH = nearestObjects[_posWH, ["groundWeaponHolder"], 2];
if !(_nearbyWH isEqualTo[]) then {
_posWH = getPosATL(_nearbyWH select 0);
(_nearbyWH select 0) addMagazineCargoGlobal[_payout, _payoutQty];
} else {
_item = createVehicle["groundWeaponHolder", _posWH, [], 0, "CAN_COLLIDE"];
_item setPosATL _posWH;
_item addMagazineCargoGlobal[_payout, _payoutQty];
};
_nearbyWH = nearestObjects[_posWH, ["groundWeaponHolder"], 2];
if !(_nearbyWH isEqualTo[]) then {
_posWH = getPosATL(_nearbyWH select 0);
(_nearbyWH select 0) addMagazineCargoGlobal[_payout, _payoutQty];
} else {
_item = createVehicle["groundWeaponHolder", _posWH, [], 0, "CAN_COLLIDE"];
_item setPosATL _posWH;
_item addMagazineCargoGlobal[_payout, _payoutQty];
};
};
true

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -1 +1 @@
build=783;
build=788;

View File

@ -1 +1 @@
build=783;
build=788;

View File

@ -1 +1 @@
build=783;
build=788;

View File

@ -1 +1 @@
build=783;
build=788;

View File

@ -1 +1 @@
783
788