Skip to content

Commit

Permalink
Made zot charge configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
Sfiguz7 committed Mar 6, 2024
1 parent 8a3fe25 commit 73aa700
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/main/java/me/sfiguz7/transcendence/TranscEndence.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public class TranscEndence extends JavaPlugin implements SlimefunAddon {
private int researchId = 7100;

private int highchance;
private int zotRequiredCharge;

@Override
public void onEnable() {
Expand Down Expand Up @@ -96,6 +97,7 @@ public void onEnable() {
);

// Config fetching
zotRequiredCharge = getConfig().getInt("options.zot-required-charge");
highchance = getConfig().getInt("options.polarizer-affinity-chance");
if (highchance < 26 || highchance > 50) {
getLogger().log(Level.SEVERE, "Invalid config option: options.polarizer-affinity-chance");
Expand Down Expand Up @@ -247,6 +249,10 @@ public int getHighchance() {
return instance.highchance;
}

public int getZotRequiredCharge() {
return instance.zotRequiredCharge;
}

public static TERegistry getRegistry() {
return instance.registry;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public void tick(Block b, SlimefunItem sf, Config data) {
return;
}

int requiredCharge = 1000;
int requiredCharge = TranscEndence.getInstance().getZotRequiredCharge();
NamespacedKey chargeKey = new NamespacedKey(TranscEndence.getInstance(), "charge");
ItemMeta zotMeta = zot.getItemMeta();
int zotCharge = PersistentDataAPI.getInt(zotMeta, chargeKey);
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ options:
enable-daxi-regen-effects: true
give-guide-on-first-join: true
polarizer-affinity-chance: 40
zot-required-charge: 1000
unstable-death-message: " tried to become unstable. They succeeded."
daxi-message-intro: "You feel power flowing through your veins."
daxi-message-strength: "Your strikes are now more effective."
Expand Down

0 comments on commit 73aa700

Please sign in to comment.