Make nutrition less harsh (#439)
* Make nutrition less harsh Also fix the accumulator because why did I put that in the loop. Decay rates decreased and made drink thirst levels same as hunger for now. * Also fix stomach frametime accumulation
This commit is contained in:
committed by
Pieter-Jan Briers
parent
8b1be6edee
commit
480d3b26c4
@@ -48,7 +48,7 @@ namespace Content.Server.GameObjects.Components.Nutrition
|
|||||||
public override void ExposeData(ObjectSerializer serializer)
|
public override void ExposeData(ObjectSerializer serializer)
|
||||||
{
|
{
|
||||||
base.ExposeData(serializer);
|
base.ExposeData(serializer);
|
||||||
serializer.DataField(ref _baseDecayRate, "base_decay_rate", 0.5f);
|
serializer.DataField(ref _baseDecayRate, "base_decay_rate", 0.1f);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void HungerThresholdEffect(bool force = false)
|
public void HungerThresholdEffect(bool force = false)
|
||||||
|
|||||||
@@ -38,17 +38,17 @@ namespace Content.Server.GameObjects.Components.Nutrition
|
|||||||
public Dictionary<ThirstThreshold, float> ThirstThresholds => _thirstThresholds;
|
public Dictionary<ThirstThreshold, float> ThirstThresholds => _thirstThresholds;
|
||||||
private Dictionary<ThirstThreshold, float> _thirstThresholds = new Dictionary<ThirstThreshold, float>
|
private Dictionary<ThirstThreshold, float> _thirstThresholds = new Dictionary<ThirstThreshold, float>
|
||||||
{
|
{
|
||||||
{ThirstThreshold.OverHydrated, 400.0f},
|
{ThirstThreshold.OverHydrated, 600.0f},
|
||||||
{ThirstThreshold.Okay, 300.0f},
|
{ThirstThreshold.Okay, 450.0f},
|
||||||
{ThirstThreshold.Thirsty, 200.0f},
|
{ThirstThreshold.Thirsty, 300.0f},
|
||||||
{ThirstThreshold.Parched, 100.0f},
|
{ThirstThreshold.Parched, 150.0f},
|
||||||
{ThirstThreshold.Dead, 0.0f},
|
{ThirstThreshold.Dead, 0.0f},
|
||||||
};
|
};
|
||||||
|
|
||||||
public override void ExposeData(ObjectSerializer serializer)
|
public override void ExposeData(ObjectSerializer serializer)
|
||||||
{
|
{
|
||||||
base.ExposeData(serializer);
|
base.ExposeData(serializer);
|
||||||
serializer.DataField(ref _baseDecayRate, "base_decay_rate", 0.5f);
|
serializer.DataField(ref _baseDecayRate, "base_decay_rate", 0.1f);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ThirstThresholdEffect(bool force = false)
|
public void ThirstThresholdEffect(bool force = false)
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ namespace Content.Server.GameObjects.EntitySystems
|
|||||||
{
|
{
|
||||||
var comp = entity.GetComponent<HungerComponent>();
|
var comp = entity.GetComponent<HungerComponent>();
|
||||||
comp.OnUpdate(_accumulatedFrameTime);
|
comp.OnUpdate(_accumulatedFrameTime);
|
||||||
_accumulatedFrameTime = 0.0f;
|
|
||||||
}
|
}
|
||||||
|
_accumulatedFrameTime = 0.0f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ namespace Content.Server.GameObjects.EntitySystems
|
|||||||
{
|
{
|
||||||
var comp = entity.GetComponent<StomachComponent>();
|
var comp = entity.GetComponent<StomachComponent>();
|
||||||
comp.OnUpdate(_accumulatedFrameTime);
|
comp.OnUpdate(_accumulatedFrameTime);
|
||||||
_accumulatedFrameTime = 0.0f;
|
|
||||||
}
|
}
|
||||||
|
_accumulatedFrameTime = 0.0f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ namespace Content.Server.GameObjects.EntitySystems
|
|||||||
{
|
{
|
||||||
var comp = entity.GetComponent<ThirstComponent>();
|
var comp = entity.GetComponent<ThirstComponent>();
|
||||||
comp.OnUpdate(_accumulatedFrameTime);
|
comp.OnUpdate(_accumulatedFrameTime);
|
||||||
_accumulatedFrameTime = 0.0f;
|
|
||||||
}
|
}
|
||||||
|
_accumulatedFrameTime = 0.0f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user