Merge pull request #954 from EpochModTeam/experimental

Epoch 1.0.0 Build: 1074
This commit is contained in:
vbawol 2017-10-30 08:35:34 -05:00 committed by GitHub
commit 393b685435
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
48 changed files with 173 additions and 27 deletions

View File

@ -1,3 +1,3 @@
5 "" !="Construct_f" !="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_" !="APERS(TripMine_Wire|BoundingMine_Range|Mine_Range)_Ammo" !="(SatchelCharge|DemoCharge|ClaymoreDirectionalMine)_Remote_Ammo" !="Epoch_(Sapper|Sapper(B|G)|Cloak)_F" !="EPOCH_RyanZombie_[1-5](|_(C|Sp|B|W|M|P))" !="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" !="#smokesource" !="SmokeLauncherAmmo" !"B_Bergen_(mcamo|dgtl|hex|tna)" !"B_AssaultPack_(khk|dgtl|rgr|sgg|cbr|mcamo|ocamo|tna)" !"B_Kitbag_(rgr|mcamo|sgg|cbr)" !"B_TacticalPack_(rgr|mcamo|ocamo|blk|oli)" !"B_FieldPack_(khk|ocamo|oucamo|cbr|blk|oli|ghex)" !"B_Carryall_(ocamo|oucamo|mcamo|khk|cbr|oli|ghex)" !"B_Viper(Light|)Harness_(oli|blk|ghex|hex|khk|oli)" !="B_Parachute" !="SLAMDirectionalMine_Wire_Ammo" !="(CMflare_Chaff|Sapper_Charge|SapperB_Charge|ATMine_Range)_Ammo"
5 "_EPOCH" !="BarrelBomb_EPOCH_Remote_Ammo" !="I_(Soldier[1-3]|Soldier)_EPOCH" !="(Bed|locker|Filing|Chair|ChairRed|wardrobe|cooker|Couch|Table|Pelican|Fridge|Shelf)_EPOCH" !="(ToolRack|Shoebox|Bunk|Rabbit|Cabinet|toilet|KitchenSink)_EPOCH" !="(Sheep|Goat|Snake|Snake2|Hen|Cock|Fin|Alsatian)_random_EPOCH" !=".+_(SIM|Ghost)_EPOCH" !="smallbackpack_(red|green|teal|pink)_epoch" !="(FirePlace|FirePlaceOn|Jack|Freezer|Tarp|Bobber)_EPOCH"
5 "_EPOCH" !="BarrelBomb(2|)_EPOCH_Remote_Ammo" !="I_(Soldier[1-3]|Soldier)_EPOCH" !="(Bed|locker|Filing|Chair|ChairRed|wardrobe|cooker|Couch|Table|Pelican|Fridge|Shelf)_EPOCH" !="(ToolRack|Shoebox|Bunk|Rabbit|Cabinet|toilet|KitchenSink)_EPOCH" !="(Sheep|Goat|Snake|Snake2|Hen|Cock|Fin|Alsatian)_random_EPOCH" !=".+_(SIM|Ghost)_EPOCH" !="smallbackpack_(red|green|teal|pink)_epoch" !="(FirePlace|FirePlaceOn|Jack|Freezer|Tarp|Bobber)_EPOCH" !="Br82nd_(StorageBoxLarge|StorageBox|StorageBoxSmall|WeaponsBox)_(SIM|Ghost)_EPOCH"
5 SeaGull

View File

@ -54,7 +54,7 @@ if (_customVarIndex != -1) then {
};
_currentVal = missionNamespace getVariable [_varName, _defaultVarValues select _customVarIndex];
if (_randomizeData isEqualTo 1) then {
_data = round(random _data);
_data = parseNumber ((random _data) toFixed 2);
};
if (_data != 0) then {
_newValue = ((_currentVal + _data) min _max) max _min;

View File

@ -353,9 +353,9 @@ _fnc_dropEquipAccessories = {
_equipped call _fnc_dropItem;
(_loadout select _slot) set [_accessory,""];
player setUnitLoadout _loadout;
_return = 1;
_return = 2;
};
if (((toLower _equipped) != (toLower _item)) || _forceEquip && _return != 4) then {
if ((((toLower _equipped) != (toLower _item)) || _forceEquip) && _return != 4) then {
(_loadout select _slot) set [_accessory,_item];
player setUnitLoadout _loadout;
player addItem _equipped;

View File

@ -44,8 +44,8 @@ if (_playerAlcohol > 20) then {
// Sets visual effect
_playerRadiation = missionNamespace getVariable [_playerRadiationKey, _playerRadiationDefault];
if (_playerRadiation > 1) then {
_radiationVal = linearConversion [0,100,_playerRadiation,1,10,true];
if (_playerRadiation > _radiationEffectsThreshold) then {
_radiationVal = linearConversion [0,100,_playerRadiation,0,10,true];
[(ceil _radiationVal)/10, 2] call epoch_setRadiation;
} else {
[0, 2] call epoch_setRadiation;

View File

@ -102,6 +102,8 @@ if (isNil "EPOCH_display_setup_complete") then {
// Background radiation
_outOfBoundsRadiation = ["CfgEpochClient", "outOfBoundsRadiation", 10] call EPOCH_fnc_returnConfigEntryV2;
_radsLevel = 0;
// Radiation screen effects threshold
_radiationEffectsThreshold = ["CfgEpochClient", "radiationEffectsThreshold", 10] call EPOCH_fnc_returnConfigEntryV2;
_prevEquippedItem = [];
_damagePlayer = damage player;

View File

@ -42,9 +42,8 @@ switch _level do {
};
case 0.1:
{
[(rmx_var_RadiationHandles select 0), _speed, [0.185533,1,1,1,0,true]] call epoch_postprocessAdjust;
[(rmx_var_RadiationHandles select 1), _speed, [1,1,0,0,0,0,0,0,0,0,1,0,0,0,0]] call epoch_postprocessAdjust;
[(rmx_var_RadiationHandles select 2), _speed, [0,0,0]] call epoch_postprocessAdjust;
rmx_var_RadiationHandles call epoch_postprocessDestroy;
rmx_var_RadiationHandles = nil;
};
case 0.2:
{

View File

@ -20,7 +20,7 @@ class build_upgrade
//action = "dyna_cursorTarget call EPOCH_QuickUpgrade;"; //TODO: scripted dyna menu
action = "";
icon = "x\addons\a3_epoch_code\Data\UI\buttons\build_upgrade.paa";
tooltip = "Upgrade";
tooltipcode = "format['Upgrade %1',getText(configFile >> 'CfgVehicles' >> (typeof dyna_cursorTarget) >> 'displayName')]";
class special {}; //uses external config, hardcoded
};
class build_remove
@ -28,14 +28,14 @@ class build_remove
condition = "dyna_buildMode select 1";
action = "dyna_cursorTarget call EPOCH_removeBUILD;";
icon = "x\addons\a3_epoch_code\Data\UI\buttons\build_remove.paa";
tooltip = "Remove";
tooltipcode = "format['Remove %1',getText(configFile >> 'CfgVehicles' >> (typeof dyna_cursorTarget) >> 'displayName')]";
};
class build_move
{
condition = "dyna_buildMode select 2";
action = "dyna_cursorTarget call EPOCH_fnc_SelectTargetBuild;";
icon = "x\addons\a3_epoch_code\Data\UI\buttons\build_move.paa";
tooltip = "Move";
tooltipcode = "format['Move %1',getText(configFile >> 'CfgVehicles' >> (typeof dyna_cursorTarget) >> 'displayName')]";
};
//Vehicle interaction

View File

@ -351,7 +351,7 @@ class CfgBaseBuilding
GhostPreview = "MetalFloor_Ghost_EPOCH";
energyCost = 0.5;
};
class MetalFloor_SIM_EPOCH : WoodFloor_SIM_EPOCH
class MetalFloor_SIM_EPOCH : MetalFloor_EPOCH
{
allowedSnapPoints[] = {"NF","SF","EF","WF","C"};
allowedSnapObjects[] = {"Const_floors_static_F","Constructions_foundation_F"};
@ -526,7 +526,7 @@ class CfgBaseBuilding
GhostPreview = "CinderFloor_Ghost_EPOCH";
energyCost = 1;
};
class CinderFloor_SIM_EPOCH : WoodFloor_SIM_EPOCH
class CinderFloor_SIM_EPOCH : CinderFloor_EPOCH
{
allowedSnapPoints[] = {"NF","SF","EF","WF","C"};
allowedSnapObjects[] = {"Const_floors_static_F","Constructions_foundation_F"};

View File

@ -23,6 +23,7 @@ class CfgEpochClient
radioactiveLocations[] = {"NameCityCapital", "NameCity", "Airport"}; // used for random radioactive locations and to suppress animal spawns within cities.
radiatedObjMaxFalloutDist = 125; // max distance radiated object can affect player (number in meters)
geigerCounterEnergyUsage = 10; // default loss of 10 energy every 10sec of use
radiationEffectsThreshold = 10; // default level for screen effects to indicate a player's rad dosage (0-100)
baseHungerLoss = 2; // increase number to speed up rate of Hunger loss
baseThirstLoss = 2; // increase number to speed up rate of Thirst loss

View File

@ -939,16 +939,26 @@ class CfgItemSort
"RabbitCarcass_EPOCH",
"SheepCarcass_EPOCH",
"SnakeCarcass_EPOCH",
"ItemBakedBeans",
"krypto_candy_epoch",
"bluburger_epoch",
"redburger_epoch",
"gyro_wrap_epoch",
"icecream_epoch",
"HotAxeSauce_epoch",
"Hemp",
"Sunflower"
};
Drink[] = {
"water_epoch",
"clean_water_epoch",
"ItemCanteen_Empty",
"ItemCanteen_Dirty",
"ItemCanteen_Clean",
"ItemBottlePlastic_Empty",
"ItemBottlePlastic_Dirty",
"ItemBottlePlastic_Clean",
"WhiskeyNoodle",
"FoodWalkNSons",
"ItemSodaOrangeSherbet",
@ -959,6 +969,20 @@ class CfgItemSort
"ItemSodaAlpineDude"
};
Basebuilding[] = {
"FieldToilet_EPOCH",
"KitSandbagWall",
"KitSandbagWallLong",
"KitBurnBarrel",
"KitLightPole",
"KitPortableLight_Single",
"KitPortableLight_Double",
"KitScaffolding",
"KitSink",
"KitWatchTower",
"KitSunShade",
"KitBagBunker",
"KitBarGate",
"KitWaterPump",
"KitBarbedWire",
"Kit_Garden",
"KitTentA",

View File

@ -70,6 +70,10 @@ class CfgObjectInteractions
{
interactMode = 4;
};
class FieldToilet_EPOCH : Default
{
interactMode = 4;
};
class Foundation_EPOCH : Default
{
interactMode = 1;

View File

@ -2004,6 +2004,10 @@ class CfgPricing
{
price = 25;
};
class ItemBakedBeans
{
price = 3;
};
class krypto_candy_epoch
{
price = 3;
@ -2024,6 +2028,10 @@ class CfgPricing
{
price = 2;
};
class HotAxeSauce_epoch
{
price = 2;
};
class ItemSodaOrangeSherbet
{
price = 4;
@ -2052,6 +2060,30 @@ class CfgPricing
{
price = 10;
};
class ItemCanteen_Empty
{
price = 8;
};
class ItemCanteen_Dirty
{
price = 10;
};
class ItemCanteen_Clean
{
price = 12;
};
class ItemBottlePlastic_Empty
{
price = 6;
};
class ItemBottlePlastic_Dirty
{
price = 8;
};
class ItemBottlePlastic_Clean
{
price = 10;
};
class FAK
{
price = 3;
@ -3126,6 +3158,62 @@ class CfgPricing
{
price = 70;
};
class KitFieldToilet
{
price = 66;
};
class KitSandbagWall
{
price = 60;
};
class KitSandbagWallLong
{
price = 120;
};
class KitBurnBarrel
{
price = 116;
};
class KitLightPole
{
price = 158;
};
class KitPortableLight_Single
{
price = 185;
};
class KitPortableLight_Double
{
price = 295;
};
class KitScaffolding
{
price = 268;
};
class KitSink
{
price = 76;
};
class KitWatchTower
{
price = 72;
};
class KitSunShade
{
price = 29;
};
class KitBagBunker
{
price = 280;
};
class KitBarGate
{
price = 44;
};
class KitWaterPump
{
price = 196;
};
class KitWorkbench
{
price = 8;

View File

@ -13,21 +13,45 @@
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_looting/EPOCH_server_spawnBoatLoot.sqf
*/
//[[[cog import generate_private_arrays ]]]
private ["_shipwrecks","_item","_markers"];
private ["_worldSize","_shipwrecks","_total","_count","_distFromOthers","_tooClose","_spawnedLoot","_wreck","_item","_markers"];
//[[[end]]]
_cfgEpoch = configFile >> "CfgEpoch" >> worldname;
if (getNumber(_cfgEpoch >> "shipwreckLootEnabled") isEqualTo 1) then {
_worldSize = worldSize/2;
_shipwrecks = nearestTerrainObjects [ [_worldSize, _worldSize], ["SHIPWRECK"], _worldSize];
_total = getNumber(_cfgEpoch >> "maxSpawnedShipwrecks");
if(_shipwrecks isEqualTo [])exitWith{diag_log "EPOCHDebug: no shipwrecks found"};
if(_total isEqualTo 0)exitWith{diag_log "EPOCHDebug: no shipwrecks allowed"};
_count = count(_shipwrecks);
if(_count < _total)then{diag_log "EPOCHDebug: not enough shipwrecks to fill your needs on this map, trying all available locations!"};
_distFromOthers = getNumber(_cfgEpoch >> "distFromOtherShipwrecks");
_spawnedLoot = [];
for "_i" from 1 to _total do {
if (_shipwrecks isEqualTo []) exitWith {};
if(_shipwrecks isEqualTo [])exitWith{diag_log "EPOCHDebug: no more shipwrecks found"};
_tooClose = false;
_wreck = selectRandom _shipwrecks;
if(isNil "_wreck")exitWith{};
{
if(!(_spawnedLoot isEqualTo []) && ((_wreck distance _x) < _distFromOthers))exitWith{
diag_log "EPOCHDebug: Shipwreck too close to another shipwreck";
_tooClose = true;
_i = (_i - 1);
};
}forEach _spawnedLoot;
_shipwrecks = _shipwrecks - [_wreck];
_item = createVehicle["container_epoch", _wreck, [], 0, "NONE"];
_item setMass 220;
if (EPOCH_SHOW_BOATLOOT) then {
_markers = ["Shipwreck",_wreck] call EPOCH_server_createGlobalMarkerSet;
if!(_tooClose)then{
_position = [_wreck,1,20,3,1,20,0] call BIS_fnc_findSafePos;
_item = createVehicle["container_epoch",_position, [], 0, "NONE"];
_spawnedLoot pushback _wreck;
_item setMass 220;
if (EPOCH_SHOW_BOATLOOT) then {
_markers = ["Shipwreck",_wreck] call EPOCH_server_createGlobalMarkerSet;
};
};
};
};
diag_log format["EPOCHDebug: Safely spawned %1 loot container(s) at these shipwreck locations:%2",count _spawnedLoot , _spawnedLoot];
};

View File

@ -17,7 +17,7 @@ private ["_ReservedSlots","_SideHQ1","_SideHQ2","_SideHQ3","_abortAndError","_al
//[[[end]]]
_startTime = diag_tickTime;
missionNamespace setVariable ['Epoch_ServerVersion', getText(configFile >> "CfgMods" >> "Epoch" >> "version"), true];
diag_log format["Epoch: Starting ArmA3 Epoch Server, Version %1",Epoch_ServerVersion];
diag_log format["Epoch: Starting ArmA3 Epoch Server, Version %1. Note: If server crashes directly after this point check that Redis is running and the connection info is correct.",Epoch_ServerVersion];
_abortAndError = {
// kick all players with reverse BE kicks

View File

@ -8,11 +8,11 @@ item3[] = {"Vehicle_and_Player",4,218,750.986694,-310.854675,850.986694,-260.854
item4[] = {"CMD_queue",4,218,450.000000,-450.000000,550.000000,-400.000000,10.000000,"CMD queue"};
item5[] = {"Save_Players",4,218,450.000000,-375.000000,550.000000,-325.000000,3.000000,"Save" \n "Players"};
item6[] = {"Cleanup",4,218,750.000000,-375.000000,850.000000,-325.000000,8.000000,"Cleanup"};
item7[] = {"Events_Manager",4,4314,599.992371,-192.435822,699.992371,-142.435822,0.000000,"Events" \n "Manager"};
item7[] = {"Events_Manager",4,218,599.992371,-192.435822,699.992371,-142.435822,0.000000,"Events" \n "Manager"};
item8[] = {"Save_Vehicles",4,218,450.000000,-300.000000,550.000000,-250.000000,4.000000,"Save" \n "Vehicles"};
item9[] = {"Cleanup_Handler",4,218,750.000000,-450.000000,850.000000,-400.000000,8.000000,"Cleanup" \n "Handler"};
item10[] = {"Server_FPS",4,218,746.045227,-248.683014,846.045227,-198.683014,0.000000,"Server FPS"};
item11[] = {"Forced_Restart",4,218,684.856567,-214.145233,784.856567,-164.145233,0.000000,"Forced" \n "Restart"};
item11[] = {"Forced_Restart",4,4314,684.856567,-214.145233,784.856567,-164.145233,0.000000,"Forced" \n "Restart"};
link0[] = {0,1};
link1[] = {1,2};
link2[] = {2,3};
@ -34,7 +34,7 @@ link17[] = {9,2};
link18[] = {10,2};
link19[] = {11,2};
globals[] = {0.000000,0,0,0,0,640,480,1,5,6316128,1,275.180084,1161.319580,208.497711,-659.879456,898,884,1};
window[] = {2,-1,-1,-1,-1,838,78,1370,78,3,916};
window[] = {2,-1,-1,-1,-1,864,104,1396,104,3,916};
*//*%FSM</HEAD>*/
class FSM
{
@ -71,6 +71,7 @@ class FSM
"_scriptBasedRestart = EPOCH_ServerRestart;" \n
"_forceRestartTime = EPOCH_forceRestartTime;" \n
"_forceRestartTimeWarning = _forceRestartTime-300;" \n
"" \n
"_prevRestartIn = 0;" \n
"_serverLocked = false;" \n
"_serverRestarting = false;" \n
@ -91,6 +92,7 @@ class FSM
"_lastObjectCleanup1 = diag_tickTime;" \n
"" \n
"_pvehTime = diag_tickTime;" \n
"_forcedrestartTimer = diag_tickTime;" \n
"" \n
"_instanceID = call EPOCH_fn_InstanceID;" \n
"" \n
@ -427,8 +429,9 @@ class FSM
priority = 0.000000;
to="Process";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"((diag_tickTime - _pvehTime) > 20)"/*%FSM</CONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"((diag_tickTime - _forcedrestartTimer) > 20)"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"// restart script" \n
"_forcedrestartTimer = diag_tickTime;" \n
"if (_scriptBasedRestart) then {" \n
" if (diag_tickTime >= _forceRestartTimeWarning) then {" \n
" if (!_serverLocked) then {" \n

View File

@ -82,6 +82,7 @@ class CfgEpoch
// Shipwrecks
shipwreckLootEnabled = 1;
maxSpawnedShipwrecks = 12;
distFromOtherShipwrecks = 750;
// Debug Box
telePos[] = {};

View File

@ -1,7 +1,7 @@
# Change Log
All changes for [Arma 3](https://arma3.com/) [Epoch Mod](https://epochmod.com) are listed in this changelog.
##[1.0.0.0] - 2017-10-26
## [1.0.0.0] - 2017-10-26
### Added
- Favorites bar. Users can pin (almost) any item to the bar by dragging items from inventory to equip/un-equip (Weapons, attachments, head gear, etc.) or consume (eat, drink, build, etc.) using keyboard mapping without having gear open. Use ESC menu to change the mappings. Server admins, see client_init.sqf for config. @raymix
- Advanced Vehicle Repair System - Repairing your vehicle just got more realistic. Patch a leaky fuel tank with Duct Tape. If you blow a tire you now need to find a Spare. Engine too damaged? grab an engine block to repair it. @Ignatz-Heman