mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
0.3.4 pt6
This commit is contained in:
parent
b31a0f6457
commit
ccb7f3170a
@ -29,6 +29,7 @@ Server:
|
||||
[Fixed] Issue with trading vehicles that caused the trader data not to save or to save to the wrong slot.
|
||||
[Fixed] Added missing prices for female vests.
|
||||
[Fixed] Error Generic error in expression in EPOCH_server_repairVehicle.
|
||||
[Changed] Base building maintain option now also maintains storage devices.
|
||||
[Changed] Vehicle spawn config that controls how many vehicles can spawn at different location types. See vehicleSpawnTypes array in the Map config in the server settings pbo.
|
||||
[Changed] Use new sort command instead of BIS_fncSortBy.
|
||||
[Changed] Use new worldSize command as default if maps worldSize setting in CfgEpoch does not exist.
|
||||
|
Binary file not shown.
@ -3,7 +3,8 @@ if (EPOCH_playerCrypto > 0) then {
|
||||
_buildingJammerRange = getNumber(_config >> "buildingJammerRange");
|
||||
if (_buildingJammerRange == 0) then { _buildingJammerRange = 75; };
|
||||
|
||||
_maintainCount = {(damage _x) > 0} count nearestObjects[_this, ["Constructions_static_F", "Constructions_foundation_F"], _buildingJammerRange];
|
||||
_maintainCount = {(damage _x) > 0} count nearestObjects[_this, ["Constructions_static_F","Constructions_foundation_F","Constructions_lockedstatic_F","Buildable_Storage","Secure_Storage_Proxy"], _buildingJammerRange];
|
||||
|
||||
if (EPOCH_playerCrypto < _maintainCount) then {
|
||||
_maintainCount = EPOCH_playerCrypto;
|
||||
};
|
||||
|
@ -34,8 +34,12 @@ if (_ctrl && _dikCode == 0x0C) then {
|
||||
if (_dikCode == 0x01) then {
|
||||
|
||||
if !(isNull EPOCH_Target) then {
|
||||
if !(_vehicle isKindOf "ThingX") then {
|
||||
deleteVehicle EPOCH_Target;
|
||||
_dt = ["<t size = '0.8' shadow = '0' color = '#99ffffff'>Build Canceled</t>", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
|
||||
} else {
|
||||
EPOCH_Target = objNull;
|
||||
};
|
||||
_dt = ["<t size = '0.8' shadow = '0' color = '#99ffffff'>Build Canceled</t>", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
|
||||
};
|
||||
|
||||
if !(EPOCH_arr_interactedObjs isEqualTo[]) then {
|
||||
@ -228,8 +232,12 @@ if (vehicle player == player) then {
|
||||
|
||||
if (_dikCode in(actionKeys "Gear")) then {
|
||||
if !(isNull EPOCH_Target) then {
|
||||
if !(_vehicle isKindOf "ThingX") then {
|
||||
deleteVehicle EPOCH_Target;
|
||||
_dt = ["<t size = '0.8' shadow = '0' color = '#99ffffff'>Build Canceled</t>", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
|
||||
} else {
|
||||
EPOCH_Target = objNull;
|
||||
};
|
||||
_dt = ["<t size = '0.8' shadow = '0' color = '#99ffffff'>Build Canceled</t>", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
|
||||
};
|
||||
if (isTouchingGround player) then {
|
||||
_handled = call EPOCH_lootTrash;
|
||||
|
@ -1,8 +1,12 @@
|
||||
/*
|
||||
Building Maintain
|
||||
Building Maintain
|
||||
by Aaron Clark - EpochMod.com
|
||||
|
||||
Epoch Mod - EpochMod.com
|
||||
All Rights Reserved.
|
||||
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
|
||||
http://creativecommons.org/licenses/by-nc-nd/4.0/
|
||||
|
||||
Improvements and or bugfixes and other contributions are welcome via the github:
|
||||
https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_server/compile/epoch_bases/EPOCH_server_maintBUILD.sqf
|
||||
*/
|
||||
private["_object", "_plyr", "_maintCount", "_plyrUID", "_counter", "_objSlot", "_objHiveKey", "_buildingJammerRange", "_current_crypto", "_cIndex", "_vars"];
|
||||
|
||||
@ -35,24 +39,30 @@ if (typeOf _object == "PlotPole_EPOCH") then {
|
||||
|
||||
// maintain jammer
|
||||
_counter = _counter + 1;
|
||||
_object call EPOCH_fnc_saveBuilding;
|
||||
if !(_object in EPOCH_saveBuildQueue) then{EPOCH_saveBuildQueue pushBack _object};
|
||||
|
||||
if (_maintCount > 1) then {
|
||||
|
||||
// maintain all objects within range
|
||||
{
|
||||
_object = _x;
|
||||
_objSlot = _object getVariable["BUILD_SLOT", -1];
|
||||
if (_objSlot != -1) then {
|
||||
if ((damage _object) > 0) then {
|
||||
_storSlot = _x getVariable["STORAGE_SLOT", "ABORT"];
|
||||
if (_storSlot != "ABORT") then {
|
||||
if ((damage _x) > 0) then {
|
||||
_counter = _counter + 1;
|
||||
_object call EPOCH_fnc_saveBuilding;
|
||||
if !(_x in EPOCH_saveStorQueue) then { EPOCH_saveStorQueue pushBack _x };
|
||||
};
|
||||
};
|
||||
_objSlot = _x getVariable["BUILD_SLOT", -1];
|
||||
if (_objSlot != -1) then{
|
||||
if ((damage _x) > 0) then {
|
||||
_counter = _counter + 1;
|
||||
if !(_x in EPOCH_saveBuildQueue) then{ EPOCH_saveBuildQueue pushBack _x };
|
||||
};
|
||||
};
|
||||
if (_counter > _maintCount) exitWith{};
|
||||
} forEach nearestObjects[_object, ["Constructions_static_F","Constructions_foundation_F"], _buildingJammerRange];
|
||||
} forEach nearestObjects[_object, ["Constructions_static_F","Constructions_foundation_F","Constructions_lockedstatic_F","Buildable_Storage","Secure_Storage_Proxy"], _buildingJammerRange];
|
||||
|
||||
// effect crypto
|
||||
|
||||
_playerCryptoLimit = [(configFile >> "CfgSecConf" >> "limits"), "playerCrypto", 25000] call EPOCH_fnc_returnConfigEntry;
|
||||
|
||||
_current_crypto = ((_current_crypto - _counter) min _playerCryptoLimit) max 0;
|
||||
|
@ -38,7 +38,9 @@ for "_i" from 1 to _this do {
|
||||
};
|
||||
|
||||
_vehicle = createVehicle [_class, _location, [], 0, "CAN_COLLIDE"];
|
||||
// _vehicle setDamage _damage;
|
||||
|
||||
// temp set damage to mark for maint
|
||||
_vehicle setDamage 0.99;
|
||||
_vehicle setDir _dir;
|
||||
|
||||
diag_log format ["STORAGE: created storage %1 at %2", _class, _location];
|
||||
@ -130,7 +132,7 @@ for "_i" from 1 to _this do {
|
||||
};
|
||||
} forEach _x;
|
||||
|
||||
// add all attachments to vehicle
|
||||
// add all attachments to vehicle
|
||||
// TODO replace with adding attachments directly to gun (Arma feature dependant)
|
||||
{
|
||||
_vehicle addItemCargoGlobal[_x, 1];
|
||||
|
@ -7,7 +7,12 @@ if (!isNull _this) then {
|
||||
if (_vehSlot != "ABORT") then {
|
||||
|
||||
_vehHiveKey = format ["%1:%2", (call EPOCH_fn_InstanceID),_vehSlot];
|
||||
_damage = damage _vehicle;
|
||||
|
||||
// default to 0 damage as we are not using it this way
|
||||
_damage = 0;
|
||||
|
||||
// set damage to 0
|
||||
_vehicle setDamage 0;
|
||||
|
||||
_pos = getposATL _vehicle call EPOCH_precisionPos;
|
||||
_dir = getDir _vehicle;
|
||||
@ -66,6 +71,7 @@ if (!isNull _this) then {
|
||||
};
|
||||
*/
|
||||
|
||||
|
||||
_VAL = [_class, _worldspace, _damage, _inventory, _colorSlot, _storageOwners, _storageParent];
|
||||
["Storage", _vehHiveKey, EPOCH_expiresBuilding, _VAL] call EPOCH_fnc_server_hiveSETEX;
|
||||
//["Storage", _vehHiveKey, _VAL] call EPOCH_fnc_server_hiveSET;
|
||||
|
Loading…
Reference in New Issue
Block a user