Skip to content

Commit

Permalink
Explosion config
Browse files Browse the repository at this point in the history
  • Loading branch information
igentuman committed May 30, 2022
1 parent ee8ded1 commit 18949ed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public void updateErrorLevel()
adjustment = 0;
burning = false;
if(BfrConfig.reactorMeltdown) {
controller.getWorld().createExplosion(null, controller.getPos().getX(), controller.getPos().getY() + 1, controller.getPos().getZ(), 4.0F, true);
controller.getWorld().createExplosion(null, controller.getPos().getX(), controller.getPos().getY() + 1, controller.getPos().getZ(), BfrConfig.explosionRadius, true);
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/igentuman/bfr/common/config/BfrConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public static Configuration getConfig()
}
public static int reactionDifficulty;
public static boolean reactorMeltdown;
public static float explosionRadius;

public static void preInit()
{
Expand All @@ -51,6 +52,10 @@ private static void syncConfig(boolean loadFromFile, boolean setFromConfig)
reactor_meltdown.setLanguageKey("gui.bfr.config.better_fusion_reactor.reactor_meltdown");
reactorMeltdown = reactor_meltdown.getBoolean();

Property explosion_radius = config.get(BFR_CATEGORY, "explosion_radius", 4.0, Lang.localise("gui.bfr.config.better_fusion_reactor.explosion_radius.comment"));
explosion_radius.setLanguageKey("gui.bfr.config.better_fusion_reactor.explosion_radius");
explosionRadius = (float)explosion_radius.getInt();

if (config.hasChanged()) config.save();
}

Expand Down

0 comments on commit 18949ed

Please sign in to comment.