Add a config option for maxCustomRelicLevel

This commit is contained in:
Melledy
2023-12-14 20:35:02 -08:00
parent 1ce75b7f71
commit 04f3feb15c
2 changed files with 2 additions and 1 deletions

View File

@@ -111,6 +111,7 @@ public class Config {
public static class ServerOptions {
public boolean autoCreateAccount = true;
public int sceneMaxEntites = 500;
public int maxCustomRelicLevel = 15; // Maximum level of a relic that the player can create with the /give command
public boolean unlockAllChallenges = true;
public boolean spendStamina = true;
public int staminaRecoveryRate = 5 * 60;

View File

@@ -222,7 +222,7 @@ public class CommandArgs {
// Try to set level
if (this.getLevel() > 0) {
// Set relic level
item.setLevel(Math.min(this.getLevel(), 999));
item.setLevel(Math.min(this.getLevel(), LunarCore.getConfig().getServerOptions().maxCustomRelicLevel));
// Apply sub stat upgrades to the relic
int upgrades = item.getMaxNormalSubAffixCount() - item.getCurrentSubAffixCount();