mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
Reduces rads over time at a cost of immunity.
This commit is contained in:
parent
8ff511d3ee
commit
de1e15374b
@ -140,7 +140,6 @@ if ((getFatigue player) >= 0.7 && _airTemp > 100) then {
|
|||||||
|
|
||||||
// toxic fever and immunity increase
|
// toxic fever and immunity increase
|
||||||
_playerToxicity = missionNamespace getVariable [_playerToxicityKey, _playerToxicityDefault];
|
_playerToxicity = missionNamespace getVariable [_playerToxicityKey, _playerToxicityDefault];
|
||||||
// _playerImmunity = missionNamespace getVariable [_playerImmunityKey, _playerImmunityDefault];
|
|
||||||
if (_playerToxicity > 0) then {
|
if (_playerToxicity > 0) then {
|
||||||
_playerImmunity = [_playerImmunityKey,0.1,_playerImmunityMax,_playerImmunityMin] call EPOCH_fnc_setVariableLimited;
|
_playerImmunity = [_playerImmunityKey,0.1,_playerImmunityMax,_playerImmunityMin] call EPOCH_fnc_setVariableLimited;
|
||||||
_playerToxicity = [_playerToxicityKey,-0.1,_playerToxicityMax,_playerToxicityMin] call EPOCH_fnc_setVariableLimited;
|
_playerToxicity = [_playerToxicityKey,-0.1,_playerToxicityMax,_playerToxicityMin] call EPOCH_fnc_setVariableLimited;
|
||||||
|
@ -6,7 +6,7 @@ _powerSources = nearestObjects[player, ["Land_spp_Tower_F","Land_wpp_Turbine_V2_
|
|||||||
|
|
||||||
// TODO: add more sources and config based check instead of global var
|
// TODO: add more sources and config based check instead of global var
|
||||||
// _nearestLocations removed as they don't support getVariable
|
// _nearestLocations removed as they don't support getVariable
|
||||||
// All sources used as a temp solution
|
// All sources used as a temp solution, please re-use as much as you can.
|
||||||
_allSources = nearestObjects[player, ["All"], _radiatedObjMaxRange];
|
_allSources = nearestObjects[player, ["All"], _radiatedObjMaxRange];
|
||||||
_nearbyRadioactiveObjects = _allSources select {(_x getVariable ["EPOCH_Rads", []]) select 0 > 0};
|
_nearbyRadioactiveObjects = _allSources select {(_x getVariable ["EPOCH_Rads", []]) select 0 > 0};
|
||||||
|
|
||||||
@ -75,11 +75,17 @@ if (uniform player == "hazmat_placeholder") then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Radiation Handler
|
// Radiation Handler
|
||||||
if (_radsLevel > 0) then {
|
_playerRadiation = missionNamespace getVariable [_playerRadiationKey, _playerRadiationDefault];
|
||||||
// increase rads based on radiation levels
|
_playerImmunity = missionNamespace getVariable [_playerImmunityKey, _playerImmunityDefault];
|
||||||
_playerRadiation = [_playerRadiationKey,_radsLevel,_playerRadiationMax,_playerRadiationMin] call EPOCH_fnc_setVariableLimited;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
if (_radsLevel > 0) then { // increase rads based on radiation levels
|
||||||
|
_playerRadiation = [_playerRadiationKey,_radsLevel,_playerRadiationMax,_playerRadiationMin] call EPOCH_fnc_setVariableLimited;
|
||||||
|
} else { //Decrease rad level, but at a cost of immunity loss
|
||||||
|
if (_playerRadiation > 0) then {
|
||||||
|
_playerRadiation = [_playerRadiationKey,(_baseRadiationLoss * _playerImmunity / 100),_playerRadiationMax,_playerRadiationMin] call EPOCH_fnc_setVariableLimited;
|
||||||
|
_playerImmunity = [_playerImmunityKey,_baseRadiationLossImmunityPenalty,_playerImmunityMax,_playerImmunityMin] call EPOCH_fnc_setVariableLimited;
|
||||||
|
};
|
||||||
|
};
|
||||||
if !(surfaceIsWater _position) then {
|
if !(surfaceIsWater _position) then {
|
||||||
if (_nearestLocations isEqualTo []) then{
|
if (_nearestLocations isEqualTo []) then{
|
||||||
if (count(player nearEntities["Animal_Base_F", 800]) < 2) then {
|
if (count(player nearEntities["Animal_Base_F", 800]) < 2) then {
|
||||||
|
@ -115,6 +115,8 @@ _prevEnergy = missionNamespace getVariable [_playerEnergyKey, _playerEnergyDefau
|
|||||||
// init config data
|
// init config data
|
||||||
_antagonistRndChance = ["CfgEpochClient", "antagonistRngChance", 100] call EPOCH_fnc_returnConfigEntryV2;
|
_antagonistRndChance = ["CfgEpochClient", "antagonistRngChance", 100] call EPOCH_fnc_returnConfigEntryV2;
|
||||||
|
|
||||||
|
_baseRadiationLoss = ["CfgEpochClient", "baseRadiationLoss", -0.1] call EPOCH_fnc_returnConfigEntryV2;
|
||||||
|
_baseRadiationLossImmunityPenalty = ["CfgEpochClient", "baseRadiationLossImmunityPenalty", -0.1] call EPOCH_fnc_returnConfigEntryV2;
|
||||||
_baseHungerLoss = ["CfgEpochClient", "baseHungerLoss", 2] call EPOCH_fnc_returnConfigEntryV2;
|
_baseHungerLoss = ["CfgEpochClient", "baseHungerLoss", 2] call EPOCH_fnc_returnConfigEntryV2;
|
||||||
_baseThirstLoss = ["CfgEpochClient", "baseThirstLoss", 2] call EPOCH_fnc_returnConfigEntryV2;
|
_baseThirstLoss = ["CfgEpochClient", "baseThirstLoss", 2] call EPOCH_fnc_returnConfigEntryV2;
|
||||||
_baseAlcoholLoss = ["CfgEpochClient", "baseAlcoholLoss", 0.17] call EPOCH_fnc_returnConfigEntryV2;
|
_baseAlcoholLoss = ["CfgEpochClient", "baseAlcoholLoss", 0.17] call EPOCH_fnc_returnConfigEntryV2;
|
||||||
|
@ -24,7 +24,10 @@ class CfgEpochClient
|
|||||||
radiatedObjMaxFalloutDist = 125; // max distance radiated object can affect player (number in meters)
|
radiatedObjMaxFalloutDist = 125; // max distance radiated object can affect player (number in meters)
|
||||||
geigerCounterEnergyUsage = 10; // default loss of 10 energy every 10sec of use
|
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)
|
radiationEffectsThreshold = 10; // default level for screen effects to indicate a player's rad dosage (0-100)
|
||||||
|
|
||||||
|
baseRadiationLoss = -1; //default radiation loss every 1 minute, calculated from total immunity. No immunity no reduction.
|
||||||
|
baseRadiationLossImmunityPenalty = -1; //immunity is reduced as a penalty for radiation loss effect
|
||||||
|
|
||||||
baseHungerLoss = 2; // increase number to speed up rate of Hunger loss
|
baseHungerLoss = 2; // increase number to speed up rate of Hunger loss
|
||||||
baseThirstLoss = 2; // increase number to speed up rate of Thirst loss
|
baseThirstLoss = 2; // increase number to speed up rate of Thirst loss
|
||||||
accelerateHTALoss = "true"; // use server's time acceleration to increase the rate of Hunger, Thirst and Alcohol loss
|
accelerateHTALoss = "true"; // use server's time acceleration to increase the rate of Hunger, Thirst and Alcohol loss
|
||||||
|
Loading…
Reference in New Issue
Block a user