Merge pull request #523 from EpochModTeam/experimental

0.3.8.0436
This commit is contained in:
vbawol 2016-04-25 15:42:16 -05:00
commit fe0022d4e1
38 changed files with 58 additions and 37 deletions

View File

@ -43,8 +43,10 @@
[Info] Some AI Scripts Mods may not work with disableRemoteSensors enabled. You can disable with "disableRemoteSensors = false;" in CfgEpochClient.
[Info] Removed old .bikey and added new one for 0380.
Build: 435
Build: 436
[Added] Install batch for all CUP mods and CBA. https://github.com/EpochModTeam/Epoch/tree/master/Tools/Install
[Changed] The function EPOCH_fnc_addItemOverflow now supports spawning items and weapons types given a count.
[Changed] Moved the secure storage config variable 'returnOnPack' from cfgvehicles config to CfgBaseBuilding.
[Changed] Make use of new getOutMan EH for vehicle epoch anti wall glitch checks.
[Changed] Change last few uses of hintSilent to Epoch_dynamicText. Now only the debug monitor uses hintSilent.
[Changed] 1.58 Difficulty Overhaul changes to enable 3rd person. Thanks to klinGiii on the forum: http://epochmod.com/forum/index.php?/topic/41922-158-difficulty-overhaul
@ -52,6 +54,7 @@ Build: 435
[Changed] Increased range for vehicle interactions to fix issues with access to larger vehicles. Thanks to Grahame for the report: http://epochmod.com/forum/index.php?/topic/41894-cannot-unlock-large-vehicles/
[Changed] Preloading sapper by spawning one on the map at server start.
[Changed] Change to github markdown for credits and license.
[Fixed] Rewrote deleteVehicle.txt BE filter to correct filter syntax to fix false kicks. Thanks to BetterDeadThanZed for the report http://epochmod.com/forum/index.php?/topic/41933-players-kicked-for-moving-safes/#comment-275297
[Fixed] Fixed Arma install batch script not closing after update.
[Fixed] Mission loot payout not working. Thanks to @He-Man for the fix: http://epochmod.com/forum/index.php?/topic/41892-payout-trader-mission-broken/
[Fixed] Crafting recipe for Vehicle Repair Kit had wrong part in usedIn array. Thanks to LeBarbare for the report: http://epochmod.com/forum/index.php?/topic/41896-wrong-recipe-place/

View File

@ -1,2 +1 @@
5 "" !="I_UAV_01_F" !="(I|B|O)_UAV_AI" !"_EPOCH" !="B_65x39_Minigun_Caseless_Red_splash" !="B_762x51_Minigun_Tracer_Yellow_splash" !="B_(Swing|Stick)" !"^SmokeShell" !"^G_40mm_" !"^F_40mm_" !"Sub_F_" !"^F_Signal_" !="mini_Grenade" !="GrenadeHand" !="LaserTarget(C|W|E)" !"^Chemlight_" !="(ClaymoreDirectionalMine|DemoCharge|SatchelCharge)_Remote_Ammo" !="SLAMDirectionalMine_Wire_Ammo" !="(CMflare_Chaff|Sapper_Charge|SapperB_Charge|ATMine_Range)_Ammo" !="APERS(TripMine_Wire|BoundingMine_Range|Mine_Range)_Ammo" !="Epoch_(Sapper|SapperB|Cloak)_F" !="GreatWhite_F" !="groundWeaponHolder" !="WeaponHolderSimulated" !="Epoch_(Male|Female)_F" !"Supply[0-9]" !"Steerable_Parachute_F" !="Epoch_Female_CamoRed_F" !="Land_Cages_F" !="(O|I|B)_UAV_01_backpack_F" !="I_(helipilot|helicrew)_F"
5 "_EPOCH" !="Epoch_(Sapper|Cloak)_F" !="(SapperHead|Jack|SolarGen)_SIM_EPOCH" !="Wood(Floor|LargeWall|Stairs|Ramp|Foundation|Ladder|Tower)_EPOCH" !="(Tipi|Workbench|StorageShelf|CinderWallHalf|Foundation|Wood(Floor|LargeWall|Stairs|Ramp|Foundation|Ladder|Tower))_Ghost_EPOCH" !="(Tipi|StorageShelf|Safe|LockBox|FirePlace|FirePlaceOn|PlotPole|SolarGen|Jack|Freezer|Tarp|CinderWallHalf|Bobber)_EPOCH" !="I_(Soldier[1-3]|Soldier)_EPOCH" !="(Bed|locker|Filing|Chair|ChairRed|wardrobe|cooker|Couch|Table|Pelican|Fridge|Shelf|ToolRack|Shoebox|Bunk|Rabbit|Cabinet)_EPOCH" !="(Sheep|Goat|Snake|Snake2|Hen|Cock|Fin|Alsatian)_random_EPOCH" !="(Safe|Workbench|LockBox|CinderWall|CinderWallGarage|CinderWallHalf|PlotPole|Tipi|StorageShelf|Fireplace|TankTrap)_SIM_EPOCH" !="Wood(Floor|LargeWall|LargeWallCor|LargeWallDoor|LargeWallDoorL|LargeWallDoorway|Stairs|Stairs2|Ramp|Ladder|Tower)_SIM_EPOCH" !="(Hesco3|Metal)(_Ghost|_SIM|)_EPOCH" !="(Spike|Metal)_TRAP_SIM_EPOCH" !="(WoodFoundation|Foundation)_EPOCH" !="WoodWall[1-4](_SIM|_Ghost|)_EPOCH"
5 "" !" GroundWeaponHolder$" !" WeaponHolderSimulated$" !" Epoch_(Sapper|SapperB|Cloak|Female_CamoRed)_F$" !" (Land_MPS|Bobber|Rabbit)_EPOCH$" !" (Sheep|Goat|Snake|Snake2|Hen|Cock|Fin|Alsatian)_random_EPOCH$" !" (Bed|locker|Filing|Chair|ChairRed|wardrobe|cooker|Couch|Table|Pelican|Fridge|Shelf|ToolRack|Shoebox|Bunk|Cabinet|Freezer|Tarp)_EPOCH$" !" (SapperHead|Jack|SolarGen)_SIM_EPOCH$" !" (Tipi|Workbench|StorageShelf|CinderWallHalf|Foundation|Wood(Floor|LargeWall|Stairs|Ramp|Foundation|Ladder|Tower))_Ghost_EPOCH$" !" Wood(Floor|LargeWall|LargeWallCor|LargeWallDoor|LargeWallDoorL|LargeWallDoorway|Stairs|Stairs2|Ramp|Ladder|Tower)_SIM_EPOCH$" !" (Safe|Workbench|LockBox|CinderWall|CinderWallGarage|CinderWallHalf|PlotPole|Tipi|StorageShelf|Fireplace|TankTrap)_SIM_EPOCH$" !" (Hesco3|Metal|WoodWall[1-4])_(Ghost|SIM)_EPOCH$" !" (Spike|Metal)_TRAP_SIM_EPOCH$" !" (WoodFoundation|Foundation)_Ghost_EPOCH$" !" I_(Soldier[1-3]|Soldier)_EPOCH$" !" I_(helipilot|helicrew)_F$" !" I_UAV_01_F$" !" (I|B|O)_UAV_AI$" !" I_Boat_Armed_01_minigun_F" !" B_Heli_Transport_01_F" !" Land_Cages_F$"

View File

@ -40,6 +40,11 @@ if (_buildingCountLimit == 0) then { _buildingCountLimit = 200; };
// input
params ["_objType"];
_obj = objNull;
if (_objType isEqualType objNull) then {
_obj = _objType;
_objType = typeOf _objType;
};
_staticClass = getText(configfile >> "CfgVehicles" >> _objType >> "staticClass");
_simulClass = getText(configfile >> "CfgVehicles" >> _objType >> "simulClass");
@ -83,9 +88,12 @@ if !(_buildingAllowed)exitWith{ false };
// Max object
if (!_ownedJammerExists) then{
_limitNearby = getNumber(configfile >> "CfgVehicles" >> _staticClass >> "limitNearby");
if (_limitNearby > 0) then{
_objectCount = count nearestObjects[player, [_staticClass, _simulClass], _buildingJammerRange];
if (_objectCount > _limitNearby) then{
// remove current target from objects
_objectCount = count (nearestObjects[player, [_staticClass, _simulClass], _buildingJammerRange] - [_obj]);
// TODO: not properly limiting simulated objects
if (_objectCount >= _limitNearby) then{
_buildingAllowed = false;
[format["<t size = '1.6' color = '#99ffffff'>Building Disallowed: Limit %1</t>", _limitNearby], 5] call Epoch_dynamicText;
};

View File

@ -93,10 +93,15 @@ if (isText(_config)) then {
_rejectMove = false;
if ((diag_tickTime - _lastCheckTime) > 10) then {
_lastCheckTime = diag_tickTime;
_rejectMove = !(_objType call EPOCH_isBuildAllowed);
_rejectMove = !(EPOCH_target call EPOCH_isBuildAllowed);
};
if (_rejectMove) exitWith{
EPOCH_target = objNull;
// remove object and refund items
deleteVehicle EPOCH_target;
_removeParts = getArray(('CfgBaseBuilding' call EPOCH_returnConfig) >> _objType >> "removeParts");
{
[_x select 0,_x select 1] call EPOCH_fnc_addItemOverflow;
} forEach _removeParts;
};
_playerdistance = player distance EPOCH_target;
if (_playerdistance < 10) then {

View File

@ -13,7 +13,7 @@
https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_code/compile/building/EPOCH_simulSwap.sqf
Example:
[_object] spawn EPOCH_simulSwap;
[_object,_item] spawn EPOCH_staticMove;
Parameter(s):
_this select 0: OBJECT - Base building object

View File

@ -23,31 +23,28 @@
BOOL
*/
private ["_wHPos","_wH","_nearByHolder"];
params [["_item","",[""]],["_count",0]];
if (player canAdd _item) then {
if (_count >= 1) then {
player addMagazine [_item, _count];
} else {
params [["_item","",[""]],["_count",1]];
for "_i" from 1 to _count do
{
if (player canAdd _item) then {
player addItem _item;
};
} else {
_wH = objNull;
_nearByHolder = nearestObjects [position player,["groundWeaponHolder"],3];
if (_nearByHolder isEqualTo []) then {
_wHPos = player modelToWorld [0,1,0];
if (surfaceIsWater _wHPos) then {
_wHPos = ASLToATL _wHPos;
} else {
_wH = objNull;
if (isNil "_nearByHolder") then {
_nearByHolder = nearestObjects [position player,["groundWeaponHolder"],3];
};
if (_nearByHolder isEqualTo []) then {
_wHPos = player modelToWorld [0,1,0];
if (surfaceIsWater _wHPos) then {
_wHPos = ASLToATL _wHPos;
};
_wH = createVehicle ["groundWeaponHolder",_wHPos, [], 0, "CAN_COLLIDE"];
} else {
_wH = _nearByHolder select 0;
};
if !(isNull _wh) then {
_wh addItemCargoGlobal [_item,1];
};
_wH = createVehicle ["groundWeaponHolder",_wHPos, [], 0, "CAN_COLLIDE"];
} else {
_wH = _nearByHolder select 0;
};
if (_count >= 1) then {
_wh addMagazineAmmoCargo[_item, 1, _count];
} else {
_wh addItemCargoGlobal [_item,1];
};
};
true

View File

@ -153,4 +153,13 @@ class CfgBaseBuilding {
{
removeParts[] = { { "PartPlankPack", 2 } };
};
class LockBox_EPOCH : Default
{
returnOnPack[] = { { "ItemLockbox", 1 } };
}
class Safe_EPOCH : Default
{
returnOnPack[] = { { "ItemSafe", 1 } };
}
};

View File

@ -1 +1 @@
build=435;
build=436;

View File

@ -1 +1 @@
build=435;
build=436;

View File

@ -51,7 +51,7 @@ if (_class isKindOf 'Constructions_lockedstatic_F') then {
_gwh = createVehicle["groundWeaponHolder", _posWH, [], 0, "CAN_COLLIDE"];
_gwh setPosATL _posWH;
_returnItems = getArray(configFile >> "CfgVehicles" >> _class >> "returnOnPack");
_returnItems = getArray(configFile >> "CfgBaseBuilding" >> _class >> "returnOnPack");
{
_gwh addMagazineCargoGlobal _x;
} forEach _returnItems;

View File

@ -1 +1 @@
build=435;
build=436;

View File

@ -1 +1 @@
build=435;
build=436;

View File

@ -1 +1 @@
435
436