Skip to content

Commit

Permalink
Final Version?
Browse files Browse the repository at this point in the history
  • Loading branch information
Srdjan-V committed Oct 11, 2022
1 parent dd64c45 commit 2e3bca5
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 11 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ org.gradle.jvmargs = -Xmx3G
org.gradle.daemon = false

# Mod Information
mod_version = 0.1.26
mod_version = 1.0.0
maven_group = srki2k
archives_base_name = tweakedlib

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,42 @@

public interface ICustomLogger {

/**
* This should return true if it found errors.
*/
boolean startupChecks();

/**
* This should return true if it found errors at startup.
* This will be called at startup if it's enabled in the configs,
* or if you request a non-existent powerTier.
*/
boolean runtimeChecks();


/**
* Return true if this logger doesn't have any runtime checks.
*/
boolean discardLoggerAfterStartup();

/**
* Return your mods logger
*/
Logger getModLogger();

/**
* Return your mods configs, may be employ array
*/
String[] getConfigs();

/**
* Returns a lost of errors found by startupChecks() or runtimeChecks();
*/
List<String> getErrors();

/**
* You should call clear() on your list if your logger has runtime and startup checks
*/
void clean();

}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import java.util.ArrayList;
import java.util.List;

import static srki2k.tweakedlib.common.Configs.TLConfigs.Logging.logMissingPowerTier;

public class PowerTierLogging implements ICustomLogger {

public static void RegisterLogger() {
Expand Down Expand Up @@ -43,17 +45,9 @@ public Logger getModLogger() {

@Override
public String[] getConfigs() {
String[] strings = new String[8];

strings[0] = "Default Pumpjack Power Tiers:";
/* strings[1] = "Load these configs" + DefaultPumpjackPowerTiers.load;
strings[2] = "Power Tier ID" + DefaultPumpjackPowerTiers.capacity;
strings[3] = "Default consumption" + DefaultPumpjackPowerTiers.rft;
String[] strings = new String[1];

strings[4] = "Default Excavator Power Tiers:";
strings[5] = "Load these configs" + DefaultExcavatorPowerTiers.load;
strings[6] = "Power Tier ID" + DefaultExcavatorPowerTiers.capacity;
strings[7] = "Default consumption" + DefaultExcavatorPowerTiers.rft;*/
strings[0] = "Logging: " + logMissingPowerTier;

return strings;
}
Expand Down

0 comments on commit 2e3bca5

Please sign in to comment.