Lazily implement nutrition configuration

also tweak the working values for chopping wood
This commit is contained in:
icomrade
2017-01-01 20:24:48 -05:00
parent 5cb485ccfb
commit 62b7c2194b
4 changed files with 7 additions and 5 deletions

View File

@@ -2,6 +2,7 @@
[NEW] Added config variable DZE_ServerLogHits for logging source damage, weapon, ammo and distance to server RPT.
[NEW] Added M4SPR_DZE class which spawns with 30Rnd Stanag by default instead of 20Rnd. #1823 @AirwavesMan
[NEW] Building upgrades now source parts from the player's backpack and main inventory. @icomrade
[NEW] Server owners can configure nutrition system effects with DZE_NutritionDivisor in configVariables.sqf @icomrade
[CHANGED] Turbo and HoldBreath keybindings are now allowed again. @icomrade
[CHANGED] Removed drink from hands at ponds due to client FPS impact. Players can still fill drinks at ponds by right clicking a container. @ebayShopper

View File

@@ -39,7 +39,7 @@ if (_ammo isKindOf "Hatchet_Swing_Ammo" || _ammo isKindOf "Chainsaw_Swing_Ammo")
_distance = 60;
[player,_distance,false,getPosATL player] spawn player_alertZombies;
// Working-Factor for chopping wood.
["Working",0,[100,15,10,0]] call dayz_NutritionSystem;
["Working",0,[20,15,10,0]] call dayz_NutritionSystem;
};
DZE_TEMP_treedmg = _damage;
};

View File

@@ -33,6 +33,7 @@ DZE_NoBuildNearDistance = 150; // Distance from blacklisted objects to disallow
DZE_GodModeBaseExclude = []; //Array of object class names excluded from the god mode bases feature
DZE_salvageLocked = true; //Enable or disable salvaging of locked vehicles, useful for stopping griefing on locked vehicles.
DZE_DisabledChannels = [(localize "str_channel_side"),(localize "str_channel_global"),(localize "str_channel_command")]; //List of disabled voice channels. Other channels are: "str_channel_group","str_channel_direct","str_channel_vehicle"
DZE_NutritionDivisor = [1, 1, 1, 1]; //array of DIVISORS that regulate the rate of [calories, thirst, hunger, temperature] use when "working" (keep in mind that temperature raises with actions) - min values 0.1
// Death Messages
DZE_DeathMsgChat = "none"; //"none","global","side","system" Display death messages in selected chat channel.

View File

@@ -352,10 +352,10 @@ if (!isDedicated) then {
};
case "Working": {
if (_calorieCount > 0) then { dayz_nutrition = dayz_nutrition - _calorieCount; };
if (_thirstCount > 0) then { dayz_thirst = dayz_thirst + _thirstCount; };
if (_hungerCount > 0) then { dayz_hunger = dayz_hunger + _hungerCount; };
if (_tempCount > 0) then { dayz_temperatur = dayz_temperatur + _tempCount; };
if (_calorieCount > 0) then { dayz_nutrition = dayz_nutrition - (_calorieCount / ((DZE_NutritionDivisor select 0) min 0.1)); };
if (_thirstCount > 0) then { dayz_thirst = dayz_thirst + (_thirstCount / ((DZE_NutritionDivisor select 1) min 0.1)); };
if (_hungerCount > 0) then { dayz_hunger = dayz_hunger + (_hungerCount / ((DZE_NutritionDivisor select 2) min 0.1)); };
if (_tempCount > 0) then { dayz_temperatur = dayz_temperatur + (_tempCount / ((DZE_NutritionDivisor select 3) min 0.1)); };
};
};