Merge branch 'develop'
This commit is contained in:
@@ -4,6 +4,7 @@ import java.io.File;
|
||||
import java.io.IOException;
|
||||
import javax.imageio.ImageIO;
|
||||
import core.Command;
|
||||
import core.Config;
|
||||
import core.LocStrings;
|
||||
import dataStructures.KittyChannel;
|
||||
import dataStructures.KittyGuild;
|
||||
@@ -53,7 +54,7 @@ public class CommandTeey extends Command
|
||||
return;
|
||||
|
||||
teeyeeFile = new File(yeeteeFilename);
|
||||
ImageOverlayBuilder builder = new ImageOverlayBuilder("assets/teey/frames/", "teey ", 24, 18);
|
||||
ImageOverlayBuilder builder = new ImageOverlayBuilder(Config.AssetDirectory + "teey/frames/", "teey ", 24, 18);
|
||||
builder.overlay(ImageIO.read(teeyeeFile), name);
|
||||
}
|
||||
catch (IOException e)
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.io.File;
|
||||
import java.io.IOException;
|
||||
import javax.imageio.ImageIO;
|
||||
import core.Command;
|
||||
import core.Config;
|
||||
import core.LocStrings;
|
||||
import dataStructures.KittyChannel;
|
||||
import dataStructures.KittyGuild;
|
||||
@@ -53,7 +54,7 @@ public class CommandYeet extends Command
|
||||
return;
|
||||
|
||||
yeeteeFile = new File(yeeteeFilename);
|
||||
ImageOverlayBuilder builder = new ImageOverlayBuilder("assets/yeet/frames/", "yeet ", 24, 18);
|
||||
ImageOverlayBuilder builder = new ImageOverlayBuilder(Config.AssetDirectory + "yeet/frames/", "yeet ", 24, 18);
|
||||
builder.overlay(ImageIO.read(yeeteeFile), name);
|
||||
}
|
||||
catch (IOException e)
|
||||
|
||||
@@ -29,7 +29,7 @@ public class BenchmarkCommandCompare extends BenchmarkCommand
|
||||
if(entries.size() < 1)
|
||||
output += "Couldn't find any models containing `" + inputSplit[i] + "`!";
|
||||
|
||||
output += BenchmarkCommandInfo.FormatInfo(entries.get(0));
|
||||
output += BenchmarkCommandInfo.formatInfo(entries.get(0));
|
||||
output += lineDelimiter;
|
||||
|
||||
if(entries.size() > 1)
|
||||
|
||||
@@ -14,7 +14,7 @@ public class BenchmarkCommandInfo extends BenchmarkCommand
|
||||
{
|
||||
static final String lineDelimiter = "\n";
|
||||
|
||||
public static String FormatInfo(BenchmarkEntry entry)
|
||||
public static String formatInfo(BenchmarkEntry entry)
|
||||
{
|
||||
String output = "";
|
||||
|
||||
@@ -24,7 +24,7 @@ public class BenchmarkCommandInfo extends BenchmarkCommand
|
||||
return output;
|
||||
}
|
||||
|
||||
public static KittyEmbed FormatInfoEmbed(BenchmarkEntry entry)
|
||||
public static KittyEmbed formatInfoEmbed(BenchmarkEntry entry)
|
||||
{
|
||||
// Populate general embed info
|
||||
KittyEmbed embed = new KittyEmbed();
|
||||
@@ -85,7 +85,7 @@ public class BenchmarkCommandInfo extends BenchmarkCommand
|
||||
|
||||
List<BenchmarkEntry> sortedEntries = manager.evaluateLevenshteinDistance(entries, searchString);
|
||||
BenchmarkEntry entry = sortedEntries.get(0);
|
||||
KittyEmbed embed = FormatInfoEmbed(entry);
|
||||
KittyEmbed embed = formatInfoEmbed(entry);
|
||||
|
||||
if(entries.size() > 1)
|
||||
embed.footerText += " (Chose the " + entry.model + " from " + entries.size() + " potential components. To see others, try the command 'benchmark find " + searchString +"')";
|
||||
|
||||
@@ -8,7 +8,6 @@ import core.rpg.RPGWeapon;
|
||||
|
||||
public class RPGCommandInfo extends RPGCommand
|
||||
{
|
||||
|
||||
@Override
|
||||
public String onRun(RPGState state, RPGInput input)
|
||||
{
|
||||
@@ -27,7 +26,7 @@ public class RPGCommandInfo extends RPGCommand
|
||||
case "hand":
|
||||
case "att":
|
||||
case "attack":
|
||||
out = WeaponStats(state.player.getWeapon());
|
||||
out = weaponStats(state.player.getWeapon());
|
||||
break;
|
||||
|
||||
case "armour":
|
||||
@@ -44,7 +43,7 @@ public class RPGCommandInfo extends RPGCommand
|
||||
case "dress":
|
||||
case "wear":
|
||||
case "outfit":
|
||||
out = ArmorStats(state.player.getArmor());
|
||||
out = armorStats(state.player.getArmor());
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -54,7 +53,7 @@ public class RPGCommandInfo extends RPGCommand
|
||||
return out;
|
||||
}
|
||||
|
||||
private String WeaponStats(RPGWeapon weapon)
|
||||
private String weaponStats(RPGWeapon weapon)
|
||||
{
|
||||
if(weapon == null)
|
||||
return null;
|
||||
@@ -72,7 +71,7 @@ public class RPGCommandInfo extends RPGCommand
|
||||
return out;
|
||||
}
|
||||
|
||||
private String ArmorStats(RPGArmor armor)
|
||||
private String armorStats(RPGArmor armor)
|
||||
{
|
||||
if(armor == null)
|
||||
return null;
|
||||
|
||||
@@ -23,8 +23,9 @@ public class CommandEnabler extends BaseKeyValueFile
|
||||
// Local variables
|
||||
private HashMap<String, Boolean> enabledMap; // Quick lookup
|
||||
private ArrayList<String> keyList; // Tracking ordering for later
|
||||
private final static String name = "commands.config";
|
||||
private final static String name = Config.AssetDirectory + "commands.config";
|
||||
|
||||
// Constructor
|
||||
public CommandEnabler()
|
||||
{
|
||||
super(name);
|
||||
|
||||
@@ -5,4 +5,5 @@ import java.awt.Color;
|
||||
public final class Config
|
||||
{
|
||||
public static final Color ColorDefault = new Color(7*16, 8*16, 9*16); // A slate-grey
|
||||
public static final String AssetDirectory = "./assets/";
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import dataStructures.Pair;
|
||||
// is performed with general strings in the application
|
||||
public class LocCommands extends BaseLocFile
|
||||
{
|
||||
public static final String fileName = "locCommands.config";
|
||||
public static final String fileName = Config.AssetDirectory + "locCommands.config";
|
||||
public static final String function = "LocCommands.stub";
|
||||
|
||||
private static LocCommands instance;
|
||||
|
||||
@@ -9,7 +9,7 @@ import utils.io.FileMonitor;
|
||||
// can then be localized.
|
||||
public class LocStrings extends BaseLocFile
|
||||
{
|
||||
public static final String fileName = "locStrings.config";
|
||||
public static final String fileName = Config.AssetDirectory + "locStrings.config";
|
||||
public static final String function = "LocStrings.stub";
|
||||
|
||||
private static LocStrings instance;
|
||||
|
||||
@@ -492,7 +492,7 @@ public class ObjectBuilderFactory
|
||||
lazyInit();
|
||||
|
||||
if(pluginManager == null)
|
||||
pluginManager = new PluginManager("./plugins/");
|
||||
pluginManager = new PluginManager(Config.AssetDirectory + "plugins/");
|
||||
|
||||
return pluginManager;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import core.Config;
|
||||
import dataStructures.Pair;
|
||||
import utils.io.DirectoryMonitor;
|
||||
import utils.io.FileUtils;
|
||||
@@ -16,7 +17,7 @@ import utils.io.MonitoredFile;
|
||||
public class BenchmarkManager
|
||||
{
|
||||
// Variables
|
||||
public final String directory = "assets/userbench/";
|
||||
public final String directory = Config.AssetDirectory + "userbench/";
|
||||
public final String extension = ".csv";
|
||||
public final String lineDelimiter = "\n";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user