mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-26 15:39:37 +00:00
Format code [skip actions]
This commit is contained in:
parent
c0ad1bf75b
commit
a4ef130923
@ -9,8 +9,6 @@ import emu.grasscutter.game.inventory.ItemType;
|
|||||||
import emu.grasscutter.game.props.SceneType;
|
import emu.grasscutter.game.props.SceneType;
|
||||||
import emu.grasscutter.utils.JsonUtils;
|
import emu.grasscutter.utils.JsonUtils;
|
||||||
import emu.grasscutter.utils.lang.Language;
|
import emu.grasscutter.utils.lang.Language;
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
@ -19,6 +17,7 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
|
||||||
public interface Dumpers {
|
public interface Dumpers {
|
||||||
// See `src/handbook/data/README.md` for attributions.
|
// See `src/handbook/data/README.md` for attributions.
|
||||||
@ -355,15 +354,10 @@ public interface Dumpers {
|
|||||||
(id, area) -> {
|
(id, area) -> {
|
||||||
var langHash = area.getTextMapHash();
|
var langHash = area.getTextMapHash();
|
||||||
dump.put(
|
dump.put(
|
||||||
area.getChildArea() == 0 ?
|
area.getChildArea() == 0 ? area.getParentArea() : area.getChildArea(),
|
||||||
area.getParentArea() :
|
|
||||||
area.getChildArea(),
|
|
||||||
new AreaInfo(
|
new AreaInfo(
|
||||||
area.getParentArea(),
|
area.getParentArea(),
|
||||||
langHash == 0
|
langHash == 0 ? "Unknown" : Language.getTextMapKey(langHash).get(locale)));
|
||||||
? "Unknown"
|
|
||||||
: Language.getTextMapKey(langHash).get(locale)
|
|
||||||
));
|
|
||||||
});
|
});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -374,8 +368,7 @@ public interface Dumpers {
|
|||||||
throw new RuntimeException("Failed to create file.");
|
throw new RuntimeException("Failed to create file.");
|
||||||
|
|
||||||
// Write the dump to the file.
|
// Write the dump to the file.
|
||||||
Files.writeString(file.toPath(), Dumpers.miniEncode(dump,
|
Files.writeString(file.toPath(), Dumpers.miniEncode(dump, "id", "parent", "name"));
|
||||||
"id", "parent", "name"));
|
|
||||||
} catch (IOException ignored) {
|
} catch (IOException ignored) {
|
||||||
throw new RuntimeException("Failed to write to file.");
|
throw new RuntimeException("Failed to write to file.");
|
||||||
}
|
}
|
||||||
|
@ -1,18 +1,17 @@
|
|||||||
package emu.grasscutter.utils;
|
package emu.grasscutter.utils;
|
||||||
|
|
||||||
|
import static emu.grasscutter.config.Configuration.*;
|
||||||
|
|
||||||
import ch.qos.logback.classic.Level;
|
import ch.qos.logback.classic.Level;
|
||||||
import ch.qos.logback.classic.Logger;
|
import ch.qos.logback.classic.Logger;
|
||||||
import emu.grasscutter.BuildConfig;
|
import emu.grasscutter.BuildConfig;
|
||||||
import emu.grasscutter.Grasscutter;
|
import emu.grasscutter.Grasscutter;
|
||||||
import emu.grasscutter.net.packet.PacketOpcodesUtils;
|
import emu.grasscutter.net.packet.PacketOpcodesUtils;
|
||||||
import emu.grasscutter.tools.Dumpers;
|
import emu.grasscutter.tools.Dumpers;
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
import static emu.grasscutter.config.Configuration.*;
|
|
||||||
|
|
||||||
/** A parser for start-up arguments. */
|
/** A parser for start-up arguments. */
|
||||||
public interface StartupArguments {
|
public interface StartupArguments {
|
||||||
|
Loading…
Reference in New Issue
Block a user