Added new conf.json setting "powerPlayerStarting" (default 0.0) for the power level which new players will now start at; previously new players would start with max power, now it's configurable
This commit is contained in:
parent
07e2721ccd
commit
bbc7c48408
@ -32,6 +32,7 @@ public class Conf
|
||||
// Power
|
||||
public static double powerPlayerMax = 10.0;
|
||||
public static double powerPlayerMin = -10.0;
|
||||
public static double powerPlayerStarting = 0.0; // New players start out with this power level
|
||||
public static double powerPerMinute = 0.2; // Default health rate... it takes 5 min to heal one power
|
||||
public static double powerPerDeath = 4.0; // A death makes you lose 4 power
|
||||
public static boolean scaleNegativePower = false; // Power regeneration rate increase as power decreases
|
||||
|
@ -115,7 +115,7 @@ public class FPlayer extends PlayerEntity implements EconomyParticipator
|
||||
public FPlayer()
|
||||
{
|
||||
this.resetFactionData(false);
|
||||
this.power = this.getPowerMax();
|
||||
this.power = Conf.powerPlayerStarting;
|
||||
this.lastPowerUpdateTime = System.currentTimeMillis();
|
||||
this.lastLoginTime = System.currentTimeMillis();
|
||||
this.mapAutoUpdating = false;
|
||||
@ -653,7 +653,7 @@ public class FPlayer extends PlayerEntity implements EconomyParticipator
|
||||
public boolean shouldBeSaved()
|
||||
{
|
||||
if (this.hasFaction()) return true;
|
||||
if (this.getPowerRounded() != this.getPowerMaxRounded()) return true;
|
||||
if (this.getPowerRounded() != this.getPowerMaxRounded() && this.getPowerRounded() != (int) Math.round(Conf.powerPlayerStarting)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user