0.3.5.041

This commit is contained in:
vbawol 2015-11-20 08:39:59 -06:00
parent 6fae1a12f5
commit 73ceb4f50e
31 changed files with 173 additions and 89 deletions

View File

@ -5,7 +5,8 @@
[Added] Persistent wood and metal spike traps.
[Added] New custom 3x wide hesco type barrier.
[Added] New custom tank trap.
[Added] Updated version of the Fishing Rod.
[Added] Updated version of the Fishing Rod. Reel was to small.
[Changed] Refine ghost preview base building snap checks.
[Changed] Players now start with a Quartz radio by default.
[Changed] Overhaul of secure storage system to make it faster.
[Fixed] Was unable to use cursorTarget underwater, fixed using new custom made function.

View File

@ -1,12 +1,18 @@
Arma 3: Epoch Mod - EpochMod.com
Arma 3 Epoch Mod
--------------------------
Developers
Aaron Clark - [VB]AWOL - Game Design, Code
Kenneth Bente - Axle - Public Relations
Paul Tomany - Sequisha - Models, Textures
Darren Harrison - Kiory - Models, Textures
Damian Clark - [VB]GREEN - Graphics
Niklas Wagner - Skaronator - Code - http://skaronator.com/
Andrew Gregory - Axeman - AI Code
Florian Kinder - Fank - DLL Code
Denis Erygin - devd - Linux DLL Support
--------------------------
* Aaron Clark - [VB]AWOL - Game Design, Code
* Kenneth Bente - Axle - Public Relations, Models
* Paul Tomany - Sequisha - Models, Textures
* Dan - OrangeSherbet - Tester, Videos, Wiki Editor
* Darren Harrison - Kiory - Models, Textures
* Damian Clark - [VB]GREEN - Graphics
* Niklas Wagner - Skaronator - Code
* Andrew Gregory - Axeman - AI Code
* Florian Kinder - Fank - DLL Code
* Denis Erygin - devd - Linux DLL Support
* Richie - Map Support
* Paden Sturtevant - SteamPunkGears - Models
* Raimonds Virtoss - Raymix - UI and Code

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -39,16 +39,18 @@ if (!isNull _this) then {
EPOCH_arr_countdown = EPOCH_arr_countdown - [_this];
EPOCH_drawIcon3d = !(EPOCH_arr_countdown isEqualTo []);
if (typeOf _this == "Fireplace_SIM_EPOCH") then {
_objClass = typeOf _this;
// Spawn temporary static item insead of saving.
if (getNumber(configfile >> "CfgVehicles" >> _objClass >> "isTemporary") == 1) then {
_worldspace = [getposATL _this, vectordir _this, vectorup _this];
deleteVehicle _this;
_class = getText(configfile >> "CfgVehicles" >> _objClass >> "staticClass");
_newObj = createVehicle["Fireplace_EPOCH", (_worldspace select 0), [], 0, "CAN_COLLIDE"];
_newObj setVectorDirAndUp[_worldspace select 1, _worldspace select 2];
_newObj setposATL(_worldspace select 0);
// proceed to send save to server
} else {
if (_saveCheck) then {
EPOCH_SAVEBUILD = [_this, player, Epoch_personalToken];

View File

@ -22,6 +22,7 @@ _class = getText(configfile >> "cfgVehicles" >> _objType >> "GhostPreview");
_maxHeight = getNumber(configfile >> "cfgVehicles" >> _objType >> "maxHeight");
_simulClass = getText(configFile >> "CfgVehicles" >> _objType >> "simulClass");
_snapChecks = getArray(configFile >> "CfgSnapChecks" >> _objType >> "nails");
diag_log format["DEBUG: _snapChecks %1",_snapChecks];
_maxSnapDistance = 1;
_lastCheckTime = diag_tickTime;
_stabilityCheck = false;
@ -137,6 +138,7 @@ if (_class != "") then {
_baselineSnapPos = _nearestObject modelToWorldVisual [0,0,0];
if (EPOCH_buildMode == 1) then {
{
if (_x in _allowedSnapPoints) then {
_pOffset = _nearestObject selectionPosition _x;
@ -239,6 +241,16 @@ if (_class != "") then {
_currentTarget setVectorDirAndUp[_dir2, (vectorUp _nearestObject)];
_currentTarget setposATL _snapPosition;
{
_pos1_snap = _currentTarget modelToWorldVisual (_x select 0);
_pos2_snap = _currentTarget modelToWorldVisual (_x select 1);
_ins = lineIntersectsSurfaces [AGLToASL _pos1_snap, AGLToASL _pos2_snap,player,_currentTarget,true,1,"VIEW","FIRE"];
if (count _ins > 0) then {
[ASLToATL (_ins select 0 select 0),1,"x\addons\a3_epoch_code\Data\UI\snap_ca.paa", "",20] call epoch_gui3dWorldPos;
};
} forEach _snapChecks;
};
} else {
@ -292,11 +304,11 @@ if (_class != "") then {
_numberOfContacts = 0;
{
_pos1 = _currentTarget modelToWorld (_x select 0);
_pos2 = _currentTarget modelToWorld (_x select 1);
_ins = lineIntersectsSurfaces [AGLToASL _pos1, AGLToASL _pos2,player,_currentTarget,true,1,"VIEW","FIRE"];
_pos1_snap = _currentTarget modelToWorldVisual (_x select 0);
_pos2_snap = _currentTarget modelToWorldVisual (_x select 1);
_ins = lineIntersectsSurfaces [AGLToASL _pos1_snap, AGLToASL _pos2_snap,player,_currentTarget,true,1,"VIEW","FIRE"];
if (count _ins > 0) then {
_numberOfContacts = _numberOfContacts + 1;
_numberOfContacts = _numberOfContacts + 1;
};
} forEach _snapChecks;

View File

@ -51,7 +51,7 @@ class tra_talk
{
condition = "dyna_isTrader";
action = "dyna_cursorTarget call EPOCH_startInteractNPC;";
icon = "x\addons\a3_epoch_code\Data\UI\buttons\talk_green.paa";
icon = "x\addons\a3_epoch_code\Data\UI\buttons\talk_blue.paa";
tooltip = "Talk";
};
class tra_shop
@ -105,13 +105,13 @@ class pack_lockbox
{
condition = "(dyna_cursorTargetType in ['LockBox_EPOCH','LockBoxProxy_EPOCH']) && (dyna_cursorTarget getVariable ['EPOCH_Locked',false])";
action = "EPOCH_packStorage_PVS = [dyna_cursorTarget,player,Epoch_personalToken]; publicVariableServer 'EPOCH_packStorage_PVS';";
icon = "#(rgb,8,8,3)color(1,0,1,0.5)";
icon = "x\addons\a3_epoch_code\Data\UI\buttons\build_pack.paa";
tooltip = "Pack Lockbox";
};
class pack_safe
{
condition = "(dyna_cursorTargetType in ['Safe_EPOCH','SafeProxy_EPOCH']) && (dyna_cursorTarget getVariable ['EPOCH_Locked',false])";
action = "EPOCH_packStorage_PVS = [dyna_cursorTarget,player,Epoch_personalToken]; publicVariableServer 'EPOCH_packStorage_PVS';";
icon = "#(rgb,8,8,3)color(1,0,1,0.5)";
icon = "x\addons\a3_epoch_code\Data\UI\buttons\build_pack.paa";
tooltip = "Pack Safe";
};
};

View File

@ -55,13 +55,13 @@ class CfgAmmo
{
class DirectionalBombBase;
class Spike_TRAP_EPOCH: DirectionalBombBase
class Spike_TRAP_AMMO_EPOCH: DirectionalBombBase
{
hit = 10;
indirectHit = 5;
indirectHitRange = 3;
model = "\x\addons\a3_epoch_assets\models\sticks.p3d";
mineModelDisabled = "\x\addons\a3_epoch_assets\models\sticks.p3d";
model = "\x\addons\a3_epoch_assets_3\CfgVehicles\swing_box.p3d";
mineModelDisabled = "\x\addons\a3_epoch_assets_3\CfgVehicles\swing_box.p3d";
defaultMagazine = "APERSTripMine_Wire_Mag";
icon = "iconExplosiveAP";
@ -86,13 +86,13 @@ class CfgAmmo
};
};
class Metal_TRAP_EPOCH: DirectionalBombBase
class Metal_TRAP_AMMO_EPOCH: DirectionalBombBase
{
hit = 15;
indirectHit = 8;
indirectHitRange = 4;
model = "\x\addons\a3_epoch_assets\models\sticks.p3d";
mineModelDisabled = "\x\addons\a3_epoch_assets\models\sticks.p3d";
model = "\x\addons\a3_epoch_assets_3\CfgVehicles\swing_box.p3d";
mineModelDisabled = "\x\addons\a3_epoch_assets_3\CfgVehicles\swing_box.p3d";
defaultMagazine = "APERSTripMine_Wire_Mag";
icon = "iconExplosiveAP";

View File

@ -1,48 +1,50 @@
// Snap Checks - EpochMod.com
class Hesco3_EPOCH {
nails[] = {
{{0,0,-0.6},{0,0,-0.75}},
{{1.6,0,-0.0307557},{1.8625,0,-0.0307557}},
{{-1.6,0,-0.0307557},{-1.8625,0,-0.0307557}}
class CfgSnapChecks {
class Hesco3_EPOCH {
nails[] = {
{{0,0,-0.6},{0,0,-0.75}},
{{1.6,0,-0.0307557},{1.8625,0,-0.0307557}},
{{-1.6,0,-0.0307557},{-1.8625,0,-0.0307557}}
};
};
};
class WoodLargeWall_EPOCH {
nails[] = {
{{0,0,0.120775},{0,0,-0.190775}},
{{2.46932,0,1.5},{2.76932,0,1.5}},
{{-2.46932,0,1.5},{-2.76932,0,1.5}}
class WoodLargeWall_EPOCH {
nails[] = {
{{0,0,0.120775},{0,0,-0.190775}},
{{2.46932,0,1.5},{2.76932,0,1.5}},
{{-2.46932,0,1.5},{-2.76932,0,1.5}}
};
};
};
class WoodWall1_EPOCH : WoodLargeWall_EPOCH {};
class WoodWall2_EPOCH : WoodLargeWall_EPOCH {};
class WoodWall3_EPOCH : WoodLargeWall_EPOCH {};
class WoodWall4_EPOCH : WoodLargeWall_EPOCH {};
class WoodLargeWallCor_EPOCH : WoodLargeWall_EPOCH {};
class WoodLargeWallDoorway_EPOCH : WoodLargeWall_EPOCH {};
class WoodLargeWallDoor_EPOCH : WoodLargeWall_EPOCH {};
class WoodLargeWallDoorL_EPOCH : WoodLargeWall_EPOCH {};
class CinderWallGarage_EPOCH : WoodLargeWall_EPOCH {};
class CinderWall_EPOCH : WoodLargeWall_EPOCH {};
class CinderWallHalf_EPOCH : WoodLargeWall_EPOCH {};
class WoodFloor_Epoch {
nails[] = {
{{2.5555,0,0.15},{2.8555,0,0.15}},
{{0,-2.5555,0.15},{0,2.8555,0.15}},
{{-2.5555,0,0.15},{-2.8555,0,0.15}},
{{0,-2.5555,0.15},{0,-2.8555,0.15}},
class WoodWall1_EPOCH : WoodLargeWall_EPOCH {};
class WoodWall2_EPOCH : WoodLargeWall_EPOCH {};
class WoodWall3_EPOCH : WoodLargeWall_EPOCH {};
class WoodWall4_EPOCH : WoodLargeWall_EPOCH {};
class WoodLargeWallCor_EPOCH : WoodLargeWall_EPOCH {};
class WoodLargeWallDoorway_EPOCH : WoodLargeWall_EPOCH {};
class WoodLargeWallDoor_EPOCH : WoodLargeWall_EPOCH {};
class WoodLargeWallDoorL_EPOCH : WoodLargeWall_EPOCH {};
class CinderWallGarage_EPOCH : WoodLargeWall_EPOCH {};
class CinderWall_EPOCH : WoodLargeWall_EPOCH {};
class CinderWallHalf_EPOCH : WoodLargeWall_EPOCH {};
class WoodFloor_Epoch {
nails[] = {
{{2.5555,0,0.15},{2.8555,0,0.15}},
{{0,-2.5555,0.15},{0,2.8555,0.15}},
{{-2.5555,0,0.15},{-2.8555,0,0.15}},
{{0,-2.5555,0.15},{0,-2.8555,0.15}},
{{2.5555,0,0.15},{2.5555,0,-0.15}},
{{-2.5555,0,0.15},{-2.5555,0,-0.15}},
{{0,-2.5555,0.15},{0,-2.5555,-0.15}},
{{0,2.5555,0.15},{0,2.5555,-0.15}}
{{2.5555,0,0.15},{2.5555,0,-0.15}},
{{-2.5555,0,0.15},{-2.5555,0,-0.15}},
{{0,-2.5555,0.15},{0,-2.5555,-0.15}},
{{0,2.5555,0.15},{0,2.5555,-0.15}}
};
};
};
class MetalFloor_EPOCH : WoodFloor_Epoch {};
class WoodStairs_EPOCH {
nails[] = {
{{0,0,0.05},{0,0,-0.20}}
class MetalFloor_EPOCH : WoodFloor_Epoch {};
class WoodStairs_EPOCH {
nails[] = {
{{0,0,0.05},{0,0,-0.20}}
};
};
class WoodStairs2_EPOCH : WoodStairs_EPOCH {};
class WoodTower_EPOCH : WoodStairs_EPOCH {};
class WoodRamp_EPOCH : WoodStairs_EPOCH {};
};
class WoodStairs2_EPOCH : WoodStairs_EPOCH {};
class WoodTower_EPOCH : WoodStairs_EPOCH {};
class WoodRamp_EPOCH : WoodStairs_EPOCH {};

View File

@ -2512,6 +2512,7 @@ class CfgVehicles
simulClass = "Fireplace_SIM_EPOCH";
staticClass = "Fireplace_EPOCH";
GhostPreview = "Fireplace_EPOCH";
isTemporary = 1;
};
class Jack_SIM_EPOCH : Constructions_modular_F
{
@ -3851,6 +3852,37 @@ class CfgVehicles
bypassJammer = 1;
};
class TRAP_EPOCH : Constructions_static_F {};
class Spike_TRAP_EPOCH: Constructions_static_F
{
scope = 2;
model = "\x\addons\a3_epoch_assets\models\sticks.p3d";
displayName = "Spike Trap (SIM)";
simulClass = "Spike_TRAP_SIM_EPOCH";
staticClass = "Spike_TRAP_EPOCH";
GhostPreview = "Spike_TRAP_EPOCH";
ammoClass = "Spike_TRAP_AMMO_EPOCH";
energyCost = 0.2;
limitNearby = 2;
bypassJammer = 1;
armor = 0.1
};
class Metal_TRAP_EPOCH: Constructions_static_F
{
scope = 2;
model = "\x\addons\a3_epoch_assets\models\sticks.p3d";
displayName = "Metal Trap (SIM)";
simulClass = "Metal_TRAP_SIM_EPOCH";
staticClass = "Metal_TRAP_EPOCH";
GhostPreview = "Metal_TRAP_EPOCH";
ammoClass = "Metal_TRAP_AMMO_EPOCH";
energyCost = 0.4;
limitNearby = 2;
bypassJammer = 1;
armor = 0.1
};
class Hesco3_EPOCH: Const_All_Walls_F
{
scope = 2;

View File

@ -49,10 +49,6 @@ for "_i" from 0 to _this do {
_textureSlot = _arr select 4;
};
// experiment with damage factor based on time only for now.
_damage = ((1 - (_ttl / _maxTTL)) min 1) max 0;
@ -65,11 +61,22 @@ for "_i" from 0 to _this do {
// remove old safes on && !(_class isKindOf 'Constructions_lockedstatic_F')
if (isClass (configFile >> "CfgVehicles" >> _class) && (_damage < 1) && !(_class isKindOf 'Constructions_lockedstatic_F')) then {
_baseObj = createVehicle [_class, _location, [], 0, "CAN_COLLIDE"];
_baseObj = createVehicle [_class, _location, [], 0, "CAN_COLLIDE"];
_baseObj setVectorDirAndUp _worldspace;
_baseObj setposATL _location;
// spawn additional object for trap
_ammoClass = (configFile >> "CfgVehicles" >> _class >> "ammoClass");
if(isText _ammoClass) then {
_ammoClass = getText _ammoClass;
_ammoObj = createVehicle [_ammoClass, _location, [], 0, "CAN_COLLIDE"];
_ammoObj setVectorDirAndUp _worldspace;
_ammoObj setposATL _location;
_baseObj setVariable ["EPOCH_TRAP_OBJ",_ammoObj];
};
// set persistent Animations
if (_arrCount >= 6) then{
_anims = _arr param[5, [], [[]]];
{
@ -77,8 +84,8 @@ for "_i" from 0 to _this do {
} foreach(getArray(configFile >> "CfgVehicles" >> _class >> "persistAnimations"));
};
// TODO make config based
if (_class == "PlotPole_EPOCH") then {
// Handle Jammers and create marker if EPOCH_SHOW_JAMMERS set true.
if (_class isKindOf "PlotPole_EPOCH") then {
if (EPOCH_SHOW_JAMMERS) then {
_marker = createMarker[str(_location), _location];
_marker setMarkerShape "ICON";

View File

@ -43,7 +43,7 @@ if (_vehSlot != -1 || _storageSlot != "ABORT" || _isTemporary == 1) then{
// if normal storage device dump items on ground.
if (_building isKindOf "Buildable_Storage") then {
// may not be needed but should prevent <null> in DB.
_wepsItemsCargo = weaponsItemsCargo _building;
if (isNil "_wepsItemsCargo") then{
@ -54,7 +54,7 @@ if (_vehSlot != -1 || _storageSlot != "ABORT" || _isTemporary == 1) then{
_magsAmmoCargo = [];
};
// dump items on ground
// dump items on ground
_inventory = [
_wepsItemsCargo,
_magsAmmoCargo,
@ -103,7 +103,7 @@ if (_vehSlot != -1 || _storageSlot != "ABORT" || _isTemporary == 1) then{
};
} forEach _x;
// add all attachments to vehicle
// add all attachments to vehicle
// TODO replace with adding attachments directly to gun (Arma feature dependant)
{
_gwh addItemCargoGlobal[_x, 1];
@ -148,6 +148,12 @@ if (_vehSlot != -1 || _storageSlot != "ABORT" || _isTemporary == 1) then{
} else {
// Remove trap object
_ammoObj = _building getVariable ["EPOCH_TRAP_OBJ",objNull];
if !(isNull _ammoObj) then {
deleteVehicle _ammoObj;
};
[_building, _player] call EPOCH_server_save_killedBuilding;
deleteVehicle _building;
};
@ -158,7 +164,7 @@ if (_vehSlot != -1 || _storageSlot != "ABORT" || _isTemporary == 1) then{
_gwh addMagazineCargoGlobal[_x select 0, _x select 1];
} forEach _removeParts;
};
};
};

View File

@ -43,6 +43,16 @@ if (_objSlot != -1) then {
};
};
// spawn additional object for trap
_ammoClass = (configFile >> "CfgVehicles" >> _class >> "ammoClass");
if (isText _ammoClass) then {
_ammoClass = getText _ammoClass;
_ammoObj = createVehicle [_ammoClass, _worldspace select 0, [], 0, "CAN_COLLIDE"];
_ammoObj setVectorDirAndUp [(_worldspace select 1),(_worldspace select 2)];
_ammoObj setposATL (_worldspace select 0);
_newObj setVariable ["EPOCH_TRAP_OBJ",_ammoObj];
};
_newObj setVectorDirAndUp [(_worldspace select 1),(_worldspace select 2)];
_newObj setposATL (_worldspace select 0);
_newObj setDamage _damage;
@ -51,4 +61,4 @@ if (_objSlot != -1) then {
};
};
};
_return
_return

View File

@ -8,18 +8,17 @@ private ["_class","_worldspace","_objHiveKey","_animPhases","_VAL","_return","_o
_return = false;
if !(isNull _this) then {
_objSlot = _this getVariable["BUILD_SLOT", -1];
diag_log format["DEBUG: Building Save function BUILD_SLOT %1",_objSlot];
if (_objSlot != -1) then{
_this setDamage 0;
_class = typeOf _this;
_worldspace = [(getposATL _this call EPOCH_precisionPos), vectordir _this, vectorup _this];
_objHiveKey = format["%1:%2", (call EPOCH_fn_InstanceID), _objSlot];
_animPhases = [];
{
_animPhases pushBack (_this animationPhase _x)
} foreach (getArray(configFile >> "CfgVehicles" >> _class >> "persistAnimations"));
_VAL = [_class, _worldspace, _this getVariable["EPOCH_secureStorage", "-1"], _this getVariable["BUILD_OWNER", "-1"], _this getVariable["TEXTURE_SLOT", 0], _animPhases];
["Building", _objHiveKey, EPOCH_expiresBuilding, _VAL] call EPOCH_fnc_server_hiveSETEX;
_objHiveKey = format["%1:%2", (call EPOCH_fn_InstanceID), _objSlot];
_animPhases = [];
{
_animPhases pushBack (_this animationPhase _x)
} foreach (getArray(configFile >> "CfgVehicles" >> _class >> "persistAnimations"));
_VAL = [_class, _worldspace, _this getVariable["EPOCH_secureStorage", "-1"], _this getVariable["BUILD_OWNER", "-1"], _this getVariable["TEXTURE_SLOT", 0], _animPhases];
["Building", _objHiveKey, EPOCH_expiresBuilding, _VAL] call EPOCH_fnc_server_hiveSETEX;
_return = true;
};
};

View File

@ -7,6 +7,13 @@ if (!isNull _building) then {
_vehSlot = _building getVariable["BUILD_SLOT", -1];
if (_vehSlot != -1) then {
// Set off trap object
_ammoObj = _building getVariable ["EPOCH_TRAP_OBJ",objNull];
if !(isNull _ammoObj) then {
_ammoObj setDamage 1;
};
_vehHiveKey = format ["%1:%2", (call EPOCH_fn_InstanceID), _vehSlot];
["Building", _vehHiveKey, []] call EPOCH_fnc_server_hiveSET;
EPOCH_BuildingSlots set [_vehSlot, 0];