Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add config option for max Environmental Controller radius #1906

Open
wants to merge 3 commits into
base: 1.12
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ public class EnvironmentalConfiguration {
public static final String CATEGORY_ENVIRONMENTAL = "environmental";
public static int ENVIRONMENTAL_MAXENERGY = 500000;
public static int ENVIRONMENTAL_RECEIVEPERTICK = 20000;
public static int ENVIRONMENTAL_MAXRADIUS = 100;
public static int MIN_USAGE = 5;

public static float FEATHERFALLING_RFPERTICK = 0.001f;
Expand Down Expand Up @@ -44,6 +45,8 @@ public static void init(Configuration cfg) {
"Maximum RF storage that the environmental controller can hold").getInt();
ENVIRONMENTAL_RECEIVEPERTICK = cfg.get(CATEGORY_ENVIRONMENTAL, "environmentalRFPerTick", ENVIRONMENTAL_RECEIVEPERTICK,
"RF per tick that the the environmental controller can receive").getInt();
ENVIRONMENTAL_MAXRADIUS = cfg.get(CATEGORY_ENVIRONMENTAL, "environmentalMaxRadius", ENVIRONMENTAL_MAXRADIUS,
"Max radius of environmental controller").getInt();
MIN_USAGE = cfg.get(CATEGORY_ENVIRONMENTAL, "environmentalMinRFUsage", MIN_USAGE,
"The minimum RF/tick usage that an active controller consumes").getInt();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ private void initializeFields() {
int r = tileEntity.getRadius();
if (r < 5) {
r = 5;
} else if (r > 100) {
r = 100;
} else if (r > EnvironmentalConfiguration.ENVIRONMENTAL_MAXRADIUS) {
r = EnvironmentalConfiguration.ENVIRONMENTAL_MAXRADIUS;
}
((ScrollableLabel)window.findChild("radius")).setRealValue(r);
((ScrollableLabel)window.findChild("radius")).setRealValue(r).setRealMaximum(EnvironmentalConfiguration.ENVIRONMENTAL_MAXRADIUS);

playersList = window.findChild("players");

Expand Down