Changed craft times for all items,buildings, researches and added research that can change game stats/effects.
This commit is contained in:
@@ -49,7 +49,7 @@ public partial class Robot : Node3D
|
||||
}
|
||||
else if (currentMessage.Length <= 0)
|
||||
{
|
||||
CoolDown(delta, IdleHeatLossPerSecond);
|
||||
CoolDown(delta, GameData.robotStats.GetCoolingRate(IdleHeatLossPerSecond));
|
||||
currentMessage = "No script executing";
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ public partial class Robot : Node3D
|
||||
|
||||
public float GetMovementSpeed()
|
||||
{
|
||||
return GameData.robotSpeed * GetWorkEfficiency();
|
||||
return GameData.robotStats.GetMovementSpeed(GameData.robotSpeed) * GetWorkEfficiency();
|
||||
}
|
||||
|
||||
public float GetWorkEfficiency()
|
||||
@@ -76,7 +76,8 @@ public partial class Robot : Node3D
|
||||
if (isBroken) return 0f;
|
||||
if (maintenance >= 50f) return 1f;
|
||||
|
||||
return Math.Clamp(0.35f + maintenance / 100f, 0.35f, 1f);
|
||||
float minimumEfficiency = GameData.robotStats.GetMinimumEfficiency();
|
||||
return Math.Clamp(minimumEfficiency + maintenance / 100f, minimumEfficiency, 1f);
|
||||
}
|
||||
|
||||
public void Maintain()
|
||||
@@ -102,19 +103,19 @@ public partial class Robot : Node3D
|
||||
|
||||
if (isCoolingDown)
|
||||
{
|
||||
CoolDown(delta, ActiveHeatLossPerSecond);
|
||||
CoolDown(delta, GameData.robotStats.GetCoolingRate(ActiveHeatLossPerSecond));
|
||||
currentMessage = $"Cooling down ({heat:0}%)";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!GameData.survival.TryConsumeEnergy(EnergyUsePerSecond * (float)delta))
|
||||
if (!GameData.survival.TryConsumeEnergy(GameData.robotStats.GetEnergyUse(EnergyUsePerSecond) * (float)delta))
|
||||
{
|
||||
currentMessage = "Not enough energy";
|
||||
return false;
|
||||
}
|
||||
|
||||
heat = Math.Clamp(heat + HeatGainPerSecond * (float)delta, 0f, 100f);
|
||||
maintenance = Math.Clamp(maintenance - MaintenanceLossPerSecond * (float)delta, 0f, 100f);
|
||||
heat = Math.Clamp(heat + GameData.robotStats.GetHeatGain(HeatGainPerSecond) * (float)delta, 0f, 100f);
|
||||
maintenance = Math.Clamp(maintenance - GameData.robotStats.GetMaintenanceLoss(MaintenanceLossPerSecond) * (float)delta, 0f, 100f);
|
||||
|
||||
if (heat >= 100f)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user