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
fc5d45d8c4
commit
e32660c188
@ -23,6 +23,7 @@ public class Conf
|
|||||||
// Power
|
// Power
|
||||||
public static double powerPlayerMax = 10.0;
|
public static double powerPlayerMax = 10.0;
|
||||||
public static double powerPlayerMin = -10.0;
|
public static double powerPlayerMin = -10.0;
|
||||||
|
public static double powerPlayerStarting = 0.0;
|
||||||
public static double powerPerMinute = 0.2; // Default health rate... it takes 5 min to heal one power
|
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 double powerPerDeath = 4.0; // A death makes you lose 4 power
|
||||||
public static boolean powerRegenOffline = false; // does player power regenerate even while they're offline?
|
public static boolean powerRegenOffline = false; // does player power regenerate even while they're offline?
|
||||||
|
@ -149,7 +149,7 @@ public class FPlayer extends PlayerEntity implements EconomyParticipator
|
|||||||
public FPlayer()
|
public FPlayer()
|
||||||
{
|
{
|
||||||
this.resetFactionData(false);
|
this.resetFactionData(false);
|
||||||
this.power = this.getPowerMax();
|
this.power = Conf.powerPlayerStarting;
|
||||||
this.lastPowerUpdateTime = System.currentTimeMillis();
|
this.lastPowerUpdateTime = System.currentTimeMillis();
|
||||||
this.lastLoginTime = System.currentTimeMillis();
|
this.lastLoginTime = System.currentTimeMillis();
|
||||||
this.mapAutoUpdating = false;
|
this.mapAutoUpdating = false;
|
||||||
@ -809,7 +809,10 @@ public class FPlayer extends PlayerEntity implements EconomyParticipator
|
|||||||
@Override
|
@Override
|
||||||
public boolean shouldBeSaved()
|
public boolean shouldBeSaved()
|
||||||
{
|
{
|
||||||
if (this.getPowerRounded() == this.getPowerMaxRounded() && !this.hasFaction()) return false;
|
if (!this.hasFaction() &&
|
||||||
|
(this.getPowerRounded() == this.getPowerMaxRounded() || this.getPowerRounded() == (int) Math.round(Conf.powerPlayerStarting))
|
||||||
|
)
|
||||||
|
return false;
|
||||||
return ! this.deleteMe;
|
return ! this.deleteMe;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user