Loothelper

This commit is contained in:
He-Man 2019-10-15 20:13:39 +02:00
parent 78d326b711
commit e8f735cab9
4 changed files with 6 additions and 3 deletions

View File

@ -6,6 +6,7 @@ forceRestartTime = 14400; // 4 hour restarts
timeDifference = 0; // Server uses real time this will allow you to offset just the hour. timeDifference = 0; // Server uses real time this will allow you to offset just the hour.
timeMultiplier = 4; // Sets a time multiplier for in-game time. The command range is now capped at 0.1 - 120 to avoid performance problems. timeMultiplier = 4; // Sets a time multiplier for in-game time. The command range is now capped at 0.1 - 120 to avoid performance problems.
lootMultiplier = 1; // 1 = normal loot multiplier. This controls how much loot can payout per loot container. lootMultiplier = 1; // 1 = normal loot multiplier. This controls how much loot can payout per loot container.
UseLootHelper = "true"; // GroundLoot will get a visible sphere for better loot identification
// Events // Events
WeatherChances[] = { WeatherChances[] = {

View File

@ -349,7 +349,7 @@ _lootBubble = {
_position = _lootpositions deleteat (floor (random (count _lootpositions))); _position = _lootpositions deleteat (floor (random (count _lootpositions)));
_position params ["_m2WPos","_relDir"]; _position params ["_m2WPos","_relDir"];
_pos = _building modelToWorld _m2WPos; _pos = _building modelToWorld _m2WPos;
_pos vectoradd [0,0,0.1]; _pos = _pos vectoradd [0,0,0.02];
if (_pos select 2 < 0) then { if (_pos select 2 < 0) then {
_pos set[2, 0]; _pos set[2, 0];
}; };

View File

@ -14,12 +14,13 @@
*/ */
private [ "_masterConfig","_building","_buildingLoot","_selectedConfig","_config","_EpochLootChance","_cfgBaseBuilding","_loots","_lootLimit","_possibleLoots","_posName","_positions","_possibleCount","_randomIndex","_selectedLoot", private [ "_masterConfig","_building","_buildingLoot","_selectedConfig","_config","_EpochLootChance","_cfgBaseBuilding","_loots","_lootLimit","_possibleLoots","_posName","_positions","_possibleCount","_randomIndex","_selectedLoot",
"_pos","_dir","_item","_color","_GroundSpawnChance","_MinGroundContainers","_MaxGroundContainers","_lootType","_privateDir" "_pos","_dir","_item","_color","_GroundSpawnChance","_MinGroundContainers","_MaxGroundContainers","_lootType","_privateDir","_GroundClass"
]; ];
params [["_player",objNull,[objNull]],["_token","",[""]],["_LootsArray",[]]]; params [["_player",objNull,[objNull]],["_token","",[""]],["_LootsArray",[]]];
if !([_player, _token] call EPOCH_server_getPToken) exitWith{}; if !([_player, _token] call EPOCH_server_getPToken) exitWith{};
_GroundClass = if (Epoch_UseLootHelper) then {"Epoch_LootHolder_Sphere"} else {"Epoch_LootHolder"};
_privateDir = []; _privateDir = [];
_masterConfig = getmissionconfig "CfgBuildingLootPos"; _masterConfig = getmissionconfig "CfgBuildingLootPos";
{ {
@ -54,7 +55,7 @@ _masterConfig = getmissionconfig "CfgBuildingLootPos";
case "GroundLoot": { case "GroundLoot": {
{ {
_x params ["_lootType","_pos"]; _x params ["_lootType","_pos"];
_item = createVehicle ["Epoch_LootHolder", _pos, [], 0, "CAN_COLLIDE"]; _item = createVehicle [_GroundClass, _pos, [], 0, "CAN_COLLIDE"];
_buildingLoot pushback _item; _buildingLoot pushback _item;
if (surfaceIsWater _pos) then { if (surfaceIsWater _pos) then {
_item setPosASL _pos; _item setPosASL _pos;

View File

@ -171,6 +171,7 @@ for "_i" from 0 to 9 do {
}; };
UseCustomTextures = ([_serverSettingsConfig, "UseCustomTextures", false] call EPOCH_fnc_returnConfigEntry); UseCustomTextures = ([_serverSettingsConfig, "UseCustomTextures", false] call EPOCH_fnc_returnConfigEntry);
Epoch_UseLootHelper = ([_serverSettingsConfig, "UseLootHelper", false] call EPOCH_fnc_returnConfigEntry);
//Execute Server Functions //Execute Server Functions
diag_log "Epoch: Loading buildings"; diag_log "Epoch: Loading buildings";