SteamWar/BauSystem2.0
Archiviert
12
0

Commits vergleichen

...
Dieses Repository wurde am 2024-08-05 archiviert. Du kannst Dateien ansehen und es klonen, aber nicht pushen oder Issues/Pull-Requests öffnen.

6 Commits

Autor SHA1 Nachricht Datum
yoyosource
93787baece Add NL translation
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Signed-off-by: yoyosource <yoyosource@nidido.de>
2022-09-20 17:04:55 +02:00
yoyosource
b2a67c8e23 Add NL translation
Signed-off-by: yoyosource <yoyosource@nidido.de>
2022-09-20 17:04:33 +02:00
yoyosource
cc895ea5ec Add eta to laufbau states
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Signed-off-by: yoyosource <yoyosource@nidido.de>
2022-09-20 15:07:42 +02:00
yoyosource
f039687325 Add copy to Simulator
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Signed-off-by: yoyosource <yoyosource@nidido.de>
2022-09-20 14:18:49 +02:00
yoyosource
daa97b9a4e Remove useless messages
Signed-off-by: yoyosource <yoyosource@nidido.de>
2022-09-20 13:10:51 +02:00
yoyosource
a52fd2ec0b Add some dutch messages
Signed-off-by: yoyosource <yoyosource@nidido.de>
2022-09-20 13:06:23 +02:00
15 geänderte Dateien mit 1369 neuen und 54 gelöschten Zeilen

Datei anzeigen

@ -27,14 +27,6 @@ PAGE_LIST=§e Page ({0}/{1}) »»
LIST_PREVIOUS_PAGE=§ePrevious page
LIST_NEXT_PAGE=§eNext page
# Permission
PERMISSION_WORLD = change settings
PERMISSION_WORLD_EDIT = use WorldEdit
PERMISSION_CHANGE_YOU_ENABLE = §aThe player is now allowed to {0}
PERMISSION_CHANGE_YOU_DISABLE = §cThe player is now not allowed to {0}
PERMISSION_CHANGE_OTHER_ENABLE = §aYou are allowed to join the World of §6{0} §a{1}
PERMISSION_CHANGE_OTHER_DISABLE = §cYou are no longer allowed to join the World of §6{0} §c{1}
# Scoreboard
SCOREBOARD_TIME = Time
SCOREBOARD_REGION = Region
@ -135,7 +127,7 @@ BAU_INFO_ITEM_LORE_FIRE = §7Fire§8: §e{0}
BAU_INFO_ITEM_LORE_COLOR = §7Color§8: §e{0}
BAU_INFO_ITEM_LORE_PROTECT = §7Protect§8: §e{0}
BAU_INFO_COMMAND_HELP = §8/§ebauinfo §8- §7Information regarding this Bau
BAU_INFO_COMMAND_HELP = §8/§ebauinfo §8- §7Information regarding this build server
BAU_INFO_COMMAND_OWNER = §7Owner: §e{0}
BAU_INFO_COMMAND_MEMBER = §7Member: §e
BAU_INFO_MEMBER_INFO = §e{0}§8[{1}§8,{2}§8] §8
@ -189,7 +181,7 @@ HOTBAR_HELP_GENERIC=§7Saves a hotbar. While joining a bau with an empty invento
HOTBAR_HELP_SAVE=§8/§ehotbar save §8-§7 Saves your current hotbar
HOTBAR_HELP_LOAD=§8/§ehotbar load §8-§7 Loads the saved hotbar
HOTBAR_HELP_SHOW=§8/§ehotbar show §8-§7 Displays the saved hotbar
HOTBAR_SAVED=§7Hotbar saves
HOTBAR_SAVED=§7Hotbar saved
HOTBAR_LOADED=§7Hotbar loaded
HOTBAR_INVENTORY=Standard hotbar
# GUI
@ -229,8 +221,8 @@ SCRIPT_COMMAND_ERROR_FOURTH_ARG_NOVALUE = §cThe fourth argument is missing and
SCRIPT_COMMAND_ERROR_BOOLEAN_COMPARE = §cOnly booleans can be compared
SCRIPT_COMMAND_ERROR_NUMBER_COMPARE = §cOnly numbers can be compared
SCRIPT_COMMAND_ERROR_ONLY_STRINGS_ALLOWED = §cOnly strings can be compared
SCRIPT_COMMAND_ERROR_ONLY_NUMBERS_ALLOWED = §cOnly numbers can be compared
SCRIPT_COMMAND_ERROR_ONLY_STRINGS_ALLOWED = §cOnly strings are allowed
SCRIPT_COMMAND_ERROR_ONLY_NUMBERS_ALLOWED = §cOnly numbers are allowed
## Commands
SCRIPT_COMMAND_ARITHMETIC_ADD_HELP_1 = §eadd §8<§7variable§8> §8<§7variable§8|§7value§8>
@ -249,7 +241,7 @@ SCRIPT_COMMAND_ARITHMETIC_MUL_HELP_3 = Multiplication between the two last varia
SCRIPT_COMMAND_ARITHMETIC_MUL_ERROR = §cOnly numbers can be multiplied
SCRIPT_COMMAND_ARITHMETIC_SUB_HELP_1 = §esub §8<§7variable§8> §8<§7variable§8|§7value§8>
SCRIPT_COMMAND_ARITHMETIC_SUB_HELP_2 = §esub §8<§7variable§8> §8<§7variable§8§8|§7value> §8<§7variable§8|§7value§8>
SCRIPT_COMMAND_ARITHMETIC_SUB_HELP_2 = §esub §8<§7variable§8> §8<§7variable§8§8|§7value§8> §8<§7variable§8|§7value§8>
SCRIPT_COMMAND_ARITHMETIC_SUB_HELP_3 = Subtraction between the two last variables and writes the result in the first one
SCRIPT_COMMAND_ARITHMETIC_SUB_ERROR = §cOnly numbers can be subtracted
@ -506,6 +498,7 @@ SIMULATOR_CREATE_HELP = §8/§esimulator create §8[§7name§8] §8-§7 Create a
SIMULATOR_CHANGE_HELP = §8/§esimulator change §8-§7 Change your simulator wand selection
SIMULATOR_DELETE_HELP = §8/§esimulator delete §8[§7name§8] §8-§7 Deletes the simulator
SIMULATOR_START_HELP = §8/§esimulator start §8[§7name§8] §8-§7 Starts the simulator
SIMULATOR_COPY_HELP = §8/§esimulator copy §8[§7to-copy§8] §8[§7name§8] §8-§7 Copy the simulator
SIMULATOR_NO_PERMS = §cYou are not allowed to use the simulator here
SIMULATOR_GUI_ITEM_NAME = §eTNT Simulator
@ -1115,7 +1108,7 @@ LAUFBAU_STATE_SPLITTING_POINTS = Splitting points
LAUFBAU_STATE_SHRINKING_POINTS = Shrinking points
LAUFBAU_STATE_CREATING_INNER_BLOCKS = Creating inner blocks
LAUFBAU_STATE_CREATING_OUTER_BLOCKS = Creating outer blocks
LAUFBAU_SIMPLE_PROGRESS = §e{0}§8: §e{1}§8/§e{2}
LAUFBAU_SIMPLE_PROGRESS = §e{0}§8: §e{1}§8/§e{2} §7Time left§8: §e{3}
LAUFBAU_DONE = §aDone
LAUFBAU_SETTINGS_GUI_NAME = §eLaufbau

Datei anzeigen

@ -27,14 +27,6 @@ PAGE_LIST=§e Seite ({0}/{1}) »»
LIST_PREVIOUS_PAGE=§eVorherige Seite
LIST_NEXT_PAGE=§eNächste Seite
# Permission
PERMISSION_WORLD = Einstellungen vornehmen
PERMISSION_WORLD_EDIT = WorldEdit verwenden
PERMISSION_CHANGE_YOU_ENABLE = §aDer Spieler darf nun {0}
PERMISSION_CHANGE_YOU_DISABLE = §cDer Spieler darf nun nicht mehr {0}
PERMISSION_CHANGE_OTHER_ENABLE = §aDu kannst nun auf der Welt von §6{0} §a{1}
PERMISSION_CHANGE_OTHER_DISABLE = §cDu kannst nun nicht mehr auf der Welt von §6{0} §c{1}
# Scoreboard
SCOREBOARD_TIME = Uhrzeit
SCOREBOARD_REGION = Region
@ -97,7 +89,6 @@ AUTOSTART_MESSAGE_NO_REGION = §cDu befindest dich derzeit in keiner Region
AUTOSTART_MESSAGE_RESET = §eDer AutostartTimer wurde zurückgesetzt
AUTOSTART_MESSAGE_START = §eAutostartTimer gestartet
AUTOSTART_MESSAGE_RESULT1 = §eZeit §7bis zur §eExplosion §7am Gegner§8:§e {0}
AUTOSTART_MESSAGE_DATE_PATTERN=mm:ss SSSS
AUTOSTART_MESSAGE_RESULT2 = §eZeitdifferenz in ticks §7bis {0} Sekunden§8:§e {1}
AUTOSTART_MESSAGE_RESULT3 = §7Positiv, wenn zu wenig, negativ wenn zu viel
@ -245,7 +236,7 @@ SCRIPT_COMMAND_ARITHMETIC_DIV_HELP_3 = Division zwischen den letzten beiden Vari
SCRIPT_COMMAND_ARITHMETIC_DIV_ERROR = §cNur Zahlen können dividiert werden
SCRIPT_COMMAND_ARITHMETIC_MUL_HELP_1 = §emul §8<§7Variable§8> §8<§7Variable§8|§7Wert§8>
SCRIPT_COMMAND_ARITHMETIC_MUL_HELP_2 = §emul §8<§7Variable§8> §8<§7Variable§8§8|§7Wert> §8<§7Variable§8|§7Wert§8>
SCRIPT_COMMAND_ARITHMETIC_MUL_HELP_2 = §emul §8<§7Variable§8> §8<§7Variable§8§8|§7Wert§8> §8<§7Variable§8|§7Wert§8>
SCRIPT_COMMAND_ARITHMETIC_MUL_HELP_3 = Multiplikation zwischen den letzten beiden Variablen und schreibt es in die erste.
SCRIPT_COMMAND_ARITHMETIC_MUL_ERROR = §cNur Zahlen können multipliziert werden
@ -507,6 +498,7 @@ SIMULATOR_CREATE_HELP = §8/§esimulator create §8[§7name§8] §8-§7 Erstelle
SIMULATOR_CHANGE_HELP = §8/§esimulator change §8-§7 Wechsel zu einem anderen Simulator
SIMULATOR_DELETE_HELP = §8/§esimulator delete §8[§7name§8] §8-§7 Löscht den Simulator
SIMULATOR_START_HELP = §8/§esimulator start §8[§7name§8] §8-§7 Startet die Simulation
SIMULATOR_COPY_HELP = §8/§esimulator copy §8[§7to-copy§8] §8[§7name§8] §8-§7 Kopiert einen Simulator
SIMULATOR_NO_PERMS = §cDu darfst hier nicht den Simulator nutzen
SIMULATOR_GUI_ITEM_NAME = §eTNT Simulator
@ -1094,7 +1086,7 @@ LAUFBAU_STATE_SPLITTING_POINTS = Punkte trennen
LAUFBAU_STATE_SHRINKING_POINTS = Punkte ausdünnen
LAUFBAU_STATE_CREATING_INNER_BLOCKS = Innenraum füllen
LAUFBAU_STATE_CREATING_OUTER_BLOCKS = Mantel bauen
LAUFBAU_SIMPLE_PROGRESS = §e{0}§8: §e{1}§8/§e{2}
LAUFBAU_SIMPLE_PROGRESS = §e{0}§8: §e{1}§8/§e{2} §7Übrige Zeit §8: §e{3}
LAUFBAU_DONE = §aZuende gebaut
LAUFBAU_SETTINGS_GUI_NAME = §eLaufbau

Datei-Diff unterdrückt, da er zu groß ist Diff laden

Datei anzeigen

@ -54,20 +54,4 @@ public enum Permission {
public static boolean hasPermission(Player member, Permission permission) {
return permission.hasPermission(member);
}
private static void sendMessages(Player player, boolean ableTo, BauweltMember target, String what) {
Player targetPlayer = Bukkit.getPlayer(SteamwarUser.get(target.getMemberID()).getUUID());
if (targetPlayer != null) {
if (ableTo) {
BauSystem.MESSAGE.send("PERMISSION_CHANGE_OTHER_ENABLE", targetPlayer, player.getName(), BauSystem.MESSAGE.parse(what, targetPlayer));
} else {
BauSystem.MESSAGE.send("PERMISSION_CHANGE_OTHER_DISABLE", targetPlayer, player.getName(), BauSystem.MESSAGE.parse(what, targetPlayer));
}
}
if (ableTo) {
BauSystem.MESSAGE.send("PERMISSION_CHANGE_YOU_ENABLE", player, BauSystem.MESSAGE.parse(what, player));
} else {
BauSystem.MESSAGE.send("PERMISSION_CHANGE_YOU_DISABLE", player, BauSystem.MESSAGE.parse(what, player));
}
}
}

Datei anzeigen

@ -97,6 +97,20 @@ public class SimulatorCommand extends SWCommand {
tntSimulator.start(p);
}
@Register(value = "copy", description = "SIMULATOR_COPY_HELP")
public void copy(@Validator Player p, @Mapper("simulators") String toCopy, String name) {
TNTSimulator tntSimulator = SimulatorStorage.getSimulator(toCopy);
if (tntSimulator == null) {
BauSystem.MESSAGE.send("SIMULATOR_NOT_EXISTS", p);
return;
}
if (SimulatorStorage.getSimulator(name) != null) {
BauSystem.MESSAGE.send("SIMULATOR_NAME_ALREADY_EXISTS", p);
return;
}
SimulatorStorage.copySimulator(tntSimulator, name);
}
@Mapper("simulators")
public TypeMapper<String> allSimulators() {
return new TypeMapper<String>() {

Datei anzeigen

@ -115,6 +115,10 @@ public class SimulatorStorage implements Enable, Disable {
new File(simulatorsDir, name + ".simulator").delete();
}
public static void copySimulator(TNTSimulator tntSimulator, String name) {
tntSimulators.put(name, new TNTSimulator(tntSimulator.toYAPION()));
}
public static void removeSimulator(ItemStack itemStack) {
if (!ItemUtils.isItem(itemStack, "simulator")) {
return;

Datei anzeigen

@ -116,7 +116,7 @@ public class Laufbau {
return;
}
if (shrinkingOuterPointsState != null) {
creatingInnerBlocksState = new CreatingInnerBlocksState(splittingPointsState.getInnerPoints(), world, processingTracesState.getCuboidList(), splittingPointsState.getIntersectedCuboid(), editSession, elements, preferingBlastResistance);
creatingInnerBlocksState = new CreatingInnerBlocksState(splittingPointsState.getInnerPoints(), world, splittingPointsState.getIntersectedCuboid(), editSession, elements);
return;
}
if (splittingPointsState != null) {

Datei anzeigen

@ -30,36 +30,37 @@ import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.entity.Player;
import java.text.SimpleDateFormat;
import java.time.Instant;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
public class CreatingInnerBlocksState implements LaufbauState {
private long start = System.currentTimeMillis();
private List<Point> innerBlocks;
private int index = 0;
private World world;
private List<Cuboid> cuboidList;
private Map<Point, List<Cuboid>> intersectedCuboid;
private EditSession editSession;
private List<BlockBoundingBox> elements;
private boolean preferingBlastResistance;
public CreatingInnerBlocksState(List<Point> innerBlocks, World world, List<Cuboid> cuboidList, Map<Point, List<Cuboid>> intersectedCuboid, EditSession editSession, List<BlockBoundingBox> elements, boolean preferingBlastResistance) {
public CreatingInnerBlocksState(List<Point> innerBlocks, World world, Map<Point, List<Cuboid>> intersectedCuboid, EditSession editSession, List<BlockBoundingBox> elements) {
this.innerBlocks = innerBlocks;
this.world = world;
this.cuboidList = cuboidList;
this.intersectedCuboid = intersectedCuboid;
this.editSession = editSession;
this.elements = elements;
this.preferingBlastResistance = preferingBlastResistance;
}
@Override
public String actionBarMessage(Player p) {
return BauSystem.MESSAGE.parse("LAUFBAU_SIMPLE_PROGRESS", p, BauSystem.MESSAGE.parse("LAUFBAU_STATE_CREATING_INNER_BLOCKS", p), index, innerBlocks.size());
return BauSystem.MESSAGE.parse("LAUFBAU_SIMPLE_PROGRESS", p, BauSystem.MESSAGE.parse("LAUFBAU_STATE_CREATING_INNER_BLOCKS", p), index, innerBlocks.size(), eta(p, start, index, innerBlocks.size()));
}
@Override

Datei anzeigen

@ -41,6 +41,8 @@ public class CreatingOuterBlocksState implements LaufbauState {
SHELL = BlockTypes.get("minecraft:end_stone").getDefaultState().toBaseBlock();
}
private long start = System.currentTimeMillis();
private List<Point> outerBlocks;
private int index = 0;
@ -55,7 +57,7 @@ public class CreatingOuterBlocksState implements LaufbauState {
@Override
public String actionBarMessage(Player p) {
return BauSystem.MESSAGE.parse("LAUFBAU_SIMPLE_PROGRESS", p, BauSystem.MESSAGE.parse("LAUFBAU_STATE_CREATING_OUTER_BLOCKS", p), index, outerBlocks.size());
return BauSystem.MESSAGE.parse("LAUFBAU_SIMPLE_PROGRESS", p, BauSystem.MESSAGE.parse("LAUFBAU_STATE_CREATING_OUTER_BLOCKS", p), index, outerBlocks.size(), eta(p, start, index, outerBlocks.size()));
}
@Override

Datei anzeigen

@ -36,6 +36,8 @@ import java.util.function.BiPredicate;
public class ExpandingTracesState implements LaufbauState {
private long start = System.currentTimeMillis();
private List<Cuboid> cuboidList;
private int totalCuboids;
@ -54,7 +56,7 @@ public class ExpandingTracesState implements LaufbauState {
@Override
public String actionBarMessage(Player p) {
return BauSystem.MESSAGE.parse("LAUFBAU_SIMPLE_PROGRESS", p, BauSystem.MESSAGE.parse("LAUFBAU_STATE_EXPANDING_TRACES", p), totalCuboids - cuboidList.size(), totalCuboids);
return BauSystem.MESSAGE.parse("LAUFBAU_SIMPLE_PROGRESS", p, BauSystem.MESSAGE.parse("LAUFBAU_STATE_EXPANDING_TRACES", p), totalCuboids - cuboidList.size(), totalCuboids, eta(p, start, totalCuboids - cuboidList.size(), totalCuboids));
}
@Override

Datei anzeigen

@ -35,6 +35,8 @@ import java.util.function.BiPredicate;
public class FilteringTracesState implements LaufbauState {
private long start = System.currentTimeMillis();
private World world;
private BiPredicate<Location, Integer> inRegionCheck;
@ -55,7 +57,7 @@ public class FilteringTracesState implements LaufbauState {
@Override
public String actionBarMessage(Player p) {
return BauSystem.MESSAGE.parse("LAUFBAU_SIMPLE_PROGRESS", p, BauSystem.MESSAGE.parse("LAUFBAU_STATE_FILTERING_TRACES", p), totalRecord - recordList.size(), totalRecord);
return BauSystem.MESSAGE.parse("LAUFBAU_SIMPLE_PROGRESS", p, BauSystem.MESSAGE.parse("LAUFBAU_STATE_FILTERING_TRACES", p), totalRecord - recordList.size(), totalRecord, eta(p, start, totalRecord - recordList.size(), totalRecord));
}
@Override

Datei anzeigen

@ -19,8 +19,13 @@
package de.steamwar.bausystem.features.slaves.laufbau.states;
import de.steamwar.bausystem.BauSystem;
import org.bukkit.entity.Player;
import java.text.SimpleDateFormat;
import java.time.Instant;
import java.util.Date;
public interface LaufbauState {
String actionBarMessage(Player p);
@ -28,4 +33,8 @@ public interface LaufbauState {
boolean hasNext();
void next();
default String eta(Player p, long start, int done, int total) {
return new SimpleDateFormat(BauSystem.MESSAGE.parse("TIME", p)).format(Date.from(Instant.ofEpochMilli((System.currentTimeMillis() - start) / done * total)));
}
}

Datei anzeigen

@ -31,6 +31,8 @@ import java.util.List;
public class ProcessingTracesState implements LaufbauState {
private long start = System.currentTimeMillis();
private int totalTNTPositions;
private List<TNTPosition> tntPositionList;
@ -44,7 +46,7 @@ public class ProcessingTracesState implements LaufbauState {
@Override
public String actionBarMessage(Player p) {
return BauSystem.MESSAGE.parse("LAUFBAU_SIMPLE_PROGRESS", p, BauSystem.MESSAGE.parse("LAUFBAU_STATE_PROCESSING_TRACES", p), totalTNTPositions - tntPositionList.size(), totalTNTPositions);
return BauSystem.MESSAGE.parse("LAUFBAU_SIMPLE_PROGRESS", p, BauSystem.MESSAGE.parse("LAUFBAU_STATE_PROCESSING_TRACES", p), totalTNTPositions - tntPositionList.size(), totalTNTPositions, eta(p, start, totalTNTPositions - tntPositionList.size(), totalTNTPositions));
}
@Override

Datei anzeigen

@ -29,6 +29,8 @@ import java.util.List;
public class ShrinkingOuterPointsState implements LaufbauState {
private long start = System.currentTimeMillis();
private List<Point> outerPoints;
private List<Point> innerPoints;
private int index = 0;
@ -43,7 +45,7 @@ public class ShrinkingOuterPointsState implements LaufbauState {
@Override
public String actionBarMessage(Player p) {
return BauSystem.MESSAGE.parse("LAUFBAU_SIMPLE_PROGRESS", p, BauSystem.MESSAGE.parse("LAUFBAU_STATE_SHRINKING_POINTS", p), index, outerPoints.size());
return BauSystem.MESSAGE.parse("LAUFBAU_SIMPLE_PROGRESS", p, BauSystem.MESSAGE.parse("LAUFBAU_STATE_SHRINKING_POINTS", p), index, outerPoints.size(), eta(p, start, index, outerPoints.size()));
}
@Override

Datei anzeigen

@ -32,6 +32,8 @@ public class SplittingPointsState implements LaufbauState {
private static final Cuboid ONE = new Cuboid(0, 0, 0, 1, 1, 1);
private static final Cuboid ABOVE_HALF = new Cuboid(0, 1, 0, 1, 0.5, 1);
private long start = System.currentTimeMillis();
private List<Point> blocks;
private int totalBlocks;
private List<Cuboid> cuboidList;
@ -53,7 +55,7 @@ public class SplittingPointsState implements LaufbauState {
@Override
public String actionBarMessage(Player p) {
return BauSystem.MESSAGE.parse("LAUFBAU_SIMPLE_PROGRESS", p, BauSystem.MESSAGE.parse("LAUFBAU_STATE_SPLITTING_POINTS", p), totalBlocks - blocks.size(), totalBlocks);
return BauSystem.MESSAGE.parse("LAUFBAU_SIMPLE_PROGRESS", p, BauSystem.MESSAGE.parse("LAUFBAU_STATE_SPLITTING_POINTS", p), totalBlocks - blocks.size(), totalBlocks, eta(p, start, totalBlocks - blocks.size(), totalBlocks));
}
@Override